packageQSS
Quantised State Systems
Information
Quantised State SystemsThis section explains a) why the DEVS formalism is suited to simulate a continuous system and b) how this is done in a correct way preserving the DEVS formalism's rule of legitimacy.
Discrete Simulation of a Continuous System
For a system to be representable by a DEVS model, the only condition is to show an input/output behaviour that is describable by a sequence of events. In other words, the DEVS formalism is able to model any system with piecewise constant input/output trajectories, since piecewise constant trajectories can be described by events [Cellier05].
Hence, if we want to simulate a continuous system by a DEVS model, we "just" have to transform the continuous system into a system with piecewise constant input/output trajectories.
This was the basic idea of a quantisation based method developed in the late nineties by Zeigler et al. [Zeigler98] to approximate a continuous system by a discrete-event simulation: a quantisation function was used to transform the continuous state variables into quantised discrete valued variables (a quantisation function maps all real numbers into a discrete set of real values).
Let us see now what it needs to quantise a continuous system. Consider the following system given in its state-space representation (remember that usually, continuous systems are described by a set of differential equations):
where x(t) is the state vector and u(t) is the input vector, i.e. a piecewise constant function.
The corresponding quantised state system has the following form:
where q(t) is the (componentwise) quantised version of the original input vector x(t), whereas a very simple quantisation function could be
The figure below shows the respective block diagrams for the systems defined above. Note that the representation by block diagrams will be useful as soon as we will want to map the system onto a (coupled) DEVS model.

The subsequent paragraphs shall give a brief introduction into the theory and use of Quantised State Systems as a (sufficient) means to approximate continuous systems by discrete events. Special attention is paid to the role of hysteresis in the quantisation function.
Quantised State Systems (QSS)
Quantised State Systems are defined as follows [Kofman01]: "QSS are continuous time systems where the input trajectories are piecewise constant functions and the state variable trajectories - being themselves piecewise linear functions - are converted into piecewise constant functions via a quantisation function equipped with hysteresis."
The goal of Quantised State Systems is to provide a legitimate system that can be simulated by the DEVS formalism. These two properties are achieved by a) the fact that the input/output trajectories are piecewise constant functions, which allows the simulation by the DEVS formalism, and b) the addition of hysteresis to the quantisation function by which the continuous system is transformed into the discrete representation.
A hysteretic quantisation function is defined as follows [Cellier05]: Let Q={Q0,Q1,...,Qr} be a set of real numbers where Qk-1< Qk with 1<= k<= r. Let Omega be the set of piecewise continuous trajectories and let x element of Omega be a continuous trajectory. The mapping b: Omega -> Omega is a hysteretic quantisation function if the trajectory q=b(x) satisfies:
| q(t) = | Qm | if t=t0 |
| Qk+1 | if x(t)=Qk+1 and q(t-)= Qk and k < r | |
| Qk-1 | if x(t)=Qk -ε and q(t-)= Qk and k > 0 | |
| q(t-) | otherwise |
| m = | 0 | if x(t0) < Q0 |
| r | if x(t0) >= Qr | |
| j | if Qj <= x(t0) < Qj+1 |


A formal prove why adding hysteresis to a quantisation function guarantees a legitimate system transformation is given in [Kofman01].
The Quantised State System described above is a first-order approximation of the real system trajectory. Kofman however has also introduced second- and third-order approximations that - without the application of smaller "step" sizes (i.e. a smaller quantum value) - may reduce the error made by the approximation. These systems are referred to as QSS2 and QSS3. The higher-order Quantised State Systems are based on the Taylor series up to first- or second-order (for QSS2 and QSS3, respectively).
Since the possibility of having different types of QSS has only been mentioned in view of the chapter about ModelicaDEVS, they are not discussed any further here. However, a detailed description of the QSS2 and the QSS3 can be found in [Kofman02] and [Kofman05] respectively.