Global Sales Conference 2010
Hardware in the Loop Simulation (HIL)Tom Lee VP Applications Engineering, Paul Goossens Director Applications Engineering
© 2010 Maplesoft, a division of Waterloo Maple Inc.
Without HIL simulation ...
... people can die ...
© 2010 Maplesoft, a division of Waterloo Maple Inc.
Key points• HIL testing is a critical process in industry
– Saves money, time, design better products faster
• With MapleSim ...– Dramatically reduce time for HIL development– Fastest real-time execution time for the HIL “plant” – Infeasible systems become feasible– More efficient analysis and design
• Without MapleSim ...– Extremely long development time– Low-fidelity models approximations, guessing
Increasing complexity
Measurements
• Modern cars, aircraft, military equipment, power equipment, and more are controlled by computers
System(plant)
Computer(controller)
Role of simulation
• Simulation prevents costly rework on real systems• Virtually test different cases before building• Software-only simulation is not enough
Numerical Integrator
PlantModel
ControllerModel
Solves the model equations
HIL Variation 1
• Hardware controller + Software plant• Also called MIL (Model in the Loop)
Numerical Integrator
SoftwarePlant Model
Real controller
HIL Simulation
• Test real control strategies witha realistic software model of plant
• Accurate, safe, cost-effective, fast
Software plantmodel
HIL Variation 2
• Software controller + Hardware plant• Also called SIL (Software in the Loop)
Numerical Integrator
HIL Simulation
• Experimental test rig for plant• Virtual analysis of system prior to
full prototype• Better for advanced analysis
Plant test rigSoftwarecontroller
Realtimehardwareplatform
Example toolchain – Plant modeling
Plantmodel
equations
RT Plantmodelcode
Realtimesoftwareplatform
HILVariation
1
Plantmodel
SimulinkSimScape+
DymolaAMESim
Simplorer SimScape+Manual
LabVIEW RTVeristand
Simulink RTWQuanser QUARC
NI PXIDSpace
XPC TargetSpeedgoat
SensorsI/OEtc.
Controllerdesign
RealtimeControllerhardware
Embeddedcode-gensoftware
Simulink RTW-E ETAS ASCET
Simulink/MATLAB BoschMototron
Realtimehardwareplatform
The MapleSim value proposition
Controllerdesign
Realtimesoftwareplatform
RealtimeControllerhardware
Embeddedcode-gensoftware
HILVariation
1
LabVIEW RTVeristand
Simulink RTWQuanser QUARC
NI PXIDSpace
XPC TargetSpeedgoat
Simulink RTW-E ASCET
Simulink/MATLAB
SensorsI/OEtc.
BoschMototron
Plant model equationsPlant model
RT Plant model code
From months to days1
Fast RT: Infeasible Feasible2
Where is CAD?
Realtimehardwareplatform
Plantmodel
equations
RT Plantmodelcode
Realtimesoftwareplatform
HILVariation
1
Plantmodel
Controllerdesign
RealtimeControllerhardware
Embeddedcode-gensoftware
CADDesign
improvement
CADManufacture
CADconcurrent design activities (new opportunities)
HIL markets
Automotive• Vehicle dynamics• Powertrain• Climate control• NVH
Aero/defence• Guidance,
navigation• UAV robotics• Simulators• Command and
control
Power• Wind turbines• New generation
power sources
Space• Space vehicle control• Guidance and nav• Space robotics
Medical• Intelligent
prosthetics• Artificial
organs
Futureopportunities
Global Sales Conference 2010
HIL DemonstrationsTom Lee VP Applications Engineering, Paul Goossens Director Applications Engineering
Derry Crymble, Quanser Consulting
© 2010 Maplesoft, a division of Waterloo Maple Inc.
The demonstrationsHIL Variation 1• “Full vehicle” plant model
– Vehicle stability control– MapleSim for multibody plant model– Very fast realtime performance– Mototron controller, NI Veristand
• Effective demonstration to automotive OEMs. Very difficult to achieve with other tools.
HIL Variation 2• Quanser 3 DOF helicopter test rig
– High-fidelity mechatronics model– MapleSim for physical modeling and
controller design– Quanser QUARC + NI realtime
hardware platform
• Ideal platform for research and education in universities
Host PC with…•MapleSim•Full-chassis model•Connectivity Toolbox•LabVIEW•Simulation Module
PXI Chassis•LabVIEW/RT Controller Module
Digital Out
CAN bus Interface
MotoTronStabilityController
Example: Stability Control Test System
Control Output Display
Full vehicle Model
Tire Model
High fidelity full vehicle physical models are rarely deployed for HIL • Difficult to develop• Too slow in realtime
Engineers are forced tomake approximationsand guesses for any HIL
MapleSim offers a better way
With Stability ControllerWithout Stability Controller
63ms cycle time with no loss of fidelity
HIL with full-vehicle physical model becomes feasible!
Realtimehardwareplatform
Demo 1: Stability control
Plantmodel
equations
RT Plantmodelcode
Realtimesoftwareplatform
Plantmodel
Controllerdesign
RealtimeControllerhardware
Embeddedcode-gensoftware
$4595$1895
$995$2995
$10480
Mechatronics research and design
Plant test rigSoftwarecontroller
Mechatronics are at the heart of the most innovative technologies• Computers intelligently control the
movement of complex machines
Advanced controllers are required for demanding mechatronic applications• Impossible to implement without
manual derivation and linearization• Time consuming, error-prone,
natural limitations
MapleSim for controller design• MapleSim plant model
development• MapleSim Control Systems TB
– Standard LQR– Kalman filter– Path control
• Models validated with test rig
• MapleSim advantages– Clean separation between plant
modeling and linearization for control design
– Full access to original non-linear DEs– Parameter studies: eigenvalues,
sensitivity, Monte Carlo
Realtimehardwareplatform
Demo 2: 3 DOF helicopter test rig
Plantmodel
equations
RT Plantmodelcode
Realtimesoftwareplatform
Plantmodel
Controllerdesign
RealtimeControllerhardware
Embeddedcode-gensoftware
© 2010 Maplesoft, a division of Waterloo Maple Inc.
Key points• HIL testing is a critical process in industry
– Saves money, time, design better products faster
• With MapleSim ...– Dramatically reduce time for HIL development– Fastest real-time execution time for the HIL “plant” – Infeasible systems become feasible– More efficient analysis and design
• Without MapleSim ...– Extremely long development time– Low-fidelity models approximations, guessing