您的位置:首页 > 编程语言 > Python开发

【卡尔曼滤波器-Python】The g-h filter white white noise(白噪声)

2016-02-03 14:27 756 查看

用G-H滤波器减少白噪声

用G-H滤波器减少白噪声
白噪声的模拟

不同初值对滤波结果影响

白噪声的模拟

这里采用numpy.random.randn()函数随机生成期望为0的有限变量,生成的过程即在原始数据上加上随机生成的噪声,定义如下的函数

from numpy.random import randn
def gen_data(x0,dx,count,noise_factor):
return [x0+dx*i+randn()*noise_factor for i in range(count)]

mensurements=gen_data(5,2,100,10)




不同初值对滤波结果影响

采用上一篇博文中的G-H filter1进行滤波处理,并设定不同的初值得到的滤波效果

data=g_h_filter(data=mensurements, x0=5., dx=2., dt=1., g=0.2, h=0.01);




data=g_h_filter(data=mensurements, x0=100, dx=2., dt=1., g=0.2, h=0.01);




/article/10750178.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: