why model a physical system?

31
1 © 2015 The MathWorks, Inc. Physical Modelling with Simscape™ Rick Hyde Mechanical Embedded Software Control Electrical

Upload: vokhuong

Post on 31-Dec-2016

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Why model a physical system?

1© 2015 The MathWorks, Inc.

Physical Modelling with Simscape™

Rick Hyde

MechanicalEmbedded

Software

Control Electrical

Page 2: Why model a physical system?

2

Presentation overview

Modelling physical systems

– Why model a physical system?

– Network approach & Simscape™

Example: Aileron actuation system

– Using modelling to support system-level design

Modelling brushless motors

– Matching model fidelity to the design task

What’s new in and

Page 3: Why model a physical system?

3

Why model a physical system?

Example: humanoid robot arm

– What are the actuation requirements?

Space and weight constraints

Torque/force, speed & power

Compliance

Precision

Dynamic tracking bandwidth

Failure behaviour

– Which actuation technology?

– What is the impact on the rest of the system?

Power supply requirements

Heat

Electromagnetic interference

htt

p:/

/ww

w.s

ha

do

wro

bo

t.com

/pro

ducts

/dexte

rous-h

and/

System-level

model of

complete system

System model with

selectable detailed &

behavioural sub-models

Behavioural model

of actuation system

Page 4: Why model a physical system?

4

Extending Simulink® using Simscape™

Simulink

Equation set–

– Explicit equation

Relevance

– Single body motion

– Multiple-body motion when

there is compliance

– Most algorithms (control)

Simscape extension

Equation set–

– Implicit equation

Relevance

– 1-D multi-body systems e.g.

drivelines

– Electrical networks

– Hydraulic/pneumatic networks

),,(),( uxfxxE ),,( uxfx e

s1 s2

s3

Page 5: Why model a physical system?

5

What does this model represent?

Page 6: Why model a physical system?

6

What does this model represent?

Page 7: Why model a physical system?

7

Modelling an electrical circuit in Simulink

Step 1: figure out the equations

Step 2: build the model

Step 3: fix algebraic loops

Page 8: Why model a physical system?

8

Modelling an electrical circuit in Simscape

Single step: Build the model

Network approach:

1. Node defines potential for

connected components

2. Flows sum to zero at

nodes

3. Each component has an

equation

4. Additional equations from

network topology

Page 9: Why model a physical system?

9

Physical systems in Simulink

Multibody mechanics (3-D)

Powertrain systems (1-D)

Fluid power and control

Electrical power systems

Electromechanical and

electronic systems

Simscape

MATLAB, Simulink

Sim

Mech

an

ics

Sim

Dri

velin

e

Sim

Hyd

rau

lic

sS

imE

lec

tro

nic

s

Sim

Po

werS

yste

ms

Multidomain physical systems

SimscapeMechanical Hydraulic Electrical

Thermal

Liquid

Custom Domains (Simscape Language)

Pneumatic Magnetic

N S

Mechanical

Thermal

Page 10: Why model a physical system?

10

Simscape Language

Write your own components

Define your own domains or

use foundation ones

Use foundation library

components as templates

Share your component

libraries with others

Page 11: Why model a physical system?

11

Presentation overview

Modelling physical systems

– Why model a physical system?

– Network approach & Simscape™

Example: Aileron actuation system

– Using modelling to support system-level design

Modelling brushless motors

– Matching model fidelity to the design task

What’s new in 15a and 15b

Page 12: Why model a physical system?

12

Example: Aileron Actuation System

System

Simulation goals

1. Determine requirements for actuation system

2. Compare actuation technologies

3. Run simulation on real-time hardware for HIL tests

Actuator

Force

Extension

Control

Desired

Angle

Page 13: Why model a physical system?

21

Model-Based Design Process

Save time by developing

in a single simulation

environment

Produce better designs by

continuously comparing

design and specification

Lower costs by using HIL

tests and fewer hardware

prototypes

Simulation Model

MechanicalEmbedded

Software

Requirements

and

Specifications

Control Electrical

Page 14: Why model a physical system?

22

Key Points

Testing different actuator designs

in one environment saves time

and encourages innovation

Optimising systems with respect

to design requirements leads to

optimal design choices

Simulating at different levels of

fidelity is required to see effects

of design implementation

Aileron Angle Actuator Force

Page 15: Why model a physical system?

23

Presentation overview

Modelling physical systems

– Why model a physical system?

– Network approach & Simscape™

Example: Aileron actuation system

– Using modelling to support system-level design

Modelling brushless motors

– Matching model fidelity to the design task

What’s new in 15a and 15b

Page 16: Why model a physical system?

24

Modelling use cases and modelling level (1 to 3) classification

1. System-level simulation

– Torque-speed behaviour

– Model motor losses as part of overall

efficiency & thermal calculations

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

Modelli

ng d

eta

il

Mechanical/control

engineer

Motor designer and

electronics

engineer

Page 17: Why model a physical system?

25

Level 1: System-level simulation

Designer’s objectives

– Validate power requirements

– Make predictions about system efficiency

– Thermal modelling/design

– Real-time simulator

Modelling solution

– Energy-based approach (no switching, fast,

HIL-compatible)

Resources

SimElectronics block: Servomotor (8a), tabulated losses (15b)

SimElectronics examples: elec_hybrid_electrical_network.slx &

elec_servomotor_efficiency.slx (15b)

Page 18: Why model a physical system?

26

Level 2: Component validation

User’s objectives

– Check motor and drive electronics stay

within permitted temperature limits.

– Quantify impact on DC supply (harmonics).

Modelling solution

– Model power switching with ideal switch

assumption

– Parks transform plus constant inductances

sufficient for motor Resources

SimPowerSystems blocks:

PMSM and BLDC motor models

Semiconductor switching devices

SimPowerSystems examples:

pe_pmsm_drive.slx

Page 19: Why model a physical system?

27

Level 3: Component design

User’s objectives

– Motor design or specification

– Build a dynamic simulation model to

support controller design and efficiency

predictions.

Modelling solution

– Model motor using finite-element

magnetic data

– Model drive electronics using device-level

IGBT models Resources

SimElectronics blocks:

N-Channel IGBT

FEM-Parameterized PMSM (15b)

SimElectronics examples:

elec_pmsm.slx (15b)

Page 20: Why model a physical system?

28

Presentation overview

Modelling physical systems

– Why model a physical system?

– Network approach & Simscape™

Example: Aileron actuation system

– Using modelling to support system-level design

Modelling brushless motors

– Matching model fidelity to the design task

What’s new in and

Page 21: Why model a physical system?

29

MathWorks Investment in

Physical Modelling

More than 15 years

of acausal modelling

Pace increased rapidly

with introduction of Simscape

Thermal Liquid

In SimscapeMagnetics

In Simscape

Pneumatics

In Simscape

Simscape Language

SimElectronics

SimHydraulics

3-D Vis. Improvements

AutodeskTranslator

Ideal Switching

Algorithm Introduced

Electric Drives

Library Introduced

ProEngineer

Translator

SolidWorks

Translator

SimDriveline

SimMechanics

Simscape

SimPowerSystemsIntf. Elements

Editing Mode

1998 2000 2002 2004 2006 2008 2010 2012 2014 2016

Zero

Crossing

Statistics

Simscape

Logging

Local

Solver

Simscape-Based

Libraries

Model

Statistics

Viewer

Thermal effects

optional ports

Simscape-Based

Library (2G)

Simscape-Based

Library (2G)

Variable

Viewer

Two-Phase Fluids

In Simscape

Page 22: Why model a physical system?

30

Updates to Simscape Products in

Simscape

– Variable Viewer link to block diagram

– Improved efficiency for initialization

– Sparkline plots for logged data

SimDriveline

– Thermal variants for Gears library

– Transmission templates

– Shift linkage position vrnt. Dog Clutch

SimHydraulics

– Variable-Displacement Hydraulic

Machine (External Efficiencies) block

– Valve opening dynamics

– Accumulator with improved hard stops

SimMechanics

– Show/Hide in Mechanics Explorer

– Lead Screw Joint block

– Constant Velocity Joint block

SimElectronics

– elec_getPowerLossSummary fcn

– Nonlinear magnetization inductance

– Schmitt Trigger, Current Limiter block

– Droop param. for DC-DC Converter

– Thermal port for H-Bridge block

SimPowerSystems SC, ST

Asynch. machines with SI param

Synch: Machine Model 2.1 blocks

Zigzag-Delta1-Wye, Zigzag-Delta11-

Wye, Average-Value Inverter

New powergui dialog box and tools

Interpolate option for Tustin solver

Annotation, export for Load Flow Tool

>> power_customize function

Three-limb core for 3-phase xformer

PV Array and examples

Page 23: Why model a physical system?

31

SimMechanicsNew Joints

Lead Screw Joint

Constant Velocity Joint

– Angular velocity about z-axes for B and F is same

See also >> sm_linear_actuator

CV Joint

Universal

Joint >> sm_pto_shaft

Page 24: Why model a physical system?

32

SimDrivelineTransmission Templates

Incorporate transmissions

into vehicle models

– Structure includes gearing,

inertias, and clutch schedule

– Modify them to create other

transmission types

Page 25: Why model a physical system?

33

SimDrivelineThermal Variants for Gears Library

Incorporate thermal effects

into geared systems

– Efficiency dependent on temperature

– Account for heat generated due to meshing

Right-click on block

to select thermal variant

– Thermal port exposed

– Additional parameters

– Variants for all blocks in Gears Library

Page 26: Why model a physical system?

34

Updates to Simscape Products in

Simscape

– Two-Phase Fluid Domain & Library

– Domain-specific colors on block icons

– Periodic Operators library

– Variable priority “None” for initialization

SimDriveline

– Variable Mass, Variable Inertia blocks

– Unbalanced Load block

– Variable-friction tire model

SimHydraulics

– Pneu-Hydr. actuator with 2 mech ports

SimMechanics

– Point On Curve Constraint block

– Spline block for curved paths

– Frame creation via Solid block UI

– Mechanics Explorer link to

block diagram

SimElectronics

– Limits, tolerances, faults in Resistor

– Tabulated efficiency in Servomotor

– Fault block for open-, short-circuit faults

– FEM-Parameterized PMSM block

SimPowerSystems SC, ST

Nonlin. Transformer, Nonlin. Inductor

Single-Phase Circuit Breaker with arc

Back EMF profile param. (DC Motor)

Fundamental Drive Blocks library

Power Converter blocks

Load flow for systems with unbalanced

currents, single-phase connections

External temperature input for Battery

Powergui interpolation option

Page 27: Why model a physical system?

35

SimElectronicsLimits, Tolerances, Faults in Resistor

Apply tolerances to

resistance parameter

Specify fault behavior

– Resistance after failure

– Time, behavioral fault

Specify operating limits

Page 28: Why model a physical system?

36

SimMechanicsPoint On Curve Constraint, Spline Block

Constrain frame to 2D or 3D curve

– Define curve relative to frame (Spline Block)

– Constrain frame to curve using

Point on Curve Constraint

– Measure force required

to keep frame

on curve

Try:>> sm_cam_flapping_wing

Page 29: Why model a physical system?

37

SimscapeColors on Block Icons, Rounded Connections

Block icons have

domain-specific colors

Physical connections

have rounded corners

Improves readability as a

multidomain schematic

Without Styling

Rounded Corners

Domain colors

on icon

R2015b

Page 30: Why model a physical system?

38

SimscapeTwo-Phase Domain and Library

Foundation Library for

systems with working fluid

part liquid, part vapor

Use when phase changes

are critical effect in system

– Vaporization

– Condensation

– Cavitation

Gas

Specific Enthalpy, h

Pre

ssu

re, p

Isothermal

Liquid

Liquid-Vapor

Dome

Two-Phase Fluid

Thermal

Liquid

Try:>> ssc_refrigeration

>> ssc_cavitation_two_phase_fluid

>> ssc_fluid_vaporization_in_pipe

Page 31: Why model a physical system?

39

Summary

Modelling physical systems

– Why model a physical system?

– Network approach & Simscape™

Example: Aileron actuation system

– Using modelling to support system-level

design

Modelling brushless motors

– Matching model fidelity to the design task

What’s new in 15a and 15b

Simscape

MATLAB, Simulink

Level 1:

energy-

based

Level 2:

ideal

switching

Level 3:

FEM +

nonlinear