# Physical Meaning of Negative Group Delay for causal LTI systems

I have implemented in Matlab (with minor variations) the example 5.1.2 "Illustration of Effects of Group Delay and Attenuation" I found in Alan Oppenheim's Discrete-Time Signal Processing 3rd edition. In this example, 3 narrow band signals (high $0.4*2*\pi$, low $0.1*2*\pi$ and medium $0.2*2*\pi$ frequency in that order) which I will call tones, are supplied as the input to an LTI filter which has both positive and negative group delay. The goal of the example is to trace the effect on the individual tones at the output of the system.

Even though the book doesn't mention explicitly anything about causality in this example, I'm interested in the causal system case. I have modified the original example (see code) to obtain a negative group delay in a broader range of frequencies around $0.4*2*\pi$ and I have switched the input order. The negative group delay is achieved by placing zeros close to the unit circle and around $0.4*2*\pi$. This unfortunately attenuates this frequency at the output.

This is the group delay and pole-zero plot of the system.

From the group delay around $0.4*2*\pi$ one might be tempted to think that since the group delay is a measure delay, then a negative group delay would imply that a signal can exit the system before it enters it, which would contradict causality.

This is the output of the system when the input is medium ($0.2*2*\pi$), low ($0.1*2*\pi$) and high ($0.4*2*\pi$) frequency narrow-band signals in that order:

1. Would it be correct to think that the tone with high frequency ($0.4*2*\pi$) has been advanced (moved towards time origin) even though due to attenuation we can't see it? Sort of thinking that it has switched places with low frequency ($0.1*2*\pi$). Namely, having a medium, low, high input the output is medium, high, low.

2. Is this a non-causal system made causal using a buffer since it uses the samples previous to the high tone to be able to shift it there?

3. If the tone with high frequency is placed first, since it couldn't be moved previous to that position, is it correct to assume that the filter will impose a delay to perform a causal filtering?

1. I have seen that for causal systems, an all-pass system contributes with a positive group delay. Is it possible to have a causal stable LTI filter with negative group delay? Is it possible that it doesn't have a close to zero magnitude around this band?

This article says that negative group delays do not imply time advance for causal systems. Rather, for signals in the band where the group delay is negative the filter tries to predict the input. If the signal is predictable from past values, then this brings about the illusion of a time advance. But this isn't really an answer to question 4.

This is my code:

tiempo = 1:200;

tono1 = hamming(length(tiempo))'.*cos(0.2*pi*tiempo);
tono2 = hamming(length(tiempo))'.*cos(0.4*pi*tiempo - pi/2);
tono3 = hamming(length(tiempo))'.*cos(0.8*pi*tiempo + pi/5);

%original sequence from the example
%secuencia = [tono3 tono1 tono2 zeros(1,2*length(tiempo))] ;

%illustrative sequence
secuencia = [tono2 tono1 tono3 zeros(1,2*length(tiempo))] ;

figure
subplot(2,1,1)
plot(secuencia)
subplot(2,1,2)
plot(linspace(-pi,pi,length(secuencia)),abs(fftshift(fft(secuencia))))

% My modified system
Num = [0.0680369323869657,-0.148751468103317,-0.0840727385654123,0.433116714755249,0.194034734683412,-1.18139470037352,0.0865655483581989,1.87573223477322,-0.293287926967094,-2.71438209027864,0.967801050690298,2.73479750957294,-1.12373673157765,-2.50948341257372,1.33900328885438,1.60284621216217,-0.912031371991086,-0.934571172916517,0.623244740868535,0.316805565059412,-0.216878871699853,-0.101146864726266,0.0801206879869380];
Den = [1,-4.06364506017978,5.66323235132978,0.124350390160437,-7.36267038756774,1.97922786687038,11.0014898216757,-9.54873204176815,-5.37236943566056,9.75531866728175,0.420222506724089,-5.86926610519296,1.27627523253023,2.30928781145590,-1.18242719020123,0.106216188692196,-0.119037174950185,-0.0591088940098283,0.289996632822651,-0.260065787926090,0.248585836431488,-0.184399072803746,0.0647608900392396];

% Hd = dsp.IIRFilter('Numerator', Num, 'Denominator', Den);
% Hd = dfilt.df2t(Num, Den);

figure
subplot(2,1,1)
subplot(2,1,2)

• the way i saw an envelope get advanced in time with negative group delay was when there were repeated group envelopes. then it was ambiguous whether it was the future envelope advanced to the present or if it was a past envelope delayed to the present. BTW, that's an awful long IIR to not be factored into biquads. i hope you're not having numerical issues. – robert bristow-johnson Mar 12 '18 at 21:08
• I remember a similar question some years ago, and the explanation that seemed to best fit was that negative delay is associated with a local differentiation. For example, if sin(x) is at the input, cos(x) is at the ouput, which might give the impression it's time-advancing, but if you'd have a pulse, you'd see there is nothing like that. You cannot make a stable filter with only negative time delay (never tried unstable), only "dips", here and there, which have to obey the general filter as being causal. Those dips will behave strangely, but not unnatural. – a concerned citizen Mar 14 '18 at 10:00
• @aconcernedcitizen "You cannot make a stable filter with only negative time delay (never tried unstable)". This is actually part of the opinions I'm looking for. Please elaborate an answer! – VMMF Mar 14 '18 at 14:05
• I find this very enlightening: researchgate.net/publication/… – Max Mar 16 '18 at 10:23
• @VMMF If your phase goes positive (not in jumps) and consistent (not just 0.1rad, or so), then it's a sign you have a pole outside the ROC, or on the right-side (analog). So, supposing you have only unstable poles, the phase will go positive (instead of negative), so the group delay will be negative all the way. Ex.: stable H(s)=1/(s^2+s+1) (**-**0.5+/-j0.866); phase is im/re, with im=-w and re=1-w^2. im is negative, re is positive until w0, then negative. Phase goes negative. Unstable is with s^2-s+1, when im is positive, re unchanged, thus phase goes positive. – a concerned citizen Mar 20 '18 at 15:26

Since nobody has answered my question yet. I will try to partially answer it myself. However, even though I accept it as the final answer I can revoke this if another user elaborates a much better answer, which I think is possible.

After studying the proposal given by the above mentioned article about how to obtain a piece-wise positive group delay in a causal system I have realized that the system they propose resembles the inverse system of a notch filter.

The original system proposed by the article has the following magnitude response, group delay and poles and zeros diagram:

From the previous image I saw that the system behaved like a “peaking filter” designed in Matlab’s filter designer tool except that instead of only letting a narrow frequency band pass and attenuate the others it rather amplified a narrow band and leave the others unchanged.This system exhibits a negative group delay on both sides of the magnitude peak. However it is only of a few samples, perhaps -5.

I later modified it by moving the poles and zeros around $0.5*\pi$ to be able to better observe its influence and by aligning the zeros and poles to have the same phase angle just like in an IIR notch filter. However,instead of placing the zeros closer to the unit circle, I placed the poles closer to the unit circle as if this piece-wise negative group delay system was the inverse of the notch filter. That way I achieved a similar negative group delay on both sides of the peak.

A comparison of the notch filter (left) and article's filter (right) can be seen in the following picture:

It can be noticed that the negative group delay introduced by the notch filter is greater in magnitude for a narrow frequency band than the one of the original system. As a conclusion I have observed so far that in causal systems zeros close to the unit circle introduce the kind of phase distortion that generates negative group delay. The closer to the unit circle, the more negative the group delay. Unfortunately also the more attenuated the frequency response.

Would it be correct to think that the tone with high frequency ($0.4*2*\pi$) has been advanced (moved towards time origin) even though due to attenuation we can't see it? Sort of thinking that it has switched places with low frequency ($0.1*2*\pi$). Namely, having a medium, low, high input the output is medium, high, low.

Extracting the main idea from the article: negative group delays do not imply time advance in causal systems. Rather, for signals in the band where the group delay is negative the filter tries to predict the input. If the signal is predictable from past values (as for the Hamming pulse), then this brings about the illusion of a time advance. The illusion breaks down when the signal contains an unpredictable event (the truncation of the Hamming pulse).

I have seen that for causal systems, an all-pass system contributes with a positive group delay. Is it possible to have a causal stable LTI filter with negative group delay? Is it possible that it doesn't have a close to zero magnitude around this band?

In the causal systems I've seen so far (I coincide with @a concerned citizen) you cannot make a stable filter with only negative time delay, only "dips", here and there. These "dips" are caused by zeros of the transfer function of value close to the unit circle. If a system magnitude not close to zero is desired in the bands with positive group delay, then transfer function poles must be introduced in the vicinity of transfer function zeros which will tend to lessen the negativity of the group delay in these frequency bands.So I haven't found a practical way of introducing a large time advance without making the system magnitude close to zero.

Is this a non-causal system made causal using a buffer since it uses the samples previous to the high tone to be able to shift it there?

In order to truly advance in time the frequency band that has the negative group delay, the system would need to be non-causal.

A system whose present response depends on future values of the inputs is non-causal and can’t be implemented in real time. However, if a buffer of length maximum negative group delay is placed in front of the system input and the system is modified to use the samples from this buffer (which would be the equivalent of using samples "in the future") then the non-causal system would behave as causal. Sort of having a maximum negative group delay samples pipeline before appropriate output is obtained.

However I'm not sure this is case here because the filtfilt command in Matlab which is suppose to eliminate the contribution of non-linear phase filtering and any group delay effect, yields the same result as the filter command for the tone which was supposed to be advanced in time. This can be seen in the following pictures, in which the tone that was delayed is brought back to its place by filtfilt (bottom left figure) in each case, but the tone that was supposed to be advanced doesn't move:

If the tone with high frequency is placed first, since it couldn't be moved previous to that position, is it correct to assume that the filter will impose a delay to perform a causal filtering?

I still don't have an explanation for this!

• All are causal, so if the input is harmonic (i.e. sine), then it can predict the output, but it first needs to adapt, causally. So you'll see a little transient followed by what would seem an advance in time. Add a pulse, as suggested above, and the mask will fall. That's why I said it resembles a derivative: d(sin(x))/dx=cos(x), but with a pulse, or anything non-harmonic, the magic is gone. So the delay is there, whether you want it or not (causality), but the overall effect might give a different impression. Here, only the region with neg. del. will do it, the rest adds normal (pos.) delay. – a concerned citizen Mar 20 '18 at 15:33