f



phase to group delay

I designed an algorithm to compute signal delay through an RF channel. 
I first verified the algorithm using a known IIR model. I managed to get 
groupdelay of this IIR spot on compared to that given by Matlab function 
grpdelay(num,den). The algorithm is based on sending frequency sweep chirp

signal followed by fft then conversion of phase to groupdelay using the 
derivative of negative angular phase with respect to angular frequency.

The algorithm has been released and is working well. I am now asked if I 
could apply it to the case when the available test signal is only single 
tone instead of frequency sweep.

I tested my same algorithm on single tone. All looks ok but with a mystery

factor of 2 needed to get IIR model groupdelay match that of matlab. I 
mean if I multiply the computed groupdelay based on fft by 2 then it gets 
correct with a small margin of error.

Any idea what this factor of 2 might be. In both cases I use real only 
chirp signal or real only single tone and the fft is complex. Processing 
is identical throughout the algorithm for both cases in every step.

Regards

Kadhiem






0
kaz
9/30/2012 6:26:18 PM
comp.dsp 20333 articles. 1 followers. allnor (8509) is leader. Post Follow

37 Replies
441 Views

Similar Articles

[PageSpeed] 9

kaz <37480@dsprelated> wrote:

> I designed an algorithm to compute signal delay through an RF channel. 
> I first verified the algorithm using a known IIR model. I managed to get 
> groupdelay of this IIR spot on compared to that given by Matlab function 
> grpdelay(num,den). The algorithm is based on sending frequency sweep chirp
> signal followed by fft then conversion of phase to groupdelay using the 
> derivative of negative angular phase with respect to angular frequency.

In optics, phase velocity is w/k, group velocity dw/dk. 
I think you can derive phase delay and group delay from that.

> The algorithm has been released and is working well. I am now asked if I 
> could apply it to the case when the available test signal is only single 
> tone instead of frequency sweep.

I don't see how you get the derivative from a single tone.
If you mean more than one single tone, then I might agree.

> I tested my same algorithm on single tone. All looks ok but with a mystery

-- glen
0
gah (12851)
9/30/2012 9:15:08 PM
On Sunday, September 30, 2012 8:26:19 PM UTC+2, kaz wrote:
> I designed an algorithm to compute signal delay through an RF channel. 
> 
> I first verified the algorithm using a known IIR model. I managed to get 
> 
> groupdelay of this IIR spot on compared to that given by Matlab function 
> 
> grpdelay(num,den). The algorithm is based on sending frequency sweep chirp
> 
> 
> 
> signal followed by fft then conversion of phase to groupdelay using the 
> 
> derivative of negative angular phase with respect to angular frequency.
> 
> 
> 
> The algorithm has been released and is working well. I am now asked if I 
> 
> could apply it to the case when the available test signal is only single 
> 
> tone instead of frequency sweep.
> 
> 
> 
> I tested my same algorithm on single tone. All looks ok but with a mystery
> 
> 
> 
> factor of 2 needed to get IIR model groupdelay match that of matlab. I 
> 
> mean if I multiply the computed groupdelay based on fft by 2 then it gets 
> 
> correct with a small margin of error.
> 
> 
> 
> Any idea what this factor of 2 might be. In both cases I use real only 
> 
> chirp signal or real only single tone and the fft is complex. Processing 
> 
> is identical throughout the algorithm for both cases in every step.
> 
> 
> 
> Regards
> 
> 
> 
> Kadhiem

like glen lead you to, you can only measure a phase delay with a single tone
0
10/1/2012 6:13:44 AM
<kelvin.bitnick@gmail.com> wrote in message 
news:45edd89c-0639-4c80-ab1d-e9472aa8d7bd@googlegroups.com...
> On Sunday, September 30, 2012 8:26:19 PM UTC+2, kaz wrote:
>> I designed an algorithm to compute signal delay through an RF channel.
>> I first verified the algorithm using a known IIR model. I managed to get
>> groupdelay of this IIR spot on compared to that given by Matlab function
>> grpdelay(num,den). The algorithm is based on sending frequency sweep 
>> chirp
>> signal followed by fft then conversion of phase to groupdelay using the
>> derivative of negative angular phase with respect to angular frequency.
>>
>> The algorithm has been released and is working well. I am now asked if I
>> could apply it to the case when the available test signal is only single
>> tone instead of frequency sweep.
>>
>>
>> I tested my same algorithm on single tone. All looks ok but with a 
>> mystery
>> factor of 2 needed to get IIR model groupdelay match that of matlab. I
>> mean if I multiply the computed groupdelay based on fft by 2 then it gets
>> correct with a small margin of error.
>>
>>
>> Any idea what this factor of 2 might be. In both cases I use real only
>> chirp signal or real only single tone and the fft is complex. Processing
>> is identical throughout the algorithm for both cases in every step.

Matlabi apparently messed phase unwrapping.

> like glen lead you to, you can only measure a phase delay with a single 
> ton

You two simpletones could figure out that delay could be measured with a 
burst of simple tone.

VLV


0
nospam (2804)
10/1/2012 2:18:01 PM
>> Matlabi apparently messed phase unwrapping.

sounds only too familiar.
To -track- a phase from zero across the frequency axis, I need signal
energy everywhere in-between.
If the signal is bandpass-type - such as single tone - it's often not
possible at all to resolve the phase ambiguity without side information.

See the end of page here:
http://www.dsprelated.com/showarticle/26.php
section "phase unwrapping" for this particular problem.




0
mnentwig
10/1/2012 4:47:15 PM
>>> Matlabi apparently messed phase unwrapping.
>
>sounds only too familiar.
>To -track- a phase from zero across the frequency axis, I need signal
>energy everywhere in-between.
>If the signal is bandpass-type - such as single tone - it's often not
>possible at all to resolve the phase ambiguity without side information.
>
>See the end of page here:
>http://www.dsprelated.com/showarticle/26.php
>section "phase unwrapping" for this particular problem.
>

Just to add up more information. In my design I do ratio of output fft to
input fft. Thus I have in effect two tones to compare(input and output).
Then convert instantaneous phase difference of fft ratio to delay. I might
as well look at time domain but it is rather inconsistent and less
accurate. 
0
kaz
10/1/2012 5:25:42 PM
"kaz" <37480@dsprelated> wrote in message 
news:8eGdndSNPfCLT_TNnZ2dnUVZ_qSdnZ2d@giganews.com...

>>>> Matlabi apparently messed phase unwrapping.
>>
> Just to add up more information. In my design I do ratio of output fft to
> input fft. Thus I have in effect two tones to compare(input and output).
> Then convert instantaneous phase difference of fft ratio to delay.

Standard mistake. By computing the ratio of FFTs you are running into zero 
divided by zero problem.

> I might as well look at time domain but it is rather inconsistent and less 
> accurate.

Then you do it in the wrong way. Since input is the same, the result must be 
the same.

VLV


0
nospam (2804)
10/1/2012 5:54:34 PM
but if you look only at a single frequency, how could you tell whether,
say, 5 degrees phase difference are really 5 degrees, or 365 degrees, or
725 degrees? 

0
mnentwig
10/1/2012 6:54:31 PM
On 10/1/12 2:54 PM, mnentwig wrote:
> but if you look only at a single frequency, how could you tell whether,
> say, 5 degrees phase difference are really 5 degrees, or 365 degrees, or
> 725 degrees?


simple phase unwrapping basically insists that the magnitude of the 
phase difference between adjacent bins in the DFT must be pi radians or 
less.  so it will add whatever integer multiple of 2*pi necessary to 
make that transition 5 degrees rather than 365.

i would instead calculate the delta phase *first*, between adjacent bins 
and accumulate those deltas to get an unwrapped phase for calculating 
phase delay.  for group delay, it's based on the deltas in the first 
place, so phase unwrapping is not necessary.

that delta is:

   arg{ X[k+1] } - arg{ X[k] }  =  arg{  X[k+1]/X[k] }


  X[k+1]/X[k]  =  (Re{X[k+1]} + j*Im{X[k+1]}) / (Re{X[k]} + j*Im{X[k]})


work out the math from there.


start out from X[0] which will have phase of 0 if the DC component is 
positive and a phase of + or - pi for negative phase.

-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/1/2012 7:21:30 PM
"mnentwig" <24789@dsprelated> wrote in message 
news:mMqdnVI5r7x6e_TNnZ2dnUVZ_oidnZ2d@giganews.com...
> but if you look only at a single frequency, how could you tell whether,
> say, 5 degrees phase difference are really 5 degrees, or 365 degrees, or
> 725 degrees?

Not a single frequency. A burst of a sine wave, like in classic monopulse 
radar.



0
nospam (2804)
10/1/2012 7:26:08 PM
>Not a single frequency. A burst of a sine wave, like in classic monopulse

>radar.

that would work, as it has a nice sinc-spectrum instead of one discrete
line.
But I understood "single tone" from the original post that it's about using
a continuous-wave signal, steady-state, no transients.
0
mnentwig
10/1/2012 8:22:48 PM
>but if you look only at a single frequency, how could you tell whether,
>say, 5 degrees phase difference are really 5 degrees, or 365 degrees, or
>725 degrees? 
>
>

The algorithm looks at phase gradient of output tone/input tone and it
works as expected as measure of absolute delay between input & output (in
this case it matches groupdelay of given filter at the tone point but delay
requires x2 factor for tone as opposed to frequency sweep) 
0
kaz
10/2/2012 6:12:00 PM
On 10/2/12 2:12 PM, kaz wrote:
>> but if you look only at a single frequency, how could you tell whether,
>> say, 5 degrees phase difference are really 5 degrees, or 365 degrees, or
>> 725 degrees?
>>
>>
>
> The algorithm looks at phase gradient of output tone/input tone and it
> works as expected as measure of absolute delay between input&  output (in
> this case it matches groupdelay of given filter at the tone point but delay
> requires x2 factor for tone as opposed to frequency sweep)


okay kaz,

is the driving swept tone like

    x(t) = exp( j*pi*beta*t^2 )

is the instantaneous frequency whatever multiplies the "t" (which is 
pi*beta*t) or the derivative of the phase (which is 2*pi*beta*t)?

what is the sweep rate of this?   beta or beta/2?

-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/2/2012 7:54:18 PM
>On 10/2/12 2:12 PM, kaz wrote:
>>> but if you look only at a single frequency, how could you tell
whether,
>>> say, 5 degrees phase difference are really 5 degrees, or 365 degrees,
or
>>> 725 degrees?
>>>
>>>
>>
>> The algorithm looks at phase gradient of output tone/input tone and it
>> works as expected as measure of absolute delay between input&  output
(in
>> this case it matches groupdelay of given filter at the tone point but
delay
>> requires x2 factor for tone as opposed to frequency sweep)
>
>
>okay kaz,
>
>is the driving swept tone like
>
>    x(t) = exp( j*pi*beta*t^2 )
>
>is the instantaneous frequency whatever multiplies the "t" (which is 
>pi*beta*t) or the derivative of the phase (which is 2*pi*beta*t)?
>
>what is the sweep rate of this?   beta or beta/2?
>
>-- 
>
>r b-j                  rbj@audioimagination.com
>
>"Imagination is more important than knowledge."
>
>
>

I generate a tone from the following equation:

x_in = exp(j*2*pi*(0:1023)*fo/Fs);

where fo is any chosen tone frequency and Fs is sampling rate. I then
generate IF centre fc at same sampling frequency:

IF = exp(j*2*pi*(0:1023)*fc/Fs);

then upconvert the tone:

y_in = real(x_in.*IF);

then pass y_in through a known IIR model to get y_out. Do fft on both y_in
& y_out. Take the ratio of fft_out/fft_in, get the phase of this ratio and
convert it to groupdelay. Then compare the delay at the tone point for both
the IIR model and this fft ratio computation. The time domain can also tell
the delay in sample units in most but not all cases.





0
kaz
10/3/2012 1:12:26 AM
On 10/2/12 9:12 PM, kaz wrote:
>> On 10/2/12 2:12 PM, kaz wrote:
>>>> but if you look only at a single frequency, how could you tell
> whether,
>>>> say, 5 degrees phase difference are really 5 degrees, or 365 degrees,
> or
>>>> 725 degrees?
>>>>
>>>>
>>>
>>> The algorithm looks at phase gradient of output tone/input tone and it
>>> works as expected as measure of absolute delay between input&   output
> (in
>>> this case it matches groupdelay of given filter at the tone point but
> delay
>>> requires x2 factor for tone as opposed to frequency sweep)
>>
>>
>> okay kaz,
>>
>> is the driving swept tone like
>>
>>     x(t) = exp( j*pi*beta*t^2 )
>>
>> is the instantaneous frequency whatever multiplies the "t" (which is
>> pi*beta*t) or the derivative of the phase (which is 2*pi*beta*t)?
>>
>> what is the sweep rate of this?   beta or beta/2?
>>
>> --
>>
>> r b-j                  rbj@audioimagination.com
>>
>> "Imagination is more important than knowledge."
>>
>>
>>
>
> I generate a tone from the following equation:
>
> x_in = exp(j*2*pi*(0:1023)*fo/Fs);
>
> where fo is any chosen tone frequency and Fs is sampling rate. I then
> generate IF centre fc at same sampling frequency:
>
> IF = exp(j*2*pi*(0:1023)*fc/Fs);
>
> then upconvert the tone:
>
> y_in = real(x_in.*IF);
>

okay, i see no reason why that isn't

    y_in  =  cos(2*pi*(0:1023)*(fo+fc)/Fs)


> then pass y_in through a known IIR model to get y_out. Do fft on both y_in
> &  y_out. Take the ratio of fft_out/fft_in, get the phase of this ratio and
> convert it to groupdelay. Then compare the delay at the tone point for both
> the IIR model and this fft ratio computation. The time domain can also tell
> the delay in sample units in most but not all cases.

i think i misread your original problem.  i thought that you were 
driving it with a "chirp".

since this is just a single sinusoid, the output of the IIR will have a 
steady-state sinusoid that will be delayed by the *phase* delay of the 
filter at frequency (fo+fc)/Fs.  the group delay isn't really directly 
measurable from passing a single sinusoid through a filter.  not unless 
you somehow construct the whole frequency response by inferring a filter 
model from the transient response.  from the model you can get an idea 
what the group delay is.


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/3/2012 1:49:46 AM
>On 10/2/12 9:12 PM, kaz wrote:
>>> On 10/2/12 2:12 PM, kaz wrote:
>>>>> but if you look only at a single frequency, how could you tell
>> whether,
>>>>> say, 5 degrees phase difference are really 5 degrees, or 365
degrees,
>> or
>>>>> 725 degrees?
>>>>>
>>>>>
>>>>
>>>> The algorithm looks at phase gradient of output tone/input tone and
it
>>>> works as expected as measure of absolute delay between input&  
output
>> (in
>>>> this case it matches groupdelay of given filter at the tone point but
>> delay
>>>> requires x2 factor for tone as opposed to frequency sweep)
>>>
>>>
>>> okay kaz,
>>>
>>> is the driving swept tone like
>>>
>>>     x(t) = exp( j*pi*beta*t^2 )
>>>
>>> is the instantaneous frequency whatever multiplies the "t" (which is
>>> pi*beta*t) or the derivative of the phase (which is 2*pi*beta*t)?
>>>
>>> what is the sweep rate of this?   beta or beta/2?
>>>
>>> --
>>>
>>> r b-j                  rbj@audioimagination.com
>>>
>>> "Imagination is more important than knowledge."
>>>
>>>
>>>
>>
>> I generate a tone from the following equation:
>>
>> x_in = exp(j*2*pi*(0:1023)*fo/Fs);
>>
>> where fo is any chosen tone frequency and Fs is sampling rate. I then
>> generate IF centre fc at same sampling frequency:
>>
>> IF = exp(j*2*pi*(0:1023)*fc/Fs);
>>
>> then upconvert the tone:
>>
>> y_in = real(x_in.*IF);
>>
>
>okay, i see no reason why that isn't
>
>    y_in  =  cos(2*pi*(0:1023)*(fo+fc)/Fs)
>
>

You are right but I am doing that for setup purposes and to compare
directly with chirp case.

>> then pass y_in through a known IIR model to get y_out. Do fft on both
y_in
>> &  y_out. Take the ratio of fft_out/fft_in, get the phase of this ratio
and
>> convert it to groupdelay. Then compare the delay at the tone point for
both
>> the IIR model and this fft ratio computation. The time domain can also
tell
>> the delay in sample units in most but not all cases.
>
>i think i misread your original problem.  i thought that you were 
>driving it with a "chirp".
>
>since this is just a single sinusoid, the output of the IIR will have a 
>steady-state sinusoid that will be delayed by the *phase* delay of the 
>filter at frequency (fo+fc)/Fs.  the group delay isn't really directly 
>measurable from passing a single sinusoid through a filter.  not unless 
>you somehow construct the whole frequency response by inferring a filter 
>model from the transient response.  from the model you can get an idea 
>what the group delay is.
>
>
>-- 
>
>r b-j                  rbj@audioimagination.com
>
>"Imagination is more important than knowledge."
>
>
>

As I mentioned I use same algorithm for both cases of chirp signal and
single tone. I literally just comment out one input or the other and look
at given passband range. In the case of chirp input I get the IIR
groupdelay spot on with my computed delay at every point(may need some
averaging). In the case of single tone I need to multiply by 2 no matter
what (fo) I use or what fft resolution I use. It may not be groupdelay
strictly speaking but it does follow the IIR groupdelay. The error is
actually very small after x2 scaling and ranges from 0 ~ 10 ns for Fs of
120Msps but stays so if I lower Fs! Practically I am convinced it is going
to work but just curious about the issue.



0
kaz
10/3/2012 2:21:17 AM
>> Take the ratio of fft_out/fft_in, get the phase of this ratio and
convert it to groupdelay

Sorry, your algorithm is broken. I suspect it works by accident on the
chirp, that's what causes all the confusion.

You need the *derivative* of phase with regard to frequency, and that you
cannot get from a single exp(...) tone.  

Re-read RBW's post, especially this line
>> the group delay isn't really directly measurable from passing a single
sinusoid through a filter




Attached the relevant lines from a piece of code I use sometimes.
H1 and H2 are frequency responses evaluated with a frequency offset +/-
deltaF_Hz relative to each other.


q.f_Hz = linspace(0.1e6, q.rate_Hz * 1.1, nFreq);

q.fMinusDelta = q.f_Hz - q.deltaF_Hz / 2;
q.fPlusDelta = q.f_Hz + q.deltaF_Hz / 2;

H1 = H_FIR(c.h, q.fMinusDelta / q.rate_Hz); % at minus deltaF
H2 = H_FIR(c.h, q.fPlusDelta / q.rate_Hz); % at plus deltaF

gd_s = calcEffGroupDelay_s(H1, H2, q.deltaF_Hz, q.wGrpDelay);
 
function H = H_FIR(h, fnorm)
    zInv = exp(-2i * pi * fnorm);
    H = polyval(fliplr(h), zInv);    
end

% **********************************************
% calculates the effective group delay for a signal
% with a magnitude spectrum given by weight.
% **********************************************    
function grpDelay_s = calcEffGroupDelay_s(H1, H2, deltaF_Hz, weight)
    deltaOmega_rad = deltaF_Hz * 2 * pi;
    
    % determine angle delta between frequency responses at each freq.
point
    deltaAngle_rad = unwrap(angle(H2) - angle(H1));
    
    % calculate group delay at each freq. point
    grpDelay_s = -deltaAngle_rad / deltaOmega_rad;

    % weighted group delay (implicitly suppresses frequencies without
    % signal energy)
    grpDelay_s = sum(grpDelay_s .* weight);
end

PS if anybody wonders: it's meant for Laplace domain, non-uniform frequency
grids, interpolated frequency reponses. For a known FIR, it's like carpet
bombing to kill a sparrow, expensive _and_ inaccurate. Bomb at your own
risk.

-markus
0
mnentwig
10/3/2012 9:21:30 AM
>Sorry, your algorithm is broken. I suspect it works by accident on the
>chirp, that's what causes all the confusion.


No way, it is based on derivative of phase with respect to frequency.
i.e. groupdelay = -diff(angle(fft_ratio))./(diff(freq)*2*pi); in samples.

>
>You need the *derivative* of phase with regard to frequency, and that you
>cannot get from a single exp(...) tone.  
>

true but equally one tone has phase change all along frequency domain and I
do same above equation. Naturally stop band phase is meaningless but that
small section of frequency domain at tone location is what I depend on.
Not quite correct but still works.


0
kaz
10/3/2012 10:40:06 AM
>> Not quite correct but still works.
Not quite correct and it does NOT work - that's what this is all about,
after all.

chirp:
- The chirp has some signal energy at all FFT bins. 
- It may be small but that's enough in the absence of noise:
  fft_ratio HAS a valid angle 
- diff gives meaningful angle difference between adjacent bins

single tone:
- The single tone has energy only at a single FFT bin. 
- It does NOT have a valid angle at all other bins
- including said bin's neighbors
- therefore, diff() calculates the difference between said bin and
garbage.
- the resulting garbage happens to look like a valid result, and that seems
to be the main problem. 

0
mnentwig
10/3/2012 1:48:42 PM
>>> Not quite correct but still works.
>Not quite correct and it does NOT work - that's what this is all about,
>after all.
>
>chirp:
>- The chirp has some signal energy at all FFT bins. 
>- It may be small but that's enough in the absence of noise:
>  fft_ratio HAS a valid angle 
>- diff gives meaningful angle difference between adjacent bins
>
>single tone:
>- The single tone has energy only at a single FFT bin. 
>- It does NOT have a valid angle at all other bins
>- including said bin's neighbors
>- therefore, diff() calculates the difference between said bin and
>garbage.
>- the resulting garbage happens to look like a valid result, and that
seems
>to be the main problem. 
>
>

That is all true. The single tone that I see is never in one bin. In effect
I am dependent on the side effect of leakage to adjacent bins to get some
practical result. Thanks for the replies. It therefore explains somehow the
odd thing about factor 2.
0
kaz
10/3/2012 5:36:25 PM
On 10/2/12 10:21 PM, kaz wrote:
>
> As I mentioned I use same algorithm for both cases of chirp signal and
> single tone. I literally just comment out one input or the other and look
> at given passband range. In the case of chirp input I get the IIR
> groupdelay spot on with my computed delay at every point(may need some
> averaging).

what particular delay is spot on with the chirp?  the delay of the 
instantaneous frequency?  group delay normally applies to the envelope 
of a sinusoid.  the apparent delay of the sinusoid itself is the "phase 
delay"

group delay   t_d(w)   =  -(d/dw) arg{ H(e^(jw) }

phase delay   t_phi(w) =  -1/w arg{ H(e^(jw) }

> In the case of single tone I need to multiply by 2 no matter
> what (fo) I use or what fft resolution I use.

what is the apparent delay of the tone?  the delay of the 
zero-crossings?  that's pretty much the phase delay.

> It may not be groupdelay
> strictly speaking but it does follow the IIR groupdelay.

the phase delay looks sorta like the group delay.  i guess that normally 
the phase delay would be greater than the group delay, but i dunno that 
this would always be the case.  i dunno what would bring about a factor 
of 2.  maybe something like this would happen at the resonant frequency.

> The error is
> actually very small after x2 scaling and ranges from 0 ~ 10 ns for Fs of
> 120Msps but stays so if I lower Fs! Practically I am convinced it is going
> to work but just curious about the issue.

well, i am not sure what your measurement methodology is.  what exactly 
are you comparing to the calculated group delay that is "spot on" for 
the swept sinusoid and what is apparently twice longer for 
constant-frequency case?


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/3/2012 6:35:13 PM
>what particular delay is spot on with the chirp?  the delay of the 
>instantaneous frequency?  group delay normally applies to the envelope 
>of a sinusoid.  the apparent delay of the sinusoid itself is the "phase 
>delay"
>
>group delay   t_d(w)   =  -(d/dw) arg{ H(e^(jw) }
>
>phase delay   t_phi(w) =  -1/w arg{ H(e^(jw) }
>

%example IIR modelling and groupdelay from Matlab 
num = fir1(22,.6);
den = [1 .2 -.4];
[gd1,f] = grpdelay(num,den,2^16,'whole',1);

%my computed version
gd2 = -diff(unwrap(angle(fft_ratio)))./diff(f*2*pi);
 
So it is groupdelay, not phase delay. The same algorithm is applied whether
the input is chirp or single tone.

Thus I use Matlab grpdelay function as my testbench. The frequency vector
(f) is 0~1 and identical between Matlab function and fft resolution



0
kaz
10/4/2012 3:33:22 AM
On 10/3/12 11:33 PM, kaz wrote:
>> what particular delay is spot on with the chirp?  the delay of the
>> instantaneous frequency?  group delay normally applies to the envelope
>> of a sinusoid.  the apparent delay of the sinusoid itself is the "phase
>> delay"
>>
>> group delay   t_d(w)   =  -(d/dw) arg{ H(e^(jw) }
>>
>> phase delay   t_phi(w) =  -1/w arg{ H(e^(jw) }
>>
>
> %example IIR modelling and groupdelay from Matlab
> num = fir1(22,.6);
> den = [1 .2 -.4];
> [gd1,f] = grpdelay(num,den,2^16,'whole',1);
>
> %my computed version
> gd2 = -diff(unwrap(angle(fft_ratio)))./diff(f*2*pi);
>
> So it is groupdelay, not phase delay. The same algorithm is applied whether
> the input is chirp or single tone.
>

now you haven't defined explicitly what "fft_ratio" is, but i can 
imagine what it is.  but it might be good to show the code that defines 
fft_ratio.

so what do you think this fft_ratio is going to be for the single tone? 
  what is going to be in the denominator of that fft_ratio for many 
frequency bins?  you will have serious numerical problems, because of 
dividing by a near zero value, where the angle could become any random 
angle.


> Thus I use Matlab grpdelay function as my testbench. The frequency vector
> (f) is 0~1 and identical between Matlab function and fft resolution

yeah, i know that MATLAB has a sorta weird convention for normalized 
frequency in that it's normalized to Nyquist, not Fs.


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/4/2012 4:41:14 AM
>
>now you haven't defined explicitly what "fft_ratio" is, but i can 
>imagine what it is.  but it might be good to show the code that defines 
>fft_ratio.
>
>so what do you think this fft_ratio is going to be for the single tone? 
>  what is going to be in the denominator of that fft_ratio for many 
>frequency bins?  you will have serious numerical problems, because of 
>dividing by a near zero value, where the angle could become any random 
>angle.
>
>

Well just fft ratio really. Thanks to matlab:

fft_in = fft(x,2^16);
fft_out = fft(filter(num,den,x),2^16); 
fft_ratio = fft1./fft2;

I then avoid stop band problems by reducing vectors just to see the pass
band of chirp or that of tone +/1 1MHz
0
kaz
10/4/2012 6:33:33 AM
>
>>
>>now you haven't defined explicitly what "fft_ratio" is, but i can 
>>imagine what it is.  but it might be good to show the code that defines 
>>fft_ratio.
>>
>>so what do you think this fft_ratio is going to be for the single tone? 
>>  what is going to be in the denominator of that fft_ratio for many 
>>frequency bins?  you will have serious numerical problems, because of 
>>dividing by a near zero value, where the angle could become any random 
>>angle.
>>
>>
>
>Well just fft ratio really. Thanks to matlab:
>
>fft_in = fft(x,2^16);
>fft_out = fft(filter(num,den,x),2^16); 
>fft_ratio = fft1./fft2;
>
>I then avoid stop band problems by reducing vectors just to see the pass

typo:

fft_ratio = fft_out./fft_in;

0
kaz
10/4/2012 6:44:47 AM
On 10/4/12 2:33 AM, kaz wrote:
>>
>> now you haven't defined explicitly what "fft_ratio" is, but i can
>> imagine what it is.  but it might be good to show the code that defines
>> fft_ratio.
>>
>> so what do you think this fft_ratio is going to be for the single tone?
>>   what is going to be in the denominator of that fft_ratio for many
>> frequency bins?  you will have serious numerical problems, because of
>> dividing by a near zero value, where the angle could become any random
>> angle.
>>
>>
>
> Well just fft ratio really. Thanks to matlab:
>
> fft_in = fft(x,2^16);
> fft_out = fft(filter(num,den,x),2^16);
> fft_ratio = fft_out./fft_in;
>

now, with a single tone, what do you think some of the values of fft_in 
are?  have you looked at those values?

normally, because of division-by-zero, you cannot get enough information 
about your system to derive the full system response from a single 
sinusoid.  certainly not from the steady-state response.  and you can't 
get group delay without knowledge of the system at *multiple* frequencies.

now, there *is* a possibility of getting some information from the 
*transient* response.  and what comes out of filter(num,den,x) will have 
both steady-state and transient response because of the initial states 
of your filter.  but the steady-state response, which is where nearly 
all of your energy is, cannot give you information about the LTI system 
(or "filter") beyond that discrete frequency.  you would do better if 
"x" was an impulse.  or some other broad-banded signal like a chirp.


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/4/2012 4:38:11 PM
>On 10/4/12 2:33 AM, kaz wrote:
>>>
>>> now you haven't defined explicitly what "fft_ratio" is, but i can
>>> imagine what it is.  but it might be good to show the code that
defines
>>> fft_ratio.
>>>
>>> so what do you think this fft_ratio is going to be for the single
tone?
>>>   what is going to be in the denominator of that fft_ratio for many
>>> frequency bins?  you will have serious numerical problems, because of
>>> dividing by a near zero value, where the angle could become any random
>>> angle.
>>>
>>>
>>
>> Well just fft ratio really. Thanks to matlab:
>>
>> fft_in = fft(x,2^16);
>> fft_out = fft(filter(num,den,x),2^16);
>> fft_ratio = fft_out./fft_in;
>>
>
>now, with a single tone, what do you think some of the values of fft_in 
>are?  have you looked at those values?
>
>normally, because of division-by-zero, you cannot get enough information 
>about your system to derive the full system response from a single 
>sinusoid.  certainly not from the steady-state response.  and you can't 
>get group delay without knowledge of the system at *multiple*
frequencies.
>
>now, there *is* a possibility of getting some information from the 
>*transient* response.  and what comes out of filter(num,den,x) will have 
>both steady-state and transient response because of the initial states 
>of your filter.  but the steady-state response, which is where nearly 
>all of your energy is, cannot give you information about the LTI system 
>(or "filter") beyond that discrete frequency.  you would do better if 
>"x" was an impulse.  or some other broad-banded signal like a chirp.
>
>
>-- 
>
>r b-j                  rbj@audioimagination.com
>
>"Imagination is more important than knowledge."
>
>
>

division by zero would 
0
kaz
10/4/2012 5:15:25 PM
>On 10/4/12 2:33 AM, kaz wrote:
>>>
>>> now you haven't defined explicitly what "fft_ratio" is, but i can
>>> imagine what it is.  but it might be good to show the code that
defines
>>> fft_ratio.
>>>
>>> so what do you think this fft_ratio is going to be for the single
tone?
>>>   what is going to be in the denominator of that fft_ratio for many
>>> frequency bins?  you will have serious numerical problems, because of
>>> dividing by a near zero value, where the angle could become any random
>>> angle.
>>>
>>>
>>
>> Well just fft ratio really. Thanks to matlab:
>>
>> fft_in = fft(x,2^16);
>> fft_out = fft(filter(num,den,x),2^16);
>> fft_ratio = fft_out./fft_in;
>>
>
>now, with a single tone, what do you think some of the values of fft_in 
>are?  have you looked at those values?
>
>normally, because of division-by-zero, you cannot get enough information 
>about your system to derive the full system response from a single 
>sinusoid.  certainly not from the steady-state response.  and you can't 
>get group delay without knowledge of the system at *multiple*
frequencies.
>
>now, there *is* a possibility of getting some information from the 
>*transient* response.  and what comes out of filter(num,den,x) will have 
>both steady-state and transient response because of the initial states 
>of your filter.  but the steady-state response, which is where nearly 
>all of your energy is, cannot give you information about the LTI system 
>(or "filter") beyond that discrete frequency.  you would do better if 
>"x" was an impulse.  or some other broad-banded signal like a chirp.
>
>
>-- 
>
>r b-j                  rbj@audioimagination.com
>
>"Imagination is more important than knowledge."
>
>
>

division by zero will be flagged by the tool. It doesn't actually happen.
I agree that single tone is not best. The problem is we have some
platforms
that can't generate anything more than tone or impulse. The impulse does
not work practically in our case because the side lobes of impulse response
are too low and disappear in the RF noise.
0
kaz
10/4/2012 5:19:23 PM
On 10/4/12 1:19 PM, kaz wrote:
>
....
>
>
> division by zero will be flagged by the tool. It doesn't actually happen.

come on, kaz.  think about numerical issues.  how about division by 
teeny-weeny numbers?  and what if some teeny-weeny number is in the real 
part and another totally different (except they're both close to zero) 
teeny-weeny number in in the imaginary part?  now, whether the numerator 
is teeny-weeny or not, the complex number that results could easily be 
pointing in random directions, and your group delay is derived from 
these directions (the arg{ X[k] }).  after applying unwrap(), your 
normalized and discrete group-delay will be limited to + or - pi radians 
per bin (1/bin = sampling period divided by DFT size).  but, the 
unwrapped phase can get you a bigger phi to be divided by omega, so the 
phase delay might really be bigger (depending on how this random phase 
gets unwrapped).

> I agree that single tone is not best. The problem is we have some
> platforms
> that can't generate anything more than tone or impulse. The impulse does
> not work practically in our case because the side lobes of impulse response
> are too low and disappear in the RF noise.

well, maybe you need an RF pulse that has energy in all of the important 
frequencies where you're trying to determine the frequency response of 
the filter.  that should work either by direct dual-channel FFT (that's 
the audio name for the thing you're doing) or an analytic approach where 
the sample output might be cross-correlated to the input.  with 
knowledge of the input, you can get a high S/N of the impulse response 
of your filter if it were bandlimited to the set of frequencies that 
your RF pulse has a decent amount of energy.  i think that you can get 
group delay out of that.

wanna talk about the math?  start with an RF pulse:


    x[n]  =  a[n] cos(w0 n)


w0 is radian per sample and is smack-dab in the middle of your RF band 
of interest.  a[n] is broadbanded sufficiently around DC so that the 
two-sided bandwidth of A[k] is just wide enough to cover the frequencies 
of interest in your RF band.

the filter output is

   y[n]  =   SUM{ h[i] x[n-i] }
              i

and you want to know what h[n] is.  from that you can derive whatever 
frequency response (phase, delay, gain) your heart desires.

compute how the cross-correlation of x[n] with y[n] is.  it will be a 
function of H[k] and A[k], and you know what A[k] is.

if you can blap a chirp through your device under test, why can't the 
chirp generator dump out another function?  i would think that test gear 
might let you download a file defining x[n].

-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/4/2012 5:51:44 PM
robert bristow-johnson <rbj@audioimagination.com> wrote:
> On 10/4/12 1:19 PM, kaz wrote:
(snip)
>> division by zero will be flagged by the tool. It doesn't actually happen.

> come on, kaz.  think about numerical issues.  how about division by 
> teeny-weeny numbers?  and what if some teeny-weeny number is in the real 
> part and another totally different (except they're both close to zero) 
> teeny-weeny number in in the imaginary part?  now, whether the numerator 
> is teeny-weeny or not, the complex number that results could easily be 
> pointing in random directions, and your group delay is derived from 
> these directions (the arg{ X[k] }).  

I thought the question was theoretical, so that there are no
numerical issues. Now, if you actually want to build one,
then that is a different question.

-- glen
0
gah (12851)
10/4/2012 6:18:12 PM
>robert bristow-johnson <rbj@audioimagination.com> wrote:
>> On 10/4/12 1:19 PM, kaz wrote:
>(snip)
>>> division by zero will be flagged by the tool. It doesn't actually
happen.
>
>> come on, kaz.  think about numerical issues.  how about division by 
>> teeny-weeny numbers?  and what if some teeny-weeny number is in the real

>> part and another totally different (except they're both close to zero) 
>> teeny-weeny number in in the imaginary part?  now, whether the numerator

>> is teeny-weeny or not, the complex number that results could easily be 
>> pointing in random directions, and your group delay is derived from 
>> these directions (the arg{ X[k] }).  
>
>I thought the question was theoretical, so that there are no
>numerical issues. Now, if you actually want to build one,
>then that is a different question.
>
>-- glen
>

The tone does not translate into a single line in one bin, may be due to
truncation or incomplete cycles. I tried many values and many fft
resolutions. What I get is that tone power is spread gently around +/-
0.1Mhz on either side of centre. I only zoom in on that area when I compute
phase so I don't get numerical problems. It is somewhat similar to multiple
tones with curvy amplitudes. What is going to happen in real platform is
something I have to wait and see but I have the feel that it wouldn't be
much different from theoretical case.

I tried to centre the tone on bin centre plus adjusted vector to be
complete cycles. It does not become one line either but the error
increases
to maximum of about 10ns. 

I know a single tone ideally can become single bin and I am not sure why I
never get it in my current work. 

 
0
kaz
10/4/2012 6:54:29 PM
On 10/4/12 2:54 PM, kaz wrote:
>> robert bristow-johnson<rbj@audioimagination.com>  wrote:
>>> On 10/4/12 1:19 PM, kaz wrote:
>> (snip)
>>>> division by zero will be flagged by the tool. It doesn't actually
> happen.
>>
>>> come on, kaz.  think about numerical issues.  how about division by
>>> teeny-weeny numbers?  and what if some teeny-weeny number is in the real
>
>>> part and another totally different (except they're both close to zero)
>>> teeny-weeny number in in the imaginary part?  now, whether the numerator
>
>>> is teeny-weeny or not, the complex number that results could easily be
>>> pointing in random directions, and your group delay is derived from
>>> these directions (the arg{ X[k] }).
>>
>> I thought the question was theoretical, so that there are no
>> numerical issues. Now, if you actually want to build one,
>> then that is a different question.
>>

he's talking about running something on MATLAB and getting wrong 
results.  MATLAB has no numerical issues?

i think what he is doing to get the system response is not dependable 
unless his driving signal is completely broadbanded.

>
> The tone does not translate into a single line in one bin, may be due to
> truncation or incomplete cycles. I tried many values and many fft
> resolutions. What I get is that tone power is spread gently around +/-
> 0.1Mhz on either side of centre. I only zoom in on that area when I compute
> phase so I don't get numerical problems. It is somewhat similar to multiple
> tones with curvy amplitudes. What is going to happen in real platform is
> something I have to wait and see but I have the feel that it wouldn't be
> much different from theoretical case.
>
> I tried to centre the tone on bin centre plus adjusted vector to be
> complete cycles.

well that *is* in the bin center (if it's complete cycles in x[n]).  if 
it's an integer number of cycles of the tone in x[n], what goes to the 
FFT and becomes "fft_in", there will be all but two bins that either 
have zero in them or, because of the numerical issues of an FFT with 
finite word width, some of those bins will have very, very small 
non-zero values.

but i am surpized to read: "division by zero ... doesn't actually 
happen."  you must be lucky, because all but two bins will have 
*virtually* zero in them.  you cannot use those frequency bins to 
discover knowledge about your filter because of division-by-zero problems.



> It does not become one line either but the error
> increases
> to maximum of about 10ns.
>
> I know a single tone ideally can become single bin and I am not sure why I
> never get it in my current work.

if your FFT is of length N and you fill the input buffer with a sinusoid:

     x[n]  =  A cos( 2 pi k n/N  +  phi )          0 <= n < N

                                                   0 < k < N/2

where k is the integer number of complete cycles of the sinusoid in the 
FFT input buffer, you *will* get zeros in all of the bins except two. 
if those bins are not zero, they will be very small non-zero values only 
because of numerical issues regarding the FFT.



-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/4/2012 7:46:26 PM
>well that *is* in the bin center (if it's complete cycles in x[n]).  if 
>it's an integer number of cycles of the tone in x[n], what goes to the 
>FFT and becomes "fft_in", there will be all but two bins that either 
>have zero in them or, because of the numerical issues of an FFT with 
>finite word width, some of those bins will have very, very small 
>non-zero values.
>
>but i am surpized to read: "division by zero ... doesn't actually 
>happen."  you must be lucky, because all but two bins will have 
>*virtually* zero in them.  you cannot use those frequency bins to 
>discover knowledge about your filter because of division-by-zero
problems.
>
>

Just to correct myself. If tone is complete cycles and in centre of a bin,
yes you are right it is only one non zero sample and the algorithm fails
badly then. There was a small error in samples/cycle that misled me first.
Thanks for pointing to that. Now it is clear to me that the algorithm works
always unless tone is really clean single sample after fft and this is
something that can easily be avoided. 
0
kaz
10/4/2012 8:15:50 PM
On 10/4/12 4:15 PM, kaz wrote:
>> well that *is* in the bin center (if it's complete cycles in x[n]).  if
>> it's an integer number of cycles of the tone in x[n], what goes to the
>> FFT and becomes "fft_in", there will be all but two bins that either
>> have zero in them or, because of the numerical issues of an FFT with
>> finite word width, some of those bins will have very, very small
>> non-zero values.
>>
>> but i am surpized to read: "division by zero ... doesn't actually
>> happen."  you must be lucky, because all but two bins will have
>> *virtually* zero in them.  you cannot use those frequency bins to
>> discover knowledge about your filter because of division-by-zero
> problems.
>>
>>
>
> Just to correct myself. If tone is complete cycles and in centre of a bin,
> yes you are right it is only one non zero sample

there are two non-zero bins.  at X[K] and X[N-K].

> and the algorithm fails
> badly then. There was a small error in samples/cycle that misled me first.
> Thanks for pointing to that. Now it is clear to me that the algorithm works
> always unless tone is really clean single sample after fft and this is
> something that can easily be avoided.

the algorithm, if it fails badly when K is a precise integer:

     x[n]  =  A cos( 2 pi K n/N  +  phi )

because of what happens by dividing by zero, that algorithm is also 
dubious for other K because of division by something close to zero.  i 
asked you if you were looking at the real and imaginary parts to the bin 
values of fft_in, to see what they might be.  have you done that?  even 
if K is not an integer.  i can't imagine that you would have decent 
values for arg{ X[k] } for k that is far from K.  these phases would be 
random.


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/4/2012 8:25:39 PM
Yes two non zero samples (I only look at one).

I just tried a random frequency (not single line), the values of real
samples are of the range -0.3xx and imaginary samples of the range -0.9xx
all along the section that I compute. All other values are thrown away.

I know many of us will not use an algorithm based on exploiting ftt
weakness but so far I am finding results very encouraging though with a
fiddle factor of x2. 

The problem with our platforms is that some support playing chirp signal or
any vector, others are limited to single tone only.

Thanks 


0
kaz
10/4/2012 8:44:58 PM
kaz <37480@dsprelated> wrote:

(snip, and much previous snipping)

> Just to correct myself. If tone is complete cycles and in centre of a bin,
> yes you are right it is only one non zero sample and the algorithm fails
> badly then. There was a small error in samples/cycle that misled me first.
> Thanks for pointing to that. Now it is clear to me that the algorithm works
> always unless tone is really clean single sample after fft and this is
> something that can easily be avoided. 

After my first post,  considered that the delay at 0Hz should,
almost by definition, be zero, and so one could compute a group
delay with only one tone (other than zero). Well, one does have to
make the assumption that the delay is less than the period of the
tone being used.

-- glen
0
gah (12851)
10/5/2012 12:53:21 AM
On 10/4/12 8:53 PM, glen herrmannsfeldt wrote:
>
> After my first post,  considered that the delay at 0Hz should,
> almost by definition, be zero,

i don't think so, glen.

at DC, the phase delay and the group delay are the same number, but 
don't expect that number to be zero.  take a simple delay line, for 
example.  it's phase linear so that the phase and group delay are equal 
for all frequencies and are simply the "delay" of the delay line.  the 
delay is the same at all frequencies.  then is that value equal to zero 
at DC?

> and so one could compute a group
> delay with only one tone (other than zero). Well, one does have to
> make the assumption that the delay is less than the period of the
> tone being used.

i can see the possibility of identifying the LTI system from the 
transient response and from that identified LTI system, computing the 
group delay at any frequency.

but if he is driving the hypothetical filter with a single pure 
sinusoid, the steady-state response won't tell you group delay, just the 
phase delay.


-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."


0
rbj (4086)
10/5/2012 4:01:03 AM
On Tue, 02 Oct 2012 20:12:26 -0500, "kaz" <37480@dsprelated> wrote:

>>On 10/2/12 2:12 PM, kaz wrote:
>>>> but if you look only at a single frequency, how could you tell
>whether,
>>>> say, 5 degrees phase difference are really 5 degrees, or 365 degrees,
>or
>>>> 725 degrees?
>>>>
>>>>
>>>
>>> The algorithm looks at phase gradient of output tone/input tone and it
>>> works as expected as measure of absolute delay between input&  output
>(in
>>> this case it matches groupdelay of given filter at the tone point but
>delay
>>> requires x2 factor for tone as opposed to frequency sweep)
>>
>>
>>okay kaz,
>>
>>is the driving swept tone like
>>
>>    x(t) = exp( j*pi*beta*t^2 )
>>
>>is the instantaneous frequency whatever multiplies the "t" (which is 
>>pi*beta*t) or the derivative of the phase (which is 2*pi*beta*t)?
>>
>>what is the sweep rate of this?   beta or beta/2?
>>
>>-- 
>>
>>r b-j                  rbj@audioimagination.com
>>
>>"Imagination is more important than knowledge."
>>
>>
>>
>
>I generate a tone from the following equation:
>
>x_in = exp(j*2*pi*(0:1023)*fo/Fs);
>
>where fo is any chosen tone frequency and Fs is sampling rate. I then
>generate IF centre fc at same sampling frequency:
>
>IF = exp(j*2*pi*(0:1023)*fc/Fs);
>
>then upconvert the tone:
>
>y_in = real(x_in.*IF);
>
>then pass y_in through a known IIR model to get y_out. Do fft on both y_in
>& y_out. Take the ratio of fft_out/fft_in, get the phase of this ratio and
>convert it to groupdelay. Then compare the delay at the tone point for both
>the IIR model and this fft ratio computation. The time domain can also tell
>the delay in sample units in most but not all cases.


Hi kaz,
  have you seen:

http://www.dsprelated.com/showarticle/69.php

[-Rick-]
0
Rick
10/23/2012 5:36:47 PM
Reply:

Similar Artilces:

Question about Group Delay and Phase Delay
Hi, Assume I have a constant group delay of 1 second for all frequencies then I can determine the phase response to be: phase(w)=C - tau*w where tau is the delay of 1 second. How do I determine the constant C which is the phase response at zero frequency? Using Group Delay or Phase Delay both can derive phase response however can group delay and phase delay be opposite of signs? For example if Group delay is -a*w can phase delay be a*w? For linear phase response this cannot be true since group delay and phase delay are the same but what about for non linear phase response how does the r...

Linear Phase and group delay
Hi , I have a trivial question .Could anyone explain the concept of linear phase and group delay . I went throught the books but I cant visualize the concept . Symmetric impulse response => Linear Phase and Constant group delay . but Linear Phase does not imply constant group delay . ?? Thanks in Advance Regards Vijay pcvijay30@gmail.com writes: > Hi , > > I have a trivial question .Could anyone explain the concept of linear > phase and group delay . I went throught the books but I cant visualize > the concept . > > Symmetric impulse response => Linear Pha...

Group delay for nonlinear phase
Dear all, I have a question about a MATLAB example. in the example of weighted moving average filter which I studied in the following link : http://www.mathworks.com/help/signal/examples/signal-smoothing.html?refresh=true In plotting the results plot(days, tempC, 'b', ... days-fDelay/24, binomialMA, 'g', ... days-1/24, exponentialMA,'r'); I found out that for the exponential moving average filter the group delay is put 1 (1/24 in days), but the group delay for this filter is not linear for all frequencies. Would you please explain me...

Group Phase Delay for Analog Filters
I was wondering if the grpdelay function of Matlab can be used for analog transfer functions.. ('s') Otherwise, how can I create my own function for analog filters? Is there any way of differentiating the phase vector? Maru ...

Can you 'subtract' phase or group delay (analysis purposes)
Hi, Say I'm measuring the phase and magnitude response of a plant, but the measured data has to go through a 8x decimating filter (that I designed) because my hardware doesn't allow me to measure at the high rate. The decimating filter is FIR (constant group delay), and has flat magnitude response in the passband. I also do not care much about the response of the plant above the passband. I wonder if it's correct to 'remove' the known group delay of my filter from the measured data of the plant. Thanks! On Feb 24, 8:38=A0am, "gretzteam" <gretzteam@n_o_s_p...

DSP Group TeakLite DSP Board
I've pulled a DSP Group Teak Lite DSP development board out of the bin at work. It's about 3-4 years old. Their web site asks you to login before you can look at docs an support S/W etc. Does anyone have an old support login for this site? Cheers, Alfie. ...

Group Delay
Hi, I'm quite new with matlab and dsp.... and I would like to add a group delay on a digital signal with matlab. I have a vector representing the signal and I want to add a group delay (constant or not) without any effects on frequencies. Any ideas? Thanks a lot for your help. Stef <stephaneo@gmail.com> wrote in message news:1149670315.510742.140060@j55g2000cwa.googlegroups.com... > Hi, > > I'm quite new with matlab and dsp.... and I would like to add a group > delay on a digital signal with matlab. > > I have a vector representing the signal and I want...

Phase Delay
I wanna simulate such a structure. I have two bandpass filters. I need the second filters phase response should be tracker of the first filter. exp. if the first filters phase response 0-500 degress, the second filters phase responses should be started 500 degrees. Thanks from now on Safak ...

group delay
hello i'm looking for an explenation about shpak algorithm for group delay computation. i know that matlab uses this algorithm in order to compute group delay of iir filters and uses smith algorithm for fir filters. also, can someone tell we where can i find a detailed explenation about the iirgrpdelay function. thanks. ...

Group delay in Matlab
Dear all I not very familiar with filter design in Matlab and I am probably missin something when it comes to "group delay". My problem comes as follows. From what I have understood, if I have a filter such that its group dela response (plotted with grpdelay[b,a] in matlab with a,b the filte coefficients) provides 17 as the group delay (in samples) at f=0.1 (normalized frequency so f=0.14*fs/2=0.14*500=70Hz, sampling frequenc being 1000 Hz) then passing a sinusoid whose frequency is 70Hz through th filter I should get at the output the same sinusoid (assuming gain is one delayed by...

Filter Group Delay
The Matlab command 'grpdelay' is restricted to digital filters only. Does there exist some counterpart to 'grpdelay' that operates in the analog domain? Some Matlab commands have separate versions for the analog and digital domains, and I wonder why 'grpdelay' does not. For example, the 'butter' command to generate Butterworth filter coefficients has digital and analog versions. The analog version is useful for understanding the stand-alone characteristics of a proposed filter, i.e., the characteristics that are independent of a particular sampled data record. ...

Google groups delay
Anyone noticed that google groups is not updating SAS-L ? Today the newest item is dated 2 days ago. R That's true, very unexpected delays both for new posts and also for replies. Hope will be fixed soon. On Oct 29, 12:33=A0am, Akshaya <akshaya.nathil...@gmail.com> wrote: > That's true, very unexpected delays both for new posts and also for > replies. Hope will be fixed soon. Seems to be back to normal now. R ...

CIC Group Delay
I would like to know if I can predict what the group delay of a CIC filter is. I have an agressive FIR BPF where the sample rate is 2000 x the filter bandwidth. The group delay is longer than I would like it to be. Could a CIC filter offer a lower group delay? I'll need to interpolate back to the original sample rate, so I need to take that into consideration as part of the answer. Thanks, in advance. Jim jim_nospam_beasley@yahoo.com wrote: > I would like to know if I can predict what the group delay of a CIC > filter is. What is a CIC filter? Bob -- "Things should ...

Phase delay in Simulink
Hello, I am trying to build a Simulink block for modifying the phase of a sinusoidal signal, A * sin(omega*t + phi). The amount by which the phase needs to be modified is variable and is given as an input. Any ideas for this? Any help would be very appreciated. Thanks, Mihai Mihai Virtosu wrote: > Hello, > > I am trying to build a Simulink block for modifying the phase of a > sinusoidal signal, A * sin(omega*t + phi). The amount by which the > phase needs to be modified is variable and is given as an input. Any > ideas for this? > > Any help would be very appreciated. > > Thanks, > > Mihai Hi make the "omega*t + phi" then connect its output to a FCN block. in FCN block, write 'sin(u[1])'. Hi, Thank you for your reply. The problem with connecting a "omega * t + phi" signal to a sin block is that Matlab consider that signal being in the form "omega1 * t", and in this way I am shown a totally different signal. Is there a way to explicitly give the "omega * t" and "phi" separate parts to a sin block? Thanks, Mihai Mohsen wrote: > > > Mihai Virtosu wrote: >> Hello, >> >> I am trying to build a Simulink block for modifying the phase of > a >> sinusoidal signal, A * sin(omega*t + phi). The amount by which > the >> phase needs to be modified is variable and is given as an input. > Any >> ideas for this? >> >> Any...

Negative Group Delay ... again!
From a recent discussion here: > >if i could generate some coefficents that had a 'negative' group delay for > >a period of time, would you think that 'phase cloning' was new and > >intersting?? > > A time machine would be pretty revolutionary, yes. > > Negative group delay means that the output appears before the input > arrives. Fascinating concept, isn't it? I was curious enough to dig into the topic for a while and write up what I found out. You can read about it here: http://www.dsprelated.com/showarticle/54.php Regards, Andor On M...

negative group delay
Hi, I am seeing some negative group delay at 1000, 2000, 3000, 4000, 5000 Hz. The example filter listed below with matlab/octave code. any clue why this is happening? interesting part is when I feed 1000 hz sine wave sampled at 10000 hz I don't see the behaviour of negative group delay. Regards Bharat %---------------------------------------------------------------- clear; close all; h1 = [10 9 8 7 6 5 4 3 2 1]/55; Fs = 10000; [gd, f] = grpdelay(h1, 1, 8192, Fs); figure; clf; plot(f, gd); On Mar 12, 5:58 pm, "bharat pathak" <bha...@a...

Phase delays and IPP
Hi all, I'm in need of knocking up a simple delay mechanism for a beamformin project and have working delay and sum method in place at the momen although this is creating a small overhead with samples being stored. I' like to implement a phase delay algorithm to minimise this overhead and wa wondering if anyone can point me in the right direction. Is there a filte in the Intel IPP library that can handle this as I'd like to test th result against the current working system? Many thanks Flamingo ...

group delay compensation
hello, i'm trying to compensate for group delay distortion (un-uniform group delay) of analog filters. i am working on matlab simulations. i am using iirgrpdelay. my test signal for correction is a qam signal. i see different and unconclusive results for different values of N-the order of the iir all pass filter which is the phase compensator. i would like to know what is the appropriate N for each case-each filter (low pass or band pass for example). i tried to understand the iirgrpdelay function but i can't see what is the iirgrpdelaymex function which is an important part of iirgrpdelay. i would appreciate it if someone can explain about iirgrpdelay or iirgrpdelaymex. Thanks,sam. ...

Group and phase velocity
Hi, Hi, has enyone had done or seen a presentation of group and phase velocity of electromagnetic wave? Could You sed me a link to it? Regards, Dariusz Luczynski Dariusz Luczynskihotele wrote: <Summary: He's looking for information on group and phase velocity of EM waves> That's kind of off-topic for a Matlab newsgroup. You might have better luck in sci.optics. If that newsgroup is not available to you, try some of the links at http://www.engr.colostate.edu/ultrafast/, in particular the "Basic Optics" section. (I took the prof's "Ultrafast Optics" class last semester. Fascinating material; I just wish I had understood it better.) Bob Pownall ...

group delay time?
It is known, that non-uniformity of the frequency response of the channel influences level of ISI. And what kind of distortions is characteristic for non-uniform group delay time? On Feb 5, 3:08=A0am, "alex65111" <alex65...@list.ru> wrote: > It is known, that non-uniformity of the frequency response of the channel > influences level of ISI. And what kind of distortions is characteristic f= or > non-uniform group delay time? A non-constant group delay vs frequency (non-linear phase vs frequency) distorts the pulse shape. This causes ISI. John >On Feb 5, 3:08=A0a...

delays: inertial delays vs. transport delays
Hello, I have some issues with delays which I would appreciate very much if someone could please clarify for me, as they are not clear to me right now. I would like to know what the difference between an inertial delay and a transport delay is and why VHDL would need to have these two distinct types of delay. Also, it seems to me that specifying delays in VHDL designs can only serve the purose of simulation since the delays inherent in the physical hardware cannot, as far as I know, be controlled with software: they certainly cannot be made smaller than what they are, but I'm not sur...

Linux Fails in Munich, Delays, Delays, Delays
The pipedream of Linux being used by Government is quickly fading. The first big deployment has been full of "snags" and "delays"... just like using Linux! We told everyone this, now the truth is known. - Munich announces delay in Linux migration into 2006 9/7/2005 4:55:02 PM, by Jeremy Reimer The municipal government of Munich, Germany released a statement yesterday that the migration of its office PCs to Linux and OpenOffice.org, which was scheduled to be completed in 2005, has slipped to at least next year. The original plan, which involved switching all 14,00...

delay estimation or delay compensation of delay systems
Neural Network Controler Program (or ideas) for delay estimation or delay compensation of delay systems with MATLAB. thanks. jellabies wrote: > > > Neural Network Controler Program (or ideas) for delay estimation or > delay compensation of delay systems with MATLAB. > thanks. Dear jellabies, It is a filtering first and a command problem (second). Estimating delay in dynamic system:non linear filtering (hard...) and my approach is (with "small" delay) to expand in Taylor serie degre 1 : x(t-tau)=x(t)-tau x' (tau>0 is unknow delay), and we have tau as linear f...

Is this group a google group or a proper usenet group?
It does not show up on gnews. In article <f10210d1-1b8b-4673-9f43-9cee22559e62@33g2000yqj.googlegroups.com>, Alan <alan.browne@gmail.com> wrote: > It does not show up on gnews. It's a proper Usenet news group. BTW: At least a few of the regular posters here filter out posts from Google Groups. -- Send responses to the relevant news group rather than email to me. E-mail sent to this address may be devoured by my very hungry SPAM filter. Due to Google's refusal to prevent spammers from posting messages through their servers, I often ignore posts f...

Web resources about - phase to group delay - comp.dsp

Phase - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Brazilian troops begin public action phase against Zika
Brazilian troops are taking to the streets at the start of a public action effort to educate the population on ways to eliminate the mosquito ...

Brazilian troops begin public action phase against Zika
Brazilian troops are taking to the streets at the start of a public action effort to educate the population on ways to eliminate the mosquito ...

Brazilian troops begin public action phase against Zika
... population on ways to eliminate the mosquito carrying the Zika virus. [ The Age ] The Age - Video Brazilian troops begin public action phase ...

Alberta's coal phase-out: How the province plans to kick carbon to the curb
Alberta has committed to kicking its coal habit by 2030. It is no easy task considering the province currently gets more than half of its electricity ...

Samsung Unveils Galaxy S7 and 360-Degree Camera in Latest Phase of Apple Battle
Samsung Electronics showed off new Galaxy S7 smartphones featuring upgraded components and the return of a popular feature at the Mobile World ...

Get ready to shred in Snowboarding The Fourth Phase
... Red Bull Media House comes a terrific new adventure in the mountains. Take to the slopes and prepare to shred in Snowboarding The Fourth Phase ...

Tesla phases out 85-kWh Model S battery option
Filed under: Green , Tesla , Sedan , Electric Tesla Motors has quietly discontinued it 85-kWh battery option, along with the rear-drive P90, ...

Samsung Opens New Phase in Apple Battle With Galaxy S7, VR
Samsung Electronics Co. showed off virtual reality hardware alongside its latest Galaxy S7 smartphones, in its latest attempt to breathe life ...

"Godzilla" El Niño enters a new phase
Latest report on this winter's powerful El Niño suggests we'll be seeing some changes soon

Resources last updated: 3/10/2016 3:35:38 PM