Effacer les filtres
Effacer les filtres

How to perform FFT analysis for a sinusoidal wave.

2 vues (au cours des 30 derniers jours)
Jith C
Jith C le 5 Juin 2019
Hi,
I have recorded flame. Due to buoyancy effect flame fluctuates by time. I have plotted the flame height vs time graph (Its looks like sinusoidal wave). Now how to convert this graph into amplitude (Y) vs frequency (X_Hz) graph by using FFT Matlab code.
  1 commentaire
John D'Errico
John D'Errico le 5 Juin 2019
You might start by reading the help for fft.

Connectez-vous pour commenter.

Réponses (1)

Chirag Nighut
Chirag Nighut le 10 Juin 2019
Considering that X is the array of the flame heights at different time values and L is the number of samples of the data,
Fx = fft(X);
should give you the Discrete Fourier transform of X (Y)
Since the calculated FFT will be symmetric such that the magnitude of only the first half points are unique (and the rest are symmetrically redundant), the main idea is to display only half of the FFT spectrum. Remember that multiplying by 2 is necessary as you are adding the magnitude in the negative and positive frequency domain. The following code illustrates this point:
P = abs(Fx/L);
Y = P(1:L/2+1);
Y(2:end-1) = 2*Y(2:end-1);
Now we can plot the graph of Y ie. amplitude of the Fourier Transform w.r.t to the frequency X_Hz. Note that Fs is the sampling frequency that you decide.
X_Hz = Fs*(0:(L/2))/L;
plot(X_Hz, Y)
title('Single-Sided Amplitude Spectrum of X(t)')
xlabel('f (X_Hz)')
ylabel('|Y(f)|')

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by