Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping...

53
1 © 2015 The MathWorks, Inc. Du modèle au materiel : Solutions temps-réel pour prototypage rapide Olivier Berard

Transcript of Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping...

Page 1: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

1© 2015 The MathWorks, Inc.

Du modèle au materiel : Solutions temps-réel pour prototypage

rapide

Olivier Berard

Page 2: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

2

Agenda

1. Why, What, How Hardware deployment?

2. Use cases details

3. Case study

4. Conclusions & what’s next…

Why, What, How Use cases Case study Conclusions

Page 3: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

3

Why deploying model to Hardware?

Model &

design the

system

Test cases

executions in

simulation

Algorithms & Tests

Correction / Optimization

Algorithm

specification

Tests

specification

Algorithm

Coding ©

Tests

Coding ©

Test cases

execution on

Hardware

System

specification

Spécification correctionDebug

Design optimiation

40% to 80% of Project Time

Manual Hardware deployment

Why, What, How Use cases Case study Conclusions

Page 4: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

4

Why deploying model to Hardware?

Model &

design the

system

Test cases

executions in

simulation

Algorithms & Tests Correction/Optimization

Algorithm

specification

Tests

specification

Algorithm

Coding ©

Tests

Coding ©

Test cases

execution on

Hardware

System

specification

Specification correctionDebug

Design optimization

Save 40% to 80% of Time to Market

Automatic Hardware deployment

Why, What, How Use cases Case study Conclusions

Page 5: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

5

Why deploying model to Hardware?

▪ Control Prototyping: Physical plant test & characterization

▪ Production code: robust, maintenable & certified code for industrial

product

▪ Verification: verifiy hardware controller

Why, What, How Use cases Case study Conclusions

Page 6: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

6

What can be modeled & deployed?

Control Plant

System Model

Test Harness

Signal/

Sequence generator

Results Analyse/

Assessment

Simulink/Stateflow Simulink/Simscape

Simulink

Simulink Test

Simulink Requirements

Why, What, How Use cases Case study Conclusions

Page 7: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

7

How to deploy? – MathWorks code generation tools

MATLAB / Simulink Coder

Embedded Coder

HDL Coder GPU coder

PLC coder

Why, What, How Use cases Case study Conclusions

Page 8: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

8

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

How to deploy? – Hardware targets

Real Time Machines

Production HardwareDevelopment kits

Why, What, How Use cases Case study Conclusions

Page 9: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

9

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Rapid Control Prototyping

Real Time Machines

Why, What, How Use cases Case study Conclusions

Page 10: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

10

Rapid Control Prototyping (RCP)

Algorithms under evaluation

Real plant prototype

Real-time target

Context

• Target undefined

• Algorithms exploration

• Requirements consolidation

Values

• Keep algorithm generic

• Refine interfaces

• Monitor & Identify plant

Why, What, How Use cases Case study Conclusions

Page 11: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

11

A fully integrated Solution

SLRT

Kernel

Simulink Real-Time (SLRT)

• Control/physical modeling

• Test Automation

• Advance data analysis

• Code Gen (C/VHDL)

Real-time Target Machines

• Modular hardware solutions

• Hardware driver library

• I/O-/protocol support

• Low latency FPGA-based

solutions

Coordinated Customer Support

Why, What, How Use cases Case study Conclusions

Page 12: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

12

Who uses control prototyping and Why ?

Why, What, How Use cases Case study Conclusions

Page 13: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

13

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

On-Target Control Prototyping

Development kits

Why, What, How Use cases Case study Conclusions

Page 14: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

14

On-Target Control Prototyping

Context

• Algorithms selected

• Interfaces identified

• First target choice

Values

• Target choice validation

• Manage target specificities

• Minimum viable product

Algorithms for production

Real plant prototype

Development kit

Why, What, How Use cases Case study Conclusions

Page 15: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

15

A B C

M

I N P U T

B L U E G R E E N R E D

P O W E R

RGBSplit-4BLACK BOX

V R C S

Input

Drivers

Output

Drivers

Special

Device

Drivers

Comm

Drivers

Scheduler/Operating System

and Support Utilities

Communication

Interfaces

Sensors

Actuators

Special

Interfaces

Tuning

Generated

Algorithm

Code

Included

Legacy

Code

Controller

Model

On-Target Control Prototyping

On Target Prototyping

Hardware support packages

Why, What, How Use cases Study case Conclusions

Page 16: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

16

Using Development Kits for Rapid Prototyping

MCU,

ARM,

FPGA,

SOC,

GPU

Why, What, How Use cases Case study Conclusions

Page 17: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

17

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Production Code

Production Hardware

Why, What, How Use cases Case study Conclusions

Page 18: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

18

Production Code Generation

Context

• Algorithms verified in simulation

• Target choice validated

• C/C++ code project started

Values

• Ease transfer from Algorithm to

Software team

• Validated algorithms integration

• Code certification Workflow

Algorithms for production

Production hardware

Software project

Why, What, How Use cases Case study Conclusions

Page 19: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

19

A B C

M

I N P U T

B L U E G R E E N R E D

P O W E R

RGBSplit-4BLACK BOX

V R C S

Input

Drivers

Output

Drivers

Special

Device

Drivers

Comm

Drivers

Scheduler/Operating System

and Support Utilities

Communication

Interfaces

Sensors

Actuators

Special

Interfaces

Tuning

Generated

Algorithm

Code

Included

Legacy

Code

Controller

Model

Production Code Generation

Production code

Why, What, How Use cases Case study Conclusions

Page 20: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

20

Who uses generated production code and Why?

Why, What, How Use cases Case study Conclusions

Page 21: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

21

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Hardware in The Loop

Real Time Machines

Why, What, How Use cases Case study Conclusions

Page 22: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

22

Hardware In the Loop (HIL)

Context

• Hardware Control board ready

• Implemented production code

Values

• HW + SW verification

• Incremental verification

• Reuse Test Scenarios

Software project for production

Real Plant

Production hardware

Real-time target

System & Test Model

Why, What, How Use cases Case study Conclusions

Page 23: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

23

Who uses Hardware In the Loop and Why ?

Why, What, How Use cases Case study Conclusions

Page 24: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

24

Case Study

Why, What, How Use cases Case study Conclusions

Page 25: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

25

Applications

Many things…

Including Motor control

What do these applications have in common?

Why, What, How Use cases Case study Conclusions

Page 26: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

26

Hardware setup

Speedgoat Real Time Machine

Speedgoat DUT demo kit

Speedgoat C2000 RCP demo kit

Available

for you!

Why, What, How Use cases Case study Conclusions

Page 27: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

27

Control objectives

Switches

LEDs

Down Up Update(2x Reset)

AutoOn/Off

PositionSide

User interface

DC motor

Actuator

UpDown

Why, What, How Use cases Case study Conclusions

Page 28: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

28

Demonstration

Why, What, How Use cases Case study Conclusions

Page 29: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

29

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Modeling & Simulation

Why, What, How Use cases Case study Conclusions

Page 30: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

30

Modeling & Simulation

Control Plant

System Model

Test Harness

Signal /

Sequence

generator

Results Analyse / Assessme

nt

Why, What, How Use cases Case study Conclusions

Page 31: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

31

Modeling & Simulation

System Model

Why, What, How Use cases Case study Conclusions

Page 32: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

32

Modeling & Simulation

Why, What, How Use cases Case study Conclusions

Page 33: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

33

Modeling & Simulation

Why, What, How Use cases Case study Conclusions

Page 34: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

34

Modeling & Simulation

Why, What, How Use cases Case study Conclusions

Page 35: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

35

Modeling & Simulation - Run & Analyse tests

Why, What, How Use cases Case study Conclusions

Page 36: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

36

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Rapid Control Prototyping

Real Time Machines

Why, What, How Use cases Case study Conclusions

Page 37: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

37

Rapid Control Prototyping

Ethernet

Position/Switches states

Command/Leds states

Plant Prototype

Controller

Why, What, How Use cases Case study Conclusions

Page 38: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

38

Rapid Control Prototyping

Why, What, How Use cases Case study Conclusions

Page 39: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

39

Rapid Control Prototyping

Why, What, How Use cases Case study Conclusions

Page 40: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

40

Compile, Load,

Execute

Control, Monitor & Log

in Real Time

App designer

Why, What, How Use cases Study case Conclusions

Rapid Control Prototyping

Page 41: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

41

Rapid Control Prototyping - Run & Analyse tests

Why, What, How Use cases Case study Conclusions

Page 42: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

42

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Production Code

Production Hardware

Why, What, How Use cases Case study Conclusions

Page 43: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

43

Production Code

Controller

Why, What, How Use cases Study case Conclusions

Page 44: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

44

Production Code

Why, What, How Use cases Case study Conclusions

Page 45: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

45

Production Code

Target IDE

Why, What, How Use cases Case study Conclusions

Compile & Load to target from IDE

Page 46: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

46

System Requirements

Software

Integration

Hardware/Software

Integration

System Integration

& Calibration

System Design

Software Design

Coding

Production Code Generation

Rapid Control Prototyping

Simulation

On-Target Control Prototyping Software-in-the-Loop

Processor-in-the-Loop

Hardware in the loop

Hardware in The Loop

Real Time Machines

Why, What, How Use cases Case study Conclusions

Page 47: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

47

Position/Switches states

Command/Leds states

Controller

Simulated Plant

Ethernet

User Interface

Why, What, How Use cases Case study Conclusions

Hardware in The Loop

Page 48: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

48

Why, What, How Use cases Case study Conclusions

Hardware in The Loop

Page 49: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

49

Why, What, How Use cases Case study Conclusions

Hardware in The Loop

Page 50: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

50

Control, Monitor & Log

in Real Time

App designer

Compile, Load,

Execute

Why, What, How Use cases Case study Conclusions

Hardware in The Loop

Page 51: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

51

Reuse your tests!

Why, What, How Use cases Case study Conclusions

Hardware in The Loop

Page 52: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

52

Conclusions

▪ Hardware deployment use cases

– Control Prototyping

– Production code

– Hardware verification

▪ Fully integrated solutions

– Simulink Real Time & Speedgoat Real-Time machines

– Hardware support packages

– From specification to Hardware verification in a single environment

▪ Retrieve your time to do more & better innovative products

Why, What, How Use cases Case study Conclusions

Page 53: Du modèle au materiel · Rapid Control Prototyping Simulation On-Target Control Prototyping Software-in-the-Loop Processor-in-the-Loop Hardware in the loop. Rapid Control Prototyping.

53

What’s next…

▪ Contact us to…

– Define together your MBD implementation plan

– Build together your project and model architecture

– Train yourselve & your team

▪ More informations online…

– Embedded systems page

– Simulink Real Time & Speedgoat Solutions

– Supported Hardware page

Why, What, How Use cases Case study Conclusions