You are on page 1of 4

Mathematical Model and Six-Degree-of-Freedom Simulation of Two Business Jet Aircraft

20/10/15, 7:46 AM

Appendix B. Mathematical Model and


Six-Degree-of-Freedom Simulation of a
Business Jet Aircraft
Supplement for Flight Dynamics, a book by Robert
F. Stengel
A number of the examples in this book are based on the dynamic characteristics of a generic business jet
aircraft. The mathematical models given below are motivated by full-scale aircraft; however, they should
not be construed as accurate representations of any specific aircraft, as considerable liberties have been
taken in the derivation of the mathematical models. Specifically, Mach effects are estimated using the
methods of Section 2.4, rotary derivatives are calculated with the equations of Section 3.4, power effects
are limited to a simple model of thrust (with no modeling of associated aerodynamic effects), and
moments and products of inertia are estimated using simplified mass distributions.
The aircraft dynamic models are presented as MATLAB functions that are called by the program
FLIGHT. FLIGHT illustrates the essential features of flight analysis and simulation using a modular
framework. Aircraft characteristics are described in the AeroModel function.
FLIGHT is a tutorial program, heavily commented to make interpretation easy. It provides a full sixdegree-of-freedom simulation of an aircraft, as well as trimming calculations and the generation of a
linearized model at any flight condition chosen by the user. Changes to aircraft control histories, initial
conditions, flag settings, and other program control actions are made by changing the numbers contained
in the code; there is no separate user interface. The code has been designed for simplicity and clarity not
for speed of execution, leaving a challenge to the reader to find ways to make the program run faster.
Numerous additions could be made to the code, including implementation of feedback control logic,
simulation of random turbulence or microburst wind shear, and interfaces for real-time execution. No
explicit or implicit warranties are made regarding the accuracy or correctness of the computer code.

B.1 Main Program for Analysis and Simulation (FLIGHT)


Download FLIGHT.m
FLIGHT is the executive file (or script) that calls program functions. Initial conditions are defined here,
the three primary features (trim, linearization, and simulation) are enabled, and output is generated. Initial
perturbations to trim state and control allow transient effects to be simulated. As shown, trimming for
steady, level flight is accomplished by first defining a cost function, J, that contains elements of the state
rate, then minimizing the cost using the Downhill Simplex (Nelder-Mead) algorithm contained in
fminsearch. The longitudinal trimming parameters are stabilator angle, throttle setting, and pitch angle.
The linear model is generated by numjac, a numerical evaluation of the Jacobian matrices associated with
the equations of motion. The linear model is saved to disk files in the variables Fmodel and Gmodel.
MATLAB's ode23, ode45, or ode15s integrate the equations of motion to produce the state history. The
state history is displayed in time plots, with angles converted from the radians used in calculation to
degrees. The reader can readily change the units of plotted quantities or add additional plots through
http://www.princeton.edu/~stengel/FDcodeB.html

Page 1 of 4

Mathematical Model and Six-Degree-of-Freedom Simulation of Two Business Jet Aircraft

20/10/15, 7:46 AM

minor modifications to the code. Any result (e.g., numerical values of the state history) can be displayed
in the MATLAB Command Window simply by removing the semi-colon at the end of the line. The flag
MODEL selects either the low-angle-of-attack, Mach-dependent model for BizJet A or the high-angle-ofattack, low-subsonic model for Bizjet B.

B.2 Low-Angle-of-Attack, Mach-Dependent Model for BizJet A(AeroModel)


Download Mach-dependent AeroModelMach.m
This version of AeroModel uses aerodynamic and dimensional data contained in Ref. B-1 with estimates
of inertial properties of the generic business jet. Details of the configuration, such as sweep and aspect
ratio of the wing and tail, are used in the estimates of Mach effects. Wind tunnel results were reviewed for
all test conditions and control settings, then reduced to simple linear and quadratic coefficients that
describe significant aerodynamics for low angles of attack and sideslip (within about +/-8 degrees of
zero). Increments for landing gear, symmetric spoilers, and flaps are added, as appropriate. Estimates of
Mach effects are based on the Prandtl factor (Section 2.4) or the modified Helmbold equation (eq. 2.4-9).
Thrust available is assumed to be proportional to the air density ratio raised to a power that fits both static
thrust at sea level and the thrust required for flight at maximum Mach number (0.81) at an altitude of
13,720 m (45,000 ft).

B.3 High-Angle-of-Attack, Low-Subsonic Model for Bizjet B(AeroModel)


The model for BizJet B is derived using handbook methods for estimating geometric, inertial, and
aerodynamic characteristics (Sec. 2.4, 2.5, 3.4, and 3.5). The model is first built using GeoMassAero.m,
which saves three .mat files describing the airplane: InerGeo.mat, DataTable.mat, and RotCont.mat.
Download GeoMassAero.m
AeroModelAlpha.m loads the .mat files for use in FLIGHT.m:
Download angle-of-attack-dependent AeroModelAlpha.m
The angle-of attack range extends from -10 to 90 deg based on conventional low-alpha and Newtonian
high-alpha estimates. Linear interpolation is used between tabulated data points. No Mach, landing gear,
spoiler, or flap effects are considered.

B.4 Supporting Functions


B.4.1 Equations of Motion (EoM)
Download EoM.m
Download event.m
The equations of motion for function EoM are written using the flat-earth assumption, as described in
Section 3.2. Linear and translational rates are expressed in body axes, linear position is expressed in earthrelative axes, and the Euler angles describe the orientation of the body frame with respect to the earth
frame. The lift and drag coefficients produced by AeroModel are transformed to body-axis coefficients;
the remaining coefficients and thrust produced by the function are expressed in body axes. Effects of the
wind and control settings are calculated by WindField and ControlSystem prior to calling AeroModel;
http://www.princeton.edu/~stengel/FDcodeB.html

Page 2 of 4

Mathematical Model and Six-Degree-of-Freedom Simulation of Two Business Jet Aircraft

20/10/15, 7:46 AM

hence, they are accounted for in the aerodynamic calculations. An ad hoc limit on the cosine of the pitch
angle is imposed to prevent singular calculations in near-vertical flight. This expediency introduces a
small error when the pitch angle is near +/-90 deg. The function event.m specifies a stopping condition
that terminates the simulation before the final time if the altitude goes below zero.
B.4.2 Cost Function for Aerodynamic Trim (TrimCost)
Download TrimCost.m
Trim control settings are calculated by minimizing the quadratic function of longitudinal accelerations
(i.e., rates of change of axial velocity, normal velocity, and pitch rate) contained in TrimCost. As shown,
equal weight is given to each component in the cost function, J, because the defining matrix, R, is an
identity matrix. The parameters that are adjusted to minimize J are the stabilator angle, the throttle setting,
and the pitch angle (which equals the angle of attack in steady, level flight). TrimCost calls EoM to
generate the needed accelerations. x1 and x3 are varied to maintain constant airspeed with varying angle
of attack.
B.4.3 Direction Cosine Matrix (DCM)
Download DCM.m
The direction-cosine (or rotation) matrix given by eq. 2.1-11 is implemented in the function DCM. The
matrix transforms vectors from the earth-relative frame of reference to the body-axis frame.
B.4.4 Linear System Matrices (LinModel)
Download LinModel.m
The function LinModel calls function EoM to generate f(x,u) and appends seven dummy elements to
account for the controls. Thus, xdotj is a function of [xT uT], and numjac calculates the Jacobian matrix
evaluated at the nominal values of state and control. The stability matrix, F, is contained in the upper-left
(12 x 12) partition, and the control-effect matrix, G, is contained in the upper-right (12 x 7) partition of the
Jacobian.
B.4.5 Wind Field (WindField)
Download WindField.m
WindField produces a three-component wind vector as a function of altitude, with linear interpolation
between tabulated points. The first point is tabulated at negative altitude to assure that no computational
problems occur at zero altitude. The wind vector is rotated to body axes for application in FLIGHT and
EoM.
B.4.6 Atmospheric State (Atmos)
Download Atmos.m
1976 U.S. Standard Atmosphere air density, air pressure, air temperature, and sound speed are generated
as functions of altitude by Atmos. The first point is tabulated at negative altitude to assure that no
http://www.princeton.edu/~stengel/FDcodeB.html

Page 3 of 4

Mathematical Model and Six-Degree-of-Freedom Simulation of Two Business Jet Aircraft

20/10/15, 7:46 AM

computational problems occur at zero altitude.


Reference
B-1 Soderman, P. T., and Aiken, T. N., "Full-Scale Wind-Tunnel Tests of a Small Unpowered Jet Aircraft
with a T-Tail," NASA TN D-6573, Washington, DC, Nov. 1971.

Flight Dynamics.
http://www.princeton.edu/~stengel/FDcodeB.html
Last updated on June 12, 2015.
Copyright 2015 (c) by Robert F. Stengel. All rights reserved.

http://www.princeton.edu/~stengel/FDcodeB.html

Page 4 of 4

You might also like