资源简介
Allan方差分析MATLAB代码,含MPU6050八小时静态数据,测试运行成功了的
代码片段和文件信息
function [Tsigma] = allan(omegafspts)
[NM] = size(omega); % figure out how big the output data set is
n = 2.^(0:floor(log2(N/2)))‘; % determine largest bin size
maxN = n(end);
endLogInc = log10(maxN);
m = unique(ceil(logspace(0endLogIncpts)))‘; % create log spaced vector average factor
t0 = 1/fs; % t0 = sample interval
T = m*t0; % T = length of time for each cluster
theta = cumsum(omega)/fs; % integration of samples over time to obtain output angle θ
sigma2 = zeros(length(T)M); % array of dimensions (cluster periods) X (#variables)
for i=1:length(m) % loop over the various cluster sizes
for k=1:N-2*m(i) % implements the summation in the AV equation
sigma2(i:) = sigma2(i:) + (theta(k+2*m(i):) - 2*theta(k+m(i):) + theta(k:)).^2;
end
end
sigma2 = sigma2./repmat((2*T.^2.*(N-2*m))1M);
sigma = sqrt(sigma2);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 973 2018-03-07 21:53 AllanVarianceAnalysis-master\allan.m
文件 2109 2018-06-26 04:56 AllanVarianceAnalysis-master\gyro_data.m
文件 32926798 2018-04-21 00:11 AllanVarianceAnalysis-master\imu_random_walk.mat
文件 132065051 2018-06-25 22:01 AllanVarianceAnalysis-master\imu6050data.txt
文件 192 2018-04-08 16:15 AllanVarianceAnalysis-master\nihe.m
文件 40 2018-03-07 21:53 AllanVarianceAnalysis-master\README.md
文件 5004345 2018-04-03 21:12 AllanVarianceAnalysis-master\sim_imu.mat
评论
共有 条评论