Design of A Flight Stabilizer System and Automatic Control
Design of A Flight Stabilizer System and Automatic Control
1, January 2016
Ünver Kaynak
Mechanical Engineering, TOBB University of Economics & Technology, Ankara, Turkey
Email: [email protected]
Abstract—In this paper a Hardware-In-the-Loop (HIL) test Both manual calibration and MATLAB’s automated
platform is used to design a flight stabilization system for design tools are used to determine the PID coefficients.
Unmanned Aerial Vehicles (UAV). Controllers are first
designed and tested separately for lateral and longitudinal II. DESIGN STAGES
axes using numerical simulations, and later these controllers
are merged on the HIL platform. It is observed that the A. Controller Design
resulting controller successfully stabilizes the aircraft to A general treatment of the stability and control of
achieve straight and level flight.
airplanes requires a study of the dynamics of flight [4].
Much useful information can be obtained, however, from
Index Terms—UAV, autopilot, PID controller, Hardware-In- a more limited view, in which we consider not the motion
the-Loop, flight control, SISO, MIMO of the airplane, but only its equilibrium states. This is the
approach in what is commonly known as static stability
and control analysis [4].
I. INTRODUCTION Elevators and ailerons are flight control surfaces.
Elevators are surfaces on the tailplane (the horizontal part
Aeronautics has recently gained great importance in of the tail assembly). While the entire tailplane surface
both military and civil applications. The field of helps stabilize the aircraft during flight, the elevators
Unmanned Air Vehicles (UAVs) is very broad, covering apply pitch by angling the trailing (rear) edge of the
myriad missions and system types [1]. Autopilot systems tailplane up or down. Ailerons are surfaces on the outer,
are a major area of design for UAVs. These systems trailing edge of each wing. They angle in opposite
perform autonomous flights. A flight mission can be directions to waggle the wings up and down or roll the
done without human input [2]. aircraft about its nose -tail axis. If you apply stick left or
If an airplane is to remain in steady uniform flight, the right, one wing's aileron angles down and the other
resultant forces as well as the resultant moment about the angles up. This rolls one wing up and forces the other
center of gravity must both be equal to zero. An airplane wing down, effectively rolling the airplane [5].
satisfying this requirement is said to be in a state of
equilibrium of flying at a trim condition [3].
In this paper we outline an approach based on a
hardware-in-the-loop platform for building a stabilizing
controller for UAVs. A suitable flight condition is
designed by MATLAB/Simulink environment simulation
to design a controller for UAVs. Flight control surfaces
are selected as the inputs of the system to hold the UAV
in this condition by trimming and linearizing using
MATLAB’s features. The next step is based on these
trim points of the system, where nonlinear flight
dynamical equations are linearized. There are several
Figure 1. Flight control surfaces on airliner [6].
types of controller can be used for UAVs but PID
controller is preferred and designed due its simplicity. 1) Elevator-Theta control
The number and type of aerodynamic surfaces to be
controlled changes with aircraft category [6]. Fig. 1
shows the classic layout for a conventional airliner [6].
Manuscript received June 1, 2015; revised October 22, 2015. Aircraft have a number of different control surfaces:
those indicated in red form the primary flight control, i.e. After linearization based on the operation point and
pitch, roll and yaw control, basically obtained by system’s minimal implementation is calculated, first step
deflection of elevators, ailerons and rudder (and was designing the PID controller by MATLAB sisotool.
combinations of them); those indicated in blue form the Closed loop step response provided by PID controller
secondary flight control; high-lift and lift-dump devices, and the input which is applied are shown in Fig. 3. Also
airbrakes, tail trimming, et al. [6]. it can be seen the input is reasonable.
PID control structure is built for supported flight mode
applied to the Simulink model’s input which is the
change of the elevator angle is shown in the Fig. 4. The
output of the system theta angle is shown in the Fig. 5.
Designed controller’s impact of the other angles can be
seen in the Fig. 5. It can be seen that the psi and phi
angles are not affected from the controller and remained
around zero.0.
Figure 4. Changes of elevator, aileron, rudder and throttle as results of Figure 6. Phi output and aileron input step responses for the PID
the applied controller. controller
PID control structure is built for supported flight mode been promoted as the predominant tools for multivariable
applied to the Simulink model’s input which is the system analysis, the classical control extensions offer
change of the aileron angle is shown in the Fig. 7. The several advantages, including requiring only an input-
output of the system phi angle is shown in the Fig. 8. output map and providig direct insight into stability,
Response settles without overshoot and around 3 seconds. performance, and robustness of MIMO systems [7].
Designed controller’s impact of the other angles can be
seen in the Fig. 7 and Fig. 8. When the UAV roll over to
its side the theta angle should change a bit because of the
flight dynamics cross impacts. Besides UAV will trun in
time which means psi angle will change. If these cross
angles are undesirable, for instance if UAV’s rolling over
without changing theta is desired, two controllers
(elevator-theta and aileron- phi) should be used together
or multiple input multiple output controller should be
designed.
Figure 10. HIL test platform and xplane simulations In Fig. 11 and Fig. 12 the autopilot created runs in
stabilizer mode. In this mode it is possible to do
HIL simulation performs as follows. Plane fly in the maneuvers like rolls and loops but if the sticks were
Xplane generate roll and pitch angle values. These values released then autopilot will level the plane. It can be seen
send to UDP port and communication application read that the plane is levelled when maneuvers were done in
listens to Xplane’s UDP send data port, captures datasets, the Fig. 12. Maneuvers were done for pitch angle at 12th
distinguishes headers from data and sends angle bytes to to 14th seconds of simulations and levelled at around
the platform’s microcontroller unit over serial port. 17th seconds. Maneuver was done for roll angle around
Platform’s microcontroller reads these values as 16th second of simulation and levelled around 17th
reference values for pitch axis PID and yaw axis PID. second then another maneuver was done around 19th
Platform output and PID inputs are obtained by reading second of simulation and levelled around 2 seconds of
encoders which are connected to motors’ shafts. Then simulations. Other times stabilizer mode of autopilot was
each PID controller calculates their output and drives not been active.
related motors which are individually connected to
separate control surfaces. That surface is placed to IV. CONCLUSION AND FUTURE WORK
desired angle. Therefore autopilot can be put over this
platform and can operate on its own. Also transmitter and In this paper we outlined the design of elevator and
receiver are needed to give command to autopilot. aileron stabilizer for UAVs and using data obtained from
Autopilot calculates new values for aileron and elevator Xplane simulation. These data are processed by a system
according to given command and send them to serial port. identification process utilizing MATLAB and a
The communication applications read them and convert dynamically model of the aileron and elevator behaviors
them to messages Xplane can understand and write to are obtained. These models are used to construct PID
UDP port which Xplane is listening. Xplane reads these controllers for these surfaces and hardware in the loop
values and actuates elevator and aileron according to simulations using a custom 3 degree of freedom moving
these values. And plane state is changed based on these platform confirm that the designed controllers
changes, new angle values are occurred. successfully.
In future work surface loss scenarios are considered
and to eliminate the impact of these losses controllers
will be developed based on this study.
ACKNOWLEDGEMENTS
The authors would like to thank the Scientific and
Technological Research Council of Turkey (TÜBİTAK)
for supporting this work under project number 113E581.
REFERENCES
[1] J. Gundlach, Designing Unmanned Aircraft Systems: A
Comprehensive Approach, Virginia: AIAA Education Series,
2012.
[2] H. Korkmaz, O. B. Ertin, C. Kasnakoglu, and Ü. Kaynak, “Design
Figure 11. Pitch axes stabilization results of a flight stabilizer system for a small fixed wing unmanned
aerial vehicle using system identification,” Advances in Control
Stabilizer is the first step of designing autopilot to test and Automation Theory for Transportation Applications,
it at stabilizing mode. Reliable autopilot matrixes have September 16-17, 2013.
[3] R. C. Nelson, Flight Stability and Automatic Control, Second Ed., Emre Atlas is currently a master degree
McGRAW-HILL International Editions: Aerospace Science & student at the Electric & Electronics
Technology Series, 1998. Engineering Department, TOBB University
[4] B. Etkin and L. D. Reid, Dynamics of Flight Stability and Control of Economics and Technology, Ankara,
Third ed., Hamilton Printing Company, 1995. Turkey. He received the BSc degree in
[5] The Basics of Flight. [Online]. Available: Electric & Electronics Engineering in 2014
http://www.aviastar.org/theory/basics_of_flight/control.html from TOBB University of Economics and
[6] Aircraft Systems–Lecture Notes–Chapter 6-Flight Control System, Technology, Ankara, Turkey. Control
Polytechnic of Milan. [Online]. Available: systems and autopilot design for UAVs are
www.aero.polimit.it/~l050263/bacheca/Dispense_EN/06w- his current research areas.
FligCont.pdf
[7] M. L. Nagurka and T. R. Kurfess, New Design Paradigms for
MIMO Control System Synthesis, Carnegie Mellon University Coşku Kasnakoğlu obtained B.S. degrees
Engineering Design Research Center, 1991. from the Department of Electrical and
[8] R. Isermann, J. Schaffnit, and S. Sinsel, “Hardware-in-the-loop Electronics Engineering and the Department
simulation for the design and testing of engineering control of Computer Engineering at the Middle East
systems,” Control Engineering Practice, vol. 7, no. 5, pp. 643-653, Technical University (METU), Ankara,
May 1999. Turkey in 2000. He obtained his M.S. and
Ph.D. degrees from the Department of
Seyma Akyurek is currently a master student Electrical and Computer Engineering at the
at the Electrical & Electronics Engineering Ohio State University (OSU), Columbus,
Department, TOBB University of Economics Ohio, USA in 2003 and 2007. He is currently
& Technology, Ankara, Turkey. She received an associate professor in the Department of
the BSc degree in Electrical & Electronics Electrical and Electronics Engineering at TOBB University of
Engineering in 2014 from the TOBB Economics and Technology in Ankara, Turkey. Dr. Kasnakoglu's
University of Economics & Technology, current research interests include nonlinear control, flow control,
Ankara, Turkey. Control systems and unmanned air vehicles, dynamical modeling, adaptive control and linear
autopilot design for UAVs are her current parameter varying systems.
research areas.
Ünver Kaynak obtained B.S. and M.S.
Gizem Sezin Özden is currently MSc degrees from Istanbul Technical University,
student at the Electric and Electrical Istanbul, Turkey in 1979 and 1981, and M.S
Engineering Department, TOBB ETU, and Ph.D. degrees from Stanford University,
Ankara, Turkey. She received the both CA, USA in 1984 and 1986. He is currently a
Mecatronics Engineering and the Electric and professor in the Department of Mechanical
Electrical Engineering in 2014 from TOBB Engineering at TOBB University of
ETU, Ankara, Turkey. Control systems and Economics and Technology in Ankara,
UAVs are her current research areas. Turkey. Dr. Kaynak’s current research
interests include fluid mechanics,
aerodynamics, transitional flows and unmanned air vehicles.