Optimal FIR Filter Design Procedure for the Parks–McClellan Algorithm

조회 수: 1 (최근 30일)
Zehaib Hussain
Zehaib Hussain 2015년 11월 17일
답변: Satyajeet Sasmal 2015년 11월 19일
This code for calculating frequency/phase response works fs=8000;
f=[ 0 0.15 0.25 0.4 0.5 1]; % Edge frequencies
m=[ 0 0 1 1 0 0]; % Ideal magnitudes
w=[ 39 10 39 ]; % Error weight factors format long
b=remez(25,f,m,w) % (25+1) taps Parks-McClellan algorithm and Remez exchange
freqz(b,1,512,fs); % Plot the frequency response
axis([0 fs/2 -80 10])
But this doesn't work when i change the filter specification to:
fs=8000;
f=[ 0 0.01750 0.01875 0.06750 0.06755 0.1250]; % Edge frequencies
m=[ 0 0 1 1 0 0]; % Ideal magnitudes
w=[ 1220 1 1220 ]; % Error weight factors format long
b=remez(134,f,m,w) % (134+1) taps Parks-McClellan algorithm and Remez exchange
freqz(b,1,512,fs); % Plot the frequency response
axis([0 fs/2 -80 10])

답변 (1개)

Satyajeet Sasmal
Satyajeet Sasmal 2015년 11월 19일
Hi Zehaib
For your second filter specification, setting the axis limits to [0 fs/2 -80 10] forces your y-axis to be limited from -80 db to 10 db. Whereas, your Magnitude vs Frequency graph for the second case requires your magnitude to in the order of 2.4k db to 3k db (see image below)
Figure 1 is the second filter in your case.
Hope this answers your question.
-Satya

카테고리

Help CenterFile Exchange에서 Filter Design에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by