Upload
vuongmien
View
226
Download
4
Embed Size (px)
Citation preview
148
CHAPTER 6
DESIGN OF SIX DEGREES OF FREEDOM
AIRCRAFT MODEL AND LONGITUDINAL AUTOPILOT
FOR AUTONOMOUS LANDING
6.1 INTRODUCTION
This chapter deals with the development of six degrees of freedom
(6-DOF) aircraft model. This 6-DOF model can be used to design the
longitudinal autopilot for autonomous landing. Glide slope and flare
autopilots are designed and implemented using the 6-DOF model. Finally the
results are verified using X-Plane Flight simulator.
6.2 DEVELOPMENT OF 6-DOF AIRCRAFT MODEL
The block implements a nonlinear 6-degree-of-freedom aircraft
dynamic model, using blocks provided in the AeroSim library (Aerosim –
Aeronautical Blockset - User’s Guide). The equations of motion are
implemented in geodetic-frame. The model parameters are read from a user-
configurable mat-file. The 6 DOF aircraft model block is shown in Figure 6.1.
The various parameters given as inputs and the outputs obtained are discussed
in the Section 6.2.1. The complete aircraft model is shown in Figure 6.2.
149
Figure 6.1 6-DOF Aircraft Model Block
6.2.1 Block characteristics
The Parameters of 6-DOF Aircraft Model Block are given below:
Aircraft configuration file: The path and name of the aircraft parameter mat-
file, provided as a string. For example, if the mat-file is someairplane.mat,
and it is in the current directory, then we would use ’someairplane.mat’.
Initial position: The 3×1 vector of initial aircraft location [Lat Lon Alt ]T , in
[rad rad m].
Initial velocities: The 3×1 vector of initial aircraft velocity components in
geodetic-frame [VN VE VD ].
Initial attitude: The 4×1 vector of initial aircraft attitude provided as Euler-
Rodrigues quaternion’s [e0 ex ey ez ] .
Initial angular rates: The 3×1 vector of initial aircraft angular rates (in body
axes) [ p q r ] .
Initial fuel mass: The initial mass of the fuel quantity available on-board the
aircraft, in kg.
150
Initial engine speed :The initial engine shaft rotation speed, in rad/s.
Ground altitude: The altitude of the terrain relative to mean-sea-level, at
aircraft location, in meters.
WMM coefficient file: The complete path to the magnetic model coefficient
file,
Simulation date: 3×1 vector of the calendar date in the format [Day Mon
Year].
Sample time: The sample time at which the aircraft model will run.
The inputs of 6-DOF Aircraft Model Block are given below:
Controls: The 7×1 vector of aircraft controls [flap elevator aileron rudder
throttle mixture ignition ] in [rad rad rad rad frac ratio bool].
Winds: The 3×1 vector of background wind velocities, in navigation frame
[WN WE WD], in m/s.
RST: The integrator reset flag
The outputs of 6-DOF Aircraft Model Block are given below:
States: The 15×1 vector of aircraft states [VN VE VD p q r e0 ex ey ez Lat Lon
Alt mfuel Weng ] .
Sensors: The 18×1 vector of sensor data [Lat Lon Alt VN VE VD ax ay az p q r
pstat , pdyn OAT Hx Hy Hz ] .
VelW: The 3×1 vector of aircraft velocity in wind axes [Va b a] in [m/s rad
rad].
Mach: The current aircraft Mach number.
151
Angular Acc: The 3×1 vector of body angular accelerations [p q r ] .
Euler: The 3×1 vector of the attitude of the aircraft given in Euler angles
[f q y], in radians.
AeroCoeff : The 6×1 vector of aerodynamic coefficients [CD CY CL Cl Cm
Cn ], in rad.
PropCoeff : The 3×1 vector of propeller coefficients [J CT CP ] .
EngCoeff: The 5×1 vector of engine coefficients [MAP m air m fuel BSFC
P]T given in [kPa kg/s kg/s g/(W*hr) W].
Mass: The current aircraft mass, in kg.
ECEF: The 3 × 1 vector of aircraft position in the Earth-centered, Earth-fixed
frame [X Y Z ]
MSL: The aircraft altitude above mean-sea-level, in m.
AGL: The aircraft altitude above ground, in m.
REarth: The Earth equivalent radius, at current aircraft location, in m.
6.2.2 Complete Aircraft Model – Sub Block
The complete aircraft sub block consists of the aerodynamics block,
propulsion system, aircraft inertia, the atmosphere model, total acceleration,
the total moment sub blocks, the aircraft equations of motion and the earth
model. The earth model implemented here is the WGS-84 model.
The acceleration, velocity, the rates and the position are calculated
using the Equations of Motion sub block. The initial conditions i.e. the flap,
elevator, rudder, throttle, ignition, mixture are provided to the aerodynamics
and the propulsion block. The initial wind condition is given to the
152
atmosphere block. The initial velocities, rates and lat, lon, alt position are
given in the Equation of Motion (EOM) block. Hence the complete aircraft
model block is shown in Figure 6.2.
Figure 6.2 Complete Aircraft Model Sub Block
153
6.2.3 Aerodynamics Block
Aerodynamics: Section 6.21 of the aircraft con guration script
speci es the aerodynamic parameters of the aircraft. These are explained in
the following Figures 6.3 – 6.5.
Figure 6.3 Aerodynamics Sub Block
154
Aerodynamic parameter bounds the limits that the aircraft model
will impose on the airspeed, sideslip, and angle-of- attack, given as 1x2 vector
of min and max values. The purpose of using these limits is to keep the
outputs of the aerodynamic model within the linear region.
6.2.4 Propulsion Block
Figure 6.4 Propulsion Sub Block
Propeller : The second section of the aircraft con guration script speci es
the geometry and aerodynamic performance of the propeller.
Propeller hub location: The position of the propulsion force and moment
application point, given with respect to the body- frame origin. The location is
speci ed as a 1x3 row vector of x, y, and z coordinates.
Advance ratio: The aerodynamic performance of the propeller should be
given as a look-up table of propeller coef cients (CP and CT) as functions of
155
the propeller advance ratio. This variable speci es the advance ratio vector
which corresponds to the look-up table.
Coef cient of thrust: The vector of coef cients of thrust for the advance
ratios given above (the vector should have the same size).
Coef cient of power: The vector of coef cients of power for the advance
ratios given above (the vector should have the same size).
Propeller radius: The radius of the propeller is used by the propulsion model
to compute the force and torque from the normalized coef cients.
Engine : The third section of the aircraft con guration scripts allows the user
to specify the engine characteristics. All engine data is given at sea-level. The
engine model will correct the data for altitude effects. For a normally-
aspirated general aviation piston engine, this includes the following
parameters:
RPM: The vector of engine speeds for which the engine data is given, in
rotations-per-minute. All engine parameters are speci ed as 2-D look-up
tables (functions of engine speed and intake manifold pressure).
Fuel ow: The sea-level fuel ow as a function of RPM and MAP. The
number of rows in the matrix should match the size of the RPM vector, the
number of columns should match the size of the MAP vector.
Power: The engine power at sea-level, as a function of RPM and MAP. The
number of rows in the matrix should match the size of the RPM vector, the
number of columns should match the size of the MAP vector.
Sea-level atmospheric conditions: The sea-level atmospheric conditions,
including pressure in Pascals and temperature in degrees Kelvin, for which
the engine data above is given.
156
Engine shaft inertia: The moment of inertia of the rotating parts of the
engine. This is added to the propeller inertia and used in the propulsion
equation of motion to compute the current engine speed. Generally, the
engine shaft inertia is signi cantly lower than that of the propeller, and it can
be neglected without any major effects over the aircraft dynamics.
6.2.5 Atmosphere Block
Figure 6.5 Atmosphere Sub Block
The standard atmosphere block provides the air parameters at the
current altitude. The standard atmosphere block is using interpolation through
look-up tables which provide air data for an altitude range of 0 to 86000
meters.
The background wind block computes the background wind
velocity components in body axes. The block is applying a frame
157
transformation from inertial (geographic) to body frame, using the rotation
matrix provided. The numerical time derivative of the resulting velocity
vector is then computed.
The turbulence block provides a von Karman turbulence model.
The block is applying von Karman turbulence shaping filters for longitudinal,
lateral, and vertical components to 3 white-noise sources. The filter
parameters depend on background wind magnitude and current aircraft
altitude.
The wind shear block computes the angular rate effects caused by
the variation in time/space of the background wind and turbulence velocities.
The wind shear effects considered are the angular velocities and accelerations
for pitch and yaw.
6.2.6 Earth Model
The Earth library folder includes blocks that model the Earth’s
shape, gravity, and magnetic eld as shown in Figure 6.6.
WGS-84: The block computes the local Earth radius and gravity at current
aircraft location using the WGS-84 Earth model coefficients.
EGM-96: The block computes the sea-level altitude with respect to theWGS-
84 ellipsoid, using the EGM-96 geoid undulation model. The EGM-96 block
computes the altitude difference between the theoretical ellipsoid shape and
the actual mean sea level (geoid undulation). This is caused by the non-
uniformity of Earth’s gravitational potential. The correction is performed
using a 2-dimensional Latitude-Longitude look-up table with a resolution of 1
degree in both directions. The geoid undulation is then added to a 0.53 m
WGS-84 correction and to the WGS-84 altitude computed by the aircraft
equations of motion, to obtain the altitude of the aircraft above sea-level.
158
Figure 6.6 Earth Model Sub Block
Ground Detection: The Ground Detection block computes the aircraft
altitude Above Ground Level and sets a flag if it is zero. The ground altitude
should be supplied by the user as a constant or a look-up table of terrain
elevation data. In both cases it should be measured with respect to the MSL
and the unit of measure must match that of the MSL altitude.
WMM-2000: The WMM-2000 block computes the Earth magnetic eld
components at current location using the Department of Defense World
Magnetic Model 2000.
6.2.7 Body Frame EOM
These equations form the centerpiece of an aircraft dynamic model
and implemented in the MATLAB as shown in Figure (6.7). There are two
159
formulations for the equations of motion that are commonly used, and they
are provided in two separate sub-folders within the AeroSim library.
Figure 6.7 Body Frame EOM Block
6.3 6- DOF AIRCRAFT SIMULATION
Using the AeroSim blockset a basic 6-DoF model is constructed as
shown in Figure 6.8. In the first case a simple closed loop configuration is
analysed and the airspeed and pitch angle output are obtained as shown in
Figure 6.9. Using this six DoF model the landing autpilot is being
implemented.
160Figure 6.8 AeroSim 6-DOF Simulink Model without PID
161
Figure 6.9 Airspeed and Pitch angle output without PID
In the second case, as shown in Figure 6.10, a PID control is
added to the feedback loop which atabilised the airspeed and the pitch angle
outputs.
162
Figure 6.10 AeroSim 6-DOF Simulink Model with PID
163
Figure 6.11 Airspeed and Pitch angle output with PID
As seen from the Figure 6.10 and Figure 6.11 the response of the
airspeed and pitch angle has improved with the addition of the PID controller
in terms of settling time , overshoot and rise time.
Using this 6 DoF mathematical model developed using Aerosim
blockset in MATLAB/Simulink, an autonomous landing controller is
designed. The requirements to successfully complete an autonomous landing
are: define the glide path and flare path geometry, design the pitch autopilot
and design controllers for glide path and flare.
6.4 DESIGN OF PITCH AUTO PILOT
To begin the design of the pitch angle autopilot, a transfer function
representative of the UAV in landing conditions is required. The aircraft
164
transfer function for pitch angle for the experimental UAV has been found
to be:
3 2
1728 46.81
330 116.9 546.4e
s
s s s
Figure 6.12 Pitch autopilot without PID Controller
Figure 6.13 Pitch autopilot and its response
The response, for a unit step input, shows that the oscillations are
more and is not quite good for landing, since the settling time and rise time
are more. The actual settling time of 17 seconds is much too slow for an
autopilot to control an aircraft on landing. In order to decrease the rise time, a
165
proportional controller is needed. In order to reduce the settling time, the
derivative controller is needed. In order to reduce oscillations, the integrator is
needed. So, overall, there is a need for PID controllers as shown in Figure
6.14. The tuning of Kp, Kd, Ki are done by Hessian Modified tuning to get
the optimum response.
Figure 6.14 Pitch autopilot with PID Controller
Figure 6.15 Pitch angle autopilot with PID controllers
From the Figure 6.15, it is concluded that the proportional, integral
and derivative controller gains are tuned to get the optimum response and the
values are found to be Kp= 2.5, Ki= 5, Kd= -1.5. That is, the system will not
undergo unstable region with change in gain. The phase margin is found to be
33.8 degree and a crossover frequency of 1.57 rad/s with a settling time
around 4 seconds.
166
6.5 AUTOMATIC GLIDE SLOPE CONTROLLER
6.5.1 Basic Longitudinal Autopilot
The Basic longitudinal Autopilot (John Blakelock 1991) ensures
that the pilot pitch angle command is achieved quickly with fewer
oscillations. It is a modified simple displacement autopilot and shown in
Figure 6.16.
Figure 6.16 Basic Longitudinal Autopilot
It was modified using an inner loop with pitch rate feedback to
improve the damping of the short period oscillations and also to achieve
higher damping in outer loop.
6.5.2 Glide Slope Controller
The Automatic glide slope controller guides the UAV down a
predetermined glide slope of 5.5 . At a pre-selected altitude reduces the rate
of descent and cause the UAV to flare out and touch down with an acceptably
low rate of descent (Kim and Golnaraghi 2004).
The glide path is defined as a line from some starting point to the
end of the runway. For this project, a glide path angle of -5.5o
was used, so the
starting point was defined by the LLA position of the end of the runway and
the desired final approach distance. To simulate this dependence on the range
from the aircraft to the runway, the glide path command signal was defined to
earef
e e
S(amp)A/ CElevator
Servo
Rate
Gyro
167
include the range. Figure 6.17 shows the glide path geometry where the
commanded height above ground is a function of the range.
Figure 6.17 Geometry of the glide slope
During the flare maneuver, pilots transition from flying a straight
line to an exponential path to slow the descent rate of the airplane. This can be
simulated by defining an exponentially decaying flight path and using altitude
above ground to generate the error signal to the controller. Figure 6.18 shows
the flare path geometry intended touchdown zone approximately 500 ft. from
the runway threshold.
Figure 6.18 Geometry of the flare path
If the UAV is below the center line of the glide slope, then d is
considered negative, as is, , when the velocity vector is below the horizon,
that is, the UAV descending.
x
H
Runway
H
R
x
Runway
168
The component of forward velocity U perpendicular to the glide
slope center line is d and this d for small glide slope angle is given by
o oUd Usin( 5.5) ( 5.5)
57.3(6.7)
If <5.5o, then from Figure 6.17, ( +5.5)
o is positive; therefore d is
positive, and as d initially was negative, the UAV is approaching the glide
path from below.
oUd ( 5.5)
57.3s (6.8)
The glide slope receiver does not measure the perpendicular
distance to the glide slope centerline but the angular error resulting there
from. Thus for a given value of d the angular error increases as the UAV
nears the runway, which has the effect of increasing the system gain as the
range to the runway decreases.
For small angles, o(57.3d / R) (6.9)
Through the use of Equations (6.8) and (6.9), the flight path angle
can be related to the angular error of the UAV from the centerline of the glide
slope. The block diagram of the glide slope control system, including the
geometry is shown below in Figure 6.19.
Figure 6.19 Block diagram of glide slope control system
3o
ref = 0comm
o dCoupler UAV &
Autopilot
d 57.3
R
169
6.6 DESIGN OF GLIDE PATH CONTROLLER
The glide slope command is designed in such a way that the
controller will generate the error signal by comparing the instantaneous height
of the UAV, obtained from the image, and the required height at that instant.
So the error signal drives the autopilot, thus making UAV to align with the
glide path. Figure 6.20 shows the glide path controller.
Figure 6.20 Glide Path controller
The Range and the instantaneous height are extracted from the
runway image taken at real time. Since the sine of small value is
approximately a small value, so sin(Theta) = Theta. This glide path command
generates the necessary error signal if the UAV misses the actual glide path.
6.7 DESIGN OF FLARE PATH CONTROLLER
As seen earlier, the flare path geometry is an exponential one. After
certain distances, its need for switch over from glide path to flare. The flare
path command is proportional to the difference between horizontal distance at
170
the instant of start of flare phase and instantaneous horizontal distance from
runway threshold. Let it be ‘x’. From Equation (6.10),
x
0H H e (6.10)
The desired value of ‘Tau’ can be obtained by specifying the
distance to the touchdown point from the glide slope transmitter. If this
distance is to be 10 ft and if it is also assumed that the aircraft touches down
in single time constant, then the ground distance traveled during the flare will
be greater than 10 ft.
Let the starting flare path geometry range would be 20 feet. Hence
the Tau value been estimated as 1 and the implementation is shown in
Figure 6.21.
Figure 6.21 Flare path controller
Using MATLAB/Simulink basic longitudinal autopilot shown in
Figure 6.22 and a Glide Slope Control system shown in Figure 6.23 are
designed to guide the UAV along a predefined path having a slope of 5.5o and
maintaining the longitudinal attitude.
171
theta_in
thetadot_in
theta
phi
psi
thetadot
vision data calc
-10
s+12
elevator Servo
thetafinal
To Workspace5
-1.39s-.4253
s +.805s+1.3252
Thetadot / delta eStep
Scope5 Scope4
Scope3
ScopeProductPID
PID Controller
1
s
Integrator
180/pi
Constant1
Figure 6.22 Basic Longitudinal Autopilot
Figure 6.23 Glide Slope Control System
The vision data calculation module calculates the pitch angle
components and it uses the current pitch angle given by the (s)/ e(s) transfer
function to set the current orientation of UAV as shown in Figure 6.23. Using
this orientation and current position, images are generated with a separation of
0.5 sec (Rives and Azinheira 2002). The final pitch angle estimated is fedback
for the closed loop. The basic longitudinal autopilot is used in the Glide Slope
control system, which guides the UAV along a predefined glide path.
172
Figure 6.24 Vision Data Calculation Module
173
Figure 6.25 Pitch angle
It is concluded from Figure 6.25 that the UAV is aligned to the
runway and follows the predefined glide angle (5.5o) to safely land the UAV.
6.8 BLENDING FUNCTION AND ITS IMPLEMENTATION
An additional problem in the flare controller design was the method
of switching from glide slope to flare command signals. With the switch at a
range, the aircraft could not be made stable as having a switch in the
simulation caused adverse affects on the input signals to the switch. It was
determined by experiment that constants in Simulink create problems in
solving the algebraic loop and cause the simulation to produce erroneous
results. To compensate, step blocks were used with the step value equal to
that of the desired constant and the step time equal to the first time step of
simulation. Even with this correction, stability problems were still evident at
the switch of control commands.
To compensate for the sudden switch in commands, a blending
function was developed to soften the effect of the switch. This function blends
the signals over range values of 50 m to 20 m. These values were selected to
ensure that the aircraft would be established under the flare controller before
reaching the desired switch range of 50 m.
Figure 6.26 shows the Simulink of the braking function. The
saturation blocks normalize the signal multipliers to a value between zero and
174
one. 20 m is subtracted from the range and multiplied by a gain to generate a
multiplier for the glide path command. The gain was selected such that at 50
m range, the glide multiplier is one and at 20 m range, the glide multiplier is
zero. The flare multiplier is much the same, but in the reverse direction. These
multipliers directly multiply the glide and flare signals such that when the
range is between 50 m and 20 m, both signals are active. Above 50 m only the
glide path signal is active and below 20 m only the flare signal is active.
Figure 6.26 Glide/Flare Blending Function
The blending of signals at the switch of glide slope and flare
control signals solved the problem of extreme oscillation and instability
during the switch. Because the flare path command is exponential, the aircraft
tends to bounce if the elevator remains under control of the flare controller
after main gear touchdown. To ensure the aircraft remains on the ground, the
elevator is neutralized with a relay at an altitude above ground level equal to
the height of the main gear.
6.9 INTEGRATION OF GLIDE/FLARE CONTROLLERS WITH
PITCH AUTOPILOT
Figure 6.27 shows the complete autonomous landing autopilot.
Here, the autopilot engages with glide controller till the altitude of 50 m.
Between the altitude ranges of 50 m and 20 m, both glide and flare controllers
are effective. Below the altitude range of 20 m, the autopilot engages with
flare controller. The blending function is to smooth out the switching between
glide and flare phase change.
175
Figure 6.27 Glide/Flare autopilot
176
6.10 BRAKING FUNCTION
Upon main gear touchdown, the elevator must allow the nose of the
airplane to rotate downward to contact the nose gear with the ground and the
brakes must be applied. Because exponentially decaying functions never
actually reach zero, the elevator command must be switched from the flare
path to neutral upon main gear touchdown.The brakes must be applied
smoothly after touchdown or the gear will fail. A rate limiter after a switch
can be used to accomplish this.
Because the flare path command is exponential, the aircraft tends to
bounce if the elevator remains under control of the flare controller after main
gear touchdown. To ensure the aircraft remains on the ground, the elevator is
neutralized with a relay at an altitude above ground level equal to the height
of the main gear. At the same altitude, the throttle command is also
neutralized and the brake command is changed from one to zero (zero to full
braking) with a rate limiter to limit the brake application time to two seconds.
The rate limiter on braking prevents gear failure due to over-braking upon
touchdown.
Figure 6.28 Braking Command
6.11 SIMULATION RESULTS
To check the performance of the INS/Vision algorithm it was
interfaced with the flight simulator ‘X-Plane’ and the snapshots at different
stages of the flight are shown in Figures 6.29 to 6.34.
177
Figure 6.29 X-plane output - Airplane to align with the runway
Figure 6.30 X-plane output - Airplane at the starting of the glide slope
178
Figure 6.31 Airplane after glide slope and flare – X plane output - Front
view
Figure 6.32 Airplane landed properly after glide slope and flare –
X plane output - Front view
179
Figure 6.33 X-plane output showing the actual and the estimated path of
the aircraft
Figure 6.34 X-plane output showing the path of the aircraft
180
Figures 6.29 to 6.34 clearly demonstrates that the UAV is
successfully and safely landed with the integration algorithm output.
6.12 CONCLUSION
In this chapter, a non-linear 6-DOF model is developed using the
Aerosim blockset in MATLAB software and the longitudinal autopilot with
glide and flare controllers are designed to control the landing of the UAV.
The autonomous landing is demonstrated with the integrated vision and
SDINS data and validated by interfacing the autopilot output with the X-plane
simulation software. The generated control signals are transferred to X-Plane
through UDP from the Simulink and the landing performance was verified
and found to be acceptable.