Reply by Bernhard Holzmayer September 11, 20032003-09-11
Rick Lyons wrote:

> On Thu, 11 Sep 2003 12:11:57 +0200, Bernhard Holzmayer > <holzmayer.bernhard@deadspam.com> wrote: > > (snipped) >> >>clear i; >>t=[ 0: 0.1: 100]; >> >>% for real part: >> >>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)); >> >>% and, for imag part: >> >> 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))); >> >> >>Bernhard > > Hi Bernhard, > > For anyone new to signal processing, > it's *VERY *VERY* useful to experiment with > code like yours. It helps give physical > meaning to Euler's equations. It helps > make all of these 'real' and 'imaginary' > signals "real". :-) > > [-Rick-]
Thanks, I appreciate your opinion. Bernhard -- before sending to the above email-address: replace deadspam.com by foerstergroup.de
Reply by Rick Lyons September 11, 20032003-09-11
On Thu, 11 Sep 2003 12:11:57 +0200, Bernhard Holzmayer
<holzmayer.bernhard@deadspam.com> wrote:

   (snipped)
> >clear i; >t=[ 0: 0.1: 100]; > >% for real part: > >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)); > >% and, for imag part: > > 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))); > > >Bernhard
Hi Bernhard, For anyone new to signal processing, it's *VERY *VERY* useful to experiment with code like yours. It helps give physical meaning to Euler's equations. It helps make all of these 'real' and 'imaginary' signals "real". :-) [-Rick-]
Reply by Bernhard Holzmayer September 11, 20032003-09-11
Lotfi wrote:

> for me , I have to type : > t=[ 0: 0.1: 100];
Thanks for the correction. Sorry, I typed it manually - Matlab is on the other PC.. not here. So you get this: clear i; t=[ 0: 0.1: 100]; % for real part: 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)); % and, for imag part: 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))); Bernhard -- before sending to the above email-address: replace deadspam.com by foerstergroup.de
Reply by Lotfi September 11, 20032003-09-11
"Bernhard Holzmayer" <holzmayer.bernhard@deadspam.com> a &#4294967295;crit dans le
message news: 2296981.FC1uc1BQzq@holzmayer.ifr.rt...
> 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];
for me , I have to type : 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
Reply by Tom September 5, 20032003-09-05

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
Sounds right since the Fourier TF of a complex frequency exp(I.w0.t) = delta(w-w0) ie a single impulse - not two. If you take the FT of cos(wot) you will get two impulses however. Tom
Reply by T. Cosmo September 3, 20032003-09-03
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.
Reply by Bernhard Holzmayer September 2, 20032003-09-02
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
Reply by Bernhard Holzmayer September 2, 20032003-09-02
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
Reply by Andor September 1, 20032003-09-01
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
Reply by Jerry Avins August 29, 20032003-08-29
"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;