|
@@ -127,9 +127,9 @@ class SafetyWarning:
|
|
|
#获取压降最大电芯的最近一次压降值
|
|
|
try:
|
|
|
deltvolt_last = eval(df_short1.iloc[-1]['short_current'])
|
|
|
- deltvolt_last = np.array(deltvolt_last[i])
|
|
|
+ deltvolt_last = list(deltvolt_last[i])
|
|
|
except:
|
|
|
- deltvolt_last = np.array([0]*self.param.CellVoltNums)
|
|
|
+ deltvolt_last = ([0]*self.param.CellVoltNums)
|
|
|
|
|
|
# 故障判断:1.压降累计最大>6mV,次大<3mV,2.最近一次对应电芯的压降>3mV,且离群
|
|
|
# if min(deltvolt_rst)<-10:
|
|
@@ -140,13 +140,13 @@ class SafetyWarning:
|
|
|
# cellshortfault1=1
|
|
|
# cellshort_num= list(np.where(deltvolt_last<-10)[0]+1)
|
|
|
# break
|
|
|
- if min(deltvolt_rst)<-6:
|
|
|
+ if min(deltvolt_rst)<-8:
|
|
|
deltvolt_rst1=list(deltvolt_rst)
|
|
|
deltvolt_min_index = deltvolt_rst1.index(min(deltvolt_rst))
|
|
|
- deltvolt_last_list = list(deltvolt_last)
|
|
|
+ deltvolt_last_list = deltvolt_last.copy()
|
|
|
deltvolt_last_list.pop(deltvolt_min_index)
|
|
|
deltvolt_rst1.remove(min(deltvolt_rst))
|
|
|
- if min(deltvolt_rst1)>-3 and deltvolt_last_list[deltvolt_min_index]<-3 and min(deltvolt_last_list)>-2.5:
|
|
|
+ if min(deltvolt_rst1)>-4 and deltvolt_last[deltvolt_min_index]<-4 and min(deltvolt_last_list)>-3:
|
|
|
cellshortfault1=1
|
|
|
cellshort_num=deltvolt_min_index+1
|
|
|
break
|