rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool

Kirkeby

Now, back to Kirkeby. I do not own a device, that is based on this algorithm, therefore I am struggling to understand the implications of their method.
  • When you create a system (loudspeaker+Kirkeby equalizer) to equalize the loudspeaker between F1 and F2 – is the system between F1 and F2 “linear phase”, or “minimum phase”.
  • As I understand, such system has transition regions below F1 and above F2. So my next question is: within the transition regions, is the system “minimum-phase”, or “linear-phase” or “undetermined-phase”.
  • Do the transition regions fall into the audio bandwidth for any driver?. If yes are they audible?. How do you deal with this issue?.
  • Can you run Kirkeby equalizer in minimum-phase mode, or it imposes straight away linear-phase mode?.
Can anybody answer these questions?.
Kirkeby is simply an elegant way to avoid EQing -40dB dips. It was developed for Room + Speaker EQ so has to deal with HUGE dips.

You measure the IR in a room and take the FFT. You can invert (in freq domain) this directly but then the -40dB dips translate to +40dB peaks in the EQ.

Inverting a measured (complex freq) response is the most naive way to use supa dupa digits and gives very poor results including blown speakers & amps.

What Kirkeby does is to add a 'Re' error band to the original FFT so they are no -40dB dips to EQ. You have to excuse Prof. Farina for obfuscating this in loadsa maths but that's all Kirkeby does.

Kirkeby is just a simple way to get less naive & yucky results. It usually results in sorta Linear Phase for the 'pass band'. The smaller the error band, the closer it is to LP but it doesn't really get there. It NEVER gets close to Minimum Phase except for trivial examples.

The main problem with Kirkeby isn't with the technique itself. But that it encourages people to stop thinking about what they are actually measuring. Even Angelo was/is guilty of that.

One BIG problem is that ALL measurements have NOISE. Using a straight inversion technique like Kirkeby means this measurement noise is convolved with your signal. When you apply this to eg a sine wave, you get noise sidebands.

Then there are all the peaks & dips from poor measurement technique rather than your speaker or microphone. I can claim to have taught Prof Farina something about that :)

pos is right that it's important to think carefully when you EQ. In ALL EQ, what you DON'T EQ is as, if not more important, than what you EQ.
________________

Barley, how do you measure the "anechoic" response that you EQ? In a room?
 
Hi kgrlee,

Thank you for your response.

I think we can safely leave equalizing the -40dB dips and also measurement noise out of this discussion.

I am specifically interested in what characteristics are exhibited by equalized system. For simplicity, we can call it loudspeaker+equalizer (no crossover).

Your comment is:

“..It usually results in sorta Linear Phase for the 'pass band'. The smaller the error band, the closer it is to LP but it doesn't really get there. It NEVER gets close to Minimum Phase except for trivial examples….”

OK, I’ll take this for an answer, due to lack of others. So, my understanding is, that the Kirkeby equalizer does not offer minimum-phase equalization.

Secondly, I am specifically interested in transition regions, their characteristics and the consequences of introducing them. You have not commented on these?.

Best Regards,
Bohdan
 
POS, while I understand what you are saying about equalizing flat based on a single measurement, what happens off axis is largely dependent on the design of the speaker. If constant directivity is maintained off axis then the single point reference for eq is actually pretty good.
I am not talking about the directivity behavior per se, but on the artifacts you will get with a single point measurement (diffraction for example).

If you don't want to EQ every small ripple you can start with a smoothed response, like 1/3 octave smoothing applied to the reference measurement.

In any event it is still possible to take any number of measurements and average them with the UE. The danger with that approach is that such an averaged response can actually result in a reference response that is worse than the measurement at any of the points contributing to the average. This is because you are not dealing with a simple average of amplitude but of a vector sum. This becomes very sensitive at higher frequency where the averaged response may exhibit comb-filtering effects.
Assuming the offset is always made correct averaging several measurement should work (HOLM for example is able to use fractional offsets for the impulse, and it automated offset detection is quite reproducible).
But anyway, spatial averaging (multiple measurements) or frequency averaging (smoothing) is not the solution as it will only smooth the problems and blur their effects, as you pointed out. So ultimately even that solution is not optimal, and automated correction base on one measurement (even averaged) is not that good a solution. And it is also not as simple as it was advertised anymore ("measure, set a target curve, and you are done").

On the other hand, taking multiple measurements and looking at the effect of a given (manual) correction on each of them alternatively (and adjusting it) looks like a good solution to me, as you are then able to really ponder every and each correction you make.
It takes some time to do, but at least there is no surprise at the end. And in fact it is not that much longer to do than a proper averaging/smoothing strategy...

For now to do that with rePhase you have to use an external convolution engine of the measurement (using HOLM or REW for example), but I will soon implement it in rePhase. It takes some time because I want to do it right, with the possibility to load several measurements and switch from one to another easily...
 
I think we can safely leave equalizing the -40dB dips and also measurement noise out of this discussion.
Actually you can't. Measurement noise is ALWAYS there. If your EQ method doesn't deal with it, the resulting EQ will convolve noise sidebands onto sine waves.

I am specifically interested in what characteristics are exhibited by equalized system. For simplicity, we can call it loudspeaker+equalizer (no crossover).

Your comment is:

“..It usually results in sorta Linear Phase for the 'pass band'. The smaller the error band, the closer it is to LP but it doesn't really get there. It NEVER gets close to Minimum Phase except for trivial examples….”

OK, I’ll take this for an answer, due to lack of others. So, my understanding is, that the Kirkeby equalizer does not offer minimum-phase equalization.
Not in any of the forms I've seen including Angelo's.

Secondly, I am specifically interested in transition regions, their characteristics and the consequences of introducing them. You have not commented on these?.
Usually, the 'transition' regions simply have bigger 'error bands' so less EQ is done. So less close to Linear Phase. Results vary from example to example.

Remember, Kirkeby is simply an elegant method to avoid EQing big dips. It doesn't do anything more. But it does this very well if a lot of reflections make the original VERY non-Minimum Phase.

For 'anechoic' or 'near anechoic' EQ of speakers, IMHO there are better methods. From what I can see, this is what most people here are doing here. DRC has good discussions on the topic though I don't agree with everything Dennis says.

I do points 1-4 with my favourite methods which involve medium size IIRs and address noise modulation & measurement artifacts.

I don't think points 5-6 are worth doing cos my Blind Listening Tests bla bla including Greenfield etc. But this was all 20 yrs ago and we really didn't have the computing power to do 5-6 properly in da old days. I'd like to re-visit this but I'm really a beach bum these days.

Even then, I believe there are far more important things to correct than excess phase. Just my $0.02

BTW, the original Kirkeby paper was presented to the Institute of Acoustics, NOT AES. The co-author (who's name I ashamed to have forgotten) is now head of the ISVR, Southampton. Steve Elliot
 
Last edited:
Guys, those discussions are really interesting (I mean it), but I would prefer to keep that thread a little bit more focused on rePhase if possible. As it is now a user of rePhase would have difficulties to find any relevant information on the use of that software in that thread.
Comparisons between automated and manual corrections are interesting, as it allow the user to choose its path, but then for the sake of clarity I feel discussions really specific to automated correction and UE should be kept out of that thread if possible (there is a dedicated thread).

Did you guys actually *try* rePhase? :p
 
Last edited:
Hi kgrlee,

Many thanks for the comments.

Perhaps I am the one confused here. This is because I was lead to believe, that Kirkeby algorithm was used to equalize loudspeakers, or in general acoustic systems.
For example, Angelo Farina’s “Advancements in impulse response measurements by sine sweeps”, where he uses the Kirkeby filter to equalize his acoustic measurement system. Interestingly, even though Farina calculated the Kirkeby equalizer filter from 10Hz to11kHz, the filter did not equalize below 200Hz, prompting Farina to make a comment about it.

My concern about the transition regions was, that introducing “manually shaped” transition function at low-end of the woofer response and high-end of the tweeter response, creates something completely artificial, and inserts it into the frequency response being immediately adjacent to the 3dB pass band. Were the effects ever evaluated/measured?. Is it still Hi-Fi?.

Anyway, thank you for your insight, as I have now developed a firm conviction to stay away from the Kirkeby algorithm in relation to loudspeakers EQ.




Pos,

I did not mean to highjack the thread – sorry. The thread was dying anyway, and people were visibly loosing interest. Since Kirkeby was mentioned in the thread, I wanted to pick the brains of people-in-the-know. This was not discussion about UE.


Best Regards,
Bohdan
 
... lead to believe, that Kirkeby algorithm was used to equalize loudspeakers, or in general acoustic systems.
I think it is only Angelo (and his disciples) who use the word "Kirkeby" in this way. You need to look up the original IoA paper to confirm this.

For example, Angelo Farina’s “Advancements in impulse response measurements by sine sweeps”, where he uses the Kirkeby filter to equalize his acoustic measurement system. Interestingly, even though Farina calculated the Kirkeby equalizer filter from 10Hz to11kHz, the filter did not equalize below 200Hz, prompting Farina to make a comment about it.
Angelo & I have been discussing this for a long time, as is Fons Adreaensen who is a true Linux DSP guru. (I'm only a pseudo one :) ) Fons & I like IIRs while Angelo prefers FIRs, hence his liking for "Kirkeby". Fons now works for Angelo so perhaps we can turn him from the Dark Side. :eek:

My concern about the transition regions was, that introducing “manually shaped” transition function at low-end of the woofer response and high-end of the tweeter response, creates something completely artificial, and inserts it into the frequency response being immediately adjacent to the 3dB pass band. Were the effects ever evaluated/measured?. Is it still Hi-Fi?.
Angelo doesn't really have transition bands as such. He just lets the 'error' become greater there.

There's many ways to treat the 'transition'. One method is the "Target Function" approach first published by KEF. In some ways, all the evil LR xovers are adaptations of this.

I used to work for Calrec who designed mixers mainly for Broadcast organisations like the BBC. From that, I have a strong liking for band limited signals cos they sound better. :eek: There is much BBC research into this and I have done so too.

.. as I have now developed a firm conviction to stay away from the Kirkeby algorithm in relation to loudspeakers EQ.
Don't dismiss Angelo's "Kirkeby" too quickly. When you start doing room EQ, you may find it useful. Especially as you use evil FIRs :)

pos, much of what we discussed here is of relevance to any Digital EQ method.
 
Pos,

I did not mean to highjack the thread – sorry. The thread was dying anyway, and people were visibly loosing interest. Since Kirkeby was mentioned in the thread, I wanted to pick the brains of people-in-the-know. This was not discussion about UE.


Best Regards,
Bohdan
This thread was not meant to be ultra active, it was meant to be the reference thread for rephase (as there is no documentation), and it is linked in the rephase sourceforge page. It is meant for people (hopefully users) to ask questions and find answers about rephase without skimming hundreds of OT messages.

If you look at the first post as well as the first few pages you will find that there was an effort to consolidate something around this idea (changelog, new version announcement, feature requests, bug reports, etc.).

If the thread is not active for XX days, weeks, or months, so be it: it will remain accessible (from google or the sourceforge page, etc.) for people to ask questions and find examples and links. I prefer this to an overactive thread with none of the participants being actual users of rephase, even if the discussion are interesting...
 
pos, much of what we discussed here is of relevance to any Digital EQ method.
so why did it end up in this particular thread? :rofl:

Seriously, I am not against some general EQ/FIR/convolution discussion, especially when there are so knowledgeable people like you involved, but it would be more on topic if it could be related to some degree to rephase ("from time to time" as CopperTop said). Why not open a more general thread about those topics?
I would be very interested in your opinion and evolution ideas about rephase if you would try it.
 
BTW, the original Kirkeby paper was presented to the Institute of Acoustics, NOT AES. The co-author (who's name I ashamed to have forgotten) is now head of the ISVR, Southampton. Steve Elliot
Du.uuh! It were Phil Nelson before he became Prof Nelson. The original was an IoA paper but there is a JAES version.

[16] Kirkeby, 0. & Nelson, P.A, "Digital Filter Design for Inversion Problems in Sound Reproduction", JAES Vol 47, jul/aug99
 
pos, I tried re-reading this thread but gave up at about page 20.

I was trying to find out if you actually implemented IMPORT of a WAV file impulse or other measurement. This is certainly worth doing if just to make it easier for users to see what improvement they get.

Another worthwhile addition is Minimum Phase EQ.

You might like to have a look at

[25] Ramos G & Lopez J, "Filter Design Method for Loudspeaker Equalization Based on IIR Parametric Filters", JAES 54 no12 dec06

It's an auto method for IIRs but you might find it useful for your dreaming up a target which you can implement with your FIR. In "Simple Arbitrary IIRs", I say of this method ..

"The largest discrepancy between the current response and the target is EQd with the first parametric, then the largest remaining discrepancy with the second parametric … and so on. When the parametrics are used up, go back to the first parametric and see if it can be adjusted for further improvements … and so on. Continue iterating until some criteria is met."

Just my $0.02 and trying not to let my prejudices show too much .. :D
 
my little brain has understood why it's needed tu use IIR EQ.:p

because FIR EQ do not modify the imaginary part,only the real part.

i've checked it with REW.(spl correction only )
-uncorrected curve
-FIR corrected curve :eek:,group delay is not corrected,only spl...
-IIR corrected curve (the nicer group delay)

that allows to obtain a textbook group delay if speaker is corrected till transition band with IIR EQ.
:rolleyes:..all work has to be redone at home.
it's very fast with the REW automatic IIR EQ.
we can export the impulse filter from REW and convolve it with a phase linearization IR (manualy with HOLM or REW).
so what the linear phase EQ is done for ?


An externally hosted image should be here but it was not working when we last tested it.
 
Last edited:
pos, I tried re-reading this thread but gave up at about page 20.

I was trying to find out if you actually implemented IMPORT of a WAV file impulse or other measurement. This is certainly worth doing if just to make it easier for users to see what improvement they get.
You see, that is the problem :D
No there is not measurement importing functionality for now. It was said in post #5 already, and several times along the thread. Last time was in port #343, 8 posts above yours ;)
I plan to add this functionality in a next version.

Another worthwhile addition is Minimum Phase EQ.
Yes a minimal phase EQ section would indeed be nice to have.
As it is now you are supposed to correct amplitude and phase independently, but an additional minimum phase section would simplify most inband corrections.
Phase-only correction remain the prefered method for correcting phase shifts in the lower band of an horn for example, as minimal-phase phase linearization would require *lots* of EQ down low (Linkwitz transform).

That said, depending on the way the convolution is implemented, minimal phase EQ can most of the time be implemented in the filter (DCX2496, etc.).

You might like to have a look at
thanks for your link
 
Last edited:
I think it is only Angelo (and his disciples) who use the word "Kirkeby" in this way. You need to look up the original IoA paper to confirm this.

Angelo & I have been discussing this for a long time, as is Fons Adreaensen who is a true Linux DSP guru. (I'm only a pseudo one :) ) Fons & I like IIRs while Angelo prefers FIRs, hence his liking for "Kirkeby". Fons now works for Angelo so perhaps we can turn him from the Dark Side. :eek:

Angelo doesn't really have transition bands as such. He just lets the 'error' become greater there.

There's many ways to treat the 'transition'. One method is the "Target Function" approach first published by KEF. In some ways, all the evil LR xovers are adaptations of this.

I used to work for Calrec who designed mixers mainly for Broadcast organisations like the BBC. From that, I have a strong liking for band limited signals cos they sound better. :eek: There is much BBC research into this and I have done so too.

Don't dismiss Angelo's "Kirkeby" too quickly. When you start doing room EQ, you may find it useful. Especially as you use evil FIRs :)

pos, much of what we discussed here is of relevance to any Digital EQ method.

Kirkeby inverse is much more than an EQ.

Here is FR of Peerless 2" full range measured at 23cm with FR of inverse generated using Kirkeby plugin with small regularization parameters from 2Hz to 24kHz:

1Peerless 2 23cm and raw kirk.gif

Horrible above 21kHz; but low end shows exactly EQ for bass extension.

A zoomed in view:

2Peerless 2 23cm and raw kirk zoom.gif

The above shows a little bit more of inverse's detail in mirroring response.


Convolution of IR and inverse yield ruler smooth spectrum.

Resultant IR:

3IR sample view.gif

Above view highlights perfect pulse type response.

Zooming out time to 1k samples and in on amplitude:

4IR 1k sample -54db.gif

The dreaded pre-ringing that so many people don't understand. Here it most definitely can't be heard. All this is related to low pass behavior just below Nyquist. To highlight this, a 256 point 18kHz low pass filter with Blackman-Harris windowing is applied:

5IR LP18k 262sample -54db.png

Once again, no way, no how is this filtering ringing audible when applied to program source.

Next view is IR 82k samples:

6IR 82k sample -72db.png

A super low frequency ringing is seen below -66dB. Noise is not an issue. Function is still trying to get 2" driver performing bass duties.

This is where high pass choice is made. Here is IR with Linkwitz-Riley 24dB/oct 250Hz high pass filter:

7IR LR4 250HP 1ksamples.gif

Above filter destroys square waves, and pleases people stuck in IIR paradigm do to not understanding basics of waveform propagation and information transmission systems.

Here is above with linear phase, that will pass square waves:

8IR LR4 250HP 1ksamples linear.gif

Once again a pre-ringing is seen that is completely inaudible when applied to continuous source signal. Judging filter performance based on looking at response is pointless without understanding how a wave function in time works as a filter via convolution. Likewise, listening to the filter played as source is completely pointless.

kgrlee: Farina's sweep pair generator calculates inverse for exponential swept sine in time domain. Convolution of these sweep pairs always results in sync function that fouls up results.
 
I was trying to find out if you actually implemented IMPORT of a WAV file impulse or other measurement. This is certainly worth doing

if just to make it easier for users to see what improvement they get.

An externally hosted image should be here but it was not working when we last tested it.


open HOLM software (same work can be done with REW with .wav file)
HOLM hates .wav file

An externally hosted image should be here but it was not working when we last tested it.


REW

using rePhase.

open software and create a Hpf and a Lpf filter
advices for setting IR are done in the window

An externally hosted image should be here but it was not working when we last tested it.


generate IR (16 or 24 bits )
.wav for convolver and REW simulation
.txt for HOLM simulation

open REW-->file-->import impulse response-->choose IR generated by rephase

import lpf.wav and import hpf.wav
all spl-->controls tab-->generate A+B (lpf.wav+hpf.wav)

An externally hosted image should be here but it was not working when we last tested it.


you can apply the filter IMPULSE to speaker measurement.convolution are LPF x woofer and HPF x tweeter in this case.
generate the sum filtered_woofer + filtered_tweeter

An externally hosted image should be here but it was not working when we last tested it.


you can do any simple math operation.

Making your own house target and create the FIR filter equalization file

open rePhase

create with filters and EQ the house curve you need.(slopes,low frequency boost ,subsonic filter )

An externally hosted image should be here but it was not working when we last tested it.


export the target with target.txt for holm
export the target with target.wav for REW.
open HOLM or REW

A slot import the target.txt you've created with rephase.
B slot import the measurement (right or left at the listenning spot ).

change offset to merge the two curves,it will avoid high positive corr.

C=A/B
it gives the global equalization.

An externally hosted image should be here but it was not working when we last tested it.


the green curve (C) is the result of difference between measurement and target.

the limitation of positive correction.
C=A x B
create with rephase an IR with negative EQ to reduce the too positive ones

An externally hosted image should be here but it was not working when we last tested it.


export as .WAV,and make a stereo file with an another measurement.
 
Last edited:
... Once again, no way, no how is this filtering ringing audible when applied to program source. ..... Above filter destroys square waves, and pleases people stuck in IIR paradigm do to not understanding basics of waveform propagation and information transmission systems. ...

Once again a pre-ringing is seen that is completely inaudible when applied to continuous source signal. Judging filter performance based on looking at response is pointless without understanding how a wave function in time works as a filter via convolution. Likewise, listening to the filter played as source is completely pointless.
Barley, thank you for your learned and constructive comments on pre-ring, waveform propagation, info tranmission, convolution and other stuff.

If you don't mind, I'll wait until I can carry out audibility tests on pre-ring to confirm or disprove my own experiments and trials. (in the 80's & 90's using primitive DSP chips).

BTW, it was possible to make speakers that reproduced good square waves over a "large bandwidth" using purely analogue means for a long time. I first did it in the late 70's. I'd quote some AES papers but its obvious you have no need to read them.
______________________

Farina's sweep pair generator calculates inverse for exponential swept sine in time domain. Convolution of these sweep pairs always results in sync function that fouls up results.
Errh! Angelo's method is for measuring impulse responses. You can get it to have imperceptible 'sync functions' for any fs. If you have "sync function that fouls up results", you are probably using it wrong.

BTW, ALL sampled methods of impulse response measurement have a 'sync' nature. If you don't use it properly, this will become visible.

I did the theory for Angelo's method circa 1990. I wanted it for measuring speaker response & distortion in the shortest theoretically possible time for prodution testing. But at that time, the computing power and particularly good DACs were too expensive.

But I'm quite happy for Angelo to take the credit cos he has done loadsa work to popularize it.
__________________

Barley, how do you measure the "anechoic" response that you EQ? In a room?
 
Last edited:
Errh! Angelo's method is for measuring impulse responses. You can get it to have imperceptible 'sync functions' for any fs. If you have "sync function that fouls up results", you are probably using it wrong.

BTW, ALL sampled methods of impulse response measurement have a 'sync' nature. If you don't use it properly, this will become visible.

Barley, how do you measure the "anechoic" response that you EQ? In a room?

For tweeter in previous post paired with upward firing woofer of Pluto type speaker above 23cm measurement is used for making both IR measurements.

Angelo's gensweep module creates sweeps which add artifacts which become garbage when used with his Kirkeby inverse module that shows up as mixed phase IR.

MLS as sampled measurement system doesn't return a sync function. Pure correlation. Swept sine measurement over full band can also return near perfect correlation when at least partially constructed in the frequency domain.

kgrlee: So what sweep pair would you generate with Angelo's gensweep to measure the above Peerless 2" driver?