BEST - Battery SOC estimator
Description
The BEST (Battery ESTimator) module estimates the SOC (State Of Charge) and SOH (State Of Health) of a configured battery pack from the measured battery current, voltage and — in some builds — temperature.
The integrator describes the battery to the module (cell count, nominal capacity and resistance, and the cell OCV curve) and tunes two things: how strongly the SOC follows the measured cell voltage (soc_gain, reset_gain) and whether the measured current is used at all (P).
There are two variants of the OCV model, depending on the firmware build:
- 4-point OCV — the cell OCV curve is entered as 4 voltages at 0%, 10%, 85% and 100% SOC, with one cell resistance value.
- OCV table — the cell OCV curve is entered as a table per temperature breakpoint (up to 6 breakpoints), each with its own cell resistance value. Builds with the OCV table can additionally track battery ageing (capacity and internal resistance), offer advanced estimator tuning and the 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 represents the remaining battery energy rather than the raw remaining charge.
Voltage correction
soc_gain (and reset_gain during the reset phase) sets how fast the SOC follows the measured cell voltage. Higher values re-align the SOC with the voltage faster; lower values give a steadier SOC that is less affected by voltage noise. Set to 0 to disable the voltage correction during run.
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 | How fast the SOC follows the measured cell voltage during run. 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 | How long the SOC re-sync phase at device startup lasts. Negative value for manual-only reset via breset command or from the app. Set to 0 to disable the reset feature |
reset_gain | How fast the SOC re-syncs to the cell voltage during the reset phase (reset_time after startup or breset) | |
Rs | Ohm | Pack wiring resistance (not present in single-cell builds) |
Cc | mAh | Cell nominal capacity |
OCV model parameters
- 4-Point OCV
- OCV Table
Enter the cell OCV at four SOC points and the nominal cell resistance.
| 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.
Enter the cell OCV curve as a table of voltages for each temperature breakpoint (up to 6 breakpoints), each with its own cell resistance value. Values between the entered SOC points and temperatures are interpolated.
| Parameter | Unit | Description |
|---|---|---|
soc_gain | Array of 2 gains: soc_gain[0] sets how fast the SOC follows the cell voltage when the battery is at rest, soc_gain[1] the same under load above soc_gain_I. Set to 0 to disable voltage correction | |
soc_gain_I | A | Load current above which soc_gain[1] applies |
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.
Some builds additionally have advanced tuning of the voltage correction for chemistries with a flat voltage curve (LFP):
| Parameter | Unit | Description |
|---|---|---|
slope_ref | V | Advanced tuning of the voltage correction for flat-curve chemistries (LFP). Leave at default unless advised |
slope_min | - | Advanced tuning of the voltage correction for flat-curve chemistries (LFP). Leave at default unless advised |
SOH tracking parameters
| Parameter | Unit | Description |
|---|---|---|
soh_Trest | s | How long the battery must be at rest before the health estimate is updated |
soh_Ithr | A | Current below which the battery is considered at rest |
Cmax_lpf | Smoothing of the reported capacity (Cmax) estimate | |
R0_lpf | Smoothing of the reported cell resistance (R0_est) estimate |
Advanced estimator parameters
Some OCV table builds use an advanced estimator with additional cell parameters. These are set at the factory for the given cell type — leave them at factory values unless advised.
| Parameter | Unit | Description |
|---|---|---|
R1 | Ohm | Cell dynamic response parameter per temperature (array). Factory value |
C1 | F | Cell dynamic response parameter per temperature (array). Factory value |
Q_soc | Advanced estimator tuning, leave at factory value | |
Q_vrc | Advanced estimator tuning, leave at factory value | |
R_v | Advanced estimator tuning, leave at factory value |
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 | Estimated cell open circuit voltage |
SOH | 0-1 | Battery state of health (only in builds with cycle counting) |
R0_est | Ohm | Estimated cell resistance at the current temperature (OCV table only) |
R0_rel | - | Relative cell resistance estimate, 1.0 = nominal (OCV table only) |
ekf_soc | 0-1 | Internal estimator state, debug only (advanced estimator builds) |
ekf_vrc | V | Internal estimator state, debug only (advanced estimator builds) |
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; divide by 200 to obtain full charge/discharge cycles. Only in builds with cycle counting |
R0r | - | Relative cell resistance 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.