# Decomposing the time series of wind turbulance using Fourier series, and computing the spectra.

5 views (last 30 days)
Berk Öztürk on 14 Sep 2022
Answered: Star Strider on 15 Sep 2022
I have wind turbulence data for every 30 minutes. I need to compute spectra using Fourier series and to get the graph in the image below. How can I do it with using MATLAB. In the attachment file, I have the u,v and w component of the wind turbulence. Thanks for answers.

Star Strider on 15 Sep 2022
Try this —
T1 = 36000×4 table
u v w time ______ ________ ________ _____ 8.1492 -1.0046 -0.38644 0 8.1792 -1.0381 -0.36686 1800 8.1242 -0.96182 -0.32607 3600 8.2941 -0.96584 -0.38851 5400 8.2917 -1.0513 -0.41848 7200 8.2179 -1.1291 -0.37742 9000 8.2462 -1.0865 -0.34782 10800 8.263 -1.0178 -0.34806 12600 8.2572 -1.0048 -0.36798 14400 8.2972 -0.98813 -0.29854 16200 8.228 -0.97129 -0.33756 18000 8.1946 -0.94709 -0.33708 19800 8.2038 -1.0585 -0.32721 21600 8.1683 -1.0659 -0.3467 23400 8.337 -1.1015 -0.35912 25200 8.3213 -1.1163 -0.28888 27000
u = T1.u;
v = T1.v;
w = T1.w;
t = T1.time/60; % Guessing Here (Units = Minutes)
figure
plot(t, [w v u])
grid
legend('u','v','w', 'Location','best')
xlabel('Time (Minutes)')
ylabel('Amplitude (Units?)')
Fs = 1/(t(2)-t(1))/60; % Sampling Frequency (Hz) (Cy/Min * Min/Sec)
Fn = Fs/2; % Nyquist Frequency
L = size(T1,1);
NFFT = 2^nextpow2(L); % FOr Efficiency
FTuvw = fft([u v w],NFFT)/L; % Fourier Transform
Fv = linspace(0, 1, NFFT/2+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
plot(Fv, abs(FTuvw(Iv,:))*2)
grid
% xlim([1E-4 10])
Ax = gca;
Ax.XScale = 'log';
Ax.YScale = 'log';
legend('u','v','w', 'Location','best')
xlabel('Frequency (Hz)')
ylabel('Magnitude')
Scale the time (‘t’ vector) correctly in that assignment. I believe I did it correctly, however the frequencies do not match with the posted plot, being several orders-of-magnitude smaller. Set the xlim values correctly in the Fourier Transform plot to show whatever the region of interest is (possibly Hz to Hz).
.