소스 검색

增加观测

LAPTOP-EG88H5BE\86151 2 년 전
부모
커밋
393f538e6d
5개의 변경된 파일12개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 2
      inc/EmbeddedCoder_inc/BCUDisp.h
  2. 4 2
      src/AppTaskTcp.c
  3. 2 1
      src/EmbeddedCoder_src/BCUDisp.c
  4. 1 1
      src/EmbeddedCoder_src/CDM.c
  5. 2 1
      src/EmbeddedCoder_src/PIM.c

+ 3 - 2
inc/EmbeddedCoder_inc/BCUDisp.h

@@ -178,6 +178,7 @@ extern uint16_T  pimv_pct_cellSoc[cmnc_num_cellUNumMax];
 extern boolean_T pimv_flg_inval[cmnc_num_cellUNumMax];
 
 extern uint16_T test_cellCap[cmnc_num_cellUNumMax];
-extern uint16_T test_countEn;
-extern int16_T  test_deltU;
+extern real_T test_U1;
+extern real_T test_U[cmnc_num_cellUNumMax];
+
 

+ 4 - 2
src/AppTaskTcp.c

@@ -583,13 +583,15 @@ static void TcpDataInfoAssembleSend()
                                 %d,%d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d,,\
                                 %d,%d,%d,%d,%d,%d,,\
-                                %d,%d,%d",
+                                %d,%d,%d,,\
+                                %f,%f,%f,%f",
                 socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_battSoc, socd_pct_vcuSoc,
                 sfmd_I_curr, maxCellVol, minCellVol, sfmv_V_cellU[0], sfmv_V_cellU[1], sfmv_V_cellU[2],
                 cand_idx_cellNr, cand_Q_cellCap, ihd_tm_parkTime, sohd_Q_chrgEo,iscv_Q_remainCpEi[cand_idx_cellNr-1],iscd_tm_totalEi,
                 pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar,
                 pimv_V_cellOcv[0], pimv_V_cellOcv[1], pimv_V_cellOcv[2], pimv_R_cellOhm[0], pimv_R_cellOhm[1], pimv_R_cellOhm[2],
-                iscd_flg_flt[0],iscd_flg_flt[1],iscd_flg_flt[2]);
+                iscd_flg_flt[0],iscd_flg_flt[1],iscd_flg_flt[2],
+                test_U1,test_U[0],test_U[1],test_U[2]);
         if (Debugcounter % 5 == 0)
         {
             sprintf((char *)rbuf + strlen(rbuf), ",A-%x,%d,%d,%x,%x,,%d,%d,,%x,%d",

+ 2 - 1
src/EmbeddedCoder_src/BCUDisp.c

@@ -176,7 +176,8 @@ uint16_T   pimv_pct_cellSoc[cmnc_num_cellUNumMax];
 boolean_T  pimv_flg_inval[cmnc_num_cellUNumMax];
 
 uint16_T test_cellCap[cmnc_num_cellUNumMax];
-uint16_T test_countEn;
+real_T test_U1;
+real_T test_U[cmnc_num_cellUNumMax];
 
 
 

+ 1 - 1
src/EmbeddedCoder_src/CDM.c

@@ -120,7 +120,7 @@ void CDM(void)
 			
 			deltaE[i] = theta[0];
             deltaR[i] = theta[1];
-			
+			test_U[i] = arf;
 			cdmv_V_deltOCV[i] = (int16_T)(deltaE[i]  * 1000);
             cdmv_R_deltOhm[i] = (int16_T)(deltaR[i]  * 1000 * 1000);
         }

+ 2 - 1
src/EmbeddedCoder_src/PIM.c

@@ -98,6 +98,7 @@ void PIM(void)
         //参数更新
         
         temp = (real_T)pimn_V_volt[pimd_L_rls - 1] * 0.001 - (theta[0] * A[0] + theta[1] * A[1] + theta[2] * A[2] + theta[3] * A[3]);
+		test_U1 =temp;
 		if (temp > 0.03 || temp < -0.03)
 		{
              pimn_flg_inval = 1;
@@ -191,7 +192,7 @@ void PIM(void)
 	//全部单体参数---------------------
     for(i = 0;i < cmnc_num_cellUNum;i++)
     {
-        if(!pimn_flg_inval && !cdmv_flg_inval[i])
+        if((!pimn_flg_inval && !cdmv_flg_inval[i]) || 1)
         {
             pimv_flg_inval[i]   = 0;
             pimv_V_cellOcv[i]   = pimd_V_ocv + cdmv_V_deltOCV[i];