瀏覽代碼

SOH增加观测量

LAPTOP-EG88H5BE\86151 3 年之前
父節點
當前提交
124e7564e9

+ 3 - 3
inc/EmbeddedCoder_inc/BCUDisp.h

@@ -143,9 +143,9 @@ 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[10];
-extern uint16_T test_U1[10];
-extern uint16_T test_U2[10];
+extern uint16_T test_cellCap[cmnc_num_cellUNumMax];
+extern uint16_T test_countEn;
+
 
 
 

+ 1 - 1
src/EmbeddedCoder_src/BCU.c

@@ -142,7 +142,7 @@ void BCU(void)
                     //
                     if (BattWorkStateDelay == 0 && battI == 10000)
                     {
-                        memcpy(appv_V_cellU, battCellU, sizeof(appv_V_cellU));
+                        memcpy(appv_V_cellU, sfmv_V_cellU, sizeof(sfmv_V_cellU));
                     }
 
                     if (ihd_tm_parkTime >= cmnc_tm_parkTime && battI == 10000)

+ 2 - 3
src/EmbeddedCoder_src/BCUDisp.c

@@ -146,7 +146,6 @@ real_T test_UpMin;
 real_T test_UpMax;
 uint16_T test_ekfSoc;
 uint16_T test_ekfSoc0;
-int16_T test_curr[10] ={255};
-uint16_T test_U1[10]={5000};
-uint16_T test_U2[10]={5000};
+uint16_T test_cellCap[cmnc_num_cellUNumMax] ;
+uint16_T test_countEn;
 

+ 2 - 2
src/EmbeddedCoder_src/SOC.c

@@ -530,11 +530,11 @@ void SOC(void)
         fulCntl = 0;
 		if (!cdmd_flg_deltOCVDisable)
 		{
-		    socd_V_disChrgCCV = look1_is16lu16n16tu16_binlcase(sfmd_I_curr,&socm_I_disChrgCor[0],&socm_V_disChrgCor[0],2U) + sfmd_I_curr * (cdmv_ohm_deltR[sfmd_idx_cellUMin]) * 0.001 * 0.1;
+		    socd_V_disChrgCCV = look1_is16lu16n16tu16_binlcase(sfmd_I_curr,&socm_I_disChrgCor[0],&socm_V_disChrgCor[0],2U) + (uint16_T)(sfmd_I_curr * (cdmv_ohm_deltR[sfmd_idx_cellUMin]) * 0.001 * 0.1);
 		}
 		else
 		{
-		     socd_V_disChrgCCV = look1_is16lu16n16tu16_binlcase(sfmd_I_curr,&socm_I_disChrgCor[0],&socm_V_disChrgCor[0],2U);
+		    socd_V_disChrgCCV = look1_is16lu16n16tu16_binlcase(sfmd_I_curr,&socm_I_disChrgCor[0],&socm_V_disChrgCor[0],2U);
 		}
 		
         if (sfmd_V_cellUMin <= socd_V_disChrgCCV)

+ 2 - 2
src/EmbeddedCoder_src/SOH.c

@@ -103,7 +103,7 @@ void SOH(void)
         {
             sohn_flg_countEn = false;
         }
-        
+        test_countEn = sohn_flg_countEn;
 		//=======================================================================================
         //------------------------SOH 计算-------------------------------------------------------
         //=======================================================================================
@@ -116,7 +116,7 @@ void SOH(void)
                 soc1[i] =  look1_iu16lu16n16tu16_binlcase(sohn_V_chrgStartStatEE[i],(&(cmnm_V_ocv[0])), (&(cmnm_pct_soc[0])), 12U);
                 deltSoc[i] = soc2[i] - soc1[i];
                 sohv_Q_cellCapArrEo[i] = (uint16_T)( (real_T)(sohn_Q_chrgEE * 0.1) / (real_T)(deltSoc[i]  * 0.1/100)  * 10);
-				
+				test_cellCap[i] = sohv_Q_cellCapArrEo[i];
                 if( (int16_T)(sohv_Q_cellCapArrEo[i]) - sohn_Q_cellCapArrEE[i] > sohc_Q_updateDeltThr  ||  (int16_T)(sohv_Q_cellCapArrEo[i]) - sohn_Q_cellCapArrEE[i] < -sohc_Q_updateDeltThr  )
                 {
                     sohn_flg_update = false;

+ 2 - 2
src/EmbeddedCoder_src/SPM.c

@@ -14,14 +14,14 @@ void SPM_Init(void)
 void SPM(void)
 {
   static uint16_T spmd_Nr_cellNr;
-  uint8_T Feq = 10;
+  uint8_T Feq = 30;
   if (FirstRun_SPM)
   {
     spmd_Nr_cellNr = 0;
     cand_Nr_cellNr = 1;
   }
   spmd_Nr_cellNr = spmd_Nr_cellNr + 1;
-  if (spmd_Nr_cellNr % (10 * Feq) == 0)
+  if (spmd_Nr_cellNr % Feq == 0)
   {
     cand_Nr_cellNr ++;
   }