Model-based Design 182.721 VO Embedded Systems Engineering Armin - - PowerPoint PPT Presentation

model based design
SMART_READER_LITE
LIVE PREVIEW

Model-based Design 182.721 VO Embedded Systems Engineering Armin - - PowerPoint PPT Presentation

Model-based Design 182.721 VO Embedded Systems Engineering Armin Wasicek 6.12.2011 Overview Introduction System Theory Model Driven Architecture (MDA) MBD Development Environments Summary 10.12.2010 Model based Design 2


slide-1
SLIDE 1

Model-based Design

182.721 VO Embedded Systems Engineering Armin Wasicek 6.12.2011

slide-2
SLIDE 2

Overview

Introduction System Theory Model Driven Architecture (MDA) MBD Development Environments Summary

2 10.12.2010 Model‐based Design

slide-3
SLIDE 3

History

General Systems Theory (GST) was the

fundamental underpinning of most commercial software design techniques by the 1970s

Computer-Aided Software Engineering (CASE)

tools developed in the 1980s

Creating the Unified Modeling Language (UML) in

the 1990s

Model Driven Architecture (MDA) launched in 2001

3 10.12.2010 Model‐based Design

slide-4
SLIDE 4

Challenges

Exploding code sizes and complexity of software Increase the productivity of the individual engineer Agility of applications, technologies, platforms Coordinate the resources of people with expertise

in a wide range of disciplines

4 10.12.2010 Model‐based Design

slide-5
SLIDE 5

When software engineers build systems…

Software-centric design methodologies:

Treat software as

main entity

Overlook domain

knowledge

Dominate the

functional design

10.12.2010 Model‐based Design 5

UML is not the answer to system design

slide-6
SLIDE 6

Overview

Introduction System Theory Model Driven Architecture (MDA) Models of Computation Summary

6 10.12.2010 Model‐based Design

slide-7
SLIDE 7

Introduction to System Theory

Systems theory first originated in biology in the 1920s out of

the need to explain the interrelatedness of organisms in ecosystems

Systems as interacting components: Purpose, Environment,

Interrelations, Boundary/Interfaces, Input/Output

Emergence is the way complex systems and patterns arise

  • ut of a multiplicity of relatively simple interactions.

7 10.12.2010 Model‐based Design

System theory is an approach to a complex structure that abstracts away from the particular physical, chemical, or biological nature of its components and simply considers the structure they together implement, in terms of the functional role of individual parts and their contribution to the functioning of the whole.

slide-8
SLIDE 8

Which models are there?

Scale models Partial models Process models State models Etc.

Substitute for direct measurement and experimentation

energize active assemble disassemble deplete short-circuit passive

8 10.12.2010 Model‐based Design

slide-9
SLIDE 9

Model Definition

Representation

A model represents some thing. Model and thing are connected by a morphism.

Abstraction

The model suppresses irrelevant detail and

focuses on important aspects. Pragmatics

The model is created for a purpose.

[Herbert Stachowiak, Allgemeine Modelltheorie]

9 10.12.2010 Model‐based Design

slide-10
SLIDE 10

Relations between Models and Code

Code

Model only Code visualization Code only Runtime Environment Model‐ centric

generate synchronize visualize

Model Model Model Model Code Code Code

„What‘s a model?“ „The code is the model“ „Manage code and model“ „The model is the code“ „Let‘s talk models!“

Tim Trew, Creating Embedded Platforms with MDA, ECMDA, 2009 10 10.12.2010 Model‐based Design

slide-11
SLIDE 11

Model representations

Textual Hierachical Graphical

10.12.2010 Model‐based Design 11

Graphical modeling tools reduce the complexity of model designs by breaking them into hierarchies of individual design blocks.

mtype = {REQ,ACK}; typedef Msg { byte a[2]; mtype tp; } ; chan toR = [1] of {Msg}; bool flag; proctype Sender() { Msg m; ... m.a[0]=2; m.a[1]=7; m.tp = REQ; toR ! m; } proctype Receiver(byte n) { Msg m; ... toR ? m; } init { run Sender(); run Receiver(2); }
slide-12
SLIDE 12

Model Driven X

Model Driven Architecture (MDA) Model Driven Development (MDD) (e.g. UML) Model Driven Engineering (MDE) Model Based Engineering (MBE)

26.11.2009 Model‐based Design 12

slide-13
SLIDE 13

Overview

Introduction System Theory Model Driven Architecture (MDA) MBD Development Environments Summary

13 10.12.2010 Model‐based Design

slide-14
SLIDE 14

Traditional approach for a controller

Development strategy for a digital control system:

Design controller on paper with block diagrams Implement the design in a programming language Integrate controller with the plant model Adjust parameters of the controller through simulation Trash or take: reinterate the design until satisfactory

10.12.2010 Model‐based Design 14

Rapid prototyping is the application of productivity tools to develop working prototypes of control systems in the minimum amount of time.

slide-15
SLIDE 15

Model-Based Design

  • From Paper-based approach to Executable Model
  • Model captures all information about concept,

design, implementation

  • Model is used in all development stages

(Research, Design, Implementation and Verification&Validation)

  • Model is continously updated and elaborated

10.12.2010 Model‐based Design 15

slide-16
SLIDE 16

Applications of System Models

Models reflecting all different aspects of the required system are developed and used throughout all stages of the system development process

Simulation, Visualization Static System Analysis, (e.g., predict energy consumption) Formal Verification Virtual Fault Injection Synthesis of Implementations & Test Suites Documentation, Presentation

10.12.2010 Model‐based Design 16

slide-17
SLIDE 17

Key steps in the MBD approach

(1) System identification (modeling the plant) is an iterative

  • process. By acquiring and processing raw data from a real-

world system and choosing a mathematical model to represent the plant behavior

(2) Controller analysis and synthesis. Identify dynamic

characteristics of the plant model and synthesize an appropriate controller.

(3) Offline simulation. Simulation allows specification,

requirements, and modeling errors to be found early

(4) Deployment

10.12.2010 Model‐based Design 17

slide-18
SLIDE 18

MBD: System Simulation

  • Simulation Goals
  • Verification and Validation
  • Collect Data to Improve Models
  • Software in the Loop
  • Non real-time simulation, e.g. using SimuLink
  • Using plant model and implementation of controller model
  • Hardware in the Loop
  • Real-time simulation of plant model
  • Using plant model and controller implemented on target

10.12.2010 Model‐based Design 18

slide-19
SLIDE 19

Software-in-the-Loop (SiL) Simulation

Goal: verify that code generated from a model will

function identically to the model

Generate code from models (e.g., c-code) Run code together with model of plant on the

development platform

Benefits:

 Low cost  Target platform must not

be specified

26.11.2009 Model‐based Design 19

slide-20
SLIDE 20

Hardware-in-the-Loop (HIL)-Simulation

Form of real-time simulation Purpose of a HiL is to provide

all of the electrical stimuli to fully exercise the ECU

Connect actual ECU to simulator Plant is simulated, ECU is real

26.11.2009 Model‐based Design 20

  • 1. Model of the plant
  • 2. Sensor models
  • 3. Real‐time target
  • 4. Real or simulated loads
  • 5. Fault insertion relay matrix
  • 6. Host PC to
  • Control simulation
  • Collect diagnostics
slide-21
SLIDE 21

Key benefits of the MBD approach

MBD provides a common design environment, which

facilitates general communication, data analysis, and system verification between development groups.

Engineers can locate and correct errors early in system

design, when the time and financial impact of system modification are minimized.

Design reuse, for upgrades and for derivative systems with

expanded capabilities, is facilitated.

10.12.2010 Model‐based Design 21

slide-22
SLIDE 22

Shift from ‚V‘ to ‚Y‘ Model

Domain Engineering:

identify potentially reusable components

Frameworking:

generic components and their relationships

Assembly:

specialization of reusable components

Archiving:

make a reusable component available

26.11.2009 Model‐based Design 22

Capretz, L.F., „Y: A New Component‐Based Software Life Cycle Model” , Journal of Computer Science 1 (1): 76‐82, 2005

slide-23
SLIDE 23

Model Driven Architecture (MDA)

OMG Standard: Model Driven Architecture (MDA). Application of models and generators to improve

the software development process

The objective is NO total automation, but a

reasonable proportion

Goals

Speed up the development process:

„automation through formalization“

Tackle the complexity challenge through abstraction

23 10.12.2010 Model‐based Design

slide-24
SLIDE 24

MDA Process

  • a. Computation Independent Model (CIM): informal specification
  • b. Platform Independent Model (PIM): model which is independent

from a specific computational platform (for business processes)

  • c. Platform Specific Model (PSM): model which is dependent on a

particular architecture, service definitions

  • d. Code model and target platform

MDA defines conceptual separation between models and the

transformation between models:

 Model-to-model transformation (MOF QVT)  Model-to-code transformation

24 10.12.2010 Model‐based Design

slide-25
SLIDE 25

Architecture Analysis and Design Language (AADL)

Textual and graphic language (SAE standard) Design and analyze the software and hardware

architectures of embedded and real-time systems End-to-end latency Schedulability Reliability, …

Describe the structure as an assembly of software

components

Mapping to an execution platform

26.11.2009 Model‐based Design 25

slide-26
SLIDE 26

AADL - Context Diagram for a Set of

Vehicle Control Systems

26.11.2009 Model‐based Design 26

John Hudak, Peter Feiler, „Developing AADL Models for Control Systems: A Practitioner’s Guide“, Technical Report CMU/SEI‐2007‐TR‐014, 2007

slide-27
SLIDE 27

AADL - Context Diagram of the Cruise Control

26.11.2009 Model‐based Design 27

John Hudak, Peter Feiler, „Developing AADL Models for Control Systems: A Practitioner’s Guide“, Technical Report CMU/SEI‐2007‐TR‐014, 2007

slide-28
SLIDE 28

AADL - Software Component View of the Cruise Control

26.11.2009 Model‐based Design 28

John Hudak, Peter Feiler, „Developing AADL Models for Control Systems: A Practitioner’s Guide“, Technical Report CMU/SEI‐2007‐TR‐014, 2007

slide-29
SLIDE 29

AADL - System Hierarchy for the Cruise Control

26.11.2009 Model‐based Design 29

John Hudak, Peter Feiler, „Developing AADL Models for Control Systems: A Practitioner’s Guide“, Technical Report CMU/SEI‐2007‐TR‐014, 2007

slide-30
SLIDE 30

Basic Comparison of UML and AADL

System designers can use UML to diagram functional

structures, and AADL to define runtime behavior

SysML and the MARTE profile extend UML for embedded and

real-time systems

26.11.2009 Model‐based Design 30

Dionisio de Niz, „Diagrams and Languages for Model‐Based Software Engineering of Embedded Systems: UML and AADL“, Whitepaper, SEI, 2007

slide-31
SLIDE 31

UML & AADL Focus Areas

26.11.2009 Model‐based Design 31

Dionisio de Niz, „Diagrams and Languages for Model‐Based Software Engineering of Embedded Systems: UML and AADL“, Whitepaper, SEI, 2007

slide-32
SLIDE 32

Overview

Introduction System Theory Model Driven Architecture (MDA) MBD Development Environments Summary

32 10.12.2010 Model‐based Design

slide-33
SLIDE 33

MatLab/SimuLink

Development Environment for multi-domain simulation and

model-based design of dynamic systems

Basic notation are blocks and data flows between them Provides domain-specific toolboxes (e.g., automotive) Provides code generation facilities

26.11.2009 Model‐based Design 33

slide-34
SLIDE 34

dSPACE

Leading developer of MBD tools

for automotive applications

dSPACE products help to reduce

complexity of today’s embedded software engineering

Integrated Development Environment features:

  • system design, rapid control prototyping, automatic production

code generation, and HIL testing

26.11.2009 Model‐based Design 34

slide-35
SLIDE 35

Esterel SCADE

SCADE addresses mission and safety-critical

embedded applications.

SCADE is certified/qualified Features

Graphical and text editor Simulation Formal verification Code generation Model Test Coverage Gateways: Simulink, DOORS, Altia, UML/SysML, etc.

26.11.2009 Model‐based Design 35

slide-36
SLIDE 36

Eclipse Modeling Framework

Eclipse-based modeling framework and code generation facility

for building tools and other applications based on a structured data model

Ecore is a language to define meta-models “Your models instantiate the meta-model,

and your meta model instantiates Ecore”

Xtext can be used to create a

domain-specific language

People use Xtext-based languages to drive

code generators that target Java, C, C++, C#, Objective C, Python, or Ruby code

26.11.2009 Model‐based Design 36

http://www.eclipse.org/Xtext/document ation/2_0_0/210‐emf‐integration.php

slide-37
SLIDE 37

Overview

Introduction System Theory Model Driven Architecture (MDA) MBD Development Environments Summary

37 10.12.2010 Model‐based Design

slide-38
SLIDE 38

MBD Increase of productivity

The MBD approach can dramatically increase a

system designer’s productivity

11.10.2011 Embedded Systems Engineering 38

SCADE Reductions of efforts in percent Software development cost 70‐90% Software certification cost 50% Software update cycle time 65‐75% MatLab Reductions of efforts Development time 50% Design reuse Up to 80% Debugging process ~20% Code efficiency Minimized documentation Collaboration simplified

slide-39
SLIDE 39

Summary

Models and their application MBD offers a systematic engineering approach for

embedded systems design

Industry-grade software development is not

imaginable without model-based testing

Key benefits of MBD:

Design reuse Faster development cycle Early detection of faults

11.10.2011 Embedded Systems Engineering 39

slide-40
SLIDE 40

ENDE

Danke für die Aufmerksamkeit!