Estimators
Estimate the state of charge, the terminal resistance, and the state of health of batteries by using coulomb counting and Kalman filters algorithms.
Blocks
State-of-Charge Estimators
SOC Estimator (Adaptive Kalman Filter) | State of charge and terminal resistance estimator with adaptive Kalman filter (Since R2022b) |
SOC Estimator (Adaptive Kalman Filter, Variable Capacity) | State of charge and terminal resistance estimator with adaptive Kalman filter and variable capacity (Since R2023b) |
SOC Estimator (Coulomb Counting) | State of charge estimator with Coulomb counting (Since R2022b) |
SOC Estimator (Coulomb Counting, Variable Capacity) | State of charge estimator with Coulomb counting and variable capacity (Since R2023a) |
SOC Estimator (Kalman Filter) | State of charge estimator with Kalman filter (Since R2022b) |
SOC Estimator (Kalman Filter, Variable Capacity) | State of charge estimator with Kalman filter and variable capacity (Since R2023b) |
State-of-Energy Estimators
SOE Estimator (Adaptive Kalman Filter) | State of energy and terminal resistance estimator with adaptive Kalman filter (Since R2023b) |
SOE Estimator (Adaptive Kalman Filter, Variable Energy Capacity) | State of energy and terminal resistance estimator with Kalman filter and variable energy capacity (Since R2023b) |
SOE Estimator (Energy Counting) | State of energy estimator with energy counting (Since R2023b) |
SOE Estimator (Energy Counting, Variable Energy Capacity) | State of energy estimator with energy counting and variable energy capacity (Since R2023b) |
SOE Estimator (Kalman Filter) | State of energy estimator with Kalman filter (Since R2023b) |
SOE Estimator (Kalman Filter, Variable Energy Capacity) | State of energy estimator with Kalman filter and variable energy capacity (Since R2023b) |
Health Estimation
Battery Capacity Estimator (Kalman Filter) | Battery capacity estimator with Kalman filter (Since R2023b) |
Battery Capacity Estimator (Least Squares) | Battery capacity estimator using least-squares algorithms (Since R2024a) |
Battery Capacity Estimator (Least Squares, Variable Weights) | Battery capacity estimator using least-squares algorithms and variable weights (Since R2024a) |
Battery Power Estimator | Calculate maximum charging and discharging power of battery pack over time horizon (Since R2024b) |
SOH Estimator | State of health estimator (Since R2022b) |
SOH Estimator (Capacity-Based) | State of health estimator based on capacity fade (Since R2023b) |
Featured Examples
Estimate State of Charge of Lithium Iron Phosphate Battery
Estimate the state of charge (SOC) of lithium iron phosphate (LFP) batteries by using the Coulomb Counting method with error correction. The Coulomb counting method is implemented at 1 second sample time. To correct the estimate of the Coulomb counting method, the example implements an extended Kalman filter with a sampling time of 10 seconds. The initial SOC of the battery is equal to 0.4. The estimator uses an initial condition for the SOC equal to 0.6. The LFP battery keeps charging and discharging for six hours. The estimator converges to the real value of the SOC in approximately half an hour and then follows the real SOC value.
- Since R2024b
- Open Model
Battery State-of-Charge Estimation
Estimate the battery state of charge (SOC) by using a Kalman filter. The initial SOC of the battery is equal to 0.5. The estimator uses an initial condition for the SOC equal to 0.8. The battery keeps charging and discharging for 6 hours. The extended Kalman filter estimator converges to the real value of the SOC in less than 10 minutes and then follows the real SOC value. To use a different Kalman filter implementation, in the SOC Estimator (Kalman Filter) block, set the Filter type parameter to the desired value.
Battery State-of-Health Estimation
Estimate the battery internal resistance and state-of-health (SOH) by using an adaptive Kalman filter. The initial state-of-charge (SOC) of the battery is equal to 0.6. The estimator uses an initial condition for the SOC equal to 0.65. The battery keeps charging and discharging for 10 hours. The unscented Kalman filter estimator converges to the real value of the SOC while also estimating the internal resistance. To use a different Kalman filter implementation, in the SOC Estimator (Kalman Filter) block, set the Filter type parameter to the desired value.
Charge and Discharge Battery Module with State of Charge Estimator
Cyclically charge and discharge a battery module while estimating the state of charge (SOC) of the three parallel assemblies of the module over time. This example uses the SOC estimation to switch between the charging and discharging profiles. For the estimation, the Kalman filter uses an initial SOC estimation and the voltage, current, and temperature of the parallel assemblies. The model estimates the temperature of the parallel assemblies from the average of the cell temperatures of each parallel assembly.
- Since R2024a
- Open Live Script
Estimate Battery State of Health Based on Capacity Fade
Estimate the battery capacity and state of health (SOH) by using a Kalman filter. The initial state of charge (SOC) of the battery is equal to 0.5. The estimator uses an initial condition for the SOC equal to 0.8. The battery keeps charging and discharging for 50 hours. The example estimates the battery capacity, in ampere-hour, and the SOC by using an extended Kalman Filter. The estimation error for the battery capacity is less than 4%. The SOC is estimated using an extended Kalman filter. When using fixed capacity the estimated SOC value diverges from the true value. To demonstrate the functionality of the estimator and to restrict the duration of the simulation, this example models an increased capacity fade rate.
- Since R2024a
- Open Model
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)