Control of longitudinal flight dynamics of a fixedwing UAV using LQR, LQG and nonlinear control

This paper aim is to present a comparative study between Linear Quadratic Regulator (LQR), Linear Quadratic Gaussian (LQG) and nonlinear controllers for pitch control of a fixed-wing Unmanned Aerial Vehicle (UAV). Due to a good stability margin and strong robustness LQR has been selected. LQG was chosen because is able to overcome external disturbances. Kalman Filter controller was also introduced to the fixed-wing UAV flight control. Further, we designed an autopilot that controls the pitch angle of the fixed-wing UAV. In the end, the control laws are simulated in Matlab/Simulink. The results obtained are compared to see which method is faster, more reliable and more robust.


Introduction
Fixed-wing Unmanned Aerial Vehicles (UAVs) have become a popular research topic in the last years. They are very different from conventional quadcopters. Unlike quadcopters, they are not able to take off vertically into the air, but instead require a runway to launch and land. Even though their methods of taking off are different, they are able to stay in the air a lot longer as a result of their ability to glide, can hold more payload weight, and have improved overall power efficiency [1]. Fixed-wing UAVs can be used for many different missions including, data gathering, rescue and currently different organizations such as Zipline have begun to use them for delivery since they are capable of flying longer, higher and faster [2]. They offer a smooth transition of autonomous flight control design from theory to practice in addition to providing a proper solution in locations with difficult access or unsafe to human life. However, the lack of a human pilot on board implies that the fixed-wing UAVs rely on automation to navigate or to avoid obstacles.
Fixed-wing UAVs are very susceptible to external disturbances such as wind gusts due to their low velocities, small mass and moments of inertia [3]. Therefore, advanced methods are needed for the control system of fixed-wing UAVs. In this paper LQR, LQG with Kalman Filter and nonlinear control methods are presented. The LQR and LQG controllers are widely applied in feedback control of industrial processes [4]. They are described with their simple structure and principle providing great performance.
The fixed-wing UAV motion can be categorized into longitudinal and lateral motion resulting in two main types of control: longitudinal and lateral control. For longitudinal control, elevator plays its role in controlling longitudinal motion and pitch while for lateral control, aileron and rudder perform their role in controlling lateral motion [18]. In this work a design of an autopilot that controls the pitch angle of a fixed-wing UAV is presented.

Flight dynamics of a fixed-wing UAV
To address the problem of designing an autonomous flight controller for a fixed-wing UAV (figure 1), first an accurate nonlinear dynamic model of the vehicle needs to be derived. A nonlinear model of the fixed-wing UAV is generated from first-principles modeling approach [19]. The UAV models are developed with medium-complexity based on only basic flight dynamics.

Equations of motion
The nonlinear equations of motion for the fixed-wing UAV are obtained from Newton's Second Law along with Euler's rotational [20]. The UAV flight dynamics are simulated using the following mathematical models describing the UAV 6DOF (Degree of Freedom) equations of motion:  Where � = ���, � = ���, � is mass of the aircraft, �, � and � are forward, sideway and vertical velocity (m/s), �, � and � are roll, pitch and yaw rate (rad/s), �,� and � are Euler angles (rad), �, � and � are north, east and down position (X,Y,Z-axis), � �� , � �� , � �� and � �� are rolling, pitching and yawing moment of inertia, � � , � � , and � � are aerodynamic forces along the different body axes and �, � and � are aerodynamic moments about the center of gravity.

Fixed-wing UAV aerodynamic data
The aircraft data used in this study and analysis corresponds to that of a fixed-wing Ultra Stick 25e UAV (figure 2) developed at the University of Minnesota [21], is given in Table 1.

Linear Model
The nonlinear dynamic model of the fixed-wing UAV needs to be linearized before applying the optimal control techniques. For controlling the pitch of the fixed-wing UAV, it is mandatory to use only the longitudinal equations of motion, therefore the derived linear model for Ultra Stick 25e UAV is given as decoupled longitudinal dynamics.

Flight controllers design
In this section, we describe LQR (figure 4) and LQG (figure 5) controllers that have been designed for the control of fixed-wing UAV.

Linear Quadratic Regulator (LQR)
Linear Quadratic Regulator (LQR) approach is a well-known powerful control system design method for linear time-invariant (LTI) system that provides practical feedback gains [6]. LQR is an optimal control technique that gives the best possible performance with respect to some given performance measure [23].
The LQR approach depends on minimizing criteria using the feedback �(�) = −��(�). For a controllable LTI system with a state-space model shown in Eq. (5), the LQR method constructs a linear state feedback law as depicted in Eq. (6).
Where, �(�) and �(�) present an �-dimensional state vector and �-dimensional output vector, and �(�) is an �-dimensional control vector. The control law in Eq. (6) minimizes the quadratic performance index � (cost function) shown in Eq. (7). The performance index that is used for minimizing both the control effort and the states can be given as: Where � and � are the weight matrices. � ∈  �×� is the symmetric positive semidefinite state weighting matrix (� ≥ 0) and � ∈  �×� is the symmetric positive definite control weighting matrix (� > 0). In Eq. (6) � is the control gain matrix given by Eq. (8).
Where � is the unique symmetric, positive semi-definite solution to the Algebraic Riccati Equation (ARE) as shown in Eq. (9).

Simulation and results
LQR is designed in Matlab and in order to determine the value of gain control �, it is necessary to choose the values of weighting matrix � and � in longitudinal motion of Ultra Stick 25e given as: In this work, we want to control the pitch angle of the fixed-wing UAV from the initial value of 0.4 seconds to the final value of 0.6 radians in a short amount of time as it is shown in figure 6. The results of the pitch angle obtained with LQR controller without disturbance shows that there is a large overshoot and steady state error as it can be seen in figure 7. In order to obtain the desired output, it means zero steady state error and to reduce the overshoot; a transfer function and an integral action are included in the LQR controller. The result obtained can be seen in figure 8.

Fig.8. Pitch Angle output with LQR controller and Transfer function
There is a considerable reduction in the overshoot and steady state error by applying the Integral LQR controller.

Linear Quadratic Gaussian (LQG)
Linear Quadratic Gaussian controller is a combination of LQR with Kalman Filter, it is better to reject noise and plant disturbances like sensor noise and wind gust. The LQG controller gives a much stable and robust response for the system [9].
To design LQG regulators and integral actions, you perform the following steps [24]:  Construct the LQ-optimal gain.  Construct a Kalman filter (state estimator), which is an algorithm that estimates the state of a system from measured data.  Form the LQG design by connecting the LQ-optimal gain and the Kalman filter.
By defining, a continuous-time process and measurement model is as follows: �̇= �� + �� + ��; � = �� + �� + �, Where � is the state vector, � is the control input vector, � is the measured output vector, � is the process noise vector and � is the measurement noise vector affecting the sensors data acquisition. The matrices A (state matrix), B (control input gain matrix), G (plant noise gain matrix), C (measured state matrix) are all LTI.
The LQG regulator consists of an optimal state-feedback gain � � and Kalman state estimator � � . The regulation performance is measured by a quadratic performance criterion of the form Where �, � and � are weighting matrices. As for pole placement, the LQ-optimal state feedback � = −�� is not implementable without full state measurement. However, we can derive a state estimate � � such that � = −�� � remains optimal for the output-feedback problem. This state estimate is generated by the Kalman filter With input �(controls) and � �(measurements). The noise covariance data determines the Kalman gain � through an ARE.
The Kalman filter is an optimal estimator when dealing with Gaussian white noise. Specifically, it minimizes the asymptotic covariance of the estimation error � − � �.

Simulation and results
This simulation was done in Matlab/Simulink. The state weighting matrices �,� and � in longitudinal motion of Ultra Stick 25e fixed-wing UAV are: The gain matrix of state feedback controller � � is obtained as Evaluate the Kalman filter gains � � , the process noise � and measurement noise, � are white Gaussian random sequence with zero mean. Kalman filter is an optimal estimator when dealing with Gaussian white noise.
The Kalman Filter gain is obtained as The pitch angle output with LQG controller with disturbance can be seen in the figure 9. The response of the system obtained shows that there is a minimal overshoot and zero steady state error. However, LQG controller has good disturbance rejection ability and the fixed-wing UAV moves smoothly and faster than it does with LQR controller without disturbance as it is shown in figure 8.

Nonlinear model
Fixed-wing UAVs are highly nonlinear systems. Nonlinear controller design presents challenges that need to be addressed and tackled [25]. It requires a mathematical presentation of the system dynamics analytically as a set of differential equations in the form of strictfeedback systems in order to develop a nonlinear control system for a fixed-wing UAV. The

Simulation results
In this section, simulation results of the nonlinear controllers in MATLAB by using Ordinary Differential Equations (ODEs) method are presented. The simulation model is composed of nonlinear Eq. (22)- (25), and the aerodynamic model of Ultra-Stick 25e fixed-wing UAV, developed at the University of Minnesota. Figure 10 shows state variables such as forward and vertical velocity (�, �), pitching moment (�) and pitch angle (�). The pitch angle output obtained corresponds to our desired response; fast rise time, zero steady state error and no overshoot. The nonlinear controller response is faster, more stable and more robust than LQR and LQG controller's responses ( figure 8 and figure 9).

Conclusion and future work
The Pitch control of a fixed-wing UAV is a system which needs a pitch controller to keep the angle at it desired response. And this can be achieved by reducing the error signal which is the difference between the output angle and the desired angle. Simulation study has been done in Matlab/Simulink environment and showed that LQR, LQG and nonlinear controllers are capable on controlling the pitch angle of the fixed-wing UAV successfully. LQG controller with disturbance produced better pitch angle response and LQR controller gave a better performance without disturbance; however, nonlinear controller produced greater desired response compared to LQR and LQG controllers. There was a significant result by using the nonlinear control method; it provided a very good following to the pitch angle output. We can conclude that the nonlinear control method is faster, smooth, more stable, reliable and more robust.
In the future work, we will design a control of the lateral flight dynamics on a fixed-wing UAV in the presence of strong winds such as wind gust and wind shear. A method for estimating the intensity and the direction of the wind will be explored and the navigation strategy will be adapted accordingly.