BatParam.py 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #定义电池参数
  2. class BatParam:
  3. def __init__(self,celltype):
  4. #公用参数................................................................................................................................................
  5. #热失控参数
  6. self.TrwTempHigh=60
  7. self.TrwTempRate=3
  8. self.TrwTempDiff=15
  9. self.TrwCellVoltDiff=2.5
  10. self.TrwCellVoltFall=0.5
  11. self.TrwCellVoltLow=1.5
  12. self.TrwPackVoltFall=1.5
  13. #故障诊断参数
  14. self.temp_time=10
  15. self.volt_time=10
  16. self.SocJump=10
  17. self.SocClamp=0.1
  18. self.SocLow=3
  19. self.SocDiff=20
  20. self.SohLow=65
  21. self.SohDiff=15
  22. #mana-kendall趋势检验参数
  23. self.mk_p=0.001
  24. self.mk_z=-5
  25. self.mk_Tau=-0.7
  26. self.mk_slope=-0.1
  27. self.mk_s=-260
  28. self.mk_svar=1600
  29. self.OcvWeight_Temp=[-30,-20,-10,0,10,20,30,40,50]
  30. self.OcvWeight_StandingTime=[0,500,600,1200,1800,3600,7200,10800]
  31. self.OcvWeight =[[0,0, 0, 0, 0, 0.1,0.3, 1],
  32. [0,0, 0, 0, 0, 0.1,0.3, 1],
  33. [0,0, 0, 0, 0, 0.2,0.5, 1],
  34. [0,0, 0, 0, 0.2, 0.4,0.8, 1],
  35. [0,0, 0, 0.1, 0.3, 0.6,1, 1],
  36. [0,0, 0.1,0.2, 0.5, 0.8,1, 1],
  37. [0,0, 0.1,0.3, 0.6, 1, 1, 1],
  38. [0,0, 0.1,0.3, 0.7, 1, 1, 1],
  39. [0,0, 0.2,0.3, 0.8, 1, 1, 1]]
  40. if celltype==1: #永联+康普顿21700
  41. self.Capacity = 4*2
  42. self.PackFullChrgVolt=69.99
  43. self.CellFullChrgVolt=4.2
  44. self.CellFullChrgCrnt=-4
  45. self.CellVoltNums=120
  46. self.CellTempNums=40
  47. self.FullChrgSoc=90
  48. self.PackCrntDec=1
  49. self.BalCurrent=0.015
  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]
  51. self.LookTab_OCV = [2.8497, 3.0924, 3.2868, 3.4117, 3.4461, 3.5032, 3.5602, 3.6049, 3.6368, 3.6709, 3.7121, 3.7593, 3.8237, 3.8755, 3.9093, 3.9518, 4.0119, 4.0615, 4.077, 4.0969, 4.1821]
  52. self.CellOvLv1=4.2
  53. self.CellOvLv2=4.25
  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.CellTempUpLmt=119
  63. self.CellTempLwLmt=-39
  64. self.CellTempHighLv1=45
  65. self.CellTempHighLv2=50
  66. self.CellTempLowLv1=0
  67. self.CellTempLowLv2=-5
  68. self.CellTempDiffLv1=10
  69. self.CellTempDiffLv2=15
  70. self.CellTempRate=5
  71. self.PackChgOc=-40
  72. self.PackDisOc=200
  73. self.LeakCurrentLv1=-10
  74. self.LeakCurrentLv2=-15
  75. self.LeakCurrentLv3=-50
  76. self.TrwVoltRate=-1
  77. elif celltype==2: #中恒+华庭18650
  78. self.Capacity = 2*9
  79. self.CellVoltNums= 68
  80. self.CellTempNums= 40
  81. self.CellFullChrgVolt=4.2
  82. self.CellFullChrgCrnt=-self.Capacity/2
  83. self.FullChrgSoc=100
  84. self.PackCrntDec=1
  85. self.BalCurrent=0.015
  86. self.LookTab_SOC = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
  87. self.LookTab_OCV = [2.929, 3.2902, 3.3888, 3.425, 3.4846, 3.5382, 3.577, 3.6083, 3.638, 3.6786, 3.7127, 3.7596, 3.7853, 3.8371, 3.9081, 3.9127, 4.0097, 4.0314, 4.0463, 4.0969, 4.174]
  88. self.CellOvLv1=4.04
  89. self.CellOvLv2=4.05
  90. self.CellUvLv1=2.99
  91. self.CellUvLv2=2.950
  92. self.CellVoltDiffLv1=0.35
  93. self.CellVoltDiffLv2=0.4
  94. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  95. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  96. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  97. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  98. self.CellTempUpLmt=119
  99. self.CellTempLwLmt=-39
  100. self.CellTempHighLv1=45
  101. self.CellTempHighLv2=50
  102. self.CellTempLowLv1=0
  103. self.CellTempLowLv2=-5
  104. self.CellTempDiffLv1=10
  105. self.CellTempDiffLv2=15
  106. self.CellTempRate=5
  107. self.PackChgOc=-45
  108. self.PackDisOc=200
  109. self.LeakCurrentLv1=-10
  110. self.LeakCurrentLv2=-15
  111. self.LeakCurrentLv3=-50
  112. self.TrwVoltRate=-1
  113. elif celltype==99: #永联+力神
  114. self.Capacity = 40
  115. self.CellVoltNums=72
  116. self.CellTempNums=32
  117. self.CellFullChrgVolt=3.55
  118. self.CellFullChrgCrnt=-self.Capacity/2
  119. self.OcvInflexionBelow=3.281
  120. self.OcvInflexion2=3.303
  121. self.OcvInflexion3=3.343
  122. self.OcvInflexionAbove=3.36
  123. self.SocInflexion1=30
  124. self.SocInflexion2=60
  125. self.SocInflexion3=70
  126. self.FullChrgSoc=100
  127. self.PeakSoc=62.5
  128. self.PeakVoltLowLmt=3.35
  129. self.PeakVoltUpLmt=3.4
  130. self.PeakCellVolt=[3.384,3.385,3.386,3.387,3.388]
  131. self.PackCrntDec=1
  132. self.BalCurrent=0.015
  133. self.LookTab_SOC = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 75, 80, 85, 90, 95, 96, 97, 98, 99, 100]
  134. self.LookTab_OCV = [2.6748, 3.2020, 3.2170, 3.2430, 3.2600, 3.2770, 3.2880, 3.2890, 3.2900, 3.2910, 3.2911, 3.2970, 3.3030, 3.3080, 3.3200, 3.3270, 3.3290, 3.3300, 3.3301, 3.3310, 3.3311, 3.3312, 3.3313, 3.3314, 3.3315, 3.3316, 3.3320, 3.3330, 3.3340, 3.3350, 3.3360, 3.3580, 3.3640]
  135. self.LookTab_OCVChg=[2.6460, 3.1570, 3.2220, 3.2450,3.2760, 3.2970, 3.3060, 3.3070, 3.3080, 3.3090, 3.3110, 3.3140, 3.3220, 3.3270, 3.3330, 3.3380, 3.3420, 3.3421, 3.3422, 3.3423, 3.3424, 3.3431, 3.3432, 3.3433, 3.3434, 3.3441, 3.3442, 3.3443, 3.3444, 3.3445, 3.3446, 3.3447, 3.3640]
  136. self.CellOvLv1=3.65
  137. self.CellOvLv2=3.7
  138. self.CellUvLv1=2.7
  139. self.CellUvLv2=2.6
  140. self.CellVoltDiffLv1=0.6
  141. self.CellVoltDiffLv2=1.1
  142. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  143. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  144. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  145. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  146. self.CellTempUpLmt=119
  147. self.CellTempLwLmt=-39
  148. self.CellTempHighLv1=45
  149. self.CellTempHighLv2=50
  150. self.CellTempLowLv1=0
  151. self.CellTempLowLv2=-5
  152. self.CellTempDiffLv1=15
  153. self.CellTempDiffLv2=20
  154. self.CellTempRate=5
  155. self.PackChgOc=-160
  156. self.PackDisOc=180
  157. self.LeakCurrentLv1=-20
  158. self.LeakCurrentLv2=-30
  159. self.LeakCurrentLv3=-100
  160. self.TrwVoltRate=-8
  161. self.mk_slope=-0.8
  162. else:
  163. print('未找到对应电池编号!!!')
  164. # sys.exit()