|
motor->del_duty_cycle = (motor->Kp)*motor->err - (motor->Kd)*(motor->err-motor->prev_err) + (motor->Ki)*(motor->cum_err); |
Derivative gain must be multiplied by frequency of the thread or divided by the time taken for one execution of your sequential code.
avitra_esp/test/rpm_tuning/main/motor.c
Line 19 in 488bf4f
Derivative gain must be multiplied by frequency of the thread or divided by the time taken for one execution of your sequential code.