Modeling Multi-domain Systems Using Simscape

advertisement
Modeling Multi-domain Systems Using
Simscape – A Battery Modeling
Example
By
Prasanna Deshpande
Application Engineering
Control Design and Automation
© 2013 The MathWorks, Inc.1
Challenges of Developing Battery Models
2
Challenges of Developing Battery Models

Hard to model exact electrochemical behaviour.

Multidomain, nonlinear effects are challenging to model.

Model must simulate quickly to enable extensive testing
(drive cycles, temperatures, etc.)

Model must provide results that compare well to test
data
3
The Goal
-30
4
Discharge current (A)
3.8
V (Volts)
I (Amp)
-30.5
-31
-31.5
3.6
3.4
0
1000
2000
t (sec)
3.2
3000
1
40
0.8
35
T (ºC)
SoC (-)
-32
0.6
0.4
0
1000
2000
t (sec)
3000
Battery Temperature (ºC)
30
DT = +16ºC
25
0.2
0
Output Voltage (V)
State of Charge
0
1000
2000
t (sec)
3000
20
0
1000
2000
t (sec)
3000
4
Today’s Example: Battery
5
Modeling Multi-domain Systems
6
Traditional Design Process
REQUIREMENTS
Designs are hard to validate
against system requirements
Not possible to optimize
system performance or detect
integration issues in “Design”
DESIGN
Control
Mechanical
Electrical
Errors are found late
in the development process
using expensive prototypes
IMPLEMENTATION
Embedded
Software
Manual coding is slow,
introduces defects, and is
difficult to compare to design
INTEGRATION AND TEST
7
Model-Based Design Process
REQUIREMENTS
TEST & VERIFICATION
Produce better designs by
Designs are hard to validate
continuously comparing design
against system requirements
and specification
SYSTEM LEVEL
DESIGN
SIMULATION
Control
Mechanical
Not possible
optimize
Optimize
systemtoperformance
system
performance
detect
by developing
in a or
single
integration
issues
in “Design
simulation
environment
Electrical
Errors are found late
Create physical prototypes only
in the development process
after thorough real time testing
using expensive prototypes
IMPLEMENTATION
IMPLEMENTATION
Embedded
Software
HIL System
Manual coding is slow,
Save time by automatically
introduces defects, and is
generating embedded code
difficult to compare to design
INTEGRATION
INTEGRATION
ANDAND
TESTTEST
8
Model-Based Design Process
REQUIREMENTS
TEST & VERIFICATION
Produce better designs by
continuously comparing design
and specification
SYSTEM LEVEL
DESIGN
SIMULATION
Control
Mechanical
Optimize system performance
by developing in a single
simulation environment
Electrical
Create physical prototypes only
after thorough real time testing
IMPLEMENTATION
Embedded
Software
Save time by automatically
generating embedded code
HIL System
INTEGRATION
INTEGRATION
ANDAND
TESTTEST
9
Model-Based Design Process
SYSTEM LEVEL
DESIGN
SIMULATION
Control
Mechanical
Electrical
Key Message
System Level Simulation Helps in Addressing
Challenges Involved in System Design &
Optimization.
10
Agenda

Different Approaches for Modeling Dynamic Systems

Creating Custom Components Using Simscape
Language

Modeling Multi-domain systems Using Simscape

Enhancing Models with Simscape Add-on Libraries

Automatically Estimating Model Parameters Based on
Test Data
11
Agenda

Different Approaches for Modeling Dynamic
Systems

Creating Custom Components Using Simscape
Language

Modeling Multi-domain systems Using Simscape

Enhancing Models with Simscape Add-on Libraries

Automatically Estimating Model Parameters Based on
Test Data
12
Modeling Physical Systems
With MathWorks Products
Modeling Approaches
First Principles Modeling
Programming
Data-Driven Modeling
Physical Networks
Statistical Methods
(Simscape and other
Physical Modeling
products)
(Model Based
Calibration Toolbox)
(MATLAB, C)
Block Diagram
(Simulink)
Modeling Language
(Symbolic Math
Toolbox)
(System Identification
Toolbox)
Neural Networks
(Simscape language)
Symbolic Methods
System
Identification
Parameter Tuning
(Neural Network
Toolbox)
(Simulink Design Optimization)
13
Modeling RC Circuit in Simulink Requires the
Equation
14
Modeling RC Circuit in Simscape Requires
Knowledge of Physical Topology
15
What if the resistance value changes with
temperature?
16
Agenda

Different Approaches for Modeling Dynamic Systems

Creating Custom Components Using Simscape
Language

Modeling Multi-domain systems Using Simscape

Enhancing Models with Simscape Add-on Libraries

Automatically Estimating Model Parameters Based on
Test Data
17
Model Custom Physical Components
in Simscape
Model:
MATLAB based
Temperature
250K – 350K
Object-oriented
Define implicit equations
(DAEs and ODEs)
Problem: Add custom equation
to model thermal effect on resistor
Solution: Use the Simscape
language to model the component.
18
Modeling Physical Systems in the Simulink
Environment
Modeling Approaches
First Principles Modeling
Code
Physical Networks
(MATLAB)
(Simscape and other
Physical Modeling
products)
Data-Driven Modeling
Neural Networks
(Neural Network
Toolbox)
Block Diagram
(Simulink)
(Model Based
Calibration Toolbox)
(Simscape language)
(Symbolic Math
Toolbox)
(System Identification
Toolbox)
Statistical Methods
Modeling Language
Symbolic Methods
System
Identification
Parameter Optimization
(Simulink Design Optimization)
19
Simscape Enables Bidirectional Flow of Power
Between Components
+
_
R1 i
C1
+
v1
_
R1 i1
C1
i2
R2
C2 v 2
i3
Simulink: Input/Output
Simscape: Physical Networks
20
Agenda

Different Approaches for Modeling Dynamic Systems

Creating Custom Components Using Simscape
Language

Modeling Multi-domain systems Using Simscape

Enhancing Models with Simscape Add-on Libraries

Automatically Estimating Model Parameters Based on
Test Data
21
Modeling Battery Using Equivalent Circuit:
Simscape
Model:
+
+
-
Using Simscape Foundation Library Components:
22
Customization Is Required For Modeling the
Dependency of Components

Use Physical Modeling
methods to build electrical
and thermal network
+
+
-
Battery cell equivalent discharge circuit
Resistors, capacitor, and voltage source
are dependent upon SOC, DOC,
and temperature
23
Agenda

Different Approaches for Modeling Dynamic Systems

Creating Custom Components Using Simscape
Language

Modeling Multi-domain systems Using Simscape

Enhancing Models with Simscape Add-on Libraries

Automatically Estimating Model Parameters Based on
Test Data
24
Battery Models
Generic, Pre-Defined

Generic
– Charge dependent voltage source
– Parameters found on data sheets

Pre-Defined
– Several pre-defined models
– Full parameterization
– Documentation provides
extensive detail
25
Mechanical Hydraulic
Electrical
SimElectronics
SimDriveline
SimHydraulics
Simscape
SimMechanics
SimPowerSystems
Physical Systems in Simulink
Simscape
Multibody mechanics (3-D)
N
S
Custom Domains via
Simscape Language
SimHydraulics
Pneumatic Magnetic
Multidomain physical systems
Fluid power and control
Mechanical systems (1-D)
SimElectronics
SimMechanics
Electrical power systems
Thermal
SimDriveline
SimPowerSystems
MATLAB, Simulink
Electromechanical and
electronic systems 26
Modeling Physical Systems in the Simulink
Environment
Modeling Approaches
First Principles Modeling
Code
Physical Networks
(MATLAB)
(Simscape and other
Physical Modeling
products)
Data-Driven Modeling
Neural Networks
(Neural Network
Toolbox)
Block Diagram
(Simulink)
(Model Based
Calibration Toolbox)
(Simscape language)
(Symbolic Math
Toolbox)
(System Identification
Toolbox)
Statistical Methods
Modeling Language
Symbolic Methods
System
Identification
Parameter Optimization
(Simulink Design Optimization)
27
Agenda

Different Approaches for Modeling Dynamic Systems

Creating Custom Components Using Simscape
Language

Modeling Multi-domain systems Using Simscape

Enhancing Models with Simscape Add-on Libraries

Automatically Estimating Model Parameters Based
on Test Data
28
Estimating Parameters Using
Measured Data
Model:
A22
Ao
Emo
Qe_init
Ambient
Temperature
= Constant
= Constant
= Open Cir. Voltage
= Initial Extr. Chg.
Discharge
Cycle
Battery
Cell
Voltage
Problem: Simulation data does not
match measured data because the
parameters are incorrect
Solution: Use Simulink Design
Optimization to automatically tune
model parameters
A22
Ao
Emo Qe_init
-9.99
-4 0.402
-1 2.20
2
3.84e4
1.0e4
29
Estimating Parameters Using
Measured Data

Steps to Estimate Parameters
1. Import measurement data and
select estimation data
2. Identify parameters
and their ranges
A22
Ao
-4
-1
Emo Qe_init
2
1.0e4
3. Perform parameter estimation
4. Validate estimation
30
Summary
SYSTEM LEVEL SIMULATION
Control
Mechanical
Electrical
System Level Simulation helps in addressing
challenges involved in system design and optimization.
Simscape helps you in building multi-domain system
models.
It enables you to simulate plant and controller in single
environment.
31
MathWorks Certification Program- for the first
time in India!
MathWorks Certified MATLAB Associate Exam
Why certification?




Validates proficiency with MATLAB
Can help accelerate professional growth
Can help increase productivity and project success and thereby
prove to be a strategic investment
Certification exam administered in English at MathWorks facilities
in Bangalore on Nov 27,2013
Email: training@mathworks.in
URL: http://www.mathworks.in/services/training
Phone: 080-6632-600032
Scheduled Public Training for Sep–Dec 2013
Course Name
Location
Training dates
Statistical Methods in MATLAB
Bangalore
02- 03 Sep 2013
MATLAB based Optimization Techniques
Physical Modeling of Multi-Domain Systems using
Simscape
Bangalore
04 Sep 2013
MATLAB Fundamentals
Simulink for System and Algorithm Modeling
Bangalore
Delhi
23-25 Sep 2013
Pune
Bangalore
07-09 Oct 2013
21-23 Oct 2013
Web based
Chennai
Delhi
05- 07 Nov 2013
Pune
Bangalore
10-11 Oct 2013
Web based
Chennai
MATLAB for Data Processing and Visualization
MATLAB for Building Graphical User Interface
Generating HDL Code from Simulink
Email: training@mathworks.in
05 Sep 2013
Bangalore
Bangalore
Bangalore
URL: http://www.mathworks.in/services/training
09-11 Dec 2013
26-27 Sep 2013
24-25 Oct 2013
12-13 Nov 2013
12-13 Dec 2013
20 Nov 2013
21 Nov 2013
28-29 Nov 2013
Phone: 080-6632-600033
Thank You For Attending The Session
Q&A
34
Download