SIMCOS

Last updated

SIMCOS (an acronym standing for SIMulation of COntinuous Systems) is a computer language and a development environment for computer simulation. In 1989 it was developed by Slovenian experts led by Borut Zupančič.

An acronym is a word or name formed as an abbreviation from the initial components of a phrase or a word, usually individual letters and sometimes syllables.

A computer language is a system of communication with a computer. Types of computer languages include these:

Computer simulation simulation, run on a single computer, or a network of computers, to reproduce behavior of a system; modeling a real physical system in a computer

Computer simulation is the reproduction of the behavior of a system using a computer to simulate the outcomes of a mathematical model associated with said system. Since they allow to check the reliability of chosen mathematical models, computer simulations have become a useful tool for the mathematical modeling of many natural systems in physics, astrophysics, climatology, chemistry, biology and manufacturing, human systems in economics, psychology, social science, health care and engineering. Simulation of a system is represented as the running of the system's model. It can be used to explore and gain new insights into new technology and to estimate the performance of systems too complex for analytical solutions.

Contents

Properties

The purpose of the language is simulation of dynamic mathematical models of systems, given as set of ordinary differential equations. 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 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 based software occasionally it is slightly modified so it can be run under actual versions of Microsoft Windows. Apart from the simulation itself it can also perform parametrisation (a series of simulations with different values of parameters), linearisation of models and optimisation (finding such values of parameters that a criterion function is minimised).

A simulation is an approximate imitation of the operation of a process or system; the act of simulating first requires a model is developed. This model is a well-defined description of the simulated subject, and represents its key characteristics, such as its behaviour, functions and abstract or physical properties. The model represents the system itself, whereas the simulation represents its operation over time.

A mathematical model is a description of a system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling. Mathematical models are used in the natural sciences and engineering disciplines, as well as in the social sciences.

In mathematics, an ordinary differential equation (ODE) is a differential equation containing one or more functions of one independent variable and the derivatives of those functions. The term ordinary is used in contrast with the term partial differential equation which may be with respect to more than one independent variable.

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) using an enclosed block library graphics tool (it contains basic elements such as integrators, amplifiers, summators, some basic input signals 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.

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.

Amplifier electronic device that can increase the power of a signal

An amplifier, electronic amplifier or (informally) amp is an electronic device that can increase the power of a signal. It is a two-port electronic circuit that uses electric power from a power supply to increase the amplitude of a signal applied to its input terminals, producing a proportionally greater amplitude signal at its output. The amount of amplification provided by an amplifier is measured by its gain: the ratio of output voltage, current, or power to input. An amplifier is a circuit that has a power gain greater than one.

Fortran structured programming language

Fortran is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing.

The "heart" of the executable is function INTEG which can solve differential equations using one of several numerical methods. 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 derivatives. 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.

Differential equation mathematical equation that contains derivatives of an unknown function

A differential equation is a mathematical equation that relates some function with its derivatives. In applications, the functions usually represent physical quantities, the derivatives represent their rates of change, and the equation defines a relationship between the two. Because such relations are extremely common, differential equations play a prominent role in many disciplines including engineering, physics, economics, and biology.

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.

Derivative operation in calculus

The derivative of a function of a real variable measures the sensitivity to change of the function value with respect to a change in its argument. Derivatives are a fundamental tool of calculus. For example, the derivative of the position of a moving object with respect to time is the object's velocity: this measures how quickly the position of the object changes when time advances.

Example

Continuous simulation of dead time (its Laplace transform is ) is not a trivial task and usually we use one of Padé approximations. We will simulate Padé approximation of 2nd order

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 when someone takes a photo using a flash - another picture cannot be taken immediately afterward because the flash needs a few seconds to recharge. In addition to lowering the detection efficiency, dead times can have other effects, such as creating possible exploits in quantum cryptography.

In mathematics, the Laplace transform is an integral transform named after its inventor Pierre-Simon Laplace. It takes a function of a real variable t to a function of a complex variable s.

and 4th order:

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 functions of both Padé approximation are developed using one of simulation schemes, the model can be described with the following program:

In engineering, a transfer function of an electronic or control system component is a mathematical function which theoretically models the device's output for each possible input. In its simplest form, this function is a two-dimensional graph of an independent scalar input versus the dependent scalar output, called a transfer curve or characteristic curve. Transfer functions for components are used to design and analyze systems assembled from components, particularly using the block diagram technique, in electronics and control theory.

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.

Related Research Articles

Control theory in control systems engineering is a subfield of mathematics that deals with the control of continuously operating dynamical systems in engineered processes and machines. The objective is to develop a control model for controlling such systems using a control action in an optimum manner without delay or overshoot and ensuring control stability.

Artificial neural network computational model used in machine learning, computer science and other research disciplines, which is based on a large collection of connected simple units called artificial neurons, loosely analogous to axons in a biological brain

Artificial neural networks (ANN) or connectionist systems are computing systems vaguely inspired by the biological neural networks that constitute animal brains. The neural network itself is not an algorithm, but rather a framework for many different machine learning algorithms to work together and process complex data inputs. Such systems "learn" to perform tasks by considering examples, generally without being programmed with any task-specific rules. For example, in image recognition, they might learn to identify images that contain cats by analyzing example images that have been manually labeled as "cat" or "no cat" and using the results to identify cats in other images. They do this without any prior knowledge about cats, for example, that they have fur, tails, whiskers and cat-like faces. Instead, they automatically generate identifying characteristics from the learning material that they process.

Bode plot graph of the frequency response of a linear system presented in logarithmic scale

In electrical engineering and control theory, a Bode plot is a graph of the frequency response of a system. It is usually a combination of a Bode magnitude plot, expressing the magnitude of the frequency response, and a Bode phase plot, expressing the phase shift.

In computer programming, a parameter or a formal argument, is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are the values of the arguments with which the subroutine is going to be called/invoked. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call are evaluated, and the resulting values can be assigned to the corresponding parameters.

An artificial neuron is a mathematical function conceived as a model of biological neurons, a neural network. Artificial neurons are elementary units in an artificial neural network. The artificial neuron receives one or more inputs and sums them to produce an output. Usually each input is separately weighted, and the sum is passed through a non-linear function known as an activation function or transfer function. The transfer functions usually have a sigmoid shape, but they may also take the form of other non-linear functions, piecewise linear functions, or step functions. They are also often monotonically increasing, continuous, differentiable and bounded. The thresholding function has inspired building logic gates referred to as threshold logic; applicable to building logic circuits resembling brain processing. For example, new devices such as memristors have been extensively used to develop such logic in recent times.

Digital control is a branch of control theory that uses digital computers to act as system controllers. Depending on the requirements, a digital control system can take the form of a microcontroller to an ASIC to a standard desktop computer. Since a digital computer is a discrete system, the Laplace transform is replaced with the Z-transform. Also since a digital computer has finite precision, extra care is needed to ensure the error in coefficients, A/D conversion, D/A conversion, etc. are not producing undesired or unplanned effects.

Superposition principle fundamental physics principle stating that physical solutions of linear systems are linear

The superposition principle, also known as superposition property, states that, for all linear systems, the net response caused by two or more stimuli is the sum of the responses that would have been caused by each stimulus individually. So that if input A produces response X and input B produces response Y then input produces response.

Linear time-invariant theory, commonly known as LTI system theory, comes from applied mathematics and has direct applications in NMR spectroscopy, seismology, circuits, signal processing, control theory, and other technical areas. It investigates the response of a linear and time-invariant system to an arbitrary input signal. Trajectories of these systems are commonly measured and tracked as they move through time, but in applications like image processing and field theory, the LTI systems also have trajectories in spatial dimensions. Thus, these systems are also called linear translation-invariant to give the theory the most general reach. In the case of generic discrete-time systems, linear shift-invariant is the corresponding term. A good example of LTI systems are electrical circuits that can be made up of resistors, capacitors, and inductors.

Uniform distribution (continuous) uniform distribution on an interval

In probability theory and statistics, the continuous uniform distribution or rectangular distribution is a family of symmetric probability distributions such that for each member of the family, all intervals of the same length on the distribution's support are equally probable. The support is defined by the two parameters, a and b, which are its minimum and maximum values. The distribution is often abbreviated U(a,b). It is the maximum entropy probability distribution for a random variable X under no constraint other than that it is contained in the distribution's support.

In computability theory the smn theorem, is a basic result about programming languages. It was first proved by Stephen Cole Kleene (1943). The name "smn" comes from the occurrence of a s with subscript n and superscript m in the original formulation of the theorem.

Padé approximant

In mathematics a Padé approximant is the 'best' approximation of a function by a rational function of given order – under this technique, the approximant's power series agrees with the power series of the function it is approximating. The technique was developed around 1890 by Henri Padé, but goes back to Georg Frobenius who introduced the idea and investigated the features of rational approximations of power series.

Uncertainty quantification (UQ) is the science of quantitative characterization and reduction of uncertainties in both computational and real world applications. It tries to determine how likely certain outcomes are if some aspects of the system are not exactly known. An example would be to predict the acceleration of a human body in a head-on crash with another car: even if we exactly knew the speed, small differences in the manufacturing of individual cars, how tightly every bolt has been tightened, etc., will lead to different results that can only be predicted in a statistical sense.

The beam propagation method (BPM) is an approximation technique for simulating the propagation of light in slowly varying optical waveguides. It is essentially the same as the so-called parabolic equation (PE) method in underwater acoustics. Both BPM and the PE were first introduced in the 1970s. When a wave propagates along a waveguide for a large distance, rigorous numerical simulation is difficult. The BPM relies on approximate differential equations which are also called the one-way models. These one-way models involve only a first order derivative in the variable z and they can be solved as "initial" value problem. The "initial" value problem does not involve time, rather it is for the spatial variable z.

In the field of mathematical modeling, a radial basis function network is an artificial neural network that uses radial basis functions as activation functions. The output of the network is a linear combination of radial basis functions of the inputs and neuron parameters. Radial basis function networks have many uses, including function approximation, time series prediction, classification, and system control. They were first formulated in a 1988 paper by Broomhead and Lowe, both researchers at the Royal Signals and Radar Establishment.

Q-function

In statistics, the Q-function is the tail distribution function of the standard normal distribution. In other words, is the probability that a normal (Gaussian) random variable will obtain a value larger than standard deviations. Equivalently, is the probability that a standard normal random variable takes a value larger than .

APMonitor

Advanced process monitor (APMonitor), is a modeling language for differential algebraic (DAE) equations. It is a free web-service or local server for solving representations of physical systems in the form of implicit DAE models. APMonitor is suited for large-scale problems and solves linear programming, integer programming, nonlinear programming, nonlinear mixed integer programming, dynamic simulation, moving horizon estimation, and nonlinear model predictive control. APMonitor does not solve the problems directly, but calls nonlinear programming solvers such as APOPT, BPOPT, IPOPT, MINOS, and SNOPT. The APMonitor API provides exact first and second derivatives of continuous functions to the solvers through automatic differentiation and in sparse matrix form.

Finite element method Numerical method for solving physical or engineering problems

The finite element method (FEM), is a numerical method for solving problems of engineering and mathematical physics. Typical problem areas of interest include structural analysis, heat transfer, fluid flow, mass transport, and electromagnetic potential. The analytical solution of these problems generally require the solution to boundary value problems for partial differential equations. The finite element method formulation of the problem results in a system of algebraic equations. The method approximates the unknown function over the domain. To solve the problem, it subdivides a large system into smaller, simpler parts that are called finite elements. The simple equations that model these finite elements are then assembled into a larger system of equations that models the entire problem. FEM then uses variational methods from the calculus of variations to approximate a solution by minimizing an associated error function.

System identification is a method of identifying or measuring the mathematical model of a system from measurements of the system inputs and outputs. The applications of system identification include any system where the inputs and outputs can be measured and include industrial processes, control systems, economic data, biology and the life sciences, medicine, social systems and many more.

Simulation-based optimization

Simulation-based optimization integrates optimization techniques into simulation analysis. Because of the complexity of the simulation, the objective function may become difficult and expensive to evaluate.

References

In Slovenian language: