Kalman Filter for State Estimation

  • #1

Main Question or Discussion Point

Hi,

I am not sure if this is the right forum to post this. I am working on a Kalman Filter for battery state of discharge estimation during discharging process. I am using a Linearized Discrete Time Kalman Filter to estimate the State of Discharge/SOD (how much % of charge has been taken away) of a battery. Below are some of the codes.

Coefficient which relates the measurement (on most books it is a matrix, but since I am only having 1 state variable, it is a coefficient)
Hk=c1+2*c2*SOD+3*c3*pow(SOD,2)+4*c4*pow(SOD,3)+5*c5*pow(SOD,4)+6*c6*pow(SOD,5)+7*c7*pow(SOD,6)+8*c8*pow(SOD,7)+9*c9*pow(SOD,8)+10*c10*pow(SOD,9);

c1-c10 are the battery model coefficients to fit the experimental data well.

Kalman gain computation
Kk = (pkmin*Hk)/(Hk*pkmin*Hk+R);

Correction Updates
zk = uk - Hk*xkmin;
xkplus = xkmin + Kk*zk;


SOD = SOD + xkplus;
pkplus=(1-Kk*Hk)*pkmin*(1-Kk*Hk)+Kk*R*Kk;


Prediction Updates for the next iteration
Ak = 1; //it is the transition coefficient
xkmin = Ak*xkplus;
pkmin = Ak*pkplus*Ak + Q
;

The idea is to get measurement of the battery terminal voltage to estimates the state of discharge.
The state of the system xkmin is the change in SOD. uk is the change of battery terminal voltage from the actual measurement. R is measurement noise covariance (assumed to be 1). Q is process noise covariance (assumed to be 0.5).

My problem is in order to get the filter to work at its best, both Q and R must not be constant. This is due to the fact that the system is non-linear system which is linearized and both R and Q may be changing with each time step. I have read some research paper on how to do "tuning" of these two parameters, but always ended up with unsuitable approach. If anyone here have experience with Kalman Filter, your help and suggestions would be really appreciated. Thank you in advanced.
 

Answers and Replies

  • #2
This is the matlab m-file of the Kalman Filter and the measurement data. I have a good smooth curve but at some point the curve swing out of quite far from the actual values. I am wondering what has cause such behavior. Anyone has experience on this, could you give me some suggestions or idea of what could have caused this. The filter is implemented in Labview but I thought it might not be common to have labview, so I converted it to matlab m-file. The picture is actually taken from the simulation in Labview. Thank you in advance.
 

Attachments

Related Threads on Kalman Filter for State Estimation

  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
7K
  • Last Post
Replies
1
Views
3K
Replies
1
Views
1K
Replies
4
Views
930
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
6
Views
2K
Top