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.

great control over the model dynamics. Usually the system would be described as a statespace as described by Equation1. Integrating a state space usually requires a singletechnique of numerical integration. Part of the reason <strong>for</strong> creating the model was toEquation 1•Xs () = AXs () + BUs ()Ys () = CXs () + DUs ()demonstrate Euler and Runge-Kutta numerical integration techniques. Each model wasset up to use separate numerical integrators <strong>for</strong> each output axis.To per<strong>for</strong>m the first order integration s a Euler numerical integrator was createdand tested using Matlab. Matlab was selected to take advantage of its interpretedlanguage which uses a syntax very similar to c. Note that by rearranging the terms of afirst order transfer function (equations 2-4) the Euler technique is derived. The resultsEquation 210 Y= = θ s + 10 U δeEquation 3dθ=− 10θ+ 10dtEquation 4from the coded Euler integrator were compared to the Euler integrator supplied byMathworks. When the resulting plots overlaid exactly <strong>for</strong> the same input and time stepthe function was included in the simulator.dθ =− 10θdt + 10δedt24

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

Saved successfully!

Ooh no, something went wrong!