0
$\begingroup$

I need gaussian pulse fft. I set the sigma of gaussian pulse 1e-10 and define the gaussian function in time and use the fft. as you know the amplitude of should be unit in frequency domain. but my result shows that the amplitude of the pulse in frequency domain equal to 1/end_time. for example, if i define the time as t=0:1/fs:1e-07 then the amplitude of X(f) is 1e7 and I changed the end_time then the amplitude respectively change.

this is my code :

clear all;
clc;
fs=1e10; %sampling frequency
sigma=1e-10;

end_time=1e-7;

t=0:1/fs:1e-7; %time base

t_s=1e-8;
variance=sigma^2;
x=1/(sqrt(2*pi*variance))*(exp(-(t-t_s).^2/(2*variance)));
subplot(2,1,1)
plot(t,x,'b');
title(['Gaussian Pulse \sigma=', num2str(sigma),'s']);
xlabel('Time(s)');
ylabel('Amplitude');

L=length(x);

X =fftshift(fft(x,L));
Pxx=X.*conj(X)/(L*L); %computing power with proper scaling
f = fs*(0:L-1)/L; %Frequency Vector

subplot(2,1,2)
plot(f,abs(X)/(L),'r');
title('Magnitude of FFT');
xlabel('Frequency (Hz)')
ylabel('Magnitude |X(f)|');
xlim([0 1e10])
$\endgroup$
1
$\begingroup$

The FFT algorithm is not usually normalized while giving the output. Hence it is not unity.It gives as The Fourier transform is taken as $$ F(e^{jw})=\sum x[n] e^{-jwn} $$ Thus you could see the sum of x's when w=0 case instead of normalized one

$\endgroup$
  • $\begingroup$ thank you in advance for your response. I get what you mean but I am got confused because I use this FFT algorithm for other function such sin but this mistake didn't happened. You stated that this rule happens on every function ? I appreciate the time you gave me. $\endgroup$ – amir May 26 '15 at 7:01
  • $\begingroup$ FFT algorithm does give the unnormalized output.I checked with sin for t=1 to 100,for unit amplitude.The max amplitude will be around 50.If it was normailzed then it would be one. $\endgroup$ – Vinith May 26 '15 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.