QX_BatteryParam.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. class BatteryInfo():
  2. def __init__(self,celltype):
  3. self.CellMaxUSBTemp=55
  4. self.AllowChgMinTemp=0
  5. self.AllowDsChgTemp=-5
  6. self.AvgVolGap=1
  7. self.AvgCellTempGap=10
  8. self.PackOTlmt=65
  9. self.PackUTlmt=-20
  10. self.OtherOTlmt=91
  11. self.OtherUTlmt=-20
  12. self.FaultCount=100
  13. if celltype==1: #6040
  14. self.Capacity = 41
  15. self.PackFullChrgVolt=69.99
  16. self.CellFullChrgVolt=4.2
  17. self.CellVoltNums=17
  18. self.CellTempNums=3
  19. self.OtherTempNums=5
  20. self.FullChrgSoc=98
  21. self.PeakSoc=57
  22. self.PackCrntDec=1
  23. self.BalCurrent=0.015
  24. 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]
  25. 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]
  26. self.DifVolGap = 3
  27. self.CellOVlmt=5
  28. self.CellUVlmt=2
  29. self.CantChrgVol=3
  30. self.AvgOtherTempGap=99
  31. elif celltype==2: #4840
  32. self.Capacity = 41
  33. self.PackFullChrgVolt=69.99
  34. self.CellFullChrgVolt=4.2
  35. self.CellVoltNums=14
  36. self.CellTempNums=3
  37. self.OtherTempNums=5
  38. self.FullChrgSoc=98
  39. self.PeakSoc=57
  40. self.PackCrntDec=1
  41. self.BalCurrent=0.015
  42. 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]
  43. 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]
  44. self.DifVolGap = 3
  45. self.CellOVlmt=5
  46. self.CellUVlmt=2
  47. self.CantChrgVol=3
  48. self.AvgOtherTempGap=99
  49. elif celltype==3: #力信50ah三元电芯
  50. self.Capacity = 51
  51. self.PackFullChrgVolt=80
  52. self.CellFullChrgVolt=4.2
  53. self.CellVoltNums=20
  54. self.CellTempNums=4
  55. self.OtherTempNums=1
  56. self.FullChrgSoc=98
  57. self.PeakSoc=57
  58. self.PackCrntDec=1
  59. self.BalCurrent=0.015
  60. 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]
  61. 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]
  62. self.DifVolGap = 3
  63. self.CellOVlmt=5
  64. self.CellUVlmt=2
  65. self.CantChrgVol=3
  66. self.AvgOtherTempGap=40
  67. elif celltype==4: #CATL 50ah三元电芯
  68. self.Capacity = 50
  69. self.PackFullChrgVolt=80
  70. self.CellFullChrgVolt=4.2
  71. self.CellVoltNums=20
  72. self.CellTempNums=2
  73. self.OtherTempNums=0
  74. self.FullChrgSoc=98
  75. self.PeakSoc=57
  76. self.PackCrntDec=-1
  77. self.BalCurrent=0.015
  78. 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]
  79. 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]
  80. self.DifVolGap = 3
  81. self.CellOVlmt=5
  82. self.CellUVlmt=2
  83. self.CantChrgVol=3
  84. self.AvgOtherTempGap=40
  85. elif celltype==99: #60ah磷酸铁锂电芯
  86. self.Capacity = 54
  87. self.PackFullChrgVolt=69.99
  88. self.CellFullChrgVolt=3.5
  89. self.OcvInflexionBelow=3.285
  90. self.OcvInflexion2=3.296
  91. self.OcvInflexion3=3.328
  92. self.OcvInflexionAbove=3.4
  93. self.CellVoltNums=20
  94. self.CellTempNums=3
  95. self.OtherTempNums=5
  96. self.FullChrgSoc=98
  97. self.PeakSoc=59
  98. self.PeakVoltLowLmt=3.35
  99. self.PeakVoltUpLmt=3.4
  100. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
  101. self.PackCrntDec=1
  102. self.BalCurrent=0.015
  103. 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]
  104. 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]
  105. self.DifVolGap = 3
  106. self.CellOVlmt=4
  107. self.CellUVlmt=2
  108. self.CantChrgVol=2.6
  109. self.AvgOtherTempGap=99
  110. elif celltype==100:
  111. self.Capacity = 228*2
  112. self.PackFullChrgVolt=3.65*192
  113. self.CellFullChrgVolt=3.5
  114. self.OcvInflexionBelow=3.285
  115. self.OcvInflexion2=3.296
  116. self.OcvInflexion3=3.328
  117. self.OcvInflexionAbove=3.4
  118. self.CellVoltNums=384
  119. self.CellTempNums=64
  120. self.OtherTempNums=0
  121. self.FullChrgSoc=98
  122. self.PeakSoc=59
  123. self.PeakVoltLowLmt=3.35
  124. self.PeakVoltUpLmt=3.4
  125. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
  126. self.PackCrntDec=1
  127. self.BalCurrent=0.015
  128. 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]
  129. 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]
  130. self.DifVolGap = 3
  131. self.CellOVlmt=4
  132. self.CellUVlmt=2
  133. self.CantChrgVol=2.6
  134. self.AvgOtherTempGap=40
  135. elif celltype==101: #真芯好电_20ah磷酸铁锂电芯
  136. self.Capacity = 20
  137. self.PackFullChrgVolt=54
  138. self.CellFullChrgVolt=3.65
  139. self.OcvInflexionBelow=3.2849
  140. self.OcvInflexion2=3.2998
  141. self.OcvInflexion3=3.3268
  142. self.OcvInflexionAbove=3.3333
  143. self.CellVoltNums=15
  144. self.CellTempNums=1
  145. self.FullChrgSoc=100
  146. self.PeakSoc=62.5
  147. self.PeakVoltLowLmt=3.35
  148. self.PeakVoltUpLmt=3.4
  149. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
  150. self.PackCrntDec=1
  151. self.BalCurrent=0.015
  152. self.LookTab_SOC = [0.0, 2.5, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 27.5, 30.0, 32.5, 35.0, 37.5, 40.0, 42.5, 45.0, 47.5, 50.0, 52.5, 55.0, 57.5, 60.0, 62.5, 65.0, 67.5, 70.0, 72.5, 75.0, 77.5, 80.0, 82.5, 85.0, 87.5, 90.0, 92.5, 95.0, 97.5, 100.0]
  153. self.LookTab_OCV = [2.5220, 2.8283, 3.0608, 3.1690, 3.1981, 3.2012, 3.2071, 3.2229, 3.2341, 3.2452, 3.2533, 3.2607, 3.2691, 3.2775, 3.2849, 3.2859, 3.2859, 3.2862, 3.2865, 3.2871, 3.2874, 3.2886, 3.2896, 3.2908, 3.2933, 3.2998, 3.3181, 3.3249, 3.3258, 3.3262, 3.3268, 3.3268, 3.3274, 3.3277, 3.3280, 3.3286, 3.3289, 3.3299, 3.3305, 3.3333, 3.4406]
  154. self.DifVolGap = 3
  155. self.CellOVlmt=4
  156. self.CellUVlmt=2
  157. self.CantChrgVol=2.6
  158. self.AvgOtherTempGap=40
  159. elif celltype==102: #平峰科技_120ah磷酸铁锂电芯
  160. self.Capacity = 120*2
  161. self.PackFullChrgVolt=426
  162. self.CellFullChrgVolt=3.65
  163. self.OcvInflexionBelow=3.2846
  164. self.OcvInflexion2=33.2917
  165. self.OcvInflexion3=3.3277
  166. self.OcvInflexionAbove=3.3333
  167. self.CellVoltNums=120
  168. self.CellTempNums=40
  169. self.FullChrgSoc=100
  170. self.PeakSoc=62.5#dV/dQ峰值SOC
  171. self.PeakVoltLowLmt=3.35#dV/dQ峰值SOC
  172. self.PeakVoltUpLmt=3.4#dV/dQ峰值SOC
  173. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]#dV/dQ峰值SOC
  174. self.PackCrntDec=1#电流方向
  175. self.BalCurrent=0.015
  176. self.LookTab_SOC = [0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100]
  177. self.LookTab_OCV = [2.8977,3.1857,3.2040,3.2269,3.2521,3.2691,3.2846,3.2865,3.2871,3.2880,3.2886,3.2917,3.3190,3.3277,3.3277,3.3280,3.3286,3.3289,3.3296,3.3311,3.379 ]
  178. self.DifVolGap = 3
  179. self.CellOVlmt=4
  180. self.CellUVlmt=2
  181. self.CantChrgVol=2.6
  182. self.AvgOtherTempGap=40
  183. else:
  184. print('未找到对应电池编号!!!')
  185. # sys.exit()
  186. {"charge_ocv_v":[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],"charge_ocv_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],"discharge_ocv_v":[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],"discharge_ocv_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],"capacity":"40","CellVoltTotalCount":"17","CellTempTotalCount":"4","soc_inflexion1":"30","soc_inflexion2":"55","soc_inflexion3":"65","ocv_inflexion1":"3.281","ocv_inflexion2":"3.297","ocv_inflexion3":"3.325","peak_soc":"60","fullchrg_soc":"100"}