![Page 1: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/1.jpg)
1© 2015 The MathWorks, Inc.
How Simscape™ Supports
Innovation for Cyber-Physical
Systems
Rick Hyde
![Page 2: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/2.jpg)
2
How can we use system-level modelling to
support innovative product design?
![Page 3: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/3.jpg)
3
Innovation in electric and hybrid vehicles Electrical
Mechanical
Fluid
![Page 4: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/4.jpg)
4
Innovation in robotics
![Page 5: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/5.jpg)
5
Example: Quadruped running robotBiologically-inspired design (Biomimetics)
▪ Animal terrestrial motion
– Muscles are inefficient (30%)
– Muscles are also the energy store
– Running gait uses kinetic energy recovery
– The leg is well modelled by a linear spring
▪ Innovation: Use equivalent inverted pendulum
model as basis for robot
x
y
p
u
v
![Page 6: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/6.jpg)
6
Running robot design exampleDesign step #1 – gait selection
x
y
p
u
v
▪ Fixed parameters
– Leg length
– Running speed
– Mass
▪ Design parameters
– Leg (spring) stiffness
– Stance height
▪ Simple point-mass model
– MATLAB script for trade-off
![Page 7: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/7.jpg)
7
Running robot design exampleDesign step #2 – actuator requirements
from inverse dynamics
![Page 8: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/8.jpg)
8
Running robot design exampleDesign step #3 – actuator selection
Provide
actuation force
Hydraulic Chemical
Rotary
electric
motor
Linear
Electric
motor
Pneumatic
Hydraulic
motor
Hydraulic
actuatorLinear Rotary
Pneumatic
cylinder
Air muscle
Artificial
muscleIC engine
Limited travel
rotary
Pneumatic
motor
Brushed Brushless
DC motor
Shunt
motor
Series wound
motor
Induction
motor
Servo motor
(PM rotor)
Variable
reluctance
![Page 9: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/9.jpg)
9
Running robot design exampleDesign step #3 – actuator selection
![Page 10: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/10.jpg)
10
Running robot design exampleDesign step #4 – actuation validation
![Page 11: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/11.jpg)
11
Running robot design exampleDesign step #5 – evaluation
Motor efficiency at rated load = 95%
Motor efficiency for trotting gait = 84%
http://www.mathworks.com/matlabcentral/fileexchange/64237-running-robot-model-in-simscape
![Page 12: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/12.jpg)
12
Running robot design exampleDesign step automation using MATLAB scripting
▪ Automation permits greater understanding of design trade-offs
– e.g. see effect of gearbox ratio on efficiency
Gear ratio 80 100 120
Efficiency 84% 81% 78%
![Page 13: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/13.jpg)
13
Running robot design exampleKey points
1. Multiple models
2. Each model matched to a design task
3. Design data passed between models
4. Automation to support analysis &
optimisation
5. Code generation for HIL testing
Enables product design innovation in a
way that starting with the CAD tool could
never do
![Page 14: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/14.jpg)
14
Building the right model for the task at hand can be challenging
Identification of
required
modelling detail
Requirements
not understood
by project
management
![Page 15: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/15.jpg)
15
Identify required modelling detail for PMSM drives
1. System-level simulation
– Torque-speed behaviour
– Model motor losses as part of overall
efficiency calculation
– Thermal & fault modelling
2. Component validation
– Ensure motor stays within manufacturer
operating limits
– Detailed analysis of impact on other
components e.g. power harmonics
3. Component design
– Motor and/or drive circuitry
– Determine overall actuation losses
– Understand/predict fault behaviour
Modelin
g d
eta
il
Mechanical/
control
engineer
Motor
designer and
electronics
engineer
![Page 16: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/16.jpg)
16
Building the right model for the task at hand can be challenging
Identification of
required
modelling detail
Limited time
and nothing to
build on –
starting from
scratch
Requirements
not understood
by project
management
Lacking
domain
knowledge
![Page 17: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/17.jpg)
17
Simscape library components provide a useful starting point
and encapsulate some domain knowledge
Modeling detail
![Page 18: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/18.jpg)
18
Building the right model for the task at hand can be challenging
Identification of
required
modelling detail
Limited time
and nothing to
build on –
starting from
scratch
Requirements
not understood
by project
management
No dataLacking
domain
knowledge
![Page 19: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/19.jpg)
19
Modelling a PMSM with limited supplier data
Tune to measurement data
See PMSM parameter identification example in Track 2 at 16:15pm
![Page 20: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/20.jpg)
24
Using abstraction to deal with limited data
R2017a/R2017b:
elec_auto_ev.slx
R2016b/R2016a/R2015b:
elec_electric_vehicle.slx
![Page 21: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/21.jpg)
25
Multidomain example with fluids
![Page 22: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/22.jpg)
26
![Page 23: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/23.jpg)
27
![Page 24: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/24.jpg)
28
![Page 25: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/25.jpg)
29
![Page 26: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/26.jpg)
30
![Page 27: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/27.jpg)
31
![Page 28: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/28.jpg)
32
![Page 29: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/29.jpg)
33
Building the right model for the task at hand can be challenging
Identification of
required
modelling detail
Limited time
and nothing
to build on –
starting from
scratch
Requirements
not understood
by project
management
No data Lacking
domain
knowledge
![Page 30: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/30.jpg)
34
Building the right model for the task at hand can be challenging
Identification of
required
modelling detail
Limited time
and nothing
to build on –
starting from
scratch
Requirements
not understood
by project
management
No data
Lacking
domain
knowledge
![Page 31: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/31.jpg)
35
Simscape libraries enable you to build representative models fast
![Page 32: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/32.jpg)
36
Creating custom Simscape componentsExample: McKibben air muscle
Steps:
1. Write out defining
equations
2. Find starting point in
Simscape foundation
library
3. Incrementally add
functionality, testing as
you go
McKibben air muscle
Increase pressure
![Page 33: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/33.jpg)
37
Creating custom Simscape componentsStep 1: Write out equations
𝐿𝑢 = Un-stretched length
𝐿𝑠 = Additional stretch due to force, F
Assumptions:
▪ Volume is approximately constant
▪ Stretch force is proportional to Ls
Equations:
▪ 𝐿 = 𝐿𝑢 𝑝 + 𝐿𝑠▪ 𝐹 = 𝑘 × 𝐿𝑠▪ 𝑝𝑉 = 𝑛𝑅𝑇
p2
Lu(p2)
p1
F
Lu(p1) Ls
![Page 34: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/34.jpg)
38
Creating custom Simscape componentsStep 2: Find starting point from foundation library
▪ Has equation of state
▪ Need to add mechanical
ports & equations
![Page 35: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/35.jpg)
39
Creating custom Simscape componentsStep 3: Incrementally add functionality
Add:
▪ Two mechanical ports
▪ Two additional new equations
𝐿 = 𝐿𝑢 𝑝 + 𝐿𝑠𝐹 = 𝑘 × 𝐿𝑠
![Page 36: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/36.jpg)
40
Creating custom Simscape componentsStep 3: Incrementally add functionality
Add definitions for:
▪ Variables
▪ Parameters
![Page 37: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/37.jpg)
41
Creating custom Simscape componentsStep 4: Build library and run test model
![Page 38: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/38.jpg)
42
Why use Simscape?
![Page 39: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/39.jpg)
43
Why use Simscape?
▪ Plant and control
![Page 40: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/40.jpg)
44
Why use Simscape?
▪ Plant and control
▪ Multidomain
– Electrical
– Mechanical
– Thermal
– Fluid
![Page 41: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/41.jpg)
45
Why use Simscape?
▪ Plant and control
▪ Multidomain
▪ Code generation and V&V tools
– Test controller on HIL plant
– Deploy to simulator
– Use plant model in real-time controller
![Page 42: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/42.jpg)
46
Why use Simscape?
▪ Plant and control
▪ Multidomain
▪ Code generation and V&V tools
▪ Libraries, examples, documentation & webinars
![Page 43: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/43.jpg)
47
Why use Simscape?
▪ Plant and control
▪ Multidomain
▪ Code generation and V&V tools
▪ Libraries, examples, documentation & webinars
▪ Simscape language – build custom components
p
F
![Page 44: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/44.jpg)
48
Why use Simscape?
▪ Plant and control
▪ Multidomain
▪ Code generation and V&V tools
▪ Libraries, examples, documentation & webinars
▪ Simscape language – build custom components
▪ Workflow
– Tight integration with MathWorks control and optimization tools
– MATLAB for scripting and automation
– Fault-capable components (R, L, C, Servomotor, …)
![Page 45: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/45.jpg)
49
Why use Simscape?
▪ Plant and control
▪ Multidomain
▪ Code generation and V&V tools
▪ Libraries, examples, documentation & webinars
▪ Simscape language – build custom components
▪ Workflow
– Tight integration with MathWorks control and optimization tools
– MATLAB for scripting and automation
– Fault-capable components (R, L, C, Servomotor, …)
▪ Support, training, consulting
▪ MATLAB Central
![Page 46: Innovation for Cyber-Physical Systems · Example: McKibben air muscle Steps: 1. Write out defining equations 2. Find starting point in Simscape foundation library 3. Incrementally](https://reader033.vdocuments.us/reader033/viewer/2022060515/5f8b3f333c92d717a06174f0/html5/thumbnails/46.jpg)
50
How to find out more
▪ MathWorks physical modelling page:
– https://www.mathworks.com/solutions/physical-modeling.html
▪ Steve Miller’s introduction video
– https://www.mathworks.com/videos/physical-modeling-introduction-75883.html
▪ MATLAB Central File Exchange
– https://www.mathworks.com/matlabcentral/fileexchange/
▪ Contact us direct