PER Firmware
Loading...
Searching...
No Matches
soc_ukf.h File Reference

Unscented Kalman filter for state of charge estimation. More...

#include "linear_algebra.h"
Include dependency graph for soc_ukf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ecm_params_t
 
struct  soc_ukf_t
 
struct  soc_ukf_params_t
 

Functions

void SOC_UKF_init (soc_ukf_t *ukf, const soc_ukf_params_t *params, vec3_t x0, mat3_t P0)
 Initialize the SoC filter.
 
void SOC_UKF_predict (soc_ukf_t *ukf, float current)
 Predict the next state and covariance.
 
void SOC_UKF_update (soc_ukf_t *ukf, float voltage, float current)
 Correct the predicted state using measured voltage.
 
static float GET_SOC (const soc_ukf_t *ukf)
 Get the current state of charge estimate.
 

Variables

constexpr int STATE_SIZE = 3
 
constexpr int NUM_SIGMA_POINTS = 2 * STATE_SIZE + 1
 

Detailed Description

Unscented Kalman filter for state of charge estimation.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ GET_SOC()

static float GET_SOC ( const soc_ukf_t * ukf)
inlinestatic

Get the current state of charge estimate.

Parameters
ukfFilter instance.
Returns
Estimated SoC SoC may be outside of [0.0, 1.0]

◆ SOC_UKF_init()

void SOC_UKF_init ( soc_ukf_t * ukf,
const soc_ukf_params_t * params,
vec3_t x0,
mat3_t P0 )

Initialize the SoC filter.

Parameters
ukfFilter instance to initialize
paramsCell model and filter parameters
x0Initial state [SoC, V1, V2]
P0Initial state covariance ! P0 must be SPD
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SOC_UKF_predict()

void SOC_UKF_predict ( soc_ukf_t * ukf,
float current )

Predict the next state and covariance.

Parameters
ukfFilter instance
currentEquivalent cell current in amps. Positive current = discharge
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SOC_UKF_update()

void SOC_UKF_update ( soc_ukf_t * ukf,
float voltage,
float current )

Correct the predicted state using measured voltage.

Parameters
ukfFilter instance.
voltageEquivalent measured cell terminal voltage
currentCell current in amps Positive current = discharge
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ NUM_SIGMA_POINTS

int NUM_SIGMA_POINTS = 2 * STATE_SIZE + 1
constexpr

◆ STATE_SIZE

int STATE_SIZE = 3
constexpr