选择低通滤波器参数

时间:2016-01-05 16:08:45

标签: matlab filter

我有以30 fps采样的对象位置。我希望借助低通滤波器从位置移除高频。

我对如何在这方面选择过滤器参数感到困惑 - >

[b,a] = butter(n,Wn) 
在这种情况下,

nWn

数据:

K>> [xcor_i,ycor_i ]

ans =

 -101.7000  -77.4040
 -102.4200  -77.4040
 -103.6600  -77.4040
 -103.9300  -76.6720
 -103.9900  -76.5130
 -104.0000  -76.4780
 -105.0800  -76.4710
 -106.0400  -77.5660
 -106.2500  -77.8050
 -106.2900  -77.8570
 -106.3000  -77.8680
 -106.3000  -77.8710
 -107.7500  -78.9680
 -108.0600  -79.2070
 -108.1200  -79.2590
 -109.9500  -80.3680
 -111.4200  -80.6090
 -112.8200  -81.7590
 -113.8500  -82.3750
 -115.1500  -83.2410
 -116.1500  -83.4290
 -116.3700  -83.8360
 -117.5000  -84.2910
 -117.7400  -84.3890
 -118.8800  -84.7770
 -119.8400  -85.2270
 -121.1400  -85.3250
 -123.2200  -84.9800
 -125.4700  -85.2710
 -127.0400  -85.7000
 -128.8200  -85.7930
 -130.6500  -85.8130
 -132.4900  -85.8180
 -134.3300  -86.5500
 -136.1700  -87.0760
 -137.6500  -86.0920
 -138.6900  -86.9760
 -140.3600  -87.9000
 -142.1600  -88.4660
 -144.7200  -89.3210

代码:

[b,a] = butter(6,0.6,'low');
dataOut_x = filter(b,a,xcor_i);
dataOut_y = filter(b,a,ycor_i);

K>> plot(xcor_i,ycor_i,'Linewidth',2 );
K>> hold on
K>> plot(dataOut_x,dataOut_y,'Linewidth',2)

enter image description here

显然,我的参数不正确。

0 个答案:

没有答案