IMU-Allan方差分析

2023-10-30

使用Allan方差来确定MEMS陀螺仪的噪声参数,陀螺仪测量模型为:
在这里插入图片描述
使用长时间静止的陀螺仪数据对陀螺仪噪声参数进行分析,上式中,三个噪声参数N(角度随机游走),K(速率随机游走)和B(偏差不稳定性)。

背景

Allan方差最初由David W. Allan开发,用于测量精密仪器的频率稳定性。 它还可用于识别固定陀螺仪测量中存在的各种噪声源。对于一份陀螺仪样本数据,其采样时间为 τ 0 \tau_{0} τ0,数据集合的长度分别为 τ 0 , 2 τ 0 , … , m τ 0 , ( m &lt; ( L − 1 ) / 2 ) \tau_{0}, 2 \tau_{0}, \ldots, m \tau_{0},(m&lt;(L-1) / 2) τ0,2τ0,,mτ0,(m<(L1)/2),获得在每段数据上的平均值,Allan方差定义为数据平均值的样本方差,Allan方差在数据量较大时精度较高。

Allan方差的计算

采样时间为 τ 0 \tau_{0} τ0 Ω \Omega Ω每一段的数据样本集合。

% Load logged data from one axis of a three-axis gyroscope. This recording
% was done over a six hour period with a 100 Hz sampling rate.
load('LoggedSingleAxisGyroscope', 'omega', 'Fs')
t0 = 1/Fs;

对每一段样本,计算输出角 θ \theta θ
在这里插入图片描述
对于离散样本,使用乘法对其进行积分:

theta = cumsum(omega, 1)*t0;

然后计算Allan方差:
在这里插入图片描述
其中 τ \tau τ=m τ 0 \tau_{0} τ0,<>为整体平均值
整体平均值可以扩展为:
在这里插入图片描述

maxNumM = 100;
L = size(theta, 1);
maxM = 2.^floor(log2(L/2));
m = logspace(log10(1), log10(maxM), maxNumM).';
m = ceil(m); % m must be an integer.
m = unique(m); % Remove duplicates.

tau = m*t0;

avar = zeros(numel(m), 1);
for i = 1:numel(m)
    mi = m(i);
    avar(i,:) = sum( ...
        (theta(1+2*mi:L) - 2*theta(1+mi:L-mi) + theta(1:L-2*mi)).^2, 1);
end
avar = avar ./ (2*tau.^2 .* (L - 2*m));

最后,Allan方差 σ ( t ) = σ 2 ( t ) \sigma(t)=\sqrt{\sigma^{2}(t)} σ(t)=σ2(t) 用于确定陀螺仪噪声参数。

adev = sqrt(avar);

figure
loglog(tau, adev)
title('Allan Deviation')
xlabel('\tau');
ylabel('\sigma(\tau)')
grid on
axis equal

结果如下(Allan方差曲线):
在这里插入图片描述
在MATLAB中可以使用Allan方差的函数:

[avarFromFunc, tauFromFunc] = allanvar(omega, m, Fs);
adevFromFunc = sqrt(avarFromFunc);

figure
loglog(tau, adev, tauFromFunc, adevFromFunc);
title('Allan Deviations')
xlabel('\tau')
ylabel('\sigma(\tau)')
legend('Manual Calculation', 'allanvar Function')
grid on
axis equal

结果如下(Allan方差曲线):
在这里插入图片描述

噪声参数分析

要获得陀螺仪的噪声参数,使用Allan方差与原始数据集中噪声参数的双侧功率谱密度(PSD)之间的以下关系:

根据上式,当通过具有传递函数 sin ⁡ 4 ( x ) / ( x ) 2 \sin ^{4}(x) /(x)^{2} sin4(x)/(x)2时,Allan方差与陀螺仪总噪声功率成正比关系,使用传递函数解释,带通取决于 τ \tau τ,这意味着可以通过改变滤波器带通或改变 τ \tau τ来获取不同的噪声参数。

Angle Random Walk-角度随机游走

角度随机游走被定义为陀螺仪输出的白噪声频谱,其功率谱密度可以表示为:
在这里插入图片描述
其中N代表了角度随机游走系数,代入原始PSD方程并执行积分:
在这里插入图片描述
上面的等式是在log-log图上绘制的斜率为-1/2的线。 N的值可以直接从该行读取。

% Find the index where the slope of the log-scaled Allan deviation is equal
% to the slope specified.
slope = -0.5;
logtau = log10(tau);
logadev = log10(adev);
dlogadev = diff(logadev) ./ diff(logtau);
[~, i] = min(abs(dlogadev - slope));

% Find the y-intercept of the line.
b = logadev(i) - slope*logtau(i);

% Determine the angle random walk coefficient from the line.
logN = slope*log(1) + b;
N = 10^logN

% Plot the results.
tauN = 1;
lineN = N ./ sqrt(tau);
figure
loglog(tau, adev, tau, lineN, '--', tauN, N, 'o')
title('Allan Deviation with Angle Random Walk')
xlabel('\tau')
ylabel('\sigma(\tau)')
legend('\sigma', '\sigma_N')
text(tauN, N, 'N')
grid on
axis equal

N =

0.0126

在这里插入图片描述

Rate Random Walk

陀螺仪输出的红噪声(布朗噪声)频谱被定义为Rate Random Walk ,PSD(功率谱密度)如下:
在这里插入图片描述
其中K为Rate Random Walk系数,代入原始PSD方程并执行积分:
在这里插入图片描述
上面的等式是在log-log图上绘制的斜率为-1/2的线。 N的值可以直接从该行读取。

% Find the index where the slope of the log-scaled Allan deviation is equal
% to the slope specified.
slope = 0.5;
logtau = log10(tau);
logadev = log10(adev);
dlogadev = diff(logadev) ./ diff(logtau);
[~, i] = min(abs(dlogadev - slope));

% Find the y-intercept of the line.
b = logadev(i) - slope*logtau(i);

% Determine the rate random walk coefficient from the line.
logK = slope*log10(3) + b;
K = 10^logK

% Plot the results.
tauK = 3;
lineK = K .* sqrt(tau/3);
figure
loglog(tau, adev, tau, lineK, '--', tauK, K, 'o')
title('Allan Deviation with Rate Random Walk')
xlabel('\tau')
ylabel('\sigma(\tau)')
legend('\sigma', '\sigma_K')
text(tauK, K, 'K')
grid on
axis equal
K =

   9.0679e-05

在这里插入图片描述

Bias Instability 零偏不稳定性

零偏不稳定性被定义为陀螺仪输出的粉红噪声频谱pink noise(闪烁噪声-flicker noise),功率谱密度表示如下:
在这里插入图片描述
其中B为零偏不稳定性系数, f 0 f_{0} f0为截止频率。
代入原始PSD方程并执行积分:
在这里插入图片描述
其中:
在这里插入图片描述
C i Ci Ci =余弦积分函数.其中, τ \tau τ远大于截止频率的倒数时,PSD方程为:
在这里插入图片描述
当绘制在对数图上时,上面的等式是斜率为0的直线。 B的值可以直接从该行读取,缩放比例为:
在这里插入图片描述

% Find the index where the slope of the log-scaled Allan deviation is equal
% to the slope specified.
slope = 0;
logtau = log10(tau);
logadev = log10(adev);
dlogadev = diff(logadev) ./ diff(logtau);
[~, i] = min(abs(dlogadev - slope));

% Find the y-intercept of the line.
b = logadev(i) - slope*logtau(i);

% Determine the bias instability coefficient from the line.
scfB = sqrt(2*log(2)/pi);
logB = b - log10(scfB);
B = 10^logB

% Plot the results.
tauB = tau(i);
lineB = B * scfB * ones(size(tau));
figure
loglog(tau, adev, tau, lineB, '--', tauB, scfB*B, 'o')
title('Allan Deviation with Bias Instability')
xlabel('\tau')
ylabel('\sigma(\tau)')
legend('\sigma', '\sigma_B')
text(tauB, scfB*B, '0.664B')
grid on
axis equal

B =

0.0020

在这里插入图片描述
现在已经计算了所有噪声参数,将Allan偏差绘制为量化参数的所有线。
在这里插入图片描述

陀螺仪仿真

使用imu传感器基于上面确定的噪声参数模拟陀螺仪测量。

% Simulating the gyroscope measurements takes some time. To avoid this, the
% measurements were generated and saved to a MAT-file. By default, this
% example uses the MAT-file. To generate the measurements instead, change
% this logical variable to true.
generateSimulatedData = false;

if generateSimulatedData
    % Set the gyroscope parameters to the noise parameters determined
    % above.
    gyro = gyroparams('NoiseDensity', N, 'RandomWalk', K, ...
        'BiasInstability', B);
    omegaSim = helperAllanVarianceExample(L, Fs, gyro);
else
    load('SimulatedSingleAxisGyroscope', 'omegaSim')
end

计算模拟的Allan偏差并将其与记录的数据进行比较:

[avarSim, tauSim] = allanvar(omegaSim, 'octave', Fs);
adevSim = sqrt(avarSim);
adevSim = mean(adevSim, 2); % Use the mean of the simulations.

figure
loglog(tau, adev, tauSim, adevSim, '--')
title('Allan Deviation of HW and Simulation')
xlabel('\tau');
ylabel('\sigma(\tau)')
legend('HW', 'SIM')
grid on
axis equal

在这里插入图片描述
该图显示,从imuSensor创建的陀螺仪模型生成的测量值与记录的数据具有相似的Allan偏差。 模型测量包含的噪声略小,因为温度相关参数不是使用gyroparams设置的。

说明

本文按照MATHWORKS文档进行主观翻译,如有不当之处欢迎指出。
本文代码使用的MATLAB的版本为matlab2019a,基于Sensor Fusion and Tracking Toolbox。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

IMU-Allan方差分析 的相关文章

随机推荐

  • 前端三剑客_CSS

    前端三剑客 CSS 1 CSS简介
  • span标签之间有空格怎么办

    span标签之间有空格 span标签之间有很大空格 代码如下
  • 脚手架创建的 ant-design-pro 6 mock接口404

    大家好 我是鱼尾 今天分享一个前端小知识 我在使用ant design pro脚手架创建项目碰到的一个问题 复现过程 使用 npm 初始化 创建项目 npm i ant design pro cli g pro create myproje
  • 网络安全公开数据集

    DARPA入侵检测数据集 DARPA 1998数据集 收集了9周的 TCPDUMP网络连接和系统审计数据 7周的训练数据 2周的测试数据 包含了Probe DoS R2L U2R四大类攻击 DARPA 1999数据集 DARPA 1999覆
  • .Net5 WebApi中使用Autofac作为IOC容器(已在生产环境中使用)

    本文讲解在 Net5 WebApi中使用Autofac作为IOC容器 已在生产环境中使用 安装Autofac 创建一个独立模块来实现动态依赖注入 也可以常规使用 我这里只讲解独立模块的依赖注入 修改Program类 使用Autofac容器
  • OpenAI Embedding:快速实现聊天机器人(四)

    theme orange 本文正在参加 金石计划 接上文OpenAI Embedding 快速实现聊天机器人 三 如何使用Python实现embedding相似度搜索 这篇文章继续讲如何将搜索到的相似文本进行提炼 并最终得出问题的答案 提炼
  • 【华为OD统一考试B卷

    在线OJ 已购买本专栏用户 请私信博主开通账号 在线刷题 运行出现 Runtime Error 0Aborted 请忽略 华为OD统一考试A卷 B卷 新题库说明 2023年5月份 华为官方已经将的 2022 0223Q 1 2 3 4 统一
  • 微信开发中遇到的access_token坑 ,access_token失效和刷新

    这真是一个巨大的坑 为了避免以后踩到同样的坑和帮助刚接触这块的同学快速脱坑 我花了些时间研究问题的来龙去脉 提供了一个不太完美的解决方案 以及未来规划的完美解决方案 问题现象 在开发微信jssdk的图像接口功能时 测试环境和回归环境都ok
  • LeetCode-动态规划

    文章目录 一 前言 二 动态规划 什么是动态规划 动态规划的求解过程 三 LeetCode 198 打家劫舍 四 LeetCode 213 打家劫舍 五 LeetCode 64 最小路径和 六 LeetCode 62 不同路径 七 Leet
  • SpringBoot去掉Druid监控页底部广告

    默认 Druid 的监控页面底部会有一块儿广告位 如图 我们如果不想显示这一块的话 可以对其进行过滤掉 具体配置如下 import com alibaba druid spring boot autoconfigure DruidDataS
  • coco数据集的评价指标

    Average Precision AP IoU 0 50 0 95 area all maxDets 100 0 000 Average Precision AP IoU 0 50 area all maxDets 100 0 000 A
  • 西瓜书 第6章、支持向量机 6.1-6.5

    支持向量机 一 间隔与支持向量 分类学习的基本思想就是基于训练集在样本空间找到一个划分超平面 将不同类别的样本分开 但是能将样本分开的有很多应该找那个最中间的超平面 因为其容忍度最好 如下图所示应该用最中间的红色面 线性超平面 超平面分为线
  • 华为OD机试 C++ 计算误码率

    题目 有时 当信息通过某种方式传输时 它会受到干扰 造成信息失真 现在 您需要帮助计算这种信息失真的程度 我们称之为误码率 简单地说 误码率就是传输过程中出错的信息部分所占的比例 具体内容 我们使用简化的方式表示信息 如 2A3B4D 指的
  • C#基础语法————变量

    1 变量的存储 一个变量只不过是一个供程序操作的存储区的名字 在 C 中 每个变量都有一个特定的类型 类型决定了变量的内存大小和布局 范围内的值可以存储在内存中 可以对变量进行一系列操作 存储变量的语法 变量类型 变量名 变量名 值 号 在
  • Spring IoC Bean-生命周期源码梳理分享

    Spring IoC Bean 生命周期 一 什么是Spring 1 Spring IoC a Dependency Injection DI 依赖注入 b Dependency Lookup DL 依赖查找 c Spring容器管理的对象
  • HBase宕机的多种场景

    异常导致的退出会通过接口Abortable定义的abort 方法实现 Abortable实现类如下 由以上类图可以看出HBaseAdmin的abort由于是client的访问 因此终止服务只需抛出异常即可 HConnection也是用于cl
  • BUUCTF Rabbit

    学习关于Rabbit加密的密文特征 AES DES RC4 Rabbit Triple DES 3DES 这些算法都可以引入密钥 密文特征与Base64类似 明显区别是秘文里 比较多 并且经常出现 且Rabbit开头部分通常为U2FsdGV
  • aiohttp 异步http请求-3.异步批量下载图片

    前言 当我们需要批量下载图片的时候 requests 库会比较慢 如果一个个下载 出现阻塞的时候 后面的都会阻塞卡住 假死状态 当然你用多线程也能提高效率 这里介绍用aiohttp 异步批量下载图片 异步批量下载图片 话不多说 直接看代码
  • DDT数据驱动

    一 DDT介绍 数据驱动思想 数据和用例进行分离 通过外部数据去生成测试用例 适用场景 进行接口测试时 每个接口的传参都不止一种情况 一般会考虑正向 逆向等多种组合 所以在测试一个接口时通常会编写多条case 而这些case除了传参不同外
  • IMU-Allan方差分析

    使用Allan方差来确定MEMS陀螺仪的噪声参数 陀螺仪测量模型为 使用长时间静止的陀螺仪数据对陀螺仪噪声参数进行分析 上式中 三个噪声参数N 角度随机游走 K 速率随机游走 和B 偏差不稳定性 背景 Allan方差最初由David W A