MoBIES PI-Meeting, 16-18 July 2001, Jackson Hole Controller Design Using Multiple Models of Computation Edward Lee Johan Eker with thanks to Paul Griffiths,

Slides:



Advertisements
Similar presentations
Ethereal Sting Working Group Meeting June 10, 2003 Arlington, VA Mobies Ethereal Sting OEP The Ptolemy II Experiment Edward A. Lee Professor UC Berkeley.
Advertisements

Rule Based Operational Semantics Specification in Ptolemy Yanwar Asrigo COMP 763B - Modeling and Simulation Based Design 30 th April 2008.
DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
UC Berkeley Mobies Technology Project PI: Edward Lee CoPI: Tom Henzinger Process-Based Software Components for Networked Embedded Systems.
ACM SIGPLAN 2001 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES'2001) Jun 22-23, 2001, Snowbird, Utah, USA Embedded Software from.
2/11/2010 BEARS 2010 On PTIDES Programming Model John Eidson Jeff C. Jensen Edward A. Lee Slobodan Matic Jia Zou PtidyOS.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Process-Based Software Components for Networked Embedded Systems Edward A. Lee, PI UC Berkeley Core Technical Team (Mobies, SEC, and GSRC): Christopher.
Component Technologies for Embedded Systems Johan Eker.
SRC ETAB Summer Study Colorado Springs, June 25-26, 2001 Model-Based Approaches to Embedded Software Design Edward A. Lee UC Berkeley & GSRC.
Chess Review May 8, 2003 Berkeley, CA Classes and Inheritance in Actor- Oriented Models Stephen Neuendorffer Edward Lee UC Berkeley.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 Java Code Generation Steve Neuendorffer UC Berkeley.
Berkeley, CA, March 12, 2002 Modal Models in Vehicle-Vehicle Coordination Control Xiaojun Liu The Ptolemy Group EECS Department, UC Berkeley.
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Mobies Phase 1 UC Berkeley 1 Agenda 8:00-8:30 Continental breakfast 8:30-9:00 Overview of Mobies Phase 1 effort (Edward A. Lee) 9:00-9:40 Introduction.
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Behavioral Types for Actor-Oriented Design Edward A. Lee.
Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Ptolemy II - Heterogeneous Modeling and Design in Java The Ptolemy project studies modeling, simulation, and design of concurrent, real-time, embedded.
Heterogeneous Modeling and Design in Ptolemy II Johan Eker UC Berkeley with material courtesy of Edward Lee and the Ptolemy group ECE Seminar Series, Carnegie.
Modeling Heterogeneous Systems Edward Lee UC Berkeley Design for Safety Workshop NASA Ames Research Center Mountain View, CA 11 October, Design.
Mobies Phase 1 UC Berkeley 1 Process-Based Software Components Mobies Phase 1, UC Berkeley Edward A. Lee and Tom Henzinger PI Meeting, Boca Raton January.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
3/12/ Modeling and controlling the Caltech Ducted Fan Vehicle Steve Neuendorffer, Ptolemy Group, UC Berkeley.
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.
The Gigascale Silicon Research Center Edward A. Lee UC Berkeley The GSRC Semantics Project Tom Henzinger Luciano Lavagno Edward Lee Alberto Sangiovanni-Vincentelli.
Models of Computation for Embedded System Design Alvise Bonivento.
Hierarchical Reconfiguration of Dataflow Graphs Stephen Neuendorffer UC Berkeley Poster Preview May 10, 2004.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Heterochronous Dataflow in Ptolemy II Brian K. Vogel EE249 Project Presentation, Dec. 4, 1999.
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 System-Level Types for Component-Based Design Edward A.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Concurrent Component Patterns, Models of Computation, and.
MoBIES Working group meeting, September 2001, Dearborn Ptolemy II The automotive challenge problems version 4.1 Johan Eker Edward Lee with thanks.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
The Caltrop Actor Language Johan Eker UC Berkeley MoBIES group, Carnegie Mellon, November 30, 2001.
Concurrent Models of Computation in System Level Design Edward Lee UC Berkeley Forum on Design Languages Workshop on System Specification & Design Languages.
State of the Art Lecture IEEE Instrumentation and Measurement Technology Conference Budapest, Hungary, May 21-23, 2001 Computing for Embedded Systems Edward.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 JHDL Hardware Generation Mike Wirthlin and Matthew Koecher
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 The Component Interaction Domain: Modeling Event-Driven and Demand- Driven Applications.
Embedded Software Challenges for the Next 10 Years Chess: Center for Hybrid and Embedded Software Systems Infineon Embedded Software Days Munich, Sept.
Panel: What Comes After C++ in System-Level Specification Edward Lee UC Berkeley Forum on Design Languages Workshop on System Specification & Design Languages.
Lee & Henzinger ESWG #1 UC Berkeley Mobies Technology Project Process-Based Software Components for Networked Embedded Systems PI: Edward Lee CoPI: Tom.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Models of Computation as Program Transformations Chris Chang
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
Composing Models of Computation in Kepler/Ptolemy II
Hybrid Systems Concurrent Models of Computation EEN 417 Fall 2013.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Design Languages in 2010 Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Panel Position Statement Forum on Design.
Actor Networks Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley Invited Talk Workshop Foundations and Applications of Component-based.
Incremental Checkpointing with Application to Distributed Discrete Event Simulation Thomas Huining Feng and Edward A. Lee {tfeng,
Actor Oriented Programming with CAL -designing embedded system components Johan Eker Department of Automatic Control, Lund University Chris Chang, Jörn.
PTII Model  VHDL Codegen Verification Project Overview 1.Generate VHDL descriptions for Ptolemy models. 2.Maintain bit and cycle accuracy in implementation.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
CS 5991 Presentation Ptolemy: A Framework For Simulating and Prototyping Heterogeneous Systems.
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Code Generation for Ptolemy II
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Retargetable Model-Based Code Generation in Ptolemy II
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Presentation transcript:

MoBIES PI-Meeting, July 2001, Jackson Hole Controller Design Using Multiple Models of Computation Edward Lee Johan Eker with thanks to Paul Griffiths, Jie Liu, Xiaojun Liu, Steve Neuendorffer, and Yuhong Xiong

Eker & Lee, UC Berkeley 2 Overview Mixed signal control systems The throttle control system by Paul Griffith Modal controllers Extended throttle controller by Johan Eker Design patterns The use of domains and hierarchy Mixed signal models Modal models Code generation co-compilation

Eker & Lee, UC Berkeley 3 A Throttle Control System Throttle controller by Paul Griffiths (Mobies Phase II, UC Berkeley) Top-level model Continuous-time (CT) domain in Ptolemy II Input: desired throttle angle (and derivatives) discrete-time controller throttle model

Eker & Lee, UC Berkeley 4 A Throttle Control System Result of executing the model shows intial convergence phase followed by tracking with a slight phase lag. The control signal chatters to overcome friction.

Eker & Lee, UC Berkeley 5 Design Pattern: Discrete Time in Continuous Time Synchronous dataflow director indicates a new model of computation. No director indicates no new model of computation.

Eker & Lee, UC Berkeley 6 Control Engineer View plant dynamics in continuous time controller in discrete time focus on stability, phase margins, rise time... assume ideal sampling with no or little latency

Eker & Lee, UC Berkeley 7 Embedded System Engineer View dynamics modeled with RK-4, variable-step solver controller modeled in synthesizable SDF, FRP, … focus on scheduling, memory, communication... assume fixed controller design

Eker & Lee, UC Berkeley 8 A More Integrated Approach controller design informed by software issues domain-oriented modeling language modeling = implementation latency and jitter are part of the model software design informed by controller issues expressing timing constraints correct-by-construction synthesis heterogeneous modeling

Eker & Lee, UC Berkeley 9 Elaborated Throttle Control System

Eker & Lee, UC Berkeley 10 Design Pattern: Modal Discrete-Time Controller in Continuous Time continuous time finite-state machine discrete time Hierarchical, heterogeneous model

Eker & Lee, UC Berkeley 11 This is Still An Idealized Model No jitter, no delays

Eker & Lee, UC Berkeley 12 Extend the ideal model Influence from implementation: Jitter Control delay Execution: Multitasking environment Incorporate the behavior of the RTOS Communication: Shared communication links Behavior of the network

Eker & Lee, UC Berkeley 13 A more accurate model

Eker & Lee, UC Berkeley 14 Software Realism Express timing constraints sample rates latency jitter tolerances Build models in appropriate abstractions Giotto: time-triggered HPM: hierarhical preemptive multitasking FRP: functional-reactive programming … These facilitate correct-by-construction implementation

Eker & Lee, UC Berkeley 15 The Next Problem: Synthesizing an Implementation

Eker & Lee, UC Berkeley 16 Outline of our Approach Model of Computation semantics defines communication, flow of control Ptolemy II model scheduler Schedule: - fire Gaussian0 - fire Ramp1 - fire Sine2 - fire AddSubtract5 - fire SequenceScope10 parser method call if block method call block … for (int i = 0; i < plus.getWidth(); i++) { if (plus.hasToken(i)) { if (sum == null) { sum = plus.get(i); } else { sum = sum.add(plus.get(i)); } … All actors are given in Java, then translated to embedded Java, C, VHDL, etc. target code abstract syntax tree Jeff Tsay, Christopher Hylands, Steve Neuendorffer

Eker & Lee, UC Berkeley 17 Division of Responsibility MoC semantics defines flow of control across actors communication protocols between actors Actors define: functionality of components Actors are compiled by a MoC-aware compiler generate specialized code for actors in context Hierarchy: Code generation at a level of the hierarchy produces a new actor definition We call this co-compilation. Multiple domains may be used in the same model

Eker & Lee, UC Berkeley 18 Software Progress Build on: First version on Titanium (UC Berkeley) Second version on Soot (McGill) Targeting: Simulation acceleration Embedded software synthesis Maryland subcontract Configurable hardware synthesis delegated to Brigham Young

Eker & Lee, UC Berkeley 19 Our Generator Approach Actor libraries are built and maintained in Java more maintainable, easier to write polymorphic libraries are rich and small Java + MoC translates to target language concurrent and imperative semantics Efficiency gotten through code transformations specialization of polymorphic types code substitution using MoC semantics removal of unnecessary code

Eker & Lee, UC Berkeley 20 Code transformations (data types) // Original actor source Token t1 = in.get(0); Token t2 = in.get(1); out.send(0, t1.multiply(t2)); specialization of Token declarations // With specialized types IntMatrixToken t1 = in.get(0); IntMatrixToken t2 = in.get(1); out.send(0, t1.multiply(t2)); The Ptolemy II type system supports polymorphic actors with propagating type constraints and static type resolution. The resolved types can be used in optimized generated code. See Jeff Tsay, A Code Generation Framework for Ptolemy II

Eker & Lee, UC Berkeley 21 Type System Output of type general - pure event with no value Input of general type - anything will do Polymorphic output - type depends on the parameters double general int general double Polymorphic actor uses late binding in Java to determine implementation of addition. Opaque port - types propagated from inside double Lossless runtime type conversion Type system by Yuhong Xiong

Eker & Lee, UC Berkeley 22 Type System Extensible type lattice Knowledgeable users can add full-featured types Unification infrastructure Finds a least fixed point Composite types records, arrays, matrices Higher-order types planned model = data Experiments with dependent types encoding MoC constraints

Eker & Lee, UC Berkeley 23 Code transformations (MoC-informed) transformation using MoC semantics // With specialized types IntMatrixToken t1 = in.get(0); IntMatrixToken t2 = in.get(1); out.send(0, t1.multiply(t2)); MoC-polymorphic code is replaced with specialized code. // Extended Java with specialized communication int[][] t1 = _inbuf[0][_inOffset = (_inOffset+1)%5]; int[][] t2 = _inbuf[1][_inOffset = (_inOffset+1)%5]; _outbuf[_outOffset = (_outOffset+1)%8] = t1 * t2; See Jeff Tsay, A Code Generation Framework for Ptolemy II

Eker & Lee, UC Berkeley 24 Synchronous Dataflow (SDF) Domain Balance equations (one for each channel): F A N = F B M Scheduled statically Decidable resource requirements Available optimizations: eliminate checks for input data statically allocate communication buffers statically sequence actor invocations (and inline?) send(0,t) get(0) token t NM A B

Eker & Lee, UC Berkeley 25 Synchronous/Reactive Domain A discrete model of time progresses as a sequence of “ticks.” At a tick, the signals are defined by a fixed point equation: A C B Available optimizations: Statically sequence fixed-point iteration Communication via registers

Eker & Lee, UC Berkeley 26 Other Domains with Useful Properties for Code Generation Strong static analyzability Giotto (time triggered) HPM (hierarchical preemptive multitasking) FRP (functional reactive programming – Yale) Finite state machines Discrete time Good for hardware descriptions Discrete events Process networks Continuous time (analog hardware)

Eker & Lee, UC Berkeley 27 Hierarchical Heterogeneity P6 P3 P2 P5 P1 E1 E2 E4 E0 M: Manager D1: local director D2: local director P4 P7 E3 E5 Opaque Composite Actor Transparent Composite Actor Ptolemy II composes domains hierarchically, where components in a model can be refined into subcomponents where the component interactions follow distinct semantics.

Eker & Lee, UC Berkeley 28 Conclusions Hierarchically heterogenous modeling matches the applications well… Hierarchically heterogenous modeling appears to be suited to high-quality sythesis