Professional Documents
Culture Documents
AIAA-2002-4704
System IDentification
Programs
for AirCraft
(SIDPAC)
Eugene A. Morelli
NASA Langley
Hampton, VA
AIAA
Research
Atmospheric
August
For permission
Center
to copy
or to republish,
1801
Alexander
Flight Mechanics
the American
Suite
Institute
500, Reston,
VA,
Conference
CA
of Aeronautics
20191-4344
and Astronautics,
AIAA-2002-4704
S_YSTEM
IDENTIFICATION
PROGRAMS
Eugene
NAb)/Langley
Hampton,
FOR
USA
Abstract
Center
23681
and
of
computer
programs
system
identification
is described
The
programs,
collectively
IDentification
Programs
developed
has been
used
Center
with
at NASA
many
and
routines
wind
conditioning,
tunnel
for
data
frequency
Langley
equation-error
in
real-time
the
and recursive
estimation,
low order
equivalent
estimated
parameter
error
nonlinear
simulation,
plotting,
system
been
to
have
output-
written
and
how
to
and effort
does,
best
the methods
linear
S_S_S__stem
IDentification
SIDPAC,
and
is a collection
of system
identification
This
describes
the routines
flight
test data from the NASA
aircraft.
The SIDPAC
software
and demonstrates
software
U.S.
on
citizens
the
usage
by
visualization.
Glenn
Twin
Otter
is available
without
request
requestor
to
the
author,
NASA
completing
agreement.
systems
on
is
When
the
models
are generally
outputs,
the
system
be
system
data
volume
identification
system
modeled
dynamic
of
with
is
an
multiple
are noisy.
is
SIDPAC
substantial,
tasks
require
aircraft,
inputs
is easy
precision
make
and
implementing
and program.
functions
plotting,
and
SIDPAC
on
The
Institute
in
language
linear
also has
algebra,
and
data
uses
double
characteristics
choice
for
algorithms.
implemented
the
are
in TDPAC
in the open
References
algorithms
references
are
literature.
contain
implemented
grouped
in
according
their
relevance
to
addressed
in SIDPAC.
system
identification
Development
of SIDPAC
occurred
to
problems
over
a period
of approximately
10 years at NASA
Center.
The author wrote and tested
Langley
Research
all of the SIDPAC
routines.
in
Most
of
1
American
for
in
in
subroutine
arithmetic
by default.
These
MATLAB
an
excellent
information
test data
written
function
MATLAB
on information
available
documents
listed
under
SIDPAC.
in SIDPAC
flight
debugging,
of
problems
is a platform-independent
built-in
the
computers
a real
that
to aircraft.
included
using
is the
analog
or a function
in C.
to learn
or
most
applied
As a result,
and
for solving
MATLAB
FORTRAN
analysis,
identification.
of methods
or
programs
All SIDPAC
programs
were
as m-file functions.
An m-file
many
physical
observations
as
required
aircraft
to
models
imperfect
known
and
for AirCraft,
example.
MATLAB
that
mathematical
based
measurements
paper
MATLAB
Introduction
Developing
to the
the program
implemented,
computer
a variety
to
limited
a particular
what
Programs
of
in the area
contingent
have
is in addition
are
implement
charge
The
different
the results.
An overview
of SIDPAC
capabilities
is provided,
along
with a demonstration
of the use of SIDPAC
with real
3-D
the
can be required
operate
in learning
interpret
of
to
parameter
identification,
calculation,
and
many
effort
type
developed.
and effort
and
and
suited
among
and
This
how
was
scattered
involved
how to properly
a specific
compile
the
in FORTRAN,
address
time
aircraft
over
methods
people,
Significant
for
developed
the program
are
competently.
actually
and
been
to
for which
programs
been
using
programs
learn
time
computer
have
designed
usually
program
model
time
have
availability.
data
and
both
most
organizations
SIDPAC
analysis,
but
existing
test
design,
years,
application
Research
flight
experiments.
estimation
were
Many
identification
problem,
SIDPAC
different
compatibility
domains,
S_S_S__
stem
or SIDPAC,
experiment
determination,
parameter
demonstrated.
functions.
successfully
includes
error
as m-file
from
aircraft
called
data
programs
structure
and
for AirCraft,
in MATLAB
for
2199
software.
system
A collection
(SIDPAC)
A. Morelli
Research
Virginia
AIRCRAFT
of Aeronautics
and Astronautics
the
routines
SIDPAC
were
originally
coded
translated
and
have been
used
continues
to
as m-file
adapted
for many
be
for system
various
flight
but
SIDPAC
at NASA
were
codes
that
has been
Langley
identification
test
a few
FORTRAN
years.
used
Center
functions,
from
applied
programs
and
tunnel
experiments.
Software
tasks
tools
for specific
are implemented
functions,
functions.
which
The
routine
includes
calling
syntax,
few
MATLAB
Processing
Toolbox
sold by
includes
There
to
toolboxes
there
C compiler
therefore
C mex
routines
available
a complete
release
any
5.2,
computer
Since
toolbox,
tasks,
user.
11,
and
problems
tested
analysis
6.1,
like
hardware
SIDPAC
properly
5.2
much
or
the
that
purposes
system
effective.
for
The
here
descriptions
apply
version
to SIDPAC
as
software
e-mail
of
this
was
sent
just prior
Calling
header
of
MATLAB
help
each
and
SIDPAC
command
window
All
.m
language,
file
m-files
extension.
so the
in SIDPAC,
be
from
the
and
link
the
code
with
no
commands.
correct
comment
calling
header
initial
data
not
reduction,
individually
forces
these
or
from
the
the analyst
are being
used
to
and how
system
good
of
a
an
m-files.
section.
The
requirement
syntax
to
can
resulting
Institute
m-file
of
of Aeronautics
in
custom
MATLAB
problems,
script
using
for
calls
to
in the Examole
can be used
maneuvers,
data
to automate
documenting
the
data
analysis
process.
The
functions
that
comprise
SIDPAC
are
categorized
to functionality.
m-files
create
This is demonstrated
for different
capabilities
of the
to
scripts
identification
of completely
according
the
matter
modeling
and modeling
execute
simple
SIDPAC
benefit
directly
directly
the analysis
the
is
is
results.
appear
2
American
for
complicated
This
methods
a GUI
and
are so
particular
have
To
of
called
line.
outputs,
the
be
and
analysis,
and
name
runs
inputs
data
analysis
to typing
the
for
Beyond
the
in the
MATLAB
source
environment,
compile
any m-file
copied
is
SIDPAC
must
signal
analysis.
very
after
aid the
in
displayed
filename
either
that
conversion,
obtaining
It
in response
of
Instead,
via
material
are
of
way
users
latest
of this paper.
descriptive
in the
(GUI)
as unit
development
of what
system
Because
the methods
are implemented.
This level of contact
with
the
methods
and
software
is essential
for
version
SIDPAC
Interfaces
such
is so broad,
command
be cognizant
every
case.
much
has
it is only
1.1
is the
SIDPAC
m-file
where
interpretive
MATLAB
release
included
1.1, which
to all registered
m-file.
for explicit
version
to public
customary
in the
demonstrations
writing.
syntax
filename,
specific
and
and
problem
that
compatibility
be
m-files
MATLAB
selected
analysis
a wide
variety
of
system
as individual
m-files.
SIDPAC
Therefore,
SIDPAC
say
of choices
the
would
of
Therefore,
transformations,
methods
diverse,
as
spectrum
short
does.
decision-making.
User
data
forms,
modeling
higher.
same
the
the
and discussed.
include
or
tasks
and
model
on
MATLAB
and operating
are
this,
personal
work
MATLAB
very
definition,
with
m-file
identification
to
SIDPAC
implements
identification
methods
under
system
test data
is a special
not
Graphical
of
each
it unique.
problem
in routine
and
in several
applications
exaggeration
automated
Spartan.
overview
along
what
system
does
are
C Overview
every
SIDPAC
for
so error
documented
categories,
are presented
that makes
this,
like,
an
to real flight
aspect
slight
the
m-files
of
Nearly
analyst
written
release,
fully
example
modeling
if a
built-in
MATLAB
will
problem
this,
identification
is
with
originally
gives
descriptions
in SIDPAC
executed
for public
by listing
routines
some
system
standard
and
section
software
but
SIDPAC
for aircraft
the
software
for
commented.
next
not
SIDPA
in SIDPAC
IBM-compatible
the computing
requirements
MATLAB .
liberally
includes
an
is
is
Following
user.
only
running
SIDPAC
and
software
identification
Signal
to the
certain
to the
release
SIDPAC
interface,
the
Toolbox,
included
for
developed
on
the
Systems
set of programs
was
12.1,
computer.
files
are alternate
SIDPAC
from
available
speed
identification,
requiring
MATLAB functions.
MATLAB
not
processing
is not
user
However,
narrative
and
use
were
handling,
The
of inputs
history,
makes
m-files
and
Inc.,
but SIDPAC
also
that can be used if these
are
increase
again,
routines
The
MathWorks,
alternate
routines
MATLAB
descriptions
and modification
routines.
SIDPAC
SIDPAC
SIDPAC
m-file
SIDPAC
then
purposes
m-file
supporting
for each
line,
research
identification
as individual
may
call other
comment
header
and outputs,
the creation
a list of called SIDPAC
of
system
in SIDPAC
command
return.
The
from
wind
carriage
Research
to data
and
MATLAB
and Astronautics
Short
below
narrative
each
the
main
below
descriptions
category
heading.
Them-filesdescribed
hererepresent
onlya partial
listingofthecontents
ofTDPAC.
fint.m
Data Analysis
accel
cor.m
- Corrects
from
the sensor
location
axcnv.m
coordinate
system.
Finds
accelerometer
vector
-Draws
chirpz.m
transform.
Computes
fixdrop,
c.g.
hsmoo.m
components
in
Bode
plots
using
a rotated
for
the
chirp-Z
discrete
and
and their
time
series
Scales
so their
removes
waveforms
biases
compzsd.m
from
of noisy
correl.m
a smoothed
time
filter
series
two
time
corx.m
correlation
- Computes
time
using
series,
cubic_dtrend.m
time
cutItd.m
manual
cutting
Fourier
cubic
dox.m
domain.
derivative
polynomial
Computes
parameter
of noisy
time
the
definition
endpoints
least
for a noisy
squares
a cubic
test
Transform
algorithm).
estlag.m
- Estimates
an
optimal
density
for
shift between
two
correlation.
detrend
random
function
and
implements
data
lengths.
smoothed
series
numerical
using
local
without
least
transform
using
Fast
mksqw.m
delay
time
series,
using
the maximum
slope
method described
in MIL-STD
1797A.
for
Cram6r-Rao
bounds
and
experiment
designs
for
linear
or
logarithmic
a sum
of
sine
waves
with
and frequencies.
white
or
arbitrarily
an
alternating
colored
inputs.
-
Generates
amplitudes
- Generates
Compatibility
square
and pulse
a Schroeder
wave
widths.
sweep
input.
Analysis
time
a irch k. m - Checks
squares
the compatibility
accelerations,
sideslip
angle,
of measured
body-axis
and angle
angular
data
rates,
of attack.
using
compat.m
Fourier
between
from
Estimates
measured
output-error
dcmp.m
projection
-Integrates
data compatibility
maximum
error
time-domain
likelihood.
aircraft
of Aeronautics
kinematic
equations
for
analysis.
Applies
to measured
data.
3
Institute
instrumentation
input-output
two
sens_cor.m
corrections
American
endpoints
input.
arbitrary
mksswp.m
data, using
time
modern
Generates
for translational
Fourier
the
- Generates
noise
parameters
the pure
smoothed
modeling.
amplitudes
mkrdn.m
fit.
data
the discrete
(i.e.,
time
cross
Generates
mkrandss.m
- Computes
for a measured
and
spectral
the relative
Generates
sweep
airspeed,
dIt.m
power
time-domain
surface
mkfswp.m
regressor
test maneuver
a
that
series.
Design
response
Data
deriv.m
noise
analysis
- Computes
time series.
input with
flight
from
band
in a time
time
analysis
normalized
smoothed
of flight
signal
compcrb.m
- Computes
the information
matrix.
series.
Plots
using
Experiment
random
- Computes
for a noisy
measured
applied
estimated
the
a local
frequency
of the power
Fourier
- Estimates
frequency
Computes
matrix.
csrnep.rn
series
the
force
numerical
using
in the frequency
Computes
matrix.
correlation
applied
non-dimensional
on measured
data.
- Computes
derivative
filtering
can be compared.
- Computes
non-dimensional
based on measured
data.
compmc.m
Computes
moment
coefficients
based
low-pass
difference.
xsmep.m
compfc.m
coefficients
the
fraction
- Computes
time series.
tshiff.m
cmpsigs.m
time
Fourier
spect.m
- Plots
a posteriori
- Separates
measured
cmpplt.m
Fourier
measured
data dropouts.
Computes
a given
finite
using
smoothing.
time
series,
using
Wiener filter.
plots.
Computes
fixes
weight
-
contains
general
high-accuracy
-Implements
fixed
smoo.m
Bode
frequencies,
-Manually
pwrband.m
bodecmp.m
- Compares
transfer
function
models.
bodeplt.m
measurements
to the aircraft
integral
for arbitrary
series data.
and Astronautics
instrumentation
error
rotchk.m
- Checks
for body-axis
Model
angular
Structure
gsorth.m
regressors
the compatibility
rates
of measured
and Euler
least
data
angles.
Determination
Generates
using
a set
of
Gram-Schmidt
mutually
squares
conventionally
colores.m
errors
post-processing
by
maximum
orthogonal
The
orthogonalization.
- Identifies
measured
input-output
stepwise
and
regression,
error
input
This
the analyst
frequency-domain
-
measured
with
This
time-domain
are
testing
can
structure.
so
or
Estimates
a linear
routine
data,
so the same
can
be run
from
data,
and
partial
structure
be used
regression
with
routine
or frequency-domain
statistic
for
either
real
the
or complex
parameter
optimization,
computes
and information
oe.m
Estimates
- Computes
model
measured
input-output
output-error
senest.m
- Computes
and
from
data
using
This
definition
m-files
estimates
multi-dimensional
function
the
parameter
simplex
optimization
routine
r_colores.m
covariances
- Computes
of
the
regression
fdoe.m
that
can
estimated
parameters
estimates
the
problem,
of
associated
in
the
a recursive
version
of
using
sections
version
of data.
batch
This
of lesq.m.
using
tfest.m
finite
method
for
without
cost
using
bounds
for the
in a linear
fint.m
the
Estimates
same
technique
time
parameter.
Institute
of Aeronautics
and Astronautics
routine
in a transfer
compute
using
is the
frequency
high-accuracy
finite
frequencies.
in
function
as in
is used
function
in the
parameters
transfer
approach
relaxation
delay
to
from
data
This
equation-error
for arbitrary
system
parameters
of oe.m.
parameters
using
integrals
-
likelihood.
equivalent
- Estimates
and
model
frequency-domain
maximum
structure,
Fourier
Estimation
dynamic
input-output
4
American
as
Fourier
equation-error
Parameter
- Estimates
output-error
be
Bounds
Cram6r-Rao
and
to sequential
Domain
Ioest.m
Error
discrete
real-time
using
is the sequential
measured
uses
gradients.
Parameter
recursive
sequential
applied
equivalent
Estimated
results
- Computes
equation-error
model parameter
and covariance
matrix
estimates
for a linear
domain
Implements
colores.m,
same
regression
problem,
using
This routine
is the recursive
squares
model
-
of
the
- Computes
equation-error
model parameter
and covariance
matrix
estimates
for a linear
routine
differences.
simplex.m
the
series.
parameters
frequency-domain
sensitivity
version
and gives
Estimation
matrix,
formulation
parameters
likelihood.
general
dynamic
model
linear or nonlinear.
test
represent
matrix.
time-domain
maximum
flight
accurately
domain.
Frequency
model
faster
dynamic
slesq.m
estimates
Newton-Raphson
dynamic
repeated
lesq.m.
for time-domain
modified
as
likelihood
Corrected
parameter
standard
are consistent
with the scatter in
Vectorized
Computes
of a time
least squares
formulation.
Estimation
Computes
that
not white,
uncertainty.
rtpid.m
least
mnr.m
fact
maximum
from
Parameter
rlesq.m
estimates
parameters
data.
Parameter
much
frequency
formulation.
can be used
m_colores.m
colored,
therefore
parameter
covariance
Estimation
squares
and
(oe.m).
practical
or
determination.
model
estimates
which runs
colores.m.
the
output-error
maneuvers,
rft.m transform
model
autonomously
the
output-error
estimation
for
are usually
parameter
Real-Time
from
the
in
estimated
bounds.
generated
identify
equation-error
least
This
to
models
error
functions
the
in model
Parameter
Output-Error
interactive
Computes
Equation-Error
and
used
routine
hypothesis
basis
input
pfstat.m
using
multivariate
estimates
data
interactive
lesq.m
requires
the model
residuals
standard
from
parameter
accounts
both
residuals.
parameter
results
theoretical
formulation.
errors from colores.m
estimates
formulation,
for colored
corrected
likelihood
assumed
squares
parameter
routine
general
orthogonal
structure.
least
from
parameter
Multivariate
using
to identify
input-output
computes
models
data.
Identifies
measured
the
data
offit.m
multivariate
and computes
bounds.
from
The
the
general
Computes
correction
output-error
swr.m
regression
and accounting
tfest.m,
to estimate
model
low
order
structure,
except
that
the equivalent
Utilities
regcor.m
- Computes
correlations.
and displays
pairwise
regressor
abg.m- Implements
third-order
Adams-Bashforth
reggen.m
Generates
multivariate
polynomial
numerical
integration.
regressors.
adambg.m
- Versionof abg.musedin parameter
rms.m - Computes
root mean square of the elements
estimation
algorithms.
of a vector.
adamb3.c
- C mex-fileversion
of adambg.m
used
second-order
Runge-Kutta
for highspeedcomputation
in parameter
estimation rk2.m - Implements
numerical
integration.
algorithms.
buzz.m- Addswhitenoisetoatimeseries.
runk2.m
- Version
of rk2.m
used
in parameter
colnse.m
noise
- Adds
a selectable
and band-limited
noise
combination
to a time
estimation
of white
algorithms.
runk2.c
series.
C mex-file
parameter
comfun.m
polynomial
.m
int2.m
intg.m
the
value
of
rk4.m
- Applies
a dead band
to a time
one-dimensional
linear
interpolation.
-Does
two-dimensional
linear
interpolation.
three-dimensional
Ioadflat.m
- Reads
MATLAB
workspace.
massprop.m
of inertia
linear
a general
ASCII
aircraft
Implements
integration.
runk4.m
estimation
algorithms.
runk4.c
flat
file into
spl.m
the
mass
singular
value
milstd.m
robust
- Computes
prediction
handling
matrix
estimation
according
values
inversion
handling
to MIL-STD
parameters
Displays
denominator
into
canonical
form.
To
using
plotsurf.m
models.
plot3d.m
linear
a selected
1797A,
a real
ratelim.m
time
the
a transfer
a state
- Makes
functional
and
runk4.m
used
in
shift to a time
series.
- Plots
function
mesh
parameter
95 percent
- Makes
form
and
in
flight
longitudinal
Twin
numerator
model
plots
and
Otter
with
observer
and error
bars
intervals.
surface
plots
3-D
plots
using
data
arranged
Computes
- Implements
aircraft,
high-quality
according
Glenn.
To use SIDPAC
put
data
unit
for
sum of squares
metric.
to
capabilities
of
and modeling
routines
into
a specific
quantity.
rate limits.
American
Institute
maneuver
convention
used
effectively,
the first
format
This
that
was
is a simple
calculations,
called
fdata
column
step is to
some
in the
MATLAB
is a GUI in SIDPAC
is invoked
GUI
to
quickly
plot
any
to make
by simply
window
2.
prompt.
The
of the
is assigned
There
use
of
and assembling
of the array
in Figure
of the
matter
which
is shown
and Astronautics
is a
equipped
at NASA
GUI
of Aeronautics
Otter
instrumentation.
command
Twin
aircraft
the
resulting
this
The
Glenn
quantities
each
from
NASA
expect.
easier,
the
an array
where
1.
research
routine
workspace,
obtained
on
commuter
in a standard
conversions,
data
was
flown
test data
named
the
data
flight
flight
this process
predicted
and
analysis
see Figure
in an ASCII
SIDPAC
for polynomial
test
turboprop
available
the
- Makes
data
maneuver
twin-engine
for polynomial
estimates
confidence
3-D
use
test
demonstrated.
model.
space
3-D
the
flight
problem
is presented.
some
of the main
qualities
regression.
press, m -
of
parameter
functions.
demonstrate
The
representing
in
used
and boundaries.
for a polynomial
- Converts
plotpest.m
rk4.m
version
spline
- Applies
The
plotmesh.m
models.
Runge-Kutta
algorithms.
- Generates
SIDPAC,
longitudinal
qualities
model_disp.m
parameter
fourth-order
and moment
decomposition.
plots
in
Example
Computes
level
ocf.m
of
C mex-file
parameter
interpolation.
Version
data.
misvd.m
used
algorithms.
numerical
ulag.m
- Assembles
runk2.m
series.
-Does
-Does
estimation
of
ordinary
functions.
dband.m
intl
Computes
version
analyst
typing
The
can
workspace
variables,
convert
units,thenassign
theresultto the
appropriate
placeinthestandard
datamatrixfdata A
sidebenefit
ofthisprocedure
isthattheflighttestdata
isautomatically
checked
formissing
information
asthe
analyst
assigns
datatothechannels
inthestandard
data
matrixfdata In thisexample,
themeasurement
for
headinganglepsi was missing. However,this
measurement
is not neededfor longitudinal
data
analysis
andmodeling.
Forlarge-scale
flighttestdataanalysis,
thedata
reduction
andchannel
assignment
process
is typically
implemented
by creating
a script,sothatthe data
reduction
steps
canberepeated
automatically
foreach
maneuver.
A scriptis simplya textfile containing
commands
that could havebeenissuedat the
MATLAB
command
prompt.Thecommands
in the
scriptareexecuted
by typingthenameof thescript
file,omitting
thefileextension.
Scriptfilesmusthave
the.mfileextension.
required
problem-specific
MATLAB
command
GUI
is closed
using
the GUI.
or not),
then
Instrumentation
using output-error
selection
for the
by
simply
data
clicking
the
compatibility
and displayed
instrumentation
data
by
to
data.
the
corrections
implements
At
the
point,
Figures
button
in the
results
workspace.
the
from
Correct
Data
5 and
show
how
instrumentation
kinematic
related
the
found
a default
structure
estimation
rotational
corrections
estimated
outputs
this
be
can be removed
clicking
applied
applying
Errors
errors
the
current
the analysis
can
in the MATLAB
Figure
6 shows
instrumentation
the measured
with
Parameter
button.
estimated
the
the
parameters
Estimate
GUI.
are stored
measured
continue
error
in
(whether
parameter
estimation
and
instrumentation
error model
Estimated
the
commands
window
error
consistency
among
data
have
been
organized,
Theanalyst
clicksontheNextbuttontoproceed plotted, checked for data compatibility, and corrected
tothenextGUI,shown
inFigure
3,whichcanbeused using estimated instrumentation
errors.
The next steps
to cutthemaneuver
datalength.Thiscapability
is
vary
greatly
depending
on
the
goals
of
the
necessary
because
it iscommon
forthedatatoinclude investigation.
For this example,
a script was developed
morethanis necessary
fortheanalysis
anddynamic to implement and document the data analysis and
modeling.
Forexample,
theremaybelongstretches
of modeling process.
Figure
7 shows
a listing
of the
steady
trimwithnodatainformation
content,
orit may script. Space does not permit showing all of the results
bethatthepilotapplieda different
powersettingor
generated
from this script, but a short description
will
changed
theflightcondition
neartheendofthedata,
to be given here.
setupforthenextflighttestmaneuver.
Inthelatter
commands
in the script
plot the
case,the assumptions
for the modelingmay be measuredThe initial
data
and
compute
non-dimensional
violated,
sothispartofthedatamustberemoved.
The
aerodynamic
coefficients.
Next, body-axis
Z force and
CutManeuver
buttonallows
theanalyst
todefinethe pitching
moment
coefficients
are modeled
in an
beginning
andendof themaneuver
usinggraphical
equation-error
formulation
using
least
squares
(mouse)
ornumerical
(keyboard)
input.
regression
and
stepwise
regression.
Corrected
Clickingthe Next buttonagain,the analyst parameter error bounds are computed and displayed,
arrivesatthedatacompatibility
analysis
GUI,where along with the parameter estimates and confidence
the kinematic
consistency
of the measured
output intervals.
Modeling
is then
carried
out
in the
quantitiesis checked. Figure4 showsdata frequency domain, using a transfer function model and
compatibility
plotsofthemeasured
airspeed,
angleof
equation-error
parameter
estimation.
Following
this,
attack,andsideslip
angle,compared
to reconstructedoutput-error parameter estimation in the time domain is
valuesobtainedfrom integratingthe kinematic used with a dynamic model file implementing
the full
equations
usingtranslational
accelerations
andangular nonlinear
equations
of
motion
and
a
linear
ratemeasurements
asinputs.Theanalogous
check
on aerodynamic
model
to
estimate
non-dimensional
theEuleranglemeasurements,
usingthe rotational stability and control derivatives.
A prediction
case is
kinematic
equations
withangularratemeasurementincluded to demonstrate the validity of the identified
inputstoreconstruct
theEulerangles,
is shownwhen models and show the linear and nonlinear simulation
theanalyst
selects
therotational
optionfromthepull- capabilities.
Plots
of the results
appear
in the
downmenu
attheupper
rightoftheGUI,seeFigure
5.
MATLAB
figure
window
and various
displays
of
SIDPAC
possible
adversely
software
to enter
affecting
or exit
results.
was
any
designed
GUI
The
so
that
at any time
analyst
it
results
is
without
can issue
Figure
any
in the MATLAB
appear
comparison
shows
6
American
Institute
of Aeronautics
one
of the measured
and Astronautics
command
of
the
plots,
non-dimensional
window.
which
is
pitching
moment
coefficient
withtheidentified
equation-error
model.Table1 contains
parameter
estimation
results
forthiscase.
References
Data
Theentiredemonstration
scriptin Figure7 is
availablein TDPACas totterdemo.m. The
demonstration
canbe executed
by simplytyping
totter_demo
attheMATLAB
command
prompt.
Analysis
Bendat,
J.S.
and
Analysis
and
Measurement
John
Wiley
Gainer,
Concluding
T.G.
Used
A collection
IDentification
Programs
described
and
analysis
of computer
and
developed
programs
Center
in the course
system
identification.
STDPAC
at
of solving
wide
in
MATLAB
range
has
many
easy
to
for
linear
built-in
analysis,
debugging,
and
MATLAB
STDPAC
an
learn
plotting,
use
of
These
excellent
theory
methods
and
for
the
Identification
Practice,
and practical
Data
Applied
to
by V. Klein
software
is
a product
of
by request
to the
completing
Requests
NASA
free
author,
NASA
contingent
software
should
completely
on
the
usage
and
Morelli,
E. A.,
include
telephone
the requestor,
the
along
intended
use
record-keeping
within
computing
with
a user
to aircraft
system
single,
V.,
highly
to
and
apply
NASA
description
of
Morelli,
and
1995,
problems,
easy-to-use
environment.
of
using
Atmospheric
Orleans,
H.
Applied
J.G.,
Flight
Louisiana,
Regression
& Sons,
New
York,
and
Murphy,
P.C.
Model
Structure
from
Modified
Stepwise
Regression,"
1981.
"Global
E.A.,
Modeling
with
Nonlinear
Vol.
paper
"Global
Application
WP04-2,
Conference,
1998.
7
of Aeronautics
for Aircraft
Estimation,"
New
Airplane
Multivariate
of Aircraft,
Control
Institute
Design
89059,
Aerodynamic
Orthogonal
32,
No.
Functions,"
2, March-April
pp. 270-77.
ACC
American
4,
using
TM
Error
John Wiley
October
E.A.,
Morelli,
June
NASA
AIAA
Batterson,
TP-1916,
Modeling
state-of-the-art
identification
capable,
No.
of Bias
Responses
Input
Smith,
Data by using
of
transfer
"Estimation
Method,"
2nd Edition,
Journal
allows
32,
1981.
affiliation
for technology
Fourier
Vol.
Determination
N.R.
Flight
D.R.
91-2850,
Structure
NY,
to:
address,
a one-sentence
Characteristics
Optimal
Airplane
"Optimal
"Determination
mailing
Publications,
1991.
Draper,
agreement.
and company
of SIDPAC,
Morgan,
Conference,
Analysis,
purposes.
SIDPAC
technology
name,
number,
using
Systematic
paper
Klein,
Please
Dover
of
R-179,
pp. 689-695.
Likelihood
1987.
Model
citizens
e.a.morelli@larc.nasa.gov
address,
TR
of Aircraft,
Measured
January
August
requestor
be e-mailed
Analysis
Analysis
and
in
Mechanics
Research
to U.S.
and
NASA
Noise
Data
1995,
V.
AIAA
System
Langley
Test
Instrumentation
The SIDPAC
of charge
Data
1972.
1988.
Journal
Maximum
for
Theory
Morelli.
Wind-Turmel
Analysis,
NY,
Compatibility
Errors
make
entitled
Aircraft
and E.A.
and is available
are
of
of Motion
SP-3070,
"Estimating
Flight
Klein,
precision
considerations
text
Ed.,
data
implementing
in STDPAC
forthcoming
"Summary
Weights,"
Applied
York,
July-August
and
characteristics
choice
implemented
in
C.
Smoothing,"
algebra,
double
S.
"Determination
E.A.
from
algorithms.
described
Center,
the
default.
Relevant
the
functions
and
Smoothing
1963.
Morelli,
advantages,
platform-independence,
by
R.J.,
Lanczos,
system
MATLAB
many
arithmetic
was
of
common
program,
visualization,
Graham,
1986.
and Equations
NASA
Data
2nd
NY,
Hoffman,
Free-Flight
Analysis,"
Numerical
December
in aircraft
including
data
data
Research
real problems
York,
Equations
in
Random
Procedures,
New
and
Reduction
Inc., New
problems
environment.
Langley
A.G.
was
test
STDPAC
NASA
addresses
identification
flight
problem.
tested
S_S_S__stem
or SIDPAC,
on a real
modeling
and
called
for AirCraft,
demonstrated
& Sons,
Transformation
Remarks
Piersol,
and Astronautics
Nonlinear
to F-16
Paper
Parametric
Aerodynamics,"
ID i-98010-2,
Philadelphia,
American
Pennsylvania,
Morelli,
E.A.
Modeling
and DeLoach,
using
AIAA
paper
Sciences
39 'h AIAA
and
Exhibit,
Morelli,
Surface
Functions,"
Aerospace
Reno,
NASA
Error
Maine,
R.E.
Iliff,
Practice
of
and
Flight-Determined
"The
Theory
Accuracy
Coefficients,"
E.A.
and
Aerodynamic
of
NASA
and
Test
V.
and
Journal
Vol.
RP
Alto,
1077,
No.
from
August
E.A.
Finite
Fourier
NASA
TM
1, January-February
Morelli,
from
Sciences,
Klein,
July
Prog.
the
Aerospace
"Parameter
Aircraft
Symposium
Parameter
Aerodynamic
pp. 1-77.
E. A.,
Augmented
IFAC/IFORS
System
Aircraft
Data,"
1989,
V. and Morelli,
of a Highly
9th
of
Flight
Vol. 26,
from
on
Estimation,
R.E.
Parameter
Control
1168,
Iliff,
Estimation
June
110340,
Method
May
Jr.
to
"Application
Aircraft
of
Stability
Approach",
and
using
Iliff,
and
NASA
K.W.
Modified
Program,"
and
Klein,
Accuracy
of
Maximum
Estimates
with
Colored
Low
Order
Military
for
Design,
Data
CR
"Systems
MIL-STD-1797A,
Morelli,
E.A.,
Atmospheric
Colorado,
"Low
Aircraft,"
Flight
August
Journal
Vol.
Estimation
of
in
Guidance,
Hunter,
W.G.,
and
Hunter,
An
Analysis,
and
Inc., New
York,
J.S.,
Introduction
Model
to
Building,
NY,
John
1978.
E.A.,
"Determining
Likelihood
the
191462,
May
Qualities
Order
E.A.,
paper
Mechanics
of
Equivalent
AIAA
Piloted
System
with
Test
of Optimal
Conventional
Inputs,"
36, No.
M.R.
2, March-April
Conference,
"Synthesis
and
Binary
Inputs
and
Journal
1999,
1970,
of
of
pp. 389-
Low-Peak-Factor
Sequences
IEEE
January
J.N.,
"Flight
Test
Flight
with
Transactions
Low
on Information
pp. 85-89.
Testing,"
A/AA
Ham,
Manual,
Edwards
93-14,
September
J.A.,
and
Rotorcraft
U.S.
Center,
Software
Supersonic
2000-3902,
Army
AFB,
Tischler,
Aviation
CA,
M.B.,
Frequency
Domain
Technical
AQTD
Test
Project
No.
1995.
Implementation
Using
MATLAB
Natick,
MA,
Press,
W.H.,
, Version
6, The
MathWorks,
Inc.,
2000.
Denver,
2000.
Vetterling,
Scientific
Cambridge
Flarmery,
W.T.
Institute
of Aeronautics
B.P.,
Numerical
Computing
University
8
American
for
NASA
1993.
"Flight
Vol.
Theory,
1990.
Tu- 144LL
Optimization
Experiments,"
CR
Identification
the
Input
Estimation
Autocorrelation,"
Parameter
NASA
January
"Practical
Parameter
TN D-6734,
Residuals,"
Flying
Aircraft,
Transport
Parameter
Domain,"
Experimenters
& Sons,
Aircraft,
397.
Newton-Raphson
NASA
V.
System
for
1998.
August
pp. 812-818.
G.E.P.,
Statistics
Williams,
Standard
Identification
Flight
MA,
RP
1994.
Equivalent
Identification,"
Atmospheric
Design
Schroeder,
March
System
AIAA
"Real-Time
and Dynamics,
Signals
194893,
the
Data,"
1997.
Boston,
2000,
Aircraft
1972.
E.A.
of
Sampled
Estimation
October
Morelli,
- A Fortran
Morelli,
June
Control,
Box,
and
Hungary,
1986.
Identification
Palo
Evaluation
using
"In-Flight
E.A.,
Experiment
Data,"
Identification
Budapest,
K.W.,
Output-Error
L.W.,
A/AA
Conference,
Accuracy
98-4261,
Comparison
Taylor,
in
78-1344,
Estimation
and
- The
Mechanics
Conference,
Morelli,
Maine,
Estimation
paper
Transform
Frequency
Wiley
Parameter
Domain
Estimation
Flight
1991.
Output-Error
Data,"
Estimation
"Estimation
Parameters
2000.
Order
Test
1978.
E.A.
Morelli,
V.,
August
Parameter
"High
paper
Mechanics
Klein,
Low
Flight
AIAA
Parameter
AIAA
Parameter
"Aircraft
Flight
CA,
Real-Time
Control
pp. 74-80.
Equation-Error
of
from
in the Frequency
Domain,"
Morelli,
of
Estimated
of Guidance,
20,
V.
Atmospheric
Dynamic
"Accuracy
Parameters
Data,"
Dynamics,
1997,
Klein,
Model
Estimation
Frequency
1981.
Flight
TM-2000-210117,
Klein,
K.W.,
the
Models
Nevada,
Bounds
Estimating
"Identification
System
Parameter
Parameter
Morelli,
E.A.
Equivalent
2001.
Estimated
July
"Response
Orthogonal
2001-0168,
Meeting
January
R.,
Multivariate
and Astronautics
Teukolsky,
Recipes
S.A.,
The
(FORTRAN
Press,
Cambridge,
and
Art
Version),
UK,
1989.
of
Modeling
Results
Estimate
Std. Error
-1.476
0.022
Cmq
-36.35
0.69
Cm_e (rad-1)
-1.869
0.020
Cmo
0.0023
0.0001
Cm_
(rad-1)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::_;_;_2.
Fibre2
GUI
9
American
Institute of Aeronautics
and Astronautics
ii__iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_ii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Fibre3
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_ii___iiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiii!!iii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
...........................................................
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
_
__i_i_
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Fi__mre4 TDPAC Translational Data Compatibility GUI
10
American Institute of Aeronautics and Astronautics
ii
ii!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!i!iii!iiiiiiiiiiiiiiiiiiiiiiiii_
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_ii___iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
',',i',i',i',i',i',i',i',i',i',i',i',i',i',i',i',i',_g,i',i',i',i',i_i',i_
......i......i"-,-_--ff ......i.....:_"--'i.....4:....._' q__i__i__i__i__i__i__i__i__i__i__i__i__
-?-.....i ......i......t-)-'-:'_-i_:-i .....
......................
i i i---I
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iii
iiiiiiiiiiiii
iiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiii
:::::_ : ::
:::::::
i:::::::::::::
:::::iiiiiiiiiiiii iiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiii_iii
iiiiiiii_iiiiiiiii!iii!i!iii!iii!i!iii!iiiii!iii!iiiii!iii!i!iii!iiiii!iii!iiiii!iii!i!i!i!_iiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiii/
................
!...............
i...............
!................
!...............
i...............
!................
!...............
i..............
!................
|iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
ii_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_i_6_i_i_
...... "....... i ...... "....... "...... [...... i....... "....... _....... ".....
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiiii_iii
:
:
iiiiiiiiiiiiiiiiiiiiiii==i==i==i==i==i==i==i==i==i==i==i==i==i==i==i
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iii_6iii_iii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Fi_._re 5 TDPAC Rotational
iiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiii_iiiiiiiiliiiiiiiiiiiiiiiiiiiiiiiiiiiii
Data Compatibility
ii
GUI
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiiiiiiiiiiiiiiii_ii
iiiiiiiiiiiiiiiiiiiiiiii_
_i..............................
i..............................
i..............................
i...............................
i:::::::_:_:?:::i ...............................
i..........................
::i..............................
i......................
:::::iiiiiii_l_
__
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
',
',
?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:::?::
L ......
_ ......
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
i:i:i:i:i:i:i:i:i:i:i:i:i:i:i:i:i:
_i:i:i:i:i@i:i
......
...............................................................
r
"___;_:'
',
'
',
J ......
_f-" ......
.......
_.;._,.-,:-_-"_
"_g':'.'L ....
L ......
',"-;
',"......
.....
',
'h
',
[ _ _ _ _ _-_,...
',"---
',
....
;---"
Im
Flight
J .....
1 .......
Model
',"L; ....
.___',
'.
|::?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?:?::
.,_: _'_-_
____________________________________________________________________________________________________iiiiiiiiiiiiiii:_
ii1811 1 i:i ii iii ii ii iii ii i:: :::: :::: : ::
............................
_- :::::gi:,_i .............................................
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iii
iiiiiiiiiiiii iiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiii_iii
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
_
_
_
_
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
.................................................................................................................................................................................................................................................................................................
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii',_',_',iii',_',_',iii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiNiiiiii_iii_iii_iiiiiiiiiiiiiiiiiiiiii
SIDPAC
Rotational
Data Compatibility
American
Institute of Aeronautics
and Astronautics
iiiiiiiiiiiiiiiiiiii
Corrections
Applied
%
% script totter_demo.m
%
% Usage: totter_demo;
%
% Description:
%
%
Demonstrates
flight data analysis and modeling
%
using SIDPAC for a longitudinal
flight test maneuver
%
on the NASA Glenn Twin Otter aircraft.
%
% Input:
%
%
None
%
% Output:
%
%
data file
%
2-D plots
%
%
%
%
%
%
%
%
%
%
%
%
Calls:
compfc.m
compmc.m
xsmep.m
lesq.m
r_colores.m
model_disp.m
swr. m
zep.m
tfest.m
%
nldyn_psel.m
%
oe.m
%
nldyn.m
%
m_colores.m
%
plotpest.m
%
tfsim.m
%
%
Author:
Eugene A. Morelli
%
%
History:
%
11 Jul 2002 - Created and debugged,
%
% Copyright
(C) 2002 Eugene A. Morelli
%
EAM.
or suggestions
for improvements
to:
e.a.morelli@larc.nasa.gov
%
% Load the data file.
%
load 'totter
Ion 020213f1_018.mat'
%
% Set up the figure window.
%
FgH=figure('Units','normalized','Position',[.506.231
'Name','SIDPAC
Demonstration','N
%
.504.715],...
umberTitle','off,'Toolbar','none');
Twin
Otter
Data
Analysis
and
Modeling
Script
12
American
Institute
of Aeronautics
and
Astronautics
(continued)
subplot(4,1,2),
plot(t,fdata(:,4),'LineWidth',2),
grid on, ylabel('alpha
(deg)'),
subplot(4,1,3),
plot(t,fdata(:,6),'LineWidth',2),
grid on, ylabel('q
(deg/sec)'),
subplot(4,1,4),
plot(t,fdata(:,13),'LineWidth',2),
grid on, ylabel('az
(g)'), xlabel('Time
(sec)'),
fprintf('\n\n
The figure shows the measured
input and outputs.')
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Calculate
%
aerodynamic
coefficients.
fprintf('\n\n
Calculate the non-dimensional
')
fprintf('\n aerodynamic
force and moment ')
fprintf('\n coefficients
using compfc.m
and compmc.m:')
fprintf('\n\n
[CX,CY,CZ,CD,CYw,CL]=compfc(fdata);')
fprintf('\n\n
[CI,Cm,Cn]=compmc(fdata);')
[CX,CY,CZ,CD,CYw,CL]=compfc(fdata);
[CI,Cm,Cn,pv,qv,rv]=compmc(fdata);
subplot(2,1,1),plot(t,CZ,'LineWidth',2),grid
on,ylabel('Z
Force Coefficient'),
title('Non-Dimensional
Coefficients
from Flight Test Data','FontWeight','bold'),
subplot(2,1,2),plot(t,Cm,'LineWidth',2),grid
on,ylabel('Pitching
Moment Coefficient'),xlabel('Time
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Assemble the regressor matrix.
%
fprintf('\n\n
Assemble
the matrix of regressors
')
fprintf('_n for equation-error
parameter
estimation:
fprintf('\n\n
alpha (rad)'),
fprintf('\n qhat '),
fprintf('\n elevator
(rad)'),
X=[fdata(:,4)*pi/180,fdata(:,72),fdata(:,14)*pi/180];
%
(sec)'),
')
Twin
Otter
off,
off,
off,
Data
Analysis
and
Modeling
Script
13
American
Institute
of Aeronautics
and
Astronautics
(continued)
X=[X,ones(size(X,1),l)];
fprintf('\n\n
Press any key to continue
%
... '),pause,
only parameters
1);
for selected
regressors.
pm=pm(pindxm);
%
% Plot the results.
%
subplot(2,1,1),plot(t,Cm,t,ym,'r:','LineWidth',l
.5),grid on,
title('Pitching
Moment Coefficient','FontWeight','bold'),
ylabel('Cm'),legend('Flight
data','Equation-Error
model')
subplot(2,1,2),plot(t,Cm-ym,'LineWidth',l
.5),grid on,
ylabel('Residuar),xlabel('Time
(sec)'),
%
% Compute and display the error bounds.
%
fprintf('\n\n
Compute the estimated parameter
')
fprintf('\n error bounds using r_colores.m:
')
fprintf('\n\n
[crbm,crbom]=r_colores(X,Cm);
')
[crbm,crbom]=r_colores(Xm,Cm);
serrom=sqrt(diag
(crbom));
serrm=sqrt(diag(crbm));
perrm=100*serrm./abs(pm);
Fibre
Twin
Otter
Data
Analysis
and
Modeling
Script
14
American
Institute
of Aeronautics
and
Astronautics
(continued)
fprintf('\n\n
Display the parameter
estimation
')
fprintf('\n results using model_disp.m:')
model_disp(pm,serrm,[1,10,100,0],Xlab);
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Estimate the transfer function model q/de.
%
fprintf('\n\n
Estimate the transfer function ')
fprintf('\n for pitch rate to elevator deflection
')
fprintf('\n (q/de), using tfest.m:')
fprintf('\n\n
[ytf, num,den,ptf,crbtf,s2tf,zr,xr,f]
= tfest(u,z,t,1,2,w);')
fprintf('\n\n
The frequency
vector is w = 2"pi*[0.3:.01:1.3]".')
w=2*pi*[0.3:.01:1.3]';
%
% Detrend
%
domain
analysis.
u=zep(fdata(:,14));
z=zep(fdata(:,6));
subplot(2,1,1),plot(t,u,'LineWidth',2),grid
on,
title('Transfer
Function Modeling
Data','FontWeight','bold'),
ylabel('Elevator
(deg)'),
subplot(2,1,2),plot(t,z,'LineWidth',2),grid
on,
ylabel('Pitch
Rate (deg/sec)'),xlabel('Time
(sec)'),
fprintf('\n\n
Press any key to continue ... '),pause,
[ytf,num,den,ptf,crbtf,s2tf,zr,xr,f]
= tfest(u,z,t,1,2,w);
subplot(2,1,1),plot(f,abs(zr),f,abs(xr*ptf),'r:','LineWidth',l
.5),grid on,
title('Frequency
Domain Transfer
Function Modeling','FontWeight','bold'),
ylabel('Magnitude'),legend('Flight
data','Transfer
function model')
subplot(2,1,2),plot(f,
unwrap(angle(zr)),f,unwrap(angle(xr*ptf)),'r:','LineWidth',l
.5),grid
ylabel('Phase'),xlabel('Frequency
(Hz)'),
fprintf('\n'),tf(num,den),
fprintf('\n\n
The figure shows the frequency
domain fit. ')
fprintf('\n\n
Identified modes from the transfer function ')
fprintf('\n identification
in the frequency
domain are: \n')
damp(den),
fprintf('\n\n
Press any key to continue ... '),pause,
subplot(2,1,1),plot(t,z,t,ytf,'r:','LineWidth',l
.5),grid on,
title('Equation-Error
Frequency
Domain Transfer Function Modeling','FontWeight','bold'),
ylabel('Pitch
Rate (deg/sec)'),legend('Flight
data','Transfer
function model')
subplot(2,1,2),plot(t,z-ytf,'LineWidth',2),grid
on,
ylabel('Residuar),xlabel('Time
(sec)'),
fprintf('\n\n
The figure now shows the time domain fit. ')
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Estimate the dimensional
stability and control derivatives
% using time-domain
output-error
parameter
estimation.
%
fprintf('\n\n\n
Now estimate the non-dimensional
stability ')
fprintf('\n and control derivatives
using output-error
')
fprintf('\n parameter estimation
in the time domain.')
fprintf('\n\n
Input:
elevator (rad)')
fprintf('\n Outputs: alpha (rad), q (rad/sec),
az (g)')
dtr=pi/180;
u=fdata(:,[14:16])*dtr;
z=[fdata(:,[4,6])*dtr,fdata(:,
13)];
%
% Plot the measured
%
inputs
on,
and outputs.
subplot(4,1,1),
plot(t,u(:,l),'LineWidth',2),
title('Output-Error
Time Domain Modeling','FontWeight','bold'),
grid on, ylabel('elevator
(rad)'),
subplot(4,1,2),
plot(t,z(:,l),'LineWidth',2),
grid on, ylabel('alpha
(rad)'),
subplot(4,1,3),
plot(t,z(:,2),'LineWidth',2),
grid on, ylabel('q
(rad/sec)'),
subplot(4,1,4),
plot(t,z(:,3),'LineWidth',2),
grid on, ylabel('az
(g)'), xlabel('Time
(sec)'),
fprintf('\n\n
The figure shows the measured
input and outputs.')
Fibre
Twin
Otter
Data
Analysis
and
Modeling
Script
15
American
Institute
of Aeronautics
and
Astronautics
(continued)
%
% Set up for the output-error
parameter
estimation
% nldyn.m to define the dynamic model.
%
nldyn_psel;
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Find initial parameter values for the
% output-error
parameter
estimation.
%
fprintf('\n\n
Initial values of the parameters
in ')
fprintf('\n vector p0 are obtained from the ')
fprintf('\n equation-error
solution:\n')
%
using
')
clf, title('Output-Error
Parameter
Estimation','FontWeight','bold'),
subplot(3,1,1),plot(t,z(:,l),t,y(:,l),'r:','LineWidth',2),grid
on,ylabel('alpha
(rad)'),
legend('Flight
data','Output-Error
model',0),
subplot(3,1,2),plot(t,z(:,2),t,y(:,2),'r:','LineWidth',2),grid
on,ylabel('q
(rad/sec)'),
subplot(3,1,3),plot(t,z(:,3),t,y(:,3),'r:','LineWidth',2),grid
on,ylabel('az
(g)'),xlabel('Time
fprintf('\n The plots show the measured
output data ')
fprintf('\n and the identified model fit. ')
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Examine the residuals.
%
clf, subplot(3,1,1),plot(t,z(:,l)-y(:,l),'LineWidth',2),grid
title('Residuals','FontSize',
12,'FontWeight','bold'),
subplot(3,1,2),plot(t,z(:,2)-y(:,2),'LineWidth',2),grid
subplot(3,1,3),plot(t,z(:,3)-y(:,3),'LineWidth',2),grid
%
on;ylabel('alpha
on;ylabel('q
on;ylabel('az
residuals
(sec)'),
(rad)'),
residuals (rad/sec)'),
residuals (g)'),xlabel('Time
(sec)'),
Twin
Otter
Data
Analysis
and
Modeling
Script
16
American
Institute
of Aeronautics
and
Astronautics
(continued)
fprintf('\n\n
Press any key to continue ... '),pause,
save 'totter_results.mat'
num den p serr p0 serrO pZ serrZ
%
% Check the prediction capability.
%
load 'totter
Ion 020213f1_017.mat'
fprintf('\n_n Now check the prediction capability
fprintf('\n using data from a different maneuver
fprintf('\n and the identified transfer function ')
fprintf('\n model from before:')
fprintf('\n'),tf(num,den),
u=fdata(:,14);
u=zep(u);
z=fdata(:,6);
z=zep(z);
ytfp=tfsim(num,den,0,u,t);
%
% Plot the transfer function prediction
results.
%
pm serrm
')
')
subplot(2,1,1),plot(t,z,t,ytfp,'r:','LineWidth',2),grid
on,
title('Transfer
Function Prediction','FontWeight','bold'),
ylabel('Pitch
Rate (deg/sec)'),legend('Flight
data','Transfer
function
subplot(2,1,2),plot(t,z-ytfp,'LineWidth',2),grid
on,
ylabel('Residuar),xlabel('Time
(sec)'),
fprintf('\n\n
The figure shows the time domain prediction ')
fprintf('\n using the transfer function model identified ')
fprintf('\n using data from a different maneuver.
')
fprintf('\n\n
Press any key to continue ... '),pause,
u=fdata(:,[14:16])*dtr;
z=[fdata(:,[4,6])*dtr,fdata(:,
13)];
nldyn_psel;
yp=nldyn(p,u,t,x0,cc);
%
% Plot the measured
inputs and outputs.
%
subplot(4,1,1),
plot(t,u(:,l),'LineWidth',2),
title('Twin Otter Flight Test Data','FontWeight','bold'),
grid on, ylabel('elevator
(rad)'),
subplot(4,1,2),
plot(t,z(:,l),'LineWidth',2),
grid on, ylabel('alpha
(rad)'),
subplot(4,1,3),
plot(t,z(:,2),'LineWidth',2),
grid on, ylabel('q
(rad/sec)'),
subplot(4,1,4),
plot(t,z(:,3),'LineWidth',2),
grid on, ylabel('az
(g)'), xlabel('Time
(sec)'),
fprintf('\n\n\n
The figure shows the measured
input and outputs
fprintf('\n for the prediction maneuver.
')
fprintf('\n\n
Press any key to continue ... '),pause,
%
% Plot the output-error
%
prediction
prediction',4)
')
results.
title('Output-Error
Prediction','FontWeig
ht','bold'),
%
% Correct for measurement
biases.
%
bias=ones(length(t),l)\(z-yp);
yp=yp+ones(length(t),l)*bias;
subplot(3,1,1),plot(t,z(:,l)/dtr,t,yp(:,l)/dtr,'r:','LineWidth',2),grid
legend('Flight
data','Output-Error
prediction',4),
title('Output-Error
Model Prediction','FontWeight','bold'),
subplot(3,1,2),plot(t,z(:,2)/dtr,t,yp(:,2)/dtr,'r:','LineWidth',2),grid
subplot(3,1,3),plot(t,z(:,3),t,yp(:,3),'r:','LineWidth',2),grid
fprintf('\n The plots show the measured
output data ')
fprintf('\n and the prediction
using the output-error
')
fprintf('\n model identified using data from a different ')
fprintf('\n maneuver.
')
fprintf('\n\n\nEnd
of demonstration
\n\n')
return
Fi_._ure
cc dtr;
Twin
Otter
Data
on,ylabel('alpha
(rad)'),
on,ylabel('q
(rad/sec)'),
on,ylabel('az
(g)'),xlabel('Time
Analysis
and
Modeling
(sec)'),
Script
17
American
Institute
of Aeronautics
and
Astronautics
(complete)
i_ii
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
iiii
i_iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
i_iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii_iiiiiiii_i_iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Fibre
8 Twin
Otter
Pitching
Moment
Coefficient
Modeling
18
American
Institute
of Aeronautics
and Astronautics