4.0

4.0 | 2 ratings Rate this file 52 Downloads (last 30 days) File Size: 765.4 KB File ID: #22898
image thumbnail

F-16 Flight Control Simulation

by Lars Sonneveldt

 

05 Feb 2009 (Updated 01 Mar 2010)

F-16 airframe including control system in Simulink connected with FlightGear

| Watch this File

File Information
Description

Running the model requires:
1. a joystick
2. the FlightGear simulator (can be downloaded for free at www.flighgear.org)
3. the MATLAB/Simulink Aerospace blockset

!!!ALL FILES HAVE BEEN CREATED WITH MATLAB/SIMULINK 7.5 AND ARE UNTESTED ON OLDER VERSIONS!!!

Both the F-16 aerodynamic model and the control laws have been taken from:

NASA Technical Paper 1538 "Simulator Study of Stall/Post-Stall Characteristics of a Fighter Airplane With Relaxed Longitudinal Static Stability", Dec. 1979, by Nguyen et al.
Downloadable from the NASA Technical Report server.

Installing and running the model:
1. Unzip all files
2. Plug in and calibrate the joystick
3. Start up MATLAB/Simulink 7.5 or higher with Aerospace blockset installed
4. Open “F16_fcs.mdl” and generate “runfg.bat” using the generate runscript block (select the correct FlightGear directory)
5. Open runfg.bat outside MATLAB/Simulink, this will start up FlightGear and load the F-16 graphics (use “V” to change your viewpoint)
6. Back in MATLAB/Simulink type “runF16fcs” and press enter
7. Provide requested information, pressing enter again will start the simulation
8. Switch to FlightGear and start flying

The F-16 dynamic model is valid for
1. Altitudes up until 10000 meters
2. subsonic speeds
3. angle of attack between -20 and 90 deg
4. angle of sideslip of ±30 deg.

The F-16 model can also be downloaded separately with more documentation at mathworks.

Required Products Aerospace Blockset
MATLAB release MATLAB 7.5 (R2007b)
Other requirements -Flightgear -a joystick
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
08 Feb 2009 Etienne

Tried to run the model and I get the following error on the first step of the trim function. I am just running it as specified with the given initial conditions. Had to rip out the joystick etc, but giving it the correct inputs as in a previous model. Not sure what is going on here. I assumed that this should work.

Error in 'F16_trim/F-16 dynamics' while executing C MEX S-function 'F16_dyn', (mdlDerivatives), at time 0. MATLAB
error message:
Point lies out data grid (in getHyperCube).

09 Feb 2009 Eddy  
02 Dec 2009 Qing

I can not use the package in matlab+simulink under Ubuntu linux. The C Program can not be operated by GCC.

Can anyone help me?

18 Mar 2010 Ryu Han-seok

Error in 'F16_trim/F-16 dynamics' while executing C MEX S-function 'F16_dyn', (mdlDerivatives), at time 0. MATLAB
error message:
Point lies out data grid (in getHyperCube).

Please login to add a comment or rating.
Updates
09 Feb 2009

minor bug fix

13 Feb 2009

fixed the longitudinal control loop

01 Mar 2010

fixed ISA atmos, new manual

Tag Activity for this File
Tag Applied By Date/Time
aerospace Lars Sonneveldt 05 Feb 2009 16:15:01
flight dynamics Lars Sonneveldt 05 Feb 2009 16:15:01
flight control Lars Sonneveldt 05 Feb 2009 16:15:01
simulink Lars Sonneveldt 05 Feb 2009 16:15:01
flightgear Lars Sonneveldt 05 Feb 2009 16:15:01
f16 Lars Sonneveldt 05 Feb 2009 16:15:01
flight control Patrick Castonguay 15 Mar 2010 20:51:39
aerospace Chirag 28 May 2010 06:42:43
flightgear Robert Heffley 19 Sep 2010 19:36:51
flightgear Karthik Kumar 04 Apr 2011 08:37:34

Contact us at files@mathworks.com