A Model-Driven Approach to Embedded Control System Implementation

Similar documents
HW/SW Design Space Exploration on the Production Cell Setup

Concurrent Design of Embedded Control Software

CONTROLLING A MECHATRONIC SET-UP USING REAL-TIME LINUX AND CTC++ *)

A Model-Driven Approach to Embedded Control System Implementation

TERRA support for architecture modeling. K.J. (Karim) Kok. MSc Report. C e Dr.ir. J.F. Broenink Z. Lu, MSc Prof.dr.ir. A. Rensink.

INEXPENSIVE PROTOTYPING FOR MECHATRONIC SYSTEMS * ) Dusko Jovanovic, Bojan Orlic, Jan Broenink, Job van Amerongen

Sampling and Timing: A Task for the Environmental Process

DESIGN AND SIMULATION OF HETEROGENEOUS CONTROL SYSTEMS USING PTOLEMY II

Component-Based Design of Embedded Control Systems

SWE 760 Lecture 1: Introduction to Analysis & Design of Real-Time Embedded Systems

AADL committee, Valencia October 2 nd, Pierre Dissaux (Ellidiss) Maxime Perrotin (ESA)

Fault Avoidance in Development of Robot Motion-Control Software by Modeling the Computation

LUNA: Hard Real-Time, Multi-Threaded, CSP-Capable Execution Framework M. M. Bezemer R. J. W. Wilterdink J. F. Broenink

Towards an Integrated System Model for Testing and Verification

Architectural Blueprint

Formal Analysis of Timing Effects on Closed-loop Properties of Cyber Physical Systems

SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Hardware/Software Co-design

Selection of controllers and integrated systems

Hardware-Software Codesign. 6. System Simulation

EE249 Lab September 30 h, 2008 Hugo A. Andrade

Real-time and Fault Tolerance in Distributed Control Software

1. Draw and explain program flow of control without and with interrupts. [16]

Embedded Systems Programming

CS4514 Real-Time Systems and Modeling

COMPUTER-AIDED DESIGN OF MECHATRONIC SYSTEMS USING 20-SIM 3.0

Functional Design of Web Applications. (partially, Chapter 7)

European Conference on Nanoelectronics and Embedded Systems for Electric Mobility. HIL platform for EV charging and microgrid emulation

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

HW/SW Co-design. Design of Embedded Systems Jaap Hofstede Version 3, September 1999

Model-Based Design of Automotive RT Applications

Why an additional Shaper

Simulation and Visualization Tool Design for Robot Software

Verifying control systems using CSP, FDR, and Handel-C.

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

Introduction to Control Systems Design

System-Level Design Languages: Orthogonalizing the Issues

COMPLEX EMBEDDED SYSTEMS

UC Berkeley Mobies Technology Project

Predictable Timing of Cyber-Physical Systems Future Research Challenges

2. REAL-TIME CONTROL SYSTEM AND REAL-TIME NETWORKS

COMPUTER ENGINEERING (CPE)

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

F6 Model-driven Development Kit (F6MDK)

Simulation and Verification of Timed and Hybrid Systems

MAC-3xx Core. Application. As the result, we deliver any customized SPEC Off-the-Shelf

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

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

Applied Formal Methods - From CSP to Executable Hybrid Specifications

EUROSICMA AUTOMATION DEPARTMENT PC BASED TECHNOLOGY

IOT FLAGSHIP PROJECT. Dr. Mario Drobics, AIT

1.0 The System Architecture and Design Features

Ch 1: The Architecture Business Cycle

Software Architecture for Immersipresence

Embedded Real-Time Systems

Systems Integration. Gautam H. Thaker Patrick J. Lardieri Donald Krecker Keith O Hara Chuck Winters

Object-Oriented Design

The Montana Toolset: OSATE Plugins for Analysis and Code Generation

PROCEEDINGS OF THE 5TH PROGRESS SYMPOSIUM ON EMBEDDED SYSTEMS

Model Driven Engineering in High Tech Industry

DEPARTMENT OF COMPUTER SCIENCE

IN4343 Real-Time Systems

Embedded Software from Concurrent Component Models

Decoupling Among Design Concerns

Implementation of Conventional and Neural Controllers Using Position and Velocity Feedback

ENABLING AND (IN MY HUMBLE OPINION) ESSENTIAL TECHNOLOGIES FOR DEPENDABILITY BENCHMARKING. William H. Sanders

Plant Modeling for Powertrain Control Design

Embedded software design with Polychrony

Hardware Description Languages & System Description Languages Properties

A Composable Simulation Environment to Support the Design of Mechatronic Systems

Hardware Description Languages & System Description Languages Properties

Rotary Motion Servo Plant: SRV02. Rotary Experiment #00: QuaRC Integration. Using SRV02 with QuaRC. Student Manual

The Embedded Systems Design Challenge. EPFL Verimag

Simulink/Stateflow. June 2008

Embedded Software Engineering

What is Mechatronics

A Framework for the Design of Mixed-Signal Systems with Polymorphic Signals

Model driven Engineering & Model driven Architecture

SOLIDWORKS ELECTRICAL SUITE

Semantics-Based Integration of Embedded Systems Models

Future Directions in Simulation Modeling. C. Dennis Pegden

System-On-Chip Architecture Modeling Style Guide

Software Specification Refinement and Verification Method with I-Mathic Studio

Computer Hardware Requirements for Real-Time Applications

Predictable Interrupt Management and Scheduling in the Composite Component-based System

Extensible Modeling Languages

What are Embedded Systems? Lecture 1 Introduction to Embedded Systems & Software

EXECUTABLE MODELING WITH FUML AND ALF IN PAPYRUS: TOOLING AND EXPERIMENTS

Time-Awareness in the Internet of Things. ITSF 2014 Marc Weiss, NIST Consultant

COMPUTER SCIENCE INTERNET SCIENCE AND TECHOLOGY HUMAN MEDIA INTERACTION BUSINESS INFORMATION TECHNOLOGY

CS SOFTWARE ENGINEERING QUESTION BANK SIXTEEN MARKS

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

Programming Languages for Real-Time Systems. LS 12, TU Dortmund

Typed Assembly Language for Implementing OS Kernels in SMP/Multi-Core Environments with Interrupts

Total No. of Questions : 18] [Total No. of Pages : 02. M.Sc. DEGREE EXAMINATION, DEC First Year COMPUTER SCIENCE.

Towards Semantic Interoperability between C2 Systems Following the Principles of Distributed Simulation

, , & CATALOG TECHNICAL CORES & ELECTIVES ELECTRICAL ENGINEERING TECHNICAL CORES

Component-Based Design of Embedded Control Systems

Syllabus Instructors:

Foundation of Contract for Things

Transcription:

A Model-Driven Approach to Embedded Control System Implementation Jan F. Broenink, Marcel A. Groothuis, Peter M. Visser, Bojan Orlic Control Engineering, CTIT, Faculty EE-M-CS,, Enschede, Netherlands e-mail: J.F.Broenink@utwente.nl, web: www.ce.utwente.nl/bnk 1 Broenink et al, 2007

Overview Introduction Embedded Control Systems Goal and Benefit Design Approach Mechatronic Systems, Embedded Control Software Model-based design; Verification by Simulation Modeling formalisms Port-based (bond) graphs plant CSP diagrams software Embedded Control System Implementation Controller Models, Workflow Stepwise Refinement Tools, Distributed Simulation Framework Case Try-outs at lab 2 Broenink et al, 2007

Embedded Control Systems Essential properties Computer I/O Plant Loop controllers hard real time Dynamic behavior of plant essential» Latency small compared to time constants plant» Whole system must be considered Intrinsically concurrent Software User Interfacing, Data processing, Plant control (20-30% of code) Reliable, safe, timing guaranteed Triggering: bounded jitter (isochronous) Hardware Computer hardware & I/O interfacing Programmable devices Distributed and heterogeneous Plant Machine, Sensors, Actuators, Power Amplifiers 3 Broenink et al, 2007

Problem Goal, Benefit, Approach Developing Reliable and Robust Embedded Control Software is too costly and too time consuming. Reasons Complexity Heterogeneity Lack of Predictability Late Integration Approach Virtual prototyping = Simulation Model-level integration discipline-specific issues Property-preserving code generation Shorten design time Better quality product 4 Broenink et al, 2007

Tools needed Design Approach, Tools Extendable / updatable software Total system (embedded + embedding!) Embedded Control Systems Dynamic behavior of plant Layered structure of controllers Stepwise refinement» Physical Systems modeling» Control law Design» Embedded Control System Implementation Gradually enhance laws to code» Realization Verification by Simulation & Formal Checking Physical System Modeling Control Law Design Embedded Control System Implementation Realization Verification by Simulation Verification by Simulation Verification by Simulation / Model Check Validation and Testing 5 Broenink et al, 2007

Demands Used Model Formalisms Overview - Hierarchy Reusability - Interfaces, - Implementation independent of connection Simulate-ability - Total model! Essential solution Object Orientation, Components Port-based Interfaces Choices CSP Diagrams» Software structure, CSP-based, DFD, compositional VHDL» Configurable: design I/O functionality as if it were software Port-based (Bond) Graphs» Object-oriented physical systems modeling 6 Broenink et al, 2007

Port-based (Bond) Graphs Plant Bond Graphs Relevant dynamic behavior as diagram» Directed graph: submodels & ideal connections Domain-independent» Analogies between physical domains Restricted number of elements» Per physical basic concept 1 bond-graph element Encapsulation of contents Interface: ports with 2 variables» (u, i): voltage & current; (F, v): force & velocity; Equations as equalities (math. Equations)» Not as algorithm: u = i * R -> u := i * R of i := u / R Simulation (tool) Compile to differential equations (statements) Simulation = repeatedly execution of statements C MSe 1 R 20-sim I 7 Broenink et al, 2007

CSP Diagrams Software Structure Dataflow diagrams - CSP Kind of block diagram Communicating Processes Connections (= channels) transport only Formally verify-able Theory: CSP (Hoare) Checkers FDR2 Encapsulation Implementation independent of communication» Channel connections as ports Scheduling at rendezvous: in application Process operators PAR, ALT, SEQ PRI-PAR, PRI-ALT, EXC Compositional semantics Events Atomic Instantaneous: no duration Variable v over channel c: c.v Direction specific: in?x and out!x 8 Broenink et al, 2007

Embedded Control System Implementation Models Controller (CSP) -> code on target Plant (bond graphs) -> simulation Co-simulation Discrete Event & Continuous Time Steps in the method 1. Physical Systems modeling 2. Control law Design 3. Embedded Control System Implementation 4. Realization 9 Broenink et al, 2007

Embedded Control System Implementation II Step 3 in the method Plant model OK; Control laws OK Gradually enhance laws to code» Integrate control laws» Safety, error & maintenance facilities» Capture non-ideal components Step 3 1 Step 1, 2 Control Algorithms 3 Working Order 1. Internal checks 2. Formal Check process logic 3. Include (control) algorithms 4. Check target code 2 Formal Check FDR2 CTC++ lib CSPm ECS Structure 4 gcsp CTC++ Connect, Compile, Configure, Control 10 Broenink et al, 2007

20-sim Bond Graphs, Block Diagrams Continuous Time Simulator gcsp CSP Diagrams Software Structures FDR2 CTC++ CSP concurrency Middleware NWsim Discrete Event / Network Simulator CTC++ based ForSee (4C) Configure, Compile Command, Control Tools 11 Broenink et al, 2007

20-Sim Modeling & simulation Bond graphs Ideal Physical Models Block Diagrams Continuous Time Simulation Animation Basic Controller Design Code Generation» C (CTC++)» Token Replacement %NUMBER_OUTPUTS% Commercially Available 12 Broenink et al, 2007

gcsp Parallel Software Modeling Software Structure» Composition» Communication Code Generation» CSPm» CTC++» occam Prototype 13 Broenink et al, 2007

CT-library: CSP-based Software Framework CSP Process Active object: One thread of control CTC++ software library Implements as building block-components Connections as channels (synchronous, rendezvous)» Link Drivers Scheduler included (kernel-like) Runs on Windows, DOS, RTAI (linux), ADSP Prototype Data -> rendezvous write read Process A Process B Process A Process B Data-flow model System 1 System 2 distributed / heterogeneous 14 Broenink et al, 2007

NWsim: Distributed Simulation Framework CSP approach All parts are CT processes Remote Channels couple to Fieldbus Network Simulator based on TrueTime Time Synchronization Prioritized Parallel Rendezvous in Timer Channels SimTimer advances time Interaction continuous discrete parts Basic integration methods (continuous part) Plant model calculations on demand 1 st try out 15 Broenink et al, 2007

Network Simulator - Case Simulator OK compared with traditional Network parameters Influence behavior Optimal via simulation 16 Broenink et al, 2007

ForSee: Connect, Compile, Configure, Command Code -> Target Connect» Model variables to target signals Token replacement» Keeps model free of target anomalies Guides» Compilation, Configuration, Logging specification Prototype log data 7 20-Sim Real-time logger gcsp code generation Target Connector code processing Compiler assistant (cross) compilation Deployment manager Send to target(s) Target Other Target template: HW descriptions Target options Logging capabilities Start/stop Modify parameters 17 Broenink et al, 2007 1 2 3 6 4 5

ForSee: Connect, Compile, Configure, Control Model Code generator Sources Code compiler Executable Deployment Running task 18 Broenink et al, 2007

ForSee: Connect, Compile, Configure, Control Model Code generator Sources Code compiler Executable Deployment Running task Deployment manager Check target (status) Upload» Executable» Configuration (parameters/hardware) Task control» Start/Stop» Data logging control Retrieve log data Modify/inspect parameters 19 Broenink et al, 2007

ForSee: Connect, Compile, Configure, Control Real-time logging Work in progress model 0.15 x PositionPID {m} PositionLQG {m} 0.1 0.05 0 0 0.5 1 1.5 2 2.5 3 3.5 4 time {s} 3D model follows real setup 20 Broenink et al, 2007

Further tool integration Current tools cover design flow Cooperate smoothly Still separated per discipline Real cooperative design One-model One-tool approach too optimistic yet» Multiple view modeling (& tools) Tightly coupling needed also on model level» Check cross-domain aspect relations Co-simulation on execution level 21 Broenink et al, 2007

Multi-view Integration Framework Tool 1 Computer & Software I/O Motor Motor Motor extension/plugin Appliance Tool 2 extension/plugin Tools, viewpoints & views Data mapping Model update Data bus Data mapping Model update Data exchange Co-simulation engine Consistency checking Translators Dependency coupling Combined code generation Tools Tool integration layer Continuous time dependencies Coremodel A Software related requirements Translation/coupling Parameters Data repository Coremodel B Hardware related Version control Discrete event test patterns Tool neutral format: core model Inter-view Data storage 22 Broenink et al, 2007

Example: Co-Simulation Tool 1 Computer & Software I/O Motor Motor Motor extension/plugin Appliance Tool 2 extension/plugin Tools, viewpoints & views Data mapping Model update Data bus Data mapping Model update Data exchange Co-simulation engine Time synchronization Data flow coupling Tool integration layer Continuous time dependencies Coremodel A Software related: interfaces requirements Translation/coupling parameters Data repository Coremodel B Hardware related: interfaces version control Discrete event test patterns Tool neutral format: core model Inter-view Data storage 23 Broenink et al, 2007

Case: twin-axes device JIWY Characteristics 2 motor encoder pairs Timed belt driven Toplevel model (step 1 & 2) Joystick controller io Plant Configuration 24 Broenink et al, 2007

JIWY: SW models 25 Broenink et al, 2007

JIWY & Tools Cases: Observations 4 th Yr EE elective course on Real-Time Software» Preparation exercises to follow the workflow» Doing right first time on real setup succeeded Tools Shorting of design time observed 2 nd Yr EE students, mechatronics project» ECS completely hidden (only 20-sim, 4C) MSc projects» Robotics / Mechatronics: effective use» ECS: stress testing parts of the chain 26 Broenink et al, 2007

Conclusions Prototype tool chain functions rather smoothly Shortening design time not (yet) significant Continue working on the tools Use larger cases in cooperation with Industry 27 Broenink et al, 2007