The combined Continuous Time/Discrete Event model of computation

To overcome the limitations described Continuous-Time computation models, the continuous-time model of computation is extended by adding Discrete-Event semantics.

The Discrete-Event part of the CTDE domain is similar to the computational model implemented in the MLDesigner DE domain.

Model components typically transfer information between different blocks as real-value-timestamped messages. These messages are also called discrete events and, therefore, Discrete Event models depict signals as sequences of events as shown below.

Combined Continuous Time/Discrete Event models of computation form a well-defined and especially expressive extension of pure continuous-time formalisms. This computational model is usually referred to as Discrete-Event/Differential Equation Specified System (DEV&DESS) or Mixed-Signal simulation.

A Discrete-Event signal

The CTDE computational model

As depicted in the figure below, a combined model consists of a continuous and a Discrete-Event component. Both model parts may contain inputs, outputs and states of their respective types. The CT/DE combined model of computation explicitly defines the way these components influence each other. These interactions are also called events and can occur as time events, external input events or state events.

Structure of a combined model

Time events are related to events in pure Discrete-Event models. They are initiated in the discrete part, but could possibly change the state in the continuous part.

External input events are input messages that occur at the input ports of the Discrete-Event-partition. They are similar to time events and are handled in the same way.

State events are initiated by the continuous model. A state event is triggered when a condition that depends on continuous state or input values, is satisfied. In general, this condition can be expressed by a state event equation:

\begin{equation} C(u(t), x(t), t) = 0 \end{equation}

Note that it is only possible to determine if a state event occurred within a specific time period after an integration-step algorithm has been completed because the event condition depends on values that change continuously. The scheduler in the CTDE domain ensures that the exact time of a state event is accurately determined, and the discrete and the continuous parts of the model are synchronized properly.

Model structure

CT/DE models, primitives as well as modules and systems, may contain both continuous and discrete-event elements, and may have an arbitrary combination of discrete and continuous input and output ports. As an example of a general hybrid block, the limited integrator block is depicted below. Beside the continuous input and state output of a pure continuous integrator, it contains a discrete input for resetting the state value and a saturation output which signals reaching the upper or lower limit as a discrete event.

Pure continuous or discrete blocks are special cases of the general hybrid and can be modeled using this atomic element. This allows a uniform representation of all blocks in a combined model. The CTDE domain supports two distinct signal forms. Continuous waveforms with value-semantics are passed between continuous time ports; messages, transmitted as discrete events, are passed between discrete event ports. Conversion blocks connect ports of unlike ports and convert the signals from one form to the other.

The LimitedIntegrator primitive as example of a general hybrid block