Concurrent Design of Embedded Control Software

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

A Model-Driven Approach to Embedded Control System Implementation

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

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.

Introduction to Control Systems Design

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

What is Mechatronics

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

EE382V: System-on-a-Chip (SoC) Design

Supervisory Control Synthesis the Focus in Model-Based Systems Engineering

Hardware-Software Codesign. 1. Introduction

Hardware/Software Co-design

MATLAB/Simulink in der Mechatronik So einfach geht s!

Cecilia Laschi The BioRobotics Institute Scuola Superiore Sant Anna, Pisa

Hardware and Software Co-Design for Motor Control Applications

Selection of controllers and integrated systems

Hardware-Software Codesign. 6. System Simulation

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

Embedded Systems: Hardware Components (part II) Todor Stefanov

High-Level and Model-Based Design Targeting FPGAs and SoCs

Simulink Based Robot Arm Control Workstation. Figure 1-1 High Level Block Diagram

Requirements and Design Overview

Hardware and Software Co-Design for Motor Control Applications

MATLAB Expo Simulation Based Automotive Communication Design using MATLAB- SimEvent. Sudhakaran M Anand H General Motors

RE for Embedded Systems - Part 1

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

System-level simulation (HW/SW co-simulation) Outline. EE290A: Design of Embedded System ASV/LL 9/10

Integrating Mechanical Design and Multidomain Simulation with Simscape

Lecture Notes UML UNIT-II. Subject: OOAD Semester: 8TH Course No: CSE-802

MoCC - Models of Computation and Communication SystemC as an Heterogeneous System Specification Language

Embedded Real-Time Systems

Automated Software Synthesis for Complex Robotic Systems

Hardware in the Loop Functional Verification Methodology

A unified multicore programming model

System level modelling with open source tools

MBS MODELLING WITH SIMMECHANICS: CASE STUDIES IN RESEARCH AND EDUCATION

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

Measuring Applications. Speed Control Applications. Feedback Applications

Cadence SystemC Design and Verification. NMI FPGA Network Meeting Jan 21, 2015

A Model-Driven Approach to Embedded Control System Implementation

Embedded Systems: Hardware Components (part I) Todor Stefanov

Part 2: Principles for a System-Level Design Methodology

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

Hardware-Software Codesign. 1. Introduction

Performance Verification for ESL Design Methodology from AADL Models

Codesign Framework. Parts of this lecture are borrowed from lectures of Johan Lilius of TUCS and ASV/LL of UC Berkeley available in their web.

Virtuelle Inbetriebnahme und Optimierung von Robotersystemen mit Simscape The MathWorks, Inc. 1

Shadow Dexterous Hand C6M Technical Specification

Designing and Analysing Power Electronics Systems Using Simscape and SimPowerSystems

The Internet of Things and Factory of Future

A Cost Oriented Humanoid Robot Motion Control System

Explicit MPC in Mechatronics Industry:

Integrating Mechanical Design and Multidomain Simulation with Simscape

Software Architecture. Lecture 4

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

Rapid Prototype with Field Gate (A Design and Implementation of Stepper Motor Using FPGA)

IN4343 Real-Time Systems

Design of Real-Time Software

SOFTWARE DRIVES HARDWARE, LESSONS LEARNED AND FUTURE DIRECTIONS

Communication Systems Design in Practice

Plant Modeling for Powertrain Control Design

Distributed Operation Layer Integrated SW Design Flow for Mapping Streaming Applications to MPSoC

Flexible Modeling and Simulation Architecture for Haptic Control of Maritime Cranes and Robotic Arms

Research Subject. Dynamics Computation and Behavior Capture of Human Figures (Nakamura Group)

Fundamentals of Inverse Kinematics Using Scara Robot

Communication Systems Design in Practice

Property-Preservation Synthesis for Unified Controland Data-Oriented Models

System-on-Chip Architecture for Mobile Applications. Sabyasachi Dey

THE BENEFITS OF MODEL-BASED ENGINEERING IN PRODUCT DEVELOPMENT FROM PCB TO SYSTEMS MENTOR GRAPHICS

MULTI-PROCESSOR SYSTEM-LEVEL SYNTHESIS FOR MULTIPLE APPLICATIONS ON PLATFORM FPGA

Designing Real-Time Control Applications Using LabVIEW and CompactRIO. Developer Days 2009

Software Verification and Validation (VIMMD052) Introduction. Istvan Majzik Budapest University of Technology and Economics

DESIGN AND IMPLEMENTATION OF VISUAL FEEDBACK FOR AN ACTIVE TRACKING

DESIGN AND SIMULATION OF HETEROGENEOUS CONTROL SYSTEMS USING PTOLEMY II

MECHATRONICS. William Bolton. Sixth Edition ELECTRONIC CONTROL SYSTEMS ENGINEERING IN MECHANICAL AND ELECTRICAL PEARSON

Introduction to LabVIEW and NI Hardware Platform

COE 561 Digital System Design & Synthesis Introduction

Using RecurDyn. Contents

A MULTI-ROBOT SYSTEM FOR ASSEMBLY TASKS IN AUTOMOTIVE INDUSTRY

Modelling, Analysis and Scheduling with Dataflow Models

COMP 354 Introduction to Software Engineering

Hardware Design Environments. Dr. Mahdi Abbasi Computer Engineering Department Bu-Ali Sina University

Introduction. Definition. What is an embedded system? What are embedded systems? Challenges in embedded computing system design. Design methodologies.

A Graduate Embedded System Education Program

Semantics-Based Integration of Embedded Systems Models

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

Modeling and SW Synthesis for

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

Hardware Software Codesign of Embedded System

By: Chaitanya Settaluri Devendra Kalia

Embedded Systems: Projects

Co-synthesis and Accelerator based Embedded System Design

Intro to High Level Design with SystemC

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

Control Technology. motion controller and power amplifier

Emerging Platforms, Emerging Technologies, and the Need for Crosscutting Tools Luca Carloni

Thomas Bräunl EMBEDDED ROBOTICS. Mobile Robot Design and Applications with Embedded Systems. Second Edition. With 233 Figures and 24 Tables.

ECE 587 Hardware/Software Co-Design Lecture 11 Verification I

Extending the Growing Neural Gas Classifier for Context Recognition

Simulation-Based Design of Robotic Systems

Transcription:

Concurrent Design of Embedded Software Third International Workshop on Multi-Paradigm Modeling MPM`09, 06-10-2009 Marcel Groothuis, Jan Broenink University of Twente, The Netherlands Raymond Frijns, Jeroen Voeten Eindhoven University of Technology, The Netherlands 07/10/2009 Concurrent Design of Embedded Software 1

Contents Introduction Mechatronic systems design challenges Embedded Systems software Model-driven Design Methodology Case study Results & Conclusions Concurrent Design of Embedded Software 2

Introduction Mechatronics challenges Developing Reliable and Robust Embedded Software for mechatronic applications is too costly and too time consuming. Reasons: Complexity, Heterogeneity, Lack of Predictability, Late Integration Approaches to tackle the problem Concurrent Engineering, Model Driven Design, Early Integration Sequential Concurrent Model-driven concurrent Trade-off between concurrency design process (a) design process (b) design process(c) efficiency and integration efficiency (d) Specs Specs Specs Specs Design Time Continuous Time Discrete Event Continuous Time Integration Discrete Event Continuous Time Integration Discrete Event Continuous Time 1 Integration Discrete Event 2 3 Integration Trade-off concurrent design flow integration efficiency Concurrent Design of Embedded Software 3

Mechatronics: Embedded Systems Essential Properties Embedded Software Dynamic behavior of the physical system essential for SW Real-time constraints with low-latency requirement Dependability: Safety, Reliability Layered Software structure Embedded software Non real-time Soft real-time Hard real-time I/O hardware Power D/A amplifier Physical system Actuators Physical process A/D Filtering/ Scaling Sensors Model-driven Design Heterogeneous modeling Multiple Models of Computation Multiple Modeling formalisms Concurrent Design of Embedded Software 4

ECS Design Methodology Aim Efficient Concurrent Design Fast Integration Reliable Result Approach: Model-Driven Design Concurrent Design Code Synthesis Concurrent Design of Embedded Software 5

ECS Design Methodology Way of Working Abstraction Hierarchy Split into subsystems Cope with complexity Model-driven design Design Space Exploration Aspect models Make choices Limit solution space Step-wise refinement Add detail Lower abstraction Implementation Realization Concurrent design trajectory Mechanics, Electronics, SW: Discrete Event, Continuous Time Model-level Early Integration where needed Concurrent Design of Embedded Software 6

Design Methodology Discrete Event Approach Stepwise & local refinement Verification by simulation & model checking Way of working System partitioning into concurrent actors C-model : Abstract interactions between concurrent actors M-model : Interaction between different MoCs R-model : Timing low-level behavior Property preserving code synthesis Characteristics Concurrency Multi MoC Real-time Models C-model M-model R-model Abstraction level High Low Concurrent Design of Embedded Software 7

Design Methodology Continuous Time Approach Stepwise & local refinement From model towards controller code Verification by simulation Physical System Modeling Verification by Simulation Way of Working Model & Understand Physical system dynamics Simplify model, derive the control laws Interfaces & target Add non-ideal components (AD, DA, PC) Dependability: Safety, Reliability, Integrate control laws into ES Scaling/conversion factors Via local refinement: {Software/Processor/Hardware}-In the Loop Concurrent Design of Embedded Software 8 Law Design Embedded System Implementation Realization Verification by Simulation Verification by Simulation / Model Check Validation and Testing

Case study Overview Goals Apply our methodology Real-world setup with industrial complexity Concurrent model-driven design Trade-off integrated design flow partial separated design flow Integration efficiency analysis Comparison with other test cases on the same setup Concurrent Design of Embedded Software 9

Gearhead 43:1 Gearhead 43:1 Magnet Gearhead 18:1 Encoder Case Study Production cell Extraction buffer Encoder Motor 150W Extraction unit Production cell demonstrator Based on: Stork Plastics Molding machine Extraction belt Rotation unit Molder unit Molder door Al Motor 70W Feeder belt Architecture CPU (ECS) + FPGA (digital I/O) Distributed possible Embedded PC CPU + FPGA Motor 150W Encoder Sensor Block movement direction Feeder unit 6 Production Cell units Action in the production process Molding, Extraction, Transportation, Storage Synchronize with neighbors Deadlock possible on > 7 blocks Concurrent Design of Embedded Software 10

Case Study Production cell Embedded System Software Design Jointly Specs, partitioning, interfaces Concurrently SW partitions Jointly SW integration & testing Design Time Model-driven concurrent design process Specs Continuous Time 1 Integration Discrete Event 2 3 User interface Supervisory control & Interaction Sequence control Loop control Safety layer Concurrent Design of Embedded Software 11

Gearhead 43:1 Motor 150W Encoder Encoder Motor 150W Gearhead 43:1 Magnet Al Gearhead 18:1 Motor 70W Encoder Case Study Partitioning & Hierarchy Embedded Software Discrete Event partition Continuous/Discrete Time partition Extraction buffer Extraction unit Gearhead 15:1 Motor 150W Encoder Extraction belt Based on Top level system model Production Cell Units (PCUs) Rotation unit Feeder belt Molder unit Molder door Layered Software structure Embedded PC CPU + FPGA Sensor Gearhead 15:1 Motor 150W Encoder Block movement direction Feeder unit DE CT/DT CT Interface User interface Supervisory control & Interaction Sequence control Loop control Safety layer Interface definitions Concurrent Design of Embedded Software 12

Discrete Event Software Design Modeling tools : SHESim/Rotalumis POOSL: Parallel Object-Oriented Specification Language SHESim: Graphical tool for model construction and simulation Rotalumis: Fast execution engine built in C++ C-model : handshake diagram formalized in POOSL model Partitions design into a set of concurrent actors Actors synchronize action by a handshake sequence Models untimed abstract interactions between actors Concurrent Design of Embedded Software 13

Discrete Event Software Design M-model: Refinement of C-model Adds interfaces to low-level behavior Focuses on interactions between high-level DE-control and DT/CT loop control (MoC interaction) Externally observable behavior is kept the same Concurrent Design of Embedded Software 14

Discrete Event Software Design R-model: Refinement of M-model Adds low-level behavior Both DT and DE behavior Adds timing Again, externally observable functional behavior is kept the same Automatic code synthesis: Automatic mapping to target platform Property-preserving code generation Building blocks with common interface Mathematically proven timing relation between model and implementation Discrete()() sel [ (curstate) & (prestate=false) ] sensor! on { prestate := curstate } or [ (prestate) & (curstate=false) ] sensor! off { prestate := curstate } les; Discrete()(). Continuous()() [ curstate = prestate ] curstate := sensor Read; delay 0.01; Continuous()(). Concurrent Design of Embedded Software 15

Continuous Time Software Design Goal Loop ler Algorithm in C++ POOSL dataclass Low Level Safety & Sanity Check Event Interface (start/stop/error ) Modeling Tools & Languages: 20-sim Physical System Model: ODE, bond graphs, data flow Code Synthesis: template based C/C++ Physical System Modeling Law Design Embedded System Implementation Realization Verification by Simulation Verification by Simulation Verification by Simulation / Model Check Validation and Testing ler MotionprofileFWBW finished Z -1 Delay1 Sample1 Gain_FF_acceleration K K Gain_FF_velocity PID PID2 D A PWM Encoder 1 K Attenuate1 DutyCyleLimiter Plant motor_out pos_in PWM Position Plant model rotation robot H-bridge model K HBridgeVoltage PWM (1.0=100%) 1 8.233e-005s +0.3172 LinearSystem1 SignalLimiter1 K_Motor Encoder pulses (2000/motor rev) MagnetPower ToEncoderPulses K K MotorCoil I MSe f MSe ArmWithMagnetI HangingBlock I 1 Motor and transmission GY TF 1 Motor C1 C R MotorResistance Arm with magnet + block p MTF MTF Gravity 1 Se RollerBearing TF 0 R TF BeltPulley C Cbelt I Roller R Rbreak Concurrent Design of Embedded Software 16

Gearhead 43:1 Motor 150W Encoder Encoder Motor 150W Gearhead 43:1 Continuous Time Software Design 0.4 0.3 0.2 0.1 led Motion Rotation Robot Ref Position {m} Extraction buffer 0 E 5 Motor current {A} 0-5 500 Rotation velocity {rad/s} 0-500 0.5 0 PWM Output {x100%) Embedded PC -0.5 CPU + FPGA F 3 Real Pos {rad} 2 1 0 0.0005 0 Error {m} DE software Loop + Safety FPGA HW -0.0005 1.5 1 0.5 0 1.5 1 0.5 0 Forward Finished Backward Finished 0 0.5 1 1.5 2 time {s} class ler_rotation: public PooslDataClass { /* the model functions */ void Initialize (double *u, double *y, double time); void Read (double *u, double *y); void Calculate (double *u, double *y, double time ); void Write (double *u, double *y); void Terminate (double *u, double *y); }; Concurrent Design of Embedded Software 17

Integration Discrete Event Last iteration: Timing Continuous Time / Discrete Time Last iteration: Event interface Target unit test Shesim POOSL implementation 20-sim POOSL template C++ class Motion profiles (12x) lers (6x) Code synthesis Stepwise Partial code generation Template based Simulation feedback I/O drivers template Rotalumis implementation RTAI Linux Target template Target tests Target PC Setup Concurrent Design of Embedded Software 18

Results & Discussion Short integration & testing phase < 2 days, previous case: > week Almost running first time right Minor timing issue with magnet on/off traction delay Concurrent, but separated design Minimal information exchange Refinements on interfaces, data types, timing Required Good partitioning Building blocks approach Working setup Concurrent Design of Embedded Software 19

Results Movie Concurrent Design of Embedded Software 20

Results & Discussion Specs Trade-off Concurrent Design Integration Continuous Discrete Time Event 1 Minimal design interaction Integration Minimal information exchange Refinements on interfaces, data types, timing Designers attitude Focus on own partition, but think across discipline boundaries Possible Improvements Model-based integration tests Physical system model could be used to test the final software Virtual Prototyping Tool support: Automated consistency checks Tool Tool integration Model Model interaction Design Time Model-driven concurrent design process 2 3 Concurrent Design of Embedded Software 21

Conclusions Mechatronics / Cyber Physical Systems Synergistic design approach Close cooperation between disciplines integrated design Integrated design concurrent design efficiency Trade-off between early integration and late integration time Choice is project specific Good partitioning of the mechatronic system Allows concurrent, but partly separated design Case: fully integrated design is not always needed More efficient work flow with still predictable integration Methodology not limited to SW implementation ECS ECS in FPGA realization available Concurrent Design of Embedded Software 22

Ongoing work Embedded System software for our Humanoid Soccer Robot Vision processing Supervisory control Sequence control Path planning Soccer strategy Low level loop control 24 degrees of freedom Concurrent Design of Embedded Software 23