Browse Source

PIM修改1

LAPTOP-EG88H5BE\86151 2 years ago
parent
commit
b8178f2fa9
2 changed files with 9 additions and 9 deletions
  1. 1 1
      src/EmbeddedCoder_src/BCUCal.c
  2. 8 8
      src/EmbeddedCoder_src/PIM.c

+ 1 - 1
src/EmbeddedCoder_src/BCUCal.c

@@ -15,7 +15,7 @@ const uint16_T cmnm_R_ohm[13] = {2364U, 2284U, 2234U, 2166U, 2128U, 2111U, 2090U
 const uint16_T cmnm_R_polar[13] = {4955U, 2073U, 1504U, 1197U, 1098U, 1072U, 1141U, 1700U, 1637U, 1626U, 1496U, 1486U, 1436U};             /* 电池放电参数的Rp数组; */
 const uint16_T cmnm_V_ocv[13] = {3327U, 3453U, 3487U, 3563U, 3617U, 3652U, 3700U, 3791U, 3897U, 4006U, 4129U, 4197U, 4276U};               /* 电池放电参数的OCV数组; */
 const uint16_T cmnm_pct_soc[13] = {0U, 50U, 100U, 200U, 300U, 400U, 500U, 600U, 700U, 800U, 900U, 950U, 1000U};                            /* 电池放电参数的SOC数组; */
-const uint16_T cmnc_V_disChrgLim = 2800U;
+const uint16_T cmnc_V_disChrgLim = 2900U;
 const uint16_T cmnc_V_chrgFul = 4200U; /* 充满电的截至电压; */
 const uint16_T cmnm_R_voloffset[28] = {0, 0, 0, 0, 0,
                                        0, 770, 0, 0, 0,

+ 8 - 8
src/EmbeddedCoder_src/PIM.c

@@ -41,10 +41,10 @@ void PIM(void)
         pimn_M_P[2][0] =  0; pimn_M_P[2][1] =  0;  pimn_M_P[2][2] = 10;  pimn_M_P[2][3] =  0;
         pimn_M_P[3][0] =  0; pimn_M_P[3][1] =  0;  pimn_M_P[3][2] =  0;  pimn_M_P[3][3] = 10;
         
-        pimn_V_ocv   = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_V_ocv, 13) * 0.001;
-        pimn_R_ohm   = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_R_ohm, 13) * 0.001 * 0.001;
-        pimn_R_polar = 0.001;
-        pimn_F_polar = 0;
+        pimn_V_ocv   = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_V_ocv,   13) * 0.001;
+        pimn_R_ohm   = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_R_ohm,   13) * 0.001 * 0.001;
+        pimn_R_polar = (real_T)look1_u16tu16(socd_pct_battSoc, cmnm_pct_soc, cmnm_R_polar, 13) * 0.001 * 0.001;;
+        pimn_F_polar = 5;
         pimn_N_ctn = 0;  
 		pimn_st_workStat_Delay = 0;
     }
@@ -162,10 +162,10 @@ void PIM(void)
         pimn_R_polar = (theta[0] * theta[1] -theta[2])/(1 -theta[0]);
         pimn_F_polar = -1/log(theta[0]);
 
-        pimn_V_ocv   = Saturation_r(pimn_V_ocv,3.2, 4.4);
-		pimn_R_ohm   = Saturation_r(pimn_V_ocv,0.001, 1);
-		pimn_R_polar = Saturation_r(pimn_V_ocv,0.0002, 1);
-		pimn_F_polar = Saturation_r(pimn_V_ocv,0, 200);
+        //pimn_V_ocv   = Saturation_r(pimn_V_ocv,3.2, 4.4);
+		//pimn_R_ohm   = Saturation_r(pimn_V_ocv,0.001, 1);
+		//pimn_R_polar = Saturation_r(pimn_V_ocv,0.0002, 1);
+		//pimn_F_polar = Saturation_r(pimn_V_ocv,0, 200);