Unscented Kalman filter for state of charge estimation.
More...
Go to the source code of this file.
Unscented Kalman filter for state of charge estimation.
- Author
- Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
◆ GET_SOC()
| static float GET_SOC |
( |
const soc_ukf_t * | ukf | ) |
|
|
inlinestatic |
Get the current state of charge estimate.
- Parameters
-
- Returns
- Estimated SoC SoC may be outside of [0.0, 1.0]
◆ SOC_UKF_init()
Initialize the SoC filter.
- Parameters
-
| ukf | Filter instance to initialize |
| params | Cell model and filter parameters |
| x0 | Initial state [SoC, V1, V2] |
| P0 | Initial state covariance ! P0 must be SPD |
◆ SOC_UKF_predict()
| void SOC_UKF_predict |
( |
soc_ukf_t * | ukf, |
|
|
float | current ) |
Predict the next state and covariance.
- Parameters
-
| ukf | Filter instance |
| current | Equivalent cell current in amps. Positive current = discharge |
◆ SOC_UKF_update()
| void SOC_UKF_update |
( |
soc_ukf_t * | ukf, |
|
|
float | voltage, |
|
|
float | current ) |
Correct the predicted state using measured voltage.
- Parameters
-
| ukf | Filter instance. |
| voltage | Equivalent measured cell terminal voltage |
| current | Cell current in amps Positive current = discharge |
◆ NUM_SIGMA_POINTS
◆ STATE_SIZE