# imu_utils
A ROS package tool to analyze the IMU performance. C++ version of Allan Variance Tool.
The figures are drawn by Matlab, in `scripts`.
Actually, just analyze the Allan Variance for the IMU data. Collect the data while the IMU is Stationary, with a two hours duration.
## refrence
Refrence technical report: [`Allan Variance: Noise Analysis for Gyroscopes`](http://cache.freescale.com/files/sensors/doc/app_note/AN5087.pdf "Allan Variance: Noise Analysis for Gyroscopes"), [`vectornav gyroscope`](https://www.vectornav.com/support/library/gyroscope "vectornav gyroscope") and
[`An introduction to inertial navigation`](http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-696.html "An introduction to inertial navigation").
```
Woodman, O.J., 2007. An introduction to inertial navigation (No. UCAM-CL-TR-696). University of Cambridge, Computer Laboratory.
```
Refrence Matlab code: [`GyroAllan`](https://github.com/XinLiGitHub/GyroAllan "GyroAllan")
## IMU Noise Values
Parameter | YAML element | Symbol | Units
--- | --- | --- | ---
Gyroscope "white noise" | `gyr_n` | <img src="https://latex.codecogs.com/svg.latex?{%5Csigma_g}"> | <img src="https://latex.codecogs.com/svg.latex?{%5Cfrac%7Brad%7D%7Bs%7D%5Cfrac%7B1%7D%7B%5Csqrt%7BHz%7D%7D}">
Accelerometer "white noise" | `acc_n` | <img src="https://latex.codecogs.com/svg.latex?{%5Csigma_a}"> | <img src="https://latex.codecogs.com/svg.latex?{%5Cfrac%7Bm%7D%7Bs^2%7D%5Cfrac%7B1%7D%7B%5Csqrt%7BHz%7D%7D}">
Gyroscope "bias Instability" | `gyr_w` | <img src="https://latex.codecogs.com/svg.latex?{%5Csigma_b_g}"> | <img src="http://latex.codecogs.com/svg.latex?\frac{rad}{s}&space;\sqrt{Hz}" title="\frac{rad}{s} \sqrt{Hz}" />
Accelerometer "bias Instability" | `acc_w` | <img src="https://latex.codecogs.com/svg.latex?{%5Csigma_b_a}"> | <img src="http://latex.codecogs.com/svg.latex?\frac{m}{s^2}&space;\sqrt{Hz}" title="\frac{m}{s^2} \sqrt{Hz}" />
* White noise is at tau=1;
* Bias Instability is around the minimum;
(according to technical report: [`Allan Variance: Noise Analysis for Gyroscopes`](http://cache.freescale.com/files/sensors/doc/app_note/AN5087.pdf "Allan Variance: Noise Analysis for Gyroscopes"))
## sample test
<img src="figure/gyr.jpg">
<img src="figure/acc.jpg">
* blue : Vi-Sensor, ADIS16448, `200Hz`
* red : 3dm-Gx4, `500Hz`
* green : DJI-A3, `400Hz`
* black : DJI-N3, `400Hz`
* circle : xsens-MTI-100, `100Hz`
## How to build and run?
### to build
```
sudo apt-get install libdw-dev
```
* download required [`code_utils`](https://github.com/gaowenliang/code_utils "code_utils");
* put the ROS package `imu_utils` and `code_utils` into your workspace, usually named `catkin_ws`;
* cd to your workspace, build with `catkin_make`;
### to run
* collect the data while the IMU is Stationary, with a two hours duration;
* (or) play rosbag dataset;
```
rosbag play -r 200 imu_A3.bag
```
* roslaunch the rosnode;
```
roslaunch imu_utils A3.launch
```
Be careful of your roslaunch file:
```
<launch>
<node pkg="imu_utils" type="imu_an" name="imu_an" output="screen">
<param name="imu_topic" type="string" value= "/djiros/imu"/>
<param name="imu_name" type="string" value= "A3"/>
<param name="data_save_path" type="string" value= "$(find imu_utils)/data/"/>
<param name="max_time_min" type="int" value= "120"/>
<param name="max_cluster" type="int" value= "100"/>
</node>
</launch>
```
### sample output:
```
type: IMU
name: A3
Gyr:
unit: " rad/s"
avg-axis:
gyr_n: 1.0351286977809465e-04
gyr_w: 2.9438676109223402e-05
x-axis:
gyr_n: 1.0312669892959053e-04
gyr_w: 3.3765827874234673e-05
y-axis:
gyr_n: 1.0787155789128671e-04
gyr_w: 3.1970693666470835e-05
z-axis:
gyr_n: 9.9540352513406743e-05
gyr_w: 2.2579506786964707e-05
Acc:
unit: " m/s^2"
avg-axis:
acc_n: 1.3985049290745563e-03
acc_w: 6.3249251509920116e-04
x-axis:
acc_n: 1.1687799474421937e-03
acc_w: 5.3044554054317266e-04
y-axis:
acc_n: 1.2050535351630543e-03
acc_w: 6.0281218607825414e-04
z-axis:
acc_n: 1.8216813046184213e-03
acc_w: 7.6421981867617645e-04
```
## dataset
DJI A3: `400Hz`
Download link: [`百度网盘`](https://pan.baidu.com/s/1jJYg8R0 "DJI A3")
DJI A3: `400Hz`
Download link: [`百度网盘`](https://pan.baidu.com/s/1pLXGqx1 "DJI N3")
ADIS16448: `200Hz`
Download link:[`百度网盘`](https://pan.baidu.com/s/1dGd0mn3 "ADIS16448")
3dM-GX4: `500Hz`
Download link:[`百度网盘`](https://pan.baidu.com/s/1ggcan9D "GX4")
xsens-MTI-100: `100Hz`
Download link:[`百度网盘`](https://pan.baidu.com/s/1i64xkgP "MTI-100")
imu内参标定,allan方差分析,imu-utils
需积分: 0 150 浏览量
更新于2023-03-16
5
收藏 196KB RAR 举报
IMU(Inertial Measurement Unit,惯性测量单元)是一种传感器设备,用于测量物体在三维空间中的加速度、角速度以及有时还包括磁力计数据,广泛应用于无人机、机器人导航、车辆定位等领域。内参标定是确保IMU精确度的关键步骤,而Allan方差分析则是评估IMU性能的一种常用方法。
一、IMU内参标定
IMU内参标定主要是为了消除传感器硬件误差,包括非线性、偏置、尺度因子不一致、温漂等。这些误差会导致测量数据失真,影响后续的数据处理和系统精度。标定过程通常包括以下几个步骤:
1. 数据采集:通过让IMU在不同方向上旋转或静止,收集大量数据。
2. 偏置估计:计算每个轴在各种条件下(如静态、匀速旋转等)的平均值,作为偏置估计。
3. 非线性校正:通过拟合数据曲线,找出加速度计和陀螺仪的非线性响应,并建立校正模型。
4. 温度补偿:如果IMU受温度影响大,需测量不同温度下的性能并构建温度-误差模型。
5. 校正应用:将标定得到的参数应用于原始数据,提高测量精度。
二、Allan方差分析
Allan方差分析是时间序列稳定性分析的一种,常用于评估微弱信号探测器,如IMU,的长期稳定性。该方法基于不同时间段内的平均值差异,来识别噪声类型和频率。Allan方差计算步骤如下:
1. 平均间隔选择:将原始数据按不同的时间间隔(τ)进行滑动平均,生成多个平均值序列。
2. 方差计算:计算相邻平均值之间的差的平方,再取平均值,得到Allan方差。
3. 对数图绘制:将τ对Allan方差作图,形成典型的对数-对数图。
4. 分析噪声特性:通过曲线斜率,可以识别出随机游走噪声、白噪声、热噪声等,从而评估IMU的稳定性和精度。
三、imu-utils工具
imu-utils是开源的IMU数据处理库,提供了诸如数据预处理、滤波、标定等功能。它可以帮助用户方便地进行以下操作:
1. 数据读取与存储:支持多种格式的数据输入输出,如CSV、BIN等。
2. 基本运算:包括数据平滑、坐标变换、加速度和角速度计算等。
3. 内参标定:提供标定算法,如最小二乘法,帮助用户完成IMU内参的校正。
4. Allan方差分析:内置Allan方差计算函数,用于评估IMU的长期稳定性。
5. 滤波应用:集成卡尔曼滤波、互补滤波等,有效减小噪声影响,提高数据质量。
在实际应用中,imu-utils可以极大地简化IMU数据处理的工作流程,提高工作效率,并为研究人员和工程师提供了一个强大的工具集,用于优化IMU的性能和应用效果。

Rainbow_SS
- 粉丝: 0
最新资源
- 移动互联网SaaS软件市场背景下--纷享销客市场营销策略分析-终稿.docx
- 计算机导论模拟考试题6份完整版.doc
- 基于 C++ 编程语言实现的神经网络技术解析
- 信息化教学设计小清新文艺范LOMO风.ppt
- 以自动化与工业物联技术打造数字化工厂.pptx
- 单片机课程方案设计书步进电机启动停止正反转.doc
- PLC机械手控制系统方案设计书5.doc
- 计算机网络的拓扑结构-北京大学.doc
- 计算机软件及应用Quasiexperimentaldesigns本.ppt
- 信息化思路下中职机械识图教学与软件教学结合的探究.docx
- 基于深度学习的小学数学课堂教学-(2).doc
- 宿舍网络综合布线系统专业技术实施方案.doc
- 基于单片机的医院病房呼叫系统课程设计.doc
- 人工智能私法的概念网络及其挑战
- 微型计算机接口技术及应用期末考试试卷及答案.doc
- 医院综合布线方案.doc