• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Help with FIR filters

marcopollo

Member
Joined
Dec 20, 2018
Messages
15
Likes
2
I'm trying to generate FIR filters to implement in my DSP. Here you can find the measurement made with REW after inserting two filters corresponding to the tweeter and the medium, which should replicate the LR 48 dB crossover. The result is excellent except for the dip that corresponds precisely to the crossover frequency of 2502 Hz. How can I do it? Thanks to everyone in advance for the help
FIR.jpg
 
Two options coming to mind:
1. The tweeter is effectively out of phase - try inverting its output.
2. You have some other time alignment issue between midrange and tweeter that may require some delay.

BTW, do gated nearfield measurements when trying to hunt down issues like that. Place microphone at <1 m on axis and try a window size of maybe 2 ms.
 
Two options coming to mind:
1. The tweeter is effectively out of phase - try inverting its output.
2. You have some other time alignment issue between midrange and tweeter that may require some delay.

BTW, do gated nearfield measurements when trying to hunt down issues like that. Place microphone at <1 m on axis and try a window size of maybe 2 ms.
Thanks for your help! I have to tell you that I'm not an engineer, nor an acoustics expert! I'm just trying to optimize my system by seeing if I can use FIR filters in my DSP (even though I don't know what a FIR filter is!)
The tweeter is not inverted. Should be a problem if my DSP supports only 2048 taps?
 
(even though I don't know what a FIR filter is!)
Well, that can be rectified.
seems a bit terse and dry, so I would recommend inglese as well:

Their most intriguing property may be the possibility to create linear-phase filters. Note that an impulse response that starts too abruptly can be troublesome due to associated pre-echo. BTW, the article mentions the possibility of non-causal FIR filters, but strictly speaking they are all causal. It is purely a matter of convention to consider t=0 to be in the middle of the impulse response, i.e. (N+1)/2 in, which is where the main lobe is in linear phase filters. This is what their effective group delay is.

Should be a problem if my DSP supports only 2048 taps?
That limits your impulse response to about 42.67 ms at 48 kHz, so you probably won't be able to do steep subwoofer crossovers like that, not to mention the associated delay.

You need to be careful when mixing FIR and IIR filters, as well as FIR filters of different orders. IIR filters tend to have a near-zero in-band group delay, whereas for a linear phase FIR filter its group delay will be a direct function of filter order (/taps). So if for example you have used a different filter order for the tweeter highpass than for the midrange lowpass in order to achieve a given response, you need to make up for the difference with delay in order to line things back up in the time domain. This can actually be useful to make up for differences in effective sound generation location between drivers, but be warned that it only works properly on-axis.
 
This is a simulation of two minimum-phase Linkwitz-Riley XO's with a crossover point of 2.5kHz.

1730773683530.png


The brown curve (flat line) is the summation of the LPF+HPF with normal polarity. The blue curve is the summation but with the polarity of the HPF inverted.

As the others have stated, the reason you have a dip is because the LPF and HPF are out-of-phase in the crossover band. This may be due to:

- Polarity inversion (180 deg out of phase)
- Time misalignment resulting in partial cancellation (e.g. if it is 150 deg out of phase it will still produce cancellation)

The first step when you generate crossovers is to check that the purely electrical filters sum to flat. You can do this in REW with A + B.

However, the actual output of the speaker is the result of the convolution of the electrical filter and the driver response. In REW, it is A * B. So you would need to do this operation: (Low Pass Filter * Woofer) + (High Pass Filter * Tweeter) to see a simulation of the combined output.
 
Thanks a lot Keith_W and AnalogSteph ! Although I have many problems understanding the nature of the filters, both IIR and FIR, I will try to start from scratch, first carefully checking the polarity of each speaker way and setting the same type of filter (LR 48 dB) for each crossover cut.
That limits your impulse response to about 42.67 ms at 48 kHz, so you probably won't be able to do steep subwoofer crossovers like that, not to mention the associated delay.
Now I understand why rePhase is unable to linearize the low frequency response in my DSP
 
Back
Top Bottom