Title: Autofilter: automatic code generation for mathematical state estimation
1Autofilter automatic code generation for
mathematical state estimation
- Jon Whittle
- NASA Ames Research Center
2Motivation
- Lack of reuse between missions
- Inadequate documentation
- Inability to respond to unforeseen events
- High cost in cycle from model to implementation
3Code Generation now future
stub code
is it what I want?
simulink model
model specific optimization
domain knowledge
gain pminus mtrans(h) minv(h pminus
mtrans(h) r) xhat1 xhatmin gain (zhat
- zpred)
explicit assumptions
Autofilter model
certified code
synthesize code
multiple programs
4Autofilter
Generic algorithms
Symbolic solvers
Knowledge base
program synthesis
Transformation system
- Enables rapid reuse
- Model to code generation
- Reduces testing
- Can help with flight certification
pseudo code
C/Matlab code
C code
5Autofilter Spec Language
Process noise variables
State variables
Filter architecture
Process model
Sensor specs
variable
Measurement model
- units
- frames
- coordinate systems
Measurement variables
Measurement noise variables
- distributions
6Smart Systems Spacecraft Simulator
Ed Wilson 3/23/01
7Kalman Filter Design I
8Kalman Filter Design II
9Kalman Filter Synthesis
filter architecture
linearized kalman filter (with nominal trajectory)
extended kalman filter (no nominal trajectory)
basic kalman filter
information filter
fundamental solution matrix
linearize over time (continuous ? discrete)
compute estimate
propagate estimate
approximate matrix exponential
linearize over state space
interpolate estimate
Taylor series expansion
linearity check
UD-factorization
Laplace transform
jacobians
numerical integration
differentiate
10DS1 Attitude Estimation
gyros
quaternion
quaternion
startracker
quaternion
Initialization/Parameter Updates
- Estimator Software
- Interface software
- State machine
- Algorithm
Inputs (sensors)
Outputs (Guidance/ Controller)
Mode
Telemetry/ Debug data
Event Reporting/ Fault Monitoring
11Test procedures
- A Set of DS-1 Spacecraft commands were generated
to maneuver the S/C into RCS mode. - While in RCS mode some eight different turns were
performed. - Modified the downlink telemetry filter to display
and log the estimated attitude and rate data. - Attitude and rate data have been gathered from
the log file and been plotted on Matlab. - The above procedures were performed on the
original DS-1 code and the Autofilter generated
KF code.
12Test Comparison