Introduction
Introduction to the ModelicaDEVS
Library
The goal of this thesis is to implement a new Dymola/Modelica
library, consisting of a number of blocks that enable simulation
according to the DEVS
formalism. The ulterior motive is to provide Dymola with an
additional integration method based on the DEVS methodology.
Dymola/Modelica primarily deals with continuous physical problems,
usually described by differential equations. Integration is
therefore an important subject and justifies the attempt to
improve/enhance Dymola's current possibilities regarding
integration methods.
It may be a bit surprising at a first glance why a methodology such
as DEVS, originally designed for discrete systems, should be useful
for the simulation of continuous systems.
Toward the end of the nineties however, a new approach for
numerical integration has been developed by Zeigler et al.
[Zeigler98]: given the fact that all computer-based simulations
have to undergo a discretisation in one way or another - as digital
machines are not able to process raw continuous signals - the basic
idea of the new integration approach was to replace the
discretisation of time by a discretisation of state, such that the
system is not supposed to advance from time step to time step
anymore, but rather from state to state. While conventionally the
time axis was subdivided into intervals of equal length, the time
instants when the system executes the next simulation step are now
distributed irregularly because of their dependence on the time
instants when the system enters a new state which is not
necessarily at equidistant time instants.
The DEVS formalism turned out to be particularly suited to
implement such a state quantisation approach given that it is not
limited to a finite number of system states, in contrast to other
discrete-event simulation techniques.
The Quantised
State Systems introduced by Kofman [Kofman01] in 2001 improved
the original quantised state approach of Zeigler, and hence gave
rise to efficient DEVS simulation of large and complex
systems.
The simulation of a continuous system by a (discrete) DEVS model
comes with several benefits:
- Usually, the classic methods use a discretisation of time,
which however has the drawback that the variables have to be
updated contemporarily. Thus, the time steps have to be chosen
according to the variable that changes the fastest, otherwise a
change in that variable could be missed. In a large system where
probably very slow but also very fast variables are present (many
slow and a few fast variables, in the worst case), this is critical
to computation time, since the slow variables have to be updated
way too often.
Note that the need for updating variables contemporarily does not
hold for methods with dense output. However, today's integration
methods make rarely use of dense output, hence the above statement
is true for the majority of used integration methods.
- The DEVS formalism however allows for asynchronous variable
updates, whereby the computational costs can be reduced
significantly: every variable updates at its own speed; there is no
need anymore for an adaptation to the fastest one in order not to
miss important developments between time steps.
This property could be extremely useful in stiff systems that
exhibit widely spread eigenvalues, i.e., that feature mixed slow
and fast variables.
- The DEVS formalism is very well suited for problems with
frequent switching operations such as electrical power systems.
Given that the problem of iteration at discontinuities does not
apply anymore, it even allows for real-time simulation.
- For hybrid systems with continuous-time, discrete-time and
discrete-events parts, a discrete-event method provides a "unified
simulation framework": discrete-time methods can be seen as a
particular case of discrete-events methods [Kofman01] and
continuous-time parts can be transformed straightforwardly to
discrete-time/discrete-events systems.
- When using the Quantised State Systems approach of Kofman in
order to transform a continuous system into a discrete system,
there exists a closed formula for the global error bound
[Cellier05], which allows a mathematical analysis of the
simulation.
Since the mid seventies, when Zeigler introduced the DEVS formalism
[Zeigler76], there have emerged several DEVS implementations, most
of them designed to simulate discrete systems. However, one
simulation/modelling software systems that is aimed at simulating
continuous systems, is PowerDEVS: it
provides the components for modelling the block diagram
representation of any system described by DAE's.
Given the fact that the implementation of the PowerDEVS
functionality in Modelica perfectly matches our goal of providing
Dymola with an additional simulation method for continuous systems,
ModelicaDEVS is developed as closely as possible to
PowerDEVS.
Although ModelicaDEVS
is primarily an attempt at enhancing Dymola's integration
competences by the benefits of DEVS integration using the
synchronous information flow principle of the programming language
Modelica, the new library can of course also be used for common
discrete-event simulations that do not need to integrate
anything.
Generated at 2026-04-14T18:18:34Z by OpenModelicaOpenModelica 1.26.3 using
GenerateDoc.mos