Tyler Veness f0e3bb5164 artf4165: D term of PID controller now uses change in input instead of change in error
This avoids large additions introduced by the D term when a step change occurs in the setpoint. Otherwise, the changes return the same values. Let error = setpoint - input and prevError = prevSetpoint - prevInput. If the D term is calculated via error - prevError, then:

error - prevError = (setpoint - input) - (prevSetpoint - prevInput)

If we ignore the setpoint changing, then we get:

error - prevError = (setpoint - input) - (setpoint - prevInput)
                  = prevInput - input

Change-Id: Ifa4af9b265e3c4bd263e8541355f2b80269693e9
2015-07-30 08:55:28 -07:00
2015-05-20 16:22:17 -04:00
2015-05-20 16:22:17 -04:00
2015-05-20 16:22:17 -04:00
2014-04-01 11:18:29 -04:00
2014-12-17 11:04:21 -05:00
2015-05-20 16:22:17 -04:00
2015-05-20 16:22:17 -04:00
2014-03-03 11:30:55 -05:00
2015-05-20 16:22:17 -04:00
2015-05-20 16:22:17 -04:00
2015-05-20 16:22:17 -04:00
Description
WPILib - FRC Robotics Library
480 MiB
Languages
C++ 53.1%
Java 32.6%
Python 7.5%
C 2.6%
Jinja 1.7%
Other 2.4%