qingfeng 2 年之前
父節點
當前提交
3e6978716e

+ 60 - 45
USER/SPF/alibaba/01BatSoh/BatParam.py

@@ -59,6 +59,7 @@ class BatParam:
             self.BalCurrent=0.015
             self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
             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]
+            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]
 
             self.CellOvLv1=4.2
             self.CellOvLv2=4.25
@@ -90,47 +91,53 @@ class BatParam:
 
             self.TrwVoltRate=-1
 
-        elif celltype==2: #中恒+华庭18650
-            self.Capacity = 2*9
-            self.CellVoltNums= 68
-            self.CellTempNums= 40
-            self.CellFullChrgVolt=4.2
-            self.CellFullChrgCrnt=-self.Capacity/2
-            self.FullChrgSoc=100
-            self.PackCrntDec=1
-            self.BalCurrent=0.015
-            self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
-            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]
-
-            self.CellOvLv1=4.04
-            self.CellOvLv2=4.05
-            self.CellUvLv1=2.99
-            self.CellUvLv2=2.950
-            self.CellVoltDiffLv1=0.35
-            self.CellVoltDiffLv2=0.4
-            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
-            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
-            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
-            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
-
-            self.CellTempUpLmt=119
-            self.CellTempLwLmt=-39
-            self.CellTempHighLv1=45
-            self.CellTempHighLv2=50
-            self.CellTempLowLv1=0
-            self.CellTempLowLv2=-5
-            self.CellTempDiffLv1=10
-            self.CellTempDiffLv2=15
-            self.CellTempRate=5
-
-            self.PackChgOc=-45
-            self.PackDisOc=200
-
-            self.LeakCurrentLv1=-10
-            self.LeakCurrentLv2=-15
-            self.LeakCurrentLv3=-50
-
-            self.TrwVoltRate=-1
+            #下行控制参数
+            self.CellDscVolt=3
+            self.DscPackSoc=15
+            self.BalGroup=8
+            self.BalNums=16
+
+        # elif celltype==2: #中恒+华庭18650
+        #     self.Capacity = 2*9
+        #     self.CellVoltNums= 68
+        #     self.CellTempNums= 40
+        #     self.CellFullChrgVolt=4.2
+        #     self.CellFullChrgCrnt=-self.Capacity/2
+        #     self.FullChrgSoc=100
+        #     self.PackCrntDec=1
+        #     self.BalCurrent=0.015
+        #     self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+        #     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]
+
+        #     self.CellOvLv1=4.04
+        #     self.CellOvLv2=4.05
+        #     self.CellUvLv1=2.99
+        #     self.CellUvLv2=2.950
+        #     self.CellVoltDiffLv1=0.35
+        #     self.CellVoltDiffLv2=0.4
+        #     self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+        #     self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+        #     self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+        #     self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+        #     self.CellTempUpLmt=119
+        #     self.CellTempLwLmt=-39
+        #     self.CellTempHighLv1=45
+        #     self.CellTempHighLv2=50
+        #     self.CellTempLowLv1=0
+        #     self.CellTempLowLv2=-5
+        #     self.CellTempDiffLv1=10
+        #     self.CellTempDiffLv2=15
+        #     self.CellTempRate=5
+
+        #     self.PackChgOc=-45
+        #     self.PackDisOc=200
+
+        #     self.LeakCurrentLv1=-10
+        #     self.LeakCurrentLv2=-15
+        #     self.LeakCurrentLv3=-50
+
+        #     self.TrwVoltRate=-1
 
         elif celltype==99:   #永联+力神
             self.Capacity = 40
@@ -149,15 +156,17 @@ class BatParam:
 
             self.FullChrgSoc=100
             self.PeakSoc=62.5
-            self.PeakVoltLowLmt=3.35
-            self.PeakVoltUpLmt=3.42
-            self.PeakCellVolt=[3.384,3.385,3.386,3.387,3.388]
+            self.PeakVoltLowLmt=3.37
+            self.PeakVoltUpLmt=3.41
+            self.PeakCellVolt=[3.389,3.390,3.391,3.392,3.393]
             self.PackCrntDec=1
             self.BalCurrent=0.015
 
-            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]
+            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]
             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]
             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]
+            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]
+
 
             self.CellOvLv1=3.65
             self.CellOvLv2=3.7
@@ -189,6 +198,12 @@ class BatParam:
 
             self.TrwVoltRate=-8  
             self.mk_slope=-0.8
+
+            #下行控制参数
+            self.CellDscVolt=2.5
+            self.DscPackSoc=20
+            self.BalGroups=8 #均衡分组数
+            self.BalNums=9  #每组均衡个数
         
 
         else:

+ 61 - 46
USER/SPF/alibaba/04BatSoc/BatParam.py

@@ -59,6 +59,7 @@ class BatParam:
             self.BalCurrent=0.015
             self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
             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]
+            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]
 
             self.CellOvLv1=4.2
             self.CellOvLv2=4.25
@@ -90,53 +91,59 @@ class BatParam:
 
             self.TrwVoltRate=-1
 
-        elif celltype==2: #中恒+华庭18650
-            self.Capacity = 2*9
-            self.CellVoltNums= 68
-            self.CellTempNums= 40
-            self.CellFullChrgVolt=4.2
-            self.CellFullChrgCrnt=-self.Capacity/2
-            self.FullChrgSoc=100
-            self.PackCrntDec=1
-            self.BalCurrent=0.015
-            self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
-            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]
-
-            self.CellOvLv1=4.04
-            self.CellOvLv2=4.05
-            self.CellUvLv1=2.99
-            self.CellUvLv2=2.950
-            self.CellVoltDiffLv1=0.35
-            self.CellVoltDiffLv2=0.4
-            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
-            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
-            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
-            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
-
-            self.CellTempUpLmt=119
-            self.CellTempLwLmt=-39
-            self.CellTempHighLv1=45
-            self.CellTempHighLv2=50
-            self.CellTempLowLv1=0
-            self.CellTempLowLv2=-5
-            self.CellTempDiffLv1=10
-            self.CellTempDiffLv2=15
-            self.CellTempRate=5
-
-            self.PackChgOc=-45
-            self.PackDisOc=200
-
-            self.LeakCurrentLv1=-10
-            self.LeakCurrentLv2=-15
-            self.LeakCurrentLv3=-50
-
-            self.TrwVoltRate=-1
+            #下行控制参数
+            self.CellDscVolt=3
+            self.DscPackSoc=15
+            self.BalGroup=8
+            self.BalNums=16
+
+        # elif celltype==2: #中恒+华庭18650
+        #     self.Capacity = 2*9
+        #     self.CellVoltNums= 68
+        #     self.CellTempNums= 40
+        #     self.CellFullChrgVolt=4.2
+        #     self.CellFullChrgCrnt=-self.Capacity/2
+        #     self.FullChrgSoc=100
+        #     self.PackCrntDec=1
+        #     self.BalCurrent=0.015
+        #     self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+        #     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]
+
+        #     self.CellOvLv1=4.04
+        #     self.CellOvLv2=4.05
+        #     self.CellUvLv1=2.99
+        #     self.CellUvLv2=2.950
+        #     self.CellVoltDiffLv1=0.35
+        #     self.CellVoltDiffLv2=0.4
+        #     self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+        #     self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+        #     self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+        #     self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+        #     self.CellTempUpLmt=119
+        #     self.CellTempLwLmt=-39
+        #     self.CellTempHighLv1=45
+        #     self.CellTempHighLv2=50
+        #     self.CellTempLowLv1=0
+        #     self.CellTempLowLv2=-5
+        #     self.CellTempDiffLv1=10
+        #     self.CellTempDiffLv2=15
+        #     self.CellTempRate=5
+
+        #     self.PackChgOc=-45
+        #     self.PackDisOc=200
+
+        #     self.LeakCurrentLv1=-10
+        #     self.LeakCurrentLv2=-15
+        #     self.LeakCurrentLv3=-50
+
+        #     self.TrwVoltRate=-1
 
         elif celltype==99:   #永联+力神
             self.Capacity = 40
             self.CellVoltNums=72
             self.CellTempNums=32
-            self.CellFullChrgVolt=3.5
+            self.CellFullChrgVolt=3.55
             self.CellFullChrgCrnt=-self.Capacity/2
 
             self.OcvInflexionBelow=3.281
@@ -149,15 +156,17 @@ class BatParam:
 
             self.FullChrgSoc=100
             self.PeakSoc=62.5
-            self.PeakVoltLowLmt=3.35
-            self.PeakVoltUpLmt=3.4
-            self.PeakCellVolt=[3.384,3.385,3.386,3.387,3.388]
+            self.PeakVoltLowLmt=3.37
+            self.PeakVoltUpLmt=3.41
+            self.PeakCellVolt=[3.389,3.390,3.391,3.392,3.393]
             self.PackCrntDec=1
             self.BalCurrent=0.015
 
-            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]
+            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]
             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]
             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]
+            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]
+
 
             self.CellOvLv1=3.65
             self.CellOvLv2=3.7
@@ -189,6 +198,12 @@ class BatParam:
 
             self.TrwVoltRate=-8  
             self.mk_slope=-0.8
+
+            #下行控制参数
+            self.CellDscVolt=2.5
+            self.DscPackSoc=20
+            self.BalGroups=8 #均衡分组数
+            self.BalNums=9  #每组均衡个数
         
 
         else:

+ 211 - 0
USER/SPF/alibaba/05BatDiag/BatParam.py

@@ -0,0 +1,211 @@
+
+#定义电池参数
+
+class BatParam:
+    def __init__(self,celltype):
+
+        #公用参数................................................................................................................................................
+        #热失控参数
+        self.TrwTempHigh=60
+        self.TrwTempRate=3
+        self.TrwTempDiff=15
+        self.TrwCellVoltDiff=2.5
+        self.TrwCellVoltFall=0.5
+        self.TrwCellVoltLow=1.5
+        self.TrwPackVoltFall=1.5
+        
+        #故障诊断参数
+        self.temp_time=10
+        self.volt_time=10
+
+        self.SocJump=10
+        self.SocClamp=0.1
+        self.SocLow=3
+        self.SocDiff=20
+
+        self.SohLow=65
+        self.SohDiff=15
+
+        #mana-kendall趋势检验参数
+        self.mk_p=0.001
+        self.mk_z=-5
+        self.mk_Tau=-0.7
+        self.mk_slope=-0.1
+        self.mk_s=-260
+        self.mk_svar=1600
+
+        self.OcvWeight_Temp=[-30,-20,-10,0,10,20,30,40,50]
+        self.OcvWeight_StandingTime=[0,500,600,1200,1800,3600,7200,10800]
+        self.OcvWeight            =[[0,0,  0,  0,    0,   0.1,0.3, 1],
+                                    [0,0,  0,  0,    0,   0.1,0.3, 1],
+                                    [0,0,  0,  0,    0,   0.2,0.5, 1],
+                                    [0,0,  0,  0,    0.2, 0.4,0.8, 1],
+                                    [0,0,  0,  0.1,  0.3, 0.6,1,   1],
+                                    [0,0,  0.1,0.2,  0.5, 0.8,1,   1],
+                                    [0,0,  0.1,0.3,  0.6, 1,  1,   1],
+                                    [0,0,  0.1,0.3,  0.7, 1,  1,   1],
+                                    [0,0,  0.2,0.3,  0.8, 1,  1,   1]]
+
+
+        if celltype==1: #永联+康普顿21700
+            self.Capacity = 4*2
+            self.PackFullChrgVolt=69.99
+            self.CellFullChrgVolt=4.2
+            self.CellFullChrgCrnt=-4
+            self.CellVoltNums=120
+            self.CellTempNums=40
+            self.FullChrgSoc=90
+            self.PackCrntDec=1
+            self.BalCurrent=0.015
+            self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+            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]
+            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]
+
+            self.CellOvLv1=4.2
+            self.CellOvLv2=4.25
+            self.CellUvLv1=2.8
+            self.CellUvLv2=2.5
+            self.CellVoltDiffLv1=0.3
+            self.CellVoltDiffLv2=0.5
+            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+            self.CellTempUpLmt=119
+            self.CellTempLwLmt=-39
+            self.CellTempHighLv1=45
+            self.CellTempHighLv2=50
+            self.CellTempLowLv1=0
+            self.CellTempLowLv2=-5
+            self.CellTempDiffLv1=10
+            self.CellTempDiffLv2=15
+            self.CellTempRate=5
+
+            self.PackChgOc=-40
+            self.PackDisOc=200
+
+            self.LeakCurrentLv1=-10
+            self.LeakCurrentLv2=-15
+            self.LeakCurrentLv3=-50
+
+            self.TrwVoltRate=-1
+
+            #下行控制参数
+            self.CellDscVolt=3
+            self.DscPackSoc=15
+            self.BalGroup=8
+            self.BalNums=16
+
+        # elif celltype==2: #中恒+华庭18650
+        #     self.Capacity = 2*9
+        #     self.CellVoltNums= 68
+        #     self.CellTempNums= 40
+        #     self.CellFullChrgVolt=4.2
+        #     self.CellFullChrgCrnt=-self.Capacity/2
+        #     self.FullChrgSoc=100
+        #     self.PackCrntDec=1
+        #     self.BalCurrent=0.015
+        #     self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+        #     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]
+
+        #     self.CellOvLv1=4.04
+        #     self.CellOvLv2=4.05
+        #     self.CellUvLv1=2.99
+        #     self.CellUvLv2=2.950
+        #     self.CellVoltDiffLv1=0.35
+        #     self.CellVoltDiffLv2=0.4
+        #     self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+        #     self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+        #     self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+        #     self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+        #     self.CellTempUpLmt=119
+        #     self.CellTempLwLmt=-39
+        #     self.CellTempHighLv1=45
+        #     self.CellTempHighLv2=50
+        #     self.CellTempLowLv1=0
+        #     self.CellTempLowLv2=-5
+        #     self.CellTempDiffLv1=10
+        #     self.CellTempDiffLv2=15
+        #     self.CellTempRate=5
+
+        #     self.PackChgOc=-45
+        #     self.PackDisOc=200
+
+        #     self.LeakCurrentLv1=-10
+        #     self.LeakCurrentLv2=-15
+        #     self.LeakCurrentLv3=-50
+
+        #     self.TrwVoltRate=-1
+
+        elif celltype==99:   #永联+力神
+            self.Capacity = 40
+            self.CellVoltNums=72
+            self.CellTempNums=32
+            self.CellFullChrgVolt=3.55
+            self.CellFullChrgCrnt=-self.Capacity/2
+
+            self.OcvInflexionBelow=3.281
+            self.OcvInflexion2=3.303
+            self.OcvInflexion3=3.343
+            self.OcvInflexionAbove=3.36
+            self.SocInflexion1=30
+            self.SocInflexion2=60
+            self.SocInflexion3=70
+
+            self.FullChrgSoc=100
+            self.PeakSoc=62.5
+            self.PeakVoltLowLmt=3.37
+            self.PeakVoltUpLmt=3.41
+            self.PeakCellVolt=[3.389,3.390,3.391,3.392,3.393]
+            self.PackCrntDec=1
+            self.BalCurrent=0.015
+
+            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]
+            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]
+            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]
+            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]
+
+
+            self.CellOvLv1=3.65
+            self.CellOvLv2=3.7
+            self.CellUvLv1=2.7
+            self.CellUvLv2=2.6
+            self.CellVoltDiffLv1=0.6
+            self.CellVoltDiffLv2=1.1
+            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+            self.CellTempUpLmt=119
+            self.CellTempLwLmt=-39
+            self.CellTempHighLv1=45
+            self.CellTempHighLv2=50
+            self.CellTempLowLv1=0
+            self.CellTempLowLv2=-5
+            self.CellTempDiffLv1=15
+            self.CellTempDiffLv2=20
+            self.CellTempRate=5
+
+            self.PackChgOc=-160
+            self.PackDisOc=180
+
+            self.LeakCurrentLv1=-20
+            self.LeakCurrentLv2=-30
+            self.LeakCurrentLv3=-100
+
+            self.TrwVoltRate=-8  
+            self.mk_slope=-0.8
+
+            #下行控制参数
+            self.CellDscVolt=2.5
+            self.DscPackSoc=20
+            self.BalGroups=8 #均衡分组数
+            self.BalNums=9  #每组均衡个数
+        
+
+        else:
+            print('未找到对应电池编号!!!')
+            # sys.exit()

+ 3 - 1
USER/SPF/alibaba/05BatDiag/CBMSBatDiag.py

@@ -1,7 +1,7 @@
 import pandas as pd
 import numpy as np
 import datetime
-from USER.SPF.alibaba.Common import BatParam
+import BatParam
 
 class BatDiag:
     def __init__(self,sn,celltype,df_bms,df_soh,df_soc,df_uniform,df_diag_ram):  #参数初始化
@@ -69,6 +69,8 @@ class BatDiag:
         puv_time=0
         vv_time=0
         tv_time=0
+        celltempvalid=1
+        cellvoltvalid=1
 
         time_sp='0000-00-00 00:00:00'
 

+ 211 - 0
USER/SPF/alibaba/06BatSafetyAlarm/BatParam.py

@@ -0,0 +1,211 @@
+
+#定义电池参数
+
+class BatParam:
+    def __init__(self,celltype):
+
+        #公用参数................................................................................................................................................
+        #热失控参数
+        self.TrwTempHigh=60
+        self.TrwTempRate=3
+        self.TrwTempDiff=15
+        self.TrwCellVoltDiff=2.5
+        self.TrwCellVoltFall=0.5
+        self.TrwCellVoltLow=1.5
+        self.TrwPackVoltFall=1.5
+        
+        #故障诊断参数
+        self.temp_time=10
+        self.volt_time=10
+
+        self.SocJump=10
+        self.SocClamp=0.1
+        self.SocLow=3
+        self.SocDiff=20
+
+        self.SohLow=65
+        self.SohDiff=15
+
+        #mana-kendall趋势检验参数
+        self.mk_p=0.001
+        self.mk_z=-5
+        self.mk_Tau=-0.7
+        self.mk_slope=-0.1
+        self.mk_s=-260
+        self.mk_svar=1600
+
+        self.OcvWeight_Temp=[-30,-20,-10,0,10,20,30,40,50]
+        self.OcvWeight_StandingTime=[0,500,600,1200,1800,3600,7200,10800]
+        self.OcvWeight            =[[0,0,  0,  0,    0,   0.1,0.3, 1],
+                                    [0,0,  0,  0,    0,   0.1,0.3, 1],
+                                    [0,0,  0,  0,    0,   0.2,0.5, 1],
+                                    [0,0,  0,  0,    0.2, 0.4,0.8, 1],
+                                    [0,0,  0,  0.1,  0.3, 0.6,1,   1],
+                                    [0,0,  0.1,0.2,  0.5, 0.8,1,   1],
+                                    [0,0,  0.1,0.3,  0.6, 1,  1,   1],
+                                    [0,0,  0.1,0.3,  0.7, 1,  1,   1],
+                                    [0,0,  0.2,0.3,  0.8, 1,  1,   1]]
+
+
+        if celltype==1: #永联+康普顿21700
+            self.Capacity = 4*2
+            self.PackFullChrgVolt=69.99
+            self.CellFullChrgVolt=4.2
+            self.CellFullChrgCrnt=-4
+            self.CellVoltNums=120
+            self.CellTempNums=40
+            self.FullChrgSoc=90
+            self.PackCrntDec=1
+            self.BalCurrent=0.015
+            self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+            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]
+            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]
+
+            self.CellOvLv1=4.2
+            self.CellOvLv2=4.25
+            self.CellUvLv1=2.8
+            self.CellUvLv2=2.5
+            self.CellVoltDiffLv1=0.3
+            self.CellVoltDiffLv2=0.5
+            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+            self.CellTempUpLmt=119
+            self.CellTempLwLmt=-39
+            self.CellTempHighLv1=45
+            self.CellTempHighLv2=50
+            self.CellTempLowLv1=0
+            self.CellTempLowLv2=-5
+            self.CellTempDiffLv1=10
+            self.CellTempDiffLv2=15
+            self.CellTempRate=5
+
+            self.PackChgOc=-40
+            self.PackDisOc=200
+
+            self.LeakCurrentLv1=-10
+            self.LeakCurrentLv2=-15
+            self.LeakCurrentLv3=-50
+
+            self.TrwVoltRate=-1
+
+            #下行控制参数
+            self.CellDscVolt=3
+            self.DscPackSoc=15
+            self.BalGroup=8
+            self.BalNums=16
+
+        # elif celltype==2: #中恒+华庭18650
+        #     self.Capacity = 2*9
+        #     self.CellVoltNums= 68
+        #     self.CellTempNums= 40
+        #     self.CellFullChrgVolt=4.2
+        #     self.CellFullChrgCrnt=-self.Capacity/2
+        #     self.FullChrgSoc=100
+        #     self.PackCrntDec=1
+        #     self.BalCurrent=0.015
+        #     self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+        #     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]
+
+        #     self.CellOvLv1=4.04
+        #     self.CellOvLv2=4.05
+        #     self.CellUvLv1=2.99
+        #     self.CellUvLv2=2.950
+        #     self.CellVoltDiffLv1=0.35
+        #     self.CellVoltDiffLv2=0.4
+        #     self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+        #     self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+        #     self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+        #     self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+        #     self.CellTempUpLmt=119
+        #     self.CellTempLwLmt=-39
+        #     self.CellTempHighLv1=45
+        #     self.CellTempHighLv2=50
+        #     self.CellTempLowLv1=0
+        #     self.CellTempLowLv2=-5
+        #     self.CellTempDiffLv1=10
+        #     self.CellTempDiffLv2=15
+        #     self.CellTempRate=5
+
+        #     self.PackChgOc=-45
+        #     self.PackDisOc=200
+
+        #     self.LeakCurrentLv1=-10
+        #     self.LeakCurrentLv2=-15
+        #     self.LeakCurrentLv3=-50
+
+        #     self.TrwVoltRate=-1
+
+        elif celltype==99:   #永联+力神
+            self.Capacity = 40
+            self.CellVoltNums=72
+            self.CellTempNums=32
+            self.CellFullChrgVolt=3.55
+            self.CellFullChrgCrnt=-self.Capacity/2
+
+            self.OcvInflexionBelow=3.281
+            self.OcvInflexion2=3.303
+            self.OcvInflexion3=3.343
+            self.OcvInflexionAbove=3.36
+            self.SocInflexion1=30
+            self.SocInflexion2=60
+            self.SocInflexion3=70
+
+            self.FullChrgSoc=100
+            self.PeakSoc=62.5
+            self.PeakVoltLowLmt=3.37
+            self.PeakVoltUpLmt=3.41
+            self.PeakCellVolt=[3.389,3.390,3.391,3.392,3.393]
+            self.PackCrntDec=1
+            self.BalCurrent=0.015
+
+            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]
+            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]
+            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]
+            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]
+
+
+            self.CellOvLv1=3.65
+            self.CellOvLv2=3.7
+            self.CellUvLv1=2.7
+            self.CellUvLv2=2.6
+            self.CellVoltDiffLv1=0.6
+            self.CellVoltDiffLv2=1.1
+            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+            self.CellTempUpLmt=119
+            self.CellTempLwLmt=-39
+            self.CellTempHighLv1=45
+            self.CellTempHighLv2=50
+            self.CellTempLowLv1=0
+            self.CellTempLowLv2=-5
+            self.CellTempDiffLv1=15
+            self.CellTempDiffLv2=20
+            self.CellTempRate=5
+
+            self.PackChgOc=-160
+            self.PackDisOc=180
+
+            self.LeakCurrentLv1=-20
+            self.LeakCurrentLv2=-30
+            self.LeakCurrentLv3=-100
+
+            self.TrwVoltRate=-8  
+            self.mk_slope=-0.8
+
+            #下行控制参数
+            self.CellDscVolt=2.5
+            self.DscPackSoc=20
+            self.BalGroups=8 #均衡分组数
+            self.BalNums=9  #每组均衡个数
+        
+
+        else:
+            print('未找到对应电池编号!!!')
+            # sys.exit()

+ 1 - 1
USER/SPF/alibaba/06BatSafetyAlarm/CBMSSafetyAlarm.py

@@ -1,7 +1,7 @@
 import pandas as pd
 import numpy as np
 import datetime
-from USER.SPF.alibaba.Common import BatParam
+import BatParam
 
 class SafetyAlarm:
     def __init__(self,sn,celltype,df_bms,df_diag_ram_sn, df_bms_ram_sn, df_alarm_ram_sn):  #参数初始化

+ 57 - 42
USER/SPF/alibaba/07BatSafetyWarning/BatParam.py

@@ -59,6 +59,7 @@ class BatParam:
             self.BalCurrent=0.015
             self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
             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]
+            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]
 
             self.CellOvLv1=4.2
             self.CellOvLv2=4.25
@@ -90,47 +91,53 @@ class BatParam:
 
             self.TrwVoltRate=-1
 
-        elif celltype==2: #中恒+华庭18650
-            self.Capacity = 2*9
-            self.CellVoltNums= 68
-            self.CellTempNums= 40
-            self.CellFullChrgVolt=4.2
-            self.CellFullChrgCrnt=-self.Capacity/2
-            self.FullChrgSoc=100
-            self.PackCrntDec=1
-            self.BalCurrent=0.015
-            self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
-            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]
-
-            self.CellOvLv1=4.04
-            self.CellOvLv2=4.05
-            self.CellUvLv1=2.99
-            self.CellUvLv2=2.950
-            self.CellVoltDiffLv1=0.35
-            self.CellVoltDiffLv2=0.4
-            self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
-            self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
-            self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
-            self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
-
-            self.CellTempUpLmt=119
-            self.CellTempLwLmt=-39
-            self.CellTempHighLv1=45
-            self.CellTempHighLv2=50
-            self.CellTempLowLv1=0
-            self.CellTempLowLv2=-5
-            self.CellTempDiffLv1=10
-            self.CellTempDiffLv2=15
-            self.CellTempRate=5
-
-            self.PackChgOc=-45
-            self.PackDisOc=200
-
-            self.LeakCurrentLv1=-10
-            self.LeakCurrentLv2=-15
-            self.LeakCurrentLv3=-50
-
-            self.TrwVoltRate=-1
+            #下行控制参数
+            self.CellDscVolt=3
+            self.DscPackSoc=15
+            self.BalGroup=8
+            self.BalNums=16
+
+        # elif celltype==2: #中恒+华庭18650
+        #     self.Capacity = 2*9
+        #     self.CellVoltNums= 68
+        #     self.CellTempNums= 40
+        #     self.CellFullChrgVolt=4.2
+        #     self.CellFullChrgCrnt=-self.Capacity/2
+        #     self.FullChrgSoc=100
+        #     self.PackCrntDec=1
+        #     self.BalCurrent=0.015
+        #     self.LookTab_SOC = [0,	     5,	    10,	    15,	    20,	    25,	    30,	    35,	    40,	    45,	    50,	    55,	    60,	    65,	    70,	    75,	    80,	    85,	    90,	    95,	    100]
+        #     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]
+
+        #     self.CellOvLv1=4.04
+        #     self.CellOvLv2=4.05
+        #     self.CellUvLv1=2.99
+        #     self.CellUvLv2=2.950
+        #     self.CellVoltDiffLv1=0.35
+        #     self.CellVoltDiffLv2=0.4
+        #     self.PackVoltOvLv1=self.CellOvLv1*self.CellVoltNums
+        #     self.PackVoltOvLv2=self.CellOvLv2*self.CellVoltNums
+        #     self.PackVoltUvLv1=self.CellUvLv1*self.CellVoltNums
+        #     self.PackVoltUvLv2=self.CellUvLv2*self.CellVoltNums
+
+        #     self.CellTempUpLmt=119
+        #     self.CellTempLwLmt=-39
+        #     self.CellTempHighLv1=45
+        #     self.CellTempHighLv2=50
+        #     self.CellTempLowLv1=0
+        #     self.CellTempLowLv2=-5
+        #     self.CellTempDiffLv1=10
+        #     self.CellTempDiffLv2=15
+        #     self.CellTempRate=5
+
+        #     self.PackChgOc=-45
+        #     self.PackDisOc=200
+
+        #     self.LeakCurrentLv1=-10
+        #     self.LeakCurrentLv2=-15
+        #     self.LeakCurrentLv3=-50
+
+        #     self.TrwVoltRate=-1
 
         elif celltype==99:   #永联+力神
             self.Capacity = 40
@@ -155,9 +162,11 @@ class BatParam:
             self.PackCrntDec=1
             self.BalCurrent=0.015
 
-            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]
+            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]
             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]
             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]
+            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]
+
 
             self.CellOvLv1=3.65
             self.CellOvLv2=3.7
@@ -189,6 +198,12 @@ class BatParam:
 
             self.TrwVoltRate=-8  
             self.mk_slope=-0.8
+
+            #下行控制参数
+            self.CellDscVolt=2.5
+            self.DscPackSoc=20
+            self.BalGroups=8 #均衡分组数
+            self.BalNums=9  #每组均衡个数
         
 
         else:

二進制
USER/SPF/alibaba/07BatSafetyWarning/LS002内短路.xlsx


+ 0 - 247
USER/SPF/alibaba/07BatSafetyWarning/main_test.py

@@ -1,247 +0,0 @@
-import pandas as pd
-import numpy as np
-import pymysql
-from LIB.BACKEND import DBManager, Log
-from apscheduler.schedulers.blocking import BlockingScheduler
-import time, datetime
-from USER.SPF.alibaba.Common import DBDownload
-from USER.SPF.alibaba.Common import log
-import CBMSBatInterShort
-import CBMSBatUniform
-import VoltStray
-import CBMSSafetyWarning
-
-#电池热安全预警核心算法函数......................................................................................................................
-def saftywarning_cal():
-    global SNnums
-    global df_warning_ram
-    global df_warning_ram1
-    global df_warning_ram2
-    global df_warning_ram3
-    global df_lfp_ram
-    global df_lfp_ram1
-    global now_time
-    global df_data
-    
-    start=time.time()
-
-    mylog=log.Mylog('log_warning.txt','error')
-    mylog.logcfg()
-
-    start_time=now_time-datetime.timedelta(hours=72)
-    start_time1=now_time-datetime.timedelta(days=7)
-    start_time2=now_time-datetime.timedelta(days=3)
-    start_time3=now_time-datetime.timedelta(days=1)
-    start_time=start_time.strftime('%Y-%m-%d %H:%M:%S')
-    start_time1=start_time1.strftime('%Y-%m-%d %H:%M:%S')
-    start_time2=start_time2.strftime('%Y-%m-%d %H:%M:%S')
-    start_time3=start_time3.strftime('%Y-%m-%d %H:%M:%S')
-    end_time=now_time.strftime('%Y-%m-%d %H:%M:%S')
-    now_time=now_time+datetime.timedelta(hours=6)
-
-    #数据库配置
-    host='rm-bp10j10qy42bzy0q77o.mysql.rds.aliyuncs.com'
-    port=3306
-    user='qx_read'
-    password='Qx@123456'
-
-    #读取故障结果库中code==110且end_time='0000-00-00 00:00:00'...............................
-    # db='safety_platform'
-    # mysql = pymysql.connect (host=host, user=user, password=password, port=port, database=db)
-    # cursor = mysql.cursor()
-    # param='start_time,end_time,product_id,code,level,info,advice'
-    # tablename='all_fault_info'
-    # sql =  "select %s from %s where code=110 and end_time='0000-00-00 00:00:00'" %(param,tablename)
-    # cursor.execute(sql)
-    # res = cursor.fetchall()
-    # df_fault_ram= pd.DataFrame(res,columns=param.split(','))
-    # cursor.close()
-    # mysql.close()
-    df_fault_ram=pd.DataFrame(columns=['time_st','time_sp','sn','faultcode','faultlv','faultinfo','faultadvice'])
-
-    for sn in SNnums:
-        try:
-            if 'KPD' in sn:
-                celltype=1 
-            elif 'LS' in sn:
-                celltype=99 
-            else:
-                celltype=2
-
-
-            #读取原始数据库数据........................................................................................................................................................
-            df_bms= df_data[(df_data['time']>=start_time) & (df_data['time']<end_time)]
-            df_bms=df_bms.reset_index(drop=True)
-            if not df_bms.empty:
-                cellvolt_name=['CellVolt'+str(x) for x in range(1,73)]
-                celltemp_name=['CellTemp'+str(x) for x in range(1,33)]
-                df_volt=pd.DataFrame([x[0].split(",") for x in np.array(df_bms[['cell_volt']])])
-                df_volt.columns = cellvolt_name
-                df_volt=df_volt.astype('float')
-                df_temp=pd.DataFrame([x[0].split(",") for x in np.array(df_bms[['cell_temp']])])
-                df_temp.columns = celltemp_name
-                df_temp=df_temp.astype('float')
-                df_bms=pd.concat([df_bms,df_volt,df_temp],axis=1)
-                df_bms.dropna(axis=0, inplace=True)
-                df_bms=df_bms.reset_index(drop=True)
-        
-            #读取结果数据库数据........................................................................................................................................................
-            # db='qx_cas'
-            # mode=1
-            # DBRead=DBDownload.DBDownload(host, port, db, user, password,mode)
-            # with DBRead as DBRead:
-            #     df_soh=DBRead.getdata('time_st,sn,soh,cellsoh', tablename='cellstateestimation_soh', sn=sn, timename='time_sp', st=start_time, sp=end_time)
-            #     df_uniform=DBRead.getdata('time,sn,cellsoc_diff,cellvolt_diff,cellmin_num,cellmax_num', tablename='cellstateestimation_uniform_socvoltdiff', sn=sn, timename='time', st=start_time1, sp=end_time)
-            df_soh=pd.DataFrame()
-            df_uniform=pd.DataFrame()
-
-            if not df_bms.empty:
-                #ram处理...............................................................................................................
-                df_warning_ram_sn=df_warning_ram[df_warning_ram['sn']==sn]
-                df_warning_ram_sn1=df_warning_ram1[df_warning_ram1['sn']==sn]
-                df_warning_ram_sn2=df_warning_ram2[df_warning_ram2['sn']==sn]
-                df_warning_ram_sn3=df_warning_ram3[df_warning_ram3['sn']==sn]
-                df_warning_ram_sn.reset_index(inplace=True,drop=True)     #重置索引
-                df_warning_ram_sn1.reset_index(inplace=True,drop=True)     #重置索引
-                df_warning_ram_sn2.reset_index(inplace=True,drop=True)     #重置索引
-                df_warning_ram_sn3.reset_index(inplace=True,drop=True)     #重置索引
-                if celltype>50 and (not df_lfp_ram.empty):
-                    df_lfp_ram_sn=df_lfp_ram[df_lfp_ram['sn']==sn]
-                    df_lfp_ram_sn.reset_index(inplace=True,drop=True)     #重置索引
-                else:
-                    df_lfp_ram_sn=pd.DataFrame()
-                    df_lfp_ram=pd.DataFrame(columns=df_bms.columns.tolist())
-                if celltype>50 and (not df_lfp_ram1.empty):
-                    df_lfp_ram_sn1=df_lfp_ram1[df_lfp_ram1['sn']==sn]
-                    df_lfp_ram_sn1.reset_index(inplace=True,drop=True)     #重置索引
-                else:
-                    df_lfp_ram_sn1=pd.DataFrame()
-                    df_lfp_ram1=pd.DataFrame(columns=df_bms.columns.tolist())
-
-                #内短路计算..................................................................................................................................................
-                BatShort=CBMSBatInterShort.BatInterShort(sn,celltype,df_bms,df_soh,df_warning_ram_sn,df_warning_ram_sn1,df_warning_ram_sn2,df_warning_ram_sn3,df_lfp_ram_sn)
-                df_short_res, df_ram_res, df_ram_res1, df_ram_res2, df_ram_res3, df_ram_res4=BatShort.intershort() 
-                if not df_short_res.empty:
-                    df_short_res.to_excel(r'D:\01WorkSpace\python\data_analyze_platform\USER\SPF\alibaba\07BatSafetyWarning\\'+sn+'内短路.xlsx')
-                    # with open(r'D:\01WorkSpace\python\data_analyze_platform\USER\SPF\alibaba\07BatSafetyWarning\内短路.txt','a') as file:
-                    #     file.write(str(df_short_res)+'\n')
-                
-                #静置电压排名..................................................................................................................................................
-                BatUniform=CBMSBatUniform.BatUniform(sn,celltype,df_bms,df_uniform,df_ram_res3,df_lfp_ram_sn1)
-                df_rank_res, df_ram_res3, df_ram_res5=BatUniform.batuniform()
-                if not df_rank_res.empty:
-                    df_uniform=df_rank_res
-                    with open(r'D:\01WorkSpace\python\data_analyze_platform\USER\SPF\alibaba\07BatSafetyWarning\电压排名.txt','a') as file:
-                        file.write(str(df_rank_res)+'\n')
-                
-                #电压离群.....................................................................................................................................................
-                df_voltsigma=VoltStray.main(sn,df_bms,celltype)
-                if not df_voltsigma.empty:
-                    with open(r'D:\01WorkSpace\python\data_analyze_platform\USER\SPF\alibaba\07BatSafetyWarning\电压离群.txt','a') as file:
-                        file.write(str(df_voltsigma)+'\n')
-
-                #ram处理................................................................................................................
-                df_warning_ram=df_warning_ram.drop(df_warning_ram[df_warning_ram.sn==sn].index)
-                df_warning_ram1=df_warning_ram1.drop(df_warning_ram1[df_warning_ram1.sn==sn].index)
-                df_warning_ram2=df_warning_ram2.drop(df_warning_ram2[df_warning_ram2.sn==sn].index)
-                df_warning_ram3=df_warning_ram3.drop(df_warning_ram3[df_warning_ram3.sn==sn].index)
-
-                df_warning_ram=pd.concat([df_warning_ram,df_ram_res],ignore_index=True)
-                df_warning_ram1=pd.concat([df_warning_ram1,df_ram_res1],ignore_index=True)
-                df_warning_ram2=pd.concat([df_warning_ram2,df_ram_res2],ignore_index=True)
-                df_warning_ram3=pd.concat([df_warning_ram3,df_ram_res3],ignore_index=True)
-                
-                if celltype>50:
-                    df_lfp_ram=df_lfp_ram.drop(df_lfp_ram[df_lfp_ram.sn==sn].index)
-                    df_lfp_ram=pd.concat([df_lfp_ram,df_ram_res4],ignore_index=True)
-                    df_lfp_ram1=df_lfp_ram1.drop(df_lfp_ram1[df_lfp_ram1.sn==sn].index)
-                    df_lfp_ram1=pd.concat([df_lfp_ram1,df_ram_res5],ignore_index=True)
-                
-
-            #电池热安全预警..............................................................................................................................................................
-            #读取内短路、析锂和一致性结果数据库数据
-            db='qx_cas'
-            mode=2
-            tablename1='cellstateestimation_intershort'
-            tablename3='cellstateestimation_uniform_socvoltdiff'
-            tablename4='outlier_voltchangeratio'   #电压离群表单
-            DBRead=DBDownload.DBDownload(host, port, db, user, password,mode)
-            with DBRead as DBRead:
-                df_short=DBRead.getdata('time_sp,sn,short_current', tablename=tablename1, sn=sn, timename='time_sp', st=start_time1, sp=end_time)
-                # df_liplated=DBRead.getdata('time,sn,liplated,liplated_amount', tablename=tablename2, sn=sn, timename='time', st=start_time2, sp=end_time)
-                df_uniform=DBRead.getdata('time,sn,cellsoc_diff,cellvolt_diff,cellmin_num,cellmax_num,cellvolt_rank', tablename=tablename3, sn=sn, timename='time', st=start_time2, sp=end_time)
-                df_voltsigma=DBRead.getdata('time,sn,VolOl_Uni,VolChng_Uni', tablename=tablename4, sn=sn, timename='time', st=start_time3, sp=end_time)
-                df_uniform=df_uniform.dropna(axis=0,how='any')
-
-            
-            #获取sn的故障RAM
-            df_fault_ram_sn=df_fault_ram[df_fault_ram['sn']==sn]
-            
-            #热安全预警
-            if df_fault_ram_sn.empty:
-                BatWarning=CBMSSafetyWarning.SafetyWarning(sn,celltype,df_short,df_uniform,df_voltsigma,df_soh)
-                df_warning_res=BatWarning.diag()
-                #当前热失控故障写入数据库
-                if not df_warning_res.empty:
-                    with open(r'D:\00WorkSpace\01Python\data_analyze_platform\USER\alibaba\07BatSafetyWarning\热失控预警.txt','a',encoding="utf-8") as file:
-                        file.write(str(tuple(df_warning_res.iloc[-1]))+'\n')
-            
-            else:
-                fault_time=datetime.datetime.strptime(df_fault_ram_sn.iloc[-1]['start_time'], '%Y-%m-%d %H:%M:%S')
-                if (now_time-fault_time).total_seconds()>3*24*3600:   #df_warning_end历史故障筛选并更改数据库故障结束时间
-                    df_fault_ram_sn['end_time']=end_time
-                    df_fault_ram_sn['Batpos']=1
-                    with open(r'D:\00WorkSpace\01Python\data_analyze_platform\USER\alibaba\07BatSafetyWarning\热失控预警.txt','a',encoding="utf-8") as file:
-                        file.write(str(tuple(df_warning_res.iloc[-1]))+'\n')
-
-            end=time.time()
-            print(end-start)
-
-        except Exception as e:
-            print(repr(e))
-            mylog.logopt(e) 
-
-#...............................................主函数起定时作用.......................................................................................................................
-if __name__ == "__main__":
-    
-    # excelpath=r'D:\Platform\platform_python\data_analyze_platform\USER\spf\01qixiang\sn-20210903.xlsx'
-    # SNdata_6060 = pd.read_excel(excelpath, sheet_name='科易6060')
-    # SNdata_6040 = pd.read_excel(excelpath, sheet_name='科易6040')
-    # SNdata_4840 = pd.read_excel(excelpath, sheet_name='科易4840')
-    # SNdata_L7255 = pd.read_excel(excelpath, sheet_name='格林美-力信7255')
-    # SNdata_C7255 = pd.read_excel(excelpath, sheet_name='格林美-CATL7255')
-    # SNdata_U7255 = pd.read_excel(excelpath, sheet_name='优旦7255')
-    # SNnums_6060=SNdata_6060['SN号'].tolist()
-    # SNnums_6040=SNdata_6040['SN号'].tolist()
-    # SNnums_4840=SNdata_4840['SN号'].tolist()
-    # SNnums_L7255=SNdata_L7255['SN号'].tolist()
-    # SNnums_C7255=SNdata_C7255['SN号'].tolist()
-    # SNnums_U7255=SNdata_U7255['SN号'].tolist()
-    # SNnums=SNnums_L7255 + SNnums_C7255 + SNnums_U7255 + SNnums_6040 + SNnums_4840 + SNnums_6060
-    SNnums=['LS002']
-    
-    mylog=log.Mylog('log_warning.txt','error')
-    mylog.logcfg()
-
-    #............................模块运行前,先读取数据库中所有结束时间为0的数据,需要从数据库中读取...................................
-    df_warning_ram=pd.DataFrame(columns=['sn','time','deltsoc','cellsoc'])
-    df_warning_ram1=pd.DataFrame(columns=['sn','time1','deltsoc1'])
-    df_warning_ram2=pd.DataFrame(columns=['sn','time2','deltAs2'])
-    df_warning_ram3=pd.DataFrame(columns=['sn','time3','standingtime','standingtime1','standingtime2'])
-    df_lfp_ram=pd.DataFrame()
-    df_lfp_ram1=pd.DataFrame()
-
-    now_time=datetime.datetime.strptime('2022-4-29 18:00:00','%Y-%m-%d %H:%M:%S')
-    df_data= pd.read_excel(r'D:\01WorkSpace\项目\Alibaba\data\原始数据_2022-01-10_2022-02-10\力神_LS002.xlsx')
-    df_data['time']=pd.to_datetime(df_data['time'], format='%Y-%m-%d %H:%M:%S')
-
-    #定时任务.......................................................................................................................................................................
-    scheduler = BlockingScheduler()
-    scheduler.add_job(saftywarning_cal, 'interval', seconds=5)
-
-    try:  
-        scheduler.start()
-    except Exception as e:
-        scheduler.shutdown()
-        print(repr(e))
-        mylog.logopt(e)

+ 0 - 12
USER/SPF/alibaba/07BatSafetyWarning/内短路.txt

@@ -1,12 +0,0 @@
-              time_st             time_sp     sn method                                      short_current baltime
-0 2022-04-27 10:03:44 2022-04-28 11:47:32  LS001      2  [-3.377, -1.755, -4.264, -0.871, 2.08, 1.342, ...      {}
-              time_st             time_sp     sn method                                      short_current baltime
-0 2022-04-27 10:03:44 2022-04-28 11:47:32  LS001      2  [-3.377, -1.755, -4.264, -0.871, 2.08, 1.342, ...      {}
-              time_st             time_sp     sn method                                      short_current baltime
-0 2022-04-27 13:00:44 2022-04-28 14:47:20  LS002      3  [5.411, -10.122, 1.269, -2.334, -7.758, 2.321,...      {}
-              time_st             time_sp     sn method                                      short_current baltime
-0 2022-04-27 10:03:46 2022-04-28 11:47:34  LS002      2  [-2.073, -1.778, 2.352, -1.631, -0.45, -1.336,...      {}
-              time_st             time_sp     sn method                                      short_current baltime
-0 2022-04-27 13:00:44 2022-04-28 14:47:20  LS002      3  [5.411, -10.122, 1.269, -2.334, -7.758, 2.321,...      {}
-              time_st             time_sp     sn method                                      short_current baltime
-0 2022-04-27 10:03:46 2022-04-28 11:47:34  LS002      2  [-2.073, -1.778, 2.352, -1.631, -0.45, -1.336,...      {}

+ 0 - 49
USER/SPF/alibaba/07BatSafetyWarning/电压排名.txt

@@ -1,49 +0,0 @@
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:11  LS001           0.9           100          43          63  [47, 23, 3, 14, 33, 48, 49, 50, 60, 69, 53, 54...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-28 11:47:33  LS001           2.4             8           3          63  [7, 28, 2, 31, 43, 41, 32, 39, 38, 66, 51, 53,...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-28 11:47:33  LS001           2.4             8           3          63  [7, 28, 2, 31, 43, 41, 32, 39, 38, 66, 51, 53,...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-28 11:47:33  LS001           2.4             8           3          63  [7, 28, 2, 31, 43, 41, 32, 39, 38, 66, 51, 53,...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-28 11:47:33  LS001           2.4             8           3          63  [7, 28, 2, 31, 43, 41, 32, 39, 38, 66, 51, 53,...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-28 11:47:36  LS002           1.5             5          21          50  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-28 11:47:36  LS002           1.5             5          21          50  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-3 2022-04-27 11:40:11  LS002           4.9             0          38          71  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-2 2022-04-28 11:47:36  LS002           1.5             5          21          50  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-4 2022-04-28 13:15:57  LS002           3.5             0          26          48  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-                 time     sn  cellsoc_diff cellvolt_diff cellmin_num cellmax_num                                      cellvolt_rank
-0 2022-04-27 10:04:15  LS002           0.8            84          33          71  [39, 36, 42, 33, 69, 25, 31, 27, 46, 41, 51, 3...
-1 2022-04-27 11:38:36  LS002           1.5            53          33          71  [29, 30, 45, 35, 69, 26, 34, 32, 48, 37, 55, 3...
-3 2022-04-27 11:40:11  LS002           4.9             0          38          71  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-2 2022-04-28 11:47:36  LS002           1.5             5          21          50  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...
-4 2022-04-28 13:15:57  LS002           3.5             0          26          48  [26, 39, 43, 37, 42, 34, 32, 31, 30, 29, 28, 4...

二進制
USER/SPF/alibaba/08BatCrtl.rar


+ 1 - 1
USER/SPF/alibaba/08BatCrtl/BatParam.py

@@ -94,7 +94,7 @@ class BatParam:
             #下行控制参数
             self.CellDscVolt=3
             self.DscPackSoc=15
-            self.BalGroup=8
+            self.BalGroups=8
             self.BalNums=16
 
         # elif celltype==2: #中恒+华庭18650

+ 0 - 12
USER/SPF/alibaba/08BatCrtl/下行控制.txt

@@ -1,12 +0,0 @@
-(Timestamp('2022-04-28 02:02:48'), 'KPD001', 0, 1)
-(Timestamp('2022-04-28 04:26:10'), 'KPD002', 1, 0)
-(Timestamp('2022-04-28 02:02:48'), 'KPD001', 0, 1)
-(Timestamp('2022-04-28 04:26:10'), 'KPD002', 1, 0)
-(Timestamp('2022-04-28 02:02:48'), 'KPD001', 0, 1)
-(Timestamp('2022-04-28 05:49:29'), 'KPD002', 0, 1)
-(Timestamp('2022-04-28 02:02:48'), 'KPD001', 0, 1)
-(Timestamp('2022-04-28 04:26:10'), 'KPD002', 1, 0)
-(Timestamp('2022-04-28 02:02:48'), 'KPD001', 0, 1)
-(Timestamp('2022-04-28 04:26:10'), 'KPD002', 1, 0)
-(Timestamp('2022-04-28 02:02:48'), 'KPD001', 0, 1)
-(Timestamp('2022-04-28 05:49:29'), 'KPD002', 0, 1)

二進制
USER/SPF/alibaba/Common/__pycache__/DBDownload.cpython-38.pyc