Uploaded by bineilthapa

Qn 1 and Qn 2

advertisement
Qn 1 and Qn 2
The iteration stops when our error in estimation is very small, close to zero.
Until that we kept on iterating.
How P and R value taken here ?
P – assumed initially, close to the value of R
R – Comparing with same days previous week values
Monday1 Monday2
161
159
Let’s assume R = 159 – 161 = 2
Let’s assume than P, close to R = 4
Let’s find K = P/(P+R)
K = 4/(6)= 2/3 = 0.66
Suppose X = 157
And Z = 161 based on previous week
We find,
r = 157 + 0.66(161-157)
r = 159.64, = 160
The New p = P * (1 - k )
= 4 * (1 – 0.66)
= 1.36
Therefore, p = 1.36
1 iteration
Monday1 Monday2
161
159
R=3
Z = 159 based on previous week
Z= measured value of the parameter
P= p = 1
Then K1 = P/(P+R) = 1.36/4.36 = 0.312
X = r = 160
r1 = X + K1*(Z-X)
= 160 + 0.312 (159-159.65)
= 159.7972
The new p = P * (1- K1)
1 * (1- 0.312)
= 0.668
2 iteration
R = 0 implies k =1
p = P * (1 - 1) = 0
This means any measurement error close to 0 i.e 1 give rise to error in estimation zero
And which implies no error in our estimation and the current steps gives the predicted values.
Done for Monday
We have given previous week data.
Then we find K
K = 𝑃/(𝑃+𝑅)
With this we find current estimation r
r = X + K*(Z-X)
X = estimated value which is assumed first time, calculated based on the average of sensor
values obtained in the 5 min
then we find new p =P*(1-K)
where we have P and K calculated
Then for Next iteration,
K = p./ (p + R), R calculated from previous comparison
New r = r + K*(Z-X)
This iteration goes on and on until the iteration stops when our error in estimation is very small,
close to zero.
This is where we have to introduce covariances.
Download