mp260 aula01 english

Upload: emmanuel

Post on 06-Jan-2016

221 views

Category:

Documents


0 download

DESCRIPTION

aula 01

TRANSCRIPT

  • *Lesson 1 Introduction to Discrete Event Dynamic Systems (DEDS)MP 260 Modelling and Analysis of Discrete Event Dynamic Systems

    Profa. Emlia Villani

  • *Purpose of the Lesson Understand what are Discrete Event Dynamic Systems (DEDS), Continuous Variable Dynamic Systems (CVDS) and Hybrid Systems.

  • *Some definitions:An assemblage or combination of things or parts forming a complex or unitary whole. An assemblage of objects arranged in regular subordination, or after some distinct method, usually logical or scientific; a complete whole of objects related by some common law, principle, or end.A group or combination of interrelated, interdependent, or interacting elements forming a collective entity. What is a System? 1. DEDS, CVDS and Hybrid Systems

  • *System interaction with external world: Exchange of information, data, signals, material, etc.

    The System InterfaceSYSTEMOutsideWorldOutside World1. DEDS, CVDS and Hybrid Systems

  • *Discrete Event Dynamic System - DEDS1. DEDS, CVDS and Hybrid SystemsSystem evolution is performed as a function of the abrupt occurrence of events.The duration of an event is not significant. Events are instantaneous, or discrete.Asynchronous events: the time interval between two events is irregular and undefined. Between two events, the system remains in a given state.Man-made systems (system dynamics follow man-made rules)

  • *DEDS Simple Example1. DEDS, CVDS and Hybrid SystemsRoom occupation

    Initial state: empty roomState: 1 person in the roomState: 2 people in the roomState: 1 person in the roomEvent: someone entersEvent: someone entersEvent: someone exitsPossible evolutions in time 12t12t

  • *Examples of system commonly classified as DEDSManufacturing systems:States: machine on/off, empty/full buffer.Events: turn on machine, remove part from the buffer.Communication systems:States: occupied/free line.Events: send package, receive message.Pneumatic systems:States: extended/retracted actuator.Events: open valve, close valve.1. DEDS, CVDS and Hybrid Systems

  • *Continuous Variable Dynamic Systems - CVDSTime-driven: system evolution is a function of time.The system state changes in a continuous way (without discontinuities).System dynamics are often determined by physical laws (Newton laws, Ohm law, thermodynamics laws, etc.).1. DEDS, CVDS and Hybrid Systems

  • *CVDS Simple example Object in free fall

    Initial state: HmaxEvolution: H=Hmax- g*t2/2Evolution in time1. DEDS, CVDS and Hybrid Systems

  • *Examples of system commonly classified as CVDSServo mechanisms:Continuous variables: valve position, actuator position.DC motors: Continuous variables: speed, voltage, current.Hydraulic systems:Continuous variables: pressure, flow.

    1. DEDS, CVDS and Hybrid Systems

  • *Hybrid SystemsMix DEDS and CVDS behaviour:Evolution is both time-driven and event-driven.Occurrence of events triggered by the value of continuous variables.Continuous behaviour influenced by the occurrence of discrete events.Discontinuities in the continuous variables triggered by discrete event. 1. DEDS, CVDS and Hybrid Systems

  • *Examples of Hybrid SystemsBouncing ball:Event: impact on the floor.Continuous variable: height.Batch production systems:Food industry.Non linear systems with switching of linear controllers.

    1. DEDS, CVDS and Hybrid Systems

  • *Exercise 1Think of a dynamic system that you know.Describe at least three different states of the system.Extract from your description the system state variables.Describe what influences the system behaviour.Classify the system as DEDS, CVDS, hybrid.1. DEDS, CVDS and Hybrid Systems

  • *Model = Abstraction of a systemWhat is a MODEL?2. Modelling

  • *Why MODELLING?We can analyse the system and detect design errors before building it. Models supports communication and documentation. Modelling is a way of dealing with complex systems.Modelling is a way of understanding and improving our knowledge about the system.2. Modelling

  • *Exercise 1Specify 5 questions you would like to answer for your system.1. DEDS, CVDS and Hybrid Systems

  • *Modelling Dynamic Systems2. ModellingThe state of the system changes in time.The model represents the behaviour of the system:How the system state changes in time.

  • *Classification of Models - Dynamic Systems2. ModellingContinuous state variables and continuous time. Ex.: differential equation systems. timestate variable

  • *Classification of Models - Dynamic Systems2. ModellingContinuous state variables and discrete time. Ex.: difference equation system. timestate variable

  • *Discrete state variables and continuous time. Ex.: timed Petri nets.

    timestate variableClassification of Models - Dynamic Systems2. Modelling

  • *Discrete state variables and discrete time:How state variables change as a function of the events.Specify the possible sequence of events.No value is attributed to time intervals. Ex.: Petri nets. Classification of Models - Dynamic Systems2. Modelling

  • *Classification of Systems versus Classification of Models 2. ModellingWhat about models with continuous variables/discrete time e discrete variables/continuous time?Discrete Event Dynamic SystemsContinuous Variable Dynamic SystemsDiscrete variables, discrete timeContinuous variables, continuous time

  • *Discrete Event Dynamic SystemsContinuous Variable Dynamic SystemsDiscrete variables, discrete timeContinuous variables, continuous timeClassification of Systems versus Classification of Models 2. Modelling

  • *Hybrid SystemsContinuous state variablesDiscrete state variablesContinuous time (usually)Classification of Systems versus Classification of Models 2. Modelling

  • *IMPORTANTWhen we classify a system as DEDS, CVDS, or Hybrid, we are already making an abstraction of the real system.The classification of the system restrict the set of modelling and analysis techniques that can be used, therefore, it limits the kind of question that can be answered using the model.

    2. ModellingClassificao of a system depends on the purpose of the modelling activity!!!

  • *Example 1 Resource Sharing in Manufacturing System3. Examples of Modelling and AnalysisEntrance AEntrance BRobotCNC Machine 1CNC Machine 2Exit AExit B

  • *Purpose:Verify the logic of the supervisory system that allocates the resources.

    System description:Process A: Entrance A CNC 1 CNC 2 Exit A.Process B: Entrance B CNC 2 CNC 1 Exit B.All transport activity is performed by the robot.

    Example 1 Resource Sharing in Manufacturing System3. Examples of Modelling and Analysis

  • *Specification of Supervisory System:If there is a part at Entrance A and CNC 1 is free, Robot moves it to CNC 1.When a part A is delivered to CNC 1 ou 2, the machine performs the corresponding milling activity.If a part A at CNC 1 is ready and CNC 2 is free, the robot moves it to CNC 2.If a part A at CNC 2 is ready, the robot moves it to Exit A.

    Example 1 Resource Sharing in Manufacturing System3. Examples of Modelling and Analysis

  • *Specification of Supervisory System:If there is a part at Entrance B and CNC 2 is free, Robot moves it to CNC 2.When a part B is delivered to CNC 1 ou 2, the machine performs the corresponding milling activity.If a part B at CNC 2 is ready and CNC 1 is free, the robot moves it to CNC 1.If a part B at CNC 1 is ready, the robot moves it to Exit B.

    Example 1 Resource Sharing in Manufacturing System3. Examples of Modelling and Analysis

  • *ModellingPetri nets.Example 1 Resource Sharing in Manufacturing System3. Examples of Modelling and Analysis

  • *AnalysisSimulation.Example 1 Resource Sharing in Manufacturing System3. Examples of Modelling and Analysis

  • *Example 2 Landing gearPurpose:Determine the maximum time interval to reach the position landing gear extend, in any possible situation.Description of the system:Extending sequence: pressurize hydraulic line 1, extend hydraulic actuator, depressurize hydraulic line 1;Retracting sequence: pressurize hydraulic line 2, extend hydraulic actuator, depressurize hydraulic line 2;3. Examples of Modelling and Analysis

  • *Modelagem:Estados:0 LG extend1 Pressurizing line 1 ()2 Retracting actuator 3 Depressurizing line 1 ()4 LG retracted5 Pressurizing line 2 ()6 Extending actuator7 Depressurizing line 2 ()

    Time intervals associated with states:Dt1, Dt2, Dt3, Dt5, Dt6, Dt7

    Example 2 Landing gear3. Examples of Modelling and Analysis

  • *Analysis: Determination of worst case execution: Dt1+ Dt2+ Dt3+ Dt5+ Dt6+Dt7.

    e2e1012476e7e8e5e4e335e6Example 2 Landing gear3. Examples of Modelling and Analysis

  • *Example 3 Virtual Traffic LightPurposeDetermine the worst probability of not reaching a consensus after R rounds in a system with n cars.

    3. Examples of Modelling and AnalysisProbability of losing a message (Q) is variable!

    A car can - select a leader - or abort

  • ModellingDiscrete time markov chainDecision criterion: Select leader if it has received at least one message from each carOtherwise abortExample 3 Virtual Traffic Light3. Examples of Modelling and AnalysisModel of a car

  • *Example 3 Virtual Traffic LightAnalysisProbabilistic model checking.

    3. Examples of Modelling and AnalysisDisagreement: At least a car elects a leader, and at least a car aborts.

  • *PurposeDetermine the time for processing a batch.Determine the mass in the crystallizer during the batch.System descriptionIn a cane sugar factory, the crystallizer (or vacuum pan) receives the cane syrup and evaporates it for making the sugar massecuite.It is a bath process.

    Example 4 Crystallizer 3. Examples of Modelling and Analysis

  • *System descriptionStage 1 Create vaccuumStage 2 Load batch of syrup Stage 3 Concentrate syrupStage 4 Reduce vaccuumStage 5 Inject seedStage 6 Form sugar grainsStage 7 Grow crystalsStage 8 Evaporate waterStage 9 Deliver the massecuiteStage 10 Clean the panExample 4 Crystallizer 3. Examples of Modelling and Analysis

  • *ModellingPetri nets + differential equation systemsDiscrete variables: stagesDiscrete events: open/close valvesExample 4 Crystallizer 3. Examples of Modelling and Analysis

  • *ModellingStage 2:dM/dt= mindVol/dt= min* rinr = M/VoldB/dt= (-B*dM/dt+ min*Bin)/Mdh/dt= (-h*dM/dt+ min*hin)/MDifferent set of differential equations for each stage:Example 4 Crystallizer 3. Examples of Modelling and Analysis

  • *ModellingContinuous variables trigger the occurrence of events:Condigion to go from Stage 2 to Stage 3: Vol>=Kvol.

    Example 4 Crystallizer 3. Examples of Modelling and Analysis

  • *3. Examples of Modelling and AnalysisModellingExample 4 - CristallizerDiscrete event modify the value of continuous variables:Transition from Stage 5 to Stage 6: M:=M+KS (add seed).AnalysisSimulation

  • *IMPORTANTThe result of an analysis is valid when the model is correct:All the relevant features are included in the model.The system abstraction is consistent with the purpose of the analysis. A model is corret or not according to the purpose of the analysis:What are the questions you want to answer? 3. Examples of Modelling and Analysis