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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Simulink block set, however, when maximum per<strong>for</strong>mance is required compiled c codeusually provides increased speed.Simulink Time blockTwo methods are available to allow real time simulation through Simulink. RealTime Workshop described earlier, and including a S-function timing block in Simulink totime each simulation step and release the program when the end of the time frame isreached.Using an interrupt driven block of S-function code is being investigated toprovide real time capability in the Simulink environment using a PC s internal timingchip. The amount of delay required is significant as the 6 DOF model finishes 10 secondsof integration using a 10 millisecond integration step in less that a second.Hardware Setup and TestThe hardware S-functions created to work with RTW were compiled to dll s todetermine if the functions would work in the regular Simulink environment. The driverfunctions <strong>for</strong> the stick and the instruments function normally in the standard Simulinkbatch mode. A delay function was required as a batch simulation finish time of 100,000seconds finished in seconds. Since the drivers function properly in the standard Simulinkenvironment, Simulink can be used to per<strong>for</strong>m <strong>for</strong>ce setup without a timing block on thestick and pedals. To slow down the simulation, an extremely small time step <strong>for</strong> theintegration or including a delay loop to slow down the processing to close to real time isrequired. Since the <strong>for</strong>ce stick hardware drivers do not require a specific time step, setupof the stick <strong>for</strong>ces is done without having to generate executable code which takes severalminutes each time.38

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

Saved successfully!

Ooh no, something went wrong!