PDA

View Full Version : FFT Spectrum Analyzer using Digitizer


dsavio
12-06-2007, 01:21 PM
Hi Everybody,

I have been attempting to implement an FFT-based spectrum analyzer using
digitizer card, the reason being: I need (relative) phase information.
have a 100 MS/s digitizer card and I use Matlab to control it.

I am using an Agilent I/Q signal generator which, for simplicity, I a
loading with 3 cosine tones in the I channel: one at 14.0 MHz, one a
14.5 MHz, and one at 15.0 MHz. I give each of these tones some phase
such as 30 degrees, 70 degrees, and -20 degrees, respectively.

I acquire the signal and take the FFT in Matlab. The magnitude of the FF
looks good: I can see the peaks at the appropriate frequencies (and a pea
at 60 Hz, lol).

The phase is a problem. I cannot get any good phase information out.
have tried sophisticated peak-detection algorithms, even 9th orde
polynomial interpolation in the vicinity of the peak, and calculate th
DFT at a non-integer bin value corresponding to the peak. The magnitude
are great, but the angles seem like garbage. I don't care about absolut
phase, but I should be seeing the phase differences between the tone
being close to what I set them at, but I'm not seeing this at all.
Unwrapping the phase doesn't work.

Does anybody have any suggestions for me? I am pulling my hair ou
here!!

Dave
12-06-2007, 04:46 PM
On Dec 6, 8:21 am, "dsavio" <[email protected]> wrote:
> Hi Everybody,
>
> I have been attempting to implement an FFT-based spectrum analyzer using a
> digitizer card, the reason being: I need (relative) phase information. I
> have a 100 MS/s digitizer card and I use Matlab to control it.
>
> I am using an Agilent I/Q signal generator which, for simplicity, I am
> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one at
> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some phase,
> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>
> I acquire the signal and take the FFT in Matlab. The magnitude of the FFT
> looks good: I can see the peaks at the appropriate frequencies (and a peak
> at 60 Hz, lol).
>
> The phase is a problem. I cannot get any good phase information out. I
> have tried sophisticated peak-detection algorithms, even 9th order
> polynomial interpolation in the vicinity of the peak, and calculate the
> DFT at a non-integer bin value corresponding to the peak. The magnitudes
> are great, but the angles seem like garbage. I don't care about absolute
> phase, but I should be seeing the phase differences between the tones
> being close to what I set them at, but I'm not seeing this at all.
> Unwrapping the phase doesn't work.
>
> Does anybody have any suggestions for me? I am pulling my hair out
> here!!

Could you be getting spectral leakage from the neighbouring tones? If
so, the phase will be affected. Have you tried simulating this in
Matlab or something similar to see if your idea works.

You may want to try an LMS type algorithm or a Phase locked loop -
These are just rough ideas though and may not be applicable to your
larger problem - as opposed to the one posted here.

Cheers,
Dave

dbd
12-06-2007, 05:27 PM
On Dec 6, 5:21 am, "dsavio" <[email protected]> wrote:
> Hi Everybody,
>
> I have been attempting to implement an FFT-based spectrum analyzer using a
> digitizer card, the reason being: I need (relative) phase information. I
> have a 100 MS/s digitizer card and I use Matlab to control it.
>
> I am using an Agilent I/Q signal generator which, for simplicity, I am
> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one at
> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some phase,
> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>
> I acquire the signal and take the FFT in Matlab. The magnitude of the FFT
> looks good: I can see the peaks at the appropriate frequencies (and a peak
> at 60 Hz, lol).
>
> The phase is a problem. I cannot get any good phase information out. I
> have tried sophisticated peak-detection algorithms, even 9th order
> polynomial interpolation in the vicinity of the peak, and calculate the
> DFT at a non-integer bin value corresponding to the peak. The magnitudes
> are great, but the angles seem like garbage. I don't care about absolute
> phase, but I should be seeing the phase differences between the tones
> being close to what I set them at, but I'm not seeing this at all.
> Unwrapping the phase doesn't work.
>
> Does anybody have any suggestions for me? I am pulling my hair out
> here!!

The three tones only have the selected phase offsets at some time t =
0. How are you synchronizing your DFT data sets to that reference
time? If you aren't doing that the phases -will- look like garbage as
the phase differences between tones will change as a function of time.

Dale B. Dalrymple
http://dbdimages.com
http://stores.lulu.com/dbd

Fred Marshall
12-06-2007, 05:53 PM
"dsavio" <[email protected]> wrote in message
news:[email protected] ...
> Hi Everybody,
>
> I have been attempting to implement an FFT-based spectrum analyzer using a
> digitizer card, the reason being: I need (relative) phase information. I
> have a 100 MS/s digitizer card and I use Matlab to control it.
>
> I am using an Agilent I/Q signal generator which, for simplicity, I am
> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one at
> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some phase,
> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>
> I acquire the signal and take the FFT in Matlab. The magnitude of the FFT
> looks good: I can see the peaks at the appropriate frequencies (and a peak
> at 60 Hz, lol).
>
> The phase is a problem. I cannot get any good phase information out. I
> have tried sophisticated peak-detection algorithms, even 9th order
> polynomial interpolation in the vicinity of the peak, and calculate the
> DFT at a non-integer bin value corresponding to the peak. The magnitudes
> are great, but the angles seem like garbage. I don't care about absolute
> phase, but I should be seeing the phase differences between the tones
> being close to what I set them at, but I'm not seeing this at all.
> Unwrapping the phase doesn't work.
>
> Does anybody have any suggestions for me? I am pulling my hair out
> here!!
>

You speak as though the phase makes sense *between* the tones. If so,
that's likely a problem as phase is only defined at a single frequency.
There are long discussions of "relative phase" between sinusoids at
different frequencies here on comp.dsp that you might look up and consider.

We *can* talk about phase of each of the tones separately. When you say you
give it a phase of "x" degrees then that implies a time reference where
phase would be zero, sines would be zero with positive slope and cosines
would be at their positive maximum. It raises the question: "how do you set
that time reference in the digitizer / sampled data system?"

With this, perhaps you can clarify and expand.

Fred

Ron N.
12-06-2007, 06:14 PM
On Dec 6, 5:21 am, "dsavio" <[email protected]> wrote:
> Hi Everybody,
>
> I have been attempting to implement an FFT-based spectrum analyzer using a
> digitizer card, the reason being: I need (relative) phase information. I
> have a 100 MS/s digitizer card and I use Matlab to control it.
>
> I am using an Agilent I/Q signal generator which, for simplicity, I am
> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one at
> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some phase,
> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>
> I acquire the signal and take the FFT in Matlab. The magnitude of the FFT
> looks good: I can see the peaks at the appropriate frequencies (and a peak
> at 60 Hz, lol).
>
> The phase is a problem. I cannot get any good phase information out. I
> have tried sophisticated peak-detection algorithms, even 9th order
> polynomial interpolation in the vicinity of the peak, and calculate the
> DFT at a non-integer bin value corresponding to the peak. The magnitudes
> are great, but the angles seem like garbage. I don't care about absolute
> phase, but I should be seeing the phase differences between the tones
> being close to what I set them at, but I'm not seeing this at all.
> Unwrapping the phase doesn't work.
>
> Does anybody have any suggestions for me? I am pulling my hair out
> here!!

Unless your fft sample windows are offset by integer multiples
of all of the periods of your 3 cosine waves, the relative
phases will be different in every window. Why? Because
frequency is the rate of change of phase. Since your phases
are changing at 3 different rates, you will only see them
sync up when all 3 exact period multiples align with the
offset between your fft window and your phase reference
point in time.

dsavio
12-06-2007, 11:18 PM
>On Dec 6, 5:21 am, "dsavio" <[email protected]> wrote:
>> Hi Everybody,
>>
>> I have been attempting to implement an FFT-based spectrum analyze
using a
>> digitizer card, the reason being: I need (relative) phase information.
I
>> have a 100 MS/s digitizer card and I use Matlab to control it.
>>
>> I am using an Agilent I/Q signal generator which, for simplicity, I am
>> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one at
>> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some phase,
>> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>>
>> I acquire the signal and take the FFT in Matlab. The magnitude of th
FFT
>> looks good: I can see the peaks at the appropriate frequencies (and
peak
>> at 60 Hz, lol).
>>
>> The phase is a problem. I cannot get any good phase information out.
I
>> have tried sophisticated peak-detection algorithms, even 9th order
>> polynomial interpolation in the vicinity of the peak, and calculat
the
>> DFT at a non-integer bin value corresponding to the peak. Th
magnitudes
>> are great, but the angles seem like garbage. I don't care abou
absolute
>> phase, but I should be seeing the phase differences between the tones
>> being close to what I set them at, but I'm not seeing this at all.
>> Unwrapping the phase doesn't work.
>>
>> Does anybody have any suggestions for me? I am pulling my hair out
>> here!!
>
>Unless your fft sample windows are offset by integer multiples
>of all of the periods of your 3 cosine waves, the relative
>phases will be different in every window. Why? Because
>frequency is the rate of change of phase. Since your phases
>are changing at 3 different rates, you will only see them
>sync up when all 3 exact period multiples align with the
>offset between your fft window and your phase reference
>point in time.
>
>


Thanks to everyone for your responses! I actually have been through th
thought processes you have all suggested. I understand that the phases o
each tone will change at different rates over time, but I propose that thi
is not the issue.

Think about what the FFT tells us: For each tone, use this frequency a
this phase to reproduce the original signal. Depending on the tim
instant that you start acquiring will give a different phase result fo
each tone, which I don't care about. The phases should, however, trac
eachother: ie. whatever the phases of the tones are should still differ b
the same amount when compared to eachother, since those are the phases tha
you would need to reproduce the input signal.

I DID run some Matlab simulations to test this stuff out with "ideal
signals, and what I discovered was that if you are not EXACT in you
frequency peak detection, your phase information quickly becomes garbage.
Even if you are off by like 20 Hz, that is enough to make your phas
information garbage. But how does one detect the peak to within tha
accuracy? I have tried acquiring a huge number of samples to improv
resolution bandwidth, and taking huge FFTs, but i still can't get goo
answers.

I know that FFT spectrum analyzers are implemented successfully i
practice, so there has to be something I'm missing here...!

Jerry Avins
12-06-2007, 11:32 PM
dsavio wrote:

...

> Thanks to everyone for your responses! I actually have been through the
> thought processes you have all suggested. I understand that the phases of
> each tone will change at different rates over time, but I propose that this
> is not the issue.

It is the issue. Let's suppose for a minute that it's possible to
compare the phases of two sinusoids of different frequency (it isn't).
Suppose further they are 90 degrees apart. That means that when one is
at a zero crossing, the other is at a positive or negative peak. (That's
what quadrature implies.) If that's always true, then the frequencies
must be the same. Any phase can be decomposed into an in-phase and a
quadrature component, so what applies to quadrature applies to any other
phase difference.

...

Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

dsavio
12-06-2007, 11:32 PM
>>On Dec 6, 5:21 am, "dsavio" <[email protected]> wrote:
>>> Hi Everybody,
>>>
>>> I have been attempting to implement an FFT-based spectrum analyzer
>using a
>>> digitizer card, the reason being: I need (relative) phase information

>I
>>> have a 100 MS/s digitizer card and I use Matlab to control it.
>>>
>>> I am using an Agilent I/Q signal generator which, for simplicity,
am
>>> loading with 3 cosine tones in the I channel: one at 14.0 MHz, on
at
>>> 14.5 MHz, and one at 15.0 MHz. I give each of these tones som
phase,
>>> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>>>
>>> I acquire the signal and take the FFT in Matlab. The magnitude o
the
>FFT
>>> looks good: I can see the peaks at the appropriate frequencies (and a
>peak
>>> at 60 Hz, lol).
>>>
>>> The phase is a problem. I cannot get any good phase information out

>I
>>> have tried sophisticated peak-detection algorithms, even 9th order
>>> polynomial interpolation in the vicinity of the peak, and calculate
>the
>>> DFT at a non-integer bin value corresponding to the peak. The
>magnitudes
>>> are great, but the angles seem like garbage. I don't care about
>absolute
>>> phase, but I should be seeing the phase differences between the tones
>>> being close to what I set them at, but I'm not seeing this at all.
>>> Unwrapping the phase doesn't work.
>>>
>>> Does anybody have any suggestions for me? I am pulling my hair out
>>> here!!
>>
>>Unless your fft sample windows are offset by integer multiples
>>of all of the periods of your 3 cosine waves, the relative
>>phases will be different in every window. Why? Because
>>frequency is the rate of change of phase. Since your phases
>>are changing at 3 different rates, you will only see them
>>sync up when all 3 exact period multiples align with the
>>offset between your fft window and your phase reference
>>point in time.
>>
>>
>
>
>Thanks to everyone for your responses! I actually have been through the
>thought processes you have all suggested. I understand that the phase
of
>each tone will change at different rates over time, but I propose tha
this
>is not the issue.
>
>Think about what the FFT tells us: For each tone, use this frequency at
>this phase to reproduce the original signal. Depending on the time
>instant that you start acquiring will give a different phase result for
>each tone, which I don't care about. The phases should, however, track
>eachother: ie. whatever the phases of the tones are should still diffe
by
>the same amount when compared to eachother, since those are the phase
that
>you would need to reproduce the input signal.
>
>I DID run some Matlab simulations to test this stuff out with "ideal"
>signals, and what I discovered was that if you are not EXACT in your
>frequency peak detection, your phase information quickly becomes garbage

>Even if you are off by like 20 Hz, that is enough to make your phase
>information garbage. But how does one detect the peak to within that
>accuracy? I have tried acquiring a huge number of samples to improve
>resolution bandwidth, and taking huge FFTs, but i still can't get good
>answers.
>
>I know that FFT spectrum analyzers are implemented successfully in
>practice, so there has to be something I'm missing here...!
>

I appologize for my previous reply: After thinking about it, I agree
unless I am completely time synced, the phases will vary. How does on
usually accomplish the time syncing?

My comment above about the need to pick a peak with extreme accurac
remains true, though. How is this kind of accuracy achieved with
non-ideal signal?

Mark
12-06-2007, 11:57 PM
On Dec 6, 6:32 pm, "dsavio" <[email protected]> wrote:
> >>On Dec 6, 5:21 am, "dsavio" <[email protected]> wrote:
> >>> Hi Everybody,
>
> >>> I have been attempting to implement an FFT-based spectrum analyzer
> >using a
> >>> digitizer card, the reason being: I need (relative) phase information.
> >I
> >>> have a 100 MS/s digitizer card and I use Matlab to control it.
>
> >>> I am using an Agilent I/Q signal generator which, for simplicity, I
> am
> >>> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one
> at
> >>> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some
> phase,
> >>> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>
> >>> I acquire the signal and take the FFT in Matlab. The magnitude of
> the
> >FFT
> >>> looks good: I can see the peaks at the appropriate frequencies (and a
> >peak
> >>> at 60 Hz, lol).
>
> >>> The phase is a problem. I cannot get any good phase information out.
> >I
> >>> have tried sophisticated peak-detection algorithms, even 9th order
> >>> polynomial interpolation in the vicinity of the peak, and calculate
> >the
> >>> DFT at a non-integer bin value corresponding to the peak. The
> >magnitudes
> >>> are great, but the angles seem like garbage. I don't care about
> >absolute
> >>> phase, but I should be seeing the phase differences between the tones
> >>> being close to what I set them at, but I'm not seeing this at all.
> >>> Unwrapping the phase doesn't work.
>
> >>> Does anybody have any suggestions for me? I am pulling my hair out
> >>> here!!
>
> >>Unless your fft sample windows are offset by integer multiples
> >>of all of the periods of your 3 cosine waves, the relative
> >>phases will be different in every window. Why? Because
> >>frequency is the rate of change of phase. Since your phases
> >>are changing at 3 different rates, you will only see them
> >>sync up when all 3 exact period multiples align with the
> >>offset between your fft window and your phase reference
> >>point in time.
>
> >Thanks to everyone for your responses! I actually have been through the
> >thought processes you have all suggested. I understand that the phases
> of
> >each tone will change at different rates over time, but I propose that
> this
> >is not the issue.
>
> >Think about what the FFT tells us: For each tone, use this frequency at
> >this phase to reproduce the original signal. Depending on the time
> >instant that you start acquiring will give a different phase result for
> >each tone, which I don't care about. The phases should, however, track
> >eachother: ie. whatever the phases of the tones are should still differ
> by
> >the same amount when compared to eachother, since those are the phases
> that
> >you would need to reproduce the input signal.
>
> >I DID run some Matlab simulations to test this stuff out with "ideal"
> >signals, and what I discovered was that if you are not EXACT in your
> >frequency peak detection, your phase information quickly becomes garbage.
> >Even if you are off by like 20 Hz, that is enough to make your phase
> >information garbage. But how does one detect the peak to within that
> >accuracy? I have tried acquiring a huge number of samples to improve
> >resolution bandwidth, and taking huge FFTs, but i still can't get good
> >answers.
>
> >I know that FFT spectrum analyzers are implemented successfully in
> >practice, so there has to be something I'm missing here...!
>
> I appologize for my previous reply: After thinking about it, I agree,
> unless I am completely time synced, the phases will vary. How does one
> usually accomplish the time syncing?
>
> My comment above about the need to pick a peak with extreme accuracy
> remains true, though. How is this kind of accuracy achieved with a
> non-ideal signal?- Hide quoted text -
>
> - Show quoted text -

Hello,
OK I had the same thought, phase relationship only makes sense when
the frequencies are the same. The phase between two different
frequencies is constaly changing. OK I agree with that... but
then...... what is the meaning of the phase result in an FFT?

Mark

Ron N.
12-07-2007, 01:06 AM
On Dec 6, 3:57 pm, Mark <[email protected]> wrote:
> On Dec 6, 6:32 pm, "dsavio" <[email protected]> wrote:
>
>
>
> > >>On Dec 6, 5:21 am, "dsavio" <[email protected]> wrote:
> > >>> Hi Everybody,
>
> > >>> I have been attempting to implement an FFT-based spectrum analyzer
> > >using a
> > >>> digitizer card, the reason being: I need (relative) phase information.
> > >I
> > >>> have a 100 MS/s digitizer card and I use Matlab to control it.
>
> > >>> I am using an Agilent I/Q signal generator which, for simplicity, I
> > am
> > >>> loading with 3 cosine tones in the I channel: one at 14.0 MHz, one
> > at
> > >>> 14.5 MHz, and one at 15.0 MHz. I give each of these tones some
> > phase,
> > >>> such as 30 degrees, 70 degrees, and -20 degrees, respectively.
>
> > >>> I acquire the signal and take the FFT in Matlab. The magnitude of
> > the
> > >FFT
> > >>> looks good: I can see the peaks at the appropriate frequencies (and a
> > >peak
> > >>> at 60 Hz, lol).
>
> > >>> The phase is a problem. I cannot get any good phase information out.
> > >I
> > >>> have tried sophisticated peak-detection algorithms, even 9th order
> > >>> polynomial interpolation in the vicinity of the peak, and calculate
> > >the
> > >>> DFT at a non-integer bin value corresponding to the peak. The
> > >magnitudes
> > >>> are great, but the angles seem like garbage. I don't care about
> > >absolute
> > >>> phase, but I should be seeing the phase differences between the tones
> > >>> being close to what I set them at, but I'm not seeing this at all.
> > >>> Unwrapping the phase doesn't work.
>
> > >>> Does anybody have any suggestions for me? I am pulling my hair out
> > >>> here!!
>
> > >>Unless your fft sample windows are offset by integer multiples
> > >>of all of the periods of your 3 cosine waves, the relative
> > >>phases will be different in every window. Why? Because
> > >>frequency is the rate of change of phase. Since your phases
> > >>are changing at 3 different rates, you will only see them
> > >>sync up when all 3 exact period multiples align with the
> > >>offset between your fft window and your phase reference
> > >>point in time.
>
> > >Thanks to everyone for your responses! I actually have been through the
> > >thought processes you have all suggested. I understand that the phases
> > of
> > >each tone will change at different rates over time, but I propose that
> > this
> > >is not the issue.
>
> > >Think about what the FFT tells us: For each tone, use this frequency at
> > >this phase to reproduce the original signal. Depending on the time
> > >instant that you start acquiring will give a different phase result for
> > >each tone, which I don't care about. The phases should, however, track
> > >eachother: ie. whatever the phases of the tones are should still differ
> > by
> > >the same amount when compared to eachother, since those are the phases
> > that
> > >you would need to reproduce the input signal.
>
> > >I DID run some Matlab simulations to test this stuff out with "ideal"
> > >signals, and what I discovered was that if you are not EXACT in your
> > >frequency peak detection, your phase information quickly becomes garbage.
> > >Even if you are off by like 20 Hz, that is enough to make your phase
> > >information garbage. But how does one detect the peak to within that
> > >accuracy? I have tried acquiring a huge number of samples to improve
> > >resolution bandwidth, and taking huge FFTs, but i still can't get good
> > >answers.
>
> > >I know that FFT spectrum analyzers are implemented successfully in
> > >practice, so there has to be something I'm missing here...!
>
> > I appologize for my previous reply: After thinking about it, I agree,
> > unless I am completely time synced, the phases will vary. How does one
> > usually accomplish the time syncing?
>
> > My comment above about the need to pick a peak with extreme accuracy
> > remains true, though. How is this kind of accuracy achieved with a
> > non-ideal signal?- Hide quoted text -
>
> > - Show quoted text -
>
> Hello,
> OK I had the same thought, phase relationship only makes sense when
> the frequencies are the same. The phase between two different
> frequencies is constaly changing. OK I agree with that... but
> then...... what is the meaning of the phase result in an FFT?

The the phase result of an FFT reports whether each bin's
component sinusoid is even (symmetric), odd, or some mixed
ratio of evenness/oddness, with respect to the center of
the FFT aperture. The even portion will be represented by
the real component, and the odd portion will appear in the
imaginary component of each bin.

If you try to reference to the beginning of your window,
then the even/oddness about the center of your data only
applies to input sinusoids which are exactly periodic in the
FFT aperture. If you have known or suspected periodicities
which are not clipped to exact period length boundaries
by an FFT, it might be easier to look at the phases with
respect to the center of the FFT aperture (or rotate the
input data halfway, using something like FFTShift, so that
the center of the data vector aligns with the start of
the FFT aperture). Then reference cosines will stay real
and reference sines imaginary, no matter what the frequency
(useful for phase interpolation).




IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M
http://www.nicholson.com/rhn/dsp.html

mnentwig
12-07-2007, 10:45 AM
Hi,

I use a similar setup with Rohde&Schwarz IQ generator and vector signa
analyzer (not that it matters, any equipment will give essentially th
same result).

If you don't have any bugs in your code, there are two things that can g
easily wrong:

- You need to synchronize the clocks of both instruments, otherwis
frequency offset results.
- If possible, handle a full cycle length of your signal - in other words
use only sine waves that have a full number of cycles within th
measurement time window.

Getting the phase of the received sine wave is trivial without FFT:
multiply the received signal with the conjugate of the transmitted signal
sum up and take the phase.

If you want to do deeper analysis, I use the following code to alig
transmitted and received signal, because hardware sync is not accurat
enough for my purposes:

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

Cheers

Markus

Mark
12-11-2007, 03:55 PM
> > Hello,
> > OK I had the same thought, phase relationship only makes sense when
> > the frequencies are the same. The phase between two different
> > frequencies is constaly changing. OK I agree with that... but
> > then...... what is the meaning of the phase result in an FFT?
>
> The the phase result of an FFT reports whether each bin's
> component sinusoid is even (symmetric), odd, or some mixed
> ratio of evenness/oddness, with respect to the center of
> the FFT aperture. The even portion will be represented by
> the real component, and the odd portion will appear in the
> imaginary component of each bin.
>
> If you try to reference to the beginning of your window,
> then the even/oddness about the center of your data only
> applies to input sinusoids which are exactly periodic in the
> FFT aperture. If you have known or suspected periodicities
> which are not clipped to exact period length boundaries
> by an FFT, it might be easier to look at the phases with
> respect to the center of the FFT aperture (or rotate the
> input data halfway, using something like FFTShift, so that
> the center of the data vector aligns with the start of
> the FFT aperture). Then reference cosines will stay real
> and reference sines imaginary, no matter what the frequency
> (useful for phase interpolation).
>
> IMHO. YMMV.
> --
> rhn A.T nicholson d.0.t C-o-M
> http://www.nicholson.com/rhn/dsp.html- Hide quoted text -
>
> - Show quoted text -

OK thanks each bin is in effect a quadrature demodulator...
thanks
Mark

Ron N.
12-11-2007, 04:47 PM
On Dec 11, 7:55 am, Mark <[email protected]> wrote:
> > > Hello,
> > > OK I had the same thought, phase relationship only makes sense when
> > > the frequencies are the same. The phase between two different
> > > frequencies is constaly changing. OK I agree with that... but
> > > then...... what is the meaning of the phase result in an FFT?
>
> > The the phase result of an FFT reports whether each bin's
> > component sinusoid is even (symmetric), odd, or some mixed
> > ratio of evenness/oddness, with respect to the center of
> > the FFT aperture. The even portion will be represented by
> > the real component, and the odd portion will appear in the
> > imaginary component of each bin.
>
> > If you try to reference to the beginning of your window,
> > then the even/oddness about the center of your data only
> > applies to input sinusoids which are exactly periodic in the
> > FFT aperture. If you have known or suspected periodicities
> > which are not clipped to exact period length boundaries
> > by an FFT, it might be easier to look at the phases with
> > respect to the center of the FFT aperture (or rotate the
> > input data halfway, using something like FFTShift, so that
> > the center of the data vector aligns with the start of
> > the FFT aperture). Then reference cosines will stay real
> > and reference sines imaginary, no matter what the frequency
> > (useful for phase interpolation).
>
> > IMHO. YMMV.
> > --
> > rhn A.T nicholson d.0.t C-o-M
> > http://www.nicholson.com/rhn/dsp.html-Hide quoted text -
>
> > - Show quoted text -
>
> OK thanks each bin is in effect a quadrature demodulator...

Each bin acts like a quadrature demodulator with the I and Q
components summed over the entire DFT/FFT window. You only
get an averaged complex phase.