Simulation and Verification of Timed and Hybrid Systems

Similar documents
Supervisory Control Synthesis the Focus in Model-Based Systems Engineering

4TC00 Model-based systems engineering 2.8 Scalable solutions - reuse Functions 2.10 Stochastics

Formal Foundations of Software Engineering

COMP 522 Modelling and Simulation model everything

The Embedded Systems Design Challenge. EPFL Verimag

Towards an Integrated System Model for Testing and Verification

Techniques for the unambiguous specification of software

tempo2hsal: Converting Tempo Models into HybridSal Tool Description

Model Checking for Hybrid Systems

Automatic synthesis of switching controllers for linear hybrid systems: Reachability control

An Introduction to Lustre

Modeling Kernel Language (MKL)

Application: Programming Language Semantics

Q Body of techniques supported by. R precise mathematics. R powerful analysis tools. Q Rigorous, effective mechanisms for system.

The Montana Toolset: OSATE Plugins for Analysis and Code Generation

Programming Languages Third Edition

Hybrid Agent-Landscape Model Composition

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University

Model Checking Revision: Model Checking for Infinite Systems Revision: Traffic Light Controller (TLC) Revision: 1.12

Lecture 9: Reachability

DEPARTMENT OF COMPUTER SCIENCE

AVERIST: An Algorithmic Verifier for Stability

Introduction to Formal Methods

Programming Embedded Systems

Simulink/Stateflow. June 2008

Denotational Semantics. Domain Theory

Distributed Systems Programming (F21DS1) Formal Verification

Heterogeneous Modeling: Hybrid Systems

Hierarchical FSMs with Multiple CMs

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems

Classes and Inheritance in Actor- Oriented Models

Exception Handling in S88 using Grafchart *

Towards a PIM for virtual prototyping

challenges in domain-specific modeling raphaël mannadiar august 27, 2009

Proving the Correctness of Distributed Algorithms using TLA

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design

HYBRID PETRI NET MODEL BASED DECISION SUPPORT SYSTEM. Janetta Culita, Simona Caramihai, Calin Munteanu

MONIKA HEINER.

This project has received funding from the European Union s Horizon 2020 research and innovation programme under grant agreement No

Using Hybrid Automata for Early Spacecraft Design Evaluation

Using LNT Formal Descriptions for Model-Based Diagnosis

Hybrid System Modeling: Operational Semantics Issues

Toward Architecture-based Reliability Estimation

The UPPAAL Model Checker. Julián Proenza Systems, Robotics and Vision Group. UIB. SPAIN

6. Hoare Logic and Weakest Preconditions

Lecture 2. Decidability and Verification

Chapter 27 Formal Specification

Actor-Oriented Design: Concurrent Models as Programs

Virtual Plant for Control Program Verification

Supervisory control synthesis for a patient support system Theunissen, R.J.M.; Schiffelers, R.R.H.; van Beek, D.A.; Rooda, J.E.

Algorithmic Verification of Procedural Programs in the Presence of Code Variability

A Composable Simulation Environment to Support the Design of Mechatronic Systems

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications.

! Use of formal notations. ! in software system descriptions. ! for a broad range of effects. ! and varying levels of use. !

Model Driven Engineering in High Tech Industry

A Model-Driven Approach to Embedded Control System Implementation

Structure of Abstract Syntax trees for Colored Nets in PNML

Applications of Program analysis in Model-Based Design

Flight Systems are Cyber-Physical Systems

A Real-Time Animator for Hybrid Systems

Strand Algebras for DNA Computing

Using Heterogeneous Formal Methods in Model-Based Development LCCC Workshop on Formal Verification of Embedded Control Systems

Heterogeneous systems co-simulation: a model-driven approach based on SysML State Machines and Simulink

Modeling and Analysis of Fischer s Algorithm

Model Checking. Automatic Verification Model Checking. Process A Process B. when not possible (not AI).

Test and Evaluation of Autonomous Systems in a Model Based Engineering Context

Specifications and Modeling

Embedded software design with Polychrony

Analog Mixed Signal Extensions for SystemC

Petri-net-based Workflow Management Software

Second release of the COMPASS Tool Tool Grammar Reference

Module 3. Requirements Analysis and Specification. Version 2 CSE IIT, Kharagpur

1.2 Degree Requirements

these developments has been in the field of formal methods. Such methods, typically given by a

A Formalization of Global Simulation Models for Continuous/Discrete Systems

Formal Syntax and Semantics of Programming Languages

Intro to UPPAAL. Gerd Behrmann Kim Larsen. BRICS & Aalborg University. Intro to UPPAAL p.1/23

Translation of Modelica Code into Hybrid Automata

TSIF: Transition System Interchange Format

Proc. XVIII Conf. Latinoamericana de Informatica, PANEL'92, pages , August Timed automata have been proposed in [1, 8] to model nite-s

Distributed Information System as a System of Asynchronous Concurrent Processes

Advanced Tool Architectures. Edited and Presented by Edward A. Lee, Co-PI UC Berkeley. Tool Projects. Chess Review May 10, 2004 Berkeley, CA

Exercise Unit 2: Modeling Paradigms - RT-UML. UML: The Unified Modeling Language. Statecharts. RT-UML in AnyLogic

A Short Introduction to Formal Specifications

Towards checking Stateflow models with mcrl2

Technische Universiteit Eindhoven Department of Mathematics and Computer Science. Relationship between Simulink and Petri nets

Big-step Operational Semantics (aka Natural Semantics)

Fundamentals of Digital System Design ECE 3700, CPSC 3700

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph:

Algorithmic Verification. Algorithmic Verification. Model checking. Algorithmic verification. The software crisis (and hardware as well)

ECDAR: An Environment for Compositional Design and Analysis of Real Time Systems

Chapter 10 Formal Specification

Static Program Analysis

Outline. SLD challenges Platform Based Design (PBD) Leveraging state of the art CAD Metropolis. Case study: Wireless Sensor Network

Formal Methods. CITS5501 Software Testing and Quality Assurance

Specification and Analysis of Real-Time Systems Using Real-Time Maude

Transforming Cyber-Physical System Models

CS 242. Fundamentals. Reading: See last slide

Transcription:

Simulation and Verification of Timed and Hybrid Systems Bert van Beek and Koos Rooda Systems Engineering Group Eindhoven University of Technology ISC 2007 Delft 11 June 2007 Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 1/27

Outline 1. Introduction: Systems Engineering Group and applications 2. Model based engineering 3. Languages for dynamical systems analysis 4. The Chi language 5. Conclusions Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 2/27

Systems Engineering Group: Objectives The Systems Engineering group aims to use quantitative methods for the analysis, design and implementation of (embedded) systems exhibiting concurrent behavior. The objectives are to develop theory and techniques, and to build computational tools, inspired by mechanical engineering science, computer science and mathematics, and to apply these in selected cases from industry. Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 3/27

Intro MBE Languages Chi Conclusions Application domains Networks: semiconductor plants automotive plants transport systems container terminals Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 4/27

Application domains Machines: semiconductor industry front end: lithographic systems back end: chip mounting medical systems printing / paper handling machines Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 5/27

Trend The complexity of a high tech embedded system increases considerably with each new generation. This leads to increasing time to market (T ), decreasing quality (Q ), and increasing cost and manpower (C ). How can time to market be decreased (T ), quality be increased (Q ), without increasing cost and man power (C =)? Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 6/27

Current (embedded) system development R 1 design D 1 realize Z 1 integrate R design D integrate R 2 design D 2 realize Z 2 integration testing When integrating different interacting subsystems, usually: Requirements (R.. ) are incomplete and ambiguous Designs (D.. ) are incomplete and ambiguous Testing is possible only when realizations (Z.. ) are ready Correcting errors in realizations is costly and time-consuming Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 7/27

Model-based engineering realize R 1 design D 1 model M 1 realize Z 1 integrate R design D integrate R 2 design D 2 model M 2 realize Z 2 realize model simulation model verification Simulation allows early detection of presence of model/interface errors Verification allows proof of absence of model errors with respect to properties Controller synthesis allows generation of models that satisfy requirements by definition Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 8/27

Model-based engineering Hybrid models realize R 1 design D 1 model M 1 realize Z 1 integrate R design D integrate R 2 design D 2 model M 2 realize Z 2 realize The combination of M 1 and M 2 often leads to hybrid models, e.g: M 1 is a discrete-event model of a supervisory control system M 2 is continuous-time (or hybrid) model of the controlled physical system Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 9/27

Model-based engineering Hybrid models Hybrid models are composed of: Continuous-time models (DAEs: differential algebraic equations), including switched or switching sets of DAEs Discrete-time models (e.g. sampled systems) Discrete-event models (timed automata, process algebra), e.g. execution of a sequence of processing steps in a machine Embedded system models can be composed of any combination of the models described above. Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 10/27

Model-based engineering Hardware-in-the-loop simulation realize R 1 design D 1 model M 1 realize Z 1 integrate R design D integrate R 2 design D 2 model M 2 realize Z 2 realize hardware -in-the-loop simulation and testing Hardware-in-the-loop simulation allows early detection of the presence of realization errors Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 11/27

Model-based engineering Results realize R 1 design D 1 model M 1 realize Z 1 integrate R design D integrate R 2 design D 2 model M 2 realize Z 2 realize final implementation and testing Fewer errors in realizations (Q ) Enabler for automatic code generation (Q, T ) Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 12/27

Language requirements for model based engineering Formal compositional semantics Concurrent Executable Modular and hierarchical Scalable Easy to use Stochastic Discrete-event, continuous-time and hybrid Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 13/27

Dynamics and control world view Predominantly continuous-time system Modeled by means of DAEs (differential algebraic equations), or by means of a set of trajectories Hybrid phenomena modeled by means of discontinuous functions and/or switched equations, possibly using extended solution concepts (Filippov, Utkin) leading to sliding modes (i = 0 v 0) (v = 0 i 0) DAE model of a diode Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 14/27

Computer science world view Predominantly discrete-event system Modeled by means of (timed/hybrid) automaton, process algebra, Petri net, data flow languages, etc. Evolution of a hybrid system: sequence of time transitions and action transitions Discontinuities are represented by actions i = 0 v 0 v = 0 i 0 Automaton model of a diode Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 15/27

Simulation languages Ease of modeling = complex languages Verification not an issue, no formal semantics: (no verification) Languages specialize either in the discrete-event (DE) domain or in the continuous-time (CT) domain Hybrid languages usually DE + (E.g. Siman, Simple++) or CT + (E.g. Simulink, Modelica, EcosimPro) Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 16/27

Verification formalisms Ease of formal analysis = small languages with formal semantics Ease of modeling not an issue: cumbersome for modeling and simulation Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 17/27

overview syntax examples tools Overview of the Chi language (1) Suited to: simulation verification code generation Integrates: discrete-event modeling (CS world view: automata, process algebra) continuous-time modeling, (DC world view: switched differential algebraic equations) discrete-time modeling (DC world view: sampled systems) Formal compositional semantics Consistent equation semantics of Chi ensures that equations are always consistent, comparable to invariants of hybrid automata Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 18/27

overview syntax examples tools Overview of the Chi language (2) Is a process algebra d by means of: atomic statements, e.g. assignment (x := 2), DAE (ẋ = x + 1) an orthogonal set of operators, e.g. sequential comp. (;) and parallel comp. ( ) that can be freely combined. Core language small. Ease of use due to many syntactical extensions (all formally d). Modular and hierarchical and scalable by means of process definition and process instantiation (reuse). Stochastic: definition of distributions and sampling. Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 19/27

overview syntax examples tools The Chi language definition (1) A Chi model is of the following form: model M(parameter declarations) = [ channel and variable declarations :: p ] where p represents a process term (statement) Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 20/27

overview syntax examples tools The Chi language definition (2) Process term Meaning p ::= skip internal action x := e assignment a! e sending a? x receiving delay e delay statement inv u invariant (equations) X recursion variable b -> p guard operator p ; p sequential composition p p parallel composition p p alternative composition *p infinite repetition Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 21/27

overview syntax examples tools Controlled tank system (1) Simulation tank on-off controller n Qi 10 8 V Qi Qo n V 6 4 Qo 2 0 0 1 2 3 4 5 6 Time model ControlledTank()= [ var n: nat = 0, cont V: real = 10, alg Qi,Qo: real :: inv dot V = Qi - Qo, Qi = n * 5, Qo = sqrt(v) *( V <= 2 -> n:= 1; V >= 10 -> n:= 0 ) ] Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 22/27

overview syntax examples tools Controlled tank system (2) Equivalent specification using modes, as in automata model ControlledTank()= [ var n: nat = 0, cont V: real = 10, alg Qi,Qo: real :: inv dot V = Qi - Qo, Qi = n * 5, Qo = sqrt(v) [ mode noinflow = V <= 2 -> n:= 1; inflow, mode inflow = V >= 10 -> n:= 0; noinflow :: noinflow ] ] V<=2 -> n:=1 noinflow inflow V>=10 -> n:=0 Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 23/27

overview syntax examples tools Distributor and Machines in D a b M M proc D(chan in?, out1!, out2!: nat) = [ var x: nat :: *( in?x; ( out1!x out2!x ) ) ] proc M(chan in?: nat, val t: real) = [ var x: nat :: *( in?x; delay t ) ] proc DMM2(chan in?: nat) = [ chan a,b: nat :: D(in,a,b) M(a,4) M(b,5) ] Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 24/27

overview syntax examples tools Distributor and Machines a M in D a M b M in D proc D(chan in?, out1!, out2!: nat) = [ var x: nat :: *( in?x; ( out1!x out2!x ) ) ] proc M(chan in?: nat, val t: real) = [ var x: nat :: *( in?x; delay t ) ] proc DMM2(chan in?: nat) = [ chan a,b: nat :: D(in,a,b) M(a,4) M(b,5) ] proc D(chan in?, out!: nat) = [ var x: nat :: *( in?x; out!x ) ] proc DMM2(chan in?: nat) = [ chan a: nat :: D(in,a) M(a,4) M(a,5) ] a M Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 24/27

overview syntax examples tools Assembler in1 in2 A out proc A( chan in1?, in2?: nat, out!: (nat,nat), val t: real ) = [ var x,y: nat :: *( ( in1?x in2?y ) ; delay t ; out!(x,y) ) ] Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 25/27

overview syntax examples tools Tools for Chi simulation verification real-time control Stand-alone symbolic simulator for hybrid and timed Chi (Python) S-function block hybrid Chi simulator for co-simulation in Matlab/Simulink Stand-alone simulator for timed Chi (C) Translation of timed Chi to UPPAAL Translation of timed Chi to mcrl Translation of timed Chi to Promela/Spin Translation of hybrid Chi to PHAVer Prototype state space generator Stand-alone Linux implementation Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 26/27

Conclusions Chi language suited to model based engineering of dynamical (embedded) systems Concurrent process algebra allowing free combinations of statements and operators Integrates concepts from the dynamics and control theory with concepts from computer science Formal compositional semantics Integrates ease of modeling, simulation and verification Scalable: allows modular and hierarchical composition Bert van Beek and Koos Rooda TU/e Simulation and Verification of Timed and Hybrid Systems 27/27