I will be very honest: until very recently I did not really understood how PID controller’s Dterm really works. Yes, something with dampening, something with “looking into future”, bla bla bla. But the reason for not understanding was because I was overthinking it. There is no “magic” only simple mathematics and few basic concepts which I will now explain.
Setpoint is the value which we request from our system. In case of multirotors, PID setpoint will be a rotation speed around axis given in degrees per second [dps]. Setpoint
0 means we do not want to rotate (keep current attitude) and setpoint
200 means we want to rotate at 200dps
Measurement the value that represents actual state of the system measured by some kind of sensor. In our case, it will be the gyroscope and rotation-around-axis speed measured in degrees per second
Error the difference between Setpoint and Measurement computed as Error = Setpoint – Measurement. In our case, when Error is above
0, that means drone is rotating too slow and should speed up. If Error is below
0, drone is rotating too fast and should slow down