Sign in

username or email:

password:



Not a member?
Forgot your password?

Search compdsp



Search tips

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGA

Discussion Groups | Comp.DSP | phase to group delay

There are 38 messages in this thread.

You are currently looking at messages 1 to .


Is this discussion worth a thumbs up?

0

phase to group delay - kaz - 2012-09-30 14:26:00

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






______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: phase to group delay - glen herrmannsfeldt - 2012-09-30 17:15:00



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
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: phase to group delay - 2012-10-01 02:13:00

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
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: phase to group delay - Vladimir Vassilevsky - 2012-10-01 10:18:00

<k...@gmail.com> wrote in message 
news:4...@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


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: phase to group delay - mnentwig - 2012-10-01 12:47:00

>> 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.




______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: phase to group delay - kaz - 2012-10-01 13:25:00

>>> 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. 
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

STUPIDENT::Re: phase to group delay - Vladimir Vassilevsky - 2012-10-01 13:54:00

"kaz" <37480@dsprelated> wrote in message 
news:8...@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


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

STUPIDENT::Re: phase to group delay - mnentwig - 2012-10-01 14:54:00

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? 

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: STUPIDENT::Re: phase to group delay - robert bristow-johnson - 2012-10-01 15:21:00

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                  r...@audioimagination.com

"Imagination is more important than knowledge."


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: STUPIDENT::Re: phase to group delay - Vladimir Vassilevsky - 2012-10-01 15:26:00

"mnentwig" <24789@dsprelated> wrote in message 
news:m...@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.



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | | 3 | 4 |