ソースを参照

更新1级故障为0级

qingfeng 2 年 前
コミット
744d1a3902

+ 6 - 6
LIB/MIDDLE/CellStateEstimation/BatDiag/V1_0_0/CBMSBatDiag.py

@@ -289,7 +289,7 @@ class BatDiag:
                 
                 #电芯过压.............................................................................................................................................
                 if not 'C501' in list(self.df_diag_ram['code']):  #当前故障中没有该故障,则判断是否发生该故障
-                    if cellvoltmax2>self.param.CellOvLv2 and cellvoltmax1>self.param.CellOvLv2:  #二级过压进入
+                    if cellvoltmax2>self.param.CellOvLv2 and cellvoltmax1>self.param.CellOvLv2 and self.packcrnt[i]<0:  #二级过压进入
                         cov_time=cov_time+(time2-time1).total_seconds()
                         if cov_time>self.param.volt_time:
                             time=self.bmstime[i]
@@ -338,7 +338,7 @@ class BatDiag:
                         if cdv_time>self.param.volt_time:
                             time=self.bmstime[i]
                             code='C104'
-                            faultlv=3
+                            faultlv=0
                             faultinfo='电芯{}和{}压差大'.format(cellvolt1.index(cellvoltmax1)+1,cellvolt1.index(cellvoltmin1)+1)
                             faultadvice='技术介入诊断'
                             self.df_diag_ram.loc[len(self.df_diag_ram)]=[time, end_time, self.sn, code, faultlv, faultinfo, faultadvice]
@@ -381,7 +381,7 @@ class BatDiag:
 
             if packvoltvalid==1:
                 if not 'C502' in list(self.df_diag_ram['code']):  #当前故障中没有该故障,则判断是否发生该故障
-                    if packvolt1>self.param.PackVoltOvLv2 and packvolt2>self.param.PackVoltOvLv2:   #电池包过压二级进入
+                    if packvolt1>self.param.PackVoltOvLv2 and packvolt2>self.param.PackVoltOvLv2 and self.packcrnt[i]<0:   #电池包过压二级进入
                         pov_time=pov_time+(time2-time1).total_seconds()
                         if pov_time>self.param.volt_time:
                             time=self.bmstime[i]
@@ -587,7 +587,7 @@ class BatDiag:
                         if abs(bmssoc_now-bmssoc_st)<self.param.SocClamp:   #SOC卡滞故障进入
                             time=self.bmstime[i]
                             code='C106'
-                            faultlv=1
+                            faultlv=0
                             faultinfo='电池SOC卡滞'
                             faultadvice='技术介入诊断,检修电池BMS软件'
                             self.df_diag_ram.loc[len(self.df_diag_ram)]=[time, end_time, self.sn, code, faultlv, faultinfo, faultadvice]
@@ -611,7 +611,7 @@ class BatDiag:
                     if step<70 and abs(bmssoc_now-bmssoc_last)>self.param.SocJump:  #SOC跳变进入
                         time=self.bmstime[i]
                         code='C107'
-                        faultlv=1
+                        faultlv=0
                         faultinfo='电池SOC跳变{}%'.format(bmssoc_now-bmssoc_last)
                         faultadvice='技术介入诊断,检修电池BMS软件'
                         self.df_diag_ram.loc[len(self.df_diag_ram)]=[time, end_time, self.sn, code, faultlv, faultinfo, faultadvice]
@@ -631,7 +631,7 @@ class BatDiag:
                 if cellsoc_diff>self.param.SocDiff: #SOC一致性差故障进入
                     time=self.bmstime[0]
                     code='C201'
-                    faultlv=2
+                    faultlv=0
                     faultinfo='电芯{}和{}SOC差过大:{}'.format(int(self.df_uniform.loc[0,'cellmin_num']),int(self.df_uniform.loc[0,'cellmax_num']),cellsoc_diff)
                     faultadvice='技术介入诊断'
                     self.df_diag_ram.loc[len(self.df_diag_ram)]=[time, end_time, self.sn, code, faultlv, faultinfo, faultadvice]