如何校正(消除偏差)加速度计和陀螺仪测量中的 IMU 数据?

发布于 2025-01-19 19:02:59 字数 448 浏览 4 评论 0原文

我目前正在努力将GNSS和IMU融合的任务,以制定更准确的自动驾驶汽车导航系统。我非常熟悉使用GNSS来获得准确的位置,但是我是使用IMU传感器的新手。我读过几种文献,但仍然对从加速度计和陀螺仪测量中消除偏差的更好方法仍然感到困惑。

我使用MPU-9250有两种原始测量数据,它们是x,y,z轴和角速度数据(DEG/s)中的加速度数据(M/S2),也是x,y,z轴上的加速度数据(deg/s)。 。我试图将这些数据输入到我的传感器融合程序中。不幸的是,我对准确性不满意。因此,我认为首先我应该纠正(删除偏见)原始数据IMU,然后可以将更正后的IMU数据输入我的Fusion程序。

我找不到我的大脑可以理解或适应我的情况的答案。有人可以分享一些有关此的信息吗?在这种情况下,我可以使用高通滤波器或低通滤波器吗? 如果有人可以在不使用复杂的数学公式/符号的情况下向我详细解释,我将不胜感激,我不是数学家,这是我在寻找信息时的问题之一。

先感谢您

I am currently working on a mission to fuse GNSS and IMU for a more accurate navigation system for autonomous vehicles. I am very familiar with using GNSS to get the accurate position, however I'm a newbie in using IMU sensor. I've read several kinds of literature but am still confused about which better way should I do to remove bias from the accelerometer and gyroscope measurement.

I have 2 kinds of raw measurement data using MPU-9250, they are acceleration data (m/s2) in the x,y, z-axis and angular velocity data (deg/s) also in the x,y, z-axis. I have tried to input these data into my sensor fusion program. Unfortunately, I got unsatisfied with accuracy.. Hence I think firstly I should correcting (removing bias) of raw data IMU, and then the corrected IMU data can be input to my fusion program.

I couldn't find an answer that my brain could understand or fit my situation. Can someone please share some information about this? Can I use a high-pass filter or a low-pass filter in this situation?
I would really appreciate if there is someone could explain in detail to me without using complex math formulas/symbols, I'm not a mathematician and this is one of my problems when looking for information.

Thank you in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪异←思 2025-01-26 19:02:59

加速度计和陀螺仪通常有很大的偏差。您可以将偏差分解为诸如

  1. 恒定偏差
  2. 、温度变化引起的偏差等因素。
  3. 偏差不稳定性

偏差的静态部分很容易被减去。如果设备从水平方向开始并且没有任何移动,您可以采样约 1 秒,取平均值并从读数中减去它。虽然,此步骤消除了很大的偏差,但仍然无法完全消除它(由于水平不完美)。

如果您观察到 IMU 芯片的温度在运行过程中发生变化(甚至 5-10 度),请记下偏置和温度(MPU9250 有内置温度传感器)。拟合捕获温度偏差的线性或二次曲线。随后,使用温度读数来估计偏差并将其减去。

即使实施了 1 和 2,仍然会留下一些顽固的偏见。如果在像卡尔曼滤波器这样的融合算法中使用相同的算法(没有制定用于估计偏差的公式,则最终的位置和方向估计也会有偏差)。

可以使用一些外部参考/传感器(如 GNSS、相机)来估计偏差以及重要状态(如位置)。

为此目的可以设计互补滤波器(低通+高通)或卡尔曼滤波器。

卡尔曼滤波器方法:

使用这种方法需要大量的直觉和一些数学知识。基本上,这项工作涉及制定预测和预测。测量模型,然后为您的测量和预测提供粗略的噪声方差。需要理解的重要一点是,卡尔曼滤波器假设误差遵循正态分布没有任何偏差。因此,公式应故意将偏差项作为也应估计的未知状态(不要假设传感器在公式中没有偏差)。

您可以查看 我的其他答案以详细了解这种方法。

互补滤波器方法

互补滤波器对于更简单的问题来说更简单:P

这个想法是我们在噪声测量中使用低通滤波器,在有偏差的测量中使用高通滤波器。然后把它们加起来就到此为止了。

确保 LPF 和 HPF 互补(HPF 的传递函数应为 1-LPF)。通常使用具有相同时间常数的一阶滤波器。此外,滤波器方程必须从连续拉普拉斯域转换为离散形式(了解 ZOH,Tustins 近似...)。

最终的形式也散布在互联网上。

就我个人而言,我会使用卡尔曼滤波器来实现此目的,但可以通过相同的努力使用互补滤波器。您可以这样做,

  1. 假设物体在长期(1-10 秒左右)内平均没有加速。那么你可以说加速度计测量相对于 IMU 的长期重力方向。然后 arctan(accy, accz) 可用于获得俯仰和横滚的估计。但俯仰和横滚读数会受到大量噪音的影响。在其上实现一个时间常数约为 5 秒左右的低通滤波器。另外,使用 dt*transformationMatrix*gyrograph 添加最新的俯仰/横滚以获得另一个俯仰和横滚。但这些都存在偏见。通过基于陀螺仪的俯仰和横滚实现 HPF。将它们加在一起即可得到俯仰和横滚。我们称这些为 IMU_PR。

  2. 现在忘记我们最初的加速度假设。加速度计给出比力(即净加速度 - 重力)。由于我们有俯仰角和横滚角 (IMU_PR),因此我们知道重力方向。添加重力到加速度读数以获得加速度的估计值。应用适当的坐标系转换,将此加速度带到与 GPS 相同的坐标系(为此,您需要估计偏航角。为此目的,将磁力计与陀螺仪融合)。然后执行 vel = vel + acc*dt。再次积分以获得 IMU 的位置估计。但这会由于加速度计(以及俯仰、滚动)的偏差而发生漂移。在此位置上实施高通滤波器,并在 GPS 位置上实施低通滤波器以获得最终估计。

Accelerometer and Gyroscope have substantial bias usually. You could break the bias down to factors like,

  1. Constant bias
  2. Bias induced by temperature variation.
  3. Bias instability

The static part of bias is easy to subtract out. If the unit starts from level orientation and without any movement, you could take samples for ~1s, average it and subtract it from your readings. Although, this step removes a big chuck of bias, it cannot still fully remove it (due to level not being perfect).

In case you observe that the temperature of IMU die varies during operation (even 5-10 deg matters), note down the bias and temperature (MPU9250 has an inbuilt temperature sensor). Fit a linear or quadratic curve that captures bias against temperature. Later on, use the temperature reading to estimate bias and subtract it out.

Even after implementing 1 and 2, there will still be some stubborn bias left. If the same is used in a fusion algorithm like Kalman filter (that is not formulated to estimate bias, the resulting position and orientation estimates will be biased too).

Bias can be estimated along with important states (like position) using some external reference/sensor like GNSS, Camera.

Complementary filter (low pass + high pass) or a Kalman filter can be formulated for this purpose.

Kalman filter approach:

Good amount of intuition along with some mathematics is needed to use this approach. Basically the work involves formulating prediction & measurement model and then provide rough noise variances for your measurements and prediction. An important thing to understand is that, Kalman filter assumes that the errors follow normal distribution without any bias. So the formulation should deliberately put bias terms as unknown states that should be estimated too (Do not assume that the sensor is bias free in the formulation)..

You could checkout my other answer to gain a detailed understanding of this approach.

Complementary filter approach

Complementary filter is simpler for simpler problems :P

The idea is that we use low pass filter on noisy measurement and high pass filter on biased measurement. Then add them up and call it a day.

Make sure that both the LPF and HPF are complements of each other (Transfer function of HPF should be 1-LPF). Typically first order filters with same time constants are used. Additionally the filter equations have to be converted from continuous laplace domain to discrete form (Read about ZOH, Tustins approximation...).

The final form is scattered around the internet too.

Personally I would use a Kalman filter for this purpose, but complementary filter can be used with same amount of effort. You could do this,

  1. Assume that the body is not accelerating on average in long term (1-10 s or so). Then you could say that the accelerometer measures the direction of gravity in long term relative to the IMU. Then arctan(accy, accz) can be used to obtain an estimate of pitch and roll. But this pitch and roll readings will suffer from substantial noise. Implement a low pass filter on it with time constant ~5 seconds or so. Additionally add the latest pitch/roll with dt*transformationMatrix*gyroscope to get another pitch and roll. But these suffer from bias. Implement a HPF over gyro based Pitch and Roll. Add them together to get Pitch and Roll. Lets call these IMU_PR.

  2. Now forget our original acceleration assumption. accelerometer gives specific force (which is net acceleration - gravity). Since we have Pitch and Roll angles (IMU_PR), we know gravities direction. Add gravity to accel readings to get an estimate of acceleration. Apply proper frame conversion to bring this acceleration to same coordinate frame as GPS (you will need an estimate of Yaw to do so. Fuse a magnetometer with gyroscope for this purpose). Then do vel = vel + acc*dt. Integrate it again to get an estimate of position from IMU. But this will drift due to the bias in accelerometer (and pitch, roll). Implement a high pass filter over this position and low pass filter over GPS position to get a final estimate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文