1

这是尝试创建高精度均衡器的快速而肮脏的代码:

bandPoints = 355;
for n = 1:bandPoints
         x = (n / (bandPoints + 2));
         f = (x*x)*(22000-20)+20; % 20...22000
         freqs(n) = f;
         niqfreqs(n) = f/22050.0;
         amps(n) = 0;        
end

amps(bandPoints+1) = 0; % firpm needs even numbers
niqfreqs(bandPoints+1) = 1; % firpm needs even numbers

% set some point to have a high amplitude

amps(200) = 1;
fircfs = firpm(101,niqfreqs,amps);

[h,w] = freqz(fircfs,1,512);
plot(w/pi,abs(h));
legend('firpm Design')

但它给了我

Warning:
  *** FAILURE TO CONVERGE ***
  Probable cause is machine rounding error.

所有 FIR 系数均为 0。

如果我将 n 参数从 101 降低到 91,firpm则可以正常工作,但频率响应远非理想。考虑到我想为支持多达 12288 个抽头的硬件 D​​SP FIR 模块计算 FIR 系数,如何让 Matlab 计算所需的系数?能够做到这firpm一点,还是我需要在 Matlab 和以后的应用程序 C++ 代码中使用另一种方法(逆 FFT)?

4

1 回答 1

0

哦,看来MP算法真的不能处理这个,所以我需要一些其他的解决方案:

http://www.eetimes.com/design/embedded/4212775/Designing-very-high-order-FIR-filters-with-zero-stuffing

我想,那时我将不得不坚持使用逆 FFT。

于 2011-10-18T11:41:27.813 回答