Added derivatives into the PID loop.