br3ttb / Arduino-PID-Library

1.93k stars 1.11k forks source link

derivative value seems #59

Closed jetsoftdev closed 7 years ago

jetsoftdev commented 7 years ago

I think it should be dError = error-lastError;

The way you have it written it is really an error chasing it tail with input-lastError. I could be wrong in the simplification of the math.

br3ttb commented 7 years ago

http://brettbeauregard.com/blog/2011/04/improving-the-beginner%E2%80%99s-pid-derivative-kick/