Skip to content

Moving Average

Lucas edited this page Aug 13, 2020 · 8 revisions

What is a Moving Average?

A moving average is a calculation of averages using a subset of the whole data. The subset often changes overtime (perhaps reflecting only the most recent x data points), hence the term "moving." Some specific subtypes include simple, weighted, and exponential.

See Wikipedia Page for more information

How Does sciencebot leverage a Moving Average?

sciencebot uses a moving average to create smoother motion. Sequential commands generated by a controller may result in jerky motion, oftentimes when switching between sharp turning and forward movement. A moving average can make the transition more gradual. However, too much smoothing can result in ineffective motion, as the vehicle continues to move during intermediate "transition steps," perhaps taking too long to eventually move in the originally requested manner. sciencebot uses a weighted moving average to incorporate a few previous commands when calculating the next motion.

Manuever without smoothing:

cut

With Weighted Moving Average:

smooth

Clone this wiki locally