Aircraft Dynamics and Simulation
Aircraft Dynamics and Simulation
simulation tool
Sara Jansson Ahmed
2012-03-12
Complex systems can be modelled using graphical tools such as Simulink. Here, the equa-
tions of motion in combination with the necessary data were modelled using Simulink to de-
scribe and analyze the unmanned Predator C Avenger. The aerodynamic data was obtained
from the potential ow solver dwfs (dry water ow solver). The Simulink model is initially in
steady state, disturbances are then added to investigate the ying qualities of the aircraft both
in the longitudinal and lateral direction. The modes calculated from the model are compared
to the modes produced from the linearized matrices containing the aerodynamic derivatives.
The other task for the Simulink model is for some of its subsystems to be integrated with the
simulation program ARES, which is used at Saab. The Simulink subsystems are converted
into C code and are built into ARES. The rst expected result is that the modes from the
linearized model should indicate the values of the modes from the Simulink model. The largest
dierence - which regards the spiral mode - was about 24% and assumed acceptable as the
approximative solution for this mode is considered poor [4]. The other dierences were at
most about 15%. The second expected result is that the outputs from simulating the complete
model using Simulink should match the outputs obtained from simulating through ARES con-
nected to the Simulink subsystems. It was the discovered that the obtained results - which are
the values of the longitudinal trim parameters and the modes - from Simulink match almost
exactly the results from ARES with some few deviations. The trim results had a maximum
dierence of about 6% and the values of the modes had a maximum dierence of about 10%
and also assumed acceptable.
1 Nomenclature
2
α = angle of attack [rad] Ixx = mass moment of inertia around the x-axis [kgm ]
2
β = sideslip angle [rad] Iyy = mass moment of inertia around the y-axis [kgm ]
2
γ = ightpath angle [rad] Izz = mass moment of inertia around the z-axis [kgm ]
δa = aileron deection angle [rad] l = length of fuselage [m]
δe = elevator deection angle [rad] L = lift [N] / roll moment [Nm]
δr = rudder deection angle [rad] m = aircraft mass [kg]
δp = throttle setting [0%-100%] M = pitch moment [Nm]
θ = pitch angle [rad] N = yaw moment [Nm]
ρ = atmospheric density [kg/m ]
3 p = roll rate [rad/s]/ atmospheric pressure [Pa]
φ = roll/bank angle [rad] pdyn = dynamic pressure [Pa]
ψ = yaw angle or heading [rad] q = pitch rate [rad/s]
a = speed of sound [m/s] r = yaw rate [rad/s]
b = wing span [m] rxCG = location of the center of gravity on the x-axis [m]
c = mean aerodynamic chord [m] ry CG = location of the center of gravity on the y-axis [m]
C = cross wind force [N] rz CG = location of the center of gravity on the z-axis [m]
1
CC = cross wind coecient Sref = reference wing area [m ]
2
CD = drag coecient T = thrust [N]/ atmospheric temperature [K]
Cl = roll moment coecient u = velocity component along xB -axis [m/s]
CL = lift coecient v = velocity component along yB -axis [m/s]
Cm = pitch moment coecient V = free stream velocity [m/s]
Cn = yaw moment coecient w = velocity component along zB -axis [m/s]
D = drag [N] xB = x-axis in body system
2
g = gravitational acceleration [m/s ] yB = y-axis in body system
h = altitude [m] zB = z-axis in body system
2 Introduction
Using a simulation program such as Simulink [1] is code. The C code is autogenerated using some help
a useful method to design and analyze complex sys- les custom-made by Mathworks to ensure a success-
tems and its variation over time. Here, the equa- ful interface between Simulink and ARES. For the
tions of motion for a chosen unmanned generic air- earlier mentioned model subsystems to t as sub-
craft are built up as a system of predened discrete models to ARES, inputs and outputs were chosen to
blocks which is a clear and logical way of predicting match the inputs and outputs inserted and outgoing
the behaviour of the aircraft when moving. from ARES.
The aim of this project is to create a simulation The Predator C Avenger [2] was chosen where the
model for an unmanned generic aircraft to study its tail was modied to simplify the calculations and to
ying qualities. The model should then represent the t the description of being a standard aircraft. To
aircraft in a steady state for a chosen altitude and obtain the aerodynamic data needed, a tool called
speed. Disturbances in form of rolling, pitching or SUMO (SUrface MOdeller) [3] was used to create a
yawing are then separately added to investigate the surface model and a surface mesh combined by tak-
reaction of the aircraft due to the changes and hence ing aerodynamic data that are typical for a general
2
where X ,Y and Z are the force components act- If assuming that the engine has no installation an-
ing on the aircraft and consists of aerodynamic forces gle i.e. only acts in the x-axis direction, the force
and thrust and, components can written as:
b L
(Clp p + Clr r) = (7)
2V qSref b Y = −D sin β − C cos β (14)
3
Wing span 20.11 [m] 2.3 Simulink
Length 13.4 [m]
Powerplant PW545B (turbofan) As mentioned before, Simulink is used here to model
and analyze the aircraft's dynamic system i.e. its vari-
Thrust 18 [kN]
ation over time. The equations of motion are designed
Max takeo weight 7167 [kg]
using a combination of dierent predened blocks
Max altitude ≈ 15000 [m]
that are connected together with arrows. Those
Max endurance 18 [hr]
blocks are a part of the Simulink library which in-
Max air speed 350 [KTAS]/180[m/s]
cludes the blocks needed to create a system. A system
consists of dierent, linked parts such as inputs, out-
Table 1: Specications for the Predator C [2]
puts, math operations blocks and user-dened blocks
etc. The results from simulating the model can be an-
alyzed for example by exporting the outputs to Mat-
lab's workspace or by adding a scope. An example a
Simulink model can be seen in Figure 2.
The parameters dening the whole system such as
aerodynamic derivatives, aircraft specications, ini-
tial values for velocity and altitude, available thrust
etc have to be stored as global Simulink parameters
even called mpt parameters. Also the inputs and
outputs from the Simulink model that are connected
to the ARES model have to be stored as mpt sig-
nals. Those global Simulink parameters and signals
are then gathered in a m-le which is used as a data
source and is loaded into the model's base workspace
through the model explorer, see Appendix 2.
The Simulink model had to be modelled regard-
ing some requirements from ARES. One demand was
that the model had to be created as a discrete system
with no continuous states and with a xed sample
time which enables the creation of autocode that can
be used in ARES.
4
The other part is a potential ow solver called
dwfs (Dry W ater F low Solver) [7] from which the
aerodynamic derivatives needed are produced. To be
able to run the dwfsolver, a surface mesh .msh is
needed and also a .cfg document that states dier-
ent initial conditions. Those initial conditions include
among other chosen values of the angle of attack α,
the sideslip angle β, the Mach number and xed val-
ues such as the weight of the aircraft.
lt St
where VH =Sc̄ .
A few attempts were done to achieve C m0 > 0 by Figure 4: Surface mesh by SUMO
increasing the tail area St and the tail incidence angle
it and a possible result was to double the area of the
horizontal stabilizer plus having a negative it = −6. 3 The Simulink model
The position of the reference point was then deter-
mined to be (x, y, z) = (7.0, 0, 0.21) which seems re- The rst step was to identify the dynamic equations
alistic as the length of the fuselage is 13.4m and the of an aircraft which are presented in Subsection 2.1.
engine is mounted on the rear end of the fuselage. The next step was to divide the equations into groups
Now that the position of the center of gravity and model those groups as subsystems in Simulink.
is known, the next step was to run the dwf solver Putting the equations in groups means for example
for some dierent atmosphere densities i.e. altitudes that equation (1)-(3) representing forces are in one
and Mach numbers while having α and β equal to subsystem etc. After creating those subsystems, they
zero. The results consists of a mix of both longi- were connected and the whole model which is called
tudinal and lateral aerodynamic derivatives that are the main model was tested by simulating it during
created due to α, β , angular velocities or deecting time. The results are then sent to Matlab's workspace
the control surfaces (ailerons, elevators & rudder). It to be plotted and analyzed.
was detected that altitude does not aect the aero- The idea of the model is to simulate the motion of
dynamic derivatives while changing the Mach num- the aircraft in a trimmed state i.e equilibrium. For a
ber did change these derivatives. As the aerodynamic chosen altitude and speed, the trim values in the lon-
derivatives were assumed to be constant when chang- gitudinal direction are calculated using a trim system
ing the speed and the altitude, a mean value was cal- called the trim model modelled in Simulink. Those
culated for each of the derivatives. trim values are then inserted to the main model de-
5
scribed earlier. 3.2 The main model
When the part regarding trimming is completed,
This model is designed so that the expression for
disturbances are inserted to investigate stability. Dis-
the rst-order dierential equation is isolated on the
turbances are inserted in form of deecting one of the
right-hand side of the equations so for example equa-
control surfaces. Stability in both longitudinal and
tion (1) looks like following:
lateral directions are examined by looking at the dif-
ferent eigenvalues that are excited during the time the X − mg sin θ
system tries to return to equilibrium. − qw + rv = u̇ (25)
m
The main application of the main model is to be
The x-component of the velocity u is then solved
connected to and act as a submodel to ARES. Only
by integrating using an integrator block. As the
specic subsystems of the model are used during the
model is created assuming no continous states, a unit
interface between Simulink and ARES. Those subsys-
delay block in discrete time is used. A simple way of
tems are the one calculating aerodynamic forces and
integrating in discrete time is done by expressing the
moments combined with an engine model plus an iner-
right-hand expression as following:
tia model. Other parts such as an atmosphere model
is instead provided by ARES. un+1 − un
u̇n+1 = (26)
the
Below follows a more detailed description of 4t
trim model and of the parts creating the main model. =⇒
→: D = Tr cosα (21)
3.2.1 Aerodynamic forces and moments
This subsystem is modelled using equations (1)-(3) to
C m = 0 = C m0 + C mα α + C mδe δe (22) calculate the aerodynamic forces and equations (7)-
(9) to calculate the aerodynamic moments. As ex-
pected, this part only determines aerodynamic forces
and moments i.e no gravity or thrust are included.
where L = (CL0 + CLα α + CLδe δ e )qSref ,
The total forces are calculated in another subsystem
called the total forces model. Beside outputs in form
and D = (CD0 + CDα α + CDδe δ e )qSref .
of aerodynamic forces and moments, dierent coe-
cients and moment coecients in the body system
The equations (20)-(22) are solved for the vari-
are calculated as well. As this subsystem is used
ables α, δ e and T r. To obtain the throttle setting
to connect with ARES, the inputs and outputs from
δp , the required thrust Tr is divided by the available
this subsystems are named so ARES would recognize
thrust TA which is a table with values that depend
them.
on altitude and speed. The ight path angle γ is zero
because there is no altitude change which means that
the trimmed value of α = θ. The velocity components 3.2.2 Aerodynamic rates (angular velocities)
u and w are calculated using: Equations (4)-(6) are used here and unit delay blocks
are applied in the same way as in Appendix 5, Fig-
u = V cosα (23) ure 14 to determine the angular velocities in xB , y B
and z B direction. The aerodynamic moments L, M
and N calculated by the aerodynamic forces and mo-
w = V sinα (24) ments subsystem are inputs to this subsystem. The
6
moments of inertia need to be calculated as well and 3.2.5 Engine
to achieve that following equations [6] are used:
The engine model is designed using the lookup ta-
v
3.2.3 Euler angles β = arcsin √
u2 + v 2 + w2
(36)
T = T0 + L(h − h0 ) (31)
4 Results
The results are divided into dierent sections. The
T −g rst section presents the results when simulating the
p = p0 ( ) LR (32)
T0 aircraft in a trimmed state. As mentioned earlier, the
trim model calculates the trimmed values needed as
T −g inputs to simulate the main model. The other sections
ρ = ρ0 ( )( LR −1) (33)
T0 show the results of applying changes to the model i.e.
how the aircraft reacts on changes such as deecting
one of the control surfaces. Longitudinal and lateral
stability are investigated for the dierent changes.
p
a = γRT (34)
7
Chosen trim inputs (1) (2) (3) to lateral disturbances. Dierent disturbances are in-
Mach [−] 0.3 0.4 0.5 serted to the main model to excite the ve modes and
Altitude [m] 3000 3000 3000 the variables aected by the disturbances are plotted
Trim outputs (1) (2) (3) to compare the results with the eigenvalues estimated
α [deg] 3.3 1.28 -0.02 from the longitudinal and the lateral matrix A.
δ e [deg] 1.93 2.41 4.7
θ [deg] 3.3 1.28 -0.02
δ p [−] 43% 69% 77%
u [m/s] 98.4 131.4 164.3 4.3 Longitudinal stability
w [m/s] 5.68 2.92 0.96
C L [−] 0.452 0.255 0.164
Longitudinal stability is dened as the stability
around the lateral axis of the aircraft and is even
Table 2: Trim values used in the main model
called pitching stability. The longitudinal motion is
disturbed from the trimmed state i.e. equilibrium and
As the system is in equilibrium, the expected
is characterized by two oscillatory modes called the
result should be that no changes occur when plot-
short period mode and the Phugoid.
ting outputs over some time. When choosing a new
speed and/or altitude as a new trim value, the system
should then nd equilibrium.
8
about 20% comparing the time to half and about 44%
comparing the period. The conclusion made was the
possibility that C Du and C Lu are not equal to zero.
These derivatives were calculated using the following
approximative method,
M2
CDu = CDM =0 (41)
1 − M2
M2
CLu = CL (42)
1 − M 2 M =0
where CDM =0 and CLM =0 were assumed to have
the same values as CD and CL calculated using equa-
tion (17)-(18) from the Simulink model. The results
can be shown in Table 3, where the derivatives were
Figure 5: Detecting the short period by plotting α at calculated for three Mach numbers.
Mach=0.3
Mach 0.3 0.4 0.5
9
4.4 Lateral-directional stability moving in a tighter and tighter spiral. By inserting a
small roll angle change to the system, the spiral mode
Lateral stability is stability around the longitudinal
can be detected by plotting the roll angle φ. This
axis (roll axis) and directional stability is the stabil-
mode has no imaginary part i.e. no oscillations so
ity around the vertical axis (yaw axis). The lateral-
it converges towards or diverges from the trim value.
directional modes consists of coupled rolling and yaw-
The aerodynamic derivatives aecting this mode are
ing motions. The measured lateral modes from the
C l β , C l r , C nβ and C nr . For M = 0.3 and h = 3000,
Simulink model are also here compared to the ones
the spiral mode was calculated to λspiral = −0.013
obtained from the linearized lateral A matrix.
which gives t1/2 = 53 [s].
10
6% comparing the two α angles from Simulink and
ARES. The other trim parameters have all dierences
below 5% so it is the assumed that the values of the
trim parameters match suciently enough.
As seen from Figure 4.4.3, t1/2 = 5.0 [s] and p= time to half but the periods match exactly on the
5.0 [s] which gives a dierence of about 5.7% compar- other hand. The 7% dierence corresponds to ∼ 0.4
ing the time to half and no dierence comparing the seconds which also is a short time compared to the
by chosing a trim altitude and a trim Mach number. regarding both the comparison between ARES and
In the same way as when simulating using Simulink, Simulink and between ARES and the approxima-
steps can be added to the control surfaces deection tive solutions. The approximative solution for the
angle and dierent variables aected by the changes Phugoid diers however more for higher speeds and
can be plotted to measure the system's modes. up to 50% for M ach = 0.5.
The idea is to investigate the results obtained
from simulating the complete model through Simulink
compared to simulating using ARES connected to
the chosen subsystems. The comparison between
Simulink and ARES was regarding if the same trim
values were obtained as well as the dierent modes.
The comparison of the results for M ach = 0.3 and M=0.3/h=3000 Simulink ARES
11
The short period • The surface modeller SUMO and the potential
Simulink ARES Approximation
ow solver dwfs are recommended tools when
−1.67 ± 1.625i −1.67 ± 1.625i −1.67 ± 1.624i lacking aerodynamic data. It is easy to model a
−0.012 ± 0.09i −0.012 ± 0.10i −0.015 ± 0.12i the initial conditions are set, the potential ow
solver is easily run. The noticeable obstacle is
The roll mode the lack of an instruction manual.
Simulink ARES Approximation
−3.30 −3.30 −2.80 • If designing the Simulink subsystems regarding
some requirements from ARES, then the sub-
The spiral mode
Simulink ARES Approximation
systems dening the aircraft - i.e. the aerody-
namic model (forces and moments), the engine
−0.01 −0.01 −0.14
model and the inertia model (mass and mo-
The dutch roll mode ments of inertia) - can be converted into au-
Simulink ARES Approximation togenerated C code and then act as submodels
−0.13 ± 1.25i −0.14 ± 1.25i −0.07 ± 1.25i to ARES. The no continuous states requirement
led to the unit delay block being used instead
Table 5: Comparing the dierent modes at Mach=0.3
of the integrator block.
• Simulink is an easy and logical tool that can be ing through ARES and the approximative so-
used to model the dynamics of an aircraft i.e. lutions, it can be assumed that the Simulink
its motion variation during time using prede- model is suciently accurate as it matches the
ned blocks from the Simulink library and link- results from ARES with a few deviations.
12
7 Acknowledgments
I would like to thank my supervisor Ph.D Andreas Nilsson for all the help and support and my thesis work
would have never been completed without his guidance. I would also like to thank Roger Larsson and Mårten
Staaf at Saab for all their help.
From KTH, I would like to thank Ph.D David Eller for helping me with SUMO and Professor Ulf Ringertz
for taking time to evaluate my thesis work.
8 References
[1] Mathworks, Simulink, 2011-09-05, http://www.mathworks.se/products/simulink/index.html
[2] Wikipedia, General Atomics Avenger, 2011-09-15, http://en.wikipedia.org/wiki/General_Atomics_Avenger
[3] Larosterna, Sumo, 2011-10-01, http://larosterna.com/sumo.html
[4] R. C. Nelson, 1998, Flight stability and automatic control, second edition
[5] Pratt & Whitney Canada, PW545B, 2011-10-15, http://www.pwc.ca/en/engines/pw545b
[6] J. Roskam, 1989, Airplane design, Part V: component weight estimation, second edition
13