Skip to content

Commit

Permalink
Merge pull request #32 from bpjmalone9180/battery-model
Browse files Browse the repository at this point in the history
Battery model
  • Loading branch information
georgelthomas authored Apr 1, 2022
2 parents 74cef11 + 6ec0d91 commit 5d8bd36
Show file tree
Hide file tree
Showing 7 changed files with 1,190 additions and 2 deletions.
290 changes: 290 additions & 0 deletions include/18650_cell.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,290 @@
/***
--------------------------------------------------------------------------------------------
| |
| NASA Glenn Research Center |
| 21000 Brookpark Rd |
| Cleveland, OH 44135 |
| |
| File Name: amprius_cell.map |
| Author(s): George Thomas and Brian Malone |
| Date(s): August 2021 |
| |
--------------------------------------------------------------------------------------------
***/

// ---------------------------------------------------------------
// | Samsung silicon nanowire Li-ion battery cell map
// ---------------------------------------------------------------
// | Declaration of a new Subelement instance called S_map
// | that is of the type BatteryCellSoCTemperatureMap
// ---------------------------------------------------------------

Subelement BatteryCellSoCTemperatureMap S_map {

// Constant parameters specific to this battery cell
energyDes_cell = 13./1000.; // kW-h (3.6 V nominal * 3.0 Ah tested at C/5 discharge)
powerDes_cell = 3.005; //kW
QDes_cell = 3; //Ah
// ----------------------------------------------------------------------
// | Declare a table (or function) named TB_Wp(real SPED, real PR)
// | To satisfy the TB_Wp socket requirement.
// ----------------------------------------------------------------------

// Voc vs Temperature and SOC data
Table TB_Voc(real T, real SOC){

T = 0.0 {
SOC = {-0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2}
Voc = { 2.92334783, 2.92334783,3.00653623,3.08972464,3.17291304,3.23989855,3.31010145,
3.3803913 ,3.44033333,3.49033333,3.52169565,3.54391304,3.58695652,
3.62095652,3.65437681,3.68604348,3.72430435,3.75531884,3.79102899,
3.82030435,3.84181159,3.86124638,3.88921739,3.91686957,3.96223188,
4.00169565,4.04117391,4.06849275,4.07573913,4.08571014,4.10571014,
4.161,4.161}
}
T = 20.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
Voc = { 2.99293893,2.99293893,3.05400763,3.11507634,3.17614504,3.23506616,3.30371247,
3.37521374,3.43605852,3.48697455,3.5200229 ,3.54251908,3.58374046,
3.6329313 ,3.67379644,3.70287532,3.73784733,3.76526463,3.79174809,
3.81922901,3.84108142,3.87212214,3.90738931,3.93615267,3.98113995,
4.02093893,4.04504071,4.07114758,4.07583969,4.08371501,4.10560814,
4.161,4.161 }
}
T = 30.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
Voc = { 2.84084639,2.84084639,2.98428484,3.1050295 ,3.19464496,3.25566531,3.309059 ,
3.37185148,3.43473652,3.49059613,3.51955239,3.541353 ,3.58558494,
3.62641607,3.6708881 ,3.70814547,3.7392177 ,3.76822075,3.79592981,
3.82260427,3.84986368,3.88146592,3.91739674,3.94798779,3.98188403,
4.02274568,4.05623296,4.06830824,4.07468871,4.08175788,4.10853306,
4.153,4.153}
}
T = 45.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
Voc = { 2.81925101,2.81925101,2.97410931,3.09861134,3.18674899,3.24142105,3.29678138,
3.35963563,3.42195951,3.47637247,3.51383806,3.54319838,3.59076923,
3.61940891,3.65574089,3.7067004 ,3.74153441,3.77023887,3.79773684,
3.82421053,3.85139271,3.88311336,3.91906478,3.94918219,3.98310931,
4.02401215,4.05611741,4.07036842,4.07774494,4.08190283,4.10867206,
4.153,4.153}
}
T = 60.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
Voc = { 2.79852227,2.79852227,2.95540486,3.07335223,3.17051822,3.228 ,3.29222672,
3.34192308,3.39768016,3.46263158,3.49862348,3.53679757,3.59007692,
3.61315789,3.65250202,3.70067206,3.74025911,3.77023887,3.79773684,
3.82335628,3.84432794,3.87774899,3.91851822,3.94918219,3.98310931,
4.02401215,4.05611741,4.06846559,4.07574494,4.08185425,4.10867206,
4.151,4.151}
}

T.interp = "linear" ;
T.extrap = "none" ;

SOC.interp = "linear" ;
SOC.extrap = "none" ;

extrapIsError = 0;
printExtrap = 0;

} // end TB_Voc

// Static output resistance vs Temperature and SOC data
Table TB_R_0(real T, real SOC){

T = 0.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_0 = { 0.2473913 ,0.2473913 ,0.20681159,0.16623188,0.12565217,0.09753623,0.08362319,
0.08 ,0.07666667,0.0715942 ,0.07 ,0.0415942 ,0.05681159,
0.067 ,0.067 ,0.067 ,0.067 ,0.067 ,0.06537681,
0.065 ,0.065 ,0.065 ,0.065 ,0.065 ,0.065 ,
0.065 ,0.065 ,0.065 ,0.065 ,0.065 ,0.065 ,
0.065 ,0.06 }
}
T = 20.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_0 = { 0.08801527,0.08801527,0.07274809,0.05748092,0.04221374,0.03231552,0.02722646,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 }
}
T = 30.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_0 = { 0.0677823 ,0.0677823 ,0.05252289,0.03726348,0.02733469,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.01311292,0.01809766,0.02 ,0.02 ,0.02430824,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.03 ,0.03 }
}

T = 45.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_0 = { 0.06546559,0.06546559,0.0502834 ,0.03510121,0.02663968,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.01218623,0.01 ,0.01 ,0.01890688,0.02451417,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.03 ,0.03 }
}

T = 60.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_0 = { 0.06546559,0.06546559,0.0502834 ,0.03510121,0.02663968,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.02072874,0.02 ,0.02 ,0.02 ,0.02451417,0.025 ,
0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,0.025 ,
0.03 ,0.03 }
}

T.interp = "linear" ;
T.extrap = "none" ;

SOC.interp = "linear" ;
SOC.extrap = "none" ;

extrapIsError = 0;
printExtrap = 0;

} // end TB_R_0

// Static output resistance vs Temperature and SOC data
Table TB_R_Th(real T, real SOC){

T = 0.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_Th = { 0.09 ,0.09 ,0.09 ,0.09 ,0.09 ,0.07130435,0.06 ,
0.06 ,0.06 ,0.06 ,0.06 ,0.06 ,0.06 ,
0.08217391,0.07492754,0.07 ,0.07 ,0.07 ,0.07 ,
0.07 ,0.05318841,0.04144928,0.0573913 ,0.06884058,0.07 ,
0.07456522,0.075 ,0.075 ,0.05586957,0.055 ,0.04021739,
0.04 ,0.04 }
}
T = 20.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_Th = { 0.08534351,0.08534351,0.07516539,0.06498728,0.05480916,0.04838931,0.04589059,
0.045 ,0.045 ,0.04195929,0.03937405,0.03642494,0.035 ,
0.035 ,0.03848601,0.05430025,0.04534351,0.03624682,0.03115776,
0.03 ,0.03 ,0.03 ,0.03839695,0.04 ,0.04 ,
0.04 ,0.03089059,0.03 ,0.03 ,0.02807125,0.02505344,
0.02 ,0.02 }
}
T = 30.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_Th = { 0.0677823 ,0.0677823 ,0.05252289,0.045 ,0.045 ,0.045 ,0.045 ,
0.04207528,0.04 ,0.03690234,0.035 ,0.0317294 ,0.02798576,
0.027 ,0.025588 ,0.025 ,0.02129705,0.02 ,0.02 ,
0.04377416,0.04190234,0.04 ,0.04 ,0.04 ,0.03121058,
0.02820753,0.028 ,0.02055341,0.02 ,0.02 ,0.02 ,
0.001 ,0.001}
}
T = 45.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_Th = { 0.06728745,0.06728745,0.04704453,0.04 ,0.04 ,0.04 ,0.04 ,
0.04 ,0.04 ,0.03267206,0.03 ,0.03 ,0.03 ,
0.03 ,0.02603239,0.025 ,0.02091093,0.02 ,0.02 ,
0.04562753,0.04133603,0.04 ,0.04 ,0.04 ,0.0308502 ,
0.02814575,0.028 ,0.02038866,0.02 ,0.02 ,0.02 ,
0.001 ,0.001 }
}
T = 60.0 {
SOC = { -0.2, 0., 0.03333333, 0.06666667, 0.1, 0.13333333, 0.16666667,
0.2, 0.23333333, 0.26666667, 0.3, 0.33333333, 0.36666667,
0.4, 0.43333333, 0.46666667, 0.5, 0.53333333, 0.56666667,
0.6, 0.63333333, 0.66666667, 0.7, 0.73333333, 0.76666667,
0.8, 0.83333333, 0.86666667, 0.9, 0.93333333, 0.96666667,
1., 1.2 }
R_Th = { 0.06728745,0.06728745,0.04704453,0.04 ,0.04 ,0.04 ,0.04 ,
0.04 ,0.04 ,0.03267206,0.03 ,0.03 ,0.03 ,
0.03 ,0.02603239,0.025 ,0.02091093,0.02 ,0.02 ,
0.02 ,0.02433198,0.03378543,0.035 ,0.035 ,0.0304251 ,
0.02536437,0.025 ,0.02024291,0.02 ,0.02 ,0.02 ,
0.001 ,0.001 }
}

T.interp = "linear" ;
T.extrap = "none" ;

SOC.interp = "linear" ;
SOC.extrap = "none" ;

extrapIsError = 0;
printExtrap = 0;

} // end TB_R_Th

} // end S_map (subelement)
Loading

0 comments on commit 5d8bd36

Please sign in to comment.