developing battery management system using …...28 perform hil testing for bms ecus (3/3) io991:...

27
1 © 2015 The MathWorks, Inc. Developing Battery Management System using Simulink Prasanna Deshpande

Upload: others

Post on 13-Apr-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

1© 2015 The MathWorks, Inc.

Developing Battery Management

System using Simulink

Prasanna Deshpande

Page 2: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

2

Smarter systems require efficient battery

Page 3: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

3

Challenges in Battery Modeling and Management

Battery Pack

- Modeling electro-chemical

cell and its thermal

dependency

- Scaling up the cell model to a

battery pack model

- Modeling electro-chemical cell and

its thermal dependency

- Scaling up the cell model to a

battery pack model

Page 4: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

4

Challenges in Battery Modeling and Management

Battery Pack

- Modeling electro-chemical cell and

its thermal dependency

- Scaling up the cell model to a

battery pack model

Electronics

- Block / module voltage &

temperature measurement

- Cell balancing, Contactor &

pre-charge circuits

- Block voltage & temperature

measurement

- Cell balancing, Contactor & pre-

charge circuits

Page 5: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

5

Challenges in Battery Modeling and Management

Battery Pack

- Modeling electro-chemical cell and

its thermal dependency

- Scaling up the cell model to a

battery pack model

Electronics

- How to design and verify

different Battery Management

functions?

- Block voltage & temperature

measurement

- Cell balancing, Contactor & pre-

charge circuits

SoC Estimation

Contactor

Management

Fault Handling

Thermal

Management

Current & Power

Limits

Page 6: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

6

Challenges in Battery Modeling and Management

Battery Pack

- Modeling electro-chemical cell and

its thermal dependency

- Scaling up the cell model to a

battery pack model

Electronics

- Block voltage & temperature

measurement

- Cell balancing, Contactor & pre-

charge circuits

Software

How to design and verify different

Battery Management functions?

Page 7: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

8

Solution: System level simulation model for Battery

Page 8: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

9

Agenda

▪ Capturing Dynamics of Battery Cell → Large Battery Pack

▪ Modeling the electronics: Contactors, Inverters, Loads

▪ Developing Battery Management Algorithms

▪ Generating C/C++ Code from BMS Algorithms

▪ Perform HIL Testing for BMS ECUs

Page 9: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

10

Agenda

▪ Capturing Dynamics of Battery Cell → Large Battery Pack

▪ Modeling the electronics: Contactors, Inverters, Loads

▪ Developing Battery Management Algorithms

▪ Generating C/C++ Code from BMS Algorithms

▪ Perform HIL Testing for BMS ECUs

Page 10: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

11

Battery cell modeling as RC equivalent circuit

▪ 1RC Equivalent circuit

representation of Battery cell

▪ Resistors, capacitor, and voltage

source are dependent upon SOC

and temperature

Battery cell equivalent discharge circuit

+-

+-

Page 11: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

12

Circuit Elements – Lookup Tables

▪ Lookup tables can be used for each circuit element

– Values will characterize the battery performance

EmSOC

1

SOC

0.9

SOC

0.8…

SOC

0

5°C 4.20 V 4.10 V 4.05 V … 3.50 V

20°C 4.18 V 4.07 V 4.02 V … 3.49 V

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

R1

C1

R0

Em

Page 12: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

13

Multi-domain modeling of battery pack using Simscape

Page 13: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

14

Battery data is collected by conducting a series of tests with

the battery

▪ Used to determine battery

capacity

– Multiple Temperatures

– Multiple Currents

0 5 10 15 2010.5

11

11.5

12

12.5

13

Time (h)

Vo

lta

ge

Discharge at 25 °C

C/20

C/10

C/5

C/3

C/2

1C

▪ Used to determine battery dynamics

– Range of SOC

– Multiple Temperatures

– Multiple Currents

– Discharge and Charge Curves

0 2 4 6 8 103.2

3.4

3.6

3.8

4

4.2

Vo

ltag

e

Time (hours)

Measured Data - Pulse Discharge

0 2 4 6 8 10 12-30

-20

-10

0

Cu

rren

t (A

mp

s)

Time (hours)

Page 14: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

17

Discovery Page on MathWorks website: Battery modeling

https://in.mathworks.com/discovery/battery-models.html?s_tid=srchtitle

Page 15: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

18

Shipping examples in Simscape

Page 16: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

19

Agenda

▪ Capturing Dynamics of Battery Cell → Large Battery Pack

▪ Modeling the electronics: Contactors, Inverters, Loads

▪ Developing Battery Management Algorithms

▪ Generating C/C++ Code from BMS Algorithms

▪ Perform HIL Testing for BMS ECUs

Page 17: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

20

Role of electronics: Cell voltage measurement and pre-charge

Page 18: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

21

Agenda

▪ Capturing Dynamics of Battery Cell → Large Battery Pack

▪ Modeling the electronics: Contactors, Inverters, Loads

▪ Developing Battery Management Algorithms

▪ Generating C/C++ Code from BMS Algorithms

▪ Perform HIL Testing for BMS ECUs

Page 19: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

22

Battery Management Functions

Page 20: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

23

Agenda

▪ Capturing Dynamics of Battery Cell → Large Battery Pack

▪ Modeling the electronics: Contactors, Inverters, Loads

▪ Developing Battery Management Algorithms

▪ Generating C/C++ Code from BMS Algorithms

▪ Perform HIL Testing for BMS ECUs

Page 21: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

24

Generate C/C++ Code From BMS Algorithm Models

▪ Generate target optimized

C/C++ code using Embedded

Coder

▪ Fine-tune code optimizations,

package and build generated

code

Page 22: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

25

Agenda

▪ Capturing Dynamics of Battery Cell → Large Battery Pack

▪ Modeling the electronics: Contactors, Inverters, Loads

▪ Developing Battery Management Algorithms

▪ Generating C/C++ Code from BMS Algorithms

▪ Perform HIL Testing for BMS ECUs

Page 23: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

26

Perform HIL Testing for BMS ECUs (1/3)

Testing ECUs with Battery Cells

• Longer test cycles

• Difficult to reproduce results

• Limited test automation

• Difficult to test fault conditions

Page 24: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

27

Perform HIL Testing for BMS ECUs (2/3)

Wiring and Signal

Conditioning

Automatic Code

Generation

Page 25: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

28

Perform HIL Testing for BMS ECUs (3/3)

IO991: Battery Emulation I/O Module

Key Features:

▪ 6 independent isolated channels

▪ Architecture allows series & parallel combinations

▪ Independent power and sense lines

▪ Voltage range of 0-7 V with 14-bit resolution

▪ 300 mA source to load

▪ 100 mA sink adjustable in 16 steps

Enables:

▪ Test automation and repeatable testing

▪ Fault testing safely

▪ Reuse testcases from earlier desktop testing

Page 26: Developing Battery Management System using …...28 Perform HIL Testing for BMS ECUs (3/3) IO991: Battery Emulation I/O Module Key Features: 6 independent isolated channels Architecture

29

Summary

Long Iteration Cycles Safety Critical SystemMulti-Domain

Collaborate Across

DomainsReduce Iteration Time

Functional Safety

Certification