10 Commits

Author SHA1 Message Date
Alekseev
fef21ec0ad first commit, by Alekseev 2025-05-23 12:36:38 +07:00
Philip Salmony
db81620e36 Update PID_Test.c 2025-05-23 12:36:38 +07:00
Philip Salmony
a1517d1aee Create LICENSE 2025-05-23 12:36:38 +07:00
Philip Salmony
186f7ac07d Changed integrator anti-windup method to static clamping. 2025-05-23 12:36:35 +07:00
Philip Salmony
bd1a5902a1 Added minus sign to derivative-on-measurement expression.
Note on 'derivative-on-measurement': Since the 'error signal' effectively going into the differentiator does not depend on the setpoint: e[n] = 0 - measurement,
 and therefore (e[n] - e[n - 1]) = (0 - measurement) - (0 - prevMeasurement) = -Kd * (measurement - prevMeasurement). (Note the minus sign compared to derivative-on-error!)
2025-05-23 12:36:32 +07:00
Philip Salmony
98ba591357 Added note on derivative-on-measurement.
If you want to use derivative-on-measurement, you will need to negate the 'D'-gain you would typically use in a 'standard derivative-on-error' PID controller - I did not mention that in the video. Since the 'error signal' effectively going into the differentiator does not depend on the setpoint: e[n] = 0 - measurement, and therefore (e[n] - e[n - 1]) = (0 - measurement) - (0 - prevMeasurement) = -Kd * (measurement - prevMeasurement).
So, for example, if you require a controller with a D-gain of 10, you would set pid->Kd = -10. This is a slight quirk of the derivative-on-measurement form - however, the code can of course be adapted to include the minus sign.
2025-05-23 12:36:19 +07:00
Philip Salmony
5eb5f16065 Initial commit. 2025-05-23 12:36:06 +07:00
Alekseev
ff8192e65e update pid, work version 2025-05-21 18:24:53 +07:00
484260d6cb test push 2025-05-21 18:21:05 +07:00
2d3a3860e7 first commit 2022-05-08 00:13:46 +07:00