我的数据
1 14.7
2 14.58
3 14.82
4 14.59
5 14.67
... ...
150 13.76
我已经绘制了图形和上/下信封线。接下来,我要对u / l包络线应用Kalman平滑器。有关于卡尔曼平滑器的适当示例吗?
def kalmanfilter(x,p,z,r):
# p - estimate unceratininty
# r - measurement unceratininty ( σ2 )
# z - Measured System State
# Kalman gain calculation
K = p/(p+r)
# estimate current state
x1 = x + K*(z-x)
# update current estimate uncertainity
p1 = (1-K)*p
return (x1,p1)