UAV Flight Model Validation, Trim and Linearization using Matlab

In case anyone here is using Matlab and Simulink to test or develop UAVs and UAV autopilots I am posting a link to a new flight dynamic model SFunction for use with Simulink- http://jsbsim.sf.net/JSBSimSFunction.zip

 

The project enables any JSBSim flight dynamic model to be run within Simulink.  It also has a trim utility as well as a linearization utility that prints formatted, de-coupled state space matrices to the command window.  This makes it extremely useful for flight control or autopilot design. An eigenvalue analysis is also performed after the linearization.

 

The project is open-source and all the source code is included with the project download.  It has been tested with Matlab R2008b and R2010a.  Currently there is an issue with R2010a that causes the resulting trimmed control inputs to be slightly off- hopefully we can get this fixed soon.  Pre-compiled MEX files exist for win64/32 currently, with Mac OS and hopefully Linux versions in hte near future.

 

Happy downloading!

Tags: Matlab, Simulink, autopilot, control, flight, linearization, model, trim

Views: 1782

Reply to This

Replies to This Discussion

I think that I can answer to this problem for Brian...(Brian if I am wrong write something of course).
Maybe it is better to install Visio Express studio 2008 and if you find Matlab 7.8. However I guess that the main problem is Visual Studio.
Hi. Thank you for responding. I have not tried to compile anything with VS 2010 EE (alternatively compile with VS 2008 EE as you mention). Do I need to compile some of the C files for Matlab to properly use them?

Hello everyone,

I am new to Matlab SFunction. I have downloaded JSBSimSFunction and the aircraft models. I have also installed Visual Studio C++ 2008 Express Edition. I can start up the GUI and load a model. However, I cannot initialize the model and Matlab gives me the following error

Error using JSBSimGUI>init_model_Callback (line 1850)
Error while obtaining sizes from MEX S-function 'JSBSim_SFunction' in
'jsbsimgui_test/JSBSim S-Function'.

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in JSBSimGUI (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
@(hObject,eventdata)JSBSimGUI('init_model_Callback',hObject,eventdata,guidata(hObject))


Caused by:
    Error using JSBSimGUI>init_model_Callback (line 1850)
    Invalid MEX-file
    'C:\Users\Don\Documents\MATLAB\JSBSimSFunction\JSBSim_SFunction.mexw32':
    C:\Users\Don\Documents\MATLAB\JSBSimSFunction\JSBSim_SFunction.mexw32 is not a
    valid Win32 application.
 
Error while evaluating uicontrol Callback

I guess I did not correctly compile the mexw32 file. Can you please give me some instruction to do that?

Thanks,

Donald

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service