Derivative Filtering

I’ve been hearing a lot about derivative filtering and how it can make your flywheel more accurate / recover faster, but I’m not sure what it is. Can anyone explain it to me

I recommend checking out the Flywheel Velocity Control section in the 7842F Robot Showcase which helped me understand it, especially the graphs.

Basically, in PID, derivative prevents sudden changes in flywheel velocity by fighting against a sudden rate of change of your error (if you haven’t fully grasped PID, here’s a link explaining that).

With derivative filtering, the EMA makes the output value lag somewhat behind the actual value of the real time input. This means that after a disc is shot, the derivative will make the input voltage spike up, while the EMA filtering will make high spiked voltage lag behind and slowly go down, giving it a kind of boost after each shot.

Quote from the original post:

I also want it to linger a bit after the shot to provide an extra boost. To do this, I also apply an EMA filter on the D. Filtering D is common practice, as it makes D have time to affect the output instead of being there for only a few timeslices.


Thank you so much (20 Charactera)

What does EMA stand for?

Exponential Moving Average

1 Like

You may want to look at this topic from a few years ago where there is discussion and code samples for calculating Moving Average and Exponential Smoothing: Moving average


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.