BEST - Battery SOC estimator
Description
The BEST (Battery ESTimator) module implements a battery state estimation algorithm. It estimates the SOC (State Of Charge) and SOH (State Of Health) of a configured battery pack based on current and voltage readings.
The estimation combines two approaches:
- Coulomb counting — integrating the current flowing through the controller
- Voltage estimation — estimating SOC from the battery voltage using an OCV (Open Circuit Voltage) model
These two methods work together to compute the SOC.
There are two variants of the OCV model, depending on the firmware build:
- 4-point OCV — the cell OCV curve is approximated by 4 voltage breakpoints at 0%, 10%, 85%, and 100% SOC, with a single scalar cell resistance.
- OCV table — the cell OCV curve is defined by a multi-point lookup table with temperature-dependent bilinear interpolation (up to 6 temperature breakpoints) and per-temperature cell resistance values. Builds with the OCV table can additionally support online SOH tracking (capacity and internal resistance), OCV slope gain scaling, an EKF estimator and SOC reserve.
The BEST module is configured at compile time. Which parameters, states, permanents and features are present depends on the particular firmware build. This page documents everything the module can provide. For the exact configuration used by a specific firmware, see the application documentation — e.g. LYNX or CAPRA.
- For controllers, the BEST parameters are located at
/best. - For BMS, the BEST parameters are located at
/driver/best.
The reported SOC is scaled by the OCV model so that it represents the remaining battery energy rather than the raw remaining charge.
Voltage estimation
By increasing soc_gain or reset_gain, the BEST module will rely more on voltage estimation for SOC correction.
Coulomb counting
There is no explicit setting for coulomb counting strength. It can be disabled by setting P to 0.
If the siliXcon controller is not the only power device connected to the battery, coulomb counting should be disabled since the controller cannot measure the total battery current.
Parameters
Common parameters
These parameters are present in every build.
| Parameter | Unit | Description |
|---|---|---|
S | - | Number of cells in series (not present in single-cell builds) |
P | - | Number of cells in parallel. Set to 0 to disable coulomb counting |
soc_gain | SOC voltage correction weight. Set to 0 to disable voltage correction during run (voltage correction will still work during BEST reset). In OCV table builds this is an array of 2 values — see the OCV Table tab below | |
reset_time | ms | SOC reset time at device startup. Negative value for manual-only reset via breset command or from the app. Set to 0 to disable the reset feature |
reset_gain | SOC reset correction weight. Same role as soc_gain, but applied during the BEST reset period | |
Rs | Ohm | Pack wiring resistance (not present in single-cell builds) |
Cc | mAh | Cell nominal capacity |
OCV model parameters
- 4-Point OCV
- OCV Table
The 4-point model approximates the cell OCV curve using four voltage breakpoints. A single scalar resistance value is used for the cell.
| Parameter | Unit | Description |
|---|---|---|
Rc | Ohm | Cell nominal resistance |
U100 | V | OCV for cell when SOC = 100% |
U85 | V | OCV for cell when SOC = 85% |
U10 | V | OCV for cell when SOC = 10% |
U0 | V | OCV for cell when SOC = 0% |
OCV = Open Circuit Voltage — the voltage on a single battery cell without load.
The OCV table model uses multi-point lookup tables with bilinear interpolation across SOC and temperature. Up to 6 temperature breakpoints are supported, each with its own OCV table and cell resistance value.
| Parameter | Unit | Description |
|---|---|---|
soc_gain | Array of 2 gains: soc_gain[0] is used at rest, soc_gain[1] at full load. The effective gain is interpolated between them based on the actual current, so at high current the estimator relies more on coulomb counting. Set to 0 to disable voltage correction | |
soc_gain_I | A | Current at which soc_gain[1] is fully used |
T | C | Temperature breakpoints array (up to 6 values) |
R0 | Ohm | Cell resistance per temperature (array, one value per temperature breakpoint) |
ocv_T1 | V | OCV table for temperature T[0] (index 0 = 0% SOC, last index = 100% SOC) |
ocv_T2 | V | OCV table for temperature T[1] |
ocv_T3 | V | OCV table for temperature T[2] |
ocv_T4 | V | OCV table for temperature T[3] |
ocv_T5 | V | OCV table for temperature T[4] |
ocv_T6 | V | OCV table for temperature T[5] |
The number of OCV tables and resistance values depends on the number of configured temperature breakpoints. Not all ocv_T* tables may be present.
Builds with the OCV slope gain scaling additionally have:
| Parameter | Unit | Description |
|---|---|---|
slope_ref | V | dOCV/dSOC reference at which the full correction gain applies |
slope_min | - | Minimum gain fraction applied in flat regions of the OCV curve (e.g. LFP plateau) |
SOH tracking parameters
| Parameter | Unit | Description |
|---|---|---|
soh_Trest | s | Rest time before an OCV reference point for SOH tracking is taken |
soh_Ithr | A | Current threshold below which the battery is considered at rest |
Cmax_lpf | Low-pass filter coefficient for Cmax (capacity) SOH tracking | |
R0_lpf | Low-pass filter coefficient for online R0 tracking |
EKF parameters
The module can be built with an Extended Kalman Filter using a 1RC equivalent circuit cell model instead of the basic observer (requires the OCV table). It adds these parameters:
| Parameter | Unit | Description |
|---|---|---|
R1 | Ohm | RC-branch resistance per temperature (array, 1RC model) |
C1 | F | RC-branch capacitance per temperature (array, 1RC model) |
Q_soc | EKF process noise variance for SOC | |
Q_vrc | EKF process noise variance for the RC-branch voltage | |
R_v | EKF measurement noise variance for voltage |
SOC reserve
The module can be built with the SOC reserve feature, which remaps the reported SOC so that a configurable bottom/top part of the capacity is hidden from the user:
| Parameter | Unit | Description |
|---|---|---|
soc_rsv | % | SOC reserve array (index 0 = bottom, index 1 = top). Reported SOC reaches 0% / 100% at the reserve limits |
The remapping applies to the SOC and energy values reported to the application. The SOC state always shows the internal, unmapped value.
States
| State | Unit | Description |
|---|---|---|
SOC | 0-1 | Battery state of charge |
OCV | V | Extrapolated cell open circuit voltage |
SOH | 0-1 | Battery state of health (only in builds with cycle counting) |
R0_est | Ohm | Online R0 estimate at the current temperature (OCV table only) |
R0_rel | - | Relative R0 estimate, 1.0 = nominal (OCV table only) |
ekf_soc | 0-1 | EKF internal SOC state (EKF only) |
ekf_vrc | V | EKF RC-branch voltage state (EKF only) |
Permanents
Located at folder /permanents.
| Permanent | Unit | Description |
|---|---|---|
Cmax | mAh | Maximum battery capacity (at 100% charge) |
Cact | mAh | Actual battery capacity |
cycles | % | Battery cycle counter. Accumulates SOC percent changes — 200 counts correspond to one full charge/discharge cycle. Only in builds with cycle counting |
R0r | - | Relative R0 estimate, 1.0 = nominal (OCV table only) |
Shell commands
| Command | Description |
|---|---|
breset | Reset the whole BEST algorithm — SOC, SOH and R0. During reset_time, SOC is corrected using reset_gain |
breset soc | Reset SOC only |
breset soh | Reset SOH only (capacity back to nominal) |
breset r0 | Reset the R0 estimate to nominal. Use breset r0 nan to invalidate the estimate |
Older firmware builds do not support the breset subcommands — there, breset always resets both SOC and SOH.