We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a2d607 commit 710819aCopy full SHA for 710819a
src/common/pid.cpp
@@ -25,7 +25,7 @@ float PIDController::operator() (float error){
25
// Discrete implementations
26
// proportional part
27
// u_p = P *e(k)
28
- float proportional = P * error_prev;
+ float proportional = P * error;
29
// Tustin transform of the integral part
30
// u_ik = u_ik_1 + I*Ts/2*(ek + ek_1)
31
float integral = integral_prev + I*Ts*0.5*(error + error_prev);
0 commit comments