FFT
7 views (last 30 days)
Show older comments
Hi, I have a complex time signal x(t)=X1*exp(i*theta1)+X2*exp(i*2*theta). On converting to frequency domain, i expect frequency components at omega1 and twice of omega1 (when theta=omega*t). FFT gives the desired frequencies, but the amplitudes donot correspond to X1 and X2. I understand that this is due to the phase difference between the signals X1*exp(i*theta1) and X2*exp(i*2*theta). My question is how should i get back the amplitudes X1,X2,... when multiple frequency components exist in the signal.
P.S: when only x(t)=X1*exp(i*theta1);am able to get back X1 in the fft.
Thanks in advance, Sumit.
0 Comments
Answers (1)
Wayne King
on 6 Apr 2012
Hi Sumit:
Fs = 1e3;
t = 0:0.001:1-0.001;
x = 2*exp(1j*(2*pi*100*t-pi/4))+1.5*exp(1j*(2*pi*200*t+pi/8));
xdft = fft(x)/length(x);
abs(xdft(101)) %this is the 100-Hz component
abs(xdft(201)) % this is the 200-Hz component
Perhaps you forgot to divide the output of fft() by the length of the signal? The DFT bins corresponding to your complex exponentials contain the complex amplitude (amplitude and phase), but if you take the modulus you should recover your X1 and X2.
0 Comments
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!