PTIDES Project Overview

Slides:



Advertisements
Similar presentations
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Advertisements

Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Leveraging Synchronized Clocks in Distributed Applications Edward A. Lee Robert S. Pepper Distinguished Professor UC Berkeley Swarm Lab Retreat January.
Time for High-Confidence Distributed Embedded Systems Edward Ashford Lee Robert S. Pepper Distinguished Professor UC Berkeley Invited keynote talk IEEE.
MotoHawk Training Model-Based Design of Embedded Systems.
Smart Grid Projects Andrew Bui.
Lecture 1: Introduction II EEN 112: Introduction to Electrical and Computer Engineering Professor Eric Rozier, 1/16/2013.
P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB E
Chapter 13 Embedded Systems
Overview of PTIDES Project
2/11/2010 BEARS 2010 On PTIDES Programming Model John Eidson Jeff C. Jensen Edward A. Lee Slobodan Matic Jia Zou PtidyOS.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Architecture Modeling and Analysis for Embedded Systems Oleg Sokolsky CIS700 Fall 2005.
April 16, 2009 Center for Hybrid and Embedded Software Systems PtidyOS: An Operating System based on the PTIDES Programming.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Chapter 13 Embedded Systems
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Real-Time Systems and Programming Languages
Run-Time Models for Measurement & Control Systems and Their Support in Ptolemy II Jie Liu EECS, UC Berkeley 9/13/2000 Agilent Technologies.
Figure 1.1 Interaction between applications and the operating system.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
CprE 458/558: Real-Time Systems
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
EMBEDDED SOFTWARE Team victorious Team Victorious.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Real Time Process Control (Introduction)
Tufts Wireless Laboratory School Of Engineering Tufts University “Network QoS Management in Cyber-Physical Systems” Nicole Ng 9/16/20151 by Feng Xia, Longhua.
Eric Keller, Evan Green Princeton University PRESTO /22/08 Virtualizing the Data Plane Through Source Code Merging.
1. Introduction 1.1 Background 1.2 Real-time applications 1.3 Misconceptions 1.4 Issues in real-time computing 1.5 Structure of a real-time system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
EEL Software development for real-time engineering systems.
Multiprocessor and Real-Time Scheduling Chapter 10.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
Performance evaluation of component-based software systems Seminar of Component Engineering course Rofideh hadighi 7 Jan 2010.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Conformance Test Experiments for Distributed Real-Time Systems Rachel Cardell-Oliver Complex Systems Group Department of Computer Science & Software Engineering.
Handling Mixed-Criticality in SoC- based Real-Time Embedded Systems Rodolfo Pellizzoni, Patrick Meredith, Min-Young Nam, Mu Sun, Marco Caccamo, Lui Sha.
The 14 th IEEE Real-Time and Embedded Technology and Applications Symposium, April 2008 Real-Time Distributed Discrete-Event Execution with Fault Tolerance.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
Simics: A Full System Simulation Platform Synopsis by Jen Miller 19 March 2004.
Abstract A Structured Approach for Modular Design: A Plug and Play Middleware for Sensory Modules, Actuation Platforms, Task Descriptions and Implementations.
Advantages of Time-Triggered Ethernet
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
Chapter 13: I/O Systems.
Deterministic Communication with SpaceWire
Module 12: I/O Systems I/O hardware Application I/O Interface
Introduction to Realtime Systems (& Embedded Systems)
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
DETERMINISTIC ETHERNET FOR SCALABLE MODULAR AVIONICS
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

PTIDES Project Overview Slobodan Matic, Jia Zou Edward Lee, John Eidson ActionWebs, 09/29/10

Orchestrating networked computational resources with physical systems Transportation (Air traffic control at SFO) Avionics Building Systems Telecommunications Automotive Instrumentation (Soleil Synchrotron) E-Corner, Siemens Factory automation Power generation and distribution Daimler-Chrysler Military systems: Deterministic Implementations of Event-driven Software Courtesy of General Electric Courtesy of Doug Schmidt Courtesy of Kuka Robotics Corp.

Current Practice: Printing Press High-speed, high precision Speed: 1 inch/ms Precision: 0.01 inch -> Time accuracy < 10us Application aspects local (control) distributed (coordination) global (modes) Open standards (Ethernet) Synchronous, Time-Triggered IEEE 1588 time-sync protocol Bosch-Rexroth

For distributed cyber-physical systems, Timing needs to be a part of the network semantics, not a side effect of the implementation. Technologies needed: Time synchronization Bounds on latency Time-aware fault isolation and recovery

A Programming Model for Distributed Cyber-Physical Systems The question we address: Given a common notion of time shared to some known precision across a network, and given bounded network latencies, can we design better distributed embedded software? Our answer (PTIDES): Use discrete-event (DE) models for specification of systems, bind model time to real time only exactly where this is needed.

Outline Introduction PTIDES Basics and Workflow PTIDES Runtime Framework Single CPU: Tunneling Ball Device Multiple CPU: Power Distribution Subsystem Summary

PTIDES Basics Programming Temporally Integrated Distributed Embedded Systems Based on Discrete-Event model of computation Event processing in time-stamp order Deterministic under simple causality conditions Fixed-point semantics Can be extended to super-dense form Timing constraints for interaction with environment

Model vs. Physical Time At sensors and actuators Relate model time (τ) to physical time (t) t ≥ τ t ≤ τ τ1 do i4 model time τ1 τ4 physical time t1 t4

Single Processor PTIDES Example Bounded delay between any two hardware components Bounded sensor latency (d0) t ≥ τ , t ≤ τ + do t ≤ τ τ1 do i4 τ2 model time τ2 physical time t2 e2 at i2

Single Processor PTIDES Example t ≥ τ , t ≤ τ + do t ≤ τ τ1 do i4 τ2 model time τ2 physical time t2 τ2+d0 e2 safe to process if t > τ2 + do

Single Processor PTIDES Example t ≥ τ , t ≤ τ + do t ≤ τ τ1 do i4 τ2 model time τ1 physical time t2 τ1+d0 e2 safe to process if t > τ2 + do

Distributed PTIDES Example Local event processing decisions: Bounded communication latency (d0) Distributed platforms time-synchronized with bounded error (e) τ is safe to process if: t > τ + do2 + e - d 2 d 1 τ1 τ2 d01 Sensor Merge τ Actuator d 2 τ3 τ4 do2 Network Interface o3

Distributed PTIDES Example Local event processing decisions: Bounded communication latency (d0) Distributed platforms time-synchronized with bounded error (e) τ is safe to process if: t > τ + do2 + e - d 2 d 1 d01 Sensor τ1 Merge τ Actuator d 2 τ3 τ4 do2 Network Interface o3

What Did We Gain? e1 = (v1, τ1) δ e1, e2, … e2 = (v2, τ2) First Point: Ensures deterministic data outputs Merge e1 = (v1, τ1) δ e1, e2, … safe to process analysis for e safe to process analysis for e e2 = (v2, τ2) Second Point: Ensures deterministic timing delay from Sensor to Actuator t ≤ τ + do t ≤ τ i4 do τ1 τ2 Now that I defined the GES, let’s take a step back and

PTIDES Program Design Workflow HW Platform PTIDES run-time

PTIDES Runtime Framework Software components (actors) are “glued together” by a code generator into an executable Lightweight real-time kernel (5KB) Actors are state machines, each with an event queue and context Asynchronous delivery: producer posts to event queue Framework handles thread-safe event exchange and queuing   Run-to-completion : No blocking code No busy-waiting, semaphore, mailbox Preemptive -> Single-stack implementation Encapsulate each resource inside a dedicated active object rest of app shares the dedicated active object via events  Fast and deterministic memory allocation Event pools:  fixed-size memory blocks

PTIDES Scheduler Two layer execution engine Event coordination (safe-to-process) Event scheduling (prioritize safe events) Earliest Deadline First foundation Deadline based on path from input port to actuator Schedulability analysis requires WCET of software components + event models PTIDES implementation delivers DE semantics even w/o WCET Even if deadlines missed, events are determinate PTIDES repeatable even if WCET wrong

PTIDES Workflow HW Platform Software Component Library Ptides Model Code Generator PTIDES run-time Code Plant Model Network Model HW in the Loop Simulator Causality Analysis Program Analysis Schedulability Analysis Analysis Mixed Simulator

Schedulability Analysis Three cases: Zero event processing time assumption (feasibility test) if P fails, P will not satisfy constraints on any hardware No resource sharing assumption (an event is processed as soon it is safe) if P fails, P may still satisfy constraints on other hardware Resource sharing (a safe event is processed according to a scheduling algorithm) if P fails, P does not satisfy this implementation (and algorithm)

Feasibility Test Feasibility assumptions Zero event processing time Bounds on event communication latency (d0) If test fails, no HW satisfies constraints detect flows

Feasibility Test For each input port i on a sensor-actuator path

Single CPU - Proof of Concept Tunneling Ball Device sense ball track disk adjust trajectory

Single CPU Proof of Concept Event sequences periodic quasi-periodic sporadic

Tunneling Ball Device – 10 rps

Tunneling Ball Device – 1 rps

Distributed Testbed Objectives Safe event processing Offset attribute of a port Check: real time vs model time + offset Bounded latency between hardware components Distribution: bounded-delay networking protocol Scheduling Deadlines defined by sensor – actuator model delays Single CPU: use Earliest Deadline First Distribution: local from end-to-end deadlines Expressiveness of interaction Complexity of real sensor, actuator and network interfaces Timing support External to microprocessor National Semiconductor DP83640: IEEE 1588 enabled PHY chip

Synchrophasor-based measurement and control Power swing and Unstability detection

Experiment Diagram Grid emulator built with National Instruments PXI ‘PMU’s built with Renesas demo boards with DP83640 Ethernet bridge or 1588 boundary/transparent clock ‘SVP’ built with Renesas demo board with DP83640

Basic PTIDES Timing Testing Vary phasor data independently Freq. and phases w.r.t. global time Sample voltage and current Signal processing Send phasor data Local control: on/off breaker Wireshark monitoring of network events Detect discrepancies If unstable region send on/off command

Single platform PTIDES approximation model

Multi-platform PTIDES approximation model

Summary The networking problem requires timing to be a correctness property rather than a quality of service PTIDES model of computation offers a possible programming model for distributed CPS Correct deterministic DE implementations Better match for reactive state-machine systems  than traditional multi-threaded     or     super loop     programming models Time stamps provides runtime information for detecting and reacting to variety of timing faults Goal: scalability, robustness, fault-tolerance