如何对陀螺仪数据进行离散积分?
陀螺仪在积分产生角度时测量角度的旋转速率,对吗? 我的问题是我该怎么做?到目前为止我所做的只是添加我检测到的所有角度,这似乎是非常错误的
AngleIntegrated = GyroDegPersec * (1/GyroBandWidth);
建议非常受欢迎。谢谢
gyroscopes which measure rate of rotation of angles when integrated produce angles right?
my question is how do i do this? what im doing so far is just adding all the angles ive detected and that seems to be very wrong
AngleIntegrated = GyroDegPersec * (1/GyroBandWidth);
suggestions are very welcome. thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要对时间进行积分。。因此,理想情况下,您应该以规则(固定)时间间隔 T 对陀螺仪进行采样,然后将该采样间隔 T 合并到积分计算中。
请注意,T 需要足够小才能满足奈奎斯特准则。
You need to integrate with respect to time. So ideally you should sample the gyroscope at regular (fixed) time intervals, T, and then incorporate that sampling interval, T, into your integral calculation.
Note that T needs to be small enough to satisfy the Nyquist criterion.
您可以在离散域中进行集成。假设角速率为da,则其时间积分为a。
k 是离散步数。
例如,da(k) 是当前角速率读数。 da(k-1) 是先前的角速率读数。 a(k-1)是上一步的积分值(旋转角度)。 T是采样率。如果传感器每 1 毫秒输出一次,则 T 变为 0.001。
当 k>0 时可以使用此公式。必须给出初始值 a(0)。
You can integrate in discrete domain. Suppose the angular rate is da, it's time integral is a.
k is the discrete step number.
For example, da(k) is current angular rate reading. da(k-1) is previoud angular rate reading. a(k-1) is the previous step's integration value(rotation angle). T is sampling rate. If the sensor outputs in every 1 millisecond, T becomes 0.001.
You can use this formula when k>0. The initial value, a(0), must be given.
当然,从长远来看,你不能指望有一个正确的值(通过积分,你的错误窗口总是会随着时间的推移而增加),我会做的是读取陀螺仪,插入当前的读数和之前的几个读数以获得一个平滑曲线(例如使用当前读取和前两个读取的抛物线),然后根据上次读取时间和当前时间计算该抛物线的积分。
Knowing that of course you can't count on having a correct value in the long run (by integration your error window will always increase over time) what I would do is reading the gyroscope, interpolating the current read and previous few ones to get a smooth curve (e.g. a parabola using current read and previous two) and then computing the integral of that parabola from last read time and current time.