DEVS

Last updated

DEVS, abbreviating Discrete Event System Specification, is a modular and hierarchical formalism for modeling and analyzing general systems that can be discrete event systems which might be described by state transition tables, and continuous state systems which might be described by differential equations, and hybrid continuous state and discrete event systems. DEVS is a timed event system.

Contents

History

DEVS is a formalism for modeling and analysis of discrete event systems (DESs). The DEVS formalism was invented by Bernard P. Zeigler, who is emeritus professor at the University of Arizona. DEVS was introduced to the public in Zeigler's first book, Theory of Modeling and Simulation Archived 2012-06-21 at the Wayback Machine , in 1976, while Zeigler was an associate professor at University of Michigan. DEVS can be seen as an extension of the Moore machine formalism, [1] which is a finite state automaton where the outputs are determined by the current state alone (and do not depend directly on the input). The extension was done by

  1. associating a lifespan with each state [Zeigler76],
  2. providing a hierarchical concept with an operation, called coupling [Zeigler84].

Since the lifespan of each state is a real number (more precisely, non-negative real) or infinity, it is distinguished from discrete time systems, sequential machines, and Moore machines, in which time is determined by a tick time multiplied by non-negative integers. Moreover, the lifespan can be a random variable; for example the lifespan of a given state can be distributed exponentially or uniformly. The state transition and output functions of DEVS can also be stochastic.

Zeigler proposed a hierarchical algorithm for DEVS model simulation in 1984 [Zeigler84] which was published in Simulation journal in 1987. Since then, many extended formalism from DEVS have been introduced with their own purposes: DESS/DEVS for combined continuous and discrete event systems, P-DEVS for parallel DESs, G-DEVS for piecewise continuous state trajectory modeling of DESs, RT-DEVS for realtime DESs, Cell-DEVS for cellular DESs, Fuzzy-DEVS for fuzzy DESs, Dynamic Structuring DEVS for DESs changing their coupling structures dynamically, and so on. In addition to its extensions, there are some subclasses such as SP-DEVS and FD-DEVS have been researched for achieving decidability of system properties.

Due to the modular and hierarchical modeling views, as well as its simulation-based analysis capability, the DEVS formalism and its variations have been used in many application of engineering (such as hardware design, hardware/software codesign, communications systems, manufacturing systems) and science (such as biology, and sociology)

Formalism

Fig. 1. A DEVS Model for Ping-Pong Game FD-DEVS PINGPONG.JPG
Fig. 1. A DEVS Model for Ping-Pong Game
Intuitive Example

DEVS defines system behavior as well as system structure. System behavior in DEVS formalism is described using input and output events as well as states. For example, for the ping-pong player of Fig. 1, the input event is ?receive, and the output event is !send. Each player, A, B, has its states: Send and Wait. Send state takes 0.1 seconds to send back the ball that is the output event !send, while the Wait state lasts until the player receives the ball that is the input event ?receive.

The structure of ping-pong game is to connect two players: Player A's output event !send is transmitted to Player B's input event ?receive, and vice versa.

In the classic DEVS formalism, Atomic DEVS captures the system behavior, while Coupled DEVS describes the structure of system.

The following formal definition is for Classic DEVS [ZKP00]. In this article, we will use the time base, that is the set of non-negative real numbers; the extended time base, that is the set of non-negative real numbers plus infinity.

Atomic DEVS

An atomic DEVS model is defined as a 7-tuple

where

  • is the set of input events;
  • is the set of output events;
  • is the set of sequential states (or also called the set of partial states);
  • is the initial state;
  • is the time advance function which is used to determine the lifespan of a state;
  • is the external transition function which defines how an input event changes a state of the system, where is the set of total states, and is the elapsed time since the last event;

[2]


  • is the internal transition function which defines how a state of the system changes internally (when the elapsed time reaches to the lifetime of the state);
  • is the output function where and is a silent event or an unobserved event. This function defines how a state of the system generates an output event (when the elapsed time reaches to the lifetime of the state);
The atomic DEVS Model for Ping-Pong Players

The atomic DEVS model for player A of Fig. 1 is given Player= such that

Both Player A and Player B are atomic DEVS models.

Behavior of atomic DEVS

Simply speaking, there are two cases that an atomic DEVS model can change its state : (1) when an external input comes into the system ; (2) when the elapsed time reaches the lifespan of which is defined by . (At the same time of (2), generates an output which is defined by .) .

For formal behavior description of given an Atomic DEVS model, refer to the page Behavior of DEVS. Computer algorithms to implement the behavior of a given Atomic DEVS model are available at Simulation Algorithms for Atomic DEVS.

Coupled DEVS

The coupled DEVS defines which sub-components belong to it and how they are connected with each other. A coupled DEVS model is defined as an 8-tuple

where

  • is the set of input events;
  • is the set of output events;
  • is the name set of sub-components;
  • is the set of sub-components where for each can be either an atomic DEVS model or a coupled DEVS model.
  • is the set of external input couplings;
  • is the set of internal couplings;
  • is the external output coupling function;
  • is the tie-breaking function which defines how to select the event from the set of simultaneous events;
The coupled DEVS model for Ping-Pong Game

The ping-pong game of Fig. 1 can be modeled as a coupled DEVS model where ;;; is described as above; ; ; and .

Behavior of coupled DEVS

Simply speaking, like the behavior of the atomic DEVS class, a coupled DEVS model changes its components' states (1) when an external event comes into ; (2) when one of components where executes its internal state transition and generates its output . In both cases (1) and (2), a triggering event is transmitted to all influencees which are defined by coupling sets and .

For formal definition of behavior of the coupled DEVS, you can refer to Behavior of Coupled DEVS. Computer algorithms to implement the behavior of a given coupled DEVS mode are available at Simulation Algorithms for Coupled DEVS.

Analysis methods

Simulation for discrete event systems

The simulation algorithm of DEVS models considers two issues: time synchronization and message propagation. Time synchronization of DEVS is to control all models to have the identical current time. However, for an efficient execution, the algorithm makes the current time jump to the most urgent time when an event is scheduled to execute its internal state transition as well as its output generation. Message propagation is to transmit a triggering message which can be either an input or output event along the associated couplings which are defined in a coupled DEVS model. For more detailed information, the reader can refer to Simulation Algorithms for Atomic DEVS and Simulation Algorithms for Coupled DEVS.

Simulation for continuous state systems

By introducing a quantization method which abstracts a continuous segment as a piecewise const segment, DEVS can simulate behaviors of continuous state systems which are described by networks of differential algebraic equations. This research has been initiated by Zeigler in 1990s [3] and many properties have been clarified by Prof. Kofman in 2000s and Dr. Nutaro. In 2006, Prof. Cellier who is the author of Continuous System Modeling [Cellier91], and Prof. Kofman wrote a text book, Continuous System Simulation [CK06] in which Chapters 11 and 12 cover how DEVS simulates continuous state systems. Dr. Nutaro's book [Nutaro10], covers the discrete event simulation of continuous state systems too.

Verification for discrete event systems

As an alternative analysis method against the sampling-based simulation method, an exhaustive generating behavior approach, generally called verification has been applied for analysis of DEVS models. It is proven that infinite states of a given DEVS model (especially a coupled DEVS model ) can be abstracted by behaviorally isomorphic finite structure, called a reachability graph when the given DEVS model is a sub-class of DEVS such as Schedule-Preserving DEVS (SP-DEVS), Finite & Deterministic DEVS (FD-DEVS) [HZ09], and Finite & Real-time DEVS (FRT-DEVS) [Hwang12]. As a result, based on the rechability graph, (1) dead-lock and live-lock freeness as qualitative properties are decidable with SP-DEVS [Hwang05], FD-DEVS [HZ06], and FRT-DEVS [Hwang12]; and (2) min/max processing time bounds as a quantitative property are decidable with SP-DEVS so far by 2012.

Variations of DEVS

Extensions (superclassing)

Numerous extensions of the classic DEVS formalism have been developed in the last decades. Among them formalisms which allow to have changing model structures while the simulation time evolves.

G-DEVS [Giambiasi01][Zacharewicz08], Parallel DEVS, Dynamic Structuring DEVS, Cell-DEVS [Wainer09], dynDEVS, Fuzzy-DEVS, GK-DEVS, ml-DEVS, Symbolic DEVS, Real-Time DEVS, rho-DEVS

Restrictions (subclassing)

There are some sub-classes known as Schedule-Preserving DEVS (SP-DEVS) and Finite and Deterministic DEVS (FD-DEVS) which were designated to support verification analysis. SP-DEVS and FD-DEVS whose expressiveness are E(SP-DEVS) E(FD-DEVS)E(DEVS) where E(formalism) denotes the expressiveness of formalism.

See also

Other formalisms

Footnotes

  1. automata were the mathematical models of Dr. Zeigler's Ph.D. thesis [Zeigler68]
  2. We can also define the external transition function as where such that for a total state , is a partial state, is the lifespan of , and is the elapsed time since last update of . For more how to understand this function, refer to the article, Behavior of DEVS.
  3. the use of quantized values in order to simulate continuous systems by means of a discrete event method was empirically tried out a few years sooner - in the early 1990s - by a French engineer <We need any reference for this argument>. He was then working for a company spun off from University of Valenciennes, and now part of the Schneider Electric. This quantization is a feature of a simulation software of which this engineer is the conceptor and main developer, that is used for PLC programs checking and operator training.

Related Research Articles

<span class="mw-page-title-main">Finite-state machine</span> Mathematical model of computation

A finite-state machine (FSM) or finite-state automaton, finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition. Finite-state machines are of two types—deterministic finite-state machines and non-deterministic finite-state machines. For any non-deterministic finite-state machine, an equivalent deterministic one can be constructed.

A mathematical model is an abstract description of a concrete system using mathematical concepts and language. The process of developing a mathematical model is termed mathematical modeling. Mathematical models are used in applied mathematics and in the natural sciences and engineering disciplines, as well as in non-physical systems such as the social sciences. It can also be taught as a subject in its own right.

In engineering, a transfer function of a system, sub-system, or component is a mathematical function that models the system's output for each possible input. It is widely used in electronic engineering tools like circuit simulators and control systems. In simple cases, this function can be represented as a two-dimensional graph of an independent scalar input versus the dependent scalar output. Transfer functions for components are used to design and analyze systems assembled from components, particularly using the block diagram technique, in electronics and control theory.

<span class="mw-page-title-main">Petri net</span> Model to describe distributed systems

A Petri net, also known as a place/transition (PT) net, is one of several mathematical modeling languages for the description of distributed systems. It is a class of discrete event dynamic system. A Petri net is a directed bipartite graph that has two types of elements: places and transitions. Place elements are depicted as white circles and transition elements are depicted as rectangles. A place can contain any number of tokens, depicted as black circles. A transition is enabled if all places connected to it as inputs contain at least one token. Some sources state that Petri nets were invented in August 1939 by Carl Adam Petri—at the age of 13—for the purpose of describing chemical processes.

In control engineering and system identification, a state-space representation is a mathematical model of a physical system specified as a set of input, output, and variables related by first-order differential equations or difference equations. Such variables, called state variables, evolve over time in a way that depends on the values they have at any given instant and on the externally imposed values of input variables. Output variables’ values depend on the values of the state variables and may also depend on the values of the input variables.

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.

Observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs.

<span class="mw-page-title-main">Linear time-invariant system</span> Mathematical model which is both linear and time-invariant

In system analysis, among other fields of study, a linear time-invariant (LTI) system is a system that produces an output signal from any input signal subject to the constraints of linearity and time-invariance; these terms are briefly defined below. These properties apply (exactly or approximately) to many important physical systems, in which case the response y(t) of the system to an arbitrary input x(t) can be found directly using convolution: y(t) = (xh)(t) where h(t) is called the system's impulse response and ∗ represents convolution (not to be confused with multiplication). What's more, there are systematic methods for solving any such system (determining h(t)), whereas systems not meeting both properties are generally more difficult (or impossible) to solve analytically. A good example of an LTI system is any electrical circuit consisting of resistors, capacitors, inductors and linear amplifiers.

The situation calculus is a logic formalism designed for representing and reasoning about dynamical domains. It was first introduced by John McCarthy in 1963. The main version of the situational calculus that is presented in this article is based on that introduced by Ray Reiter in 1991. It is followed by sections about McCarthy's 1986 version and a logic programming formulation.

SP-DEVS abbreviating "Schedule-Preserving Discrete Event System Specification" is a formalism for modeling and analyzing discrete event systems in both simulation and verification ways. SP-DEVS also provides modular and hierarchical modeling features which have been inherited from the Classic DEVS.

FD-DEVS is a formalism for modeling and analyzing discrete event dynamic systems in both simulation and verification ways. FD-DEVS also provides modular and hierarchical modeling features which have been inherited from Classic DEVS.

The behavior of a given DEVS model is a set of sequences of timed events including null events, called event segments, which make the model move from one state to another within a set of legal states. To define it this way, the concept of a set of illegal state as well a set of legal states needs to be introduced.

The General System has been described in [Zeigler76] and [ZPK00] with the standpoints to define (1) the time base, (2) the admissible input segments, (3) the system states, (4) the state trajectory with an admissible input segment, (5) the output for a given state.

In theoretical computer science, DEVS is closed under coupling [Zeigper84] [ZPK00]. In other words, given a coupled DEVS model , its behavior is described as an atomic DEVS model . For a given coupled DEVS , once we have an equivalent atomic DEVS , behavior of can be referred to behavior of atomic DEVS which is based on Timed Event System.

Given an atomic DEVS model, simulation algorithms are methods to generate the model's legal behaviors which are trajectories not to reach to illegal states.. [Zeigler84] originally introduced the algorithms that handle time variables related to lifespan and elapsed time by introducing two other time variables, last event time, , and next event time with the following relations:

Given a coupled DEVS model, simulation algorithms are methods to generate the model's legal behaviors, which are a set of trajectories not to reach illegal states. [Zeigler84] originally introduced the algorithms that handle time variables related to lifespan and elapsed time by introducing two other time variables, last event time, , and next event time with the following relations:

Pregroup grammar (PG) is a grammar formalism intimately related to categorial grammars. Much like categorial grammar (CG), PG is a kind of type logical grammar. Unlike CG, however, PG does not have a distinguished function type. Rather, PG uses inverse types combined with its monoidal operation.

The quantized state systems (QSS) methods are a family of numerical integration solvers based on the idea of state quantization, dual to the traditional idea of time discretization. Unlike traditional numerical solution methods, which approach the problem by discretizing time and solving for the next (real-valued) state at each successive time step, QSS methods keep time as a continuous entity and instead quantize the system's state, instead solving for the time at which the state deviates from its quantized value by a quantum.

<span class="mw-page-title-main">Bernard P. Zeigler</span> Engineer

Bernard P. Zeigler is a Canadian-born engineer, and Professor Emeritus of Electrical and Computer Engineering at the University of Arizona. Zeigler is a notable figure in the field of advanced modelling and simulation, known for inventing Discrete Event System Specification (DEVS) in 1976. Zeigler is also Chief Scientist at RTSync, a company with expertise in the commercial applications of DEVS, and specializations in Model-Based System Engineering (MSBE), Predictive Analytics, and Machine Learning technology.

<span class="mw-page-title-main">Gabriel Wainer</span> Canadian Computer Scientists

Gabriel A. Wainer is a Canadian/Argentinian computer scientist known for his work in modeling and simulation. He is a Professor in the Department of Systems and Computer Engineering at Carleton University in Ottawa, Canada.

References