BatParam.py 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. #定义电池参数
  2. class BatParam:
  3. def __init__(self,celltype):
  4. #公用参数................................................................................................................................................
  5. self.CellTempUpLmt=119
  6. self.CellTempLwLmt=-39
  7. self.CellTempHighLv1=45
  8. self.CellTempHighLv2=50
  9. self.CellTempLowLv1=-20
  10. self.CellTempLowLv2=-25
  11. self.CellTempDiffLv1=10
  12. self.CellTempDiffLv2=15
  13. self.CellTempRate=5
  14. #热失控参数
  15. self.TrwTempHigh=60
  16. self.TrwTempRate=20
  17. self.TrwTempDiff=15
  18. self.TrwCellVoltDiff=2.5
  19. self.TrwCellVoltFall=1
  20. self.TrwCellVoltLow=1.5
  21. self.TrwPackVoltFall=1.5
  22. self.SocJump=3
  23. self.SocClamp=0.1
  24. self.SocLow=3
  25. self.SocDiff=20
  26. self.SohLow=65
  27. self.SohDiff=20
  28. self.OcvWeight_Temp=[-30,-20,-10,0,10,20,30,40,50]
  29. self.OcvWeight_StandingTime=[0,500,600,1200,1800,3600,7200,10800]
  30. self.OcvWeight =[[0,0, 0, 0, 0, 0.1,0.3, 1],
  31. [0,0, 0, 0, 0, 0.1,0.3, 1],
  32. [0,0, 0, 0, 0, 0.2,0.5, 1],
  33. [0,0, 0, 0, 0.2, 0.4,0.8, 1],
  34. [0,0, 0, 0.1, 0.3, 0.6,1, 1],
  35. [0,0, 0.1,0.2, 0.5, 0.8,1, 1],
  36. [0,0, 0.1,0.3, 0.6, 1, 1, 1],
  37. [0,0, 0.1,0.3, 0.7, 1, 1, 1],
  38. [0,0, 0.2,0.3, 0.8, 1, 1, 1]]
  39. if celltype==1: #6040
  40. self.Capacity = 41
  41. self.PackFullChrgVolt=69.99
  42. self.CellFullChrgVolt=4.2
  43. self.CellFullChrgCrnt=-15
  44. self.CellVoltNums=17
  45. self.CellTempNums=3
  46. self.OtherTempNums=5
  47. self.FullChrgSoc=98
  48. self.PackCrntDec=1
  49. self.BalCurrent=0.015
  50. self.LookTab_SOC = [0, 3.5348, 8.3581, 13.181, 18.004, 22.827, 27.651, 32.474, 37.297, 42.120, 46.944, 51.767, 56.590, 61.413, 66.237, 71.060, 75.883, 80.707, 85.530, 90.353, 95.176, 100, 105]
  51. self.LookTab_OCV = [3.3159, 3.4384, 3.4774, 3.5156, 3.5478, 3.5748, 3.6058, 3.6238, 3.638, 3.6535, 3.6715, 3.6951, 3.7279, 3.7757, 3.8126, 3.8529, 3.8969, 3.9446, 3.9946, 4.0491, 4.109, 4.183, 4.263]
  52. self.CellOvLv1=4.3
  53. self.CellOvLv2=4.35
  54. self.CellUvLv1=2.8
  55. self.CellUvLv2=2.5
  56. self.CellVoltDiffLv1=0.3
  57. self.CellVoltDiffLv2=0.5
  58. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  59. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  60. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  61. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  62. self.PackChgOc=-40
  63. self.PackDisOc=200
  64. self.LeakCurrentLv1=10
  65. self.LeakCurrentLv2=20
  66. self.LeakCurrentLv3=50
  67. elif celltype==2: #4840
  68. self.Capacity = 41
  69. self.PackFullChrgVolt=69.99
  70. self.CellFullChrgVolt=4.2
  71. self.CellFullChrgCrnt=-15
  72. self.CellVoltNums=14
  73. self.CellTempNums=3
  74. self.OtherTempNums=4
  75. self.FullChrgSoc=98
  76. self.PackCrntDec=1
  77. self.BalCurrent=0.015
  78. self.LookTab_SOC = [0, 3.5348, 8.3581, 13.181, 18.004, 22.827, 27.651, 32.474, 37.297, 42.120, 46.944, 51.767, 56.590, 61.413, 66.237, 71.060, 75.883, 80.707, 85.530, 90.353, 95.176, 100, 105]
  79. self.LookTab_OCV = [3.3159, 3.4384, 3.4774, 3.5156, 3.5478, 3.5748, 3.6058, 3.6238, 3.638, 3.6535, 3.6715, 3.6951, 3.7279, 3.7757, 3.8126, 3.8529, 3.8969, 3.9446, 3.9946, 4.0491, 4.109, 4.183, 4.263]
  80. self.CellOvLv1=4.3
  81. self.CellOvLv2=4.35
  82. self.CellUvLv1=2.8
  83. self.CellUvLv2=2.5
  84. self.CellVoltDiffLv1=0.3
  85. self.CellVoltDiffLv2=0.5
  86. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  87. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  88. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  89. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  90. self.PackChgOc=-40
  91. self.PackDisOc=200
  92. self.LeakCurrentLv1=10
  93. self.LeakCurrentLv2=20
  94. self.LeakCurrentLv3=50
  95. elif celltype==3: #力信50ah三元电芯
  96. self.Capacity = 51
  97. self.PackFullChrgVolt=80
  98. self.CellFullChrgVolt=4.2
  99. self.CellFullChrgCrnt=-15
  100. self.CellVoltNums=20
  101. self.CellTempNums=3
  102. self.OtherTempNums=4
  103. self.FullChrgSoc=98
  104. self.PackCrntDec=1
  105. self.BalCurrent=0.015
  106. self.LookTab_SOC = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105]
  107. self.LookTab_OCV = [3.357, 3.455, 3.493, 3.540, 3.577, 3.605, 3.622, 3.638, 3.655, 3.677, 3.707, 3.757, 3.815, 3.866, 3.920, 3.976, 4.036, 4.099, 4.166, 4.237, 4.325, 4.415]
  108. self.CellOvLv1=4.3
  109. self.CellOvLv2=4.35
  110. self.CellUvLv1=2.8
  111. self.CellUvLv2=2.5
  112. self.CellVoltDiffLv1=0.3
  113. self.CellVoltDiffLv2=0.5
  114. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  115. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  116. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  117. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  118. self.PackChgOc=-40
  119. self.PackDisOc=200
  120. self.LeakCurrentLv1=10
  121. self.LeakCurrentLv2=20
  122. self.LeakCurrentLv3=50
  123. elif celltype==4: #CATL 50ah三元电芯
  124. self.Capacity = 50
  125. self.PackFullChrgVolt=80
  126. self.CellFullChrgVolt=4.2
  127. self.CellFullChrgCrnt=-15
  128. self.CellVoltNums=20
  129. self.CellTempNums=2
  130. self.OtherTempNums=0
  131. self.FullChrgSoc=98
  132. self.PeakSoc=57
  133. self.PackCrntDec=-1
  134. self.BalCurrent=0.015
  135. self.LookTab_SOC = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105]
  136. self.LookTab_OCV = [3.152, 3.397, 3.438, 3.481, 3.523, 3.560, 3.586, 3.604, 3.620, 3.638, 3.661, 3.693, 3.748, 3.803, 3.853, 3.903, 3.953, 4.006, 4.063, 4.121, 4.183, 4.253]
  137. self.CellOvLv1=4.3
  138. self.CellOvLv2=4.35
  139. self.CellUvLv1=2.8
  140. self.CellUvLv2=2.5
  141. self.CellVoltDiffLv1=0.3
  142. self.CellVoltDiffLv2=0.5
  143. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  144. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  145. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  146. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  147. self.PackChgOc=-40
  148. self.PackDisOc=200
  149. self.LeakCurrentLv1=10
  150. self.LeakCurrentLv2=20
  151. self.LeakCurrentLv3=50
  152. elif celltype==99: #60ah磷酸铁锂电芯
  153. self.Capacity = 54
  154. self.PackFullChrgVolt=69.99
  155. self.CellFullChrgVolt=3.5
  156. self.CellFullChrgCrnt=-20
  157. self.OcvInflexionBelow=3.281
  158. self.OcvInflexion2=3.296
  159. self.OcvInflexion3=3.328
  160. self.OcvInflexionAbove=3.4
  161. self.SocInflexion1=30
  162. self.SocInflexion2=60
  163. self.SocInflexion3=70
  164. self.CellVoltNums=20
  165. self.CellTempNums=4
  166. self.OtherTempNums=5
  167. self.FullChrgSoc=98
  168. self.PeakSoc=59
  169. self.PeakVoltLowLmt=3.35
  170. self.PeakVoltUpLmt=3.4
  171. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
  172. self.PackCrntDec=1
  173. self.BalCurrent=0.015
  174. self.LookTab_SOC = [0.00, 2.40, 6.38, 10.37, 14.35, 18.33, 22.32, 26.30, 30.28, 35.26, 40.24, 45.22, 50.20, 54.19, 58.17, 60.16, 65.14, 70.12, 75.10, 80.08, 84.06, 88.05, 92.03, 96.02, 100.00]
  175. self.LookTab_OCV = [2.7151, 3.0298, 3.1935, 3.2009, 3.2167, 3.2393, 3.2561, 3.2703, 3.2843, 3.2871, 3.2874, 3.2868, 3.2896, 3.2917, 3.2967, 3.3128, 3.3283, 3.3286, 3.3287, 3.3288, 3.3289, 3.3296, 3.3302, 3.3314, 3.3429]
  176. self.CellOvLv1=3.68
  177. self.CellOvLv2=3.7
  178. self.CellUvLv1=2.1
  179. self.CellUvLv2=2
  180. self.CellVoltDiffLv1=0.6
  181. self.CellVoltDiffLv2=1
  182. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  183. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  184. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  185. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  186. self.PackChgOc=-40
  187. self.PackDisOc=200
  188. self.LeakCurrentLv1=20
  189. self.LeakCurrentLv2=50
  190. self.LeakCurrentLv3=100
  191. else:
  192. print('未找到对应电池编号!!!')
  193. # sys.exit()