5.0

5.0 | 1 rating Rate this file 343 Downloads (last 30 days) File Size: 944 KB File ID: #36019
image thumbnail

Lithium Battery Model, Simscape Language and Simulink Design Optimization

by Robyn Jackey

 

19 Apr 2012 (Updated 26 Jun 2013)

Multi-temperature lithium battery model using Simscape language and Simulink Design Optimization

| Watch this File

File Information
Description

This file contains multi-temperature lithium battery model examples with thermal dynamics that are implemented using the Simscape language. There are equivalent circuit model examples containing 1 RC branch and 2 RC branches, plus an 80-cell battery pack model. The number of branches can be chosen to balance fidelity and parameter estimation complexity. These models are implemented using Simulink and Simscape language.

This file also contains an example that uses Simulink Design Optimization. This demo shows how you can use the parameter estimation tool to optimize parameters to match measured battery data.

To see the parameter estimation tasks, watch this video (5 min):
http://www.mathworks.com/videos/estimating-parameters-of-a-battery-68957.html

For more information please see these publications and recorded webinars:

IEEE 2012: Lithium Battery Model with Thermal Effect
http://www.mathworks.com/tagteam/71900_IEEE%202012%20High%20Fidelity%20Lithium%20Battery%20Model%20with%20Thermal%20Effect.pdf

Webinar: Lithium Battery Model with Thermal Effects for System-Level Analysis
https://www.mathworks.com/wbnr65376

SAE 2013: Battery Model Parameter Estimation Using a Layered Technique
http://www.mathworks.com/tagteam/76117_SAE%203013%20-%20Battery%20Estimation%20Layered%20Technique.pdf

SAE 2013: Simplified Extended Kalman Filter Observer for Battery SOC Estimation
http://www.mathworks.com/tagteam/76108_SAE%202013%20-%20Simplified%20EKF%20Battery%20Model.pdf

Webinar: Optimizing Vehicle Electrical Design through System-Level Simulation
https://www.mathworks.com/wbnr70020

Complete parameter estimation of the model to match multi-temperature and multi-current data is a complex task that can also be mostly automated using Simulink Design Optimization. For coaching on this topic, please contact MathWorks Consulting Services:
http://www.mathworks.com/services/consulting/

To find other physical modeling examples, search for posts with the keyword "physical modeling"
http://www.mathworks.com/matlabcentral/fileexchange/?term=%22physical+modeling%22

To learn more about MathWorks Physical Modeling Products, go to:
http://www.mathworks.com/physical-modeling/

Acknowledgements

Automotive Electrical System Simulation And Control inspired this file.

Required Products Optimization Toolbox
Parallel Computing Toolbox
Simscape
Simulink
Simulink Design Optimization
MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Other requirements R2012a or later recommended, R2010b or later required
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
07 Jun 2013 zwbscg  
15 Apr 2013 Robyn Jackey

For R2012b and later, there are shipping demos of ssc_lithium_cell_1RC and ssc_lithium_cell_2RC models. the LiBatteryElements package is also part of the shipping Simscape demo, so it's not included in the R2012b folder of the zip file.

15 Apr 2013 Vita

Isn't there any LiBatteryElements package in the R2012b folder?

03 Dec 2012 Robyn Jackey

Hi Mengjia - Unfortunately the errors you see are expected and the model will not work in R2010a or earlier. The early versions of Simscape lookup tables required all dimensions to be a minimum of size 4, and my demo model only contains 3 temperatures. It will work fine in newer releases, otherwise it might work if you add a fourth temperature to the data for each lookup table.

03 Dec 2012 Mengjia

Hello, I've got errors as below running ssc_lithium_cell_1RC.mdl

1. ssc_lithium_cell_1RC/Solver Configuration: Unable to compile the physical network.

2. sc_lithium_cell_1RC/Lithium Cell (1RC equivalent circuit model)/Main Branch Voltage Source (Em)/PS Lookup Table (1D): The size of the vector of input values or output values must be greater than 3.

3. ssc_lithium_cell_1RC/Lithium Cell (1RC equivalent circuit model)/C1/PS Lookup Table (2D): Y-vector must have no less than 4 elements.

And for other 3 lookup tables(2D) I've got the same Y-vector elements issue, so totally 6 errors.

I've followed the 2 steps as readme.txt stated, please kindly advise where go wrong?

PS: I am using the Matlab R2010a to run the files in folder R2010b.

12 Jul 2012 Robyn Jackey

To answer your questions:

1. In the paper, we chose the initial conditions based on the driving cycle we used for validation. The temperature T=20 was based on a measured cell temperature (approximately same as electrolyte). Initial SOC was selected based on best fit of the measured vs simulated voltage at the very beginning part of the drive cycle.

2. You can modify the InputData*.xls files and import them into the Signal Builder block if you like to change the input curves. However, you will need to delete the "Copyright ..." string that was placed in cell E1 to avoid an error. Otherwise, Signal Builder tries to import data from column E, causing the error you found.

10 Jul 2012 dang hong

Dear Sir,
In reference paper " high fidelity electrical model with model with thermal dependence for characterization and simulation of high power lithium battery cells", how to choose initial SOC = 45 %,T =20, ? For example, in the case of using ssc_lithium_cell_1RC.mdl.
when importing "InputData_1RC.xls" in signal builder of ssc_lithium_cell_1RC, there is a error " attempted to access td(:,3); index out of bounds because size(td)=[46,2]. How to import that file?

05 Jun 2012 Robyn Jackey

The R2012a folder contains files that use newer features that will only work on R2012a or later. I suspect that is the reason for the build error. The R2010b model should work in that version and up, however it is a little less tidy because the lookup tables were external to the custom Simscape language blocks.

04 Jun 2012 david

run ssc_build LiBatteryElements

the following errors apeared.

Generating 'LiBatteryElements_lib.mdl' in the current directory 'C:\Documents and Settings\Jiucai\My Documents\Downloads\ssc_Li_cell_20120419\ssc_Li_cell_20120419\R2012a' ...
Failed to generate 'LiBatteryElements_lib'

Caused by:
Error using ne_buildpackage (line 32)
File: C:\Documents and Settings\Jiucai\My
Documents\Downloads\ssc_Li_cell_20120419\ssc_Li_cell_20120419\R2012a\+LiBatteryElements\C_table.ssc
Line: 13
Attribute Size is not supported for constructs of type
parameter.

Updates
19 Apr 2012

Updated copyright statement, link to webinar.

15 Jun 2012

Added link to demo video. Removed extraneous Simscape mex files. (Note: you will need to run "ssc_build LiBatteryElements" to build a machine-specific Simscape library for the battery building blocks.

02 Jul 2012

Added 80-cell battery pack model.

19 Dec 2012

R2012b folder with .SLX file format. Excluded R2012b +LiBatteryElements folder because it is a shipping demo.

ssc_lithium_cell_SDO_Project.mat parallel computing unchecked as default, due to a bug if the toolbox is not installed. See Readme.txt

11 Jun 2013

Updated the R2012b+ version of the models:
1. The shortcut block to open the custom library was broken
2. Use Kelvin temperature units within the Simscape model

There is a known bug in R2013a. Please see README.txt for info.

13 Jun 2013

Modified description only to add links to new publications.

18 Jun 2013

Fixed an issue with temperature units on R2012b demos.

26 Jun 2013

Updated a bad link to the parameter estimation video.

Contact us