Thread: Kalman filtering application

1. Originally Posted by atlove
hello CaptainBlack,
With your assistance before, i have build a basic model and programmed with vb.net already. Later on i will post some result of the estimation estimated by my program. Thank you very much.

Besides that, I was asked to do some modification about to optimize my model. My consultant said that there is forgetting factor for kalman filtering. What exact this means? Do you have related information?
The plant noise or process (if you have implemented it) is the only forgetting term in the KF.

CB

2. Originally Posted by CaptainBlack
The plant noise or process (if you have implemented it) is the only forgetting term in the KF.

CB
For my model, I used a moving windows say 60 sets of data, then calculated the a,b,c,d,e for these data sets. Use these a,b,c,d,e and the measurement of 61set of data to estimation the power at t=61. So a,b,c,d,e calculated from 2-61sets of data sets and measurement of 62 set of data are used to determine the power at t=62 and so on.

I need to handle all 60 sets in the moving windows each time. It seems strange. He told me that Kalman filtering teaches to use some forgetting
factor so as to shorten the computation time as I only need to include
the latest set of data to find out the solution. I don't need to handle
all 60 sets of data every time.

3. Originally Posted by atlove
For my model, I used a moving windows say 60 sets of data, then calculated the a,b,c,d,e for these data sets. Use these a,b,c,d,e and the measurement of 61set of data to estimation the power at t=61. So a,b,c,d,e calculated from 2-61sets of data sets and measurement of 62 set of data are used to determine the power at t=62 and so on.

I need to handle all 60 sets in the moving windows each time. It seems strange. He told me that Kalman filtering teaches to use some forgetting
factor so as to shorten the computation time as I only need to include
the latest set of data to find out the solution. I don't need to handle
all 60 sets of data every time.
You should not need to use a moving window. Update the estimate with each measurement as it comes. Between measurements add in a plant noise matrix to the covariance matrix which is diagonal with diagonal elements 1/60 of those in the covariance (or something of that order)

CB

4. Originally Posted by CaptainBlack
You should not need to use a moving window. Update the estimate with each measurement as it comes. Between measurements add in a plant noise matrix to the covariance matrix which is diagonal with diagonal elements 1/60 of those in the covariance (or something of that order)

CB

Is the covariance matrix you mean the P?

Thank you for your suggestion in not using a moving window. But i want to see what will be the result to use moving window with forgetting factor. Do you have related information? I have searched some from the internet. It's seems that "time-weighted-error kalman filtering" is doing in this way. Do you know that?

The attachment is one of my trial in estimating the power consumption.
The green line is the real while blue is estimation

5. [quote=atlove;294175]Is the covariance matrix you mean the P?

Thank you for your suggestion in not using a moving window. But i want to see what will be the result to use moving window with forgetting factor. Do you have related information? I have searched some from the internet. It's seems that "time-weighted-error kalman filtering" is doing in this way. Do you know that?[\quote]

No

The attachment is one of my trial in estimating the power consumption.
The green line is the real while blue is estimation
That looks pretty good.

CB

6. I've found sth about the forgetting factor of KF. Please check the attachment. The lamda is the forgetting factor which is said to have a value between 0.97-0.995. For more detail please visit
System Identification Toolbox - Documentation=

Do you know how to determine the lamda?

7. Originally Posted by atlove
I've found sth about the forgetting factor of KF. Please check the attachment. The lamda is the forgetting factor which is said to have a value between 0.97-0.995. For more detail please visit
System Identification Toolbox - Documentation=

Do you know how to determine the lamda?
Well if you are required to use that then fine. But I have an opinion about mixing such a factor with the E/KF algorithms which are probably unprintable.

CB

8. Do you mean to use the extended kalman filter? EKF is for non-linear application, isn't is? If i mix the EKF with forgetting factor. Am i need to rebuild a new kalman filter model?

9. Originally Posted by atlove
Do you mean to use the extended kalman filter? EKF is for non-linear application, isn't is? If i mix the EKF with forgetting factor. Am i need to rebuild a new kalman filter model?
EKF is not relevant here, your problem is entirly linear. I just mentioned it with the KF here because fading memory seems ill concieved when using either of these approaches because the design methodology has build in means of doing the equivalent without an ad-hoc modification.

CB

10. I think so. Actually i don't know why he suggested me to use moving window. May be i need a talk with my consultant.

Page 4 of 4 First 1234