SlideShare une entreprise Scribd logo
1  sur  65
Télécharger pour lire hors ligne
Introduction to Discrete Event Systems
Soulimane MAMMAR
ENPO-MA
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 1 / 65
Introduction
Evolution of:
computing
communication
sensor technologies
Proliferation of new dynamic sys-
tems
mostly technological
often highly complex
Examples :
Computer and communication networks
Automated manufacturing systems
Air traffic control systems
Monitoring and control systems in automobiles or large buildings
Activity governed by operational rules designed by humans
Characterized by asynchronous occurrences of discrete events
Controlled : hitting a keyboard key, turning a piece of equipment “on”
Not controlled : spontaneous equipment failure, packet loss, etc.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 2 / 65
Introduction
The mathematics used to model and study the time-driven processes
governed by the laws of nature is inadequate for discrete event systems.
The challenge:
Develop new:
I Modeling frameworks
I Analysis techniques
I Design tools
I Testing methods
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 3 / 65
Systems and Models
Systems and Models
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 4 / 65
Systems and Models
Introduction
Historically, focus was on studying natural phenomena which are
well-modeled by:
Laws of gravity
Classical and non-classical mechanics
Physical chemistry
Typically quantities are "continuous variables"
Displacement, velocity, acceleration,. . . etc.
Ordinary and partial differential equations provides the main infrastructure
for system analysis and control
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 5 / 65
Systems and Models
Introduction
But in the day-to-day life . . .
Increasingly computer-dependent
Deal with "discrete" quantities
I Parts in an inventory
I Planes on a runway
I Active telephone calls
Processes depends on and are driven by instantaneous "events"
I Pushing a button
I Hitting a keyboard key
I Traffic light turning green
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 6 / 65
System and Control Basics
System and Control Basics
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 7 / 65
System and Control Basics
The Concept of System
An aggregation or assemblage of things so combined by nature or man
as to form an integral or complex whole (Encyclopedia Americana).
A regularly interacting or interdependent group of items forming a
unified whole (Webster’s Dictionary)
A combination of components that act together to perform a function
not possible with any of the individual parts (IEEE Standard
Dictionary of Electrical and Electronic Terms).
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 8 / 65
System and Control Basics
The Input–Output Modeling Process
Scientists and engineers concerns:
Quantitative analysis
Development of techniques for :
I Design
I Control
I Performance measurement
We need a model of an actual system
A device that duplicates the behavior of the system
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 9 / 65
System and Control Basics
The Input–Output Modeling Process
Defining a set of measurable variables associated with a given system.
positions, velocities, voltages, current
We select a subset of these variables that we have the ability to vary them
over time
This defines a set of time functions which we shall call the input
variables
{u1(t), · · · up(t)} t0 ≤ t ≤ tf
We select another set of variables which we assume we can directly
measure while varying the input and define them as output variables
{y1(t), · · · yp(t)} t0 ≤ t ≤ tf
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 10 / 65
System and Control Basics
The Input–Output Modeling Process
The system model in the mathematical form
y = g(u) = [g1(u1(t), · · · up(t)), · · · , gm(u1(t), · · · up(t))]T
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 11 / 65
System and Control Basics
The Input–Output Modeling Process
Example 1 (A voltage-divider system)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 12 / 65
System and Control Basics
The Input–Output Modeling Process
Example 2 (A spring-mass system)
mÿ = −ky
u(t) =
(
u0 t = 0
0 otherwise
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 13 / 65
System and Control Basics
Static and Dynamic Systems
We define a static system to be one where the output y(t) is independent
of past values of the input u(τ), τ < t for all t
A dynamic system is one where the output generally depends on past
values of the input.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 14 / 65
System and Control Basics
Time-Varying and Time-Invariant Dynamic Systems
Question: Is the output always the same when the same input is
applied ?
I Not always "YES"
Example: Suppose in example 2 that the mass attached to the spring
is actually a container full of some liquid, and that a leak develops
immediately after time t = 0
A more general representation would be
y = g(u, t)
A time-invariant system(stationary): If an input u(t) results in an
output y(t), then the input u(t − τ) results in the output y(t − τ),
for any τ
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 15 / 65
System and Control Basics
Time-Varying and Time-Invariant Dynamic Systems
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 16 / 65
System and Control Basics
The Concept of State
The state of a system at a time instant t
Describe its behavior at that instant
In measurable way
Suppose:
u(t) is completely specified for all t ≥ t0
y(t) is observed at some time t = t1 ≥ t0
Is this information adequate to uniquely predict all future output
y(t), t > t1 ?
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 17 / 65
System and Control Basics
The Concept of State
For the example 2:
Can we uniquely determine y(t1 + τ) for some time increment τ > 0?
I Answer: No
I What is missing here is information regarding the velocity of the mass
I Mathematically, we cannot solve for y(t1 + τ) with only one initial
condition, i.e., y(t1)
need information about velocity, ẏ(t1)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 18 / 65
System and Control Basics
The Concept of State
Definition
The state of a system at time t0 is the information required at t0 such
that the output y(t), for all t ≥ t0, is uniquely determined from this
information and from u(t), t ≥ t0
The state is also generally a vector, which we shall denote by x(t). The
components of this vector, x1(t), · · · , xn(t), are called state variables.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 19 / 65
System and Control Basics
The State Space Modeling Process
The modeling process:
Determine suitable mathematical relationships (dynamics)
I involving the input u(t), the output y(t), and the state x(t)
Definition
The set of equations required to specify the state x(t) for all t ≥ t0 given
x(t0) and the function u(t), t ≥ t0 , are called state equations
Definition
The state space of a system, usually denoted by X, is the set of all
possible values that the state may take.
The state equations could take several different forms, mostly the form:
ẋ(t) = f(x(t), u(t), t)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 20 / 65
System and Control Basics
The State Space Modeling Process
We have a state space model of a system when we can specify the
following set of equations:
ẋ(t) = f(x(t), u(t), t), x(t0) = x0
y(t) = g(x(t), u(t), t)
Remark
For a static system, the state equation reduces to ẋ(t) = 0 for all t
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 21 / 65
System and Control Basics
The State Space Modeling Process
Example 3
Consider the spring-mass system
I Let y(t) be the output measuring the mass displacement at time t
I u(t) the input function (as previously defined)
Suppose we define the mass displacement as a state variable
I y(t) = x1(t)
To obtain a state equation, we have at our disposal the differential equation mÿ = −ky
which, since y(t) = x1(t), we rewrite as
mẍ1 = −kx1
To obtain first-order differential equations, we introduce an additional state variable,
x2(t), which we define as
ẋ1 = x2
We now have a complete model with two state variables and a single output variable.
h
ẋ1
ẋ2
i
=

0 1
− k
m
0

,
h
x1(0)
x2(0)
i
=
h
u0
0
i
y =

0 1
h
x1
x2
i
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 22 / 65
System and Control Basics
The State Space Modeling Process
Example 4
v̇C = −
1
RC
vC +
1
RC
V
v = V − vC
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 23 / 65
System and Control Basics
Linear and Nonlinear Systems
Definition
The function g is said to be linear if and only if
g(a1u1 + a2u2) = a1g(u1) + a2g(u2)
Definition
A system is said to be linear if and only if the functions g(·) and f(·) are
both linear
ẋ(t) = A(t)x(t) + B(t)u(t)
y(t) = C(t)x(t) + D(t)u(t)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 24 / 65
System and Control Basics
Sample Paths of Dynamic Systems
Consider the state equation:
ẋ(t) = f(x(t), u(t), t)
Suppose we select a particular input function u(t) = u1(t) and some initial condition at time
t = 0, x(0) = x0
The solution to this differential equation is a particular function x1(t)
By changing u(t) and forming a family of input functions u1(t), u2(t), · · · , we obtain a
family of solutions x1(t), x2(t), · · ·
I Any member of this family of functions is referred to as a sample path
or state trajectory
Figure:
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 25 / 65
System and Control Basics
Sample Paths of Dynamic Systems
All possible values that the n-dimensional state vector x(t) can take
define an n-dimensional space
As t varies, different points are visited, thus defining a trajectory
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 26 / 65
System and Control Basics
State Spaces
State variables
I Real numbers (or interval)
I Integer values
I Values from a discrete set
{ON, OFF}, {HIGH, MEDIUM, LOW}, or {GREEN,RED, BLUE}
Continuous-state models
I The state space X is a continuum of all n-dimensional vectors of real
numbers
Discrete-state models
I The state space is a discrete set
Hybrid model
I Some state variables are discrete and some are continuous
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 27 / 65
System and Control Basics
State Spaces
Example 5: the mass spring system
We defined the 2-dimensional state vector
x =
h
x1, x2
iT
The state space X is the the set of R2
I continuous-state linear system
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 28 / 65
System and Control Basics
State Spaces
Example 6: A warehouse system
warehouse of manufactured products in a factory
we are interested in the level of inventory
x(t): number of products at time t
Output equation y(t) = x(t)
X is the set of non-negative integers {0, 1, 2, · · · }
warehouse is very large
loading a truck takes zero time
truck take away a single product at a time
no t such that u1(t) = u2(t) = 1
u1(t) =
n
1 if a product arrives at time t
0 otherwise
u2(t) =
n
1 if a truck arrives at time t
0 otherwise
x(t
+
) =
x(t) + 1 if(u1(t) = 1, u2(t) = 0)
x(t) − 1 if(u1(t) = 0, u2(t) = 1, x(t)  0)
x(t) otherwise
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 29 / 65
System and Control Basics
Deterministic and Stochastic Systems
Recall: state ⇒the ability to predict at t = t0 all future behavior of a
system
I Assuming knowledge of the input u(t) for all t ≥ t0
This assumption is not always reasonable
I precludes the unpredictable effect of nature on the input
Example 1: V (t) may be subject to random “noise”
Example 6: depends almost exclusively on the exact knowledge of the
product arrival input function u1(t) and the truck arrival input function
u2(t).
Randomness affect the state in ways that only probabilistic
mechanisms can adequately capture
A system is stochastic if at least one of its output variables is a
random variable.
Otherwise, deterministic.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 30 / 65
System and Control Basics
The Concept of Control
So far we’ve been limited to the basic issue:
I What happens to the system output for a given input?
A system contains the idea of performing a particular function
I needs to be controlled
select the right input to achieve a desired behavior (eg. driving a car)
The input to a system is often viewed as a control signal
I aimed at achieving a desired behavior.
I we represent this desired behavior by a reference signal r(t)
The control input to the actual system (control law) u(t) = γ(r(t), t)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 31 / 65
System and Control Basics
The Concept of Control
Example 7: Consider a linear time-invariant system
ẋ(t) = u(t), x(0) = 0
y(t) = x(t)
The desired behavior is to bring the state to the value x(t) = 1 and keep it there forever.
We define a reference signal
r(t) = 1 for all t ≥ 0
The control input is limited to operate in the range [−1, 1].
A simple control that works is :
u1(t) =

1 for t ≤ 1
0 for t  1
Not the only possible control law
u2(t) =
1
2
for t ≤ 2
0 for t  2
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 32 / 65
System and Control Basics
The Concept of Feedback
Feedback: Use any available information about the system behavior
in order to continuously adjust the control input
I In a conversation, we speak when the other party is silent
I In driving, we monitor the car’s position and speed in
I order to continuously make adjustments
I In heating a house, we use a thermostat
The key property of feedback is in making corrections, especially in
the presence of unexpected disturbances
Mathematically, using feedback implies that we should extend the
control law to include the state x(t)
u(t) = γ(r(t), x(t), t)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 33 / 65
System and Control Basics
Open-Loop and Closed-Loop Systems
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 34 / 65
System and Control Basics
Open-Loop and Closed-Loop Systems
Example 8:
Initial condition:
I x(0) = 0
I Outflow rate is µ(t) = 0 for
all t ≥ 0
Task:
I maintain the fluid level at its
maximum
How:
I We will control the inflow λ(t)
so as to achieve the desired
behavior
I r(t) = K for all t ≥ 0
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 35 / 65
System and Control Basics
Open-Loop and Closed-Loop Systems
State and output equations
ẋ(t) =

λ(t) if x(t)  K
0 otherwise
y(t) = x(t)
With the assumption of maximum rate ρ, We can choose for an open-loop design
λOL(t) =

ρ for t ≤ ρ/K
0 for t  ρ/K
The solution with this control gives
x(t) = ρt
x(t) = K reached at time t = K/ρ
Drawbacks of this open-loop control law:
The slightest error in measuring or unexpected disturbance
I prevent from meeting the desired behavior
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 36 / 65
System and Control Basics
Open-Loop and Closed-Loop Systems
Closed-loop control system
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 37 / 65
System and Control Basics
Open-Loop and Closed-Loop Systems
Advantages to the use of feedback
Desired behavior less sensitive to unexpected disturbances.
Desired behavior less sensitive to possible errors in the parameter
values
The output y(t) can automatically follow or track a desired reference
signal r(t)
I continuously seeking to minimize the difference (y(t) − r(t))
Feedback cost
Sensors or other potentially complex equipment may be required to
monitor the output and provide the necessary information to the
controller.
Feedback requires some effort, which may affect the system
performance.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 38 / 65
System and Control Basics
Discrete-Time Systems
We assumed that time is a continuous variable
I Corresponds to notion of time in the physical world
I Allows to develop models based on differential equations
Input and output variables of a system at discrete time instants
I Discrete-time system
Reasons to adopt such an approach
I Any computer we might use as a component of a system operates in
discrete-time fashion (clock ticks)
I Many differential equations can only be solved numerically (by
computer)
computer-generated solutions are discrete-time functions.
I Digital control techniques, based on discrete-time models, provide
flexibility, speed, and low cost.
I Some systems are inherently discrete-time
Economic models based on data that is recorded only at regular
discrete intervals
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 39 / 65
System and Control Basics
Discrete-Time Systems
In discrete-time models
time line is thought of as a sequence of intervals defined by a
sequence of points t0  t1  · · ·  tk  · · ·
It is assumed that all intervals are of equal length T
I T is the sampling interval
Discretization of time does not imply discretization of the state space
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 40 / 65
System and Control Basics
Discrete-Time Systems
Thus, the state-based model becomes
x(k + 1) = f(x(k), u(k), k), x(0) = x0
y(k) = g(x(k), u(k), k)
For the case of linear discrete-time systems
x(k + 1) = A(k)x(k) + B(k)u(k)
y(k) = C(k)x(k) + D(k)u(k)
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 41 / 65
System and Control Basics
Discrete Event Systems
State space described by a discrete set like 0, 1, 2, · · ·
State transitions are only observed at discrete points in time
I Associate state transistion with events
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 42 / 65
System and Control Basics
The Concept of Event
An event
Occur instantaneously and causing transitions from one state value to
another.
May be identified with a specific action taken
May be spontaneous
May be the result of several conditions
We denote:
An event with the symbol e
The discrete set of events with E
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 43 / 65
System and Control Basics
The Concept of Event
Example 9: (A random walk)
A random walk is a useful model for several
interesting processes
I games of chance
In two dimensions:
I may be visualized as a particle moving one unit of distance
(a step) at a time in one of four directions: north, south,
west, or east
The direction is chosen at random and independent
of the present position
The state of this system is the position of the
particle, (x1, x2)
I x1, x2 taking integer values
State space is the discrete set
I X = {(i, j) : i, j = · · · , −1, 0, 1, · · · }
Event set is
I E = {N, S, W, E}
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 44 / 65
System and Control Basics
Time-Driven and Event-Driven Systems
In continuous-state systems
state generally changes as time changes
In discrete-time models
I The clock is what drives a typical sample path.
Refered as time-driven systems
In discrete-state systems
State changes only at certain points in time
The timing mechanism:
I At every clock tick an event e (null in case of no event)
State transition is synchronized by the clock
I At various time instants (not necessarily known in advance and not
necessarily coinciding with clock ticks)
Every event defines a distinct process
State transitions are the result of combining these asynchronous and
concurrent event processes
I Referred as event-driven systems
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 45 / 65
System and Control Basics
Time-Driven and Event-Driven Systems
Example 10: (Event-driven random walk)
The random walk described in Example 9 is a time-driven system
I with every clock tick there is a single “player” who moves the particle
However, there is an alternative view of the random walk
I suppose there are four different players:
each one responsible for moving the particle in a single direction
each player acts by occasionally issuing a signal to move the particle in
his direction
I this results in an event-driven system
defined by these four asynchronously acting players
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 46 / 65
System and Control Basics
Characteristic Properties of Discrete Event Systems
Most of the successes in system and control engineering relied on
Differential-equation-based models
I or its difference equation analog
To use these models two key properties that systems must satisfy
Continuous-state systems
I Continuous-Variable Dynamic Systems (CVDS)
Time-driven
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 47 / 65
System and Control Basics
Characteristic Properties of Discrete Event Systems
Definition
A Discrete Event System (DES) is a discrete-state, event-driven system,
that is, its state evolution depends entirely on the occurrence of
asynchronous discrete events over time.
Examples of discrete-state systems:
State of a machine may be {ON, OFF} or {BUSY, IDLE, DOWN}
A computer running a program may be {WAITING FOR INPUT,
RUNNING, DOWN}
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 48 / 65
System and Control Basics
Characteristic Properties of Discrete Event Systems
Comparison of sample paths for Continuous-Variable Dynamic Systems (CVDS) and Discrete
Event Systems (DES). In a CVDS, x(t) is generally the solution of a differential equation
ẋ(t) = f(x(t), u(t), t). In a DES, x(t) is a piecewise constant function, as the state jumps from
one discrete value to another whenever an event takes place.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 49 / 65
System and Control Basics
Levels of Abstraction in the Study of DES
It is often convenient to simply write the timed sequence of events
(e1, t1), (e2, t2), (e3, t3), (e4, t4), (e5, t5), (e6, t6)
I Contains the same information as a sample path
The set of all timed sequences of events that a given system can ever
execute is called timed langage
I E: alphabet,
I sequences of events : words
Assuming that probability distribution functions are available about
the lifetime of each event
I Stochastic timed langage: a timed language together with associated
probability distribution functions
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 50 / 65
System and Control Basics
Levels of Abstraction in the Study of DES
Stochastic timed language modeling is the most detailed
If we omit the statistical information, then the corresponding timed
language enumerates all the possible sample paths of the DES
I if we delete the timing information from a timed language we obtain an
untimed langage
Three levels of abstraction at which DES are modeled and studied
Languages
I Interested in the “logical behavior
I Ensuring that a precise ordering of events takes place which satisfies a
given set of specifications
Timed langages
I Assessing the performance
I Answer questions such as:
How much time does the system spend at a particular state?
Can this sequence of events be completed by a particular deadline?
Stochastic timed languages
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 51 / 65
Examples of Discrete Event Systems
Examples of Discrete Event Systems
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 52 / 65
Examples of Discrete Event Systems
Queueing Systems
Queueing
Using a resource
I Wait
products wait for truck resource
tasks wait for CPU resouce
Queueing system
Entities that do the waiting ⇒ customers.
Resources waited for ⇒ servers.
Space where the waiting is done ⇒ queue.
Study of queueing systems
Resources are not unlimited
Customer needs are adequately satisfied
Resource access is provided in fair and efficient ways
The cost of designing and operating the system is maintained at
acceptable levels.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 53 / 65
Examples of Discrete Event Systems
Queueing Systems
Capacity of the queue
Maximum number of customers
I Somtimes assumed infinite
Queueing discipline
Rule for servicing the next customer
I eg., FIFO
Viewed as a DES
event set E = {a, d} (arrivals, departures)
state variable: number of customers in queue ⇒ queue length State
space : X = {0, 1, 2, · · · }
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 54 / 65
Examples of Discrete Event Systems
Queueing Systems
A queuing network example.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 55 / 65
Examples of Discrete Event Systems
Computer Systems
A computer systems can be
viewed as a DES
Customers:
I jobs, tasks, or
transactions
Servers:
I CPU, peripheral
devices
E = {a, d, r1, r2, d1, d2}
X = {(xC PU, x1, x2) : xC PU, x1, x2 ≥ 0}
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 56 / 65
Examples of Discrete Event Systems
Communication Systems
Customers
I messages, packets, or calls
Servers
I intermediate points
switching equipment , communication media
Control mechanisms (Protocols)
I ensure that access to the servers is granted
I objectives of the communication process are met
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 57 / 65
Examples of Discrete Event Systems
Communication Systems
Example:
A and B, both sharing a common communication medium (channel)
Channel serving one user at a time
Channel states:
I I : idle
I T : transmitting one message
I C : transmitting two or more messages (collision)
User states:
I I : idle
I T : transmitting
I W : waiting to transmit an existing message.
Two problems
I each user does not know the state of the other
I users may not know the state of the channel (may only be able to
detect one state)
States  Events
X = {(xC H, xA, xB) : xC H ∈ {I, T, C}, xA ∈ {I, T, W}, xB ∈ {I, T, W}}
E = {aA, aB, τA, τB, τCH }
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 58 / 65
Examples of Discrete Event Systems
Hybrid Systems
Systems that combine time-driven
with event-driven dynamics
proliferation due to embedding of
microprocessors (event-driven mode)
in complex automated environments
with time-driven dynamics
I automobiles, aircraft, chemical
processes, heating, ventilation
System and associated continuous-
variable controllers abstracted as a
DES for the higher levels
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 59 / 65
Examples of Discrete Event Systems
Hybrid Systems
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 60 / 65
Examples of Discrete Event Systems
Summary of System Classifications
Static and Dynamic Systems.
I In static systems the output is always independent of past values of the
input.
I In dynamic systems, the output does depend on past values of the
input.
Differential or difference equations are generally required to describe
the behavior of dynamic systems.
Time-varying and Time-invariant Systems.
I The behavior of time-invariant systems does not change with time.
I This property, also called stationarity, implies that we can apply a
specific input to a system and expect it to always respond in the same
way.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 61 / 65
Examples of Discrete Event Systems
Summary of System Classifications
Linear and Nonlinear Systems.
I A linear system satisfies the condition
g(a1u1 + a2u2) = a1g(u1) + a2g(u2), where u1 , u2 are two input
vectors, a1 , a2 are two real numbers, and g(·) is the resulting output.
Continuous-State and Discrete-State Systems.
I In continuous-state systems, the state variables can generally take on
any real (or complex) value.
I In discrete- state systems, the state variables are elements of a discrete
set (e.g., the non-negative integers).
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 62 / 65
Examples of Discrete Event Systems
Summary of System Classifications
Time-driven and Event-driven Systems.
I In time-driven systems, the state continuously changes as time changes.
I In event-driven systems, it is only the occurrence of asynchronously
generated discrete events that forces instantaneous state transitions.
In between event occurrences the state remains unaffected.
Deterministic and Stochastic Systems.
I A system becomes stochastic whenever one or more of its output
variables is a random variable.
I In this case, the state of the system is described by a stochastic process
I A probabilistic framework is required to characterize the system
behavior.
Discrete-time and Continuous-time Systems.
I A continuous-time system is one where all input, state, and output
variables are defined for all possible values of time.
I In discrete-time systems, one or more of these variables are defined at
discrete points in time only, usually as the result of some sampling
process.
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 63 / 65
Examples of Discrete Event Systems
Summary of System Classifications
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 64 / 65
Examples of Discrete Event Systems
Thanks
Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 65 / 65

Contenu connexe

Similaire à 01-system_models_slides.pdf

Similaire à 01-system_models_slides.pdf (20)

Lect2-SignalProcessing (1).pdf
Lect2-SignalProcessing (1).pdfLect2-SignalProcessing (1).pdf
Lect2-SignalProcessing (1).pdf
 
Modern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of SystemsModern Control - Lec 02 - Mathematical Modeling of Systems
Modern Control - Lec 02 - Mathematical Modeling of Systems
 
BEC- 26 control systems_unit-II
BEC- 26 control systems_unit-IIBEC- 26 control systems_unit-II
BEC- 26 control systems_unit-II
 
L2_Dynamics Overview.pdf
L2_Dynamics Overview.pdfL2_Dynamics Overview.pdf
L2_Dynamics Overview.pdf
 
Signals & Systems PPT
Signals & Systems PPTSignals & Systems PPT
Signals & Systems PPT
 
ssppt-170414031953.pdf
ssppt-170414031953.pdfssppt-170414031953.pdf
ssppt-170414031953.pdf
 
Classification of Systems: Part 1
Classification of Systems:  Part 1Classification of Systems:  Part 1
Classification of Systems: Part 1
 
P1111132678
P1111132678P1111132678
P1111132678
 
signals and systems
signals and systemssignals and systems
signals and systems
 
solver (1)
solver (1)solver (1)
solver (1)
 
Discrete Time Systems & its classifications
Discrete Time Systems & its classificationsDiscrete Time Systems & its classifications
Discrete Time Systems & its classifications
 
Introduction to Control Systems Engineering
Introduction to Control Systems EngineeringIntroduction to Control Systems Engineering
Introduction to Control Systems Engineering
 
Signal
SignalSignal
Signal
 
CHAOS CONTROL VIA ADAPTIVE INTERVAL TYPE-2 FUZZY NONSINGULAR TERMINAL SLIDING...
CHAOS CONTROL VIA ADAPTIVE INTERVAL TYPE-2 FUZZY NONSINGULAR TERMINAL SLIDING...CHAOS CONTROL VIA ADAPTIVE INTERVAL TYPE-2 FUZZY NONSINGULAR TERMINAL SLIDING...
CHAOS CONTROL VIA ADAPTIVE INTERVAL TYPE-2 FUZZY NONSINGULAR TERMINAL SLIDING...
 
COEN507 introduction to linear time invariant.pptx
COEN507 introduction to linear time invariant.pptxCOEN507 introduction to linear time invariant.pptx
COEN507 introduction to linear time invariant.pptx
 
LeastSquaresParameterEstimation.ppt
LeastSquaresParameterEstimation.pptLeastSquaresParameterEstimation.ppt
LeastSquaresParameterEstimation.ppt
 
Control system basics, block diagram and signal flow graph
Control system basics, block diagram and signal flow graphControl system basics, block diagram and signal flow graph
Control system basics, block diagram and signal flow graph
 
State space analysis.pptx
State space analysis.pptxState space analysis.pptx
State space analysis.pptx
 
Integral Backstepping Sliding Mode Control of Chaotic Forced Van Der Pol Osci...
Integral Backstepping Sliding Mode Control of Chaotic Forced Van Der Pol Osci...Integral Backstepping Sliding Mode Control of Chaotic Forced Van Der Pol Osci...
Integral Backstepping Sliding Mode Control of Chaotic Forced Van Der Pol Osci...
 
PE-3032_Lecture_01.pptx
PE-3032_Lecture_01.pptxPE-3032_Lecture_01.pptx
PE-3032_Lecture_01.pptx
 

Dernier

Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 

01-system_models_slides.pdf

  • 1. Introduction to Discrete Event Systems Soulimane MAMMAR ENPO-MA Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 1 / 65
  • 2. Introduction Evolution of: computing communication sensor technologies Proliferation of new dynamic sys- tems mostly technological often highly complex Examples : Computer and communication networks Automated manufacturing systems Air traffic control systems Monitoring and control systems in automobiles or large buildings Activity governed by operational rules designed by humans Characterized by asynchronous occurrences of discrete events Controlled : hitting a keyboard key, turning a piece of equipment “on” Not controlled : spontaneous equipment failure, packet loss, etc. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 2 / 65
  • 3. Introduction The mathematics used to model and study the time-driven processes governed by the laws of nature is inadequate for discrete event systems. The challenge: Develop new: I Modeling frameworks I Analysis techniques I Design tools I Testing methods Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 3 / 65
  • 4. Systems and Models Systems and Models Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 4 / 65
  • 5. Systems and Models Introduction Historically, focus was on studying natural phenomena which are well-modeled by: Laws of gravity Classical and non-classical mechanics Physical chemistry Typically quantities are "continuous variables" Displacement, velocity, acceleration,. . . etc. Ordinary and partial differential equations provides the main infrastructure for system analysis and control Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 5 / 65
  • 6. Systems and Models Introduction But in the day-to-day life . . . Increasingly computer-dependent Deal with "discrete" quantities I Parts in an inventory I Planes on a runway I Active telephone calls Processes depends on and are driven by instantaneous "events" I Pushing a button I Hitting a keyboard key I Traffic light turning green Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 6 / 65
  • 7. System and Control Basics System and Control Basics Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 7 / 65
  • 8. System and Control Basics The Concept of System An aggregation or assemblage of things so combined by nature or man as to form an integral or complex whole (Encyclopedia Americana). A regularly interacting or interdependent group of items forming a unified whole (Webster’s Dictionary) A combination of components that act together to perform a function not possible with any of the individual parts (IEEE Standard Dictionary of Electrical and Electronic Terms). Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 8 / 65
  • 9. System and Control Basics The Input–Output Modeling Process Scientists and engineers concerns: Quantitative analysis Development of techniques for : I Design I Control I Performance measurement We need a model of an actual system A device that duplicates the behavior of the system Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 9 / 65
  • 10. System and Control Basics The Input–Output Modeling Process Defining a set of measurable variables associated with a given system. positions, velocities, voltages, current We select a subset of these variables that we have the ability to vary them over time This defines a set of time functions which we shall call the input variables {u1(t), · · · up(t)} t0 ≤ t ≤ tf We select another set of variables which we assume we can directly measure while varying the input and define them as output variables {y1(t), · · · yp(t)} t0 ≤ t ≤ tf Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 10 / 65
  • 11. System and Control Basics The Input–Output Modeling Process The system model in the mathematical form y = g(u) = [g1(u1(t), · · · up(t)), · · · , gm(u1(t), · · · up(t))]T Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 11 / 65
  • 12. System and Control Basics The Input–Output Modeling Process Example 1 (A voltage-divider system) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 12 / 65
  • 13. System and Control Basics The Input–Output Modeling Process Example 2 (A spring-mass system) mÿ = −ky u(t) = ( u0 t = 0 0 otherwise Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 13 / 65
  • 14. System and Control Basics Static and Dynamic Systems We define a static system to be one where the output y(t) is independent of past values of the input u(τ), τ < t for all t A dynamic system is one where the output generally depends on past values of the input. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 14 / 65
  • 15. System and Control Basics Time-Varying and Time-Invariant Dynamic Systems Question: Is the output always the same when the same input is applied ? I Not always "YES" Example: Suppose in example 2 that the mass attached to the spring is actually a container full of some liquid, and that a leak develops immediately after time t = 0 A more general representation would be y = g(u, t) A time-invariant system(stationary): If an input u(t) results in an output y(t), then the input u(t − τ) results in the output y(t − τ), for any τ Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 15 / 65
  • 16. System and Control Basics Time-Varying and Time-Invariant Dynamic Systems Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 16 / 65
  • 17. System and Control Basics The Concept of State The state of a system at a time instant t Describe its behavior at that instant In measurable way Suppose: u(t) is completely specified for all t ≥ t0 y(t) is observed at some time t = t1 ≥ t0 Is this information adequate to uniquely predict all future output y(t), t > t1 ? Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 17 / 65
  • 18. System and Control Basics The Concept of State For the example 2: Can we uniquely determine y(t1 + τ) for some time increment τ > 0? I Answer: No I What is missing here is information regarding the velocity of the mass I Mathematically, we cannot solve for y(t1 + τ) with only one initial condition, i.e., y(t1) need information about velocity, ẏ(t1) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 18 / 65
  • 19. System and Control Basics The Concept of State Definition The state of a system at time t0 is the information required at t0 such that the output y(t), for all t ≥ t0, is uniquely determined from this information and from u(t), t ≥ t0 The state is also generally a vector, which we shall denote by x(t). The components of this vector, x1(t), · · · , xn(t), are called state variables. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 19 / 65
  • 20. System and Control Basics The State Space Modeling Process The modeling process: Determine suitable mathematical relationships (dynamics) I involving the input u(t), the output y(t), and the state x(t) Definition The set of equations required to specify the state x(t) for all t ≥ t0 given x(t0) and the function u(t), t ≥ t0 , are called state equations Definition The state space of a system, usually denoted by X, is the set of all possible values that the state may take. The state equations could take several different forms, mostly the form: ẋ(t) = f(x(t), u(t), t) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 20 / 65
  • 21. System and Control Basics The State Space Modeling Process We have a state space model of a system when we can specify the following set of equations: ẋ(t) = f(x(t), u(t), t), x(t0) = x0 y(t) = g(x(t), u(t), t) Remark For a static system, the state equation reduces to ẋ(t) = 0 for all t Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 21 / 65
  • 22. System and Control Basics The State Space Modeling Process Example 3 Consider the spring-mass system I Let y(t) be the output measuring the mass displacement at time t I u(t) the input function (as previously defined) Suppose we define the mass displacement as a state variable I y(t) = x1(t) To obtain a state equation, we have at our disposal the differential equation mÿ = −ky which, since y(t) = x1(t), we rewrite as mẍ1 = −kx1 To obtain first-order differential equations, we introduce an additional state variable, x2(t), which we define as ẋ1 = x2 We now have a complete model with two state variables and a single output variable. h ẋ1 ẋ2 i = 0 1 − k m 0 , h x1(0) x2(0) i = h u0 0 i y = 0 1 h x1 x2 i Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 22 / 65
  • 23. System and Control Basics The State Space Modeling Process Example 4 v̇C = − 1 RC vC + 1 RC V v = V − vC Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 23 / 65
  • 24. System and Control Basics Linear and Nonlinear Systems Definition The function g is said to be linear if and only if g(a1u1 + a2u2) = a1g(u1) + a2g(u2) Definition A system is said to be linear if and only if the functions g(·) and f(·) are both linear ẋ(t) = A(t)x(t) + B(t)u(t) y(t) = C(t)x(t) + D(t)u(t) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 24 / 65
  • 25. System and Control Basics Sample Paths of Dynamic Systems Consider the state equation: ẋ(t) = f(x(t), u(t), t) Suppose we select a particular input function u(t) = u1(t) and some initial condition at time t = 0, x(0) = x0 The solution to this differential equation is a particular function x1(t) By changing u(t) and forming a family of input functions u1(t), u2(t), · · · , we obtain a family of solutions x1(t), x2(t), · · · I Any member of this family of functions is referred to as a sample path or state trajectory Figure: Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 25 / 65
  • 26. System and Control Basics Sample Paths of Dynamic Systems All possible values that the n-dimensional state vector x(t) can take define an n-dimensional space As t varies, different points are visited, thus defining a trajectory Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 26 / 65
  • 27. System and Control Basics State Spaces State variables I Real numbers (or interval) I Integer values I Values from a discrete set {ON, OFF}, {HIGH, MEDIUM, LOW}, or {GREEN,RED, BLUE} Continuous-state models I The state space X is a continuum of all n-dimensional vectors of real numbers Discrete-state models I The state space is a discrete set Hybrid model I Some state variables are discrete and some are continuous Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 27 / 65
  • 28. System and Control Basics State Spaces Example 5: the mass spring system We defined the 2-dimensional state vector x = h x1, x2 iT The state space X is the the set of R2 I continuous-state linear system Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 28 / 65
  • 29. System and Control Basics State Spaces Example 6: A warehouse system warehouse of manufactured products in a factory we are interested in the level of inventory x(t): number of products at time t Output equation y(t) = x(t) X is the set of non-negative integers {0, 1, 2, · · · } warehouse is very large loading a truck takes zero time truck take away a single product at a time no t such that u1(t) = u2(t) = 1 u1(t) = n 1 if a product arrives at time t 0 otherwise u2(t) = n 1 if a truck arrives at time t 0 otherwise x(t + ) = x(t) + 1 if(u1(t) = 1, u2(t) = 0) x(t) − 1 if(u1(t) = 0, u2(t) = 1, x(t) 0) x(t) otherwise Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 29 / 65
  • 30. System and Control Basics Deterministic and Stochastic Systems Recall: state ⇒the ability to predict at t = t0 all future behavior of a system I Assuming knowledge of the input u(t) for all t ≥ t0 This assumption is not always reasonable I precludes the unpredictable effect of nature on the input Example 1: V (t) may be subject to random “noise” Example 6: depends almost exclusively on the exact knowledge of the product arrival input function u1(t) and the truck arrival input function u2(t). Randomness affect the state in ways that only probabilistic mechanisms can adequately capture A system is stochastic if at least one of its output variables is a random variable. Otherwise, deterministic. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 30 / 65
  • 31. System and Control Basics The Concept of Control So far we’ve been limited to the basic issue: I What happens to the system output for a given input? A system contains the idea of performing a particular function I needs to be controlled select the right input to achieve a desired behavior (eg. driving a car) The input to a system is often viewed as a control signal I aimed at achieving a desired behavior. I we represent this desired behavior by a reference signal r(t) The control input to the actual system (control law) u(t) = γ(r(t), t) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 31 / 65
  • 32. System and Control Basics The Concept of Control Example 7: Consider a linear time-invariant system ẋ(t) = u(t), x(0) = 0 y(t) = x(t) The desired behavior is to bring the state to the value x(t) = 1 and keep it there forever. We define a reference signal r(t) = 1 for all t ≥ 0 The control input is limited to operate in the range [−1, 1]. A simple control that works is : u1(t) = 1 for t ≤ 1 0 for t 1 Not the only possible control law u2(t) = 1 2 for t ≤ 2 0 for t 2 Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 32 / 65
  • 33. System and Control Basics The Concept of Feedback Feedback: Use any available information about the system behavior in order to continuously adjust the control input I In a conversation, we speak when the other party is silent I In driving, we monitor the car’s position and speed in I order to continuously make adjustments I In heating a house, we use a thermostat The key property of feedback is in making corrections, especially in the presence of unexpected disturbances Mathematically, using feedback implies that we should extend the control law to include the state x(t) u(t) = γ(r(t), x(t), t) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 33 / 65
  • 34. System and Control Basics Open-Loop and Closed-Loop Systems Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 34 / 65
  • 35. System and Control Basics Open-Loop and Closed-Loop Systems Example 8: Initial condition: I x(0) = 0 I Outflow rate is µ(t) = 0 for all t ≥ 0 Task: I maintain the fluid level at its maximum How: I We will control the inflow λ(t) so as to achieve the desired behavior I r(t) = K for all t ≥ 0 Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 35 / 65
  • 36. System and Control Basics Open-Loop and Closed-Loop Systems State and output equations ẋ(t) = λ(t) if x(t) K 0 otherwise y(t) = x(t) With the assumption of maximum rate ρ, We can choose for an open-loop design λOL(t) = ρ for t ≤ ρ/K 0 for t ρ/K The solution with this control gives x(t) = ρt x(t) = K reached at time t = K/ρ Drawbacks of this open-loop control law: The slightest error in measuring or unexpected disturbance I prevent from meeting the desired behavior Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 36 / 65
  • 37. System and Control Basics Open-Loop and Closed-Loop Systems Closed-loop control system Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 37 / 65
  • 38. System and Control Basics Open-Loop and Closed-Loop Systems Advantages to the use of feedback Desired behavior less sensitive to unexpected disturbances. Desired behavior less sensitive to possible errors in the parameter values The output y(t) can automatically follow or track a desired reference signal r(t) I continuously seeking to minimize the difference (y(t) − r(t)) Feedback cost Sensors or other potentially complex equipment may be required to monitor the output and provide the necessary information to the controller. Feedback requires some effort, which may affect the system performance. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 38 / 65
  • 39. System and Control Basics Discrete-Time Systems We assumed that time is a continuous variable I Corresponds to notion of time in the physical world I Allows to develop models based on differential equations Input and output variables of a system at discrete time instants I Discrete-time system Reasons to adopt such an approach I Any computer we might use as a component of a system operates in discrete-time fashion (clock ticks) I Many differential equations can only be solved numerically (by computer) computer-generated solutions are discrete-time functions. I Digital control techniques, based on discrete-time models, provide flexibility, speed, and low cost. I Some systems are inherently discrete-time Economic models based on data that is recorded only at regular discrete intervals Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 39 / 65
  • 40. System and Control Basics Discrete-Time Systems In discrete-time models time line is thought of as a sequence of intervals defined by a sequence of points t0 t1 · · · tk · · · It is assumed that all intervals are of equal length T I T is the sampling interval Discretization of time does not imply discretization of the state space Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 40 / 65
  • 41. System and Control Basics Discrete-Time Systems Thus, the state-based model becomes x(k + 1) = f(x(k), u(k), k), x(0) = x0 y(k) = g(x(k), u(k), k) For the case of linear discrete-time systems x(k + 1) = A(k)x(k) + B(k)u(k) y(k) = C(k)x(k) + D(k)u(k) Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 41 / 65
  • 42. System and Control Basics Discrete Event Systems State space described by a discrete set like 0, 1, 2, · · · State transitions are only observed at discrete points in time I Associate state transistion with events Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 42 / 65
  • 43. System and Control Basics The Concept of Event An event Occur instantaneously and causing transitions from one state value to another. May be identified with a specific action taken May be spontaneous May be the result of several conditions We denote: An event with the symbol e The discrete set of events with E Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 43 / 65
  • 44. System and Control Basics The Concept of Event Example 9: (A random walk) A random walk is a useful model for several interesting processes I games of chance In two dimensions: I may be visualized as a particle moving one unit of distance (a step) at a time in one of four directions: north, south, west, or east The direction is chosen at random and independent of the present position The state of this system is the position of the particle, (x1, x2) I x1, x2 taking integer values State space is the discrete set I X = {(i, j) : i, j = · · · , −1, 0, 1, · · · } Event set is I E = {N, S, W, E} Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 44 / 65
  • 45. System and Control Basics Time-Driven and Event-Driven Systems In continuous-state systems state generally changes as time changes In discrete-time models I The clock is what drives a typical sample path. Refered as time-driven systems In discrete-state systems State changes only at certain points in time The timing mechanism: I At every clock tick an event e (null in case of no event) State transition is synchronized by the clock I At various time instants (not necessarily known in advance and not necessarily coinciding with clock ticks) Every event defines a distinct process State transitions are the result of combining these asynchronous and concurrent event processes I Referred as event-driven systems Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 45 / 65
  • 46. System and Control Basics Time-Driven and Event-Driven Systems Example 10: (Event-driven random walk) The random walk described in Example 9 is a time-driven system I with every clock tick there is a single “player” who moves the particle However, there is an alternative view of the random walk I suppose there are four different players: each one responsible for moving the particle in a single direction each player acts by occasionally issuing a signal to move the particle in his direction I this results in an event-driven system defined by these four asynchronously acting players Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 46 / 65
  • 47. System and Control Basics Characteristic Properties of Discrete Event Systems Most of the successes in system and control engineering relied on Differential-equation-based models I or its difference equation analog To use these models two key properties that systems must satisfy Continuous-state systems I Continuous-Variable Dynamic Systems (CVDS) Time-driven Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 47 / 65
  • 48. System and Control Basics Characteristic Properties of Discrete Event Systems Definition A Discrete Event System (DES) is a discrete-state, event-driven system, that is, its state evolution depends entirely on the occurrence of asynchronous discrete events over time. Examples of discrete-state systems: State of a machine may be {ON, OFF} or {BUSY, IDLE, DOWN} A computer running a program may be {WAITING FOR INPUT, RUNNING, DOWN} Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 48 / 65
  • 49. System and Control Basics Characteristic Properties of Discrete Event Systems Comparison of sample paths for Continuous-Variable Dynamic Systems (CVDS) and Discrete Event Systems (DES). In a CVDS, x(t) is generally the solution of a differential equation ẋ(t) = f(x(t), u(t), t). In a DES, x(t) is a piecewise constant function, as the state jumps from one discrete value to another whenever an event takes place. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 49 / 65
  • 50. System and Control Basics Levels of Abstraction in the Study of DES It is often convenient to simply write the timed sequence of events (e1, t1), (e2, t2), (e3, t3), (e4, t4), (e5, t5), (e6, t6) I Contains the same information as a sample path The set of all timed sequences of events that a given system can ever execute is called timed langage I E: alphabet, I sequences of events : words Assuming that probability distribution functions are available about the lifetime of each event I Stochastic timed langage: a timed language together with associated probability distribution functions Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 50 / 65
  • 51. System and Control Basics Levels of Abstraction in the Study of DES Stochastic timed language modeling is the most detailed If we omit the statistical information, then the corresponding timed language enumerates all the possible sample paths of the DES I if we delete the timing information from a timed language we obtain an untimed langage Three levels of abstraction at which DES are modeled and studied Languages I Interested in the “logical behavior I Ensuring that a precise ordering of events takes place which satisfies a given set of specifications Timed langages I Assessing the performance I Answer questions such as: How much time does the system spend at a particular state? Can this sequence of events be completed by a particular deadline? Stochastic timed languages Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 51 / 65
  • 52. Examples of Discrete Event Systems Examples of Discrete Event Systems Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 52 / 65
  • 53. Examples of Discrete Event Systems Queueing Systems Queueing Using a resource I Wait products wait for truck resource tasks wait for CPU resouce Queueing system Entities that do the waiting ⇒ customers. Resources waited for ⇒ servers. Space where the waiting is done ⇒ queue. Study of queueing systems Resources are not unlimited Customer needs are adequately satisfied Resource access is provided in fair and efficient ways The cost of designing and operating the system is maintained at acceptable levels. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 53 / 65
  • 54. Examples of Discrete Event Systems Queueing Systems Capacity of the queue Maximum number of customers I Somtimes assumed infinite Queueing discipline Rule for servicing the next customer I eg., FIFO Viewed as a DES event set E = {a, d} (arrivals, departures) state variable: number of customers in queue ⇒ queue length State space : X = {0, 1, 2, · · · } Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 54 / 65
  • 55. Examples of Discrete Event Systems Queueing Systems A queuing network example. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 55 / 65
  • 56. Examples of Discrete Event Systems Computer Systems A computer systems can be viewed as a DES Customers: I jobs, tasks, or transactions Servers: I CPU, peripheral devices E = {a, d, r1, r2, d1, d2} X = {(xC PU, x1, x2) : xC PU, x1, x2 ≥ 0} Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 56 / 65
  • 57. Examples of Discrete Event Systems Communication Systems Customers I messages, packets, or calls Servers I intermediate points switching equipment , communication media Control mechanisms (Protocols) I ensure that access to the servers is granted I objectives of the communication process are met Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 57 / 65
  • 58. Examples of Discrete Event Systems Communication Systems Example: A and B, both sharing a common communication medium (channel) Channel serving one user at a time Channel states: I I : idle I T : transmitting one message I C : transmitting two or more messages (collision) User states: I I : idle I T : transmitting I W : waiting to transmit an existing message. Two problems I each user does not know the state of the other I users may not know the state of the channel (may only be able to detect one state) States Events X = {(xC H, xA, xB) : xC H ∈ {I, T, C}, xA ∈ {I, T, W}, xB ∈ {I, T, W}} E = {aA, aB, τA, τB, τCH } Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 58 / 65
  • 59. Examples of Discrete Event Systems Hybrid Systems Systems that combine time-driven with event-driven dynamics proliferation due to embedding of microprocessors (event-driven mode) in complex automated environments with time-driven dynamics I automobiles, aircraft, chemical processes, heating, ventilation System and associated continuous- variable controllers abstracted as a DES for the higher levels Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 59 / 65
  • 60. Examples of Discrete Event Systems Hybrid Systems Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 60 / 65
  • 61. Examples of Discrete Event Systems Summary of System Classifications Static and Dynamic Systems. I In static systems the output is always independent of past values of the input. I In dynamic systems, the output does depend on past values of the input. Differential or difference equations are generally required to describe the behavior of dynamic systems. Time-varying and Time-invariant Systems. I The behavior of time-invariant systems does not change with time. I This property, also called stationarity, implies that we can apply a specific input to a system and expect it to always respond in the same way. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 61 / 65
  • 62. Examples of Discrete Event Systems Summary of System Classifications Linear and Nonlinear Systems. I A linear system satisfies the condition g(a1u1 + a2u2) = a1g(u1) + a2g(u2), where u1 , u2 are two input vectors, a1 , a2 are two real numbers, and g(·) is the resulting output. Continuous-State and Discrete-State Systems. I In continuous-state systems, the state variables can generally take on any real (or complex) value. I In discrete- state systems, the state variables are elements of a discrete set (e.g., the non-negative integers). Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 62 / 65
  • 63. Examples of Discrete Event Systems Summary of System Classifications Time-driven and Event-driven Systems. I In time-driven systems, the state continuously changes as time changes. I In event-driven systems, it is only the occurrence of asynchronously generated discrete events that forces instantaneous state transitions. In between event occurrences the state remains unaffected. Deterministic and Stochastic Systems. I A system becomes stochastic whenever one or more of its output variables is a random variable. I In this case, the state of the system is described by a stochastic process I A probabilistic framework is required to characterize the system behavior. Discrete-time and Continuous-time Systems. I A continuous-time system is one where all input, state, and output variables are defined for all possible values of time. I In discrete-time systems, one or more of these variables are defined at discrete points in time only, usually as the result of some sampling process. Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 63 / 65
  • 64. Examples of Discrete Event Systems Summary of System Classifications Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 64 / 65
  • 65. Examples of Discrete Event Systems Thanks Soulimane MAMMAR (ENPO-MA) Introduction to Discrete Event Systems 65 / 65