SIMCOS
   HOME

TheInfoList



OR:

SIMCOS (an
acronym An acronym is a type of abbreviation consisting of a phrase whose only pronounced elements are the initial letters or initial sounds of words inside that phrase. Acronyms are often spelled with the initial Letter (alphabet), letter of each wor ...
standing for ''SIMulation of COntinuous Systems'') is a
computer language A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Software construction#Construction languages, Construction language – all forms of communication by which a human can Comput ...
and a
development environment In software deployment, an environment or tier is a computer system or set of systems in which a computer program or software component is deployed and executed. In simple cases, such as developing and immediately executing a program on the same m ...
for
computer simulation Computer simulation is the running of a mathematical model on a computer, the model being designed to represent the behaviour of, or the outcome of, a real-world or physical system. The reliability of some mathematical models can be determin ...
. In 1989 it was developed by Slovenian experts led by Borut Zupančič.


Properties

The purpose of the language is
simulation A simulation is an imitative representation of a process or system that could exist in the real world. In this broad sense, simulation can often be used interchangeably with model. Sometimes a clear distinction between the two terms is made, in ...
of dynamic
mathematical model A mathematical model is an abstract and concrete, abstract description of a concrete system using mathematics, mathematical concepts and language of mathematics, language. The process of developing a mathematical model is termed ''mathematical m ...
s of systems, given as set of
ordinary differential equation In mathematics, an ordinary differential equation (ODE) is a differential equation (DE) dependent on only a single independent variable (mathematics), variable. As with any other DE, its unknown(s) consists of one (or more) Function (mathematic ...
s. It is an equation oriented and compiler type of language. Despite its name it can be used for discrete simulation as well. The language suits well to the CSSL'67
standard Standard may refer to: Symbols * Colours, standards and guidons, kinds of military signs * Standard (emblem), a type of a large symbol or emblem used for identification Norms, conventions or requirements * Standard (metrology), an object ...
of simulation languages so portability among other languages conforming to the same standard (e.g. Tutsim, ACSL etc.) is quite simple. It is a
DOS DOS (, ) is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
based software occasionally it is slightly modified so it can be run under actual versions of
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
. Apart from the simulation itself it can also perform parametrisation (a series of simulations with different values of
parameter A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
s),
linearisation In mathematics, linearization (British English: linearisation) is finding the linear approximation to a function at a given point. The linear approximation of a function is the first order Taylor expansion around the point of interest. In the stu ...
of models and optimisation (finding such values of parameters that a criterion function is minimised).


Simulation process

When a simulation scheme must be prepared it must be described in the SIMCOS language. It can be "drawn" (similarly as with an
analogue computer An analog computer or analogue computer is a type of computation machine (computer) that uses physical phenomena such as electrical, mechanical, or hydraulic quantities behaving according to the mathematical principles in question (''analog s ...
) using an enclosed block library graphics tool (it contains basic elements such as
integrator An integrator in measurement and control applications is an element whose output signal is the time integral of its input signal. It accumulates the input quantity over a defined time to produce a representative output. Integration is an importan ...
s,
amplifier An amplifier, electronic amplifier or (informally) amp is an electronic device that can increase the magnitude of a signal (a time-varying voltage or current). It is a two-port electronic circuit that uses electric power from a power su ...
s, summators, some basic input
signal A signal is both the process and the result of transmission of data over some media accomplished by embedding some variation. Signals are important in multiple subject fields including signal processing, information theory and biology. In ...
s etc.) but more often it is entered as a program using one of text editors, e.g. Edit enclosed with DOS. Whichever form of entry of the model is used, the first phase of simulation reprocesses it into space of states form and rewrites the program into Fortran and prepares files with input parameters. This Fortran program is compiled into an executable file (.EXE) and executed. The executable program reads parameter values from input files, performs the simulation and writes requested calculated values into another file. When it terminates, SIMCOS takes control again and can display results as a graphic plot. The "heart" of the executable is function INTEG which can solve differential equations using one of several
numerical method In numerical analysis, a numerical method is a mathematical tool designed to solve numerical problems. The implementation of a numerical method with an appropriate convergence check in a programming language is called a numerical algorithm. Mathem ...
s. First it reads necessary values (e.g. values of parameters, initial conditions) from files then it calls the function DERIV where the model is actually described as series of functions of its
derivative In mathematics, the derivative is a fundamental tool that quantifies the sensitivity to change of a function's output with respect to its input. The derivative of a function of a single variable at a chosen input value, when it exists, is t ...
s. The returned values are used at the selected numerical method. Requested calculated results are written into the file and the whole procedure is repeated until the termination condition is satisfied.


Example

Continuous simulation of
dead time For detection systems that record discrete events, such as particle and nuclear detectors, the dead time is the time after each event during which the system is not able to record another event. An everyday life example of this is what happens whe ...
(its
Laplace transform In mathematics, the Laplace transform, named after Pierre-Simon Laplace (), is an integral transform that converts a Function (mathematics), function of a Real number, real Variable (mathematics), variable (usually t, in the ''time domain'') to a f ...
is e^) is not a trivial task and usually we use one of Padé approximations. We will simulate Padé approximation of 2nd order :e^\dot\frac and 4th order: :e^\dot\frac. Input signal is a unit step, communication interval equals 0.01s, length simulation run is 5s, results will be compared with output of built-in discrete function ''delay'' (it requires additional array (''del'' in our case) of appropriate size). ''y1'' is a result of simulation of Padé approximation of 2nd order, ''y2'' is a result of simulation of Padé approximation of 4th order and ''y3'' is result of the discrete function ''delay''. When
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
s of both Padé approximation are developed using one of simulation schemes, the model can be described with the following program:
program pade
constant tm=1.0
constant tfin=5
array del(101)
variable t=0.0
u=step(t,0.)

u11d=12/(tm*tm)*u-12/(tm*tm)*y1
u11=integ(u11d,0.)
u21d=u11-u*6/tm-y1*6/tm
u21=integ(u21d,0.)
y1=u21+u
u12d=u*1680/(tm*tm*tm*tm)-y2*1680/(tm*tm*tm*tm)
u12=integ(u12d,0.)
u22d=u12-u*840/(tm*tm*tm)-y2*840/(tm*tm*tm)
u22=integ(u22d,0.)
u32d=u22+u*180/(tm*tm)-y2*180/(tm*tm)
u32=integ(u32d,0.)
u42d=u32-u*20/tm-y2*20*tm
u42=integ(u42d,0.)
y2=u42+u
y3=delay(u,tm,#del,ci)

cinterval ci=0.01
hdr Pade approximation of dead time
prepar y1,y2,y3
output 10,y1,y2,y3
termt(t.ge.tfin)

end
After the simulation run is finished the results can be displayed as plots. It is possible to trace values of plots, select which plots to display, turning on a grid, zoom etc.


References

In Slovene: * Borut Zupančič (with contributions by Rihard Karba and Drago Matko), ''Simulacija dinamičnih sistemov'', Založba FER, Ljubljana, 1995, * Borut Zupančič, ''SIMCOS – jezik za simulacijo zveznih in diskretnih dinamičnih sistemov'', Založba FER, Ljubljana, 1992, {{refend


External links


Borut Zupančič's homepage

LMSC download page
(the link to SIMCOS is at the bottom) Simulation programming languages