Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lecture 04 - Continuous System Simulation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

CSMP III – statements

Printing
PRINT X, Y
Print-plotted
PRTPLT X
Heading of the printed output
TITLE MySimulation System
Heading of the print-plotted output
LABEL Plot Output of MySimulation System
Closing all of the job
ENDJOB

a l
ep
itn
25
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

1
CSMP III – Example
Example for automobile suspension system

TITLE AUTOMOBILE SUSPENSION SYSTEM


PARAM D = (5.656, 16.968, 39.592, 56.56, 113.12)
X2DOT = (1.0/M) * (K*F – K*X – D*XDOT)
XDOT = INTGRL(0.0, X2DOT)
X = INTGRL(0.0, XDOT)
CONST M = 2.0, F = 1.0, K = 400.0

TIMER DELT=0.005, FINTIM=1.5, PRDEL=0.05, OUTDEL=0.05


PRINT X, XDOT, X2DOT
PRTPLT X
LABEL DISPLACEMENT VERSUS TIME

a l
END

ep
STOP

itn
28
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

2
Combined / hybrid simulation

Three fundamental types of interactions that can


occur between discretely changing and
continuously changing state variables;
1. A discrete event may cause a discrete change in the
value of a continuous state variable
2. A discrete event may cause the relationship governing
a continuous state variable to change at a particular
time
3. A continuous state variable achieving a threshold
value may cause a discrete event to occur or to be
scheduled

a l
ep
itn
29
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

3
Feedback Systems

- The system takes feedback from the output i.e.


input is coupled with output
- Example can be; heat monitoring and control
system
- Issues – amplification and correction of feedback
- Negative feedback – control variable is
proportional with output
- Positive feedback – control variable and
output are inversely proportional
- Other examples;

a l
- Aircraft system

ep
- Error Correction mechanism

itn
30
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

4
Error Correction Mechanism

Y(t) – real output D(t) – desired output


Let error at that instant be;
X1

e(t) = D(t) – Y(t)


X2 W1

Y(t) is governed as; X3


W3 Y(t)
n S d(t)

∑ w (t ).x (t )
i =0
i i
Xn
Wn

e(t)

e(t) is provided as feedback so that it adjusts the


values of w(t)

a l
ep
The process is stopped if Y(t) = D(t)

itn
31
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

5
Interactive Systems

- Systems that support input and output events


even the simulation is going on
- Most of the continuous simulation packages
provide feature to display output on the screen
in the form of text and plots
- Some simulation packages provide facility to
change the input parameters as well

a l
ep
itn
32
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

6
Real-time Simulation

- Some devices and their functions are so critical


that any model of such devices/sub-systems
could not achieve desirable output
- For such systems, the real devices are used
- The real devices are used to provide
input/feedback to the simulation programs. The
output is also deployed on the real devices
- Such kind of simulation is known as real-time
simulation
- The main reason behind real-time simulation is
to simulate the real world events on the real
time i.e. the job must be done within predefined

a l
ep
time

itn
33
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

7
Homework - 4

Solve problems
4-2, and 4-5
from Chapter – 4 of ‘System Simulation’ by
Gordon

a l
ep
itn
34
(C) Pramod Parajuli, 2004

cs
Source: www.csitnepal.com

You might also like