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.

Unit Delay1zelevatorelevElevElevator radx (ft)y (ft)AileronRudderRight ThrottleLeft ThrottleStickail Ailrud Rudto command radTemperature FPressure lb/in^2Alt ftDensity slug/ft^3a ft/secAtmospherethrottle thrust lbsthrust0f10f20f30f4Aileron radRudder radRho slu/ft^3Fx lbf <strong>for</strong>wardFy lbf rightFz lbf downz (ft)Psi yaw (rad)Theta pitch (rad)Phi roll (rad)u Forward ft/secv Right ft/secw Down ft/secp roll rad/secq pitch rad/secr yaw rad/sec1Alpha radBeta radpdot roll rad/sec^2M Pitch ft/lbf nose upqdot pitchrad/sec^2rdot yaw rad/sec^2L Roll ft/lbf right wing downudot Forward ft/sec^2psi deg ThetaTheta deg PhiPhi deg Psito deguv knotswto airspeed60to ft/min57.3to deg1 57.3to deg2|u|Abs1to altAirspeed ,700 knotsAltimeter 06000 ftPitch8ball + 90 degRoll8ball + 180 degYaw + 180 deggmeter 4 +9 g’sAlpha 10 +40 degBeta +1 15 degLrpm 10 110%Rrpm 10 110 %Vert speed + 6000 ft/minYaw Force +1Roll Force +1Pitch Force +1Instruments & Force0f5vdot Right ft/sec^2N Yaw ft/lbf nose rightvdot Down ft/sec^2Point Mass 6 DOFNon Linear1/32.2to g’sFigure 18 PhEagle II - 6 DOF ModelThere is a built-in Simulink function which passes the time step to the S-functioncode such that the Simulink environment sets the time step <strong>for</strong> simulation. The S-function will take and use any size time step <strong>for</strong> the numerical integrators thatenvironment passes in. Passing the time increment into the existing code, the new code isnot limited to a hard-coded dt and can run at whatever time step the rest of the model isusing. The model uses a course time step of 0.0417 sec (24 HZ) <strong>for</strong> real time simulationand as fine as required <strong>for</strong> batch simulations. The Mathworks supplies integrators that canbe used by code in the S-functions, but <strong>for</strong> many users that have existing math models,Simulink provides the ability to wrap the S-function IO around the existing code. Theequations of motion can then be imported to the Simulink environment as a block to wrapa control system around. Mathworks supplies a make script to include all of its libraries58

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

Saved successfully!

Ooh no, something went wrong!