Phase, group delay, and transient response questions

0 Members and 1 Guest are viewing this topic. Read 9468 times.

ctviggen

  • Full Member
  • Posts: 5251
I'm reading The Loudspeaker Design Cookbook by Vance Dickason and I can't really understand some concepts.

He defines group delay as the negative derivative of the phase response.  However, he shows phase response and group delay curves for one set of closed box speakers at different Qtc's, and it's apparent to me that the group delay curves are not the negative derivative of the phase response curves.  So, what is the definition of group delay for a speaker?  I googled "'group delay' definition" but cannot find the definition, at least in the first two returned pages.  Also, after this one set of curves, he solely uses group delay curves and does not show the phase reponse.

What is transient response of a speaker?  How does group delay affect transient response?  

One bad thing about this book is that there is no index.  While I do not believe he ever defines "transient response", it would be nice to look in an index and determine on what page he first discusses transient reponse and other terms.

JoshK

Phase, group delay, and transient response questions
« Reply #1 on: 19 Jan 2006, 02:51 pm »
I have that book, although I haven't started reading it yet.  Maybe this weekend I can read that part and see if I can help out.  

When you say "negative derivative of phase response" do you mean the negative OF [as in opposite sign of] the derivative of phase response?  At what value is he evaluating the derivative?

JoshK

Phase, group delay, and transient response questions
« Reply #2 on: 19 Jan 2006, 02:53 pm »
btw, John Kreskowski's site might be of help as he defines transient response iirc and is well read on all the original works on the topic.

ctviggen

  • Full Member
  • Posts: 5251
Phase, group delay, and transient response questions
« Reply #3 on: 19 Jan 2006, 03:20 pm »
Josh, good point.  I believe it's meant as the opposite sign of the derivative of the phase response, which is close to what he shows in the phase and group delay curves.  I can give you page numbers.  

As a tutorial about speaker design, this book sucks.  As a reference book about speaker design, the book is great.   In other words, I've read the section on closed box low frequency speaker design and couldn't begin to design a closed box speaker.  However, if you asked me what happens if you put two different types of materials inside a closed box speaker, I could look it up and tell you all the different effects such materials would cause.  Perhaps the book gets better -- I'm only three chapters into it, after all.  But for right now, it's all about throwing a bazillion curves at you and not about the basics.  Granted, the "basics" are in the curves, but it's hard for a novice to extract such things from data.

JoshK

Phase, group delay, and transient response questions
« Reply #4 on: 19 Jan 2006, 03:30 pm »
I bought the book for that purpose, a reference but was going to read a few things here and there to help me understand.    I bought it along with the Loudspeaker Measurement book, forget the exact title.  I think it is generally told to read this one first, then the Vance one for examples.

JoshK

Phase, group delay, and transient response questions
« Reply #5 on: 19 Jan 2006, 03:32 pm »
I imagine if you really want the basic definitions you could do a literature search in the AES publications and get the original papers.  I think this isn't going to be an easy read though.

Hobbes26

  • Jr. Member
  • Posts: 12
Re: Phase, group delay, and transient response questions
« Reply #6 on: 19 Jan 2006, 03:54 pm »
Quote from: ctviggen
I'm reading The Loudspeaker Design Cookbook by Vance Dickason and I can't really understand some concepts.

He defines group delay as the negative derivative of the phase response.  However, he shows phase response and group delay curves for one set of closed box speakers at different Qtc's, and it's apparent to me that the group delay curves are not the negative derivative of the phase response curves.  So, what is the definition of group delay for a speaker?  I googled "'group delay' definition" but can ...


The group delay is indeed the negative derivative of the phase wrt the frequency.  

Perhaps the figure is incorrect in the book?  I don't have the book, but which page is it on - maybe someone can check it.

There are several links to group delay on the web - just do a search for "loudspeaker group delay" or "subwoofer group delay.

Watson

  • Full Member
  • Posts: 385
Re: Phase, group delay, and transient response questions
« Reply #7 on: 19 Jan 2006, 07:21 pm »
Quote from: Hobbes26
The group delay is indeed the negative derivative of the phase wrt the frequency.


That's right, but just remember that it's with respect to angular frequency, meaning there is an additional 2 * pi in the denominator.  The extra 1 / 2*pi probably accounts for the differences you're seeing in the graphs.

Daryl

Re: Phase, group delay, and transient response questions
« Reply #8 on: 21 Aug 2006, 04:54 pm »
Group delay is the negative derivitive of phase like your read ctviggen.

GD(seconds)=-d(phase(periods))/d(frequency(hz))

Fourrier showed that a signal in the time domain (amplitude vs. time) could also be represented in the frequency domain (amplitude vs. frequency).

So any signal could be defined as a series of discrete frequency componets each with their own amplitude and phase.

Time does not exist in the frequency domain and the amplitude and phase at a single frequency can never change.

If you were to question how a time domain signal with events happening at specific times could be represented with an equivilant frequency domain signal where time does not exist the answer would be that the specific time of any event in the time domain signal would be given by the relative phase of each frequency componets in the equivilant frequency domain signal.

Rearranging the phase of all of the frequency componets throughout the spectrum will shift the event timing of the equivilant time domain signal.

If phase vs. frequency shifts in a straight line (constant slope/derivitave) then time shift will be constant vs. frequency.

A downward (negative) slope of phase vs. frequency rearranges all the frequency componets of a signal so that it is delayed in time.

Daryl
« Last Edit: 22 Aug 2006, 06:00 pm by Daryl »

Daryl

Re: Phase, group delay, and transient response questions
« Reply #9 on: 21 Aug 2006, 07:39 pm »
I think I may know why the group delay charts appear incorrect to you ctviggen.

In audio we usually use charts with a log frequency scale.

The slope of phase on a log frequency chart gives group delay in periods (GD x Frequency) not seconds.

GD(periods)=-d(phase(periods))/d(frequency(NLOG(Hz)))

Periods would be my preferred way to view group delay for the purpose of quantifying the transient response for a speaker.

The charts in the first image below show the phase, group delay and step response for Linkwitz/Riley allpass filters of orders 2,4,6,8 (Fc=1783hz).

Two charts are shown for group delay, periods and milliseconds.

Since the frequency scale for the charts is log. the periods chart is the one that follows the slope of the phase curve for each filter and the milliseconds chart does not seem to directly correlate.

The second image below shows the same but with linear frequency scales and an impulse response instead of a step response.

With the linear frequency scale charts the slope of the phase curve now correlates to the group delay in milliseconds (notice the negative slope of the phase at the begining of the phase curves on the linear charts which agrees with the delay shown at the begining of the group delay curves).

Daryl







« Last Edit: 22 Aug 2006, 11:53 pm by Daryl »

gerchin

  • Jr. Member
  • Posts: 81
Re: Phase, group delay, and transient response questions
« Reply #10 on: 21 Aug 2006, 11:57 pm »
I have never really understood the emphasis on group delay instead of the more intuitive phase delay.  Group delay gives an estimate of the time delay of the envelope of a narrowband, modulated signal.  Audio systems are linear and broadband, so to me it makes more sense to talk about phase delay.  Phase delay is the amount of phase shift caused by time delay, and is in units of "radians per (radian/sec)" (cancel the "radians" in the numerator and denominator, and all you have left is "seconds").  Linear phase is still linear phase, whether denoted as "constant group delay" or "constant slope of the phase characteristic", but time delay leading to phase shift makes much more sense.

http://ccrma.stanford.edu/~jos/filters/Phase_Delay.html
http://sepwww.stanford.edu/ftp/prof/pvi/spec/paper_html/node17.html

Greg

Daryl

First... Why use Delay?
« Reply #11 on: 22 Aug 2006, 07:38 pm »
Hi Greg,

Quote

I have never really understood the emphasis on group delay instead of the more intuitive phase delay.

Group delay gives an estimate of the time delay of the envelope of a narrowband, modulated signal.  Audio systems are linear and broadband, so to me it makes more sense to talk about phase delay.


Well Greg buckle your seatbelt.

The transfer function for a system will have three main categories which define it's accuracy.

Noise
Linear
Non-Linear.

Group Delay is a tool in defining the linear characteristics for a system.

A systems linear transfer function expressed as magnitude/phase vs. frequency is a common sight.

The magnitude vs. frequency part is clearly important because you would notice if the relative levels of different parts of the spectrum were signifigantly skewed.

However the signifigance of the phase vs. frequency is not as apparent.

Your ears work like an RTA (real time analyzer).

Just like an RTA they have a series of resonant filters that report the energy level at their resonant frequency only your ears use mechanically resonant hairs (sylia) connected to nerves instead electrical tank circuits.

Phase is not reported only the energy level (interaural phase is reported and used for localisation).

Phase is not heard so it is not directly usefull however if a systems phase vs. frequency is not linear then the relative timing for different parts of the spectrum will be skewed and you will notice this if it is signifigant.

So to define an audio systems linear transfer function in terms that directly apply to how you hear you would want to know magnitude vs. frequency and Delay vs. frequency instead of phase vs. frequency since it is not directly heard except in terms of the delay that is implied by it.

The question now is which is the real delay?

Hold on, I'll open this 55 gallon drum of worms next.

Daryl








« Last Edit: 22 Aug 2006, 09:33 pm by Daryl »

gerchin

  • Jr. Member
  • Posts: 81
Re: First... Why use Delay?
« Reply #12 on: 22 Aug 2006, 08:13 pm »
The question now is which is the real delay?

Exactly.  As I mentioned, phase delay is very intuitive; it is the phase shift directly caused by time delay.  Group delay, on the other hand, is a derived quantity that really only has application to the envelopes of narrowband modulated signals.  So why do we even speak of group delay? ... except to note that constant time delay implies linear phase, which implies constant slope of the phase curve, which just coincidentally happens to equate to constant group delay (which is a perfectly valid quantity but which really is not an appropriate entity to measure in our audio systems).

(If there are any masochistic types out there, see some of the archived posts on comp.dsp, from myself and others, on negative group delay.)

Quote
Hold on, I'll open this 55 gallon drum of worms next.

Looking forward to it!  It is a truly difficult subject.

Greg

Daryl

Will the real Delay please stand up!
« Reply #13 on: 22 Aug 2006, 10:34 pm »
Hi Greg,

In the image below the red and pink curves show phase (degrees) , goup delay (mS) and group delay (periods) for a 16th order LR allpass.

The purple curve is the spectrum of a tone burst that we will be using for a test signal.

The blue curves in the group delay charts are actually phase delay for the 16th order LR allpass filter so you can compare it to the group delay (red curves) in the same charts.

Phase Delay=-Phase(periods)/Frequency(hz)

Note since phase delay is (-phase/frequency) and delay in periods is (delay*frequency) phase delay in periods is simply (-phase).



Looking at the charts you can see considerable divergence between group delay and phase delay.

I used a higher order allpass filter (16th) to make the difference very clear.

The importance of delay to an audio system is in the relative timing of one area of the spectrum vs. another.

Delay of the entire spectrum is meaningless.

It doesn't matter when you play your favorite Brittney Spears tunes if sound comes from the speakers immediatly upon pressing PLAY or 10 seconds later so long as the entire spectrum is syncronized.

Sounds from a single instrument can be very wideband and the envelope of it's entire spectrum must be syncronized.

You could also have multiple narrowband instruments playing notes in different octaves but in unison and their timing must remain intact.

To get things started lets look at our tone burst passing through our allpass filter (red curve).

It's spectrum is centered at the allpass filters Fc (632hz).

On the same chart we will look at the tone burst not passing through the allpass filter but instead delayed by the calculated delay (3.15mS) using the phase delay approach (blue curve).

The pink curve and the light blue curve are the envelopes of the tone bursts shown to make the timing and shape of the bursts more clear.



Well the good news is that the phase lines up perfectly between the tone burst from the AP filter and the PD (phase delay method) delayed tone burst.

The bad news is that tone burst passing through the AP filter did not arrive when predicted by the PD method and the whole idea is to be able to indicate the timing for each area within the spectrum.

Lets do that again but this time the tone burst that does not pass through the AP filter will be delayed by the time calculated using the GD (group delay) method.

The red curve is still the tone burst passing through the AP filter.

The green curve is the tone burst not passing through the AP filter but delayed by the time calculated using the GD method (4.5mS).

Again the light colored curves are the envelopes for clarity.



Good news this time is that the tone burst passing through the AP filter arrived when predicted by the GD method.

The bad news is that the phase between the tone burst passing through the AP filter and the GD delayed tone burst don't match up.

Fortunately phase is not relevant to our purpose as discussed in my last post where the operation of the ear is explained.

Your ears respond to the envelope of a given frequency band phase does not matter.

You can now make the obsevation that when passing through a filter with non-linear phase the phase of a signal can be converted by the filter to a value that does not directly correlate with the amount of time signals passing through the filter are delayed in every part of the spectrum.

Quote

Group delay gives an estimate of the time delay of the envelope of a narrowband, modulated signal.


Not exactly true although there are specific reasons why this is said.

First, group delay is not an estimate but actually an exact amount of time that signals are delayed for each area of the spectrum.

The reason you would say estimate is that if phase is not linear in the part of the spectrum you are considering then group delay will be changing with frequency.

If group delay is changing over the  bandwidth of a particular signal then the parts of the signal will arrive at different times depending upon frequency and the signal will be altered.

You could pick a time in the middle of the range of times over the bandwidth of the signal and call it an estimate but really the signal has not been delayed one specific amount of time, but has in fact been delayed over range of times given exactly by the group delay at each frequency.

Again if group delay changes over the bandwidth of a signal that signal will be altered.

You can see in the chart above that compares the GD method delayed tone burst (green) to the tone burst passing through the AP filter (red) that the AP filter has slightly altered the shape of the tone burst.

The center of the red tone bursts envelope is delayed less than the center of the envelope of the green tone burst but the ends of the red tone bursts envelope actually have more delay than the ends of the envelope of the green tone burst.

The AP filtered signal has been altered although very slightly so it will not line up exactly with the delayed signal with any one amount of delay because they no longer are exactly the same.

Quote

Group delay, on the other hand, is a derived quantity that really only has application to the envelopes of narrowband modulated signals.

So why do we even speak of group delay?


Group delay actually is always group delay no matter what the bandwidth.

They say narrowband because of the alteration to the signal that occurs if group delay changes over the bandwidth of the signal.

If you consider ever narrower bands of the spectrum group delay will vary less until you reach a point where there is no signifigant change in group delay over the entire band.

For that reason the narrower the bandwidth of a signal the less it will be altered when passing through a filter.

The tone burst in the above examples has a narrow bandwidth and passes through the AP filter almost unchanged exept for phase.

If you were to send a wideband signal through our 16th order LR AP filter with it's volatile group delay curve parts of that signals spectrum would be scattered over a range of delay times.

No one delay time could match that signal up with what comes out of the filter because what comes out the filter would no longer be the same thing (apple in orange out).

That is why they say group delay applies to narrow band signals, it's because one delay time could not explain the arrival of a wide band signal passing through a filter with a volatile group delay curve.

However no other type of delay specification could either.

In audio however we are not using group delay to calculate a single delay time that tells us exactly when a signal will arrive.

Instead we are using group delay to calculate the range of times over which a signals spectra will be scattered so we can quantify to what extent the system will alter that signal, which means the above considerations don't apply.

Group delay really is the one that gives the actual delay.

The above example predicting the arrival time of the tone burst shows it.

Let me explain further, this post isn't nearly long enough (I know because AC's hard drives aren't full yet so how could it be)...

Energy at a single frequency can never change amplitude or phase, ever!

Likewise time has no meaning whatsoever at a single frequency.

For any change in a signal to occur their must be energy at more than a single frequency.

This is where the 'group' in group delay comes from.

No information can be sent without a group of frequencies present, ever!

With just two frequencies present you can have a modulated sinusiod.

It will have events occuring at specific points in time.

Like when the minimum level is reached (null) and the maximum (peak envelope).

If you introduce a phase differential between the two frequency componets one up in phase and the other down in phase the phase will remain the same for the modulated sinusoid.

But now the the time where it's event's occur is changed.

The amount of time shift is simply the negative of the difference in phase divided by the difference in frequency or group delay=-d(phase(periods))/d(frequency(hz)).

Adjusting the phase of each frequency componet the same amount in the same direction has no effect upon the signal except that the phase has been changed.

The null will still occur at the same time and so will the peak envelope (all events actually).



The more frequencies present in the signal the more complicated the signal can be.

Real signals like "Oops I Did it Again" by Brittney Spears will have countless frequency componets throughout the spectrum.

Rearranging these componets phase will alter the signals event timing (every drum beat, cymbal crash and keyboard note) as given by the group delay equation.

The variation in group delay time over the spectrum indicates exactly how that signals spectra are scattered in time.

Phase delay simply tells what amount of delay time that would be required to produce the same phase shift at a particular frequency.

This delay time is not necessarily the amount of delay the signal will experience like would be arrived at with group delay it is only an amount of delay time that will give the same phase shift at a particular frequency.

As was shown above a filter with non-linear phase will cuase phase shift that does not directly correlate with it's delay time in every part of the spectrum.

Daryl
« Last Edit: 23 Aug 2006, 01:45 pm by Daryl »

gerchin

  • Jr. Member
  • Posts: 81
Re: Will the real Delay please stand up!
« Reply #14 on: 23 Aug 2006, 12:10 am »
Fortunately phase is not relevant to our purpose so it does not matter.

Oooh, I'm a strong advocate of waveform fidelity, so I have a little trouble swallowing that.

Quote
You can now make the obsevation that when passing through a filter with non-linear phase the phase of a signal can be converted by the filter.

The signal is delayed a specific amount of time but the phase shift of the signal after passing through the filter is other than the phase shift that you would expect from the amount of time the signal was delayed.

Actually, your first set of tone bursts indicate that the phase is exactly as phase delay predicted, but the envelope is wrong.  Your second set of tone bursts indicate that the envelope is (almost) exactly as group delay predicted, but the phase is wrong.  This is intuitively satisfying, but your examples show it much better than intuition can.

Quote
Don't respond yet I know what you are going to say.

Maybe not.  I will say that, so far, this is one of the most interesting and revealing examples that I have ever seen of exactly what phase delay and group delay mean in terms of their effect upon waveforms.  I am anxious to see what else you might have up your sleeve.

Thanks,
Greg

Scotty

  • Jr. Member
  • Posts: 135
Re: Phase, group delay, and transient response questions
« Reply #15 on: 23 Aug 2006, 05:53 am »
Greg the key thing to remember is that almost no loudspeakers are designed to deliver an accurate acoustic analogue of the electrical signal they receive to your
ears in your listening room. Of loudspeakers readily available to the ordinary music lover in recent times, only Dunlavey speakers would deliver an intact 1kHz squarewave to a microphone in an anechoic chamber.
Waveform fidelity pretty much doesn't survive the trip to your ears when a conventional loudspeaker plays in an ordinary home enviroment.
Additionally, most crossover designs in use today will not pass a squarewave intact to the drivers in the first place. So even if by some quirk of fate or accident of design the baffle layout did not introduce inter-driver delay errors
waveform fidelity would still be DOA due to the crossover design itself.
 Fortunately these facts don't stop me from enjoying the music I listen to from my less than perfect loudspeakers.
Scotty

gerchin

  • Jr. Member
  • Posts: 81
Re: Will the real Delay please stand up!
« Reply #16 on: 23 Aug 2006, 01:27 pm »
First, group delay is not an estimate but actually an exact amount of time that signals are delayed for each area of the spectrum.

The reason you would say estimate is that if phase is not linear in the part of the spectrum you are considering then group delay will be changing with frequency.

Yes, I understand that.  Any non-sinusoidal signal has nonzero bandwidth, so there will be dispersion through any filter that does not have a linear phase characteristic.

This leads to an interesting thought experiment, though:  At any given frequency, unless the filter has a truly linear phase characteristic, the phase delay -Ø/ω and the group delay -dØ/dω will generally be different.  If we use an infinitely narrowband signal, a pure sinusoid of infinite duration, then the phase delay will predict the phase of that sinusoid, after passing through the filter, while the group delay will predict the timing of its "envelope".  Does group delay have any meaning in this context?  If not, then group delay is only meaningful for narrowband signals having bandwidth that is not too narrow!

Quote
Energy at a single frequency can never change amplitude or phase, ever!

Likewise time has no meaning whatsoever at a single frequency.

For any change in a signal to occur their must be energy at more than a single frequency.

This is where the 'group' in group delay comes from.

No information can be sent without a group of frequencies present, ever!

Yes, this is standard signal processing; Fourier, Parseval, Shannon, et al.

Quote
If you introduce a phase differential between the two frequency componets one up in phase and the other down in phase the phase will remain the same for the modulated sinusoid.

But now the the time where it's event's occur is changed.

The amount of time shift is simply the negative of the difference in phase divided by the difference in frequency or group delay=-d(phase(periods))/d(frequency(hz)).

Adjusting the phase of each frequency componet the same amount in the same direction has no effect upon the signal except that the phase has been changed.

The null will still occur at the same time and so will the peak envelope (all events actually).

Yes, I believe that all of this is predicted from trig identities, though it is interesting to see your graphics showing the effect.

Daryl, I must say, I've been at this signal processing game for over twenty years and I've never seen a better explanation of group delay vs. phase delay.  Everything you've written is something I've seen before, but it's never been so well encapsulated and illustrated.  My compliments.

Greg

gerchin

  • Jr. Member
  • Posts: 81
Re: Phase, group delay, and transient response questions
« Reply #17 on: 23 Aug 2006, 01:28 pm »
Greg the key thing to remember is that almost no loudspeakers are designed to deliver an accurate acoustic analogue of the electrical signal they receive to your
ears in your listening room.

The only response that I have to that is:  They should be!

Greg

Davey

  • Full Member
  • Posts: 1481
Re: Phase, group delay, and transient response questions
« Reply #18 on: 23 Aug 2006, 02:35 pm »

The only response that I have to that is:  They should be!

Greg
[/quote]

Yep, there's a conceptual "correctness" to that.  But the real world forces other design aspects upon the situation.

For instance, the Dunlavy speakers used true, first-order acoustic filters to achieve the linear-phase response at (and only at) the single point in space.  In other speaker design cases filters like this would probably result in much higher levels of distortion from particular drivers because of the shallow high-pass filter slopes.

I tend to think waveform fidelity is important, but other, more important aspects of the overall speaker design shouldn't be sacrificed to achieve it.

Also, meaningful comparisons between linear-phase crossovers and others are very difficult to achieve.  You could audition a Dunlavy speaker next to a similar-drivered speaker that used LR24 crossovers.  You may like one or the other, but it's very difficult to say that it was the linear-phase operation of the Dunlavy that was responsible for the difference.  There's so much more to it than that.

There are some practical experiments that can be used to evaluate the audibility of waveform distortion.  I think the best way is to use headphones and "distort" favorite CD tracks with an all-pass function (with phase shift equivalent to a non-linear-phase crossover) and compare them to the original.  You can do this by ripping tracks and processing with various computer programs, or you could also do this with a real circuit that could be switched in/out of the signal path.

Cheers,

Davey.

Daryl

Re: Phase, group delay, and transient response questions
« Reply #19 on: 26 Aug 2006, 03:30 am »
Quote
This leads to an interesting thought experiment, though:  At any given frequency, unless the filter has a truly linear phase characteristic, the phase delay -Ø/ω and the group delay -dØ/dω will generally be different.  If we use an infinitely narrowband signal, a pure sinusoid of infinite duration, then the phase delay will predict the phase of that sinusoid, after passing through the filter, while the group delay will predict the timing of its "envelope".  Does group delay have any meaning in this context?  If not, then group delay is only meaningful for narrowband signals having bandwidth that is not too narrow!

Hi Greg,

After composing my last post (and having a rest) I have my thoughts on the subject much more collected.

Rereading my post I see it could be put more simply now that I have it all in my head.

Your thought experiment question neatly sums up the group delay/phase delay comparison.

In a nutshell.....


Time does not exist at a single frequency and neither does delay.

Phase delay is derived from a single frequency so in it cannot be delay even though the word 'delay' is in the title.

In fact phase delay is actually just 'phase'.

Dividing phase by frequency simply converts it to an equivilant amount of time.

Phase delay is simply phase expressed in seconds.

The slope of phase (group delay) indicates how signals are shifted in time.

Group delay is specified at each frequency using a derivitave.

Neither time nor delay can exist at a single fequency but in a derivitave the frequency is dealt with in an as 'd' approaches zero context making the frequency for all practical purposes a single frequency but technicaly not exactly a single frequency.

In the context of audio what we need to know is dispersion (I did not know the term but I saw it in one of your posts:variation in time vs. frequency).

An audio signal is a wideband signal with specificly timed events.

Group delay indicates the dispersion inflicted upon a signal passing through the system.

Daryl