The F-16 Model just got better. The original
F-16 model was a low fidelity model described in the book,
Control and Simulation", by Brian L. Stevens and Frank L. Lewis.
The non-linear F-16 model can now be used in its high fidelity mode as
well as its old mode, the low fidelity mode.
The high fidelity mode has a larger aerodynamic data range and implements the leading edge flap. Force and moment coefficients can be found at angle of attacks from -20 to 90 degrees and side-slip angles of -30 to 30 degrees. The leading edge flap is a control surface that allows the F-16 to fly at larger angle of attacks by reducing the tendency to stall. The aerodynamic tables and leading edge flap are described in a 1979 NASA Technical Report (#1538) entitled, Simulator Study of Stall / Post Stall Characteristics of Fighter Airplane with Relaxed Longitudinal Stability.
The non-linear F-16 model now comes packaged with an easy to use Simulink diagram and Matlab software that will allow you to run Simulations and linearize the models so that controller design theory can be applied.
The Simulink diagram:
To begin using the model:
1) Download the manual.
2) Download the F-16 Model, F16Simulation.tar.gz and follow the instructions found in the manual.
For the impatient:
3) Unpackage F16Simulation.tar.gz by typing, the following at the command line, in Linux:
>> tar xvfz F16Simulation.tar.gz
4) This will create the directory, /F16Sim.
5) Change into the directory that was created, /F16Sim.
6) Open Matlab, and at Matlab's command-line type:
>> mex nlplant.c
7) Type runF16Sim to run the non-linear F-16 simulation.
Type runLINF16sim to run the linearized F-16 simulation.
- The non-linear F-16 model comes complete with a manual. The
F-16 Manual comes with complete instructions on how to install and use
the simulation. The manual gives descriptions and instructions
for all of the Matlab programs and files included with the simulation.
Some of the important files included with the non-linear F-16 Package:
nlplant.c - C-script file that contains both the low and high fidelity F-16 model.
This C-file, the core of the F-16 simulation, contains
all of the equations that govern the dynamics of the F-16 (ie., the equations
of motion, navigation equations, etc).
runF16Sim.m - Performs a simulation of the F-16 beginning at a trimmed altitude and velocity.
This file contains a program that will used F-16 plant in a non-linear simulation. The user can input disturbances on any of the control surfaces. The program runs the simulation using the Simulink model block named F16Block.mdl. When executed the program will prompt the user which model to run. It will then ask the user at what conditions (altitude and velocity) the F-16 should be trimmed. The user also has the option to create disturbances on the any of the control surfaces. The simulation will be carried out and the results will be plotted and saved to a text file.
runLINF16sim.m - Used to linearize the F-16 model and performs a simulation beginning at a trimmed altitude and velocity.
When executed runLINF16sim.m will linearize the high fidelity and low fidelity models using the Simulink model, LIN_F16Block.mdl. Then in a similar fashion as runF16sim it will then prompt the user to enter the trim conditions (altitude and velocity) for the F-16 simulation. The user can create disturbances on the any of the control surfaces. To see the trimmed behavior of the answer no ('n') otherwise enter a deflection, in degrees, at the appropriate prompt for each control surface. The simulation will be carried out for the linear model and the results will be saved to a text file. The function will look for any files that have been created at this flight condition and plot all of the available results, both linear and nonlinear, on a single plot
FindF16Dynamics.m - Using the linearized F-16 model to give the longitudinal and lateral LTI state space matrices.
When executed FindF16Dynamics.m will linearize the
both the high fidelity and low fidelity models, creating a linear time-invariant
(LTI) model for the entire F-16. It will then break up the LTI model
into the longitudinal and lateral directional modes. It will then
find the poles and corresponding damping ratio and natural frequency for
each mode, create pole zero map, and create a bode plot of each of the
states with respect to a given control surface and thrust.
Receding Horizon Control API
A receding horison control (RHC) API is being developed. It will allow
seamless integration of RHC algorithms into the OCP.
Linear Matrix Inequalities
Linear matrix inequalities (LMIs) are used extensively in the synthesis and analysis of controllers for the SEC program. To efficiently solve these equations, semi-definite programming software (SDP) solvers, e.g. the LMI Matlab Toolbox (LMILab), are used. Development of fast, efficient and accurate SDP solvers is an active research area in the applied math, optimization and the operations research community. Many freely available, public domain SDP solvers exist and most take advantage of sparsity in the LMI constraints, offering perhaps significant decreases in computation time required to solve SEC control problems. Each offer different algorithms to solve the LMI optimization. A Matlab based translation code has been developed to translate LMI problems formulated in LMILab to other freely available SDP solvers. This allows LMI problems formulated within LMILab to be solve the optimization problem with six freely available SDP solvers. The software can be downloaded from Pete Seiler's website at UC Berkeley. (LMILab Translator)