فهرست منبع

Merge remote-tracking branch 'QX/V3-7250-QTF' into V3-V31XX-7250

CHENJIE-PC\QiXiang_CHENJIE 2 سال پیش
والد
کامیت
a6cc905b19
5فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 1 0
      inc/EmbeddedCoder_inc/BCUDisp.h
  2. 2 2
      src/AppTaskTcp.c
  3. 1 0
      src/EmbeddedCoder_src/BCUDisp.c
  4. 2 0
      src/EmbeddedCoder_src/PIM.c
  5. 2 2
      src/EmbeddedCoder_src/SOP.c

+ 1 - 0
inc/EmbeddedCoder_inc/BCUDisp.h

@@ -174,6 +174,7 @@ extern uint16_T pimd_F_polar;
 
 extern uint16_T test_cellCap[cmnc_num_cellUNumMax];
 extern uint16_T test_countEn;
+extern int16_T test_deltU;
 
 
 


+ 2 - 2
src/AppTaskTcp.c

@@ -580,12 +580,12 @@ static void TcpDataInfoAssembleSend()
             sprintf((char *)rbuf, "B-%d,%d,%d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d,%d,%d,,\
-                                %d,%d,%d,%d,,\
+                                %d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d",
                     socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_battSoc, socd_pct_vcuSoc, socd_pct_cellBattSoc, sohv_Q_packCapArrEo[9], cdmv_ohm_deltR[cand_idx_cellNr - 1],
                     sfmd_I_curr, maxCellVol, minCellVol, sfmd_V_cellUAvrg, sfmv_V_cellU[1],
                     cand_idx_cellNr, cand_Q_cellCap, cand_V_chrgStartStat, ihd_tm_parkTime, sohd_Q_chrgEo, sohd_flg_chrgEndEo,
-                    pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar,
+                    pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar,test_deltU,
                     sopd_I_chrgCurrMax,sopd_P_chrgPMax,sopd_I_disChrgCurrMax,sopd_P_disChrgPMax);
         }
         Debugcounter++;

+ 1 - 0
src/EmbeddedCoder_src/BCUDisp.c

@@ -176,4 +176,5 @@ uint16_T pimd_F_polar;
 
 uint16_T test_cellCap[cmnc_num_cellUNumMax] ;
 uint16_T test_countEn;
+int16_T test_deltU;
 

+ 2 - 0
src/EmbeddedCoder_src/PIM.c

@@ -94,7 +94,9 @@ void PIM(void)
             K[i] = (pimn_M_P[i][0] * A[0] + pimn_M_P[i][1] * A[1] + pimn_M_P[i][2] * A[2] + pimn_M_P[i][3] * A[3])/(1 + temp);
         }
         //参数更新
+        
         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_deltU = (int16_T)(temp * 1000);
         for(i = 0;i < 4;i++)
         {
             theta[i] = theta[i] + K[i] * temp;

+ 2 - 2
src/EmbeddedCoder_src/SOP.c

@@ -29,7 +29,7 @@ void SOP(void)
     Rp  = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_R_polar,13) * 0.001 * 0.001;
     RC  = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_F_polar,13) * 0.001;
 	//printf("%f %f  %f  %f\n",ocv,Ro,Rp,RC);
-    //sopn_V_up = (real_T)sfmd_V_cellUAvrg * 0.001 - ocv - (real_T)sfmd_I_curr * 0.1 * Ro;
+    sopn_V_up = (real_T)sfmd_V_cellUAvrg * 0.001 - ocv - (real_T)sfmd_I_curr * 0.1 * Ro;
     //printf("soc:%d,I:%d,up:%f\n",socd_pct_battSoc,sfmd_I_curr,sopn_V_up);
     //充电功率
     sopn_I_currPred = 0;
@@ -119,7 +119,7 @@ void SOP(void)
     sopd_P_disChrgPMax = (uint16_T)(- sopn_V_battU * sopn_I_currPred);
     
     
-    sopn_V_up = sopn_V_up * exp(-1/RC) + Rp * (1 - exp(-1/RC)) * sfmd_I_curr;
+    //sopn_V_up = sopn_V_up * exp(-1/RC) + Rp * (1 - exp(-1/RC)) * sfmd_I_curr;
     sopd_flg_firstRun = false;
 }