Transcript Document

CS 367: Model-Based Reasoning
Lecture 2 (01/15/2002)
Gautam Biswas
Today’s Lecture
Introductory Lecture (01/10): Modeling of
Systems and its applications

Examples of Discrete Event, Continuous, and
Hybrid Systems
Topic 1(2-3 weeks): Discrete Event
Modeling of Systems (ref: S. Lafortune, et
al. – Automata based models, Petri Net
based models(?))
Lecture 1: (Home Work)
Additional reading material: F.E. Cellier, H. Elmqvist, and M. Otter,
“Modeling from Physical Principles,” (pdf file URL:
http://www.vuse.vanderbilt.edu/~biswas/Courses/cs367/papers)
Problems:


1. The height of water in a reservoir fluctuates with time. If you had to
construct a dynamic system model to help water resource planners predict
variations in the height, what input quantities would you consider? How
many state variables would you need in your model?
2. Suppose you were a heating engineer and you wished to consider your
house as a dynamic system. Without a heater the average temperature of
the house would clearly vary over a 24 hour period. What might you
consider as state variables for a simple dynamic model? How would you
expand your model to predict the temperatures in several rooms in your
house? How does the installation of a thermostat controlled heater change
your model?
Systems Viewpoint to Modeling
Model to study operation of complete system as
opposed to operation of the individual parts
Method of model building: compositionality
Method of analysis: isolate into parts
Unified approach to modeling, rather than being
domain-specific



Energy-based modeling of physical systems
Discrete-event models of systems – change in system directly
linked to the occurrence of events
Combine modeling paradigms – Hybrid Systems approach to
modeling
Modeling of Dynamic Systems
State-Determined Systems -- our goal is to start with physical
component descriptions of systems understanding of component
behavior to create mathematical models of the system.
Mathematical model of state-determined system – defined by set
of ordinary differential equations on the so-called state
variables. Algebraic relations define values of other system
variables to state variables.
Dynamic behavior of state-determined system defined by (i)
values of state variables at some initial time, and (ii) future time
history of input quantities to system.
In other words, our system models – satisfy the Markov property
Uses of Dynamic Models
Analysis for prediction, explanation, understanding, and
control. Two types: (a) analytic methods, and (ii)
simulation-based methods. Given S, X at present, and U
for the future, predict future X and Y.
Identification. Given U and Y find S and X consistent with
U and Y. (under normal and faulty conditions)
Synthesis. Given U and a desired Y, find S such that S
acting on U produces Y.
Input Variables
U
Dynamic System, S
State Variables, X
Output Variables
Y
Example: Energy-based Modeling of
Systems
f1
f3
Rb1
C2
C1
f5
e2
f8
R12
R
C
C1
R1 2
C2
2
Rb2
e7
C
Sf
1
5
4
0
1
7
6
0
3
Vanderbilt University/ CIS /MPD Project
8
R
R
R b1
Rb 2
Vanderbilt University/ CIS /MPD Project
Deriving the ODE model
C
de
2
1
dt
f
2

f
1

f
3

f
4

2
1

f
f
1
b1
de
2
dt

e
f 
R

1
(
1
C R
1
b1

1
R
12
) e2  e7 
4
Example: Discrete-State Modeling of
Systems
Arriving Products
u1(t)
Warehouse Systems
x(t)
Departing Products
u2(t)
x(t+) =
x(t) + 1 :arrival; u1(t) = 1; u2(t) = 0
x(t) - 1 :departure; u1(t) = 0; u2(t) = 1; x(t) > 0
x(t)
:otherwise
Question: Is this similar to a tank system?
What is the difference?
What is A Hybrid System?
Dynamic systems that require more than one modeling
language to characterize their dynamics
Provide a mathematical framework for analyzing
systems with interacting discrete and continuous
dynamics
Capture the coupling between digital computations and
analog physical plant and environment
Continuous Dynamics: mechanical, fluid, thermal
systems, linear circuits, chemical reactions
Discrete dynamics: collisions, switches in circuits,
valves and pumps
Hybrid Models of Physical Systems
Why Hybrid Models?


Proliferation of Embedded Systems
Simplify Behavior analysis of complex non linear systems
+
-
signal domain
D/A
control
algorithm
actuators
A/D
energy domain
plant
Tsample
sensors
embedded controller
Motivation(s):
Monitoring & Diagnosis
Design, Control
physical system
Supervisory Controller
Decision
Maker
Environment
Switching
Signal
Controller 1
Controller 2
••
•
Controller m
u1
u2
y
u
Plant
um
Example: Bouncing Ball
ball position – x1 ball velocity – x2 acceleration – g
coefficient of restitution – c  [0,1]
x1 > 0  continuous flow governed by differential equation
when transition condition satisfied  discrete jump occurs
Behavior is zeno, i.e., infinite number of bounces occur in finite
time interval
Example: Thermostat
Thermostat (controller) turns on radiator between 68 & 70 degrees and
turns off the radiator between 80 and 82 degrees.
Result: non deterministic system – for a given initial condition
there are a whole family of different executions.
Discrete Event Systems (Chapter 2:
Cassandras and Lafortune: Languages and Automata)
What is a discrete event system?
State space of system discrete
 State transitions are only observed at discrete
points in time, i.e., state transitions are
associated with events

For multimedia overview of discrete event
systems look up: http://vita.bu.edu//cgc/MIDEDS
Continuous time systems versus Discrete
time systems
Levels of Abstraction in a Discrete Event System
Informal Definition of Event
Specific action

e.g., turn switch on/off
Spontaneous occurrence dictated by nature
of environment

e.g., power supply goes off
Certain conditions being met within system
height of liquid in tank, h  h0  flow through pipe
h0
Time-driven versus Event-Driven
Systems
Time-driven: Synchronous – at every clock
tick event occurs which advances system
behavior
Event-driven: Asynchronous or concurrent
– at various time instances not necessarily
known in advance and not necessarily
coinciding with clock ticks event e
announces its occurrence
Major System Classifications
Systems
Static
Dynamic
Time-varying
Time-invariant
Linear
Nonlinear
Continuous-State
sampled
stationary
Discrete-State
Time-Driven
Event-Driven
Deterministic
Discrete-Time
DES
Stochastic
Continuous-Time
State Evolution in DES
Sequence of states visited
Associated events cause the state transitions
Formal ways for describing DES behavior,
i.e., what is a language for describing DES
behavior?
Automata
 Petri Nets

Languages for DES behavior
Simplest: a timed language where timing
information has been deleted

untimed modeling formalism defined by event
sequence: e1 e2 …… en
Timed Language: set of all timed sequences of
events that the DES can generate/execute

(e1,t1) (e2,t2) …… (en,tn)
Stochastic Timed Language: a timed langauge
with a probability distribution function defined
over it
Discrete Event Modeling Formalisms
State-based: define a state space and specify a
state-transition structure:
(out_state, event, in_state) triples

e.g., Automata and Petri Nets
Trace-based: based on (recursive) algebraic
expressions

e.g., Communicating Sequential Processes (CSPs)
We will study modeling, analysis, and supervisory
control with untimed and timed automata
Automaton Model for two philosophers
Notion of parallel composition
Recursive Equation Model: Two
philosopher problem