Optimal FIR Filter Design Procedure for the Parks–McClellan Algorithm
6 ビュー (過去 30 日間)
古いコメントを表示
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])
0 件のコメント
回答 (1 件)
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Filter Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!