PID motor controll for the biorobotics project.
Dependents: PID_example Motor_calibration Demo_mode Demo_mode ... more
Diff: pid.cpp
- Revision:
- 14:e5fc69651b1d
- Parent:
- 4:5353c5d0d2ed
diff -r 9be1857401f8 -r e5fc69651b1d pid.cpp --- a/pid.cpp Thu Nov 01 12:55:32 2018 +0000 +++ b/pid.cpp Mon Nov 05 16:03:11 2018 +0000 @@ -53,7 +53,7 @@ error_integral += error * pid_period; double u_i = Ki * error_integral; - // Derivative part + // Derivative part (needs filter) double error_der = (error-error_previous)/pid_period; double filtered_error_der = biquad_step(error_der); double u_d = Kd * filtered_error_der;