DSPRelated.com
Forums

Real and Complex FFT responses

Started by Bob August 19, 2003
Hi Folks

Just a quick question to verify if I'm correct.

In a real only FFT, I get a mirror image of the peaks in the output
symmetrical
about the half way number of points of the FFT. I know this is
correct.

However with the complex FFT, I only get the peaks(on one side
only)...no mirror image. They are at the correct position. Can someone
tell me if this is correct or not, and explain how this works?

As usual, thanks in advance for all replies.

Bob
Yes they are correct, if you write down the equations, you will see why this
happens.



"Bob" <stenasc@yahoo.com>
???????:20540d3a.0308190001.7afc6596@posting.google.com...
> Hi Folks > > Just a quick question to verify if I'm correct. > > In a real only FFT, I get a mirror image of the peaks in the output > symmetrical > about the half way number of points of the FFT. I know this is > correct. > > However with the complex FFT, I only get the peaks(on one side > only)...no mirror image. They are at the correct position. Can someone > tell me if this is correct or not, and explain how this works? > > As usual, thanks in advance for all replies. > > Bob
stenasc@yahoo.com (Bob) wrote in message news:<20540d3a.0308190001.7afc6596@posting.google.com>...
> Hi Folks > > Just a quick question to verify if I'm correct. > > In a real only FFT, I get a mirror image of the peaks in the output > symmetrical > about the half way number of points of the FFT. I know this is > correct. > > However with the complex FFT, I only get the peaks(on one side > only)...no mirror image. They are at the correct position. Can someone > tell me if this is correct or not, and explain how this works? > > As usual, thanks in advance for all replies. > > Bob
What you see is correct. To see why, check out the chapter on the properties of the Fourier transform that is found in almost all basic texts on DSP or Fourier analysis. There you will find an example that amounts to F(-w) = F'(w) for f(t) real where F(w) is the Fourier transform of f(t) and F' is the complex conjugate of F. So the "mirror" appears because of the "real-valuedness" of f(t) and is not a property of the Fourier tranform as such. Complex-valued data give no mirror images. Rune
Or, to put it another way:

With REAL data the positive-frequency and negative-frequency components are necessarily present, and
are of equal amplitude.  As observed, the FFT displays these components distributed symmetrically
about the (f = 0) point.

With COMPLEX data the positive-frequency and negative-frequency components MAY be different in
amplitude.

In the special case of an analytic signal the real and imaginary components of the data are equal, so
either the positive-frequency components or the the negative-frequency components will have an
amplitude of  zero.  The FFT shows this as a set of peaks on one side of the (f=0) point.


Regards,
John


Rune Allnor wrote:

> stenasc@yahoo.com (Bob) wrote in message news:<20540d3a.0308190001.7afc6596@posting.google.com>... > > Hi Folks > > > > Just a quick question to verify if I'm correct. > > > > In a real only FFT, I get a mirror image of the peaks in the output > > symmetrical > > about the half way number of points of the FFT. I know this is > > correct. > > > > However with the complex FFT, I only get the peaks(on one side > > only)...no mirror image. They are at the correct position. Can someone > > tell me if this is correct or not, and explain how this works? > > > > As usual, thanks in advance for all replies. > > > > Bob > > What you see is correct. To see why, check out the chapter on the > properties of the Fourier transform that is found in almost all basic > texts on DSP or Fourier analysis. There you will find an example > that amounts to > > F(-w) = F'(w) for f(t) real > > where F(w) is the Fourier transform of f(t) and F' is the complex > conjugate of F. > > So the "mirror" appears because of the "real-valuedness" of f(t) > and is not a property of the Fourier tranform as such. Complex-valued > data give no mirror images. > > Rune
John Monro <jmonro@iprimus.com.au> wrote in message news:<3F4E9897.39AF4F8C@iprimus.com.au>...
> Or, to put it another way: > > With REAL data the positive-frequency and negative-frequency components are necessarily present, and > are of equal amplitude. As observed, the FFT displays these components distributed symmetrically > about the (f = 0) point. > > With COMPLEX data the positive-frequency and negative-frequency components MAY be different in > amplitude. > > In the special case of an analytic signal the real and imaginary components of the data are equal, so > either the positive-frequency components or the the negative-frequency components will have an > amplitude of zero. The FFT shows this as a set of peaks on one side of the (f=0) point. > > > Regards, > John > > > Rune Allnor wrote: > > > stenasc@yahoo.com (Bob) wrote in message news:<20540d3a.0308190001.7afc6596@posting.google.com>... > > > Hi Folks > > > > > > Just a quick question to verify if I'm correct. > > > > > > In a real only FFT, I get a mirror image of the peaks in the output > > > symmetrical > > > about the half way number of points of the FFT. I know this is > > > correct. > > > > > > However with the complex FFT, I only get the peaks(on one side > > > only)...no mirror image. They are at the correct position. Can someone > > > tell me if this is correct or not, and explain how this works? > > > > > > As usual, thanks in advance for all replies. > > > > > > Bob > > > > What you see is correct. To see why, check out the chapter on the > > properties of the Fourier transform that is found in almost all basic > > texts on DSP or Fourier analysis. There you will find an example > > that amounts to > > > > F(-w) = F'(w) for f(t) real > > > > where F(w) is the Fourier transform of f(t) and F' is the complex > > conjugate of F. > > > > So the "mirror" appears because of the "real-valuedness" of f(t) > > and is not a property of the Fourier tranform as such. Complex-valued > > data give no mirror images. > > > > Rune
Hi, the FFT operator is a Complex operator. Thus it is non correct to say real or complex FFT, but the signal that this operator can manage could be real valued or complex valued. The Fourier transform of a real valued sequences is Hermitian. It's mean that it's magnitude is an even function and it's phase is odd. To demonstarte that use the properties: For any x[n] real ---> F(w)=F'(-w), where F' is the complex conjugate of F. If you expand this realtion in term of amplitude and phase, you find the answer at your question. Bye T.Cosmo
"T. Cosmo" wrote:
> > John Monro <jmonro@iprimus.com.au> wrote in message news:<3F4E9897.39AF4F8C@iprimus.com.au>... > > Or, to put it another way: > > > > With REAL data the positive-frequency and negative-frequency components are necessarily present, and > > are of equal amplitude. As observed, the FFT displays these components distributed symmetrically > > about the (f = 0) point. > > > > With COMPLEX data the positive-frequency and negative-frequency components MAY be different in > > amplitude. > > > > In the special case of an analytic signal the real and imaginary components of the data are equal, so > > either the positive-frequency components or the the negative-frequency components will have an > > amplitude of zero. The FFT shows this as a set of peaks on one side of the (f=0) point. > > > > > > Regards, > > John > > > > > > Rune Allnor wrote: > > > > > stenasc@yahoo.com (Bob) wrote in message news:<20540d3a.0308190001.7afc6596@posting.google.com>... > > > > Hi Folks > > > > > > > > Just a quick question to verify if I'm correct. > > > > > > > > In a real only FFT, I get a mirror image of the peaks in the output > > > > symmetrical > > > > about the half way number of points of the FFT. I know this is > > > > correct. > > > > > > > > However with the complex FFT, I only get the peaks(on one side > > > > only)...no mirror image. They are at the correct position. Can someone > > > > tell me if this is correct or not, and explain how this works? > > > > > > > > As usual, thanks in advance for all replies. > > > > > > > > Bob > > > > > > What you see is correct. To see why, check out the chapter on the > > > properties of the Fourier transform that is found in almost all basic > > > texts on DSP or Fourier analysis. There you will find an example > > > that amounts to > > > > > > F(-w) = F'(w) for f(t) real > > > > > > where F(w) is the Fourier transform of f(t) and F' is the complex > > > conjugate of F. > > > > > > So the "mirror" appears because of the "real-valuedness" of f(t) > > > and is not a property of the Fourier tranform as such. Complex-valued > > > data give no mirror images. > > > > > > Rune > > Hi, > the FFT operator is a Complex operator. Thus it is non correct > to say real or complex FFT, but the signal that this operator can > manage could be real valued or complex valued. > The Fourier transform of a real valued sequences is Hermitian. It's > mean that it's magnitude is an even function and it's phase is odd. > To demonstarte that use the properties: > For any x[n] real ---> F(w)=F'(-w), where F' is the complex conjugate > of F. > If you expand this realtion in term of amplitude and phase, you find > the answer at your question. > Bye > T.Cosmo
Not exactly. If you know that the signal is real, a simpler calculation suffices. So while some hypothetical FFT "operator" may be complex, a particular FFT computation can be real. A real FFT can run in half the time of a complex one, so the difference isn't trivial. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
T. Cosmo wrote:

> Hi, > the FFT operator is a Complex operator. Thus it is non correct > to say real or complex FFT, but the signal that this operator can > manage could be real valued or complex valued.
The FFT is an algorithm (not an operator) to calculate the DFT (which is a unitary transform) The Real FFT is a modification of this algorithm to speed up the case where the DFT is applied to a real vector. Giving this algorithm a special name is quite justified. Regards, Andor
Bob wrote:

> Hi Folks > > Just a quick question to verify if I'm correct. > > In a real only FFT, I get a mirror image of the peaks in the > output symmetrical > about the half way number of points of the FFT. I know this is > correct. > > However with the complex FFT, I only get the peaks(on one side > only)...no mirror image. They are at the correct position. Can > someone tell me if this is correct or not, and explain how this > works? > > As usual, thanks in advance for all replies. > > Bob
A very impressive demonstration (at least for me) is this: Given signals m1(t) = cos(t) + j*sin(t) and m2(t) = cos(t) - j*sin(t) (conjugate of m1) FFT(m1) gives you exactly one peak in the frequency domain, FFT(m2) gives another peak. FFT(m1+m2) gives both peaks (superposition, clear) Superposition in the time domain gives: m1(t)+m2(t) = 2cos(t), because the imaginary parts compensate. So you end up with the real function giving two peaks in the frequency domain. If you have access to Matlab, try it: clear i; t=[ 0; 0.1; 100]; m1=cos(t)+i*sin(t) m2=cos(t)-i*sin(t) plot(t,fft(m1)); plot(t,fft(m2)); plot(t,fft(m1+m2)); Bernhard -- before sending to the above email-address: replace deadspam.com by foerstergroup.de
Bernhard Holzmayer wrote:

> Bob wrote: > >> Hi Folks >> >> Just a quick question to verify if I'm correct. >> >> In a real only FFT, I get a mirror image of the peaks in the >> output symmetrical >> about the half way number of points of the FFT. I know this is >> correct. >> >> However with the complex FFT, I only get the peaks(on one side >> only)...no mirror image. They are at the correct position. Can >> someone tell me if this is correct or not, and explain how this >> works? >> >> As usual, thanks in advance for all replies. >> >> Bob > > A very impressive demonstration (at least for me) is this: > Given signals > m1(t) = cos(t) + j*sin(t) and > m2(t) = cos(t) - j*sin(t) (conjugate of m1) > FFT(m1) gives you exactly one peak in the frequency domain, > FFT(m2) gives another peak. > FFT(m1+m2) gives both peaks (superposition, clear) > Superposition in the time domain gives: > m1(t)+m2(t) = 2cos(t), because the imaginary parts compensate. > > So you end up with the real function giving two peaks in the > frequency domain. > If you have access to Matlab, try it: > > clear i; > t=[ 0; 0.1; 100]; > m1=cos(t)+i*sin(t) > m2=cos(t)-i*sin(t) > plot(t,fft(m1)); > plot(t,fft(m2)); > plot(t,fft(m1+m2)); > > Bernhard >
Sorry, I sent too fast :-) It's the same thing for real and imaginary part of the FFT. If you do the above, you get the result only by evaluation of the real part of the FFT. clear i; t=[ 0; 0.1; 100]; m1=cos(t)+i*sin(t) m2=cos(t)-i*sin(t) plot(t,imag(fft(m1))); plot(t,imag(fft(m2))); plot(t,imag(fft(m1-m2))); The other sign in the last line comes from this: m1-m2 = cos(t)-cos(t)+j*sin(t)-(-j*sin(t)) = 2jsin(t) Bernhard -- before sending to the above email-address: replace deadspam.com by foerstergroup.de
an2or@mailcircuit.com (Andor) wrote in message news:<ce45f9ed.0309010454.75714b65@posting.google.com>...
> T. Cosmo wrote: > > > Hi, > > the FFT operator is a Complex operator. Thus it is non correct > > to say real or complex FFT, but the signal that this operator can > > manage could be real valued or complex valued. > > The FFT is an algorithm (not an operator) to calculate the DFT (which > is a unitary transform) > > The Real FFT is a modification of this algorithm to speed up the case > where the DFT is applied to a real vector. Giving this algorithm a > special name is quite justified. > > Regards, > Andor
Yes, I agree with you. Thanks for the dettailed explanation.