Go Down

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

yangkai

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?
Like:pwm_speed=error*100/48+kd*(error-last_error)+ki*error_sum??

Thanks.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy