Heading Control Law
Heading Control Law
Heading Control Law
1 Introduction
An autopilot is an electrical, mechanic, or
hydraulic system used to guide a vehicle without
human assistance. It can be coupled to any
autonomous, land, water, or air vehicle.
A Small Unmanned Aerial Vehicle (SUAV), which
is the focus of this work, must use an autopilot to
perform its missions. Due to great responsibilities
involved, a common practice is to test and evaluate
the autopilot by using a flight simulator, reducing the
risk of project failure (Chao, 2010)
The Pegasus AutoPilot has been developed to create
an efficient, complete, and low cost autopilot to be
used for all kinds of missions, especially in fixedwing unmanned aircrafts.
This paper will describe the architecture and design
of the control block used in the implementation of
Pegasus. The PID (proportional, integral, and
derivative) controllers were used, although not all
three gains are always present. The variables
controlled by feed-back closed-loop control are pitch,
roll, heading angles, climb rate, forward speed, and
altitude. In addition, the feed-forward control
establishes a connection between the forward speed
and altitude, the heading and altitude, and the
heading using both aileron and rudder.
The designed control is validated thought a SoftwareIn-the-Loop (SIL) simulation, using Matlab/Simulink
and the flight simulator X-Plane, where a target
aircraft was modeled. The navigation system, the
aircraft response, and visual are presented by the
ISBN: 978-85-8001-069-5
4146
ISBN: 978-85-8001-069-5
4 Feed-Back Control
The feed-back closed-loop is constituted from the
longitudinal, the lateral-directional, and the airspeed
control, which together performs six hold controls.
All six closed-loops were implemented on
Matlab/Simulink, which communicates with X-Plane
through the UDP, the native communication interface
of this simulator (Ernest, 2007). The system operates
at a sample rate of 20Hz configurable on the flight
simulator.
4.1 The Lateral-Directional Control
The main problem with yaw control is that the
heading adjusted directly by aileron produces a very
unstable airplane behavior. This occurs because only
the aileron deflection cannot control the roll angle.
Using only the aileron deflection and not being
careful in control the roll angle, there is a risk that
the roll angle becomes excessive and it can cause
loss of air lift on the wings. Therefore we have to
consider the roll limits of the airplane in the heading
loop system to avoid this problem. Then it was
implemented inside the yaw outer loop control an
inner loop that controls the roll angle.
The outer control loop provides a roll reference angle
as the input signal to the inner loop. This roll
reference signal (
) is the input signal to the inner
loop.
The inner loop, receives the roll reference signal
(
), as it inputs. It generates the appropriate
command signal to the ailerons in order to the
aircrafts behaves as desired, respecting the roll limits
of the airplane and avoiding loss of air lift.
However, this nested loop structure brings more
difficulties to tune the controllers parameters. The
outer loop, the heading hold loop, uses a PID
controller, which makes necessary to set three
parameters. The inner loop, the roll hold loop, uses a
PD controller, with two parameters to be set. The
appropriate tuning of all parameters was done by
4147
(1)
(2)
ref
e
+
Aircraft
a
Kpa
current
SAT
SAT
acurrent
Kd a
acurrent
ISBN: 978-85-8001-069-5
(3)
(4)
ref
e
+
PID
Inner Loop
Kp
Ki
SAT
ref
Aircraft
a
Kd
current
Roll Control
HOLD
4148
(5)
)
),
ref e
+
(7)
Kpe
SAT
SAT
ecurrent
current
(6)
Just like the roll hold controller, this loop requires
two saturators. The first one restricts the maximum
amount of variation that the servo of the elevator
may have, and the second one is used to limit the
maximum and minimum values of the elevator
position.
2) Climb Rate Hold Controller: The climb rate
loop, illustrated in Fig. (6), has two feedback lines.
The current climb rate (VVcurrent) feedback feeds the
PID controller and the other one, the current pitch
(
), is used to calculate the new reference
pitch value. This control loop calculates the climb
rate error ( ), which is the difference between the
climb rate reference (VVref) and the current climb rate
(VVcurrent). Furthermore, this error is used to generate
a pitch deflection, as in (7).
Aircraft
Kd e
ecurrent
VVref eVV
+
PID
Kp
Ki
Kd
VVcurrent
Inner Loop
SAT
SAT
current
ref
Aircraft
VV
VV
Pitch Control
HOLD
(9)
(8)
Then the reference pitch value, is used by the inner
loop, the pitch hold control explained before, to
generate the appropriate elevator servo position
which makes the aircraft reaches the desired climb
rate.
The addition of the current pitch smoothies the
movement of the airplane. Without this feedback the
airplane would shake, making it impossible to
control the climb rate within acceptable response.
As in the pitch hold loop, two saturators are needed.
The first one limits the maximum pitch variation that
the controller could generate and the second one is
used to limit the minimum and maximum pitch
reference value. These two saturators are essential to
avoid sudden changes in the airplanes attitude. A
high pitch reference, if reached by the airplane, could
make the airplane to become unstable.
3) Altitude Hold Controller: This controller is on the
top of the longitudinal control chain. It is based on
the same concept of the heading controller and its
work is to follow a desired altitude (
) given by
a guidance block. It generates the climb rate
reference (
) for the climb rate hold system,
controlling indirectly the aircrafts altitude.
ISBN: 978-85-8001-069-5
(10)
4149
ealt
Altref
Inner Loop
Kp
Aircraft
Inner Loop
PID
Ki
SAT
Kd
Alt
Alt
Pitch Control
HOLD
Altcurrent
(13)
Where:
Elevator is the value applied on the elevator
surface;
Vref
PID
+
thr
Kp
Ki
Aircraft
SAT
Kd
SAT
thr current
Vcurrent
thr
Airspeed
thr current
(11)
(12)
Where:
As the airspeed control is a very sensitive system, a
regulator is necessary to divide the airspeed error, in
this case by 10^5, to minimize the power variation,
reaching a stable airspeed output.
Despite the plane having an electric motor, the term
throttle is used to designate the power applied to
the motor, because the equations and closed-loop
established can be also used in an airplane that uses a
combustion engine (Glow).
(16)
Where:
5 Feed-Forward Control
The feed-forward closed loops are used to
correct errors caused by coupling movements
(Andrievsky, 2002), such as undesirable pitch effects
when aircraft turns left or right producing a loss of
lift that involves a diminution of pitch angle, or in
ISBN: 978-85-8001-069-5
4150
Feed-Back
Control
Feed-Forward
Control
Airspeed
Thr
Hold
Control
Altitude
Hold
Control
ealt
Aircraft
Throttle
Kpthr
Elev
Elevator
Heading
Hold
Control
|ref|
Kpe-r
ref
Kpr-r
Ailrn
Rudder
Ailerons
6 Implementation
The control law used in the proposed framework
was developed in the Matlab/Simulink environment.
This experimental framework employs the
Matlab/Simulink running the autopilot controller to
be tested, and another PC running the X-Plane flight
simulator contained the unmanned aircraft to be
commanded (Ribeiro, 2011).
In order to facilitate the operation and change of
controller characteristics and desired references, a
reliable ground station software was developed using
the Graphics User Interface (GUI) tool available in
Matlab. This ground station software is used to
upload the reference values of altitude, heading, and
also define the desired UAV airspeed. Fig. 10 shows
the User Interface developed.
The parameters and control loop gains can be tuned
or changed through of User Interface, and they are
instantly modified in the control algorithm. The user
interfaces also allows the user to turn on or off any of
the hold controls individually. This means that it is
possible to evaluate the altitude hold control with the
airspeed hold control turned off or contrariwise.
To guarantee the airplane stability more than one
control law presented before are functioning in the
system. However, the tests done to validate the
designed control laws were applied individually. This
mean that although more than one control law was
working at the same time, only the loop in analysis is
submitted to a change in the reference value. It is
necessary to operate more than one law at the same
time to guarantee the airplanes stability.
ISBN: 978-85-8001-069-5
4151
Roll
Pitch
Heading
Climb
Rate
Altitude
Airspeed
Over
shoot
(%)
48.26
28.71
---
0.29
0.36
0.14
Rise
Time
(s)
0.046
0.08
0.068
49.3
0.308
0.02
0.0
--5.9
0.4375
7.7
0.185
2.36
0.00
0.9
Settling
Time (s)
Error
(%)
0.0
0.0
0.44
ISBN: 978-85-8001-069-5
4152
7 CONCLUSION
The architecture of the control block from
Pegasus Autopilot was deeply detailed, explaining
each feedback line and detailing completely the feedforward control.
ISBN: 978-85-8001-069-5
4153