![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/836160/image.png)
How to create linear phase filters for filter bank?
8 ビュー (過去 30 日間)
古いコメントを表示
I tried firpr2chfb function as follows
N = 19;
[h0,h1,g0,g1] = firpr2chfb(N,.45);
fvtool(h0, 1, h1, 1)
I have something like, and I don't think these are linear phase filters
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/836085/image.jpeg)
0 件のコメント
回答 (1 件)
Mathieu NOE
2021 年 12 月 16 日
hello
the phase roll rate must be constant like in the example below
%% define filters
fs = 10000;
freq = linspace(100,(fs/2),500);
% 1 - LPF FIR / cutoff frequency 3 KHz
N = 64;
fc_lp = 1000;
B_lp = fir1(N,2*fc_lp/fs);
h_lp=freqz(B_lp,1,freq,fs);
m_lp=20*log10(abs(h_lp));
% 2 - BPF FIR / cutoff frequencies 2 and 5 KHz
N = 64;
fc_low = 1000;
fc_high = 3000;
B_bp = fir1(N,2*[fc_low fc_high]/fs);
h_bp=freqz(B_bp,1,freq,fs);
m_bp=20*log10(abs(h_bp));
% 3 - HPF FIR / cutoff frequency 4 KHz
N = 64;
fc_high = 3000;
B_hp = fir1(N,2*fc_high/fs,'high');
h_hp=freqz(B_hp,1,freq,fs);
m_hp=20*log10(abs(h_hp));
figure(1),
subplot(211),plot(freq,m_lp,freq,m_bp,freq,m_hp);
title('FIR Filters Response');
ylabel('Gain in dB');
legend('LPF','BPF','HPF');
subplot(212),plot(freq,180/pi*angle(h_lp),freq,180/pi*angle(h_bp),freq,180/pi*angle(h_hp));
ylabel('Phase(°)');
xlabel('Frequency (Hz)');
legend('LPF','BPF','HPF');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/836160/image.png)
2 件のコメント
Mathieu NOE
2021 年 12 月 17 日
hello
as far as I remember , linear-phase FIR filter overall group delay is (N-1)/2 where N is the length of the filter
I don't see where the channel number's has an impact on group delay
参考
カテゴリ
Help Center および File Exchange で Filter Banks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!