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. > > RuneSounds 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
Real and Complex FFT responses
Started by ●August 19, 2003
Reply by ●September 5, 20032003-09-05
Reply by ●September 11, 20032003-09-11
"Bernhard Holzmayer" <holzmayer.bernhard@deadspam.com> a �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 ●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 ●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))); > > >BernhardHi 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 ●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