FIR Filters: calculation power, length of impulse responses, and frequency resolution
This article covers filter lengths and frequency resolution given by a standard filtering approach and improvements yielded by using down- and upsampling stages.
The following picture shows the signal flow inside one DSP of the HD2
The PEQ (parametric EQ) banks are implemented in double precision arithmetic.
The crossover FIR filters are situated between down- and upsampling stages. This allows calculation of FIR filters with long impulse responses / high number of coefficients.
The DSP has a main and a coprocessor with a calculation power of 275 MIPS (million instructions per second) each. The FIR filters are completely processed in the coprocessor. Some MIPS are reserved for IO operations, so in the end, 250 MIPS can be used for FIR processing. Processing one filter coefficient takes one instruction cycle of the DSP. Thus, 250 million coefficients per second can be processed. At a sampling frequency of 96 kHz, each coefficient has to be processed 96000 times per second, so 250 000 000 / 96 000 = 2604 coefficients can be processed.
The number of coefficients for each path is limited by
- the calculation power of the DSP
- memory usage of the coefficients inside the DSP
1. Filter length depending on the calculation power
A DSP provides 4 output paths. For a sampling frequency of 96 kHz, 650 coefficients per path can be used.
Calculation: 250 MIPS / 96 kHz / 4 paths = 650 / path
For 48 kHz, the maximum number of coefficients doubles to 1300.
In the frequency domain, the FIR filter consists of amplitude and phase values at discrete frequency values. The distance of the frequency values is given by the sampling frequency divided by the number of coefficients. For 650 coefficients at 96 Khz, this yields 96000Hz / 650 = 147,7Hz or 48000Hz / 1300 = 37Hz
At low frequencies, this density is not high enough to reasonably define an equalizing or crossover filter.
The length of the filters' impulse response is given by 650 / 96000 Hz = 6,77 ms or 1300 / 48000 Hz = 27 ms.
This can be improved dramatically by using down- and upsampling stages.
2. Filter length depending on memory usage of its coefficients
The crossover filter of a woofer or a subwoofer uses only a small range of the frequency range provided by the signal processing. The range between e.g. 500 Hz and 48 kHz is „wasted“ for processing stop band suppression. Thus, for this example, the sampling rate could be reduced to 1 kHz without losing parts of the audio signal. The processing power used for a filter is proportional to the sampling rate. The signal processing inside the HD2 makes use of this and reduces the sampling rate depending on the crossover frequencies in steps of 1, 2, 4, 8, and 16. Note, that the filter length and the frequency resolution, then, also improve by a factor of 16. Thus, one obtains not a linear but a quadratic improvement with the downsampling factor. See table below for examples.
Down- and upsampling with a factor of 16 means that the FIR filter processes only every 16th input sample. To comply with the Nyquist criterion, a lowpass filter is used to suppress frequency components above 96kHz / 2 / 16 = 3 kHz. The FIR filter itself, then, only uses 1/16th of the processing power at full sampling frequency but can be used only up to frequencies of about 96000 kHz / 16 / 2 = 3kHz. The downsampling filter causes some damping in the region of its cutoff frequency which has to be compensated for. Due to this effect, the usable frequency range should be chosen smaller than one third of the theoretical „new“ Nyquist frequency. That is, the usable range for the above example is 96000Hz / 16 / 2 / 3 = 1kHz.
One down- and upsampling stage use about 1 MIPS of processing power at 96 kHz independent of the donwsampling factor. This stages are processed in the main processor and do not diminish the processing power available for the FIR coefficients which are processed in the coprocessor.
Now. the maximum number of coefficients, is mostly limited by the memory usage of the coefficents. In a 4-way setup, a maximum number of 2048 coefficients per path can be stored in memory.
|Path||DS||Coefficents||Usable frequency range||MIPS||Frequency resolution||Length of impulse response|