QX_BatteryParam.py 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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.AvgOtherTempGap=40
  9. self.PackOTlmt=65
  10. self.PackUTlmt=-20
  11. self.OtherOTlmt=91
  12. self.OtherUTlmt=-20
  13. self.FaultCount=100
  14. if celltype==1: #6040
  15. self.Capacity = 41
  16. self.PackFullChrgVolt=69.99
  17. self.CellFullChrgVolt=4.2
  18. self.CellVoltNums=17
  19. self.CellTempNums=3
  20. self.OtherTempNums=5
  21. self.FullChrgSoc=98
  22. self.PeakSoc=57
  23. self.PackCrntDec=1
  24. self.BalCurrent=0.015
  25. 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]
  26. 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]
  27. self.BLVol = 3
  28. self.CellOVlmt=5#原为5
  29. self.CellUVlmt=2#原为2
  30. self.CantChrgVol=3
  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=4
  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.BLVol = 3
  45. self.CellOVlmt=5
  46. self.CellUVlmt=2
  47. self.CantChrgVol=3
  48. elif celltype==3: #力信50ah三元电芯
  49. self.Capacity = 51
  50. self.PackFullChrgVolt=80
  51. self.CellFullChrgVolt=4.2
  52. self.CellVoltNums=20
  53. self.CellTempNums=4
  54. self.OtherTempNums=1
  55. self.FullChrgSoc=98
  56. self.PeakSoc=57
  57. self.PackCrntDec=1
  58. self.BalCurrent=0.015
  59. 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]
  60. 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]
  61. self.BLVol = 3
  62. self.CellOVlmt=5
  63. self.CellUVlmt=2
  64. self.CantChrgVol=3
  65. elif celltype==4: #CATL 50ah三元电芯
  66. self.Capacity = 50
  67. self.PackFullChrgVolt=80
  68. self.CellFullChrgVolt=4.2
  69. self.CellVoltNums=20
  70. self.CellTempNums=2
  71. self.OtherTempNums=0
  72. self.FullChrgSoc=98
  73. self.PeakSoc=57
  74. self.PackCrntDec=-1
  75. self.BalCurrent=0.015
  76. 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]
  77. 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]
  78. self.BLVol = 3
  79. self.CellOVlmt=5
  80. self.CellUVlmt=2
  81. self.CantChrgVol=3
  82. elif celltype==99: #60ah磷酸铁锂电芯
  83. self.Capacity = 54
  84. self.PackFullChrgVolt=69.99
  85. self.CellFullChrgVolt=3.5
  86. self.OcvInflexionBelow=3.285
  87. self.OcvInflexion2=3.296
  88. self.OcvInflexion3=3.328
  89. self.OcvInflexionAbove=3.4
  90. self.CellVoltNums=20
  91. self.CellTempNums=4
  92. self.OtherTempNums=5
  93. self.FullChrgSoc=98
  94. self.PeakSoc=59
  95. self.PeakVoltLowLmt=3.35
  96. self.PeakVoltUpLmt=3.4
  97. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
  98. self.PackCrntDec=1
  99. self.BalCurrent=0.015
  100. 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]
  101. 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]
  102. self.BLVol = 3
  103. self.CellOVlmt=4
  104. self.CellUVlmt=2
  105. self.CantChrgVol=2.6
  106. elif celltype==100:
  107. self.Capacity = 14
  108. self.PackFullChrgVolt=80
  109. self.CellFullChrgVolt=4.2
  110. self.CellVoltNums=10
  111. self.CellTempNums=1
  112. self.FullChrgSoc=98
  113. self.PeakSoc=57
  114. self.PackCrntDec=1
  115. self.LookTab_SOC = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100]
  116. self.LookTab_OCV = [2.841, 3.064, 3.181, 3.261, 3.322, 3.372, 3.413, 3.445, 3.464, 3.475, 3.482, 3.489, 3.495, 3.502, 3.51, 3.519, 3.529, 3.537, 3.545, 3.553, 3.562, 3.57, 3.578, 3.586, 3.594, 3.602, 3.611, 3.621, 3.631, 3.642, 3.655, 3.668, 3.681, 3.694, 3.708, 3.722, 3.735, 3.748, 3.761, 3.771, 3.782, 3.791, 3.799, 3.807, 3.81, 3.814, 3.82, 3.826, 3.832, 3.836, 3.841, 3.847, 3.852, 3.856, 3.861, 3.866, 3.871, 3.875, 3.88, 3.885, 3.891, 3.896, 3.903, 3.91, 3.917, 3.926, 3.936, 3.944, 3.953, 3.961, 3.969, 3.976, 3.983, 3.991, 3.997, 4.004, 4.01, 4.016, 4.022, 4.026, 4.03, 4.034, 4.037, 4.041, 4.044, 4.048, 4.052, 4.056, 4.06, 4.064, 4.069, 4.075, 4.081, 4.088, 4.097, 4.106, 4.116, 4.129, 4.145, 4.164]
  117. self.CellTempHighLv1=45
  118. self.CellTempHighLv2=50
  119. self.CellTempLowLv1=-20
  120. self.CellTempLowLv2=-25
  121. self.CellTempDiffLv1=10
  122. self.CellTempDiffLv2=15
  123. self.CellTempRate=0.99
  124. self.CellOvLv1=4.3
  125. self.CellOvLv2=4.35
  126. self.CellUvLv1=2.8
  127. self.CellUvLv2=2.5
  128. self.CellVoltDiffLv1=0.3
  129. self.CellVoltDiffLv2=0.5
  130. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  131. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  132. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  133. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  134. self.PackChgOc=1.5*self.Capacity
  135. self.PackDisChgOc=3*self.Capacity
  136. self.SocJump=3
  137. self.SocClamp=3
  138. self.BLVol = 3
  139. self.CellOVlmt=5
  140. self.CellUVlmt=2
  141. self.CantChrgVol=3
  142. else:
  143. print('未找到对应电池编号!!!')
  144. # sys.exit()