| |
称为移动平滑滤波器,就是每个输出数据是平均多个输入而得,从而实现低通滤波功能。
其频率响应为H(f) = 1/M*(1+z^(-1)+...+z^(-M-1))
化简可得:H(f) = 1/M*(sin(pi *f / fs *M) / sin(pi *f / fs ))
详细的频谱特性可以用Matlab进行分析:
% Moving Average filter
N = 11; %延时
xn = sin(2*pi*[0:.1:51.1]); %n=[0:1:100]; sin(2*pi*f*t)=sin(2*pi*f*T*n)=>f=1Hz, fs=10Hz.
hn = ones(1,N); %脉冲响应
y1n = conv(xn,hn);
% transfer function of Moving Average filter
hF = fft(hn,512);
figure
plot([-256:255]/512, abs(fftshift(hF)));
xlabel('Normalized frequency');
ylabel('Amplitude') ;
title('frequency response of Moving average filter');