As an engineer focused on integrating renewable energy with modern agriculture, I see the deep integration of information technology and farming as an inevitable trend for modernization. In this context, photovoltaic (PV) agriculture emerges as a promising model, combining solar power generation with agricultural activities like planting, irrigation, and climate control within structures like greenhouses. The core challenge in such systems is the inherent intermittency and randomness of solar energy, which can compromise power supply reliability. To address this, the concept of a PV-storage direct current (DC) microgrid has been developed. Here, a cell energy storage system plays a pivotal role, not only in providing a reliable power supply to agricultural loads but also in stabilizing the microgrid and reducing operational costs.

The efficient and safe operation of the entire cell energy storage system hinges on the accurate management of its fundamental unit: the battery cell. Among various metrics, the State of Charge (SOC) is arguably the most critical. It indicates the remaining capacity of a battery, analogous to a fuel gauge. Accurate SOC estimation is essential for preventing over-charge and over-discharge, optimizing charge/discharge strategies, predicting range in mobile applications, and ultimately, extending the battery’s lifespan. In a PV-agriculture microgrid, where charge and discharge cycles are highly irregular due to fluctuating solar input and varying farm equipment loads, precise SOC knowledge is indispensable for implementing effective power smoothing and energy dispatch control strategies. Therefore, developing robust and accurate SOC estimation methods is paramount for enhancing the overall efficiency, reliability, and economy of the integrated cell energy storage system.
1. Energy Storage Technology Selection for Agricultural Microgrids
Selecting the appropriate storage technology is a foundational decision. Various options exist, including mechanical, electrical, thermal, and electrochemical storage. For distributed, scalable applications like agricultural microgrids, electrochemical solutions are often preferred due to their modularity and declining costs. The primary contenders are Lithium-ion (Li-ion) batteries, Vanadium Redox Flow Batteries (VRFB), and Lead-Carbon batteries. A comparative analysis of their key technical and economic indicators is presented in Table 1.
| Indicator | Lithium-ion Battery | Vanadium Redox 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 Full Charge Time | ~15 min | ~2 h | ~5 h |
| Cycle Life (cycles) | 2,000 – 10,000 | 5,000 – 10,000 | 2,000 – 4,000 |
| Cost (per kWh) | Medium-High | High | Low |
From this analysis, Lithium-ion batteries, particularly Lithium Iron Phosphate (LFP) chemistry, offer a compelling balance. They possess superior energy and power density, high efficiency, excellent rate capability (fast charge/discharge), and a moderate cycle life. While their initial cost is higher than Lead-Carbon, their performance and longevity often justify the investment for applications requiring frequent cycling and high power, which aligns with the needs of a PV-agriculture microgrid dealing with solar intermittency. Consequently, the subsequent discussion on modeling and SOC estimation will focus on Lithium-ion battery cells as the core component of the cell energy storage system.
2. Battery Modeling: The Foundation for SOC Estimation
To estimate an internal state like SOC, we must first have a mathematical representation—a model—that describes the battery’s external behavior (voltage, current) in relation to its internal states. Several model types exist: complex electrochemical models, black-box data-driven models, and Equivalent Circuit Models (ECMs). For real-time estimation in battery management systems (BMS), ECMs are favored due to their good compromise between accuracy and computational simplicity.
The Second-Order RC Equivalent Circuit Model is widely adopted for Lithium-ion batteries. It effectively captures the dominant dynamic voltage responses. The model consists of an open-circuit voltage (OCV) source, a series ohmic resistor (R0), and two parallel RC networks (R1-C1 and R2-C2). The OCV is a function of SOC. The first RC network represents the short-term electrochemical polarization, while the second represents the long-term concentration polarization. This structure provides a more accurate dynamic representation than a first-order model without becoming overly complex.
The governing equations for this model, derived from Kirchhoff’s laws, are:
$$ 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}(SOC) – i_L R_0 – U_1 – U_2 $$
Where \( i_L \) is the load current (positive for discharge), \( U_L \) is the terminal voltage, \( U_{OC} \) is the open-circuit voltage, and \( U_1 \), \( U_2 \) are the voltages across the polarization RC networks.
2.1 Determining the OCV-SOC Relationship
The relationship between Open-Circuit Voltage (OCV) and SOC is a fundamental, non-linear characteristic of a battery cell. It serves as a key bridge between electrical measurements and the chemical state of charge. For accurate SOC estimation, this relationship must be precisely determined. A common method is the intermittent constant-current discharge test. A fully charged battery is discharged at a low, constant current (e.g., 0.2C) for a period, followed by a long rest period to allow the terminal voltage to relax to approximately the OCV. This process is repeated until the battery is fully discharged. The measured OCV points are then mapped to the corresponding SOC values calculated by Coulomb counting (Ampere-hour integration) during the active discharge periods. The resulting data is fitted with a polynomial. For instance, a 6th-order polynomial often provides a good fit:
$$ OCV(SOC) = p_6 \cdot SOC^6 + p_5 \cdot SOC^5 + p_4 \cdot SOC^4 + p_3 \cdot SOC^3 + p_2 \cdot SOC^2 + p_1 \cdot SOC + p_0 $$
where \( p_0 \) to \( p_6 \) are fitted coefficients specific to the battery chemistry (e.g., LFP). A high coefficient of determination (R² > 0.99) validates the fit’s accuracy. This OCV(SOC) function is crucial for the observation model in state estimation filters.
3. Online Model Parameter Identification
The parameters of the ECM (R0, R1, C1, R2, C2) are not constants; they vary with factors like SOC, temperature, current rate, and battery aging. To maintain model accuracy throughout the battery’s life in a dynamic agricultural setting, these parameters must be identified online. The Recursive Least Squares (RLS) algorithm is a classic and efficient tool for this purpose. It recursively updates parameter estimates as new measurement data arrives, minimizing the sum of squared errors.
The model equations need to be discretized and rearranged into a linear-in-parameters form suitable for RLS: \( y(k) = \boldsymbol{\varphi}^T(k) \boldsymbol{\theta}(k) + e(k) \). Through Laplace transform and bilinear discretization (\( s = \frac{2}{T} \frac{1-z^{-1}}{1+z^{-1}} \)), the terminal voltage equation can be expressed as a discrete-time difference equation relating past/fpresent voltages and currents. This can be reformatted into the RLS structure where:
– \( y(k) \) is the system output (a function of terminal voltage).
– \( \boldsymbol{\varphi}(k) \) is the regression vector containing past inputs (current) and outputs.
– \( \boldsymbol{\theta}(k) = [a_1, a_2, a_3, a_4, a_5]^T \) is the parameter vector to be identified.
– \( e(k) \) is the estimation error.
The standard RLS algorithm can suffer from “data saturation,” where old data dominates new data, reducing its ability to track time-varying parameters. Introducing a Forgetting Factor (λ) addresses this by exponentially discounting past data. The standard Forgetting Factor Recursive Least Squares (FFRLS) update equations are:
$$ \hat{\boldsymbol{\theta}}(k) = \hat{\boldsymbol{\theta}}(k-1) + \mathbf{K}(k) \left[ y(k) – \boldsymbol{\varphi}^T(k) \hat{\boldsymbol{\theta}}(k-1) \right] $$
$$ \mathbf{K}(k) = \frac{\mathbf{P}(k-1) \boldsymbol{\varphi}(k)}{\lambda + \boldsymbol{\varphi}^T(k) \mathbf{P}(k-1) \boldsymbol{\varphi}(k)} $$
$$ \mathbf{P}(k) = \frac{1}{\lambda} \left[ \mathbf{P}(k-1) – \mathbf{K}(k) \boldsymbol{\varphi}^T(k) \mathbf{P}(k-1) \right] $$
Here, \( \mathbf{K}(k) \) is the gain matrix, and \( \mathbf{P}(k) \) is the error covariance matrix. λ is typically a constant between 0.95 and 1. A value of 1 reverts to standard RLS, while lower values allow faster tracking of parameter changes but increase noise sensitivity.
3.1 Variable Forgetting Factor RLS (VFFRLS)
A fixed λ presents a dilemma: a high value is good for steady-state accuracy but poor for tracking changes; a low value is good for tracking but noisy. In a PV-agriculture cell energy storage system, the battery operates under highly variable loads (pumps, lights, fans) and irregular solar charging, causing its dynamic parameters to shift. A more sophisticated approach is to use a Variable Forgetting Factor (VFFRLS). The core idea is to adjust λ based on the recent estimation error. When the error is large (indicating a possible change in system dynamics or poor model fit), λ decreases to allow the algorithm to “forget” old data more quickly and adapt. When the error is small, λ increases toward 1 to provide smoother, more accurate estimates. One effective method defines the forgetting factor as:
$$ \lambda(k) = \lambda_{min} + (1 – \lambda_{min}) \cdot 2^{-L(k)} $$
where \( \lambda_{min} \) is a lower bound (e.g., 0.95) to prevent runaway instability. \( L(k) \) is a function of the recent error, often calculated over a sliding window of size M:
$$ L(k) = -\rho \cdot \frac{1}{M} \sum_{i=k-M+1}^{k} e^2(i) $$
Here, \( \rho \) is a scaling factor, and \( e(i) \) is the estimation error at time i. This adaptive mechanism significantly improves the parameter identification robustness under complex operating conditions. Once the vector \( \boldsymbol{\theta}(k) \) is identified online by VFFRLS, the physical ECM parameters (R0, R1, C1, R2, C2) can be calculated from the elements of \( \boldsymbol{\theta}(k) \) using a set of transformation equations derived from the discretization process. This provides real-time updates to the battery model used for state estimation.
4. State of Charge Estimation Using Adaptive Extended Kalman Filtering
With an accurate and updated model, we can now tackle the core problem: estimating SOC. Coulomb counting (Ampere-hour integration) is simple but suffers from current sensor drift and unknown initial SOC. Model-based filters offer a superior solution by combining a model prediction with real-time voltage measurements. The Extended Kalman Filter (EKF) is the standard for non-linear systems like batteries.
The first step is to define the state-space model for the EKF, using the second-order ECM. We choose the state vector to include SOC and the polarization voltages:
$$ \mathbf{x}_k = \left[ SOC_k, U_{1,k}, U_{2,k} \right]^T $$
The state update (process) equation and measurement (observation) equation are:
$$ \mathbf{x}_{k+1} = f(\mathbf{x}_k, i_k) + \mathbf{w}_k = \begin{bmatrix} SOC_k – \frac{\eta \Delta t}{C_n} i_k \\ e^{-\Delta t / \tau_1} U_{1,k} + R_1 (1 – e^{-\Delta t / \tau_1}) i_k \\ e^{-\Delta t / \tau_2} U_{2,k} + R_2 (1 – e^{-\Delta t / \tau_2}) i_k \end{bmatrix} + \mathbf{w}_k $$
$$ y_k = U_{L,k} = h(\mathbf{x}_k, i_k) + v_k = U_{OC}(SOC_k) – i_k R_0 – U_{1,k} – U_{2,k} + v_k $$
where \( C_n \) is the nominal capacity, \( \eta \) is the Coulombic efficiency, \( \Delta t \) is the sampling time, \( \tau_1 = R_1 C_1 \), \( \tau_2 = R_2 C_2 \), and \( \mathbf{w}_k \) and \( v_k \) are the process and measurement noise, respectively, assumed to be zero-mean Gaussian with covariances Q and R.
The EKF linearizes the non-linear functions \( f \) and \( h \) around the current state estimate to compute the state transition matrix \( \mathbf{A}_k \) and observation matrix \( \mathbf{C}_k \). The standard EKF algorithm consists of two main steps per iteration:
1. Prediction: Predict the next state and error covariance.
$$ \hat{\mathbf{x}}^-_{k} = f(\hat{\mathbf{x}}_{k-1}, i_{k-1}) $$
$$ \mathbf{P}^-_k = \mathbf{A}_{k-1} \mathbf{P}_{k-1} \mathbf{A}^T_{k-1} + \mathbf{Q} $$
2. Update: Update the prediction with the new measurement.
$$ \mathbf{K}_k = \mathbf{P}^-_k \mathbf{C}^T_k (\mathbf{C}_k \mathbf{P}^-_k \mathbf{C}^T_k + \mathbf{R})^{-1} $$
$$ \hat{\mathbf{x}}_k = \hat{\mathbf{x}}^-_k + \mathbf{K}_k (y_k – h(\hat{\mathbf{x}}^-_k, i_k)) $$
$$ \mathbf{P}_k = (\mathbf{I} – \mathbf{K}_k \mathbf{C}_k) \mathbf{P}^-_k $$
While effective, a key weakness of the standard EKF is that the noise covariances Q and R are usually set as constant tuning parameters. In reality, the noise characteristics of a cell energy storage system can change with operating conditions, temperature, and aging.
4.1 Adaptive Extended Kalman Filter (AEKF)
To overcome this limitation, an Adaptive EKF (AEKF) can be employed. The AEKF incorporates a mechanism to estimate and update the noise covariance matrices Q and/or R online based on the observed “innovation” sequence—the difference between the actual measurement and the predicted measurement. A common method is the covariance matching technique. The core innovation sequence is:
$$ \mathbf{e}_k = y_k – h(\hat{\mathbf{x}}^-_k, i_k) $$
The theoretical covariance of this innovation sequence is \( \mathbf{C}_k \mathbf{P}^-_k \mathbf{C}^T_k + \mathbf{R}_k \). By calculating the actual covariance of recent innovations over a sliding window of size N, we can estimate the current measurement noise covariance \( \mathbf{R}_k \):
$$ \hat{\mathbf{H}}_k = \frac{1}{N} \sum_{i=k-N+1}^{k} \mathbf{e}_i \mathbf{e}_i^T $$
$$ \hat{\mathbf{R}}_k = \hat{\mathbf{H}}_k – \mathbf{C}_k \mathbf{P}^-_k \mathbf{C}^T_k $$
Subsequently, the process noise covariance can be adapted as:
$$ \hat{\mathbf{Q}}_k = \mathbf{K}_k \hat{\mathbf{H}}_k \mathbf{K}_k^T $$
These updated \( \hat{\mathbf{Q}}_k \) and \( \hat{\mathbf{R}}_k \) are then used in the next prediction and update cycles. This adaptive mechanism allows the filter to self-tune in response to changing system and sensor noise, leading to more robust and accurate SOC estimation, especially under the variable conditions of a PV-agriculture cell energy storage system.
5. Integrated VFFRLS-AEKF SOC Estimation Framework
The most powerful approach combines the strengths of online parameter identification and adaptive state estimation. This integrated framework operates in a coordinated manner within the Battery Management System (BMS):
- Data Acquisition: The BMS continuously samples the battery’s terminal voltage \( U_L \) and current \( i_L \).
- Online Parameter Identification (VFFRLS): These measurements are fed into the VFFRLS algorithm. The algorithm recursively identifies the parameter vector \( \boldsymbol{\theta}(k) \), which is then converted into the updated ECM parameters (R0, R1, C1, R2, C2). The variable forgetting factor ensures these parameters track the true battery dynamics.
- State Estimation (AEKF): The updated model parameters, along with the measured current and voltage, are passed to the AEKF. The AEKF uses the most accurate model to perform its prediction and update steps. Simultaneously, it adapts its noise statistics based on the innovation sequence, fine-tuning its gain for optimal performance.
- Output: The AEKF outputs the optimal estimate of the state vector \( \hat{\mathbf{x}}_k \), whose first element is the highly accurate, real-time SOC estimate.
This closed-loop strategy creates a robust estimation system. The VFFRLS ensures the model reflects the present condition of the battery cell, while the AEKF optimally filters noise and uncertainties to pinpoint the SOC. The synergy between these two adaptive algorithms is key to handling the complex, non-linear, and time-varying nature of Lithium-ion batteries in field applications.
6. Performance Evaluation and Discussion
To validate the proposed VFFRLS-AEKF method, it is typically tested against benchmark algorithms like the standard EKF or a combined FFRLS-EKF under dynamic load profiles that simulate real-world conditions, such as a Dynamic Stress Test (DST) or a profile derived from actual agricultural equipment operation. A critical test is the convergence from an incorrect initial SOC value, which is a common scenario in practice.
| Algorithm | Description | Key Strength | Typical RMSE* | Convergence Speed |
|---|---|---|---|---|
| Standard EKF | Basic non-linear filter with fixed model parameters and noise covariances. | Simplicity, foundational approach. | ~2.5% – 3.5% | Moderate |
| FFRLS-EKF | EKF fed with parameters from a Forgetting Factor RLS identifier. | Better than standard EKF due to parameter updating. | ~1.5% – 2.5% | Good |
| VFFRLS-AEKF | AEKF fed with parameters from a Variable Forgetting Factor RLS identifier. | Superior tracking of model changes and noise adaptation. | ~1.0% – 1.5% | Excellent |
| *RMSE: Root Mean Square Error versus reference SOC (e.g., from high-precision Coulomb counting). Values are illustrative. | ||||
Simulation or experimental results consistently show that the integrated VFFRLS-AEKF method achieves the highest accuracy and robustness. When initialized with a significant SOC error (e.g., 10% off), the VFFRLS-AEKF converges rapidly to the true SOC value. Its estimation error remains bounded within a very small band (e.g., ±1-2%) even under strenuous dynamic cycling, outperforming the other methods. The AEKF’s ability to adjust its noise covariances prevents the gain from becoming stale, while the VFFRLS ensures the underlying model doesn’t diverge from reality. This leads to a more reliable and trustworthy SOC estimate, which is the cornerstone for advanced functions in the cell energy storage system, such as:
– Optimal Power Dispatch: Knowing the exact SOC allows the microgrid controller to decide when to charge from excess PV, when to discharge to support loads, and when to curtail power to protect the battery.
– State of Health (SOH) Monitoring: Accurate SOC is a prerequisite for tracking capacity fade and resistance growth over time.
– Cell Balancing: In a battery pack, precise individual cell SOC estimates are necessary for initiating balancing actions to maintain uniformity and maximize pack capacity.
– Thermal Management: SOC information can be used in conjunction with current to predict heat generation and manage cooling systems proactively.
7. Conclusion and Future Perspective
The transition towards smart, sustainable agriculture powered by integrated renewable energy systems is accelerating. In photovoltaic agriculture, the cell energy storage system is the linchpin that ensures stability, reliability, and efficiency. Its performance and longevity are critically dependent on sophisticated battery management, at the heart of which lies accurate State of Charge estimation.
This article has detailed a comprehensive technical pathway for achieving high-fidelity SOC estimation. Beginning with the selection of a suitable battery technology (Lithium-ion) and a representative model (2nd-order RC ECM), the discussion progressed to advanced algorithms. The proposed integrated framework combining Variable Forgetting Factor Recursive Least Squares (VFFRLS) for online parameter identification and an Adaptive Extended Kalman Filter (AEKF) for state estimation addresses the core challenges: the time-varying nature of battery parameters and the non-stationary noise characteristics in real-world operation. This method demonstrably provides higher accuracy, faster convergence from unknown initial states, and greater robustness compared to conventional approaches, making it highly suitable for the demanding and variable environment of a PV-agricultural microgrid.
Looking forward, the evolution of SOC estimation continues. Future research may explore:
– Data-Driven/Hybrid Models: Integrating machine learning techniques (e.g., Neural Networks, Support Vector Machines) with physical models to capture complex non-linearities and aging effects that are difficult to model with ECMs alone.
– Multi-State Estimation: Jointly estimating SOC, State of Health (SOH), and State of Power (SOP) in a unified filtering framework to provide a complete picture of the battery’s condition and capabilities.
– Cloud-Based BMS Analytics: Leveraging cloud computing to collect data from fleets of agricultural storage systems, enabling fleet-level learning, prognostics, and health management, which can feedback to improve the estimation algorithms on individual units.
By continuously refining these estimation techniques, we can unlock the full potential of cell energy storage systems, making photovoltaic agriculture more resilient, cost-effective, and sustainable, thereby contributing significantly to the future of food and energy production.
