Python中的卡尔曼平滑器

问题描述 投票:1回答:1

我的数据

1    14.7
2    14.58
3    14.82
4    14.59
5    14.67
...  ...
150  13.76

我已经绘制了图形和上/下信封线。接下来,我要对u / l包络线应用Kalman平滑器。有关于卡尔曼平滑器的适当示例吗?

python smoothing kalman-filter
1个回答
0
投票
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)
© www.soinside.com 2019 - 2024. All rights reserved.