Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Mixed FIR/IIR filters for a 4-way speaker

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26606

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi,

Two years ago i build a nice 4-way speaker with a koax tweeter/midrange, two lowrange/midrange woofers in D'Appolito arrangement and bass woofer.
Crossovers and EQ was done by a minidsp 4x10.
Since a year i've started projects using FIR filters and linearization using the great rephase tool.
Recently i bought the OpenDRC-DA8 and the minidsp 2x4 HD, which both provide a FIR filter at each output channel.
Now I have started to replace the IIR filters and PEQs of my 4-way speaker by FIR filters or at least by a mix of IIR and FIR filters.
Currently the limited number of taps at 48kHz sample rate is allocated as follows:
Tweeter: 512 taps, HP LR48 @3500 Hz
Midrange: 718 taps, HP BW18 @ 600 Hz / LP LR48 @3500 Hz
Low/midrange: 1522 taps, HP LR24 @120 Hz / LP BW18 @ 600 Hz
Woofer: 2048 taps, LP LR24 @120 Hz
Using just the linear crossover filters this number of taps gives already good results.
I have tuned now the tweeter and midrange and linearized the frequency response. This works well and sounds great.
Now i have a question: As the D'Appolito requires BW18 crossovers these filters obviously cannot be build as FIR filter, so i have to use IIR filtering.
But how should i linearize the phase distortion, respec. Is it allowed to linearize the phase as the Butterworth phase response seems to be required for the D'Appolito arrangement?
It's probably the case that the 120 Hz crossovers have to created as LR24 IIR filters due to lacking taps. But how will the phase of these filters be linearized in the new dsps? The compensate mode of rephase probably shouldn't work because the LP and HP are located at two different channels, while the compensate filter is located in one channel only. Or do i have to duplicate the compensate filter and place it into both And finally i have a question about the Q characteristic of EQs. Does a IIR PEQ have a constant or proportional Q?
Any ideas are welcome.

Best regards

Thomas
Last Edit: 3 years 4 months ago by samoht.
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26626

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
Hi Thomas,
samoht wrote:
Now i have a question: As the D'Appolito requires BW18 crossovers these filters obviously cannot be build as FIR filter, so i have to use IIR filtering.
But how should i linearize the phase distortion, respec. Is it allowed to linearize the phase as the Butterworth phase response seems to be required for the D'Appolito arrangement?
Butterworth 18dB/oct filters can be done using the minimum-phase filter tab in rephase.
Now if you want to obtain a linear phase version, this is another thing: the principle of the odd order buterworth filters is to have a constant 90° phase difference that will result in a linear on-axis summation (-3dB at fs) and flat power response.
Thus cannot get a linear phase odd order Butterworth filter, *but* that does not mean that you cannot get a linear-phase resulting crossover ;)

Here is how to do it: dial a Butt 18dB/oct minimum-phase filter for your high pass and low pass sections (either in the FIR or IIR, it does not matter), and make sure one of the two sections has its polarity reversed.
Now add a LR 12/dB/oct linearization on both section, and voilà, although each filter section still has a phase shift and maintains a 90° difference, you get a flat phase crossover.

Here is an illustration :

summation of the butt 18dB/oct filters (one channel polarity reversed) in green


Now convolution of that summation with a LR 12dB/oct phase linearisation, result in green :


Of course applying the LR 12dB/oct linearization to each section before summation would lead to the same result.

Of course it goes without saying that we are talking about acoustical filter here, which means you have to compensate/EQ the response beforehand to get that BW18 target for both magnitude and phase.

This message has attachments images.
Please log in or register to see it.

download the last version of rephase here: rephase.org
Last Edit: 3 years 4 months ago by pos.
The administrator has disabled public write access.
The following user(s) said Thank You: samoht, sly

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26627

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
Now for your second question
samoht wrote:
It's probably the case that the 120 Hz crossovers have to created as LR24 IIR filters due to lacking taps. But how will the phase of these filters be linearized in the new dsps? The compensate mode of rephase probably shouldn't work because the LP and HP are located at two different channels, while the compensate filter is located in one channel only. Or do i have to duplicate the compensate filter and place it into both And

Not sure what you are trying to do here with the compensate mode.
If you don't want to linearize the phase of the high pass filter of your woofer (BR or sealed) then there is another solution you can try, which will not require any FIR filtering for that section.
You build the linear-phase LR 24dB/oct (acoustical) high pass filter for your mid section using all the remaining taps, and then you uses IIR filtering (and EQ) on the woofer section to obatin you acoustical minimum-phase LR 24dB/oct low pass filter.
Then you only have to play with delays to get the phase almost flat in the passband, by centering on the peak of the impulse :)

original in blue, negative delay (ie delay on other sections, which is already the case if FIR is used) in red



This "trick" only work with low pass filters ;)

Does a IIR PEQ have a constant or proportional Q?
IIRC miniDSP uses proportional Q EQs

This message has an attachment image.
Please log in or register to see it.

download the last version of rephase here: rephase.org
Last Edit: 3 years 4 months ago by pos.
The administrator has disabled public write access.
The following user(s) said Thank You: samoht

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26628

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
Now as if things were not already quite complicated, here is a final word of warning: I have stessed the fact that what you should be looking for with LR or BW target is always the resulting acoustical response (electrical+"natural"), for both phase and magnitude.
Now with such a large number of drivers and restricted passbands there is another phenomenon that you will have to consider when dealing with not flat phase responses: www.linkwitzlab.com/frontiers_5.htm#V

Full fledged linear-phase crossovers *really* makes things easier here.

In you case, if you shoot for linear-phase acoustical crossovers (ie possibly non linear phase acoustical filters for the BW 18dB/oct crossover), then the only remaining phase shift should be the system's high pass (unless you also linearize its phase, but... you cannot given the number of taps at hand).
If this is for example a BR tuned around 30Hz, then the effect of its phase shift will be visible at 120Hz, and so you should also include a 24dB/oct minimum-phase HP filter at that tuning frequency in the mid section.


:whistle:
download the last version of rephase here: rephase.org
Last Edit: 3 years 4 months ago by pos.
The administrator has disabled public write access.
The following user(s) said Thank You: devteam, samoht

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26630

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Dear Pos,

Thank you for your quick answers.

I just tested your proposed settings first in my test environment without real drivers. It's working perfect. I even succeeded to use FIR filters for the woofer.
Now it keeps being a full range linear phase system.
Then i transfered the new settings to the setting of my true drivers and are they working perfect, too.
When i have finished the overall equalizing of the speaker i like to send you the rephase files for your evaluation and comments.

Fantastique!! Vous etez le Einstein de filtrage!

Best regards

Thomas

PS: one last question: How did you manage to overlay two FiR filters as shown on your screen shot?
Last Edit: 3 years 4 months ago by samoht.
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26648

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
Glad it works for you :)
Do not exaggerate though, this is not nuclear rocket science :laugh: :P
samoht wrote:
PS: one last question: How did you manage to overlay two FiR filters as shown on your screen shot?
I imported the generated txt FIR into HOLM Impulse, which allows up to 3 simultaneous curves, and also let you perform convolution and summation operations.
download the last version of rephase here: rephase.org
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26650

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi Pos,

Thanks again for your answer.
Of course it is not nuclear rocket science, this does not need to be precise because of the big blast. But filters must be

I made an interesting observation.
Obviously parametric equalizers of constant or proportional Q do need different calculation effort and the precision of the result is also different.
What is the reason for that?

Best regards

Thomas
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26651

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
samoht wrote:
I made an interesting observation.
Obviously parametric equalizers of constant or proportional Q do need different calculation effort and the precision of the result is also different.
What is the reason for that?

Proportional Q EQs typically have higher "apparent" Q than constant Q EQs of same gain and Q values (if that makes any sense :huh: )



Higher Q means longer oscillations in the impulse response, which implies more of it will get truncated when windowing it to a FIR of a given length, which in turn results in more deviations from target.

Now if you adjust Qs to get the same response from both EQ types then results will be identical.

This message has an attachment image.
Please log in or register to see it.

download the last version of rephase here: rephase.org
Last Edit: 3 years 4 months ago by pos.
The administrator has disabled public write access.
The following user(s) said Thank You: devteam

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26663

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi Pos,

Thanks for your answer . This explains what i noted.

Best regards

Thomas
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26702

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi Pos,

My setting reaches maturity. It's now a smart mix of IIR and FIR filters.
This saves ressources on taps.
I build the xovers above 1 kHz with linear FIR filters and those below 1 kHz with IIR in the Xover section of the OpenDRC, just the linearization remains with rephase.
When determining the number of taps allocated to each output channel i made the observation that sometimes a slightly higher number of taps leads to more amplitude and phase distortion and longer iteration loops than a lower number. Is this possible and why? Is there a relation between some parameters?
Another question: i have equalized the woofer with a Linkwitz biquad to -3 dB @ 30 Hz with a Q= 0.707. It's a closed box. So the rolloff of the woofer shows Butterworth behaviour. In addition i set anothet BW12 HP @30 Hz in order to get a higher rolloff slope. Both filters together should form a LR24 to my opinion. Is this correct? And how to linearize this rolloff? I selected the closed box compensation with a Q=0.5. that should be correct, or?


Best regards

Thomas
Last Edit: 3 years 4 months ago by samoht.
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26711

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
Hi Thomas
samoht wrote:
When determining the number of taps allocated to each output channel i made the observation that sometimes a slightly higher number of taps leads to more amplitude and phase distortion and longer iteration loops than a lower number. Is this possible and why? Is there a relation between some parameters?
I can see that happen when using the energy centering, or with some specific cases of optimization.
But with a fixed centering (in %), same windowing algorithm, and not optimization I would say the result should always only get better with more taps.
Another question: i have equalized the woofer with a Linkwitz biquad to -3 dB @ 30 Hz with a Q= 0.707. It's a closed box. So the rolloff of the woofer shows Butterworth behaviour. In addition i set anothet BW12 HP @30 Hz in order to get a higher rolloff slope. Both filters together should form a LR24 to my opinion. Is this correct? And how to linearize this rolloff? I selected the closed box compensation with a Q=0.5. that should be correct, or?
Yes two identical Butterworth will form a Linkwitz-Riley.
You can use a linear-phase 2nd order Butterworth filter (2nd order Q=0.707) and only linearize the phase of the remaining minimum-phase Butterworth with the "closed Q=0.707" entry.
Another solution is to use a minimum-phase 2nd order Butterworth filter, and linearize the final Linkwitz-Riley 24dB/oct acoustic target with the "LR 24dB/oct" entry.
Both solutions will give the exact same result.
download the last version of rephase here: rephase.org
The administrator has disabled public write access.
The following user(s) said Thank You: devteam

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26716

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi Pos,

Thanks again for your quick and perfect answer.

Best regards

Thomas
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26718

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi Pos,

I'm playing a little bit with the centering options, which in detail are hidden secrets for me.
Editing 100% and selecting "use of exact centering value" provode the best result for the woofer. Is this setting okay or are there any problems?
The delay is increased by factor of 2.
For the tweeter 100% centering doesn't work for the HP.

Best regards

Thomas
Last Edit: 3 years 4 months ago by samoht.
The administrator has disabled public write access.

Mixed FIR/IIR filters for a 4-way speaker 3 years 4 months ago #26737

  • pos
  • pos's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 346
  • Thank you received: 196
  • Karma: 39
The centering option defines the position of the impulse peak within the finite window.
Middle (or 50%) set the peak in the center of the FIR and is the logical choice when you are using linear phase filtering only (which can only be a theoretical situation) where the energy is equally spread around the peak, or when you don't want to have to worry about delay adjustment (or when you have enough taps at hand not to worry about such things as taps optimization strategies :) )
A lower % value (say 1%, or 1ms, or...) is a good option for minimum-phase only corrections, where the energy (IR oscillations) occurs after the peak (causal).
A higher % value (say 99%) is a good option for phase linearization only corrections, where the energy occurs before the peak.
"Energy" centering is supposed to compute the best centering based on energy (trying to "capture" most of the energy within a sliding window), but does not always give the best result in practice due to windowing algorithms and iterative optimization strategies.

Regarding the second centering option, you should really only use the "closest perfect impulse" setting, unless you absolutely need a very precise (less than a sample) centering/delay.
download the last version of rephase here: rephase.org
The administrator has disabled public write access.
The following user(s) said Thank You: devteam, samoht

Mixed FIR/IIR filters for a 4-way speaker 3 years 3 months ago #27476

  • samoht
  • samoht's Avatar
  • Offline
  • Expert Boarder
  • Posts: 111
  • Thank you received: 9
  • Karma: 1
Hi Pos,

The setting is almost perfect. I changed the filtering of the D'Appolito section to Horbach-Keele filters which work very nice.
After reading the papers of Horbach and Keele i started playing with Horbach-Keele filters in rephase.
I noticed that the exact ratio 1.0 leads to forbidden division by zero and a crash of rephase. The ratio 1.0 is used by Horbach-Keele for implementimg a single central tweeter. Horbach-Keele changed the formula of the filter for the special case of R= 1.0, otherwise the standard filter formula shows division by zero, too.
Last question: What does the "Horbach-Keele last" filter mean?

Best regards

Thomas
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: devteam