Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Modeling and Simulation of

Physical Systems with Simscape


Paul Lambrechts
Tadele Shiferaw Tadele

© 2015 The MathWorks, Inc.


1
Modeling and Simulation of Physical Systems with Simscape

▪ What’s physical modeling and why should I care?

▪ Working with a multi-domain physical model in Simscape

– An electrically driven triplex plunger pump for a predictive maintenance study

▪ Extending the model to explore a new design element

– Adding a battery model to the design

▪ Key take-aways of the session

2
Physical Modeling with Simscape is easy and accurate!

Use CAD import to


obtain visualization
and parameters

Extend and explore


to create a multi-
domain “digital twin”

Battery Ah

Add new components


to investigate
innovative design
3
The Big Question?

Why

▪ Why Physical Modeling?


▪ Why in Simulink/Simscape?

4
The CAT Triplex Plunger Pump
Predictive
No Maintenance?

5
Pressure transducer is available

I need help. One of my cylinders


is leaking. I will shut down in 15
hours

6
Triplex Pump
Failure Algorithm
Diagnosis
Pressure
▪ Crankshaft drives three plungers Sensor
Component
– Each 120 degrees out of phase
Failure
– One chamber always discharging
– Smoother flow than single
or duplex piston pumps Outlet

Crankshaft

Inlet

7
8
Introduction to Simscape Multibody

▪ Enables multibody simulation


of 3D mechanical systems

▪ Construct model using


bodies, joints, and forces
– Model matches structure of system
– No need to derive and program equations

▪ Primary uses
– System-level analysis
– Control development in Simulink
– Predictive Maintenance study

9
Modeling Dynamic Systems:
two approaches

First-Principles Modeling

Use an understanding of the


system’s physics to derive a
mathematical representation

- L2 sin(a ) + nw2 (- sin(a - g )) sin(g ) - ne( - sin(a - g )) cos(a - g )a& 2 - n cos(a - g )g& 2
a& =  dg
1 - ne sin (a - g )
2

10
Modeling Dynamic Systems:
two approaches

First-Principles Modeling Data-Driven Modeling

Use an understanding of the Use system test data to derive a


system’s physics to derive a mathematical representation
mathematical representation

 s +1 
 s 3 + 3s 2 + 2 
H (s) =  
 s +3 
2

 2 
 s + s +1 

11
Both have Advantages & Disadvantages

First-Principles Modeling Data-Driven Modeling

Advantages: Advantages:
▪ Insight in behavior ▪ Fast
▪ Physical parameters ▪ Accurate

Disadvantages: Disadvantages:
▪ Friction and turbulence? ▪ Requires plant
▪ Time consuming ▪ Requires data acquisition system
▪ Requires expertise

12
Tools that span both modeling approaches
Enhance Advantages, Reduce Disadvantages

Complete Modeling Environment

First-Principles Data-Driven
Simulink Simulink System
Design Identification
Simscape Optimization
Machine
Learning

Partial Differential Equation (FEM) Test &


Measurement
Symbolic Math Tools
13
Tools that span both modeling approaches
Enhance Advantages, Reduce Disadvantages

Complete Modeling Environment

First-Principles Data-Driven
Simulink

14
First-Principles Modeling in Simulink
▪Traditional process
Actuators
∫∫
Sensors
Physical
System
Set up differential
Plant and algebraic equations

▪ Using Simscape
Actuators

Sensors

Physical
System
Build model by
Plant combining components
15
Goal of Simscape

▪ As easy to use as Simulink;


but easier to use for creating
a model of a physical system

Simscape
Simulink
MATLAB 16
Simscape:
modeling in multiple domains

▪ Use Fundamental
Analogy between
Physical Domains

Domain Across Variable Through Variable


Velocity Force
Mechanical
Angular Velocity Torque
Hydraulic Pressure Flow Rate
Electrical Voltage Current
Magnetic MMF Flux
Thermal Temperature Heat Flow
Pressure Mass Flow Rate
Thermal Fluids
Temperature Energy Flow

17
How things are measured

18
Tools that span both modeling approaches
Enhance Advantages, Reduce Disadvantages

Complete Modeling Environment

First-Principles Data-Driven
Simulink

Language

19
Simscape Language
▪ MATLAB-based
▪ Create new domains
▪ Custom components
▪ User defined libraries
▪ Object oriented

dvc vc
i = (C0 + Cv v) +
dt Rd
v = vc + iR
20
Simscape Language: setup
▪ Syntax closely follows MATLAB language

▪ Use MATLAB functions and expressions


– Analyze parameters
– Perform preliminary computations
– Initialize system variables

21
Simscape Language: nodes

▪ Define the physical network ports


▪ Reuse existing physical domains
to extend an existing library
▪ Define new physical domains
to create a new library

22
Simscape Language: parameters

▪ Parameters, default
values, units, and dialog
box text all defined in the
Simscape file (extension
.ssc)

23
Simscape Language: equation

▪ Equations defined
implicitly means no pre-
defined inputs and dv c v
i = ( C0 + C v v ) +
outputs dt Rd
v = v c + iR

24
Modeling and Simulation of Physical Systems with Simscape

▪ What’s physical modeling and why should I care?

▪ Working with a multi-domain physical model in Simscape

– An electrically driven triplex plunger pump for a predictive maintenance study

▪ Extending the model to explore a new design element

– Adding a battery model to the design Battery Ah

▪ Key take-aways of the session

25
26
Battery Management System

▪ BMS is necessary
– Safety
– Performance
– Durability

27
Battery Management System

▪ BMS includes
– Monitoring :
▪ State of Charge (SoC)
▪ State of Health (SoH)
– Control:
▪ Charging
▪ Temperature
▪ Current

28
Competent Battery Model

control

▪ Battery Modeling
– Equivalent Circuit Model
– Parameter Estimation

29
Battery Management System

▪ Charging Control:
– CCCV Charging method
– Cell Balancing Ensure all cells have equivalent SoC during charging.

30
Physical Modeling with Simscape is easy and accurate!

Use CAD import to


obtain visualization
and parameters

Extend and explore


to create a multi-
domain “digital twin”
Battery Ah

Add new components


to investigate
innovative design
31
Physical Modeling Training

▪ Simscape
▪ Multibody
▪ Fluids
Public ▪ Electrical Power
▪ Driveline

On-Site

Exhibition
MathWorks Training Booth

32
Thank you for attending…

▪ More support

▪ Visit www.mathworks.com

▪ Info: paul.lambrechts@mathworks.com
tadele.tadele@mathworks.com

▪ Triplex Pump Case Study available on

https://www.mathworks.com/matlabcentral/fileexchange/65605-predictive-maintenance-in-hydraulic-pump

33

You might also like