Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
39 views

Mathworks Romain Lachaux Developing Bms With Simulink

Uploaded by

Devendra Holey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Mathworks Romain Lachaux Developing Bms With Simulink

Uploaded by

Devendra Holey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Developing Battery Management

System using Simulink


Romain LACHAUX

© 2015 The MathWorks, Inc.


1
Battery: a good answer to energy storage across industries…

2
… with some risks to keep under control

3
CHALLENGE: Design and verify battery management functions

4
Estimate
State-of-charge
(SoC)

Monitor Cell Current and


Voltage and Power Limits
Temperature (Derating)

BMS
Battery Management System

Isolate battery
Control the
pack from
charging profile
source and load

Balance Battery
Cell

5
SOLUTION: Perform system-level simulations with Simulink

6
BMS Development Workflow with Simulink and MBD

DESKTOP SIMULATION REAL-TIME SIMULATION HARDWARE IMPLEMENTATION

RAPID PROTOTYPING

Algorithms runing on a HARDWARE


real-time computer PROTOTYPING
SIMULINK MODEL
Battery packs, circuit,
source, load
Controller
Algorithms for cell balancing,
State-of-Charge

Plant PRODUCTION CODE


Environment, source, battery,
circuit, load Algorithms running on
HIL TESTING an embedded
microcontroller
Behavioral models
running on a real-time
computer

Code Generation
Real-time Communication
7
Agenda

❑ BMS Model Demo


▪ Physical Modeling
▪ BMS Algorithms

❑ Deployment on Hardware
▪ Code Generation
▪ Real-Time Testing

8
BMS Model Overview

▪ System Model
– Controller: BMS Algorithms
– Plant : Physical Modeling

▪ Advantages of System-Level
Simulation:
– Quick design iterations
– Early results in the
development workflow
– Possible to test each part alone
or together in the same model
(Closed-loop testing) CONTROLLER PLANT
9
Simulation Results Overview

▪ Early results during design


process ~15°C

➔ Possible to refine or add missing


requirements
CELL TEMPERATURE CELL VOLTAGE

▪ Example:
– Temperature differences
– Potential impact on cells ageing

➔ Need of a cooling system?


CONTROLLER
BATTERY PACK CURRENTPLANT SOC ESTIMATIONS

10
PLANT: Battery Physical Modeling with Simulink and Simscape

11
Battery Cell Modeling
𝑅1
𝑅0

▪ Thevenin Model (1st Order) to represent 𝐸𝑚 𝐶1


electrical behavior of battery cell
𝑇ℎ𝑒𝑣𝑒𝑛𝑖𝑛 𝑀𝑜𝑑𝑒𝑙

▪ Model based on Simscape Foundation


Library components…

▪ ... with dependance upon SoC and


temperature by modifying source code

Custom Component

12
Battery Cell Modeling

▪ What about thermal behavior?


– Cell heat up under load
– Convection heat flux between cells
– Thermal exchange with environment

➔ Thermal component from Foundation


Library

Multidomain

13
Battery Pack

1 Module of 6 cells

OR

16 Module of 6 cells

Variant Model Possible to model different architecture or


technological choice of a subsystem in the
same model
14
Tuning a Lithium Battery Model to Match Measured Data

Cell Physical Model: Lithium Cell Characteristic Measurement:


𝑅1
𝑅0 SOC SOC SOC SOC
𝐸𝑚 1 0.9 0.8

0

5°C 4.20 V 4.12 V 4.05 V … 3.09 V


𝐸𝑚
𝐶1
20°C 4.18 V 4.09 V 4.01 V … 3.05 V

40°C 4.15 V 4.02 V 3.97 V … 3.01 V


𝑇ℎ𝑒𝑣𝑒𝑛𝑖𝑛 𝑀𝑜𝑑𝑒𝑙

OBJECTIVE: Match model behavior to tests measurements

15
Estimating Parameters Using Measured Data

1. Import measurement
datas

2. Identify parameters
and set range

3. Perform estimation

16
Advantages of Physical Modeling

▪ With this physical model, you can

– Evaluate your architecture


– Optimize your design
– Refine and Validate your
requirements
→ Facilitate parameters sweep and iterations
→ Limit oversizing of components

+ Enable Closed-loop testing of your control algorithms to verify and validate it

17
CONTROLLER: BMS Algorithms with Simulink and Stateflow

18
Battery Management System Functions

▪ Battery State

▪ Fault Management

▪ Battery isolation control

▪ Derating Calculations

▪ State-of-Charge Estimation

19
Fault Management

▪ Monitoring three physical channels:


– Battery Pack Current
– Cell Voltage
– Cell Temperature

▪ Broadcasting Fault Presence to


other BMS subsystems
→ Contactor Opening (SAFETY)
→ BMS_State == FAULT

20
State-Of-Charge Estimation

▪ Two methods:

– Coulomb Counting
: Simple to implement / low computational needs
: Accuracy and robustness

– Kalman Filtering*
: High accuracy by including a nonlinear battery
model which uses current and voltage measurement
: Slightly higher computational effort

* : ready to use block available in Control System Toolbox or System Identification Toolbox

21
Agenda

❑ BMS Model Overview


▪ Physical Modeling
▪ BMS Algorithms

❑ Deployment on Hardware
▪ Code Generation
▪ Real-Time Testing

22
Generate C/C++ Code From BMS Models

▪ Generate target optimized C/C++ code


▪ Fine-tune code optimizations, package
and build generated code

23
Real-Time Testing of Battery Management System

▪ Testing BMS with Battery Cells


– Longer test cycles
– Difficult to test fault conditions
– Difficult to reproduce results
– Limited test automation

➔ Costs (Hardware prototype,


possible failure, several people to
perfom tests, etc)

Main Controller

Measurement &
Battery Pack
Diagnostics 24
Hardware-In-Loop Testing of Battery Management System

▪ Testing BMS with Emulated Battery Cells


– Reduce testing time
– Test fault conditions safely
– Automate testing

Automatic Main Controller


Code Generation

Measurement &
Battery Emulation
Diagnostics 25
BMS Development with Simulink

Reduce Design Collaborate Gain Confidence


Iteration Time Across Domains in Design
26

You might also like