You are on page 1of 25

Modeling and Simulation of Systems

Richard Zobel What is a system? What is a model?

General sequence from problem specification to successful system design: (1)

1. Identify problem system, obtain or develop specification. 2. Describe system as a series of mathematical equations. 3. Use a simulation package such as Modelica (free!) or CLAWPACK (Conservation Laws Package) (also free!)

Modelica
Modelica is a non-proprietary, objectoriented, equation based language to conveniently model complex physical systems containing, e.g., mechanical, electrical, electronic, hydraulic, thermal, control, electric power or process-oriented subcomponents.

Modelica

Modelica Editor (1)

Modelica Editor (2)

Modelica Editor (3)

Modelica Editor (4)

Modelica Editor (5)

OPENMODELICA
OPENMODELICA is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage. Its long-term development is supported by a non-profit organization the Open Source Modelica Consortium (OSMC).

CLAWPACK
CLAWPACK is a software package designed to compute numerical solutions to hyperbolic partial differential equations using a wave propagation approach.

Various extensions of CLAWPACK


CLAWMAN -- for solving problems on curved manifolds TsunamiClaw -- for solving shallow water wave propagation and inundation problems ChomboClaw -- The functionality of CLAWPACK in the adaptive mesh refinement framework of CHOMBO. WENOCLAW -- High order accurate wavepropagation algorithms. sphereCLAW -- Multi-block code for cubed sphere grids MHDCLAW -- Constrained transport algorithm for MHD

General sequence from problem specification to successful system design: (2)

4. Input mathematical model to simulation package. (Strong note! No Programming required!) 5. Input required constants, functions, tables, etc. 6. Provide Inputs (forcing functions) and Initial Conditions. 7. Run some test simulations.

VERIFICATION AND VALIDATION (1)


1. Verify that the test simulations behave as predicted or expected. 2. If not, revise model and try again! 3. If OK, this completes the VERIFICATION phase. 4. The next phase is VALIDATION.

VERIFICATION AND VALIDATION (2)


T h i s c o n c e r n s c o m p a r i n g t h e simulation results with what actually happens in the real-world system. If the real system performance closely agrees with the simulation then the simulation can be used (with care! ) to predict general system behavior within limits. Beware of interpolation and extrapolation.

VERIFICATION AND VALIDATION (3)


Common sense and experience is needed! If simulation predictions do not agree sufficiently with the real system behavior, then it is necessary to revise the simulation model until agreement is reached. they agree sufficiently well, If simulation studies of system behavior may begin.

EXAMPLE SYSTEM Basic Control of a RAMJET Missile


The problem is that the step response must not have an overshoot

Simple 2nd order Step Response

Second Order x 1st Order Exponential

DYNAMICS EQUATIONS 1
A simple 2nd order system can be expressed as a force equation:

a.d2x/dt2 +bdx/dt + cx = f(x),

where a is a mass. b is a friction element and c is a retarding force, as in a simple mass, damper, spring system as found in any vehicle which has at least one or one on each wheel! f(x) is an input or command to the system. This might be for instance,
a command to change course towards the target, this might be a step of acceleration of 15g left.

DYNAMICS EQUATIONS 2
A missile has a mass (may be variable due to fuel and/or weaponry use), air acts as a retarding force and also air friction acts as damper. As this is a 3D system, there are 3 such equations, one for each of the 3 axes. In addition, there is rotary motion around the 3 axes. Consequently, this is a 6 degree of freedom system.

DYNAMICS EQUATIONS 2 (Cont.)


Just to complicate it even more, it is essential to add the Coriolis effect, where a body has simultaneous translational and rotary velocities. Any high speed biker will tell you! Most real systems are very complex. Now you know why we use a simulation package and/or an actual simulator such as a flight simulator.

Flame-out Problems (1)


The missile is asked to pull a 15g turn. Initially the missile will then be pointing away from its forward direction. This is because of the inertia of the missile For a ramjet this can be disastrous. This is because there is a major loss of air compression to the ramjet which extinguishes the engine and the missile falls out of the sky.

Flame-out Problems (2)


By adding an additional term to the equation, the overshoot does not happen, so the missile achieves maximum performance. It is important to be aware that a missile has 4 fins and 4 wings all small. It is highly maneuverable at high speeds and accelerations. There is no human on board!

SYSTEMS TRIALS (1)


All such models require verification, and subsequent validation against actual system trials. Safety Critical Systems also require formal proof of correctness of operation under all conditions. Completeness is also important here. Formal Methods is now a major part of Computer Science.

SYSTEMS TRIALS (2)


It now also has to interface to the real hardware as well. Operational training systems are also essential. Safety critical systems include all forms of transport, all machinery, tools, any system with moving parts (including you).

SYSTEMS TRIALS (3)


Examples can be ladders and ropes, motorbikes!, cranes, trucks, planes, your friends! yourself (your worst enemy). The list is endless!

Thank you

You might also like