过滤/标准化不良信号的算法

发布于 2024-07-12 04:50:16 字数 147 浏览 6 评论 0原文

使用 GPS 开发跟踪应用程序。 一切都很好,但有时由于封闭区域或恶劣天气,我得到的分数不准确。 当你绘制它们时,它看起来不太正确,有很多跳跃/跳跃。

我应该运行什么算法来过滤掉不良信号 对我来说,这看起来像是模糊算法的应用,但你觉得怎么样?

Working on a tracking application using GPS.
It is all fine, but sometimes because of the closed areas or bad weather I get inaccurate points. When you plot them, it just doesn't look right, with lots of hops/jumps.

What algorithm should I run to filter out the bad signals
It looks like an application of a blurring algorithm to me, but what do you think?

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

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

发布评论

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

评论(3

梦里泪两行 2024-07-19 04:50:16

有几个选项:

  1. 扔掉异常值
  2. 过滤器
  3. 使用更好的 GPS
  4. 使用外部数据源(捕捉到道路)
  5. 以上的组合

我喜欢使用过滤器 - 卡尔曼过滤器是典型的(通常也是最好的)解决方案 - 它使用比便宜的 IIR(无限脉冲响应)滤波器更好的预测平均量:

FilteredValue = FilteredValue * 0.75 + NewValue * 0.25

您可以获得每秒提供 4-5 次修复的 GPS 模块,这将允许您使用高于具有合理响应时间的“廉价”过滤器。

您还可以简单地获得更好的 GPS(SiRF III 或更好),该 GPS 噪音较小且室内接收效果更好(如果可能)。

消费者 GPS 装置会尽可能“捕捉到道路”,因此消费者不会看到偏离道路的错误,以及其他一些技术。

卡尔曼算法并不容易实现,但在没有外部数据集或传感器(例如道路速度)的情况下,它是最好的选择。 请查看 http://www.google.com/search?q= open%20source%20kalman%20filter 获取代码和教程。

-亚当

There are a few options:

  1. Throw out the outliers
  2. Filter
  3. Use a better GPS
  4. Use an external data source (snap to road)
  5. Combination of the above

I like to use filters - A Kalman filter is the typical (and often best) solution - it uses an amount of predictive averaging which is better than a cheap IIR (Infinite Impulse Response) filter:

FilteredValue = FilteredValue * 0.75 + NewValue * 0.25

You can get GPS modules which give you 4-5 fixes per second, which will allow you to use the above 'cheap' filter with reasonable response times.

You can also simply get a better GPS (SiRF III or better) that isn't as noisy and has better indoor reception (where possible).

Consumer GPS units "snap to road" where possible, so errors off the road are not seen by the consumer, as well as a few of the other techniques.

A Kalman isn't easy to implement, but without an external dataset or sensor (such as road speed), it's the best option. Check out http://www.google.com/search?q=open%20source%20kalman%20filter for code and tutorials on it.

-Adam

情魔剑神 2024-07-19 04:50:16

回复:在存在“流行”噪声的情况下进行过滤——

我发现做到这一点的最简单方法之一是:

delta = newValue - filteredValue;
delta = delta > LARGEST_SANE_DELTA ? LARGEST_SANE_DELTA
     : (delta < -LARGEST_SANE_DELTA ? -LARGEST_SANE_DELTA : delta);
filteredValue += alpha*delta;

其中 alpha = 1/tau 且 tau 是所讨论的低通滤波器的时间常数,表示为上述代码迭代之间的时间的倍数。 值 LARGEST_SANE_DELTA 表示 newValue 中可能发生的较大变化,并限制输入中过大的变化。 也许有更好的方法来拒绝这种类型的噪音,但它们更复杂,而我提到的方法非常简单。

re: filtering in the presence of "pop" noise--

One of the easiest ways I've found to do this is:

delta = newValue - filteredValue;
delta = delta > LARGEST_SANE_DELTA ? LARGEST_SANE_DELTA
     : (delta < -LARGEST_SANE_DELTA ? -LARGEST_SANE_DELTA : delta);
filteredValue += alpha*delta;

where alpha = 1/tau and tau is the time constant of the low-pass-filter in question, expressed in multiples of the time between iterations of the above code. The value LARGEST_SANE_DELTA represents a large possible change in newValue and clips excessively large variation in input. There are perhaps better ways of rejecting this type of noise, but they are more complicated, and the one I mentioned is pretty simple.

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