Integral Length Scales using the autocorrelation Function

12 visualizaciones (últimos 30 días)
Mirian Cae
Mirian Cae el 23 de Nov. de 2021
I found these two methods to compute the Integral Length Scales using the autocorrelation Function. But both gave me very different results. I'm not sure about what is appening in the trapzoid function, if anyone can explain it to me or know what is the right approach is I would appreciate it.
u_HW = U_inst-mean(U_inst);
[Ruu_simm, TM_simm] = xcorr(u_HW,'coeff');
TM_simm = TM_simm./Fs;
Ruu = Ruu_simm(TM_simm>=0 & TM_simm<=0.5);
TM = TM_simm(TM_simm>=0 & TM_simm<=0.5);
fitresult_corr = fit(TM.',Ruu.','gauss8');
TM_fit = TM_simm(floor(length(TM_simm)/2)-100:end);
Ruu_fit = fitresult_corr(TM_fit);
TM_fit = TM_fit(Ruu_fit<=1);
Ruu_fit = Ruu_fit(Ruu_fit<=1);
Lags_t_domain = TM_fit(Ruu_fit >= 1e-5);
ACF_fit_domain = Ruu_fit(Ruu_fit >= 1e-5);
1-approach
Int_LS_AC = trapz(TM_fit,Ruu_fit);
2-approach
LS = trapz(TM(Ruu>=0),Ruu(Ruu>=0))+abs(trapz(TM(Ruu<0),Ruu(Ruu<0)));

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by