Simulation and modeling - Old Questions

10.  Explain the data and control statement in CSMP.

5 marks | Asked in 2067

CSMP or Continuous System Modelling Program is an early scientific computer software designed for modelling and solving differential equations numerically. This enables real-world systems to be simulated and tested with a computer.

1. Data statements which assign numerical value to parameters, constant and initial conditions. For example one data statement called INCON can be used to set the initial value of integration function block.

2. Control statements which specify options in the assembly and execution of program and choice of inputs. For e.g. If printed output is required, control statements with PRINT and PRDEL are used followed by the names of variables to form the outputs.

Example program in CSMP

TITILE AUTOMOBILE SUSPENSION SYSTEM

*

  PARAM D=(5.656,16.968,39.592,56.56)     //initial

  *

X2DOT=(1.0/M)*(K*F-K*X-D*XDOT)

XDOT=INTGRL(0.0,X2DOT)                         //dynamic

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     //terminal

PRINT X, XDOT, X2DOT

 END 

STOP