本文整理汇总了Python中filterpy.kalman.KalmanFilter.sigma方法的典型用法代码示例。如果您正苦于以下问题:Python KalmanFilter.sigma方法的具体用法?Python KalmanFilter.sigma怎么用?Python KalmanFilter.sigma使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类filterpy.kalman.KalmanFilter
的用法示例。
在下文中一共展示了KalmanFilter.sigma方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: HiKF
# 需要导入模块: from filterpy.kalman import KalmanFilter [as 别名]
# 或者: from filterpy.kalman.KalmanFilter import sigma [as 别名]
x_dim = CO2.x_dim
z_dim = CO2.H_mtx.shape[0]
# theta = (1.14,1e-5)
kf = HiKF(x_dim, z_dim)
kf.x = np.zeros((x_dim, 1))
kf.H = CO2.H_mtx
kf.F = np.identity(x_dim)
kf.R = theta[1] * kf.R
grid = CO2.grid
# create Q
Q = common.getGCF(grid, Qparam[0], Qparam[1])
kf.PHT = np.zeros([x_dim, z_dim])
kf.QHT = theta[0] * theta[1] * dot(Q, kf.H.T)
kf.var = np.zeros((x_dim, 1))
kf.sigma = theta[0] * theta[1]
return kf
def CO2_filter(CO2, param):
"""main loop of filtering"""
# Initialize filter matrices
kf, var = select_filter(param, CO2)
data, x = [], []
x_kf, var_kf = [], []
for i in range(param.nsteps):
# simulation
data.append(CO2.move_and_sense())
x.append(CO2.x)