PebbleOS v4.47.0
Loading...
Searching...
No Matches
thevenin.h File Reference

Data Structures

struct  pbl_fuel_gauge_estimator
 Thevenin estimator: an extended Kalman filter over the cell's R0 in series with one R1||C1 polarization pair, combining coulomb counting (prediction) with the measured terminal voltage (correction). More...
 
struct  pbl_fuel_gauge_estimator_state
 Estimator state. More...
 

Macros

#define PBL_FUEL_GAUGE_ESTIMATOR_KCONFIG
 Estimator parameters from Kconfig.
 

Data Structure Documentation

◆ pbl_fuel_gauge_estimator

struct pbl_fuel_gauge_estimator

Thevenin estimator: an extended Kalman filter over the cell's R0 in series with one R1||C1 polarization pair, combining coulomb counting (prediction) with the measured terminal voltage (correction).

Estimator parameters.

Data Fields
float current_noise Standard deviation of the error of a current sample as the average current over the time since the previous sample [A].
float r1 Polarization resistance at 25 C [ohm], 0 without an RC pair.
float r_temp_coeff Resistances scale by exp(r_temp_coeff * (25 - T)) [1/C].
float tau1 Polarization time constant R1 * C1 [s], 0 when r1 is 0.
float voltage_noise Standard deviation of the voltage model and measurement error [V].

◆ pbl_fuel_gauge_estimator_state

struct pbl_fuel_gauge_estimator_state

Estimator state.

Data Fields
float p_cross
float p_soc Covariance: var(soc), cov(soc, v1), var(v1).
float p_v1
float soc SOC and polarization voltage.
float v1

Macro Definition Documentation

◆ PBL_FUEL_GAUGE_ESTIMATOR_KCONFIG

#define PBL_FUEL_GAUGE_ESTIMATOR_KCONFIG
Value:
{ \
.r1 = (float)CONFIG_FUEL_GAUGE_THEVENIN_RC_MILLIOHM / 1000.0f, \
.tau1 = (float)CONFIG_FUEL_GAUGE_THEVENIN_RC_TAU_MS / 1000.0f, \
.r_temp_coeff = (float)CONFIG_FUEL_GAUGE_THEVENIN_R_TEMP_COEFF_PPM / 1000000.0f, \
.voltage_noise = (float)CONFIG_FUEL_GAUGE_THEVENIN_VOLTAGE_NOISE_UV / 1000000.0f, \
.current_noise = (float)CONFIG_FUEL_GAUGE_THEVENIN_CURRENT_NOISE_UA / 1000000.0f, \
}

Estimator parameters from Kconfig.