Browse Source

增加CDM的 测试观测信号

LAPTOP-EG88H5BE\86151 3 years ago
parent
commit
ab06e3338c
3 changed files with 17 additions and 0 deletions
  1. 4 0
      inc/EmbeddedCoder_inc/BCUDisp.h
  2. 2 0
      src/EmbeddedCoder_src/BCUDisp.c
  3. 11 0
      src/EmbeddedCoder_src/CDM.c

+ 4 - 0
inc/EmbeddedCoder_inc/BCUDisp.h

@@ -142,4 +142,8 @@ extern uint16_T test_efkSocMin;
 extern uint16_T test_efkSocMax;
 extern real_T test_UpMin;
 extern real_T test_UpMax;
+extern int16_T test_curr;
+extern uint16_T test_U;
+
+
 

+ 2 - 0
src/EmbeddedCoder_src/BCUDisp.c

@@ -144,4 +144,6 @@ real_T test_UpMin;
 real_T test_UpMax;
 uint16_T test_ekfSoc;
 uint16_T test_ekfSoc0;
+int16_T test_curr;
+uint16_T test_U;
 

+ 11 - 0
src/EmbeddedCoder_src/CDM.c

@@ -25,6 +25,7 @@ void CDM(void)
     static uint8_T ihd_st_workStat_Delay;
 	static int16_T sfmd_I_curr_Delay;
 	static uint8_T Cnt;
+	
     //
     if(ihd_st_workStat_Delay == 2 && ihd_st_workStat != 2)
     {
@@ -46,6 +47,8 @@ void CDM(void)
 			deltaES[i] = 0;
             deltaRS[i] = 0;
 			Cnt = 0;
+			test_curr =0;
+			test_U=5000;
         }
     }
     //
@@ -92,6 +95,14 @@ void CDM(void)
                  cdmv_ohm_deltR[i] = (int16_T) (deltaRS[i]/Cnt  * 1000 * 1000);
 			     deltaES[i] = 0;
                  deltaRS[i] = 0;
+
+				 if(deltaR[i] > 5000 &&test_U==5000)
+				 {
+                    test_curr = ihd_I_curr;
+                    test_U =ihv_V_cellU[i];
+				 }
+
+				
              }
 		     Cnt = 0;
 		}