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.

the setup of the <strong>for</strong>ce feedback system to be per<strong>for</strong>med by non-programmers. Softwaretools were created to allow engineers to fly transfer function and state space modelsthat previously would have required expert programmers to create. Flying a transferfunction allows rapid development of preliminary designs. First cut designs use literalfactors to estimate the gross handling qualities <strong>for</strong> a design iteration by using spring anddamping values obtained from the literal factors. The Transfer functions are thenanalyzed using frequency domain techniques. Finally, it is possible to use PhEagle II tofly the equations. Gross handling qualities are rapidly evaluated early in a designallowing more time to be spent refining per<strong>for</strong>mance and handling characteristics. Sincethe RTW auto-coder creates a stand alone DOS executable program students cansubstitute generic game joysticks and software graphics <strong>for</strong> the complex simulation labIO to allow code generated at the laboratory to be run on any PC.The wraparound template that provides the input and output connection betweenthe function and Simulink is called a C MEX S-function. The user code is called throughan S-function in Simulink with as many input and output channels as required. The CMEX API provides a gateway function to the Matlab environment, while the C MEXS-function is the gateway to the Simulink environment. With a couple of restrictions,most c code can be placed in the S-function template.The first restriction is that only basic keyboard input is allowed. Mathworkssupplies a modified interrupt function <strong>for</strong> the keyboard which limits escape codes frominterrupting the program. To get around this restriction, a TCP/IP communications blockwas created to allow communications outside the simulation software/hardware. Thisallows the user to create a GUI using Matlabs programming language to provide the35

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

Saved successfully!

Ooh no, something went wrong!