• 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 understanding filter phase shift compensation using delay

Brad944911

Member
Joined
Dec 28, 2022
Messages
5
Likes
2
Hi all, I'm beating my head up trying to understand the concept of filter phase shift and how it corresponds to signal delay and would like to bug you for a simple explanation, if there is one. My confusion lies in that, for example, an 8th order high pass(48db/oct) filter shifts phase 360 degrees making the output in ELECTRICAL phase with the input...BUT does that mean the output signal is effectively delayed by the time equal to 1 complete cycle from the input? I've found posts on the Klipsch page that suggest this is the case, but others say no... Thanks in advance, Brad
 
OP
B

Brad944911

Member
Joined
Dec 28, 2022
Messages
5
Likes
2
The part that really confuses me is if the filters cause a delay, then how can the phase of the output LEAD the phase of the input? Wouldn't that mean the "lead" was actually a delay of time equal to more than 180degrees of a cycle?
 

DVDdoug

Major Contributor
Joined
May 27, 2021
Messages
3,002
Likes
3,951
..BUT does that mean the output signal is effectively delayed by the time equal to 1 complete cycle from the input?
Yes. But only at that cutoff/crossover frequency. At lower frequencies the waves are longer (in time) so the same delay is less than one cycle. It's the relative phase that's important so it's only a concern at the crossover frequency where both drivers are operating.

Wouldn't that mean the "lead" was actually a delay of time equal to more than 180degrees of a cycle frequency where both drivers are operating and you want them to be in-phase with each other.
No. Again it's a relative lead and with continuous sine waves you can't really tell which is leading and which is lagging.

Of course you can't really "look ahead" of the real-time audio. And there is no delay to the tweeter with an analog crossover. (With digital a delay is "possible".)

With a typical passive crossover, the tweeter "leads" by 90 degrees at the crossover point, and the woofer lags by 90 degrees, making them 180 degrees out-of-phase at the crossover point. So the solution is to flip the phase of the tweeter (or midrange).
 

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,703
Likes
5,956
Location
US East
Here is the responses of an 8th order low pass Butterworth filter (Fc = 1) to shaped 6.5 cycle tone bursts. The frequency of the tone goes from Fc/8 to 2 Fc. I'll let you decide whether the output should be considered as delayed.

LPF_Tone_Burst_Response.gif
 
OP
B

Brad944911

Member
Joined
Dec 28, 2022
Messages
5
Likes
2
NTK, I've studied this and at first it made sense...then I noticed the tone seemingly stayed @ 6.5Hz(sine waves never got more/less spaced) just shifted in time; you said tone is Fc/8 to 2Fc. Am I misunderstanding something? At any rate I think you are confirming that although the SIGNAL would be in electrical phase, it would be 2 cycles delayed by the LPF? Hell, am I just thinking too much? The reason I am asking is that I have a 4 way system with DSP using LR8 LPF@85 Hz >LR8 BPF @ 85 & 300 Hz >LR8 BPF @ 300 & 3500 Hz >LR8 HPF 3500Hz. If the LR8 LP filters(underlined) impart a delay(not necessarily phase shift) at crossover equal to 2x crossover freq, then should I delay following HPF channel? I may try it just to do so, but I REALLY want to understand this for my own edification, hence hitting guys who know more than myself. Thanks again!
 
OP
B

Brad944911

Member
Joined
Dec 28, 2022
Messages
5
Likes
2
DVDDoug, thanks for the answer. I get the relative shift(electrically) part, but I just can't help thinking it's all due to a delay induced by the components in the filter. I just have not had that AH HA moment yet. I appreciate the knowledge and input.
 

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,703
Likes
5,956
Location
US East
NTK, I've studied this and at first it made sense...then I noticed the tone seemingly stayed @ 6.5Hz(sine waves never got more/less spaced) just shifted in time; you said tone is Fc/8 to 2Fc. Am I misunderstanding something? At any rate I think you are confirming that although the SIGNAL would be in electrical phase, it would be 2 cycles delayed by the LPF? Hell, am I just thinking too much? The reason I am asking is that I have a 4 way system with DSP using LR8 LPF@85 Hz >LR8 BPF @ 85 & 300 Hz >LR8 BPF @ 300 & 3500 Hz >LR8 HPF 3500Hz. If the LR8 LP filters(underlined) impart a delay(not necessarily phase shift) at crossover equal to 2x crossover freq, then should I delay following HPF channel? I may try it just to do so, but I REALLY want to understand this for my own edification, hence hitting guys who know more than myself. Thanks again!
Here are the responses to the tone burst of the LR8 LPF, HPF and the sum. In these plots, I am varying the tone burst frequencies from 1/8x of the cross-over frequency (Fc) to 8x. In each frame of the animation, I rescaled the time scale (x-axis) to keep the total width of the plot equal to twice the duration of the bursts. I did it to make what's happening easier to see, because the duration of the tone burst waveform at the low end of the frequency sweep is 64x that of the high end.

Combined_Tone_Burst_Response.gif
 
Last edited:

René - Acculution.com

Senior Member
Technical Expert
Joined
May 1, 2021
Messages
427
Likes
1,298
Hi all, I'm beating my head up trying to understand the concept of filter phase shift and how it corresponds to signal delay and would like to bug you for a simple explanation, if there is one. My confusion lies in that, for example, an 8th order high pass(48db/oct) filter shifts phase 360 degrees making the output in ELECTRICAL phase with the input...BUT does that mean the output signal is effectively delayed by the time equal to 1 complete cycle from the input? I've found posts on the Klipsch page that suggest this is the case, but others say no... Thanks in advance, Brad
There is an APPARENT delay (the so-called phase delay) equal to one period, yes. But that is steady-state, meaning the system has settled. But if you plot the transient response at that frequency you will see an immediate output that does not at first track the shape of the input signal, but settles to it after a short while. The issue with thinking about delay is that there is more than one delay, and what you intuitively think of as delay may or may not correspond with any of these. I have made a post (https://www.audiosciencereview.com/...lay-common-misconceptions.39591/#post-1394817) here and a video (
) that might clear this up for you.
 

René - Acculution.com

Senior Member
Technical Expert
Joined
May 1, 2021
Messages
427
Likes
1,298
DVDDoug, thanks for the answer. I get the relative shift(electrically) part, but I just can't help thinking it's all due to a delay induced by the components in the filter. I just have not had that AH HA moment yet. I appreciate the knowledge and input.
Looking only at steady-state, you cannot see if the input is delayed compared to the output or vice versa. But for causal systems, the output has to come after the input, and that is also what you will see in the transient behavior. The phase delay is one period at the crossover frequency (or zero, as you cannot see the difference steady-state), the group delay is different from the phase delay for this type of filter, and then there is the 'latency' of the systems, meaning when do you have an output for a given input being activated at T=0, and I suspect that you are confusing the phase delay with that latency in your head (which is very common).
 
OP
B

Brad944911

Member
Joined
Dec 28, 2022
Messages
5
Likes
2
Looking only at steady-state, you cannot see if the input is delayed compared to the output or vice versa. But for causal systems, the output has to come after the input, and that is also what you will see in the transient behavior. The phase delay is one period at the crossover frequency (or zero, as you cannot see the difference steady-state), the group delay is different from the phase delay for this type of filter, and then there is the 'latency' of the systems, meaning when do you have an output for a given input being activated at T=0, and I suspect that you are confusing the phase delay with that latency in your head (which is very common).
Thanks for that video and link. I'm going to watch and try to digest it. Maybe I am confusing GD and phase delay as you said, but are they not related? Like I said, this is confusing me to no end.
I took measurements with the mathematical delays for each filter added cumulatively to each upstream DSP channel and my GD went from all over the place with 10ms+ lumps around crossovers to...damned near flat! I have a broad 2-3ms delay around 550-700Hz remaining but MUCH improved. There are still some peaky spots below 200Hz but I am not sure I can do anything about that while in room. I have not FINE tuned everything yet and actually may not. If curious, here is the layout: CH1 = LR8 LPF@85 Hz(0ms delay) >CH2 = LR8 BPF @ 85 & 300 Hz(11.7ms-CH1 filter delay) >CH 3 = LR8 BPF @ 300 & 3500 Hz(15ms[11.7-CH1 + 3.3-CH2 delay]) >CH4 = LR8 HPF 3500Hz(15.29ms[11.7-CH1 + 3.3-CH2 + .28-CH3 delays]).
For reference, these times are in addition to the delays I had for CH 2-4 to time align with the subs...based on physical measurements to listening pos. Subs are SVS SB1000. Speakers are KEF Q550 with mods: internal crossovers removed and rewired for tri-amping; the bass driver moved from the middle of the Passive Radiator-Driver-Passive Radiator array to the top for a D-PR-PR config to minimize bass and mid/tweet driver spacing reducing delays required. All in all, I can say that the soundstage and imaging have improved and moving away from the center listening position +or- a couple feet does not result in a total loss of phantom center or imaging. I have to believe this is due to better phase coherence, but hell, I'm no engineer.
So here are the screenshots; group delay first and SPL second. The factory KEF 550's is green vs the mod'd(3 way active) in red with the above delays...I have a feeling I can get it better but that'll have to wait. Overall, it has great sound, wide stage and solid imaging.
1674233452797.png

1674233519016.png
 

René - Acculution.com

Senior Member
Technical Expert
Joined
May 1, 2021
Messages
427
Likes
1,298
Delay is an difficult topic, because there is more than one type of delay. Phase delay and group delay are calculated via the phase response. Phase response is only relevant when looking at steady-state conditions, so sinusoidal signals on the input, going on for a long time, and then comparing the sinusoidal output to the ditto input and finding the phase difference. This can be done for all frequencies, and for each frequency a phase delay can be calculated, which is the apparent delay that would be needed for a 'pure delay' system to have the same output. But while the latter would have a true delay right when the input is turned on, a general system will typically have an immediate output, that just settles to some apparent delay after a while. Group delay is found from the slope of the phase, so for any one frequency it tells you how fast the phase is changing around that frequency. But again, it is calculated from the phase, so it is a steady-state delay, not a transient delay.
 

dasdoing

Major Contributor
Joined
May 20, 2020
Messages
4,277
Likes
2,748
Location
Salvador-Bahia-Brasil
here is a pure impulse

1689767095097.png


here is an impulse with a phase shift of 90 degrees at 1000Hz. see how the frequency response is still unaltered:

1689767248788.png


in de group delay we see that the delay at 1000Hz continues 0, but we have delays to the left and to the right

1689767352470.png


if we add both these signals we have created an EQ:

1689767432865.png


that's how primitive EQs work, they copy the signal and put it on top with part of it delayed.

why does the FR change? because of cancelations the delayed overlay causes
 

René - Acculution.com

Senior Member
Technical Expert
Joined
May 1, 2021
Messages
427
Likes
1,298
Yes, if you manipulate the phase of one signal and add it to another one, the summed magnitude will generally be different than the sum of the two unaltered signals. Nothing weird here. There is a particular phase, phase delay, and group delay for each of the two signals and their sum. But it is better to think in terms on phase than delay, as there is not necessarily any true delay associated with any of those signals, only steady-state delays as what you show here. Is there a question in the above?
 

ernestcarl

Major Contributor
Joined
Sep 4, 2019
Messages
3,110
Likes
2,327
Location
Canada
nope, I will have to study "steady-state delay" now

If you try to apply a positive or negative "time offset" i.e. IR shift in any "steady-state" measurement in REW, what curious thing do do you notice about the phase? However, when using the "Alignment tool", a pure time delay offset and polarity switcher is used but none of those parameter changes causes a phase change at all -- actually, the summed result is relative to what you use for as your time reference.
 
Last edited:
Top Bottom