Filter made using fir1 has poor low frequency cutoff performance.
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 3 Ott 2014
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 Commenti
Vedere anche
Categorie
Scopri di più su Digital Filter Design in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!