陀螺仪传感器漂移和正确的角度估计

发布于 2024-12-02 03:59:47 字数 210 浏览 1 评论 0原文

我使用 LG Optimus 2x 智能手机(陀螺仪和加速计传感器)进行定位。

我想从陀螺仪获得正确的旋转角度,以便稍后用于身体到地球坐标转换。我的问题是

如何测量和消除陀螺仪传感器中的漂移。

一种方法是取一段时间内陀螺仪样本(当移动设备处于静态状态时)的平均值并从当前样本中减去,这不是好方法。

当移动设备旋转/运动时如何获得自由漂移角度?

I am using LG Optimus 2x smartphone(Gyroscope and Accelerometer sensor) for positioning.

I want to get correct rotation angles from gyroscope that can be used later on for body to earth coordinate transformation. My question is that

How I can measure and remove the drift in gyro sensor.

The one way is to take the average of gyro samples (when mobile is in static condition) for some time and subtracting from current sample, which is not good way.

When the mobile is in rotation/motion how to get the drift free angles?

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

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

发布评论

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

评论(3

北城半夏 2024-12-09 03:59:47

据我所知,卡尔曼滤波器或类似的东西是在 SensorManager 中实现的。请查看Android 设备上的传感器融合:运动处理的革命

你正试图解决一个已经解决的问题。

As far as I know, either the Kalman filter or something similar is implemented in the SensorManager. Check out Sensor Fusion on Android Devices: A Revolution in Motion Processing.

You are trying to solve a problem that is already solved.

累赘 2024-12-09 03:59:47

我是一个指南针应用程序的作者,该应用程序集成了来自磁性和陀螺仪传感器的数据(稳定的指南针)。我主要在运行 Android 2.2 的 LG Optimus black(您可以在视频中看到的设备)上测试了该应用程序,因此我将分享我的经验:

  • 陀螺仪读数非常准确。该传感器与加速度计和磁传感器正好相反,后者给出的读数有很大的抖动。
  • 陀螺仪的读数(即角速度)根本不漂移。如果您仅集成陀螺仪读数,您将在方向估计中产生漂移。由于您在不同时间集成样本,因此您将获得的方法在每个集成步骤后都会降级。
  • 为了避免方向估计中出现这种漂移,您必须考虑其他输入源来纠正陀螺仪数据集成的结果。解决方案是将来自方向传感器(磁+加速度)的数据和来自陀螺仪的数据集成。

请注意 LG 手机:根据 Android API,陀螺仪将以 rad/s 为单位返回数据。 LG Optimus Black with Froyo 给出的读数以度/秒为单位。此类手机的 Android 2.3 更新刚刚发布。我必须测试新版本是否符合规范。

您的手机的 Android 版本是什么?您是否使用陀螺仪测试过任何应用程序?你得到了预期的结果吗?

I am the author of a compass application that integrates data from magnetic and gyroscope sensors (steady compass). I have tested this application mostly on a LG Optimus black (the device that you can see on the video) running Android 2.2, so I am going to share my experiences:

  • Gyroscope readings are very accurate. This sensor is just the opposite to accelerometer and magnetic sensors which give readings with a lot of jitter.
  • The readings from the gyroscope (i.e. the angular speed) does not drift at all. You will have a drift in the estimation of the orientation if you just integrate gyroscope readings. Since you are integrating samples in different times, you will obtain just an approach that will degrade after every integration step.
  • In order to avoid such a drift in the orientation estimation, you must consider other input sources to correct the results coming from gyroscope data integration. The solution is the integration of data coming from the orientation sensor (magnetic + acceleration) and data coming from the gyroscope.

Be careful with LG phones: According to the Android API, gyroscope will return data in rad/s. The LG Optimus Black with Froyo gives readings in degrees/s. The update to Android 2.3 has just been released for such phone. I have to test whether the new version behaves according to the specifications.

What Android version does your phone have? Have you tested any application using gyroscope? Did you get the expected results?

别挽留 2024-12-09 03:59:47

基本上陀螺仪会在很长一段时间内发生漂移。而加速度计没有漂移,但往往不稳定。通过使用卡尔曼滤波器组合来自两个传感器的信息,您可以获得准确的姿态。对于一些不太复杂的情况,您还可以使用互补过滤器。

请参阅这篇文章了解更多信息:
组合陀螺仪和加速度计数据

Basically gyros drift over long time periods. Whereas accelerometers have no drift but tend to be unstable. By combining information from both sensors using a Kalman filter you can obtain a accurate attitude. For some this less complex you could also use a Complementary Filter.

See this post for more info:
Combine Gyroscope and Accelerometer Data

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