Article Search
닫기

## Original Article

Split Viewer

International Journal of Fuzzy Logic and Intelligent Systems 2014; 14(1): 26-33

Published online March 1, 2014

https://doi.org/10.5391/IJFIS.2014.14.1.26

© The Korean Institute of Intelligent Systems

## Constant Altitude Flight Control for Quadrotor UAVs with Dynamic Feedforward Compensation

Anastasia Razinkova1 , Byung-Jun Kang1 , Hyun-Chan Cho1 , and Hong-Tae Jeon2

1Department of Electronics Engineering, Korea University of Technology and Education, Cheonan, Korea
2Department of Electronics Engineering, Chung-Ang University, Seoul, Korea

Correspondence to :
Hong-Tae Jeon (htjeon@cau.ac.kr)

Received: December 24, 2013; Revised: March 18, 2014; Accepted: March 24, 2014

This study addresses the control problem of an unmanned aerial vehicle (UAV) during the transition period when the flying mode changes from hovering to translational motion in the horizontal plane. First, we introduce a compensation algorithm that improves height stabilization and reduces altitude drop. The main principle is to incorporate pitch and roll measurements into the feedforward term of the altitude controller to provide a larger thrust force. To further improve altitude control, we propose the fuzzy logic controller that improves system behavior. Simulation results presented in the paper highlight the effectiveness of the proposed controllers.

Keywords: Altitude control,Feedforward compensation,Quadrotor,Unmanned aerial vehicle

The field of unmanned aerial vehicles (UAVs) has gained increasing research interest in recent years. This is mainly because of their ability to effectively perform different tasks in a wide range of military and commercial applications. Currently, UAVs are being used in several applications such as search and rescue missions [1], power plant inspection [2], surveillance [3], agricultural services [4], and mapping and photography [4].

Four-rotor or quadrotor UAVs belong to a promising class of UAVs, and significant research progress has been achieved in the field in recent years. Because of their small size, low weight, and high maneuverability, they are suitable for both indoor and outdoor applications. The significant advantage of quadrotors is their ability to perform vertical take-off and landing, whereas their main disadvantage is their limited flight time.

A quadrotor is an underactuated helicopter with four input forces and six output coordinates with highly coupled dynamics; for this reason, controller design for quadrotors is a challenging issue. Currently, researchers are primarily focused on the design of linear controllers, such as proportional-integral-differential (PID) controllers [5] and linear quadratic regulators (LQ-regulators) [6], and nonlinear control methods, which include sliding mode controllers [7], backstepping control approaches [8], adaptive controllers [9], and model predictive attitude controllers [10]. Several studies have investigated the design of controllers for quadrotor stabilization during hovering [11], whereas others are dedicated to controller design for trajectory tracking [12]. This paper focuses on the design of a dynamic feedforward controller that improves the behavior of the UAV during the transition period when the flying mode changes from hovering to translational motion in the horizontal plane. A significant drop in altitude can occur in this period if linear controllers like PID or LQR are used. In this paper, a feedforward compensator that improves the performance of the altitude controller and does not require increased computational power is proposed. To further improve altitude control, a fuzzy logic controller is introduced into the control system.

The rest of the paper is organized as follows. In Section 2, we describe the quadrotor dynamic model. Section 3 describes the design of the proposed dynamic feedforward controller and fuzzy controller. Simulation results are presented in Section 4. We present our concluding remarks and outline out future work in Section 5.

In this section, we examine the dynamics of a quadrotor helicopter to gain the insight necessary for quadrotor controller design.

Quadrotors consist of four rotors attached to a rigid cross-shaped airframe, as shown in Figure 1, with two opposing rotors rotating clockwise (1,3) and the other two rotating counterclockwise (2,4). The quadrotor is controlled by using the differential control of the thrust generated by each rotor. Vertical motion is accomplished by simultaneously increasing or decreasing the speed of all four rotors. Pitch motion is achieved by increasing the difference in the speed between the front and rear set of rotors. Roll motion is archived in the same manner using the left and right set of rotors. A quadrotor is an underactuated system, which means that the forward/backward and left/right motions are coupled with pitch and roll motions, respectively, and the quadrotor can be controlled through them. The remaining yaw motion can be realized by increasing the speed of the two rotors rotating in the clockwise direction and by decreasing the speed of the remaining two rotors.

The dynamics of quadrotor helicopters have been studied in detail by several groups [13, 14]. A rigid-body model of a quadrotor can be obtained using Newton’s equations [15], as given in Eq. (1):

${ξ˙=vmv˙=mgzA→-TRzB→R˙=RΩ×IΩ˙=-Ω×IΩ+τ$

where m and I ∈ ℝ3×3 are the mass and rotational inertia matrix of the flyer. g denotes acceleration due to gravity. The matrix R ∈ SO(3) describes the rotational transformation from frame {A} to frame {B}, where {A} is the right-hand inertial frame denoted by ${A}={xA→,yA→,zA→}$, with $zA→$ aligned with the direction of gravity, ${B}={xB→,yB→,zB→}$ is the body-fixed frame with its origin at ξ = (x, y, z)T ∈ {B}. The v ∈ ℝ3 vector describes the linear velocity of the quadrotor expressed in a right-hand inertial frame {A}. Ω ∈ {B} is the angular velocity of the quadrotor expressed by {B}. Ω× denotes the skew-symmetric matrix, such that Ω×v = Ω × v for the vector cross product x and any vector v.

$R=(cθcψsφsθcψ-cφsψsθcφcψ+sψsφcθsψsφsθsψ+cφcψsθcφsψ-cψsφ-sθcθsφcθcφ)$

where φ, θ, and ψ are the Euler angles, roll, pitch, and yaw, respectively.

The total thrust and torques produced by the four rotors are denoted by T and τ ∈ {B}, respectively, and can be obtained using the following model:

$T=k∑i=14ωi2$$τ=[τ1τ2τ3]=[lk (ω22-ω42)lk (ω12-ω32)b (ω22+ω42-ω12-ω32)]$

where ωi denotes the speed of rotor i. The distance from the rotor to the center of mass is denoted by l. The parameters b and k are the positive proportionality constants relative to the density of air, the shape of the blades, the number of the blades, the chord length of the blades, the pitch angle of the blade airfoil, and the drag constant. Eq. (4) can be written in a matrix form as [15]

$[Tτ1τ2τ3]=[kkkk0lk0-lklk0-lk0-bb-bb]︸Γ [ω12ω22ω32ω42]$

The rotor speeds required for the given values of thrust and moments can be found using Eq. (5) and the inverse of the constant matrix Γ−1.

The model given in Eq. (1) is a simplified model that does not consider several aerodynamic effects such as vortex ring state, blade flapping, etc. [15]. However, it is reasonable to neglect these effects at low values of UAV speed for the sake of model simplicity.

### 3.1 General Control of Quadrotor

The control problem is challenging for several reasons. First, the system is underactuated: there are four inputs, whereas the workspace is six dimensional. Second, the aerodynamic model described above has been simplified. In addition, practical motor controllers must overcome the drag moments to generate the required speeds and realize the input thrust T and torques τ. The dynamics of the motors and their interactions with the drag forces on the propellers can be difficult to model, although first-order linear models are a useful approximation. A hierarchical control approach is commonly applied to quadrotors; one such control system is shown in Figure 2 (all the variables with an asterisk superscript (*) are desired values). The lowest level control controls the rotor rotational speed. The next level controls vehicle attitude. The top level controls position along a trajectory.

This paper focuses on the design of a dynamic feedforward compensator incorporated into the position controller. Position control is achieved by means of conventional proportional-differential (PD) controllers, because low velocities are assumed.

### 3.2 Dynamic Feedforward Compensator Design

A quadcopter position controller can be separated into an altitude controller and a translational motion controller. In the hovering mode, only the altitude controller needs to operate; this controller is usually a PD-regulator with constant feedforward compensation for the gravity term. However, when the UAV changes the flight mode from hovering to translational motion, the performance of the altitude controller may deteriorate.

Quadrotor UAVs must change their roll and/or pitch angles to perform translational motion in the X- or Y-direction. Because the thrust provided by the propellers is always normal to the quadrotor plane, the vertical component of the thrust, which is required to maintain the altitude, can be significantly reduced as a result of quadrotor roll. This results in the UAV losing altitude, which is considered undesirable in most applications and may cause a collision between the vehicle and the environment.

As quadrotors are conventionally equipped with sensors monitoring the posture of the UAV, the values of pitch and roll angles are available to the control system. Using an accurate mathematical model, it is possible to compensate for the loss of thrust by employing a feedforward term, if the pitch and roll angles are known.

The equation for altitude dynamics can be derived as an extension of the second expression in Eq. (1).

$m [x¨y¨z¨]=mg [001]-TR [001]$

Substituting the expression for R given by Eq. (2) into Eq. (6) and dividing both sides of the equation by m, one can obtain the altitude dynamics as

$z¨=g-(cosφcosθ)Tm$

Normally, quadrotor control systems use static feedforward gravity compensators, as shown in Figure 3a. The compensation term TFF = mg can be obtained from Eq. (7) by assuming that φ and θ are zero (the quadcopter is in hovering mode) and setting = 0. However, calculating feedforward term this way may prove to be insufficient in cases when the angles φ and θ are different from zero, which occurs in all flight modes except hovering. The insufficiency of the gravity compensation may lead to a decrease in UAV altitude. In addition, the loss of altitude will increase for bigger angles φ and θ, although their maximal values are usually restricted in most practical quadcopter UAVs.

Therefore, we propose the use of a dynamic feedforward compensator term that will change with the roll and pitch angles according to TFF = mg/(cosφcosθ), as shown in Figure 3b. If the roll and pitch angles are zero, the proposed compensator behaves identically to the conventional static gravity compensator. However, if the roll and pitch angles start to change, the value of the feedforward term increases, which reduces the drop in the UAV altitude. In this manner, it is possible to decrease the loss in altitude when the quadcopter flight mode transitions from hovering to normal flight. The effect of changes in the roll and pitch angles on the feedforward compensator value is demonstrated in Figure 4.

### 3.3 Design of Fuzzy Controller

To improve the performance of altitude control, the PD controller was replaced by a fuzzy logic controller. The proposed fuzzy logic controller provides a faster response with less overshoot by allowing different system parameters to exhibit their most advantageous features at different times. In the proposed fuzzy logic controller, the desired height value z* is compared with the actual height z of the UAV. The difference between these two signals is called the position error (ez). The slope angle (θez) of the error derivative, or the error change rate, can be then calculated as

$θez=atan(ΔezΔt)$

The inputs of the fuzzy controller are the position error ez (proportional action) and the theta error θez (derivative action). The output of the proposed fuzzy controller u is multiplied by a gain KF = 0.25TFF. Both inputs and the output of the controller are designed to have five membership functions, namely negative large (NL), negative small (NS), zero (Z), positive small (PS), and positive large (PL). The membership functions of the inputs and output are shown in Figure 5a–c, respectively.

The fuzzy logic controller’s output indicates how much we need to add to the initial feedforward speed. The output thrust due to the height controller is calculated as

$T=mgcos(φ)cos(θ)+KFu$

It should be noted that, in the proposed rules, “negative error” means that the value of the actual position is greater than that of the desired position. Therefore, in this case, we need to decrease the speed of all four motors so as to reduce the thrust force. On the contrary, ‘positive error’ means that the value of the actual position is lower than that of the desired position; thus, the speed of the motors should be increased to create a larger thrust force. Using these restrictions, the rules of the fuzzy controller are shown in Table 1. Fuzzy inference generated using the Mamdani method is used. The method of defuzzification used is centroid.

The effects of the proposed feedforward compensator and the proposed fuzzy logic controller on the UAV performance were investigated in a series of computer simulations. A MATLAB model of a quadrotor UAV was used, with the physical parameters of the quadrotor adopted from the model provided in robotics toolbox for MATLAB. In the four simulation cases, the UAV moves from its starting position (0,0,1)

• to a given point along the X-axis (desired end point is (1,0,1))

• along the X-axis with a constant speed ( = 1 m/s)

• along the X- and Y-axis with a constant speed ( = 1m/s, = 1 m/s)

• along a circular trajectory in the X-Y plane (x = cos0.3t m, y = sin0.3t m).

In all simulation scenarios described above, the altitude of the UAV is required to remain constant.

The simulation results are shown in Figure 6. In all of the simulation cases, the root-mean-square error (RMSE) and maximum error (Emax) were measured; their values are presented in Table 2.

It should be noted that the proposed feedforward controller improved the performance of the system in all simulation cases. The effect of the controller is more significant in the first and fourth scenarios, when the RMSE decreased from approximately 0.4 cm to 0.1 cm and the maximum error decreased from 1.3 cm to 0.3 cm, which corresponds to an approximately 75% reduction in the altitude drop. In the case of motion along a straight line (cases 2 and 3), implementation of the proposed controller resulted in a reduction in RMSE and maximum altitude error by approximately 21% and 24%, respectively. Implementation of the proposed fuzzy logic controller instead of the PD controller allowed further improvement in the performance of the system in all simulation cases. The effect of height drop is nearly canceled in all four scenarios as a result of the implementation of the proposed fuzzy logic controller. In addition, the RMSE decreased by a factor of 100, and the maximum error decreased by a factor of 104.

### 5. Conclusions and Future Work

In this paper, we proposed a dynamic feedforward compensator for altitude control of quadrotor UAVs. The main concept was to incorporate pitch and roll measurements into the feedforward term of the altitude controller so as to provide a higher thrust force when the UAV flight mode changed from hovering to translational motion in the horizontal plane. To further improve altitude control of the quadrotor UAV, we proposed a fuzzy logic based controller that was designed using expert knowledge and was more flexible than a PD controller. A series of numerical simulations were performed to analyze the performance of both controllers; they showed that the implementation of the proposed controllers led to improved results.

Future work will consider improvements to the proposed controller. Additionally, we intend to investigate the performance of the proposed algorithm in a hardware implementation.

This work was supported by the Research Program of Semiconductor/Display Cluster in KOREATECH.

Fig. 1.

Fig. 2.

Fig. 3.

Comparison of feedforward architectures for altitude controller: (a) with constant feedforward compensator (A-type); (b) with proposed dynamic feedforward compensator (B-type); (c) with proposed fuzzy controller and dynamic feedforward compensator (C-type).

Fig. 4.

Effect of FF compensator: (a) feedforward term; (b) pitch and roll angles.

Fig. 5.

Membership functions for: (a) error, ez; (b) theta error θez, and (c) output u.

Fig. 6.

Simulation results for A-type (constant compensation), B-type (dynamic compensation), and C-type (fuzzy with dynamic compensation) controllers: (a) motion to a given point along the X-axis (point-to-point); (b) motion along the X-axis with constant speed; (c) motion along the X- and Y-axis with constant speed (line); (d) motion along a circular trajectory in the X-Y plane.

Table. 1.

Table 1. Rule base.

ezNLNSZPSPL
θez
NLPLPLPLPSZ
NSPLPLPSZNS
ZPLPSZNSNL
PSPSZNSNLNL
PLZNSNLNLNL

NL, negative large; NS, negative small; Z, zero; PS, positive small; PL, positive large.

Table. 2.

Table 2. RMSE and maximum altitude drop (Emax) for a system with A-type (constant compensation), B-type (dynamic compensation), and C-type (fuzzy with dynamic compensation) controllers.

SimulationControllerRMSE (cm)Emax (cm)
PointA-type0.371.29
B-type0.100.31
C-type0.16 · 10−30.6 · 10−4

Line XA-type0.812.17
B-type0.641.65
C-type0.7 · 10−50.5 · 10−6

Line XYA-type1.634.34
B-type1.293.31
C-type0.14 · 10−30.1 · 10−5

CircleA-type0.381.32
B-type0.090.31
C-type0.16 · 10−30.1 · 10−4

RMSE, root-mean-square error..

1. Ryan, A, and Hedrick, JK . A mode-switching path planner for UAV-assisted search and rescue., 44th IEEE Conference on Decision and Control and European Control Conference, December 12–15, 2005, Seville, Spain, Array, pp.1471-1476. http://dx.doi.org/10.1109/CDC.2005.1582366
2. Alexis, K, Nikolakopoulos, G, Tzes, A, and Dritsas, L (2009). Coordination of helicopter UAVs for aerial forest-fire surveillance. Applications of Intelligent Control to Engineering Systems, Valavanis, KP, ed. New York, NY: Springer, pp. 169-193 http://dx.doi.org/10.1007/978-90-481-3018-4_7
3. Caprari, G, Breitenmoser, A, Fischer, W, Hrzeler, C, Tche, F, Siegwart, R, Schoeneich, P, Rochat, F, Mondada, F, and Moser, R . Highly compact robots for inspection of power plants., 1st International Conference on Applied Robotics for the Power Industry, October 5–7, 2010, Montreal, QC, Array, pp.1-6. http://dx.doi.org/10.1109/CARPI.2010.5624412
4. Herwitz, SR, Johnson, LF, Dunagan, SE, Higgins, RG, Sullivan, DV, Zheng, J, Lobitz, BM, Leung, JG, Gallmeyer, BA, Aoyagi, M, Slye, RE, and Brass, JA (2004). Imaging from an unmanned aerial vehicle: agricultural surveillance and decision support. Computers and Electronics in Agriculture. 44, 49-61. http://dx.doi.org/10.1016/j.compag.2004.02.006
5. Jeong, S, and Jung, S (2013). Design, control, and implementation of small quad-rotor system under practical limitation of cost effectiveness. International Journal of Fuzzy Logic and Intelligent Systems. 13, 324-335. http://dx.doi.org/10.5391/IJFIS.2013.13.4.324
6. Bouabdallah, S, Noth, A, and Siegwart, R . PID vs LQ control techniques applied to an indoor micro quadrotor., Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, September 28–October 2, 2004, Sendai, Japan, Array, pp.2451-2456. http://dx.doi.org/10.1109/IROS.2004.1389776
7. Benallegue, A, Mokhtari, A, and Fridman, L . Feedback linearization and high order sliding mode observer for a quadrotor UAV., International Workshop on Variable Structure Systems, June 5–7, 2006, Alghero, Sardinia, Array, pp.365-372. http://dx.doi.org/10.1109/VSS.2006.1644545
8. Das, A, Lewis, F, and Subbarao, K (2009). Backstepping approach for controlling a quadrotor using lagrange form dynamics. Journal of Intelligent and Robotic Systems. 56, 127-151. http://dx.doi.org/10.1007/s10846-009-9331-0
9. Dydek, ZT, Annaswamy, AM, and Lavretsky, E (2013). Adaptive control of quadrotor UAVs: a design trade study with flight evaluations. IEEE Transactions on Control Systems Technology. 21, 1400-1406. http://dx.doi.org/10.1109/TCST.2012.2200104
10. Alexis, K, Nikolakopoulos, G, and Tzes, A (2011). Switching model predictive attitude control for a quadrotor helicopter subject to atmospheric disturbances. Control Engineering Practice. 19, 1195-1207. http://dx.doi.org/10.1016/j.conengprac.2011.06.010
11. Hamel, T, Mahony, R, Lozano, R, and Ostrowski, J . Dynamic modelling and configuration stabilization for an X4-flyer., Proceedings of the 15th IFAC World Congress, July 21–26, 2002, Barcelona, Spain, Array, pp.846. http://dx.doi.org/10.3182/20020721-6-ES-1901.00848
12. Zuo, Z (2010). Trajectory tracking control design with command-filtered compensation for a quadrotor. IET Control Theory & Applications. 4, 2343-2355. http://dx.doi.org/10.1049/iet-cta.2009.0336
13. Bouabdallah, S, Murrieri, P, and Siegwart, R . Design and control of an indoor micro quadrotor., Proceedings of the IEEE International Conference on Robotics and Automation, April 26–May 1, 2004, New Orleans, LA, Array, pp.4393-4398. http://dx.doi.org/10.1109/ROBOT.2004.1302409
14. McKerrow, P . Modelling the Draganflyer four-rotor helicopter., Proceedings of the IEEE International Conference on Robotics and Automation, April 26–May 1, 2004, New Orleans, LA, Array, pp.3596-3601. http://dx.doi.org/10.1109/ROBOT.2004.1308810
15. Mahony, R, Kumar, V, and Corke, P (2012). Multirotor aerial vehicles: modeling, estimation, and control of quadrotor. IEEE Robotics & Automation Magazine. 19, 20-32. http://dx.doi.org/10.1109/MRA.2012.2206474

Anastasia Razinkova received the B.S. degree in Department of Mechatornics from Kursk State Technical University, Kursk, Russia, in 2007 and the M.S. degree in Department of Electronics Engineering from Korea University of Technology and Education, Cheonan, Korea, in 2010. She is currently a Ph.D. candidate with Department of Electronics Engineering in Korea University of Technology and Education. Her research interests include control theory, robotics and computer vision for robots.

Research Area: Control theory, Robotics, Computer vision for robots.

E-mail: anastasia@koreatech.ac.kr

Byung-Jun Kang received the B.S. degree in Department of Electronics Engineering from Korea University of Technology and Education, Cheonan, Korea, in 2012. He is currently a Master course student with Department of Electronics Engineering in Korea University of Technology and Education. His research interests include fuzzy systems and robotics.

Research Area: Fuzzy systems, Robotics.

E-mail: kbj2004@koreatech.ac.kr

Hyun-Chan Cho received the B.S. degree in Department of Electronics Engineering in 1983 from Kwang Woon University and the M.S., and Ph.D. degrees in Department of Electronics Engineering from the Chung-Ang University in 1985 and 1991, respectively. Currently, he is a Professor of Electronics Engineering in the School of Information Technology at the Korea University of Technology an Education, Cheonan, Korea. He is the author of the nearly 120 journal and conference papers. His research interests include intelligent systems and control, and microelectronic circuit design.

Research Area: Fuzzy systems, Neural networks, System control, Robotics

E-mail: cholab@koreatech.ac.kr

Hong-Tae Jeon received the B.S. degree in Department of Electronics Engineering in 1976 from Seoul National University and the M.S., and Ph.D. degrees in Department Electrical Engineering from State University of New York at Stony Brook, in 1982 and 1986, respectively. He is currently a professor at the Department of Electronics Engineering, Chung-Ang University, Seoul, Korea. His research interests include fuzzy logic control, neural networks, genetic algorithm and its application to mechanical systems and robotics. He is President Emeritus of the Institute of Electronics Engineers of Korea and a former president of the Korea Fuzzy Logic and Intelligent Systems Society.

Research Area: Robot engineering, Intelligence control

E-mail: htjeon@cau.ac.kr

### Article

#### Original Article

International Journal of Fuzzy Logic and Intelligent Systems 2014; 14(1): 26-33

Published online March 1, 2014 https://doi.org/10.5391/IJFIS.2014.14.1.26

## Constant Altitude Flight Control for Quadrotor UAVs with Dynamic Feedforward Compensation

Anastasia Razinkova1 , Byung-Jun Kang1 , Hyun-Chan Cho1 , and Hong-Tae Jeon2

1Department of Electronics Engineering, Korea University of Technology and Education, Cheonan, Korea
2Department of Electronics Engineering, Chung-Ang University, Seoul, Korea

Correspondence to:Hong-Tae Jeon (htjeon@cau.ac.kr)

Received: December 24, 2013; Revised: March 18, 2014; Accepted: March 24, 2014

### Abstract

This study addresses the control problem of an unmanned aerial vehicle (UAV) during the transition period when the flying mode changes from hovering to translational motion in the horizontal plane. First, we introduce a compensation algorithm that improves height stabilization and reduces altitude drop. The main principle is to incorporate pitch and roll measurements into the feedforward term of the altitude controller to provide a larger thrust force. To further improve altitude control, we propose the fuzzy logic controller that improves system behavior. Simulation results presented in the paper highlight the effectiveness of the proposed controllers.

Keywords: Altitude control,Feedforward compensation,Quadrotor,Unmanned aerial vehicle

### 1. Introduction

The field of unmanned aerial vehicles (UAVs) has gained increasing research interest in recent years. This is mainly because of their ability to effectively perform different tasks in a wide range of military and commercial applications. Currently, UAVs are being used in several applications such as search and rescue missions [1], power plant inspection [2], surveillance [3], agricultural services [4], and mapping and photography [4].

Four-rotor or quadrotor UAVs belong to a promising class of UAVs, and significant research progress has been achieved in the field in recent years. Because of their small size, low weight, and high maneuverability, they are suitable for both indoor and outdoor applications. The significant advantage of quadrotors is their ability to perform vertical take-off and landing, whereas their main disadvantage is their limited flight time.

A quadrotor is an underactuated helicopter with four input forces and six output coordinates with highly coupled dynamics; for this reason, controller design for quadrotors is a challenging issue. Currently, researchers are primarily focused on the design of linear controllers, such as proportional-integral-differential (PID) controllers [5] and linear quadratic regulators (LQ-regulators) [6], and nonlinear control methods, which include sliding mode controllers [7], backstepping control approaches [8], adaptive controllers [9], and model predictive attitude controllers [10]. Several studies have investigated the design of controllers for quadrotor stabilization during hovering [11], whereas others are dedicated to controller design for trajectory tracking [12]. This paper focuses on the design of a dynamic feedforward controller that improves the behavior of the UAV during the transition period when the flying mode changes from hovering to translational motion in the horizontal plane. A significant drop in altitude can occur in this period if linear controllers like PID or LQR are used. In this paper, a feedforward compensator that improves the performance of the altitude controller and does not require increased computational power is proposed. To further improve altitude control, a fuzzy logic controller is introduced into the control system.

The rest of the paper is organized as follows. In Section 2, we describe the quadrotor dynamic model. Section 3 describes the design of the proposed dynamic feedforward controller and fuzzy controller. Simulation results are presented in Section 4. We present our concluding remarks and outline out future work in Section 5.

### 2. System Model and Dynamics

In this section, we examine the dynamics of a quadrotor helicopter to gain the insight necessary for quadrotor controller design.

Quadrotors consist of four rotors attached to a rigid cross-shaped airframe, as shown in Figure 1, with two opposing rotors rotating clockwise (1,3) and the other two rotating counterclockwise (2,4). The quadrotor is controlled by using the differential control of the thrust generated by each rotor. Vertical motion is accomplished by simultaneously increasing or decreasing the speed of all four rotors. Pitch motion is achieved by increasing the difference in the speed between the front and rear set of rotors. Roll motion is archived in the same manner using the left and right set of rotors. A quadrotor is an underactuated system, which means that the forward/backward and left/right motions are coupled with pitch and roll motions, respectively, and the quadrotor can be controlled through them. The remaining yaw motion can be realized by increasing the speed of the two rotors rotating in the clockwise direction and by decreasing the speed of the remaining two rotors.

The dynamics of quadrotor helicopters have been studied in detail by several groups [13, 14]. A rigid-body model of a quadrotor can be obtained using Newton’s equations [15], as given in Eq. (1):

${ξ˙=vmv˙=mgzA→-TRzB→R˙=RΩ×IΩ˙=-Ω×IΩ+τ$

where m and I ∈ ℝ3×3 are the mass and rotational inertia matrix of the flyer. g denotes acceleration due to gravity. The matrix R ∈ SO(3) describes the rotational transformation from frame {A} to frame {B}, where {A} is the right-hand inertial frame denoted by ${A}={xA→,yA→,zA→}$, with $zA→$ aligned with the direction of gravity, ${B}={xB→,yB→,zB→}$ is the body-fixed frame with its origin at ξ = (x, y, z)T ∈ {B}. The v ∈ ℝ3 vector describes the linear velocity of the quadrotor expressed in a right-hand inertial frame {A}. Ω ∈ {B} is the angular velocity of the quadrotor expressed by {B}. Ω× denotes the skew-symmetric matrix, such that Ω×v = Ω × v for the vector cross product x and any vector v.

$R=(cθcψsφsθcψ-cφsψsθcφcψ+sψsφcθsψsφsθsψ+cφcψsθcφsψ-cψsφ-sθcθsφcθcφ)$

where φ, θ, and ψ are the Euler angles, roll, pitch, and yaw, respectively.

The total thrust and torques produced by the four rotors are denoted by T and τ ∈ {B}, respectively, and can be obtained using the following model:

$T=k∑i=14ωi2$$τ=[τ1τ2τ3]=[lk (ω22-ω42)lk (ω12-ω32)b (ω22+ω42-ω12-ω32)]$

where ωi denotes the speed of rotor i. The distance from the rotor to the center of mass is denoted by l. The parameters b and k are the positive proportionality constants relative to the density of air, the shape of the blades, the number of the blades, the chord length of the blades, the pitch angle of the blade airfoil, and the drag constant. Eq. (4) can be written in a matrix form as [15]

$[Tτ1τ2τ3]=[kkkk0lk0-lklk0-lk0-bb-bb]︸Γ [ω12ω22ω32ω42]$

The rotor speeds required for the given values of thrust and moments can be found using Eq. (5) and the inverse of the constant matrix Γ−1.

The model given in Eq. (1) is a simplified model that does not consider several aerodynamic effects such as vortex ring state, blade flapping, etc. [15]. However, it is reasonable to neglect these effects at low values of UAV speed for the sake of model simplicity.

### 3.1 General Control of Quadrotor

The control problem is challenging for several reasons. First, the system is underactuated: there are four inputs, whereas the workspace is six dimensional. Second, the aerodynamic model described above has been simplified. In addition, practical motor controllers must overcome the drag moments to generate the required speeds and realize the input thrust T and torques τ. The dynamics of the motors and their interactions with the drag forces on the propellers can be difficult to model, although first-order linear models are a useful approximation. A hierarchical control approach is commonly applied to quadrotors; one such control system is shown in Figure 2 (all the variables with an asterisk superscript (*) are desired values). The lowest level control controls the rotor rotational speed. The next level controls vehicle attitude. The top level controls position along a trajectory.

This paper focuses on the design of a dynamic feedforward compensator incorporated into the position controller. Position control is achieved by means of conventional proportional-differential (PD) controllers, because low velocities are assumed.

### 3.2 Dynamic Feedforward Compensator Design

A quadcopter position controller can be separated into an altitude controller and a translational motion controller. In the hovering mode, only the altitude controller needs to operate; this controller is usually a PD-regulator with constant feedforward compensation for the gravity term. However, when the UAV changes the flight mode from hovering to translational motion, the performance of the altitude controller may deteriorate.

Quadrotor UAVs must change their roll and/or pitch angles to perform translational motion in the X- or Y-direction. Because the thrust provided by the propellers is always normal to the quadrotor plane, the vertical component of the thrust, which is required to maintain the altitude, can be significantly reduced as a result of quadrotor roll. This results in the UAV losing altitude, which is considered undesirable in most applications and may cause a collision between the vehicle and the environment.

As quadrotors are conventionally equipped with sensors monitoring the posture of the UAV, the values of pitch and roll angles are available to the control system. Using an accurate mathematical model, it is possible to compensate for the loss of thrust by employing a feedforward term, if the pitch and roll angles are known.

The equation for altitude dynamics can be derived as an extension of the second expression in Eq. (1).

$m [x¨y¨z¨]=mg [001]-TR [001]$

Substituting the expression for R given by Eq. (2) into Eq. (6) and dividing both sides of the equation by m, one can obtain the altitude dynamics as

$z¨=g-(cosφcosθ)Tm$

Normally, quadrotor control systems use static feedforward gravity compensators, as shown in Figure 3a. The compensation term TFF = mg can be obtained from Eq. (7) by assuming that φ and θ are zero (the quadcopter is in hovering mode) and setting = 0. However, calculating feedforward term this way may prove to be insufficient in cases when the angles φ and θ are different from zero, which occurs in all flight modes except hovering. The insufficiency of the gravity compensation may lead to a decrease in UAV altitude. In addition, the loss of altitude will increase for bigger angles φ and θ, although their maximal values are usually restricted in most practical quadcopter UAVs.

Therefore, we propose the use of a dynamic feedforward compensator term that will change with the roll and pitch angles according to TFF = mg/(cosφcosθ), as shown in Figure 3b. If the roll and pitch angles are zero, the proposed compensator behaves identically to the conventional static gravity compensator. However, if the roll and pitch angles start to change, the value of the feedforward term increases, which reduces the drop in the UAV altitude. In this manner, it is possible to decrease the loss in altitude when the quadcopter flight mode transitions from hovering to normal flight. The effect of changes in the roll and pitch angles on the feedforward compensator value is demonstrated in Figure 4.

### 3.3 Design of Fuzzy Controller

To improve the performance of altitude control, the PD controller was replaced by a fuzzy logic controller. The proposed fuzzy logic controller provides a faster response with less overshoot by allowing different system parameters to exhibit their most advantageous features at different times. In the proposed fuzzy logic controller, the desired height value z* is compared with the actual height z of the UAV. The difference between these two signals is called the position error (ez). The slope angle (θez) of the error derivative, or the error change rate, can be then calculated as

$θez=atan(ΔezΔt)$

The inputs of the fuzzy controller are the position error ez (proportional action) and the theta error θez (derivative action). The output of the proposed fuzzy controller u is multiplied by a gain KF = 0.25TFF. Both inputs and the output of the controller are designed to have five membership functions, namely negative large (NL), negative small (NS), zero (Z), positive small (PS), and positive large (PL). The membership functions of the inputs and output are shown in Figure 5a–c, respectively.

The fuzzy logic controller’s output indicates how much we need to add to the initial feedforward speed. The output thrust due to the height controller is calculated as

$T=mgcos(φ)cos(θ)+KFu$

It should be noted that, in the proposed rules, “negative error” means that the value of the actual position is greater than that of the desired position. Therefore, in this case, we need to decrease the speed of all four motors so as to reduce the thrust force. On the contrary, ‘positive error’ means that the value of the actual position is lower than that of the desired position; thus, the speed of the motors should be increased to create a larger thrust force. Using these restrictions, the rules of the fuzzy controller are shown in Table 1. Fuzzy inference generated using the Mamdani method is used. The method of defuzzification used is centroid.

### 4. Numerical Simulation

The effects of the proposed feedforward compensator and the proposed fuzzy logic controller on the UAV performance were investigated in a series of computer simulations. A MATLAB model of a quadrotor UAV was used, with the physical parameters of the quadrotor adopted from the model provided in robotics toolbox for MATLAB. In the four simulation cases, the UAV moves from its starting position (0,0,1)

• to a given point along the X-axis (desired end point is (1,0,1))

• along the X-axis with a constant speed ( = 1 m/s)

• along the X- and Y-axis with a constant speed ( = 1m/s, = 1 m/s)

• along a circular trajectory in the X-Y plane (x = cos0.3t m, y = sin0.3t m).

In all simulation scenarios described above, the altitude of the UAV is required to remain constant.

The simulation results are shown in Figure 6. In all of the simulation cases, the root-mean-square error (RMSE) and maximum error (Emax) were measured; their values are presented in Table 2.

It should be noted that the proposed feedforward controller improved the performance of the system in all simulation cases. The effect of the controller is more significant in the first and fourth scenarios, when the RMSE decreased from approximately 0.4 cm to 0.1 cm and the maximum error decreased from 1.3 cm to 0.3 cm, which corresponds to an approximately 75% reduction in the altitude drop. In the case of motion along a straight line (cases 2 and 3), implementation of the proposed controller resulted in a reduction in RMSE and maximum altitude error by approximately 21% and 24%, respectively. Implementation of the proposed fuzzy logic controller instead of the PD controller allowed further improvement in the performance of the system in all simulation cases. The effect of height drop is nearly canceled in all four scenarios as a result of the implementation of the proposed fuzzy logic controller. In addition, the RMSE decreased by a factor of 100, and the maximum error decreased by a factor of 104.

### 5. Conclusions and Future Work

In this paper, we proposed a dynamic feedforward compensator for altitude control of quadrotor UAVs. The main concept was to incorporate pitch and roll measurements into the feedforward term of the altitude controller so as to provide a higher thrust force when the UAV flight mode changed from hovering to translational motion in the horizontal plane. To further improve altitude control of the quadrotor UAV, we proposed a fuzzy logic based controller that was designed using expert knowledge and was more flexible than a PD controller. A series of numerical simulations were performed to analyze the performance of both controllers; they showed that the implementation of the proposed controllers led to improved results.

Future work will consider improvements to the proposed controller. Additionally, we intend to investigate the performance of the proposed algorithm in a hardware implementation.

### Acknowledgments

This work was supported by the Research Program of Semiconductor/Display Cluster in KOREATECH.

### Fig 1.

Figure 1.

The International Journal of Fuzzy Logic and Intelligent Systems 2014; 14: 26-33https://doi.org/10.5391/IJFIS.2014.14.1.26

### Fig 2.

Figure 2.

The International Journal of Fuzzy Logic and Intelligent Systems 2014; 14: 26-33https://doi.org/10.5391/IJFIS.2014.14.1.26

### Fig 3.

Figure 3.

Comparison of feedforward architectures for altitude controller: (a) with constant feedforward compensator (A-type); (b) with proposed dynamic feedforward compensator (B-type); (c) with proposed fuzzy controller and dynamic feedforward compensator (C-type).

The International Journal of Fuzzy Logic and Intelligent Systems 2014; 14: 26-33https://doi.org/10.5391/IJFIS.2014.14.1.26

### Fig 4.

Figure 4.

Effect of FF compensator: (a) feedforward term; (b) pitch and roll angles.

The International Journal of Fuzzy Logic and Intelligent Systems 2014; 14: 26-33https://doi.org/10.5391/IJFIS.2014.14.1.26

### Fig 5.

Figure 5.

Membership functions for: (a) error, ez; (b) theta error θez, and (c) output u.

The International Journal of Fuzzy Logic and Intelligent Systems 2014; 14: 26-33https://doi.org/10.5391/IJFIS.2014.14.1.26

### Fig 6.

Figure 6.

Simulation results for A-type (constant compensation), B-type (dynamic compensation), and C-type (fuzzy with dynamic compensation) controllers: (a) motion to a given point along the X-axis (point-to-point); (b) motion along the X-axis with constant speed; (c) motion along the X- and Y-axis with constant speed (line); (d) motion along a circular trajectory in the X-Y plane.

The International Journal of Fuzzy Logic and Intelligent Systems 2014; 14: 26-33https://doi.org/10.5391/IJFIS.2014.14.1.26

Rule base.

ezNLNSZPSPL
θez
NLPLPLPLPSZ
NSPLPLPSZNS
ZPLPSZNSNL
PSPSZNSNLNL
PLZNSNLNLNL

NL, negative large; NS, negative small; Z, zero; PS, positive small; PL, positive large.

RMSE and maximum altitude drop (Emax) for a system with A-type (constant compensation), B-type (dynamic compensation), and C-type (fuzzy with dynamic compensation) controllers.

SimulationControllerRMSE (cm)Emax (cm)
PointA-type0.371.29
B-type0.100.31
C-type0.16 · 10−30.6 · 10−4

Line XA-type0.812.17
B-type0.641.65
C-type0.7 · 10−50.5 · 10−6

Line XYA-type1.634.34
B-type1.293.31
C-type0.14 · 10−30.1 · 10−5

CircleA-type0.381.32
B-type0.090.31
C-type0.16 · 10−30.1 · 10−4

RMSE, root-mean-square error..

### References

1. Ryan, A, and Hedrick, JK . A mode-switching path planner for UAV-assisted search and rescue., 44th IEEE Conference on Decision and Control and European Control Conference, December 12–15, 2005, Seville, Spain, Array, pp.1471-1476. http://dx.doi.org/10.1109/CDC.2005.1582366
2. Alexis, K, Nikolakopoulos, G, Tzes, A, and Dritsas, L (2009). Coordination of helicopter UAVs for aerial forest-fire surveillance. Applications of Intelligent Control to Engineering Systems, Valavanis, KP, ed. New York, NY: Springer, pp. 169-193 http://dx.doi.org/10.1007/978-90-481-3018-4_7
3. Caprari, G, Breitenmoser, A, Fischer, W, Hrzeler, C, Tche, F, Siegwart, R, Schoeneich, P, Rochat, F, Mondada, F, and Moser, R . Highly compact robots for inspection of power plants., 1st International Conference on Applied Robotics for the Power Industry, October 5–7, 2010, Montreal, QC, Array, pp.1-6. http://dx.doi.org/10.1109/CARPI.2010.5624412
4. Herwitz, SR, Johnson, LF, Dunagan, SE, Higgins, RG, Sullivan, DV, Zheng, J, Lobitz, BM, Leung, JG, Gallmeyer, BA, Aoyagi, M, Slye, RE, and Brass, JA (2004). Imaging from an unmanned aerial vehicle: agricultural surveillance and decision support. Computers and Electronics in Agriculture. 44, 49-61. http://dx.doi.org/10.1016/j.compag.2004.02.006
5. Jeong, S, and Jung, S (2013). Design, control, and implementation of small quad-rotor system under practical limitation of cost effectiveness. International Journal of Fuzzy Logic and Intelligent Systems. 13, 324-335. http://dx.doi.org/10.5391/IJFIS.2013.13.4.324
6. Bouabdallah, S, Noth, A, and Siegwart, R . PID vs LQ control techniques applied to an indoor micro quadrotor., Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, September 28–October 2, 2004, Sendai, Japan, Array, pp.2451-2456. http://dx.doi.org/10.1109/IROS.2004.1389776
7. Benallegue, A, Mokhtari, A, and Fridman, L . Feedback linearization and high order sliding mode observer for a quadrotor UAV., International Workshop on Variable Structure Systems, June 5–7, 2006, Alghero, Sardinia, Array, pp.365-372. http://dx.doi.org/10.1109/VSS.2006.1644545
8. Das, A, Lewis, F, and Subbarao, K (2009). Backstepping approach for controlling a quadrotor using lagrange form dynamics. Journal of Intelligent and Robotic Systems. 56, 127-151. http://dx.doi.org/10.1007/s10846-009-9331-0
9. Dydek, ZT, Annaswamy, AM, and Lavretsky, E (2013). Adaptive control of quadrotor UAVs: a design trade study with flight evaluations. IEEE Transactions on Control Systems Technology. 21, 1400-1406. http://dx.doi.org/10.1109/TCST.2012.2200104
10. Alexis, K, Nikolakopoulos, G, and Tzes, A (2011). Switching model predictive attitude control for a quadrotor helicopter subject to atmospheric disturbances. Control Engineering Practice. 19, 1195-1207. http://dx.doi.org/10.1016/j.conengprac.2011.06.010
11. Hamel, T, Mahony, R, Lozano, R, and Ostrowski, J . Dynamic modelling and configuration stabilization for an X4-flyer., Proceedings of the 15th IFAC World Congress, July 21–26, 2002, Barcelona, Spain, Array, pp.846. http://dx.doi.org/10.3182/20020721-6-ES-1901.00848
12. Zuo, Z (2010). Trajectory tracking control design with command-filtered compensation for a quadrotor. IET Control Theory & Applications. 4, 2343-2355. http://dx.doi.org/10.1049/iet-cta.2009.0336
13. Bouabdallah, S, Murrieri, P, and Siegwart, R . Design and control of an indoor micro quadrotor., Proceedings of the IEEE International Conference on Robotics and Automation, April 26–May 1, 2004, New Orleans, LA, Array, pp.4393-4398. http://dx.doi.org/10.1109/ROBOT.2004.1302409
14. McKerrow, P . Modelling the Draganflyer four-rotor helicopter., Proceedings of the IEEE International Conference on Robotics and Automation, April 26–May 1, 2004, New Orleans, LA, Array, pp.3596-3601. http://dx.doi.org/10.1109/ROBOT.2004.1308810
15. Mahony, R, Kumar, V, and Corke, P (2012). Multirotor aerial vehicles: modeling, estimation, and control of quadrotor. IEEE Robotics & Automation Magazine. 19, 20-32. http://dx.doi.org/10.1109/MRA.2012.2206474