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
Permalink Reply by Niki Regina on July 22, 2010 at 6:18am
Permalink Reply by UFO-MAN on July 22, 2010 at 6:51am
Permalink Reply by Donald Choi on November 5, 2012 at 5:22am 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
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.681 members
24 members
1289 members
248 members
57 members
© 2013 Created by Chris Anderson.
Powered by
