|
@@ -1,29 +1,27 @@
|
|
|
|
|
|
#定义电池参数
|
|
|
-
|
|
|
from types import CellType
|
|
|
import sys
|
|
|
|
|
|
-
|
|
|
class BatParam:
|
|
|
|
|
|
- def __init__(self,sn):
|
|
|
+ def __init__(self,celltype):
|
|
|
|
|
|
- if 'PK500' in sn:
|
|
|
- self.celltype=1 #6040三元电芯
|
|
|
- elif 'PK502' in sn:
|
|
|
- self.celltype=2 #4840三元电芯
|
|
|
- elif 'PK504' in sn:
|
|
|
- self.celltype=99 #60ah林磷酸铁锂电芯
|
|
|
- elif 'MGMLXN750' in sn:
|
|
|
- self.celltype=3 #力信50ah三元电芯
|
|
|
- elif 'MGMCLN750' in sn:
|
|
|
- self.celltype=4 #CATL 50ah三元电芯
|
|
|
- else:
|
|
|
- print('未找到对应电池编号!!!')
|
|
|
- sys.exit()
|
|
|
+ # if 'PK500' in sn:
|
|
|
+ # self.celltype=1 #6040三元电芯
|
|
|
+ # elif 'PK502' in sn:
|
|
|
+ # self.celltype=2 #4840三元电芯
|
|
|
+ # elif 'PK504' in sn:
|
|
|
+ # self.celltype=99 #60ah林磷酸铁锂电芯
|
|
|
+ # elif 'MGMLXN750' in sn:
|
|
|
+ # self.celltype=3 #力信50ah三元电芯
|
|
|
+ # elif 'MGMCLN750' in sn:
|
|
|
+ # self.celltype=4 #CATL 50ah三元电芯
|
|
|
+ # else:
|
|
|
+ # print('未找到对应电池编号!!!')
|
|
|
+ # sys.exit()
|
|
|
|
|
|
- if self.celltype==1: #6040
|
|
|
+ if celltype==1: #6040
|
|
|
self.Capacity = 41
|
|
|
self.PackFullChrgVolt=69.99
|
|
|
self.CellFullChrgVolt=4.2
|
|
@@ -34,7 +32,7 @@ class BatParam:
|
|
|
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]
|
|
|
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]
|
|
|
|
|
|
- elif self.celltype==2: #4840
|
|
|
+ elif celltype==2: #4840
|
|
|
self.Capacity = 41
|
|
|
self.PackFullChrgVolt=69.99
|
|
|
self.CellFullChrgVolt=4.2
|
|
@@ -45,7 +43,7 @@ class BatParam:
|
|
|
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]
|
|
|
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]
|
|
|
|
|
|
- elif self.celltype==99: #60ah磷酸铁锂电芯
|
|
|
+ elif celltype==99: #60ah磷酸铁锂电芯
|
|
|
self.Capacity = 54
|
|
|
self.PackFullChrgVolt=69.99
|
|
|
self.CellFullChrgVolt=3.5
|
|
@@ -60,7 +58,7 @@ class BatParam:
|
|
|
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]
|
|
|
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]
|
|
|
|
|
|
- elif self.celltype==3:
|
|
|
+ elif celltype==3:
|
|
|
self.Capacity = 51
|
|
|
self.PackFullChrgVolt=80
|
|
|
self.CellFullChrgVolt=4.2
|