Self-Tuned PID Controller for the Aerosonde UAV Autopilot

DOI : 10.17577/IJERTV2IS121151

Download Full-Text PDF Cite this Publication

Text Only Version

Self-Tuned PID Controller for the Aerosonde UAV Autopilot

A. Sarhan*, M. Ashry**

*(Aircraft special equipments, M.T.C., Cairo, Egypt)

** (Lecturer in Automatic Control Department, M.T.C., Cairo, Egypt)

Abstract

It is required for the autopilot controller design of a fixed wing Unmanned Aerial Vehicle (UAV) to track a predetermined path and to be robust with respect to environmental disturbances especially wind, since its magnitude is comparable to the UAV speed. In this paper self-tuned PID is designed as an autopilot controller of the Aerosonde fixed wing UAV. Online fuzzy inference is used as a self tuning mechanism of PID parameters. This controller is compared with two other controllers. The first is the genetically tuned PID, and the second is the fuzzy logic controller. The simulation results based on the Aerosonde UAV model confirm the effectiveness and robustness of the proposed controller.

  1. Introduction

    Unmanned Aerial Vehicles (UAVs) play important roles in critical missions. Nowadays; they are used in a growing number of civil applications beside their use within military applications. They are used for damage inspection after disasters, observation of volcanoes and also for reconnaissance. This is because of its low cost and also to protect human crew in such dangerous missions [1,2]. An autopilot is used for flight control to track a reference path [3]. The autonomous controller has to guarantee the accuracy of the tracking path, and the robustness with respect to environmental disturbances and especially wind. Small UAVs are significantly sensitive to wind disturbance since its magnitude may be comparable to the UAVs speed [4].

    The fixed-wing classification of UAV, in contrast to rotary wing or flapping wings, is similar to the typical aircraft design for manned operations. The flight performance of this aircraft is affected by the aerodynamic parameters as well as physical external conditions like altitude, wind, payload variation and limited resources. The fixed-wing UAV dynamical model is nonlinear and strongly coupled. It is also affected by external disturbances like wind gusts. The controller must be robust against model uncertainties

    and external disturbances which is considered as a great challenge [3].

    In recent years, considerable control design algorithms for UAV autopilots using modern control theory have been established. A large number of researches have been developed for onboard navigation and control systems. These have been achieved using nonlinear control, evolutionary algorithms, or optimization techniques. Despite their success, only a small number of implementations of these systems have been reported. It appears that there is not much enthusiasm to use them due to their complexity, nonlinear nature, and computation cost. On the other hand, PID autopilots have been successfully integrated as real-time control and online navigation systems for UAVs. This is not only due to their simple structure and easy implementation, but also because of their acceptable performances. However, for successful implementation of such controllers, and without requiring complex mathematical developments, parameters adjustment or tuning procedures are needed to achieve enhanced performance through the operating envelope [5].

    In this paper; an autopilot is designed to control the longitudinal motion (altitude, and speed), and lateral motion (heading angle) of Aerosonde UAV. In aircraft modeling phase, the aerodynamic forces (lift and drag) as well as the aircraft inertia are taken into account. A self-tuned PID is used to design the controller of the autopilot. Two other controllers are designed to be compared with the self-tuned PID controller. The first controller is genetically tuned PID and the second is the fuzzy logic controller. The autopilot performances have been studied with respect to each controller. A comparative study using simulation model of the Aerosonde UAV is held to decide which controller is the best in terms of performance analysis and robustness to external disturbances.

  2. Aerosonde UAV model

The Aerosonde UAV system is modeled by simulating a number of test flights, using the standard configuration of MATLAB and the Aerosim

Aeronautical Simulation Block Set [6], which provides a complete set of tools for rapid development of detailed six-degree-of-freedom nonlinear generic manned/unmanned aerial vehicle models. A model which is called Aerosonde UAV is used as a test air vehicle [7]. The basic characteristics of Aerosonde UAV shown in Figure 1 are listed in Table 1[8]. The great flexibility of the Aerosonde, combined with a sophisticated command and control system, enables deployment command from virtually any location.

Table 1: Aerosonde UAV Specifications.

Aerosonde UAV Specifications

Weight

27-30 lb

Wing span

2.9 m

Engine

24 cc, 1.2 Kw

Flight

Fully autonomous

Maximum Speed

30- 40 m/s

Cruise Speed

20-30 m/s

Altitude range

Up to 20,000 ft

Payload

1 kg

The Aerosonde UAV's flight dynamics model available in the AeroSim® toolbox Figure 2, a 6-DOF dynamics model, was used in this study. The model provides a representation of the Aerosonde characteristics.

The model receives three types of inputs; aircraft

controls, background wind velocities, and the reset integrator. The aircraft controls are the flaps (the

a commanded pitch angle c. The Pitch Attitude Hold autopilot converts pitch attitude error into a commanded pitch rate qc. The Pitch Rate Hold autopilot converts pitch rate error to elevator command e. The Velocity Hold autopilot converts velocity error to throttle command t.

The lateral autopilot is shown in Figure 4. The input command to the lateral autopilot is the commanded heading,c. The output is the aileron command a. The Heading Hold autopilot converts heading error to roll attitude command, c. The Roll Attitude Hold autopilot converts roll angle error to roll rate command, pc. The Roll Rate Hold autopilot converts the roll rate error to aileron command, a.

The longitudinal autopilot is realized using two control loops (altitude and velocity), whereas the lateral autopilot is realized using only one control loop (heading angle). Each control loop is realized with three different controllers. The First controller is PID with fixed gains tuned using Genetic Algorithm (GA). The second one is the fuzzy logic controller. The third one uses online fuzzy inference mechanist to tune the PID parameters.

4. Control design

The main control objective is to obtain directional control in order to follow a desired trajectory even in the presence of unknown crosswind. Self-tuned PID using online fuzzy inference mechanism is designed for the autopilot. This controller is compared with genetically tuned PID and Fuzzy Logic Controller (FLC). The simulation results are studied from performance and robustness points of view to show the effectiveness of each controller.

Due to their simple structure, robust performance, reliability, and ease of understanding, PID controllers are the most commonly used controllers in industrial process control [9]. The transfer function of a PID controller has the form iven in (1).

Aerosonde has no flaps so this value is set to zero), elevator, aileron, rudder positions, throttle, mixture, and ignition initial values. Based on these input values,

G(s) KP

where: KP ,

  • KI K s s D

KI , and KD

(1)

are the proportional,

the model outputs the aircrafts states, sensor readings, velocities, positions (Euler angles), body roll rates as well as other important data regarding the aircraft state.

3. Autopilot Design

In this section we briefly describe the autopilot design. As shown in Figure 3, the inputs to the longitudinal autopilot are commanded altitude, hc and commanded velocity, Vc [12]. The outputs are the elevator deflection, e, and the throttle command, t. The Altitude Hold autopilot converts altitude error into

integral, and derivative gains respectively. The parameters of the PID controller can be manipulated to produce various response curves from a given process. Finding optimum adjustments of a controller for a given process is not trivial. The most well-known tuning method is Ziegler-Nichols tuning method. Ziegler-Nichols tuning method produces rules or determining values of the PID parameters based on the transient response characteristics of a given plant. To enhance the capabilities of traditional PID tuning

techniques, several methods have been developed. In this paper the fuzzy self tuning method is used for PID parameters calculations. To show its effectiveness it is compared with genetically tuned PID, and FLC.

For genetically tuned PID, a multi objective function is used to minimize the mean square value of the error between the desired input and the system output, minimize the overshoot, and also minimize the coupling between the system outputs.

Figure 5 show the block diagram of self tuning PID, where the controller Parameters are initially set to certain values by any tuning method. Then the FLC is used for fine tuning. An online calculated value by FLC is added to each initial value of the control parameters to give the final value used for the PID controller.

In this paper, the initial values of PID parameters are set using GA and the added values are obtained using online FLC. The final tuned parameters of the self-tuned PID controller can be calculated from the next set of equations given in (2).

KP KP1 KP 2

wind disturbance are considered for each controller in the next section.

  1. Simulation results

    Self tuned PID controller is designed for the Aerosonde UAV autopilot. To show its effectiveness; self tuned PID is compared with both genetically tuned PID, and FLC. The simulation results for the three different controllers based on the full nonlinear model are studied from performance and robustness points of view. This nonlinear model takes into consideration the complexity of the aerodynamic forces/torques. Furthermore, the controllers and observers were developed in Matlab/Simulink with a sampling time of 0.02s, using the Runge-Kutta solver. Finally, disturbances represented by wind in the X-Y plane are taken into consideration to verifying robustness of each controller.

    1. Autopilot for longitudinal motion without external wind disturbances

      KI KI1 KI 2

      (2)

      In this subsection, two control loops are considered

      KD KD1 KD 2

      where: KP , KI , and KD are the proportional, integral, and derivative final gains; respectively.

      KP1 , KI1 , and KD1 are the proportional, integral, and derivative initial gains calculated from GA; respectively.

      KP 2 , KI 2 , and KD 2 are the proportional, integral, and derivative gains calculated using online fuzzy inference mechanism; respectively.

      The obtained values from (2) are the PID Controller parameters used in (1).

      FLC is designed as a second controller to be compared with the self tuning PID. FLC is one of the artificial intelligence methods for control that has a nonlinear and rule-based nature. The fuzzy logic controller provides an algorithm, which converts the linguistic control based on expert knowledge into an automatic control strategy. Therefore, the fuzzy logic algorithm is much closer in spirit to human thinking than traditional logical systems [10].

      In this paper, the fuzzy like PID is designed with seven triangular membership functions for each input (the error, rate of error, and integrated error). The if- then rules are established based on expert knowledge.

      The three controllers (self-tuned PID, genetically tuned PID, fuzzy like PID) are compared based on simulation results obtained from Aerosonde UAV model. The performance and robustness to external

      as in Figure 3. One is for the altitude, and the other is for the speed. There is a coupling between them should be taken into consideration.

      A desired altitude and speed have to be tracked by the Aerosonde UAV autopilot. The response of the autopilot of the longitudinal motion of the UAV is plotted in Figure 6. The figure shows similar response for the three types of controllers. The UAV reaches the desired altitude and speed with constant pitch angle.

      A reference altitude with fixed speed is tracked as shown in Figure 7. The three autopilot controllers show approximately identical responses for altitude tracking with constant speed. In each step up or down the speed is affected instantaneously because of the coupling effect.

      A reference speed with fixed altitude is tracked as in Figure 8. The three autopilot controllers show approximately identical responses for speed tracking with constant altitude. The altitude is slightly affected by speed change due to coupling effect.

    2. Autopilot for lateral motion without external wind disturbances

      In this subsection, one control loop is considered as in Figure 4. This control loop is concerned with the heading angle.

      A desired heading angle has to be tracked by the Aerosonde UAV autopilot. Figure 9 shows the autopilot response in this case. It can be seen that the three autopilot controllers show approximately similar responses. The bank angle reaches the zero value and

      remains constant at that value. When a reference heading angle has to be tracked, the autopilot response of the Aerosonde UAV is shown in Figure 10. The three autopilot controllers show approximately identical responses for heading angle tracking. In each step up or down the bank angle are affected instantaneously and then return back to zero position.

    3. Autopilot for longitudinal motion affected by external wind disturbances

      The effect of cross wind disturbance in X-Y plane is studied in this subsection. The UAV is subjected to crosswind disturbance in the X-Y plane from the beginning of normal operation. A desired altitude and speed have to be tracked by the Aerosonde UAV autopilot. It should be noted that; when the wind speed is low, the three controllers for the autopilot behave in similar way and the disturbance rejection is achieved. As the wind speed increases, the autopilot response differs according to the controller robustness.

      If the wind speed exceeds certain limit, the FLC becomes unstable but the two other controllers remain of identical performance. Figure 11 shows the autopilot response when the X component of the wind speed is 12.4m/s and the Y component is 18m/s. it is clear that, at this speed value the FLC fails to control the autopilot of the longitudinal motion, whereas the performance of two other controllers are identical and robust. It can be seen from the altitude curve that, the altitude of the UAV controlled by FLC reaches zero which means crash. That is why the simulation is stopped for the FLC.

      From robust stability point of view, the FLC is robustly unstable at this value of wind speed but the two other controllers are robustly stable. From robust performance point of view, the best autopilot controller is the self-tuned PID. This can be verified from the speed curve because it has lower seady state error than the genetically tuned PID. Also it can be seen from the bank angle curve, the oscillations are lower than the genetically tuned PID

    4. Autopilot for lateral motion affected by external wind disturbances

      In this subsection, the Aerosonde UAV is subjected to cross wind disturbance in the X-Y plane from the beginning of normal operation. A desired heading angle has to be tracked by the Aerosonde UAV autopilot. When the wind speed is low, the three controllers for the autopilot behave in similar way and the disturbance rejection is achieved. As the wind speed increases, the autopilot response differs according to the controller robustness.

      If the wind speed exceeds certain limit, the FLC and the genetically tuned PID become unstable but the self- tuned-PID controller shows robust performance. Figure 12 shows the autopilot response when the X component of the wind speed is 4m/s and the Y component is 8m/s. It is clear that, at this wind speed value the FLC and the genetically tuned PID fails to control the autopilot of lateral motion. The self-tuned PID controller shows robust performance and robust stability in this case.

      It can be seen from the altitude curve that the, altitude of the UAV controlled by FLC and genetically tuned PID reaches zero which means crash. That is why the simulations in banking and heading angles are stopped for the FLC and genetically tuned PID.

  2. Conclusion

A self-tuned PID is designed for Aerosonde autopilot as a fixed wing UAV. Online fuzzy inference is used as the fine tuning mechanism for PID controller. The initial controller parameters are calculated using GA. This controller is compared with genetically tuned PID controller whose parameters are the initial parameters of the self-tuned PID. It is also compared with fuzzy like PID. The comparison based on simulation results obtained from Aerosonde UAV model. The tracking performance of a predetermined path and the robustness to external disturbances are taken into consideration as criteria for comparison.

Two autopilots for longitudinal and lateral motions are considered. The longitudinal autopilot has two control loops one for the altitude and the other for the speed. The lateral autopilot has one control loop for heading angle. The three controllers for the two autopilots are designed using the controller techniques discussed previously.

The simulation results show approximately similar autopilot performances when the UAV is not subjected to any external disturbances. This is for both longitudinal and lateral autopilot.

The external disturbances and especially the wind affect the autopilot controller. This is confirmed by the simulation results. For longitudinal autopilot, disturbance rejection is achieved for all controllers when the UAV is subjected to relatively small speed values. When the external wind speed increases, the self tuned PID and the genetically tuned PID show robust performance. The fuzzy like PID fails to cope with this external wind speed after certain speed limit. For lateral autopilot, disturbance rejection is achieved for all controllers when the UAV is subjected to relatively small speed values. When the external wind speed increases, the self-tuned PID shows robust performance. The fuzzy like PID and the genetically

tuned PID fail to control the lateral autopilot after certain speed limit.

From the simulation results obtained based on the Aerosonde UAV simulation model, the autopilot controlled using any of the discussed controllers show acceptable results when the UAV is not subjected to any external wind disturbance.

The autopilot controlled by self-tuned PID achieves an excellent performance when dealing with external wind disturbances. The other two controllers fail to cope with this external wind disturbance beyond certain wind speed limit.

10. References

  1. Y. Sato, T. Yamasaki, H. Takano, and Y. Baba, Trajectory Guidance and Control for a small UAV, KSAS International Journal, Vol. 7, No 2, pp. 137-144, November 2006.

  2. A. Topalov, D. Seyzinski, S. Nikolova, N. Shakev, and O. Kaynak, Neuro-Adaptive Trajectory Control of Unmanned Aerial Vehicles, 4th international conference with international participation Space, Ecology, Nanotechnology, Safety, June 2008,Varna, Bulgaria.

  3. H. Castaneda, J. Morales, E. Diaz, Quasi-Continuous Sliding Mode Flight Control for a Fixed-Wing UAV, Congreso Nacional de Control Automatico, Ensenada,Baja California, Mexico, October 2013.

  4. A. Brezoescu, T. Espinoza, P. Castillo, and R. Lozano, Adaptive Trajectory Following for a Fixed-Wing UAV in Presence of Crosswind, Journal of intelligent and robotic systems, Vol 69, Issue1-4, pp. 257-271, January 2013.

  5. B. Kada, Y. ghazzawi, Robust PID Controller Design for an UAV Flight Control System, Proceeding of World Congress on Engineering and Computer Science Vol. 2, San Francisco, USA, October 2011.

  6. Unmanned Dynamics, AerosimAeronautical Simulation Block Set, Users Guide Version 1.2, http://www.u- dynamics.com/aerosim/default.htm, [Last reached 27/12/2009].

  7. Global Robotic Observation System, Definition Of Aerosonde UAV Specifications, http://www.aerosonde.com/aircraft/, [Last reached 27/12/2009].

  8. M. Niculescu, Lateral Track control Law for Aerosonde UAV, 39th AIAA Aerospace Sciences Meeting and Exhibit, January 2001, Reno, Nevada, USA.

  9. K. Passino and S. Yurkovich, Fuzzy Control, Addison Wesley Longman, California, 1998.

  10. Jan Jantzen, Foundations of fuzzy Control, John Wiley and Sons ltd., England, 2007.

  11. Y. Isik, and H. Korul, Comparison of Classical PD and Fuzzy PD Controller performances of an Aircraft Pitch Angle Control System, Gazi University Journal of science, Vol. 24, No 4, pp.781-785, October 2011.

  12. R. Beard, D. Kingston, M. Quigley, D. snyder, R. Christiansen, W. Johnson, T. McLain, and M. Goodrich, Autonomous Vehicles Technologies for Small Fixed Wing UAVs, AIAA Journal of aerospace computing, information, and Communication, Vol. 2, No. 1, pp. 92-108, January 2005.

Figure 1: Aerosonde UAV.

Figure 2: Aerosonde UAV MATLAB simulation model.

Altitude Hold

Altitude Hold

hc c

h

qc e

Pitch Attitude Hold

Pitch Attitude Hold

UAV

UAV

Pitch Rate Hold

Pitch Rate Hold

q

velocity Hold

velocity Hold

t

UAV

t

UAV

Vc V

Figure 3: Autopilot for longitudinal motion.

Heading Hold

Heading Hold

c c

pc a

Roll Attitude Hold

Roll Attitude Hold

UAV

UAV

Roll Rate Hold

p

Figure 4: Autopilot for lateral motion.

Ke

Ke

d dt

d dt

K ce

K ce

FLC

r(t) +

Kd Ki KP

Plant

Plant

PID

y(t)

e(t)

_

Controller

Figure 5: Block diagram of self-tuned PID

PID Using Fuzzy

PID

Fuzzy

PID Using Fuzzy

PID

Fuzzy

45

40

Altitude [m]

Altitude [m]

35

30

25

0 2 4 6 8 10 12 14 16 18 20

Time [sec]

27

26.5

26

25.5

Speed [m/sec]

Speed [m/sec]

25

24.5

24

23.5

23

22.5

22

PID Using Fuzzy

PID

Fuzzy

0 2 4 6 8 10 12 14 16 18 20

Time [sec]

30

25

Pitch Angle [deg]

Pitch Angle [deg]

20

15

10

PID Using Fuzzy

5 PID

Fuzzy

0

0 2 4 6 8 10 12 14 16 18 20

Time [sec]

Figure 6: The response of the autopilot for the longitudinal motion of the UAV.

PID Using Fuzzy

PID

Fuzzy

PID Using Fuzzy

PID

Fuzzy

65

60

55

Altitude [m]

Altitude [m]

50

45

40

35

30

25

0 50 100 150 200 250 300 350 400 450 500

Time [sec]

PID Using Fuzzy PID

Fuzzy

PID Using Fuzzy PID

Fuzzy

27

26

Speed [m/s]

Speed [m/s]

25

24

23

22

21

0 50 100 150 200 250 300 350 400 450 500

Time [sec]

Figure 7: Altitude track with fixed speed.

29

28

27

Speed [m/s]

Speed [m/s]

26

25

24

PID Using Fuzzy

23 PID

Fuzzy

22

0 50 100 150 200 250 300 350 400 450 500

Time [sec]

PID Using Fuzzy

PID

Fuzzy

PID Using Fuzzy

PID

Fuzzy

42

40

Altitude [m]

Altitude [m]

38

36

34

32

30

28

0 50 100 150 200 250 300 350 400 450 500

Time [sec]

Figure 8: Speed track with fixed altitude.

70

60

Heading Angle [deg]

Heading Angle [deg]

50

40

30

20

PID Using Fuzzy

10 PID

Fuzzy

0

0 5 10 15 20 25 30 35 40 45 50

Time [sec]

PID Using Fuzzy

PID

Fuzzy

PID Using Fuzzy

PID

Fuzzy

90

80

Bank Angle [deg]

Bank Angle [deg]

70

60

50

40

30

20

10

0

0 2 4 6 8 10 12 14 16 18 20

Time [sec]

Figure 9: The response of the autopilot for the lateral motion of the UAV.

PID Using Fuzzy PID

Fuzzy

PID Using Fuzzy PID

Fuzzy

350

300

Heading Angle [deg]

Heading Angle [deg]

250

200

150

100

50

0

0 100 200 300 400 500 600 700

Time [sec]

PID Using Fuzzy PID

Fuzzy

PID Using Fuzzy PID

Fuzzy

100

Bank Angle [deg]

Bank Angle [deg]

50

0

-50

-1000 100 200 300 400 500 600 700

Time [sec]

Figure 10: Heading angle track.

X-wind=12.4 m/sec Y-wind=18m/sec

45

40

35

30

Altitude [m]

Altitude [m]

25

20

15

10

PID Using Fuzzy

5 PID

Fuzzy

0

0 2 4 6 8 10 12 14 16 18 20

Time [sec]

X-wind=12.4 m/sec Y-wind=18 m/sec

30

Speed [m/sec]

Speed [m/sec]

25

20

PID Using Fuzzy

PID

Fuzzy

15

0 5 10 15 20 25 30 35 40 45 50

Time [sec]

100

20

80 15

X-wind=12.4 m/sec Y-wind=18 m/sec

X-wind=12.4 m/sec Y-wind=18 m/sec

10

Bank Angle [deg]

Bank Angle [deg]

60 5

0

40 -5

Bank Angle [deg]

Bank Angle [deg]

-10

20 -15

2.8 3 3.2 3.4 3.6 3.8 4

0 Time [sec]

-20

-40

-60

-80

PID Using Fuzzy

PID

Fuzzy

-1000 1 2 3 4 5 6

Time [sec]

Figure11: The response of the autopilot for the longitudinal motion when the UAV is subjected to external wind disturbances.

350

300

Heading Angle [deg]

Heading Angle [deg]

250

200

150

100

50

X-wind= 4 m/sec Y-wind=8m/sec

PID Using Fuzzy PID

Fuzzy

PID Using Fuzzy PID

Fuzzy

0

200

150

100

Bank Angle [deg]

Bank Angle [deg]

50

0

-50

-100

-150

2 4 6 8 10 12 14 16 18 20

Time [sec]

X-wind=4 m/sec Y-wind=8m/sec

PID Using Fuzzy

PID

Fuzzy

PID Using Fuzzy

PID

Fuzzy

-200

0 2 4 6 8 10 12 14 16 18 20

Time [sec]

PID Using Fuzzy PID

Fuzzy

PID Using Fuzzy PID

Fuzzy

1100

1000

900

800

700

Altitude [m]

Altitude [m]

600

500

400

300

200

100

0

0 1 2 3 4 5 6 7 8 9

Time [sec]

Figure 12: The response of the autopilot for the lateral motion when the UAV is subjected to external wind disturbances.

Leave a Reply