Filter made using fir1 has poor low frequency cutoff performance.
조회 수: 6 (최근 30일)
이전 댓글 표시
I am using the fir1 function to produce coeff's for a bandpass filter. The high frequency cutoff is good, but when I try and use a relatively low number for the low cutoff (Wo = 1/750) and use freqz to check the frequency response it looks like there is almost no attenuation right down to DC. Is this just due to the plotting or am i using the wrong method?
I create my Coeff's like so:
Coffs = fir1(100,[1/750 4/15])
And then check the performance with:
freqz(coffs,1,65536)
The attenuation in the upper stop band is totally fine, but I can't seem to make it attenuate in the lower stopband...
Thanks in advance.
댓글 수: 0
답변 (1개)
Star Strider
2014년 10월 3일
The extremely low lower passband frequency may make the bandpass filter design unrealisable. The best you may be able to hope for is to cascade a highpass and lowpass filter:
Coffs1 = fir1(1000,1/750,'high');
Coffs2 = fir1(100, 4/15, 'low');
x = [zeros(1,15000) 1 zeros(1,15000)];
y1 = filtfilt(Coffs1,1,x);
y2 = filtfilt(Coffs2,1,y1);
h = fft(y2)./fft(x);
Fn = 1/2;
Fv = linspace(0,1,length(h)/2-1);
Iv = 1:length(Fv);
figure(1)
subplot(2,1,1)
semilogx(Fv, 20*log10(abs(h(Iv))))
grid
ylabel('Magnitude (dB)')
subplot(2,1,2)
semilogx(Fv, angle(h(Iv))*180/pi)
grid
ylabel('Phase (degrees)')
xlabel('Normalised Frequency')
Experiment with these to get the response you want. This is my best effort!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!