BatParam.py 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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.LookTab_DiffVolt=[0.4, 0.4, 0.3, 0.3, 0.2, 0.15, 0.1, 0.1, 0.08, 0.08, 0.08, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
  53. self.CellOvLv1=4.2
  54. self.CellOvLv2=4.25
  55. self.CellUvLv1=2.8
  56. self.CellUvLv2=2.5
  57. self.CellVoltDiffLv1=0.3
  58. self.CellVoltDiffLv2=0.5
  59. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  60. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  61. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  62. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  63. self.CellTempUpLmt=119
  64. self.CellTempLwLmt=-39
  65. self.CellTempHighLv1=45
  66. self.CellTempHighLv2=50
  67. self.CellTempLowLv1=0
  68. self.CellTempLowLv2=-5
  69. self.CellTempDiffLv1=10
  70. self.CellTempDiffLv2=15
  71. self.CellTempRate=5
  72. self.PackChgOc=-40
  73. self.PackDisOc=200
  74. self.LeakCurrentLv1=-10
  75. self.LeakCurrentLv2=-15
  76. self.LeakCurrentLv3=-50
  77. self.TrwVoltRate=-1
  78. #下行控制参数
  79. self.CellDscVolt=3
  80. self.DscPackSoc=15
  81. self.BalGroup=8
  82. self.BalNums=16
  83. # elif celltype==2: #中恒+华庭18650
  84. # self.Capacity = 2*9
  85. # self.CellVoltNums= 68
  86. # self.CellTempNums= 40
  87. # self.CellFullChrgVolt=4.2
  88. # self.CellFullChrgCrnt=-self.Capacity/2
  89. # self.FullChrgSoc=100
  90. # self.PackCrntDec=1
  91. # self.BalCurrent=0.015
  92. # self.LookTab_SOC = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
  93. # 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]
  94. # self.CellOvLv1=4.04
  95. # self.CellOvLv2=4.05
  96. # self.CellUvLv1=2.99
  97. # self.CellUvLv2=2.950
  98. # self.CellVoltDiffLv1=0.35
  99. # self.CellVoltDiffLv2=0.4
  100. # self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  101. # self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  102. # self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  103. # self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  104. # self.CellTempUpLmt=119
  105. # self.CellTempLwLmt=-39
  106. # self.CellTempHighLv1=45
  107. # self.CellTempHighLv2=50
  108. # self.CellTempLowLv1=0
  109. # self.CellTempLowLv2=-5
  110. # self.CellTempDiffLv1=10
  111. # self.CellTempDiffLv2=15
  112. # self.CellTempRate=5
  113. # self.PackChgOc=-45
  114. # self.PackDisOc=200
  115. # self.LeakCurrentLv1=-10
  116. # self.LeakCurrentLv2=-15
  117. # self.LeakCurrentLv3=-50
  118. # self.TrwVoltRate=-1
  119. elif celltype==99: #永联+力神
  120. self.Capacity = 40
  121. self.CellVoltNums=72
  122. self.CellTempNums=32
  123. self.CellFullChrgVolt=3.55
  124. self.CellFullChrgCrnt=-self.Capacity/2
  125. self.OcvInflexionBelow=3.281
  126. self.OcvInflexion2=3.303
  127. self.OcvInflexion3=3.343
  128. self.OcvInflexionAbove=3.36
  129. self.SocInflexion1=30
  130. self.SocInflexion2=60
  131. self.SocInflexion3=70
  132. self.FullChrgSoc=100
  133. self.PeakSoc=62.5
  134. self.PeakVoltLowLmt=3.37
  135. self.PeakVoltUpLmt=3.41
  136. self.PeakCellVolt=[3.389,3.390,3.391,3.392,3.393]
  137. self.PackCrntDec=1
  138. self.BalCurrent=0.015
  139. 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]
  140. 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]
  141. 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]
  142. self.LookTab_DiffVolt=[0.8, 0.8, 0.5, 0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.3, 0.3, 0.3, 0.3, 0.3]
  143. self.CellOvLv1=3.65
  144. self.CellOvLv2=3.7
  145. self.CellUvLv1=2.7
  146. self.CellUvLv2=2.6
  147. self.CellVoltDiffLv1=0.6
  148. self.CellVoltDiffLv2=1.1
  149. self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
  150. self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
  151. self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
  152. self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
  153. self.CellTempUpLmt=119
  154. self.CellTempLwLmt=-39
  155. self.CellTempHighLv1=45
  156. self.CellTempHighLv2=50
  157. self.CellTempLowLv1=0
  158. self.CellTempLowLv2=-5
  159. self.CellTempDiffLv1=15
  160. self.CellTempDiffLv2=20
  161. self.CellTempRate=5
  162. self.PackChgOc=-160
  163. self.PackDisOc=180
  164. self.LeakCurrentLv1=-20
  165. self.LeakCurrentLv2=-30
  166. self.LeakCurrentLv3=-100
  167. self.TrwVoltRate=-8
  168. self.mk_slope=-0.8
  169. #下行控制参数
  170. self.CellDscVolt=2.5
  171. self.DscPackSoc=20
  172. self.BalGroups=8 #均衡分组数
  173. self.BalNums=9 #每组均衡个数
  174. else:
  175. print('未找到对应电池编号!!!')
  176. # sys.exit()