Smart aerosonde UAV longitudinal flight control system based on genetic algorithm

ABSTRACT


INTRODUCTION
Unmanned aerial vehicles (UAVs) have become more popular in a variety of military and civilian applications where human participation is difficult or risky [1], [2]. The design of a UAV's flight control system to ensure robust stability and acceptable performance within a given flight envelope in the presence of actuator and sensor uncertainties, as well as external disturbances such as wind gusts, is one of the most difficult tasks that designers face [3]- [5]. Therefore, this paper is devoted to design a longitudinal flight control system for the fixed-wing aerosonde UAV. To achieve this objective, successive activities are Traditionally, classic PID controllers were utilized to create flight control systems, with ad-hoc approaches employed to adjust the controller gains in flight. This is a time-consuming and high-risk methodology [6], [7]. In this paper, the longitudinal flight control system is designed using a PID controller whose gains are optimally tuned by a genetic algorithm (GA) technique for suppressing the tracking errors and hence getting precision tracking. This significantly reduces the time and effort required to tune parameters, demonstrating that the era of the ad-hoc approach for tuning PID controllers is coming to an end. A comparative synthesis between the proposed genetic self-tuning PID and the classical PID controllers is performed for specific altitude and speed commands to demonstrate the proposed controller's capabilities and robustness in providing more acceptable responses in the influence of external wind disturbances. Figure 1 shows aerosonde UAV model. The MATLAB aerosim block set is used to model the first transatlantic ocean UAV, aerosonde, as shown in Figure 2. By using the data of various test flights, the model of the aerosonde UAV is built up, as shown in Figure 2, which is utilized as a test model for aircraft [8]. The aerosim block set contains the tools of six degrees of freedom aircraft [9]. With the help of a 24 cc, 1.2 kW engine and a payload of 1 kg, the completely autonomous aerosonde UAV can reach a top speed of 40 m/s. With a height of up to 20,000 feet, the cruise speed is between 20 and 30 m/s. These specifications are for a 2.9 m wingspan and a 30 lb weight. Although the control system of aerosonde is complicated, the ability to perform a mission is highly achievable due to its flexible design [10].

Aerosonde UAV dynamic model
The UAV model is assumed to be rigid-body, with symmetric mass distribution around the aircraft's absolute coordinate system [11], based on a non-linear model described by Newton's second law and represented by 12 dynamic variables using [12]: Force equations: (1) ̇= − . + . + ⁄ + .

Actuator modelling
There are seven different control surfaces on the Aerosonde UAV, which are detailed below: With a downward positive indication on two flaps, ailerons, elevators, and a downward positive sign on one rudder. The aileron and elevator actuators each have a ±15-degree position constraint and a ±40-degree per second slew rate restriction. The Rudder, on the other hand, has a ±20-degree position limit and a ±1.15-degree-persecond slew rate restriction. In conjunction with the engine throttle actuator, each control surface is controlled by a separate actuator. The dynamics of the actuators are represented by a second-order transfer function, whilst the dynamics of the thrust paddles are represented by a first-order transfer function [13], [14]. The actuators utilized in this model have a transfer function as: For elevator servo: where: , are elevator and throttle deflection , are elevator and throttle command

Sensor modelling and simulation 2.4.1. Sensor of velocity
The first-order dynamics of the velocity sensor are as: where: : Total velocity

Sensor of altitude
The first-order dynamics of the altitude sensor are:

AUTOPILOT CONTROLLER DESIGN
A reliable control system is required for a successful UAV flight route. The control system of a UAV is primarily divided into two controllers. The "Lateral Controller" is a primary controller that controls the roll angle and heading of a UAV. The "Longitudinal Controller" is the other controller that regulates the pitch angle, airspeed, and altitude of a UAV [15]. The error of the controlled UAV must be taken into account for stable flying performance. As a result, in a UAV control system, a closed-loop controller is recommended [16]. The most common closed-loop control system is a (proportional, integral, and derivative) controller [17]. Error! Reference source not found. shows how a closed-loop controller assures the stability of a UAV by removing feedback error caused by measuring and monitoring the system [18].
The ease with which a PID controller can be implemented is the fundamental reason for its widespread use in today's controllers. However, when a UAV is under external environmental disturbances, the PID controller requires enhanced tuning. The tuning technique for a classic PID controller is performed to eliminate the disagreement between the input and the expected output [20]. The tuning process is presented in three techniques: a. Trial and error: depend on adding and subtracting algorithm, which is an easy way for implementing a solution, however, it takes much processing time with the unease tuning process. b. Analytical technique: built on a mathematical model and as a result accurate results are achieved, on the contrary, this method is not applicable for highly complicated models. c. Empirical technique: mainly based on a real model in which many parameters might be unknown, some models might be unresolved if the unknown parameters can't be predicted.

Genetic algorithm controller
By boosting the predicted error originating from a classic PID controller, the tuned PID controller can overcome external disturbances and dynamic changes in a system. "PID with GA" is the name given to this intelligent PID controller. The GA is a "bio-inspired algorithm" that is commonly used to optimize extremely nonlinear functions. Non-derivative techniques based on optimization approaches are used to generate the tuning process in GA [21]. The solution of a GA starts with random parameters and ends with an optimum solution based on several steps shown in Figure 4. Roll stabilizer. The tuning process in Figure 4. Roll stabilizer begins with the formation of the first population, with the fitness function selecting the fittest individuals to activate the next generation's population. The chosen individuals (parents) were collected in a mating pool, where some genes from each parent were exchanged. This is referred to as "cross-over," and it occurs when new "offspring" are produced. The probability of cross-over ( ) varies between (0.6 to 0.9). The new generation has been adjusted slightly to offer improved and optimum results. This is referred to as a mutation, with a probability ( ) ranging from (0.01 to 0.001). If the output result satisfies convergence, optimization has been accomplished; if not, the process is repeated until optimization has been achieved [22].

Lateral autopilot
The lateral flight controller is used to regulate the UAV's lateral and directional motion. The lateral flight controller design is primarily concerned with navigating the UAV around the trim state, which is assumed in both lateral and directional senses [23]. According to transient analysis of aircraft natural motion, the spiral mode (which is based on the roll, yaw, and side velocity states) is unbalanced. A roll stabilizer loop is incorporated with a PID controller in the lateral flight controller as illustrates in Figure 5.

Roll stabilizer
The unbalanced roll moment generated from engine thrust will excite the spiral mode and permit the aircraft to settle in a constant bank angle turn the roll stabilizer is designed to stabilize the spiral mode by adding what is called Wing Leveler. PID controller, which, implements this, gains are tuned using Simulink response optimization software (SROS) with pattern search optimization technique using GA method [24]. SROS includes a graphical user interface (GUI) to aid in the design of control systems. The signal constraint block is attached to the output of the Simulink block diagram for optimizing the PID gains of the roll loop for reference tracking specifications before beginning the optimization using SROS for the system. In relation to kp_phi, ki_phi, and kd_phi, the obtained PID gains were 0.6234, 0.6829, and zero, respectively. The designed controller provides an overall stabilization to roll dynamics by ensuring the value of the closed-loop bank angle to be zero as shown in Figure 6.

Longitudinal autopilot
As indicated in Figure 7, two control loops, altitude and airspeed, are used to build the longitudinal flight controller [25]. Three longitudinal autopilot scenarios are carried out and explained in section 4.   Figure 8 shows the step response of altitude with constant speed under normal conditions. Figure 9 shows a step response of velocity with constant altitude. The PID controller with GA has better temporal responsiveness than the classical PID, as seen in both Figures 8-9. Figure 8. The response of step altitude Figure 9. The response of step airspeed Figure 10 shows a comparison between the classic PID controller and the PID controller with GA at constant airspeed with a reference altitude. The classic PID controller's results are in good agreement with the PID controller with GA. Any change in altitude affects the change in speed in a reciprocal manner. Figure 11 indicates that there is no difference between the classic PID controller and the PID controller with GA in terms of reference airspeed. The altitude values are slightly varied for any speed adjustment. Figure 10. Altitude response at a constant airspeed Figure 11. Airspeed response at a constant altitude

Third simulation scenario
In this scenario, external wind disturbance and noise are taken into consideration. During the simulation time, both wind disturbance and noise are introduced to the UAV model, as seen in Figure 12 and Figure 13. For certain values, the controllers provide a consistent reaction; but, beyond these values, instability arises. The PID controller with GA, on the other hand, has better responsiveness.

CONCLUSION
The aerosonde UAV's dynamic model equations are represented in this paper. The attitude and altitude control of the Aerosonde UAV is controlled by an intelligent PID controller. The proposed controller is simulated under normal conditions as well as in the presence of external wind disturbance and noise, and the results are compared to those of a traditional PID controller. Simulation findings show that the system is more robust and durable than a traditional PID, moreover, the proposed controller parameters are proved to be optimized using a GA.