how to estimate integral scale of turbulence, Lu, from Ru(τ) by numerical integration.
4 ビュー (過去 30 日間)
古いコメントを表示
my question is how to estimate integral scale of turbulence, Lu, from Ru(τ) by numerical integration from time lag interval 0 to 10 secs only. My code is
load('wind_data_part1.mat')
Fs=25; % sampling frequency of the signal, samples/second
TO=1/4; % maximum period, 1/Hz
N=7495;
U_N=V.*cosd(phi);
U_E=V.*sind(phi);
U_t=((U_N).^2+(U_E).^2).^0.5;
U_m=sum(U_t)/N % problem 1.a) mean wind direction
u_t=U_t-U_m;
figure
plot(time,u_t) % problem 1.a) zero-mean turbulence component
xlabel('Time (sec)')
ylabel('Zero-mean turbulence, (u_t)')
legend('Zero-mean turbulence, u_t vs. time t')
Dt=1/Fs;
R_tau=xcorr(u_t);
figure
plot(R_tau) % problem 1.b) plot R_tau as a function od time lag tau
xlabel('Time lag (sec)')
ylabel('Correlation')
legend('Correlation')
Some people suggest me to use trapz function but I need the specific limit time interval for the integral of R_tau
Many thanks!
0 件のコメント
回答 (1 件)
John D'Errico
2017 年 3 月 1 日
So you have data sampled over some arbitrary set of points in time, and you wish to compute the integral over some time limits that need not lie at the sample points?
1. Interpolate using a spline.
2. Integrate the spline function over the desired limits.
WTP?
help spline
help ppval
help fnval
help integral
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!