Hybrid Systems Concurrent Models of Computation EEN 417 Fall 2013.

Slides:



Advertisements
Similar presentations
Modelos de Computação Básicos Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
Advertisements

Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
The cardiac pacemaker – SystemJ versus Safety Critical Java Heejong Park, Avinash Malik, Muhammad Nadeem, and Zoran Salcic. University of Auckland, NZ.
CPE555A: Real-Time Embedded Systems
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
CS 367: Model-Based Reasoning Lecture 2 (01/15/2002)
Timed Automata.
Supervisory Control of Hybrid Systems Written by X. D. Koutsoukos et al. Presented by Wu, Jian 04/16/2002.
EECE Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Type System, March 12, Data Types and Behavioral Types Yuhong Xiong Edward A. Lee Department of Electrical Engineering and Computer Sciences University.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Leveraging Synchronous Language Principles for Hybrid System Models Haiyang Zheng and.
Using Interfaces to Analyze Compositionality Haiyang Zheng and Rachel Zhou EE290N Class Project Presentation Dec. 10, 2004.
6th Biennial Ptolemy Miniconference Berkeley, CA May 12, 2005 Operational Semantics of Hybrid Systems Haiyang Zheng and Edward A. Lee With contributions.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Chess Review May 11, 2005 Berkeley, CA Operational Semantics of Hybrid Systems Haiyang Zheng and Edward A. Lee With contributions from the Ptolemy group.
EECE Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and.
An Extensible Type System for Component-Based Design
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Models of Computation for Embedded System Design Alvise Bonivento.
Chapter 11: Distributed Processing Parallel programming Principles of parallel programming languages Concurrent execution –Programming constructs –Guarded.
MoBIES PI-Meeting, July 2001, Jackson Hole Controller Design Using Multiple Models of Computation Edward Lee Johan Eker with thanks to Paul Griffiths,
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
SEC PI Meeting Annapolis, May 8-9, 2001 Component-Based Design of Embedded Control Systems Edward A. Lee & Jie Liu UC Berkeley with thanks to the entire.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Concurrent Component Patterns, Models of Computation, and.
Mahapatra-A&M-Sprong'021 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
Real-Time Operating System Chapter – 8 Embedded System: An integrated approach.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Operational Semantics of Hybrid Systems Edward A. Lee and Haiyang Zheng With contributions from: Adam Cataldo, Jie Liu, Xiaojun Liu, Eleftherios Matsikoudis.
Copyright © Cengage Learning. All rights reserved. 1 Functions and Limits.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Composing Models of Computation in Kepler/Ptolemy II
BsysE595 Lecture Basic modeling approaches for engineering systems – Summary and Review Shulin Chen January 10, 2013.
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: Useful Building Blocks Time-Shifting of Signals Derivatives Sampling (Introduction)
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Scheduling policies for real- time embedded systems.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
CSE 522 Model-based Development (1) Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
1 Model Checking of Robotic Control Systems Presenting: Sebastian Scherer Authors: Sebastian Scherer, Flavio Lerda, and Edmund M. Clarke.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
CSCI1600: Embedded and Real Time Software Lecture 8: Modeling III: Hybrid Systems Steven Reiss, Fall 2015.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Lecture 2, CS52701 The Real Time Computing Environment I CS 5270 Lecture 2.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS333 Intro to Operating Systems Jonathan Walpole.
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
Lecture 9: PID Controller.
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
DISCRETE DYNAMICS EEN 417 Fall Midterm I In class on 10/4 Covered Material will be: Chapter 1 (Introduction) Chapters 2 & 3 (Continuous and Discrete.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VII. System Specification (I)
State Space Representation
CPE555A: Real-Time Embedded Systems
Real-time Software Design
Event Relation Graphs and Extensions in Ptolemy II
Concurrent Models of Computation
Copyright © Cengage Learning. All rights reserved.
State Space Analysis UNIT-V.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Hybrid Systems Concurrent Models of Computation EEN 417 Fall 2013

HYBRID SYSTEMS

Discrete System (FSM) Continuous System Hybrid System jump flow

Topics in Today’s Lecture Examples of Hybrid Systems The Hybrid Automaton Model – properties of this kind of model

A Thermostat (happen instantaneously)

Dynamics of Thermostat t x on off

Hybrid Automaton for Thermostat Is this automaton deterministic?

Formal Representation of Hybrid Automaton

Where do Hybrid Systems arise? Digital controller of physical “plant” – thermostat – controller for power plant – intelligent cruise control in cars – aircraft auto pilot Phased operation of natural phenomena – bouncing ball – biological cell growth Multi-agent systems – ground and air transportation systems – interacting robots (e.g., RoboSoccer)

Another example Example due to George Pappas, UPenn Change in Temperature

Nuclear reactor example (contd.) Example due to George Pappas, UPenn Each time step, T, y1, and y2 change.

Hybrid Automaton for Bouncing Ball x – vertical distance from ground (position) v – velocity c – coefficient of restitution, 0 · c · 1

Behavior of Bouncing Ball Automaton: Plot position x as a function of time t, where x starts at height x max What kind of plot would you expect?

Simulation of Bouncing Ball Automaton in Ptolemy II / HyVisual

Zeno Behavior What is a Zeno machine?

Zeno Behavior Informally: The system makes an infinite number of jumps in finite time

A Run/Execution of a Hybrid Automaton time

Zeno Behavior: Formal Definition time

Analysis of Zeno Behavior of Bouncing Ball

Why does Zeno Behavior Arise?

Our model is a mathematical artifact

Why does Zeno Behavior Arise? Our model is a mathematical artifact Zeno behavior is mathematically possible, but it is infeasible in the real, physical world Points to some unrealistic assumption in the model

CONCURRENT MODELS OF COMPUTATION

Recall: Actor Model for State Machines Expose inputs and outputs, enabling composition:

Recall: Actor Model of Continuous-Time Systems A system is a function that accepts an input signal and yields an output signal. The domain and range of the system function are sets of signals, which themselves are functions. Parameters may affect the definition of the function S.

Example: Actor model of the helicopter Input is the net torque of the tail rotor and the top rotor. Output is the angular velocity around the y axis. Parameters of the model are shown in the box. The input and output relation is given by the equation to the right.

Recall: Composition of actor models

Recall: Feedback Composition Angular velocity appears on both sides. The semantics (meaning) of the model is the solution to this equation.

Models of Computation (MoC) A model of computation assigns semantics (meaning) to the syntax defined in the actor model. The MoC gives operational rules for executing a model. These rules determine when actors perform internal computation, update their internal state, and perform external communication. An MoC also defines the nature of communication between components (e.g., buffered I/O).

Model of Computation (MoC): Continuous Time (CT)

Discrete-Time (DT) Actor Models Discrete-time helicopter model looks the same:

Time-Triggered Reactions of FSMs use a Discrete-Time MoC sigG sigY sigR pedR pedG

Mixed Signal Models A more reasonable model of a discrete helicopter controller would be a mixed-signal model: Here, the signals inside the blue area are continuous-time signals, and the ones outside are discrete-time signals.

To jointly model discrete and continuous-time signals in the same MoC, use the notion of “absent” values Event-triggered composition of state machines uses a discrete-event MoC.

Actors are not the only way to do things Imperative, Threads, Declarative physical models, Constraints, … Modelica model of an industrial robot. Modelica uses Spice- like models where components have no inputs or outputs.

Uniformly Timed Schedule A preferable schedule would space invocations of A and B uniformly in time, as in: … minimum latency

Non-Concurrent Uniformly Timed Schedule Notice that in this schedule, the rate at which A and B can be invoked is limited by the execution time of C. … No jitter, but utilization is poor.

Concurrent Uniformly Timed Schedule: Preemptive schedule With preemption, the rate at which A and B can be invoked is limited only by total computation: … … preemptions thread 1: thread 2: high priority low priority

Ignoring Initial Transients, Abstract to Periodic Tasks In steady-state, the execution follows a simple periodic pattern: … … thread 1: thread 2: sampleTime = 1 sampleTime = 8 This follows the principles of rate- monotonic scheduling (RMS).

Requirement 1 for Determinacy: Periodicity If the execution of C runs longer than expected, data determinacy requires that thread 1 be delayed accordingly. This can be accomplished with semaphore synchronization. But there are alternatives: Throw an exception to indicate timing failure. “Anytime” computation: use incomplete results of C … … thread 1: thread 2: sampleTime: 1 sampleTime: 8 interlock

Requirement 1 for Determinacy: Periodicity If the execution of C runs shorter than expected, data determinacy requires that thread 2 be delayed accordingly. That is, it must not start the next execution of C before the data is available. … … thread 1: thread 2: sampleTime: 1 sampleTime: 8 interlock

Semaphore Synchronization Required Exactly Twice Per Major Period Note that semaphore synchronization is not required if actor B runs long because its thread has higher priority. Everything else is automatically delayed. … … thread 1: thread 2: sampleTime: 1 sampleTime: 8

Discussion Questions What about more complicated rate conversions (e.g. a task with sampleTime 2 feeding one with sampleTime 3)? How can these ideas be extended to non- periodic execution?

Abstracted Version of the Spectrum Example Suppose that C requires 8 data values from A to execute. Suppose further that C takes much longer to execute than A or B. Then a schedule might look like this: … 11 8

WRAP UP

For next time Read Chapters 10, 11