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: ) 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. Dynamic System, S State Variables, X Input Variables U Output Variables Y
Example: Energy-based Modeling of Systems
Deriving the ODE model
Example: Discrete-State Modeling of Systems Warehouse Systems Arriving Products u 1 (t) Departing Products u 2 (t) x(t) x(t) + 1 :arrival; u 1 (t) = 1; u 2 (t) = 0 x(t + ) = x(t) - 1 :departure; u 1 (t) = 0; u 2 (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 Motivation(s): Monitoring & Diagnosis Design, Control signal domainenergy domain control algorithm plantactuators sensors physical systemembedded controller + - T sample A/D D/A
Supervisory Controller Controller 1 Controller 2 Controller m Decision Maker Environment Plant y u u1u1 u2u2 umum Switching Signal
Example: Bouncing Ball ball position – x 1 ball velocity – x 2 acceleration – g coefficient of restitution – c [0,1] x 1 > 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 events 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: 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 h0h0 height of liquid in tank, h h0 flow through pipe
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 Discrete-Time Time-Driven Continuous-State Event-Driven Systems Dynamic Linear Time-varying Static Time-invariant Nonlinear Discrete-State Continuous-Time Deterministic Stochastic stationary DES sampled
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: e 1 e 2 …… e n Timed Language: set of all timed sequences of events that the DES can generate/execute (e 1,t 1 ) (e 2,t 2 ) …… (e n, t n ) 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