👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
📚2 运行结果
🌈3 Matlab代码实现
🎉4 参考文献
💥1 概述
本文包括一些算法来纠正声波风速计的倾斜角度误差,包括Wilczak等人的方法[1]。其他方法是双倍和三倍旋转算法。
本呈件包括:
4 个示例文件:一个用于平面拟合算法,一个用于双旋转,一个用于三重旋转,一个用于使用不同检索算法估计摩擦速度。
函数倾斜校正.m
函数 friction_velocity.m
包含模拟风数据的文件 data.mat
参考文献:
下载链接:Sonic Anemometer Tilt Correction Algorithms | SpringerLink
📚2 运行结果
部分代码:
clearvars;close all;clc;
% load simlated wind velocities
load('data.mat','u','v','w','t')
[M,N]=size(u);
yaw = 30; % yaw angle (horizontal plane, between u and v)
elev = 3; % elevation angle (vertical plane, between w and u)
incl = 2; % inclination angle (vertical plane, between w and v)
R1 = [cosd(yaw),-sind(yaw),0;sind(yaw),cosd(yaw),0;0,0,1]; % matrix rotation around axis z
R2 = [cosd(elev),0,-sind(elev);0,1,0;sind(elev),0,cosd(elev)]; % matrix rotation around axis zy
R3 = [1,0,0; 0,cosd(incl),-sind(incl);0,sind(incl),cosd(incl)]; % matrix rotation around axis x
A = R1*R2*R3; % 3D rotation matrix
% Construction of tilted velocity component
u_tilted = zeros(size(u));
v_tilted = zeros(size(u));
w_tilted = zeros(size(u));
for ii=1:M,
dummy = A\[u(ii,:);v(ii,:);w(ii,:)];
u_tilted(ii,:) = dummy(1,:);
v_tilted(ii,:) = dummy(2,:);
w_tilted(ii,:) = dummy(3,:);
end
clearvars;close all;clc;
% load simlated wind velocities
load('data.mat','u','v','w','t')
[M,N]=size(u);
yaw = 30; % yaw angle (horizontal plane, between u and v)
elev = 3; % elevation angle (vertical plane, between w and u)
incl = 2; % inclination angle (vertical plane, between w and v)
R1 = [cosd(yaw),-sind(yaw),0;sind(yaw),cosd(yaw),0;0,0,1]; % matrix rotation around axis z
R2 = [cosd(elev),0,-sind(elev);0,1,0;sind(elev),0,cosd(elev)]; % matrix rotation around axis zy
R3 = [1,0,0; 0,cosd(incl),-sind(incl);0,sind(incl),cosd(incl)]; % matrix rotation around axis x
A = R1*R2*R3; % 3D rotation matrix
% Construction of tilted velocity component
u_tilted = zeros(size(u));
v_tilted = zeros(size(u));
w_tilted = zeros(size(u));
for ii=1:M,
dummy = A\[u(ii,:);v(ii,:);w(ii,:)];
u_tilted(ii,:) = dummy(1,:);
v_tilted(ii,:) = dummy(2,:);
w_tilted(ii,:) = dummy(3,:);
end
🌈3 Matlab代码实现
🎉4 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1] Wilczak, J. M., Oncley, S. P., & Stage, S. A. (2001). Sonic anemometer tilt correction algorithms. Boundary-Layer Meteorology, 99(1), 127-150.