Interfaces for Control Components Rajeev Alur University of Pennsylvania Joint work with Gera Weiss (and many others)

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Feedback Control Real-Time Scheduling: Framework, Modeling, and Algorithms Chenyang Lu, John A. Stankovic, Gang Tao, Sang H. Son Presented by Josh Carl.
Design of a reliable communication system for grid-style traffic light networks Junghoon Lee Dept. of Computer science and statistics Jeju National University.
1 October 16 th, 2009 Meaning to motion: Transforming specifications to provably-correct control Hadas Kress-Gazit Cornell University George Pappas University.
A Survey of Runtime Verification Jonathan Amir 2004.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
1 Pattern-Oriented Composition and Synthesis of Middleware Services for NEST DISSECT-ing the Fairing Simulation Akos Ledeczi – Ken Frampton Vanderbilt.
Timed Automata.
Maximum Battery Life Routing to Support Ubiquitous Mobile Computing in Wireless Ad Hoc Networks By C. K. Toh.
1 Mechanical Verification of Timed Automata Myla Archer and Constance Heitmeyer Presented by Rasa Bonyadlou 24 October 2002.
1 An Approach to Real-Time Support in Ad Hoc Wireless Networks Mark Gleeson Distributed Systems Group Dept.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Overview of PTIDES Project
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
1 of 14 1/15 Schedulability Analysis and Optimization for the Synthesis of Multi-Cluster Distributed Embedded Systems Paul Pop, Petru Eles, Zebo Peng Embedded.
Scheduling with Optimized Communication for Time-Triggered Embedded Systems Slide 1 Scheduling with Optimized Communication for Time-Triggered Embedded.
1 of 14 1 Analysis and Synthesis of Communication-Intensive Heterogeneous Real-Time Systems Paul Pop Computer and Information Science Dept. Linköpings.
Presenter: PCLee Design Automation Conference, ASP-DAC '07. Asia and South Pacific.
Interfaces for Control Components Rajeev Alur University of Pennsylvania Joint work with Gera Weiss (and many others)
Code Generation from CHARON Rajeev Alur, Yerang Hur, Franjo Ivancic, Jesung Kim, Insup Lee, and Oleg Sokolsky University of Pennsylvania.
EMBEDDED SOFTWARE Team victorious Team Victorious.
End-to-End Delay Analysis for Fixed Priority Scheduling in WirelessHART Networks Abusayeed Saifullah, You Xu, Chenyang Lu, Yixin Chen.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Naixue GSU Slide 1 ICVCI’09 Oct. 22, 2009 A Multi-Cloud Computing Scheme for Sharing Computing Resources to Satisfy Local Cloud User Requirements.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Tufts Wireless Laboratory School Of Engineering Tufts University “Network QoS Management in Cyber-Physical Systems” Nicole Ng 9/16/20151 by Feng Xia, Longhua.
Security and QoS Self-Optimization in Mobile Ad Hoc Networks ZhengMing Shen and Johnson P. Thomas Presented by: Sharanpal singh.
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.
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
Scientific Computing By: Fatima Hallak To: Dr. Guy Tel-Zur.
A Simple Distributed Method for Control over Wireless Networks Authors: Miroslav Pajic, Shereyas Sundaram, George J. Pappas and Rahul Mangharam Presented.
Scheduling policies for real- time embedded systems.
Integrated Scheduling and Synthesis of Control Applications on Distributed Embedded Systems Soheil Samii 1, Anton Cervin 2, Petru Eles 1, Zebo Peng 1 1.
David Weiss Software Product-Line Engineering: A Family-Based Software Development Process: Designing The Family David Weiss
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Lecture 2, CS52701 The Real Time Computing Environment I CS 5270 Lecture 2.
1 of 14 1/15 Schedulability-Driven Frame Packing for Multi-Cluster Distributed Embedded Systems Paul Pop, Petru Eles, Zebo Peng Embedded Systems Lab (ESLAB)
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Hardware-Software Co-Synthesis of Low Power Real-Time Distributed Embedded Systems with Dynamically Reconfigurable FPGAs Li Shang and Niraj K.Jha Proceedings.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Agenda  Quick Review  Finish Introduction  Java Threads.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
Marilyn Wolf1 With contributions from:
Real-time Software Design
TrueTime.
OVERVIEW Impact of Modelling and simulation in Mechatronics system
Paul Pop, Petru Eles, Zebo Peng
Real-time Software Design
Liang Chen Advisor: Gagan Agrawal Computer Science & Engineering
A Framework for Automatic Resource and Accuracy Management in A Cloud Environment Smita Vijayakumar.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
Smita Vijayakumar Qian Zhu Gagan Agrawal
A GUI Based Aid for Generation of Code-Frameworks of TMOs
Presented By: Darlene Banta
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Interfaces for Control Components Rajeev Alur University of Pennsylvania Joint work with Gera Weiss (and many others)

Interface-based Control Design Interface: Simplified description useful for system integration Control Designs Implementation Platforms

Interface Specs: Desirable Properties Compositional: Design each component in isolation Dependable: If interface spec is satisfied, performance goals are met Separation of concerns: Between control and software engineers Analyzability: Tool support to check if all interface specs can be met

Execution Period as Interface Spec Interface: Period at which sense-compute-actuate cycle to be executed Control Designer: Does sampling frequency ensure performance spec? Discrete-time control theory 3 ms 5 ms System Integrator: Can resource requirements of all the components be met? Platform-specific WCET analysis Real-time scheduling theory

Challenges : Composition, adaptation to changes in resource availability, online admission control, performance optimization Composing two periodic specs does not give periodic spec Should component be executed more frequently, if possible? How does period relate to control performance ? Execution Period as an Interface Spec

Time-triggered Resource Scheduling Resource Controller 2 Controller 1Plant 2 Plant 1 Controller 1 Controller 2 Time

Automata Based Interfaces Generalization of the periodic interface: Automaton (regular language) for each component specifying allowed patterns of resource allocations : Slot not allocated to the component 1: Slot allocated to the component Spec: Component must get at least one slot in a window of 4 slots

Automata Based Interfaces Infinite schedules specified using Buchi automata Spec: Component must get infinitely many slots 0 Example specs: Component must get at least 2 slots in a window of 5 Eventually component must get every alternate slot Periodic: (k 0’s. 1) *

Composing Specs Composition : Rename followed by intersection (product) Component A Component B 0/B A A 0/A B B Rename 0 B A 0 A A B A Product Schedulability Test: Check if composition of all specs is nonempty Rename

Analyzing stability with resource scheduling t models elapsed time Transitions happen at the beginning of Δ intervals Next discrete mode is determined by the schedule σ Different dynamics based on controller has the resource or not Challenge: Compute set of schedules  for which system is stable

Stable modes ⇏ Stability stable unstable Switching may introduce instability !

Can we express stability with a Finite Automaton? Answer: No! (Language of stable schedules is not regular) Proof: Transform a stable word to an unstable one by pumping

Exponential Stability StabilityRegular Exp. Stability Quantified version of stability

Automata-based Interfaces Interface: Regular language for desired allocation on time-triggered platform Control Designer: Specify all acceptable allocation sequences as a regular language E.g. Periodicity, Exponential stability, Fairness System Integrator: Can resource requirements of all the components be met? Find a schedule acceptable to all using automata constructions

➡ Embedded Control Software ➡ Networked Control Systems ➡ Wireless Control Networks Talk Overview ➡ Motivation

Embedded Control Software Discrete Control (Software) Physical Plant (Continuous Dynamics) Sensors Actuators Java ???

Java for Real-Time Java Bytecode portability Component based Java RTS Real-time guarantees No timing portability! Can I run the same code on a faster machine and expect better performance?

RTComposer A tool for building modular Real-Time Java applications Java Class + Automaton specifying patterns of method calls Component: Real-Time Operating System Real-Time Java RTComposer InterruptsNon Real-Time

Logical Execution Time Macro Schedule: Assignment of methods to time slots Micro Schedule: CPU scheduling within each slot Macro Micro Component 1 Component 2 Short method Heavy method … …… … Interrupts I/O … … Tasks finish in allotted slots ⇒ Dynamics determined by macro schedule We use automata interfaces for specifying macro schedules

Example component public class Example { void p() {...}; void q() {...}; void r() {...}; } Methods p and q not invoked for 3 consecutive slots ⇒ q must run in the next slot Temporal logic: Automaton: Requirement: Class signature:

Proposed Methodology Product Automaton Platform Automaton Component Automaton empty? Macro Scheduler inter-slot schedule intra-slot schedule Micro Scheduler Background tasks CPU Interrupts Which methods can be executed together within a slot?

Timing Portability Bytecode portability is not enough for real-time systems Previous approaches: Same timing on fast and slow machines [Giotto, Metronome, Exotasks] RTComposer: Faster machines allow better performance (faster convergence) Time (milliseconds) Displacement (millimeters)

Dynamic Scheduling Static schedules [Giotto, Exotasks]: Same set of methods in all execution slots. RTComposer: Dynamic assignment of methods to execution slots allows to adjust to changing conditions Time (milliseconds) Displacement (millimeters)

Talk Overview ➡ Motivation ➡ Embedded Control Software ➡ Networked Control Systems ➡ Wireless Control Networks

Systems where control loops are closed through a real-time network State of the art: Static time-triggered scheduling mechanisms Our focus: Dynamic network scheduling based on sensor reading Networked Control Systems

Resource Allocation for Communication Low Priority High Priority When should the node near the sensor send messages?

Static Schedules Advantages: Lightweight implementation, analyzable Limitation: Cannot adjust to changing conditions Challenge: Use sensor reading to generate schedules? Constraint: Light-weight and analyzable computation

Automata Based Dynamic Scheduling Challenge: Design such automata in a systematic way

Problem Formulation Switched System Transducer rand

First Step: Alarm Automaton

Computing the Guards

From Automaton to Transducer This scheme ensures stable words, unless the initial state is bad Switched System Transducer rand ???

Scheduling Scheme

Simulation Results Varying Load Static schedules will give worst case response all the time

With our approach: High load comes only after disturbances A static schedule must keep a constant (high) network load Simulation Results Sporadic Disturbances

1. Automaton generation in Mathematica 2. Simulation in TrueTime based on Network Code Machine 3. Software prototype on CAN, Ethernet+RTLinux 4. FPGA IP core working at line speed on 100Mb Ethernet Courtesy of Robert Trausmuth et al. State of the Work

➡ Motivation ➡ Embedded Control Software ➡ Network Control Systems ➡ Wireless Control Networks Talk Overview

Motivation Growing use of wireless technologies for control Sensors, controllers, and actuators communicate using multi-hop network Aspects: Control design, network topology, routing, scheduling Compositional analysis for co-design of network and control

Multi-Hop Control Networks Plant 1 Plant 2 Plant 3 Controller A distributed system of sensor and actuator nodes interconnected by communication links: measurement feedback

WirelessHART™ Time Division Multiple Access (TDMA) Each device maintains a precise sense of time Communication is done in pre-scheduled time frames A periodic schedule, called Superframe, is distributed Challenge: Systematic design and evaluation of schedules?

Formal Model Dynamics of plants and controllers, names of input and output signals Communication channels, assignment of signals to nodes, and routing

Example1 Plant 1 Plant 2 Plant 3 Controller 2 34

Resource Allocation Schedules 1 Plant 1 Plant 2 Plant 3 Controller 2 34 Example

Switched System Semantics

Mathematica Based Tool Multi-Hop Control Network Switched Systems Schedules & Controller Design Input syntax: the mathematical model presented earlier Automatic translation to switched systems Experimental implementation of some design methodologies Supports compositional analysis (separate model for each control loop)

We demonstrate an application of the following recipe: 1)Model the Multi-Hop Control Network, including schedules 2)Design a parametric controller for each control loop 3)Resolve parameters, using the Mathematica based tool, by requiring stability of the switched system Example 1: Controller Design

Plant 1 Controller Multi Hop Control Network Obtain a switched system dynamics Choose parameters by solving a pole assignment equation

Example 2: Stability Verification Plant 1 Controller 2 34

Example 3: Compositional AnalysisController Plant 1 Plant 2

Case Study Separation of minerals using floatation cells Boliden mine, Garpenberg, Sweden 17 Control loops communicating using WirelessHART Computed set of acceptable schedules/routes for each loop Schedule generated by interesecting 17 automata using NuSMV Shortest path generated by SMV as a counter-example to the claim that no schedule exists that is acceptable to all

References Automata based interfaces for control and scheduling Weiss, Alur. HSCC 2007 RTComposer: A framework for real-time components with scheduling interfaces Alur, Weiss. EMSOFT 2008 Specification and analysis of network resource requirements of control systems Weiss, Fischmeister, Anand, Alur. HSCC 2008 Modeling and analysis of multi-hop control networks Alur, D’Innocenzo, Johansson, Pappas, Weiss. RTAS 2008 Scalable scheduling algorithms for wireless networked control D’Innocenzo, Weiss, Alur, Isaksson, Johansson, Pappas. CASE 2009

Recap: Automata-based Interfaces Interface: Regular language for desired allocation on time-triggered platform Control Designer: Specify all acceptable allocation sequences as a regular language E.g. Periodicity, Exponential stability, Fairness System Integrator: Can resource requirements of all the components be met? Find a schedule acceptable to all using automata constructions Applications: Real-time Java components, Networked sensors/actuators Wireless control network (WirelessHART)