1 © 2015 The MathWorks, Inc. Du modèle au materiel : Solutions temps-réel pour prototypage rapide Olivier Berard
1© 2015 The MathWorks, Inc.
Du modèle au materiel : Solutions temps-réel pour prototypage
rapide
Olivier Berard
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
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
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
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
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
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
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
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
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
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
12
Who uses control prototyping and Why ?
Why, What, How Use cases Case study Conclusions
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
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
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
16
Using Development Kits for Rapid Prototyping
MCU,
ARM,
FPGA,
SOC,
GPU
Why, What, How Use cases Case study Conclusions
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
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
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
20
Who uses generated production code and Why?
Why, What, How Use cases Case study Conclusions
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
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
23
Who uses Hardware In the Loop and Why ?
Why, What, How Use cases Case study Conclusions
24
Case Study
Why, What, How Use cases Case study Conclusions
25
Applications
Many things…
Including Motor control
What do these applications have in common?
Why, What, How Use cases Case study Conclusions
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
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
28
Demonstration
Why, What, How Use cases Case study Conclusions
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
30
Modeling & Simulation
Control Plant
System Model
Test Harness
Signal /
Sequence
generator
Results Analyse / Assessme
nt
Why, What, How Use cases Case study Conclusions
31
Modeling & Simulation
System Model
Why, What, How Use cases Case study Conclusions
32
Modeling & Simulation
Why, What, How Use cases Case study Conclusions
33
Modeling & Simulation
Why, What, How Use cases Case study Conclusions
34
Modeling & Simulation
Why, What, How Use cases Case study Conclusions
35
Modeling & Simulation - Run & Analyse tests
Why, What, How Use cases Case study Conclusions
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
37
Rapid Control Prototyping
Ethernet
Position/Switches states
Command/Leds states
Plant Prototype
Controller
Why, What, How Use cases Case study Conclusions
38
Rapid Control Prototyping
Why, What, How Use cases Case study Conclusions
39
Rapid Control Prototyping
Why, What, How Use cases Case study Conclusions
40
Compile, Load,
Execute
Control, Monitor & Log
in Real Time
App designer
Why, What, How Use cases Study case Conclusions
Rapid Control Prototyping
41
Rapid Control Prototyping - Run & Analyse tests
Why, What, How Use cases Case study Conclusions
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
43
Production Code
Controller
Why, What, How Use cases Study case Conclusions
44
Production Code
Why, What, How Use cases Case study Conclusions
45
Production Code
Target IDE
Why, What, How Use cases Case study Conclusions
Compile & Load to target from IDE
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
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
48
Why, What, How Use cases Case study Conclusions
Hardware in The Loop
49
Why, What, How Use cases Case study Conclusions
Hardware in The Loop
50
Control, Monitor & Log
in Real Time
App designer
Compile, Load,
Execute
Why, What, How Use cases Case study Conclusions
Hardware in The Loop
51
Reuse your tests!
Why, What, How Use cases Case study Conclusions
Hardware in The Loop
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
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