FFT amplitude problem.output not matching with input

2 views (last 30 days)
hi all,
As a part of an experiment i have to perform FFT on a random signal whose peak time period and significant height are already known. Hs = 8cm and Ts = 1.5sec(fp = 0.6667Hz)
As you can see the peak is near to 4cm.which means peak to peak is nearly 8cm.
I have a sample time length = 50.9sec and my N-point FFT length = 1024. so i have fixed my sampling frequency = N/50.9 = 20.09sec.
Fs=20.0981;
t=0:1/Fs:1;
x=4.33.*xlsread('scope_19.xlsx',1,'B5:B1364');%calibrating the data and importing it from excel%
Fn=Fs/2; % Nyquist frequency
NFFT=2.^(ceil(log(length(x))/log(2)));
% Take fft, padding with zeros, length(FFTX)==NFFT
FFTX=fft(x,NFFT);
NumUniquePts = ceil((NFFT+1)/2);
% fft is symmetric, throw away second half
FFTX=FFTX(1:NumUniquePts);
Y = FFTX/NFFT;
MX=abs(FFTX); % Take magnitude of X
% Multiply by 2 to take into account the fact that we
% threw out second half of FFTX above
MX=MX*2;
MX(1)=MX(1)/2; % Account for endpoint uniqueness
MX(length(MX))=MX(length(MX))/2; % We know NFFT is even
% Scale the FFT so that it is not a function of the
if true
% code
end% length of x.
MX=MX/length(x);
f=(0:NumUniquePts-1)*2*Fn/NFFT;
plot(f,MXc);
This gave me an output:
Though the frequency at which peak is occurring is at my input value(0.6667Hz),the amplitude is nowhere near to my original value(8cm) .I have been searching on how to scale amplitude but no good results.My project got stalled due to this issue.pls help..

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!