BatParam.py 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #定义电池参数
  2. from types import CellType
  3. import sys
  4. class BatParam:
  5. def __init__(self,celltype):
  6. # if 'PK500' in sn:
  7. # self.celltype=1 #6040三元电芯
  8. # elif 'PK502' in sn:
  9. # self.celltype=2 #4840三元电芯
  10. # elif 'PK504' in sn:
  11. # self.celltype=99 #60ah林磷酸铁锂电芯
  12. # elif 'MGMLXN750' in sn:
  13. # self.celltype=3 #力信50ah三元电芯
  14. # elif 'MGMCLN750' in sn:
  15. # self.celltype=4 #CATL 50ah三元电芯
  16. # else:
  17. # print('未找到对应电池编号!!!')
  18. # sys.exit()
  19. if celltype==1: #6040
  20. self.Capacity = 41
  21. self.PackFullChrgVolt=69.99
  22. self.CellFullChrgVolt=4.2
  23. self.CellVoltNums=17
  24. self.CellTempNums=4
  25. self.FullChrgSoc=98
  26. self.PeakSoc=57
  27. self.PackCrntDec=1
  28. 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]
  29. 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]
  30. elif celltype==2: #4840
  31. self.Capacity = 41
  32. self.PackFullChrgVolt=69.99
  33. self.CellFullChrgVolt=4.2
  34. self.CellVoltNums=14
  35. self.CellTempNums=4
  36. self.FullChrgSoc=98
  37. self.PeakSoc=57
  38. self.PackCrntDec=1
  39. 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]
  40. 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]
  41. elif celltype==3: #力信50ah三元电芯
  42. self.Capacity = 51
  43. self.PackFullChrgVolt=80
  44. self.CellFullChrgVolt=4.2
  45. self.CellVoltNums=20
  46. self.CellTempNums=4
  47. self.FullChrgSoc=98
  48. self.PeakSoc=57
  49. self.PackCrntDec=1
  50. 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]
  51. 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]
  52. elif celltype==4: #CATL 50ah三元电芯
  53. self.Capacity = 50
  54. self.PackFullChrgVolt=80
  55. self.CellFullChrgVolt=4.2
  56. self.CellVoltNums=20
  57. self.CellTempNums=2
  58. self.FullChrgSoc=98
  59. self.PeakSoc=57
  60. self.PackCrntDec=-1
  61. 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]
  62. 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]
  63. elif celltype==99: #60ah磷酸铁锂电芯
  64. self.Capacity = 103
  65. self.PackFullChrgVolt=69.99
  66. self.CellFullChrgVolt=3.5
  67. self.OcvInflexionBelow=3.285
  68. self.OcvInflexion2=3.296
  69. self.OcvInflexion3=3.328
  70. self.OcvInflexionAbove=3.4
  71. self.CellVoltNums=20
  72. self.CellTempNums=4
  73. self.FullChrgSoc=98
  74. self.PeakSoc=59
  75. self.PeakVoltLowLmt=3.35
  76. self.PeakVoltUpLmt=3.4
  77. self.PeakCellVolt=[3.362,3.363,3.365,3.366,3.367]
  78. self.PackCrntDec=1
  79. self.BalCurrent=0.015
  80. 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]
  81. 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]
  82. elif celltype==100: #CATL 102ah三元电芯
  83. self.Capacity = 102
  84. self.PackFullChrgVolt=80
  85. self.CellFullChrgVolt=4.2
  86. self.CellVoltNums=96
  87. self.CellTempNums=16
  88. self.FullChrgSoc=98
  89. self.PeakSoc=57
  90. self.PackCrntDec=1
  91. self.LookTab_SOC = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
  92. self.LookTab_OCV = [3.397, 3.429, 3.462, 3.507, 3.551, 3.575, 3.600, 3.617, 3.633, 3.658, 3.683, 3.735, 3.786, 3.836, 3.887, 3.939, 3.992, 4.053, 4.113, 4.195, 4.277]
  93. self.CellTempHighLv1=45
  94. self.CellTempHighLv2=50
  95. self.CellTempLowLv1=-20
  96. self.CellTempLowLv2=-25
  97. self.CellTempDiffLv1=10
  98. self.CellTempDiffLv2=15
  99. self.CellTempRate=0.99
  100. self.CellOvLv1=4.3
  101. self.CellOvLv2=4.35
  102. self.CellUvLv1=2.8
  103. self.CellUvLv2=2.5
  104. self.CellVoltDiffLv1=0.3
  105. self.CellVoltDiffLv2=0.5
  106. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  107. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  108. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  109. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  110. self.PackChgOc=1.5*self.Capacity
  111. self.PackDisChgOc=3*self.Capacity
  112. self.SocJump=3
  113. self.SocClamp=3
  114. else:
  115. print('未找到对应电池编号!!!')
  116. # sys.exit()