Bläddra i källkod

1.bug更新,滤除静置最后一个时刻点的数据

qingfeng 3 år sedan
förälder
incheckning
6f4dfa5d75

+ 2 - 2
LIB/MIDDLE/CellStateEstimation/InterShort/V1_0_0/CBMSBatInterShort.py

@@ -232,7 +232,7 @@ class BatInterShort:
                 else:
                     pass
 
-                if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1:     
+                if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1 and abs(self.packcrnt[i+1]) < 0.1:     
                     delttime=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
                     standingtime=standingtime+delttime
                     standingtime1=standingtime1+delttime
@@ -374,7 +374,7 @@ class BatInterShort:
                 else:
                     pass
 
-                if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1:     
+                if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1 and abs(self.packcrnt[i+1]) < 0.1:     
                     delttime=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
                     standingtime=standingtime+delttime
                     standingtime1=standingtime1+delttime

+ 2 - 2
LIB/MIDDLE/CellStateEstimation/SOH/V1_0_0/CBMSBatSoh.py

@@ -290,7 +290,7 @@ class BatSoh:
         standingtime=0
         for i in range(3,len(self.df_bms)-3):
 
-            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1:     #电流为0
+            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1 and abs(self.packcrnt[i+1]) < 0.1:     #电流为0
                 delttime=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
                 standingtime=standingtime+delttime
                 self._celltemp_weight(i)     #获取不同温度对应的静置时间
@@ -469,7 +469,7 @@ class BatSoh:
         for i in range(3,len(self.df_bms)-3):
 
             #获取两点法法所需数据-开始.................................................................................................................
-            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1:     #判断非平台区静置状态
+            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1 and abs(self.packcrnt[i+1]) < 0.1:     #判断非平台区静置状态
                 delttime=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
                 standingtime=standingtime+delttime
                 self._celltemp_weight(i)     #获取不同温度对应的静置时间

+ 7 - 7
LIB/MIDDLE/CellStateEstimation/Uniform/V1_0_0/CBMSBatUniform.py

@@ -44,7 +44,7 @@ class BatUniform:
         if self.celltype==99:
             if min(celltemp)>=20:
                 self.tempweight=1
-                self.StandardStandingTime=1800
+                self.StandardStandingTime=2400
             elif min(celltemp)>=10:
                 self.tempweight=0.6
                 self.StandardStandingTime=3600
@@ -57,10 +57,10 @@ class BatUniform:
         else:
             if min(celltemp)>=20:
                 self.tempweight=1
-                self.StandardStandingTime=1200
+                self.StandardStandingTime=1800
             elif min(celltemp)>=10:
                 self.tempweight=0.8
-                self.StandardStandingTime=1800
+                self.StandardStandingTime=2400
             elif min(celltemp)>=5:
                 self.tempweight=0.6
                 self.StandardStandingTime=3600
@@ -165,7 +165,7 @@ class BatUniform:
 
         for i in range(1,len(self.df_bms)-2):
 
-            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1:     #电流为0
+            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1 and abs(self.packcrnt[i+1]) < 0.1:     #电流为0
                 delttime=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
                 standingtime=standingtime+delttime
                 self._celltemp_weight(i)     #获取不同温度对应的静置时间
@@ -242,7 +242,7 @@ class BatUniform:
         for i in range(3,len(self.df_bms)-3):
 
             #静置电压法计算电芯一致性
-            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1:     #电流为0
+            if abs(self.packcrnt[i]) < 0.1 and abs(self.packcrnt[i-1]) < 0.1 and abs(self.packcrnt[i+1]) < 0.1:     #电流为0
                 delttime=(self.bmstime[i]-self.bmstime[i-1]).total_seconds()
                 standingtime=standingtime+delttime
                 self._celltemp_weight(i)     #获取不同温度对应的静置时间
@@ -253,7 +253,7 @@ class BatUniform:
                     cellvolt_max=max(cellvolt_now)
                     if abs(self.packcrnt[i+2]) >= 0.1:     
                         standingtime=0  
-                        if 2 < cellvolt_max < self.param.OcvInflexionBelow:                 
+                        if 2 < cellvolt_max < self.param.OcvInflexionBelow-0.002:                 
                             cellmin_num=cellvolt_now.index(cellvolt_min)+1
                             cellmax_num=cellvolt_now.index(cellvolt_max)+1
                             cellsoc_min=np.interp(cellvolt_min,self.param.LookTab_OCV,self.param.LookTab_SOC)
@@ -265,7 +265,7 @@ class BatUniform:
                             df_res.loc[len(df_res)]=[self.bmstime[i], self.sn, cellsoc_diff, cellvolt_diff, cellmin_num, cellmax_num]
                     elif i>=len(self.df_bms)-4:
                         standingtime=0
-                        if 2 < cellvolt_max < self.param.OcvInflexionBelow:
+                        if 2 < cellvolt_max < self.param.OcvInflexionBelow-0.002:
                             cellmin_num=cellvolt_now.index(cellvolt_min)+1
                             cellmax_num=cellvolt_now.index(cellvolt_max)+1
                             cellsoc_min=np.interp(cellvolt_min,self.param.LookTab_OCV,self.param.LookTab_SOC)