Advanced SOC Estimation for Energy Storage Cells in Photovoltaic Agricultural Systems

As an agricultural nation, the deep integration of information technology and agriculture has become an inevitable trend in the development of modern agriculture. Digital agricultural information perception, scientific management decision-making, and intelligent agricultural equipment have emerged as crucial pathways to enhance the quality of agricultural products and improve production efficiency. Photovoltaic agriculture, as an emerging agricultural form, applies solar power generation to modern agricultural practices such as planting, breeding, irrigation, pest control, and agricultural machinery. A common example is the “power generation on the shed, planting under the shed” photovoltaic agricultural greenhouse system. This system primarily consists of photovoltaic arrays, energy storage systems, and greenhouse electrical equipment, providing power for smart agricultural monitoring facilities and low-power agricultural devices like temperature control, irrigation, and lighting supplements. However, the randomness and intermittency of solar energy in practical use significantly affect its utilization efficiency. To enhance the reliability of solar power supply and improve power quality, the concept of optical storage microgrids has emerged.

The state of charge (SOC) estimation of energy storage cells is particularly critical in photovoltaic agricultural systems. Energy storage cells serve as key components in optical storage DC microgrids, ensuring stable operation and reducing agricultural production costs. Accurate SOC estimation is essential for rational utilization of energy storage cells, improving the reliability and efficiency of the entire energy storage system. In recent years, research on SOC estimation for energy storage cells has focused on two main aspects: improving estimation algorithms and enhancing parameter identification methods for lithium battery equivalent circuit models. Among these, the Extended Kalman Filter (EKF) and its derived algorithms have become a research hotspot. This study proposes a joint method using a Variable Forgetting Factor Recursive Least Squares (VFFRLS) algorithm for online parameter identification and an Adaptive Extended Kalman Filter (AEKF) for SOC estimation, demonstrating high accuracy and robustness.

Energy storage technology is pivotal in photovoltaic-based agricultural systems. Currently, energy storage technologies can be categorized into mechanical energy storage, electrochemical energy storage, electrical energy storage, and thermal energy storage. Among these, electrochemical energy storage has shown promising application prospects in recent years, primarily including all-vanadium flow batteries, lead-carbon batteries, and lithium-ion batteries. The technical and economic indicators of these energy storage cells are summarized in Table 1.

Table 1: Technical and Economic Indicators of Electrochemical Energy Storage Systems
Indicator Lithium-ion Battery All-Vanadium Flow Battery Lead-Carbon Battery
Energy Density (Wh/kg) 70–200 30 40
Power Density (W/kg) 1000 33 300
Energy Efficiency (%) 85–98 60–75 80–90
Fastest Charging Time 15 min 2 h 5 h
Cycle Life (cycles) 2000–10000 5000–10000 2000–4000
Cost (USD/kWh) 200–600 450–600 125–180

From Table 1, it is evident that lithium-ion batteries outperform all-vanadium flow batteries and lead-carbon batteries in terms of energy density, power density, energy efficiency, and rate performance. Additionally, the cycle life and cost of lithium-ion batteries fall between those of all-vanadium flow batteries and lead-carbon batteries, making lithium-ion batteries the optimal technical choice for energy storage modules. However, while energy storage cells effectively ensure the stable operation of photovoltaic DC microgrids, irregular charging and discharging can accelerate their lifespan degradation, often leading to premature failure and increased costs. The energy storage unit comprises multiple lithium battery components connected in series or parallel, which are then combined into an energy storage system. In such systems, SOC is a primary indicator of the energy storage station’s power capacity and a key parameter in the power control strategy of optical storage microgrids. Incorporating SOC-based control strategies not only protects the battery but also smooths output power fluctuations.

To achieve rational utilization of energy storage cells and enhance the reliability and efficiency of the energy storage system, accurate SOC estimation is imperative. This study focuses on lithium iron phosphate energy storage cells, with specific technical parameters listed in Table 2.

Table 2: Technical Parameters of the Single Cell
Battery Type Lithium Iron Phosphate Battery
Rated Capacity 24 Ah
Rated Voltage 3.4 V
Upper Cut-off Voltage 3.6 V
Lower Cut-off Voltage 2.5 V

Energy Storage Lithium Battery Model Establishment and Parameter Identification

Currently, commonly used equivalent circuit models for lithium-ion batteries include electrochemical models, black-box models, and equivalent circuit models. Among these, equivalent circuit models better reflect the dynamic changes of the battery, with simple structures and easily adjustable parameters. To better characterize the dynamic performance of lithium batteries, this study selects a second-order RC circuit as the battery equivalent model, as shown in Figure 2. This model offers better dynamic performance compared to first-order RC models, separately equivalentizing the battery’s electrochemical polarization and concentration polarization into two parts, resulting in higher accuracy. Moreover, its complexity is moderate, facilitating parameter identification, and it is often combined with Kalman filter-based algorithms for SOC estimation of lithium batteries.

The second-order RC equivalent model consists of two parallel networks: R1 and C1 represent the electrochemical polarization effect, while R2 and C2 represent the concentration polarization effect. R1 and R2 are polarization resistances, C1 and C2 are polarization capacitances, R0 is the battery’s ohmic internal resistance, UOC represents the open-circuit voltage, UL denotes the terminal voltage, and I is the current flowing through the battery. According to Kirchhoff’s laws, the equations for the equivalent circuit model can be derived as follows:

$$ i_L = \frac{U_1}{R_1} + C_1 \frac{dU_1}{dt} $$
$$ i_L = \frac{U_2}{R_2} + C_2 \frac{dU_2}{dt} $$
$$ U_L = U_{OC} – I R_0 – U_1 – U_2 $$

Accurately obtaining the SOC-OCV characteristic curve is a key step in estimating the SOC of energy storage cells. Using a constant temperature and constant voltage charging method, the battery is fully charged and left to rest for 1 hour. Then, a 0.2C constant current intermittent discharge test is performed on the fully charged lithium battery, with a discharge time of 30 minutes, followed by a 1-hour rest period. This cycle is repeated until the battery voltage drops to the discharge cut-off voltage. Based on this test, the terminal voltage values at different states of charge can be obtained. After resting for a period, the battery’s terminal voltage approximates the open-circuit voltage OCV. To achieve a better fit while reducing computational load, a sixth-order polynomial is used to fit the relationship between SOC and OCV, as shown in Figure 3. The polynomial fitting coefficients and the squared correlation coefficient between the data points and the fitted values is 0.9964, indicating high accuracy of the sixth-order fit without complicating the calculation process. The resulting sixth-order polynomial is:

$$ OCV = 1.225SOC^6 + 12.21SOC^5 – 38.51SOC^4 + 40.69SOC^3 – 19.38SOC^2 + 4.264SOC + 2.926 $$

Photovoltaic power generation is highly intermittent, and the grid must respond to emergencies, necessitating real-time updates of energy storage cell model parameters. The commonly used FFRLS algorithm, while simple to program, fast in convergence, and low in computational cost, struggles with fixed forgetting factors to adapt to the random operating conditions of energy storage cells, leading to poor parameter identification results. Therefore, this study employs the VFFRLS algorithm for real-time parameter identification. The value of the variable forgetting factor depends on the magnitude of the identification error and adapts accordingly. In 1991, Park D.J. et al. proposed a method for a variable forgetting factor:

$$ \lambda_k = \lambda_{\text{min}} + (1 – \lambda_{\text{min}}) \cdot 2^{L_k} $$

where $\lambda_k$ is the variable forgetting factor, $\lambda_{\text{min}}$ is the minimum value of the forgetting factor. The larger the error, the closer the forgetting factor is to the minimum value; the smaller the error, the closer the forgetting factor is to 1. Using data windowing theory, the forgetting factor’s size is determined by the mean square error of a limited number of data points over a period, thereby improving algorithm stability.

$$ L_k = -\rho \frac{\sum_{i=k-M+1}^{k} e_i e_i^T}{M} $$

Here, $e_i$ is the estimation error at time i, and M is the window size. The specific process of the VFFRLS algorithm is as follows:

  1. Initialization: $\hat{\theta}_k$, $\phi_k$, $P_k$, $\lambda_{\text{min}}$, $\rho$, M
  2. Calculate the forgetting factor:
    $$ e_k = y_k – \phi_k^T \hat{\theta}_{k-1} $$
    $$ L_k = -\rho \frac{\sum_{i=k-M+1}^{k} e_i e_i^T}{M} $$
    $$ \lambda_k = \lambda_{\text{min}} + (1 – \lambda_{\text{min}}) \cdot 2^{L_k} $$
  3. Calculate the least squares estimate at time k:
    $$ \hat{\theta}_k = \hat{\theta}_{k-1} + K_k e_{k-1} $$
  4. Calculate the gain matrix:
    $$ K_k = \frac{P_{k-1} \phi_k}{\lambda_k + \phi_k^T P_{k-1} \phi_k} $$
  5. Calculate the covariance matrix:
    $$ P_k = \frac{P_{k-1} – K_k \phi_k^T P_{k-1}}{\lambda_k} $$
  6. Repeat steps 2–5.

In the above, $\hat{\theta}(k)$ is the estimated vector for parameter identification, $\phi(k)$ is the system observation data, $P(k)$ is the covariance matrix, $y(k)$ is the actual system output, and $K(k)$ is the estimation gain matrix. The initial value of the forgetting factor $\lambda_{\text{min}}$ in this study is set to 0.99. When using the VFFRLS algorithm for parameter identification, the second-order RC equivalent circuit model must be transformed into the basic structure form of the least squares method. The following steps derive the relationship between battery voltage, current, and model parameters in the z-domain and the discrete mathematical formulas. Laplace transform is applied to the lithium battery equivalent circuit model in Equation (1), and the transfer function is obtained as:

$$ U_{OCV}(s) – U_O(s) = I(s) \left( R_0 + \frac{R_1}{1 + R_1 C_1 s} + \frac{R_2}{1 + R_2 C_2 s} \right) $$
$$ G(s) = \frac{R_0 \tau_1 \tau_2 s^2 + (R_0 \tau_1 + R_0 \tau_2 + R_1 \tau_2 + R_2 \tau_1)s + R_0 + R_1 + R_2}{1 + (\tau_1 + \tau_2)s + \tau_1 \tau_2 s^2} $$

Using the bilinear transformation formula, the system function G(s) is discretized. The bilinear transformation formula is:

$$ s = \frac{2}{T} \cdot \frac{1 – z^{-1}}{1 + z^{-1}} $$

The discretized result is converted into a difference equation:

$$ G(z^{-1}) = \frac{a_3 + a_4 z^{-1} + a_5 z^{-2}}{1 – a_1 z^{-1} – a_2 z^{-2}} $$
$$ y(k) = a_1 y(k-1) + a_2 y(k-2) + a_3 I(k) + a_4 I(k-1) + a_5 I(k-2) $$

Based on Equations (6) and (7), the various parameters in the second-order RC model can be obtained:

$$ \tau_1 + \tau_2 = T \cdot \frac{1 + a_2}{1 – a_1 – a_2} $$
$$ \tau_1 \tau_2 = \frac{T^2}{4} \cdot \frac{1 + a_1 – a_2}{1 – a_1 – a_2} $$
$$ R_0 + R_1 + R_2 = \frac{a_3 + a_4 + a_5}{1 – a_1 – a_2} $$
$$ R_0 \tau_1 + R_0 \tau_2 + R_1 \tau_2 + R_2 \tau_1 = T \cdot \frac{a_3 – a_5}{1 – a_1 – a_2} $$
$$ R_0 \tau_1 \tau_2 = \frac{T^2}{4} \cdot \frac{a_3 – a_4 + a_5}{1 – a_1 – a_2} $$

Considering the actual power consumption of equipment in photovoltaic agricultural greenhouses, the volatility of photovoltaic component output power, and the randomness of current magnitude during charging and discharging stages, a dynamic charging and discharging profile is designed with reference to the DST profile. This profile includes different charging and discharging rates and durations. The current curve under dynamic conditions is shown in Figure 4. The current and voltage data from the dynamic profile are substituted into a MATLAB script file to complete parameter identification. The identification results are shown in Figure 5. From the figure, it can be observed that in the initial stage of parameter identification, due to inaccurate initial parameter settings, the parameter values fluctuate significantly. Over time, each parameter gradually converges to a fixed value. The variation curve of the variable forgetting factor $\lambda_k$ during the identification process is shown in Figure 6. The maximum value in the parameter identification algorithm is replaced with an appropriate value, allowing the forgetting factor to vary within the range of 0.991 to 0.998, thereby improving algorithm accuracy.

To verify the reliability of the second-order RC equivalent circuit model, the identified model parameters are substituted into the terminal voltage solution formula (1) to obtain the model terminal voltage. Compared with the actual voltage, the maximum error is 25 mV, and the mean absolute error is controlled within 7.8 mV. Overall, the VFFRLS algorithm demonstrates good performance in identifying battery model parameters, verifying that the variable forgetting factor can address the shortcomings of traditional fixed forgetting factors, resulting in higher algorithm accuracy.

SOC Estimation for Energy Storage Lithium Batteries

During the SOC estimation process using EKF, the noise covariances of the state and observation equations are artificially set as fixed values, leading to low estimation accuracy. To address this issue, an Adaptive Extended Kalman Filter (AEKF) is introduced by incorporating innovations to update the noise covariances of the state and observation equations in real time, thereby improving SOC estimation accuracy. The innovation introduced is the difference between the measured voltage value and the estimated voltage value:

$$ E_k = y_k – h(\hat{x}_k, u_k) $$

AEKF uses a covariance matching method to update the process and observation noises. By employing a moving window, larger weights are assigned to recent data within the window, and smaller weights to older data, resulting in an innovation covariance matrix $H_k$.

$$ H_k = \frac{1}{M-1} \sum_{i=k-M+1}^{k} E_i E_i^T $$

where M is the window size in the windowing estimation principle, set to 50. Based on the innovation covariance matrix $H_k$, the adaptive estimates of the process and observation noise covariances can be obtained:

$$ Q_k = K_k H_k K_k^T $$
$$ R_k = H_k – C_k P_k C_k^T $$

The steps for SOC estimation using AEKF are derived as follows:

  1. Set initial values for $x_0$, $P_0$, $Q_0$, $R_0$:
    $$ \hat{x}_0 = E[x_0] $$
    $$ P_0 = E[(x_0 – \hat{x}_0)(x_0 – \hat{x}_0)^T] $$
    $$ Q_0 = Q_0 $$
    $$ R_0 = R_0 $$
  2. Predict the state variable and error covariance matrix:
    $$ \bar{x}_k = A_{k-1} \hat{x}_{k-1} + B_{k-1} u_{k-1} $$
    $$ \bar{P}_k = A_{k-1} P_{k-1} A_{k-1}^T + Q_{k-1} $$
  3. Calculate the gain matrix:
    $$ K_k = \bar{P}_k C_{k-1}^T (C_{k-1} \bar{P}_k C_{k-1}^T + R_{k-1})^{-1} $$
  4. Calculate the innovation matrix and introduce the innovation estimation function:
    $$ E_k = y_{k-1} – (C_{k-1} \hat{x}_k + D_{k-1} u_{k-1}) $$
    $$ H_k = \frac{1}{M-1} \sum_{i=k-M+1}^{k} E_i E_i^T $$
  5. Update the process and observation noise covariance matrices:
    $$ Q_k = K_k H_k K_k^T $$
    $$ R_k = H_k – C_k \bar{P}_k C_k^T $$
  6. Update the state variable and error covariance matrix:
    $$ \hat{x}_k = \bar{x}_k + K_k E_k $$
    $$ P_k = (1 – K_k C_k) \bar{P}_k $$
  7. Repeat steps 2–6 for recursive filtering calculation.

When using VFFRLS and AEKF jointly for SOC estimation, the SOC-OCV relationship curve is first calibrated using voltage data obtained from the battery’s constant current intermittent discharge test. Then, the battery voltage and current data measured under dynamic conditions are substituted into the VFFRLS algorithm for online identification of the parameters in the lithium battery’s second-order RC model. The identification results are then fed into the AEKF algorithm for optimal SOC estimation. To verify the estimation capability and reliability of the VFFRLS-AEKF joint algorithm, traditional EKF algorithm, AEKF algorithm, and VFFRLS-AEKF algorithm are used for SOC estimation, respectively, and compared with the true value for error analysis. Since the SOC value cannot be directly measured, the true SOC value is calculated by sampling the current and using the ampere-hour integration method. The initial process noise covariance matrix is set to $Q = \begin{bmatrix} 1 \times 10^{-10} & 0 & 0 \\ 0 & 1 \times 10^{-10} & 0 \\ 0 & 0 & 1 \times 10^{-10} \end{bmatrix}$, and the initial measurement noise covariance matrix is set to $R = 0.01$. The root mean square error (RMSE) indicator is used to evaluate the estimation capability. The SOC estimation results are shown in Figure 7, and the estimation errors are shown in Figure 8.

In actual battery operation, the accurate initial SOC value cannot be determined, so the convergence under different initial SOC values needs to be analyzed. Setting the initial SOC value to 0.35, the estimated values of all three algorithms can accurately follow the true value. Among them, the RMSE for EKF, AEKF, and VFFRLS-AEKF algorithms are 2.78%, 1.84%, and 1.18%, respectively. Clearly, the VFFRLS-AEKF algorithm demonstrates better stability, smaller errors, and higher estimation accuracy.

Conclusion

In photovoltaic agricultural systems, battery energy storage is responsible for improving power supply quality and ensuring the safe and stable operation of the entire system. Accurate estimation of the SOC of energy storage cells is a prerequisite for the safe and reliable operation of power dispatch, which is of great significance for extending battery life and improving battery safety. To this end, a joint VFFRLS-AEKF method for SOC estimation is proposed. Through lithium battery modeling, algorithm analysis, and experimental verification, the following conclusions are drawn:

  1. Based on the second-order RC equivalent circuit model and the OCV-SOC function mapping relationship, the VFFRLS algorithm is used for online identification of battery parameters, providing accurate real-time data for SOC estimation.
  2. When there is a deviation in the initial SOC value, the VFFRLS-AEKF joint algorithm can quickly converge to the true SOC value, demonstrating high convergence and robustness.
  3. Compared to the FFRLS-EKF algorithm, the VFFRLS-AEKF joint algorithm can reduce the SOC estimation error to within 1.2%, exhibiting high precision.

The integration of advanced algorithms like VFFRLS and AEKF in photovoltaic agricultural systems ensures efficient management of energy storage cells, contributing to the overall sustainability and reliability of agricultural operations. Future work may focus on optimizing these algorithms for larger-scale applications and exploring hybrid energy storage solutions to further enhance system performance. The continuous improvement in SOC estimation techniques will play a vital role in the widespread adoption of smart agricultural practices, ultimately leading to increased productivity and reduced environmental impact.

Scroll to Top