• 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!

Pre and post ringing in amplitude and phase corrections

Pio2001

Senior Member
Joined
May 15, 2018
Messages
317
Likes
507
Location
Neuville-sur-Saône, France
Discussion splitted from https://www.audiosciencereview.com/forum/index.php?threads/genelec-8341a-sam™-studio-monitor-review.11652/page-22#post-336991

Sure, minimal phase IIR filters are causal, so without any pre-ringing. But as soon as you touch the phase..

So, the million-dollar question seems to be how do you correct phase without introducing any pre-ringing visible in step response? :)

Here is food for thought.
Let's play with Rephase and Foobar2000's convolver. We can design any amplitude or phase correction that we want, and see the effects on audio signals.

First, here are two amplitude corrections, in green and red.

REWA.png


You can see that they are the exact opposite of each other. If I apply the red correction, then the green correction, I should go back to the original frequency response.
BUT... you can see the associated blue and pink curves that show the phase responses of these two corrections. They are flat. These corrections are not minimal phase, but linear phase. They are thus going to introduce pre-ringing. What will happen ? Let's apply them to a 57 Hz truncated sine.

Amplitude.png


On top, the original.
The middle part shows the result after the application of the red curve to the original (corrected in volume). A lot of pre and post ringing appear.

Think about it for a second : we changed only amplitude, not phase. Nonetheless, the signal was completely smeared in the time domain. Energy appears before and after the original signal. This debunks a strong misconception : that amplitude deals with volume only, and phase with time only. Wrong ! A change in the amplitude response alone has strong effects in the time domain !

The bottom shows the middle signal, further altered with the application of the green correction.
We can see that, as expected, it returns to its original shape.
But what's counter-intuitive is that the operation cancelled all the pre and post ringing !

Now, let's do the same thing with phase corrections alone. Here are two all-pass filters, with a perfectly flat amplitude response, but with random phase response. Again, the two filters are the exact opposite of each other.

REWP.png


Let's apply them to our original truncated sine :

Phase.png


Again, a lot of pre and post ringing are introduced. And again, both are completely cancelled by the application of the inverse correction.
Well, nearly completely, we can see a small imperfection at the end of the signal.

This is an answer to your question : pre and post ringing are not cumulative. They are reversible.
Of course, cancelling them completely requires an extreme accuracy in the correction. the slightest approximation, and all the ringing reappears. We can see that even in the digital domain, with 16 bits wave files, the process is not perfect.

In the acoustic domain, if we take room modes as an example, the best we can do is decreasing the ringing without cancelling it completely, and only at very low frequencies. Typically under 100 Hz.
 

John Dyson

Active Member
Joined
Feb 18, 2020
Messages
172
Likes
90
The original question basically implied, how do you filter with non-linear phase yet get constant time delay across the spectrum? Answer: the question on the surface make sense, but in reality DOES NOT MAKE SENSE.

Linear phase is constant rate of phase shift increase vs. frequency -- essentially, constant delay. If you want to do a single filter of a given frequency band and want to keep the time delay constant across the spectrum, then use a constant delay filter, or 'linear phase'. Any other filter will give varying delays vs. frequency -- therefore it is possible to get 'pre-echos.' Pre-ringing is not really ringing in the general case, but can be if you have a filter with storage. It is a manifestation of a coherent waveform (e.g. square wave) with different propagation and/or attenuation thereby giving a mix of different arrival times and Gibbs type effects. Gibbs (spectrum truncation) and ringing can look similar, but have different causes.


John
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,521
Likes
37,050
The original question basically implied, how do you filter with non-linear phase yet get constant time delay across the spectrum? Answer: the question on the surface make sense, but in reality DOES NOT MAKE SENSE.

Linear phase is constant rate of phase shift increase vs. frequency -- essentially, constant delay. If you want to do a single filter of a given frequency band and want to keep the time delay constant across the spectrum, then use a constant delay filter, or 'linear phase'. Any other filter will give varying delays vs. frequency -- therefore it is possible to get 'pre-echos.' Pre-ringing is not really ringing in the general case, but can be if you have a filter with storage. It is a manifestation of a coherent waveform (e.g. square wave) with different propagation and/or attenuation thereby giving a mix of different arrival times and Gibbs type effects. Gibbs (spectrum truncation) and ringing can look similar, but have different causes.


John
Hi John,

Glad to see you taking part here. I was esldude over on Audiophile style. Not posting there anymore. So hopefully I'll see you active here on ASR.
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
.... Wrong ! A change in the amplitude response alone has strong effects in the time domain.....
Not shure agree there say linear phase amplitude change has strong effects in time domain, pre and post ringing is the nature of linear phase FIR filters in time domain they have to look forward in time domain to work so its not the amplitude in itself but the process of linear phase verse natural minimum phase.
 

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,399
Thanks @John Dyson.

Sorry to bang on about the Devialet SAM, but a discussion of that was how this thread was born so I figure it makes sense to continue it here.

This is an interesting demonstration you've creeated, but it doesn't relate to that earlier discussion about Devialet SAM.

If you want evidence of this, take a minimum-phase high-pass filtered amplitude response (similar to that of a woofer in a box) and try to correct its phase response (without altering its amplitude response) using an all-pass filter - without introducing pre-ringing.

It's not possible, I would have thought.
 

John Dyson

Active Member
Joined
Feb 18, 2020
Messages
172
Likes
90
Not shure agree there say amplitude change has strong effects in time domain, pre and post ringing is the nature of linear phase FIR filters in time domain they have to look forward in time domain to work so its not the amplitude in itself but the process of linear phase verse natural minimum phase.

I agree. There are kind of 'fixed' characteristcs of the normal minimum phase, causal type analog filter and the IIR semi-equivalent. Those fixed characteristics are the marriage of all kinds of things. One super 'interesting' thing to EE types is the marriage of the Reactance and Resistance of a filter, such that they are so intertwined that if you have a 'normal' analog (EE style) filter, and can measure it's resistance all the way up from 0Hz, then you can calculate the reactance, and vice. versa. There are all kinds of interactions with normal EE concepts that are almost thrown out the window in the DSP-land. (Actually, nothing is really thrown out the window, it is just that there are more degrees of freedom, for example time becomes more flexible in the DSP-land.)

So, it can be super difficult to make a near perfect linear phase filter (constant delay) of wide bandwidth and sharp response curves in the Analog/EE world, but in the DSP world I do it all of the time. (Lots of nice things fall out in the linear phase world, except the filters are long and take more time, both CPU and realtime propagation/fixed time delays.)

On my project, if I didn't have linear phase filters and nice things like accurate Hilbert transforms (90deg phase shift), a lot of things just wouldn't be practical to do.

John
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,785
If you want evidence of this, take a minimum-phase high-pass filtered amplitude response (similar to that of a woofer in a box) and try to correct its phase response (without altering its amplitude response) using an all-pass filter - without introducing pre-ringing.

It's not possible, I would have thought.

Frankly, I don't see how that would be possible, because as soon as you start modifying the phase pre-ringing is induced, as shown here.

EDIT: Just found this post, coming from the expert I highly respect, dr. Uli Bruegemann (aka @UliBru):

"An ideal speaker will show up a minimumphase behaviour. It simply behaves causal = no output when no input.
With typical passive crossovers beside minimum phase the speaker will show up an excess phase which contains delays.

A correction filter for minimum phase (=frequency response correction) is itself minimum phase.
A correction filter for excess phase (= time correction) will introduce a pre-ringing.

A pre-ringing is allowed as long as the corrected step response does not show up a pre-ringing or if the pre-ringing is small enough. So pre-ringing is simply allowed if you don't recognize it.
If there is too much pre-ringing you will recognize it. So e.g. a simple drum hit = tok may sound like whoop-tok."
 
Last edited:

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,012
Location
Berlin, Germany
Looking at the speaker output (the point where things do count) it is perfectly possible to introduce phase-linearizing EQ with zero pre-ringing. The pre-requisites are:
- target must be a true minimum-phase response, the one a single wide-band driver with the same magnitude response would have. If otherwise, the target can easily introduce additional pre-ringing on its own, not related to crossover phase shift correction.
- and the physical arrangement of the drivers must not introduce much of angle-dependant offsets where cancellation of the time-domain ripples of each path doesn't work anymore -- and when this residual is of pre-ringing type, it may be audible in the off-axis sound.

A coaxial speaker is a good candidate. Do it in analog/IIR and establish a LR4 textbook acoustical crossover. Then calculate the phase response of the LR4 analytically (not directly derived from measurements, or if so use a curve-fitting equivalent of low order) and use its time-inverse as the convolution kernel.

When using phase and magnitude EQ to linearize a speaker at the listening position there is a much higher risk of introducing audible pre-ringing because the convolution kernel is very detailed, much more complex than a simple phase shifter, and everything relies on good cancellation even more, swet spot is narrow, etc. Some DRC programs take extra care to avoid pre-ringing as much as possible and prefer gentler corrections, it's a known and addressed issue.

It all depends on the application if pre-ringing might be a problem or not. With "full room correction" in an attempt to "fix it all in one go" it often is, IME.
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,785
Looking at the speaker output (the point where things do count) it is perfectly possible to introduce phase-linearizing EQ with zero pre-ringing. The pre-requisites are:
- target must be a true minimum-phase response, the one a single wide-band driver with the same magnitude response would have. If otherwise, the target can easily introduce additional pre-ringing on its own, not related to crossover phase shift correction.
- and the physical arrangement of the drivers must not introduce much of angle-dependant offsets where cancellation of the time-domain ripples of each path doesn't work anymore -- and when this residual is of pre-ringing type, it may be audible in the off-axis sound.

A coaxial speaker is a good candidate. Do it in analog/IIR and establish a LR4 textbook acoustical crossover. Then calculate the phase response of the LR4 analytically (not directly derived from measurements, or if so use a curve-fitting equivalent of low order) and use its time-inverse as the convolution kernel.

When using phase and magnitude EQ to linearize a speaker at the listening position there is a much higher risk of introducing audible pre-ringing because the convolution kernel is very detailed, much more complex than a simple phase shifter, and everything relies on good cancellation even more, swet spot is narrow, etc. Some DRC programs take extra care to avoid pre-ringing as much as possible and prefer gentler corrections, it's a known and addressed issue.

It all depends on the application if pre-ringing might be a problem or not. With "full room correction" in an attempt to "fix it all in one go" it often is, IME.

Have you had a chance to look at this post?

Introducing pre-ringing is not related to a physical speaker nor to the convolution engine kernel, it is purely a mathematical model thing - as soon as you define a single phase correction filter within minimum-phase high-pass filtered amplitude response you will get a pre-ringing and there is no escaping from this.

As @UliBru explained, and as you mentioned, phase correction need to be gentle so pre-ringing is kept reasonably small in order for it to be non-audible.
 
Last edited:

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,399
Have you had a chance to look at this post?

Introducing pre-ringing is not related to a physical speaker nor to the convolution engine kernel, it is purely a mathematical model thing - as soon as you define a single phase correction filter within minimum-phase high-pass filtered amplitude response you will get a pre-ringing. There is no escaping to this - as @UliBru explained it can only be reasonably small so it would not be audible, but it will always be there.

@KSTR knows what he's talking about here ;)

The difference is in the interpretation of Devialet's marketing copy. They can correct the phase of the woofer relative to the midrange/tweeter, but they can't correct the phase of the box.
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
Have you had a chance to look at this post?

Introducing pre-ringing is not related to a physical speaker nor to the convolution engine kernel, it is purely a mathematical model thing - as soon as you define a single phase correction filter within minimum-phase high-pass filtered amplitude response you will get a pre-ringing. There is no escaping to this - as @UliBru explained it can only be reasonably small so it would not be audible, but it will always be there.
:) admit didn't read that link but think about IIR (minimum phase) is how sound works in nature, that is let a 100Hz note and 1000Hz note compete in a race where who is most fast for one cycle then the higher frequency notes will always win that race and lower frequency notes will always win the race of who perform the longest distance in one cycle, if we want to change on a real world nature as that as you say we cant escape in we need to introduce some whatever system lag/propagation delay/proccessing/pre-ringing to look forward in time else we can't manipulate nature.

@KSTR LR 4th order example was good thanks, in below Rephase example the real time nature filter of summing (allpass) two limited passbands to one wider system passband @500Hz/LR4 cost nature of post ringing (excess phase) in first graph, second graphs filter cost pre-ringing, in third graph we back at casual minimum phase nature of a 20Hz-20kHz system passband, no post or pre-ringing anymore was exercise in electric domain or as long as acoustic can hold its pattern for example be it on axis.

1.png
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,785
@KSTR knows what he's talking about here ;)

The difference is in the interpretation of Devialet's marketing copy. They can correct the phase of the woofer relative to the midrange/tweeter, but they can't correct the phase of the box.

Ok, to make things clearer let's assume we are speaking about a speaker with a single wideband driver. How do you correct phase without introducing pre-ringing?
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
Ok, to make things clearer let's assume we are speaking about a speaker with a single wideband driver. How do you correct phase without introducing pre-ringing?
Why do you want that for a widebander is it because phase wigle up and down as for below widebander example, use normal natural minimum phase (IIR) filter in reverse and phase will follow, below target is set to 40Hz-20Khz.

WB.png
 

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,785
:) admit didn't read that link but think about IIR (minimum phase) is how sound works in nature, that is let a 100Hz note and 1000Hz note compete in a race where who is most fast for one cycle then the higher frequency notes will always win that race and lower frequency notes will always win the race of who perform the longest distance in one cycle, if we want to change on a real world nature as that as you say we cant escape in we need to introduce some whatever system lag/propagation delay/proccessing/pre-ringing to look forward in time else we can't manipulate nature.

@KSTR LR 4th order example was good thanks, in below Rephase example the real time nature filter of summing (allpass) two limited passbands to one wider system passband @500Hz/LR4 cost nature of post ringing (excess phase) in first graph, second graphs filter cost pre-ringing, in third graph we back at casual minimum phase nature of a 20Hz-20kHz system passband, no post or pre-ringing anymore was exercise in electric domain or as long as acoustic can hold its pattern for example be it on axis.

View attachment 51787

What exactly would be the point of this? That you apply one filter to one driver and other filter to other driver while keeping the box pre-ringing free?
 
Last edited:

QMuse

Major Contributor
Joined
Feb 20, 2020
Messages
3,124
Likes
2,785
Why do you want that for a widebander

I will assume that was a question although it has no question mark. :)

Assume a situation where phase of one box differs from phase of other box due to difference in room's speaker's positiong. Because of difference in phase there would be signal cancelations which I want to avoid. I also want excess phase to be as close to 0 as possible.

Take this as an example:

Capture.JPG


But ok, that is not the usage scenario @andreasmaaan talked about related to Devialet marketing claim. From what I understand in my scenario there is no help but to try to correct phase as gently as possible, as explained by @UliBru.
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
What exactly would be the point of this? That you appy one filter to one driver and other filter to other driver while keeping the box pre-ringing free?
First will say now i'm not squared so fell free do whatever you like or learn for phase and sounds good to you, now i get squared :) and think in agreement with KSTR, never touch phase on systems lower stopband roll off knee, it has to be natural minimum phase that follow whatever amplitude response roll off looks like to sound natural as for example if you placed a acoustic bass player musician at same spot where speaker is placed, EQ that roll off with a inverse anti room IIR filter and you cant do better, any more nasty stuff or feel cant be repaired with pure phase corrections other than for one spot in space, and will mean if you do pure phase correction on that natural stopband you should be able A/B the two speaker in mono and find the one that hasn't any unnatural pure phase correction of low end stop band sound most natural. Be it difraction or reflections they all of natural minimum phase at point where they happen problem is travel distance to listening position that makes them be non minimum phase.
 
Last edited:

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,399
Ok, to make things clearer let's assume we are speaking about a speaker with a single wideband driver. How do you correct phase without introducing pre-ringing?

That's exactly my original point (assuming the question was rhetorical ;))

You can't. This is what imo Devialet seems to claim to be doing, and the basis of my scepticism.

What you can do with a multiway (without introducing on-axis pre-ringing) is to correct phase distortion resulting from the crossover, so that the whole system has minimum-phase behaviour. This is KSTR's point, and I assume what the Devialet might actually be doing.

The correction is only valid on the design axis though, so there will be pre-ringing off-axis, especially pronounced for non-coaxials.

And as mentioned, the bass roll-off will remain minimum (not linear) phase.
 

Soniclife

Major Contributor
Forum Donor
Joined
Apr 13, 2017
Messages
4,499
Likes
5,417
Location
UK
You can't. This is what imo Devialet seems to claim to be doing, and the basis of my scepticism.
Do you think this could be tested?

I have the amps and sutiable speakers, a UMK1, & REW, but I'm not prepared to move the speakers, would a nearfiled in room measurment show anything?
 

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,399
Do you think this could be tested?

I have the amps and sutiable speakers, a UMK1, & REW, but I'm not prepared to move the speakers, would a nearfiled in room measurment show anything?

You should be able to measure the phase response of the woofer with a nearfield (or near-ish field) measurement and then compare it to the same measurement with the SAM system engaged. If the crossover phase distortion is being corrected, you'd expect to see a flatter phase response towards the top of the woofer's passband.

Perhaps @KSTR, who is really the expert on these matters, has a better idea of the best way to measure this in-room?

Assuming an ideal case for e.g. a midwoofer in a sealed box with an F3 of 40Hz crossed over to a tweeter at 2kHz/LR4, you'd expect to see something like this (red = uncorrected, blue = corrected):

1582729626553.png


I'd be very interested to know what you find...
 
Top Bottom