Continuous simulation

Last updated

Continuous Simulation refers to simulation approaches where a system is modeled with the help of variables that change continuously according to a set of differential equations. [1] [2]

Contents

History

It is notable as one of the first uses ever put to computers, dating back to the Eniac in 1946. Continuous simulation allows prediction of

Established in 1952, the Society for Modeling and Simulation International (SCS) is a nonprofit, volunteer-driven corporation dedicated to advancing the use of modeling & simulation to solve real-world problems. Their first publication strongly suggested that the Navy was wasting a lot of money through the inconclusive flight-testing of missiles, but that the Simulation Council's analog computer could provide better information through the simulation of flights. Since that time continuous simulation has been proven invaluable in military and private endeavors with complex systems. No Apollo moon shot would have been possible without it.

Clarification of concepts

Discrete event simulation Discrete event simulation graph.jpg
Discrete event simulation
Continuous simulation Continuous simulation graph.jpg
Continuous simulation

The distinction between continuous and discrete applies both to real-world dynamic systems and to their simulation.

A (real-world) dynamic system may be continuous or discrete. Continuous dynamic systems (like physical systems with material objects moving in space) are characterized by state variables the values of which change continuously, while the state variable values of discrete dynamic systems (like predator-prey ecosystems) "jump", that is, they are changed at discrete time steps only.

In continuous simulation, continuously changing state variables of a system are modeled by differential equations. However, in digital computing, real numbers cannot be faithfully represented and differential equations can only be solved numerically with approximate algorithms (like the method of Euler or Runge–Kutta) using some form of discretization. Consequently, digital computers cannot run truly continuous simulations. Only analog computers can run truly continuous simulations. In many cases though, digital computing approaches based on incremental time progression (with either fixed or dynamically adjusted increments) for discretizing time into small time steps provide satisfactory approximations.

Discrete event simulation , on the other hand, changes state variables only in response to events, typically using next-event time progression.

Continuous dynamic systems can only be captured by a continuous simulation model, while discrete dynamic systems can be captured either in a more abstract manner by a continuous simulation model (like the Lotka-Volterra equations for modeling a predator-prey eco-system) or in a more realistic manner by a discrete event simulation model (in a predator-prey eco-system, births, deaths and predator-prey encounters are discrete events). When using a continuous simulation model of the discrete dynamic system of a population of animals, one may get results like 23.7 animals, which first have to be rounded for making sense.

In the example shown to the right, the sales of a certain product over time is shown. Using a discrete event simulation makes it necessary to have an occurring event to change the number of sales. In contrast to this the continuous simulation has a smooth and steady development in its number of sales. [5] It is worth noting that sales are discrete events that come with discrete state changes. A continuous simulation of sales implies the possibility of fractional sales e.g. 1/3 of a sale. For that reason, a continuous simulation of sales does not faithfully model reality but may nevertheless capture the system's dynamics approximately.


Conceptual simulation model

Continuous simulations are based on a set of differential equations. These equations define the peculiarity of the state variables, the environment factors so to speak, of a system. These parameters of a system change in a continuous way and thus change the state of the entire system. [6]

The set of differential equations can be formulated in a conceptual model representing the system on an abstract level. In order to develop the conceptual model 2 approaches are feasible:

A widely known example for a continuous conceptual simulation model is the "predator-prey model".

The predator-prey model

The predator-prey model Predator prey.jpg
The predator-prey model

This model is typical for revealing the dynamics of populations. As long as the population of the prey is on the rise, the predators population also rises, since they have enough to eat. But very soon the population of the predators becomes too large so that the hunting exceeds the procreation of the prey. This leads to a decrease in the prey population and as a consequence of this also to a decrease of the predator population as they do not have enough food to feed the entire population. [8]

Any population dynamics involves the events of births and deaths and is therefore fundamentally a discrete dynamic system. However, modeling discrete state changes with differential equations often produces useful insights. A continuous simulation of population dynamics represents an approximation effectively fitting a curve to a finite set of measurements/points.

Mathematical theory

In continuous simulation, the continuous time response of a physical system is modeled using ODEs, embedded in a conceptual model. The time response of a physical system depends on its initial state. The problem of solving the ODEs for a given initial state is called the initial value problem.

In very few cases these ODEs can be solved in a simple analytic way. More common are ODEs which do not have an analytic solution. In these cases one has to use numerical approximation procedures.

Two well known families of methods for solving initial value problems are:

When using numerical solvers the following properties of the solver must be considered:

These points are crucial to the success of the usage of one method. [10]

Mathematical examples

Newton's 2nd law, F = ma, is a good example of a single ODE continuous system. Numerical integration methods such as Runge Kutta, or Bulirsch-Stoer could be used to solve this particular system of ODEs.

By coupling the ODE solver with other numerical operators and methods a continuous simulator can be used to model many different physical phenomena such as

There is virtually no limit to the kinds of physical phenomena that can be modeled by a system of ODE's. Some systems though can not have all derivative terms specified explicitly from known inputs and other ODE outputs. Those derivative terms are defined implicitly by other system constraints such as Kirchhoff's law that the flow of charge into a junction must equal the flow out. To solve these implicit ODE systems a converging iterative scheme such as Newton–Raphson must be employed.

Simulation software

To speed creation of continuous simulations you can use graphical programming software packages like VisSim or Simcad Pro. The packages provide options for integration method, step size, optimization method, unknowns and cost function, and allow for conditional execution of subsystems to speed execution and prevent numerical errors for certain domains. Such graphical simulation software can be run in real-time and used as a training tool for managers and operators. [11]

Modern applications

Continuous simulation is found

Indeed, much of modern technology that we enjoy today would not be possible without continuous simulation.

Other types of simulation

See also

Related Research Articles

<span class="mw-page-title-main">Numerical methods for ordinary differential equations</span> Methods used to find numerical solutions of ordinary differential equations

Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although this term can also refer to the computation of integrals.

A hybrid system is a dynamical system that exhibits both continuous and discrete dynamic behavior – a system that can both flow and jump. Often, the term "hybrid dynamical system" is used, to distinguish over hybrid systems such as those that combine neural nets and fuzzy logic, or electrical and mechanical drivelines. A hybrid system has the benefit of encompassing a larger class of systems within its structure, allowing for more flexibility in modeling dynamic phenomena.

<span class="mw-page-title-main">Mathematical and theoretical biology</span> Branch of biology

Mathematical and theoretical biology, or biomathematics, is a branch of biology which employs theoretical analysis, mathematical models and abstractions of the living organisms to investigate the principles that govern the structure, development and behavior of the systems, as opposed to experimental biology which deals with the conduction of experiments to prove and validate the scientific theories. The field is sometimes called mathematical biology or biomathematics to stress the mathematical side, or theoretical biology to stress the biological side. Theoretical biology focuses more on the development of theoretical principles for biology while mathematical biology focuses on the use of mathematical tools to study biological systems, even though the two terms are sometimes interchanged.

Numerical methods for partial differential equations is the branch of numerical analysis that studies the numerical solution of partial differential equations (PDEs).

Trajectory optimization is the process of designing a trajectory that minimizes some measure of performance while satisfying a set of constraints. Generally speaking, trajectory optimization is a technique for computing an open-loop solution to an optimal control problem. It is often used for systems where computing the full closed-loop solution is not required, impractical or impossible. If a trajectory optimization problem can be solved at a rate given by the inverse of the Lipschitz constant, then it can be used iteratively to generate a closed-loop solution in the sense of Caratheodory. If only the first step of the trajectory is executed for an infinite-horizon problem, then this is known as Model Predictive Control (MPC).

MIMIC, known in capitalized form only, is a former simulation computer language developed 1964 by H. E. Petersen, F. J. Sansom and L. M. Warshawsky of Systems Engineering Group within the Air Force Materiel Command at the Wright-Patterson AFB in Dayton, Ohio, United States. It is an expression-oriented continuous block simulation language, but capable of incorporating blocks of FORTRAN-like algebra.

<span class="mw-page-title-main">Method of lines</span> Numerical method

The method of lines is a technique for solving partial differential equations (PDEs) in which all but one dimension is discretized. By reducing a PDE to a single continuous dimension, the method of lines allows solutions to be computed via methods and software developed for the numerical integration of ordinary differential equations (ODEs) and differential-algebraic systems of equations (DAEs). Many integration routines have been developed over the years in many different programming languages, and some have been published as open source resources.

In mathematics of stochastic systems, the Runge–Kutta method is a technique for the approximate numerical solution of a stochastic differential equation. It is a generalisation of the Runge–Kutta method for ordinary differential equations to stochastic differential equations (SDEs). Importantly, the method does not involve knowing derivatives of the coefficient functions in the SDEs.

A stochastic simulation is a simulation of a system that has variables that can change stochastically (randomly) with individual probabilities.

In mathematics, the Runge–Kutta–Fehlberg method is an algorithm in numerical analysis for the numerical solution of ordinary differential equations. It was developed by the German mathematician Erwin Fehlberg and is based on the large class of Runge–Kutta methods.

In numerical analysis, the Cash–Karp method is a method for solving ordinary differential equations (ODEs). It was proposed by Professor Jeff R. Cash from Imperial College London and Alan H. Karp from IBM Scientific Center. The method is a member of the Runge–Kutta family of ODE solvers. More specifically, it uses six function evaluations to calculate fourth- and fifth-order accurate solutions. The difference between these solutions is then taken to be the error of the solution. This error estimate is very convenient for adaptive stepsize integration algorithms. Other similar integration methods are Fehlberg (RKF) and Dormand–Prince (RKDP).

In numerical analysis, the Dormand–Prince (RKDP) method or DOPRI method, is an embedded method for solving ordinary differential equations (ODE). The method is a member of the Runge–Kutta family of ODE solvers. More specifically, it uses six function evaluations to calculate fourth- and fifth-order accurate solutions. The difference between these solutions is then taken to be the error of the (fourth-order) solution. This error estimate is very convenient for adaptive stepsize integration algorithms. Other similar integration methods are Fehlberg (RKF) and Cash–Karp (RKCK).

Dynamic simulation is the use of a computer program to model the time-varying behavior of a dynamical system. The systems are typically described by ordinary differential equations or partial differential equations. A simulation run solves the state-equation system to find the behavior of the state variables over a specified period of time. The equation is solved through numerical integration methods to produce the transient behavior of the state variables. Simulation of dynamic systems predicts the values of model-system state variables, as they are determined by the past state values. This relationship is found by creating a model of the system.

The Kinetic PreProcessor (KPP) is an open-source software tool used in atmospheric chemistry. Taking a set of chemical reactions and their rate coefficients as input, KPP generates Fortran 90, FORTRAN 77, C, or Matlab code of the resulting ordinary differential equations (ODEs). Solving the ODEs allows the temporal integration of the kinetic system. Efficiency is obtained by exploiting the sparsity structures of the Jacobian and of the Hessian. A comprehensive suite of stiff numerical integrators is also provided. Moreover, KPP can be used to generate the tangent linear model, as well as the continuous and discrete adjoint models of the chemical system.

<span class="mw-page-title-main">Traffic simulation</span>

Traffic simulation or the simulation of transportation systems is the mathematical modeling of transportation systems through the application of computer software to better help plan, design, and operate transportation systems. Simulation of transportation systems started over forty years ago, and is an important area of discipline in traffic engineering and transportation planning today. Various national and local transportation agencies, academic institutions and consulting firms use simulation to aid in their management of transportation networks.

In mathematics a partial differential algebraic equation (PDAE) set is an incomplete system of partial differential equations that is closed with a set of algebraic equations.

Equation-free modeling is a method for multiscale computation and computer-aided analysis. It is designed for a class of complicated systems in which one observes evolution at a macroscopic, coarse scale of interest, while accurate models are only given at a finely detailed, microscopic, level of description. The framework empowers one to perform macroscopic computational tasks using only appropriately initialized microscopic simulation on short time and small length scales. The methodology eliminates the derivation of explicit macroscopic evolution equations when these equations conceptually exist but are not available in closed form; hence the term equation-free.

PROSE was the mathematical 4GL virtual machine that established the holistic modeling paradigm known as Synthetic Calculus. A successor to the SLANG/CUE simulation and optimization language developed at TRW Systems, it was introduced in 1974 on Control Data supercomputers. It was the first commercial language to employ automatic differentiation (AD), which was optimized to loop in the instruction-stack of the CDC 6600 CPU.

<span class="mw-page-title-main">SAAM II</span> Compartmental and kinetic modeling software

SAAM II, short for "Simulation Analysis and Modeling" version 2.0, is a renowned computer program designed for scientific research in the field of bioscience. It is a descriptive and exploratory tool in drug development, tracers, metabolic disorders, and pharmacokinetics/pharmacodynamics research. It is grounded in the principles of multi-compartment model theory, which is a widely-used approach for modeling complex biological systems. SAAM II facilitates the construction and simulation of models, providing researchers with a friendly user interface allowing the quick run and multi-fitting of simple and complex structures and data. SAAM II is used by many Pharma and Pharmacy Schools as a drug development, research, and educational tool.

References

  1. Continuous Simulation description from University of Utrecht Archived 2011-06-09 at the Wayback Machine
  2. Definition of Simulation with reference to "continuous simulation" at Encyclopedia.com
  3. Electric circuit simulation from Memorial University Canada
  4. "Intelligent Robotic Systems", pub. Springer Link ISBN   978-0-306-46062-3
  5. "Developments in Business Simulation & Experiential Exercises, Volume 13, 1986" (PDF). sbaweb.wayne.edu. Archived from the original (PDF) on 2014-04-07. Retrieved 2012-01-23.
  6. "Continuous Simulation". www.scribd.com. Retrieved 2012-01-23.
  7. Louis G. Birta, Gilbert Arbez (2007). Modelling and Simulation, p. 249. Springer.
  8. Louis G. Birta, Gilbert Arbez (2007). Modelling and Simulation, p. 255. Springer.
  9. Louis G. Birta, Gilbert Arbez (2007). Modelling and Simulation, p. 282. Springer.
  10. Louis G. Birta, Gilbert Arbez (2007). Modelling and Simulation, p. 288. Springer.
  11. ""On–the-fly" Continuous simulation software for the continuous flow modeling – Liquid and Gas simulation technology built into Simcad Pro". createasoft.com. Archived from the original on 2012-12-17. Retrieved 2012-01-26.
  12. Yee, Jiong-Sang; Wang, Jian Liang; Sundararajan, N. (2000). "Robust sampled-data H∞-flight-controller design for high α stability-axis roll maneuver". Control Engineering Practice. 8 (7): 735–747. doi:10.1016/S0967-0661(99)00202-6.
  13. VisSim Visual Simulation Language for Continuous Simulation and Model Based Development