13.07.2015 Views

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Initially a Borland c compiler was used to generate C MEX and C MEX S-functions. After discovering that the scripts included with the RTW only supportedcreation of C MEX functions, a Watcom c compiler was configured to create both CMEX and C MEX S-functions. The supplied scripts were run using the example F-14Simulink model and a batch mode program was created and the output confirmed withthe results published in the user manual. Using the numerical integrators created <strong>for</strong> theF-4/F15 Phantom/EAGLE simulator (PhEagle) linear simulation, a procedure <strong>for</strong> creatinga S-function was established and verified against the data generated from the originalfunctions. Next a procedure <strong>for</strong> creating real time code was established and verified usingthe numerical integrator S-functions and comparing the run time with an external clock toverify the timing functions. The final verification was to compare Simulink s built inintegrators with the user created numerical integrators using the same integrationtechniques.After the procedure <strong>for</strong> creating S-function blocks was established, existing <strong>Cal</strong><strong>Poly</strong> c++ code used to access various hardware used <strong>for</strong> input and output to and from thesimulation cab was converted to Simulink S-functions. A 6-Degree of Freedom modeloriginally created to demonstrate program coding of a point mass model was converted toa S-function and verified. Several functions were changed and several were added aftertools in Simulink and Matlab showed that the model was not producing acceptableresults. A Euler integrator and coordinate trans<strong>for</strong>m S-function was created to allow linertransfer function and state space models to be flown in a virtual world.Next, four models of varying complexity, modified to include pilot input andgraphical output, were flown to verify the concept and the ability of the auto-coder togenerate stand alone executable program code. Starting with a transfer function model,9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!