modeling and simulation of physical systems with simscape · 2 modeling and simulation of physical...

33
1 © 2015 The MathWorks, Inc. Modeling and Simulation of Physical Systems with Simscape Paul Lambrechts Tadele Shiferaw Tadele

Upload: others

Post on 10-Aug-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

1© 2015 The MathWorks, Inc.

Modeling and Simulation of

Physical Systems with Simscape

Paul Lambrechts

Tadele Shiferaw Tadele

Page 2: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

2

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

Page 3: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

3

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

Page 4: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

4

▪ Why Physical Modeling?

▪ Why in Simulink/Simscape?

The Big Question?

Why

Page 5: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

5

The CAT Triplex Plunger Pump

Maintenance?NoPredictive

Page 6: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

6

Pressure transducer is available

I need help. One of my cylinders

is leaking. I will shut down in 15

hours

Page 7: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

7

Component

Failure

Triplex Pump

▪ Crankshaft drives three plungers

– Each 120 degrees out of phase

– One chamber always discharging

– Smoother flow than single

or duplex piston pumps

Crankshaft

Inlet

Outlet

Algorithm

Pressure

Sensor

Failure

Diagnosis

Page 8: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

8

Page 9: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

9

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

Page 10: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

10

Modeling Dynamic Systems:

two approaches

First-Principles Modeling

Use an understanding of the

system’s physics to derive a

mathematical representation

--

--------+-=

)(sin1

)cos()cos())sin(()sin())sin(()sin(2

22

22

ga

ggaagagaggaaa

ne

nnenwL &&& dg

Page 11: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

11

First-Principles Modeling Data-Driven Modeling

Use system test data to derive a

mathematical representation

++

+

++

+

=

1

3

23

1

)(

2

2

23

ss

s

ss

s

sH

Use an understanding of the

system’s physics to derive a

mathematical representation

Modeling Dynamic Systems:

two approaches

Page 12: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

12

Both have Advantages & Disadvantages

First-Principles Modeling Data-Driven Modeling

Advantages:▪ Insight in behavior

▪ Physical parameters

Disadvantages:▪ Friction and turbulence?

▪ Time consuming

▪ Requires expertise

Advantages:▪ Fast

▪ Accurate

Disadvantages:▪ Requires plant

▪ Requires data acquisition system

Page 13: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

13

Tools that span both modeling approachesEnhance Advantages, Reduce Disadvantages

Complete Modeling Environment

Test & Measurement

Tools

SimulinkDesign

Optimization

Simulink

First-Principles

SystemIdentification

Data-Driven

Simscape

Partial Differential Equation (FEM)

Symbolic Math

Machine Learning

Page 14: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

14

Tools that span both modeling approachesEnhance Advantages, Reduce Disadvantages

Complete Modeling Environment

Simulink

First-Principles Data-Driven

Page 15: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

15

▪Traditional process

▪ Using Simscape

Plant

Actu

ato

rs

Physical

System

Sensors

Build model by

combining components

Set up differential

and algebraic equationsPlant

Actu

ato

rsPhysical

System

Sensors

∫∫

First-Principles Modeling in Simulink

Page 16: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

16MATLAB

Simulink

Simscape

Goal of Simscape

▪ As easy to use as Simulink; but easier to use for creating a model of a physical system

Page 17: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

17

Simscape:

modeling in multiple domains

▪ Use Fundamental

Analogy between

Physical Domains

Domain Across Variable Through Variable

MechanicalVelocity

Angular Velocity

Force

Torque

Hydraulic Pressure Flow Rate

Electrical Voltage Current

Magnetic MMF Flux

Thermal Temperature Heat Flow

Thermal FluidsPressure

Temperature

Mass Flow Rate

Energy Flow

Page 18: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

18

How things are measured

Page 19: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

19

Tools that span both modeling approachesEnhance Advantages, Reduce Disadvantages

Complete Modeling Environment

Simulink

First-Principles Data-Driven

Language

Page 20: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

20

Simscape Language

▪ MATLAB-based

▪ Create new domains

▪ Custom components

▪ User defined libraries

▪ Object oriented

d

ccv

R

v

dt

dvvCCi ++= )( 0

iRvv c +=

Page 21: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

21

▪ Syntax closely follows MATLAB language

▪ Use MATLAB functions and expressions

– Analyze parameters

– Perform preliminary computations

– Initialize system variables

Simscape Language: setup

Page 22: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

22

▪ Define the physical network ports

▪ Reuse existing physical domains

to extend an existing library

▪ Define new physical domains

to create a new library

Simscape Language: nodes

Page 23: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

23

▪ Parameters, default

values, units, and dialog

box text all defined in the

Simscape file (extension

.ssc)

Simscape Language: parameters

Page 24: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

24

▪ Equations defined

implicitly means no pre-

defined inputs and

outputs

Simscape Language: equation

d

c

vR

v

dt

dvvCCi ++= )( 0

iRvv c +=

Page 25: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

25

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

Battery Ah

Page 26: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

26

Page 27: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

27

Battery Management System

▪ BMS is necessary

– Safety

– Performance

– Durability

Page 28: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

28

Battery Management System

▪ BMS includes

– Monitoring :

▪ State of Charge (SoC)

▪ State of Health (SoH)

– Control:

▪ Charging

▪ Temperature

▪ Current

Page 29: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

29

Competent Battery Model

▪ Battery Modeling

– Equivalent Circuit Model

– Parameter Estimation

control

Page 30: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

30

Battery Management System

▪ Charging Control:

– CCCV Charging method

– Cell Balancing Ensure all cells have equivalent SoC during charging.

Page 31: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

31

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

Page 32: Modeling and Simulation of Physical Systems with Simscape · 2 Modeling and Simulation of Physical Systems with Simscape What’s physical modeling and why should I care? Working

32

Physical Modeling Training

Public

On-Site

ExhibitionMathWorks Training Booth

▪ Simscape

▪ Multibody

▪ Fluids

▪ Electrical Power

▪ Driveline