Go Down

Topic: PID control the pwm speed question (Read 247 times) previous topic - next topic


Hi, If I want to set the PID output from 0 to 100 when error goes from 48 to 0.
can I write: PID_output(-100/48*error+kd*(error-last_error)+ki*error_sum)+100?
Because I want to decrease the PWM speed by pwm_speed=initial_speed-PID_output

OR just directly set the PID_output to PWM speed?


Go Up