# Continuous-Time computation models

## Computation model

The characteristic property of continuous-time formalisms is that the trajectories of input-, output- and state-values are continuous in time. Mathematically, this class of systems is modeled by systems of ordinary differential equations (ODE).

The change of a state variable is described by its time derivative

A system model is described by its differential equation and an output equation, where is the input, is the state and is the systems output.

## Signal form

At every instant of the simulation interval, inputs, outputs and states have a distinct value. Therefore, signals in continuous-time models are continuous functions. The resulting signal form is shown here.

A continuous-time signal

## Example: Spring-Mass system

Continuous-Time models are often used to model mechanical or electrical systems. As an example, see the simple mechanical model depicted below: Two bodies are connected by springs and dampers and accelerated by an external Force F.

Example: Spring-Mass System

Mathematically, this system is described by the following set of ordinary differential equations (ODE):

Here, and are the masses of the bodies, and the spring constants and and the damping constants of the springs and dampers, respectively. The simulation results are shown in the figure below.

Spring-Mass Example: Simulation results

## Modeling

The CTDE domain uses the MLDesigner graphically oriented hierarchical block style of modeling. Models are created and manipulated as interconnected blocks, defining the dynamics of the system. Complex models can be organized hierarchically by combining blocks into submodules, submodules into modules and modules into systems. This simplifies the structure of complex models and increases usability of existing components. Besides the easy-to-use interface, the visual representation reflects the structure of the modeled system.

The state derivatives are represented by integrator blocks, while the derivative equation and the output function are modeled by networks of primitives that perform arithmetic operations.

## Simulation

Simulation of continuous-time models uses numerical methods for solving systems of ordinary equations, more precisely initial value problems. These algorithms are often called numerical integration methods or ODE solver.

A numeric integration method starts with an initial value of xO and approximates the state and output values at a finite number of time points in the simulation interval. Numerical methods for solving ODE systems are an area of extensive research. A large number of different algorithms are available, with different levels of accuracy, computational effort and suitability for distinct classes of problems. The CTDE domain supports multiple integration algorithms and a variety of configuration options to support them.

## Limitations of purely continuous-time models

The numerical methods mentioned above generally require that the differential equation and input trajectory to be smooth. More precisely, these functions must be sufficiently differentiable (depending on the used ODE solver.)

Real systems seldom meet these requirements. One cause is discontinuity in the state transition function. (Systems with friction or hysteresis effects show such behavior.)

Input signals often change their values discontinuously, especially in systems where continuous components interact with digital devices.

Most numerical algorithms fail or have significantly reduced accuracy when stepping over discontinuity points. Therefore, practical simulation software must offer facilities to manage discontinuity points and handle them appropriately. This is typically done via breakpoint handling.