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

Group Delay 101

temujin44

Member
Joined
Dec 27, 2018
Messages
39
Likes
48
Yes, you are right (of course). I realized that after I set up the equations and noticed I left a delay in the fundamental when I was building the vectors. My fault; I usually do this with a time vector, but for this one I set it up in the phase domain. The concept is the same and I didn't have time to redo everything (had to get to rehearsal this afternoon). Besides, causality is for wimps. :) I figured it would get noticed, natch, one stupid sign change...
time vector?
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,498
Location
Monument, CO
@DonH56, do you have audio files of your two example square-ish waves? Would be fun to see how different they sound?
No. sorry, I did this on a PC that does not have my math programs (Mathcad, Matlab) that can generate audio files. This was Excel and I am not really a spreadsheet guy. And didn't do anywhere near enough points for test... Good idea, however! I think someone made samples on another thread, try around here: https://www.audiosciencereview.com/...hat-is-group-delay.30289/page-10#post-1385319
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,498
Location
Monument, CO
time vector?
Just a list (vector) of data points in time, each point N is listed as (timeN, amplitudeN).

Background: I normally do these sorts of things on a PC using Mathcad or Matlab, mathematical analysis programs. (Sometimes I use SPICE.) I have a bunch of programs written over the years to deal with ADC and DAC analysis, and they all include functions that allow me to created sampled signals in the time domain. I give them a frequency and sampling rate (plus other terms) and they create a series (list, table) of samples so each point has a time and amplitude associated with it, a time vector (t0,y0, t1,y1, ...). For the analysis in this thread I started with phase instead of time, since group delay is a function of phase, and generated signals based upon their frequency and phase (phaseN, amplitudeN). The result is the same, but not how I normally do it, and led to a schoolboy mistake in sign that @restorer-john caught. Technically certain filters can shift the fundamental more than the harmonics but it is not how one normally thinks of group delay. I didn't notice until after making all the plots and words to go with them and ran out of time to fix them. They are fine to illustrate the problem. I hope.

HTH - Don
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,498
Location
Monument, CO
As usual, thanks a lot for the article. I had read about group delay a few times (headphone reviews?) but had no idea what it meant.
A couple of questions.
Could someone explain what is the physical reason behind non constant group delay?
Filters like crossovers introduce phase shift and that is often not linear, especially at the band edges when they are rolling off. Ampliifier bandwidth also can have nonlinear phase response, again typically as it rolls off. @pma provided an example of a filter above (https://www.audiosciencereview.com/forum/index.php?threads/group-delay-101.39333/#post-1386282) showing how the phase changes.

There also physical issues like placement of the drivers, for example if your sub is in a different place than your main speakers, you need to adjust the delay so the signal reaching your ears arrives at the same time and phase from all speakers.

When not constant, does it always increase with frequency? In other words, is the second derivative always positive like in the examples?
No, it depends on the filter or physical structure, that is what causes the phase change determines the function and direction. When I first really dug into this many years ago, it was applied to active phased-array radars, where we were adjusting the relative phase in both directions across an array of elements to shape and direct the radar beam.

Last one. Why do I have the impression I only saw group delay measurements in ASR for headphones? Are headphones particularly prone to non constant group delay?
Thanks again!
That I do not know, sorry. I would think headphones would be less likely than speakers to have problems with group delay, especially multiway speakers, but I am not a headphone or speaker designer.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,229
Likes
17,811
Location
Netherlands
That I do not know, sorry. I would think headphones would be less likely than speakers to have problems with group delay, especially multiway speakers, but I am not a headphone or speaker designer.
Yes, I'd be interested in this as well, especially because these graphs tend to be rather spiky. @amirm, can you elaborate?
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,498
Location
Monument, CO
Yes, I'd be interested in this as well, especially because these graphs tend to be rather spiky. @amirm, can you elaborate?
I ramped phase in 10 degree intervals so there is very low resolution. Again, idea being a visual presentation, and I was in a hurry. You can make all sorts of fairly ugly-looking waveforms with the right (or wrong) phase function.
 

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,229
Likes
17,811
Location
Netherlands
I ramped phase in 10 degree intervals so there is very low resolution. Again, idea being a visual presentation, and I was in a hurry. You can make all sorts of fairly ugly-looking waveforms with the right (or wrong) phase function.
Sure, you artificially can, but the point is how this can be from a simple headphone driver (usually it's just one) in a small enclosure over one's ear?
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,498
Location
Monument, CO
Sure, you artificially can, but the point is how this can be from a simple headphone driver (usually it's just one) in a small enclosure over one's ear?
Well, the ones I had in mind were not artificial, they were intentionally generated beam patterns, but speakers can get ugly judging by the plots I have seen.

I don't know anything about headphones' group delay and wasn't thinking about them at all, sorry. I certainly did not have headphones in mind when making this thread. I don't normally use headphones and rarely read the headphone reviews. A guess, and that's all it is, would be that there is a frequency-shaping filter in the headphones for them to tweak the frequency response, and that affects the phase transfer function. A driver will itself get nonlinear in phase as you exceed its response limits (bandwidth) and perhaps that is at play? Since it is usually just one driver used full-range? I don't know.

I am surprised by the interest this thread generated. Not good or bad, just surprised. :)
 

Jim Shaw

Addicted to Fun and Learning
Forum Donor
Joined
Mar 16, 2021
Messages
616
Likes
1,159
Location
North central USA
...A change in phase is equivalent to a time shift, for example a 180-degree phase shift is like shifting the time by one-half cycle of the signal. The derivative is a fancy expression for the slope of a line, so it is a measure of phase linearity. A straight (linear) line has the form y = mx+b where every point x is multiplied by the slope m and added to offset b to produce a y value. For a straight line, m is constant (just a number, not a function of something else), and hopefully we remember this formula from school. Now replace m with GD so to get a straight line, that means the change in phase divided by the change in frequency must be constant, meaning group delay is a constant, and every frequency is delayed by the same amount of time. What goes in, comes out again, exactly as it was but just a little later in time.
[huge snip]

Hopefully this helps visualize how group delay can impact the signal, and why constant group delay is a typical design goal. - Don
Enjoyed reading this. I hope ASR will go broader a bit and discuss real-world effects and expectations in realizable playback systems in the future.
Prior to this, and no longer much of an academic, I have tended to zip past 'group delay' as something I'll probably never take the effort to understand.

Until now. You have got the tip of it in. ;)
 

Eldus

Active Member
Joined
Jun 8, 2021
Messages
130
Likes
112
I wonder how much of an issue is minor GD when a room is untreated and can RePhase EQ with REW to correct phase help room GD?
 
Last edited:

fpitas

Master Contributor
Forum Donor
Joined
Jul 7, 2022
Messages
9,885
Likes
14,191
Location
Northern Virginia, USA
I have put this example into another thread, maybe it would help. Constant or non-constant group delay depends on phase response and this depends on amplitude response. Please see below amplitude response, phase response and group delay of the 5th order low pass filter. GD tells signal time delay in the pass band, in this case. It is the different kind of mathematical representation of the same thing.

View attachment 245067

View attachment 245068
Someday they'll make op amps that don't throw in all that phase change! ;)
 
  • Like
Reactions: pma

fpitas

Master Contributor
Forum Donor
Joined
Jul 7, 2022
Messages
9,885
Likes
14,191
Location
Northern Virginia, USA

mARCELOCM

Member
Joined
Nov 2, 2022
Messages
11
Likes
5
what about the group delay from the speaker itself?
can you explain whats occurs with sealed and vented box?
That’s purely the difference in frequency response. EQ (with minimum phase) or align them equally, and group delay will be the same as well.
i get you, but my question is, for example..
qtc alignment of 1.2, at 85hz its peaking in at 0.5db and a group delay of 4.5ms
if for each 3ms of delay is equal to an meter of perceived distance and each meter is equal to -3db in sound pressure, isn´t right to say that in this frequency i would like to put a plus of of +4db eq for time aligment?
 

AndreaT

Addicted to Fun and Learning
Forum Donor
Joined
Jul 19, 2020
Messages
613
Likes
1,182
Location
Commonwealth of Massachusetts
Excellent explanation. Since every musical instrument has a different set of harmonics and amplitudes of harmonics, and their sonic signature depends on it, I am left to wonder if the most difficult instruments to faithfully reproduce on digital sources, violins and cymbals, are so because of their specific combination of harmonics amplitudes and phase delays distortion by the electronics/speakers.

In particular, live cymbals have a shimmering undulation of the sound, missing too often in digital sources (missing in analog as well, like LPs, but I have not listened critically to a vinyl record in over 10 years). Violins from a large orchestra live have a signature of "air" (somewhat like the sound of a slow wind with a distinct sense of overpressure) that surrounds them: this is also missing from most digital symphony recordings. I hope ASR readers will forgive my choice of words, but at least a few would agree on the perception of incompleteness of reproduction of these instruments).
 
Last edited:
  • Like
Reactions: pdb

voodooless

Grand Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
10,229
Likes
17,811
Location
Netherlands
Excellent explanation. Since every musical instrument has a different set of harmonics and amplitudes of harmonics, and their sonic signature depends on it, I am left to wonder if the most difficult instruments to faithfully reproduce on digital sources, violins and cymbals, are so because of their specific combination of harmonics amplitudes and phase delays distortion by the electronics/speakers.

In particular, live cymbals have a shimmering undulation of the sound, missing too often in digital sources (missing in analog as well, like LPs, but I have not listened critically to a vinyl record in over 10 years). Violins from a large orchestra live have a signature of "air" (somewhat like the sound of a slow wind with a distinct sense of overpressure) that surrounds them: this is also missing from most digital symphony recordings. I hope ASR readers will forgive my choice of words, but at least a few would agree on the perception of incompleteness of reproduction of these instruments).
You seem to think that a violin sound is harder to sample than a 1 kHz sine wave? And somehow group delay is to blame? I think you need some catch-up in Sample Theorem 101.
 
OP
DonH56

DonH56

Master Contributor
Technical Expert
Forum Donor
Joined
Mar 15, 2016
Messages
7,835
Likes
16,498
Location
Monument, CO
A few more pictures, with greater resolution, fundamental 100 Hz, then 300 Hz, 500 Hz,... 1900 Hz, weighted by 1/n again to create the first ten terms of a square wave. This makes it easier to see how the summed wave shape changes. I used Python for these plots and generated 65,536 samples at 1.024 MS/s. I only plotted one cycle of the 100 Hz fundamental to make it easier to see. There is nothing really new to see, just prettier pictures. :)

No phase change, group delay is constant, showing the ten signals and their sum is shown first. Notice the "clean" zero crossings at the beginning, middle, and end where all the signals are aligned.
Vin_gd_0.png

Vsum_gd_0.png

Now leave the first five terms alone (no phase shift), and add increasing phase shift (and thus group delay) to the upper five terms to emulate 1 kHz low-pass filter response (phase only, however, for illustration purposes -- amplitude is not changed). This is similar to what @pma showed with group delay constant in the midband then changing as the frequencies pass the filter's transition frequency. I also fixed the phase error @restorer-john noticed so the first five signals align and the next five gradually lag (are delayed) which can be seen looking closely around the zero crossings (no longer "clean"). The difference in the summed signal is again fairly obvious.

Vin_gd_vary.png

Vsum_gd_vary.png

HTH - Don
 

JoachimStrobel

Addicted to Fun and Learning
Forum Donor
Joined
Jul 27, 2019
Messages
519
Likes
303
Location
Germany
Great explanation. Thanks. Frequency dependent damping of ultrasonic waves entering concrete behind steel would be another application next to Radar.
To repeat someone else’s question: How can these group delays be corrected? Does Dirac or Re-Phase do that? Or would one want to introduce certain group delays for a warm sound like harmonics with vinyl? Is a frequency sweep enough to characterize group delays or would one need to superposition for example a fixed frequency with a sweep?
 
Top Bottom