|
PID Control algorithm(to control PWM Duty Cycle based on Current)
Hi All,
How to arrive at a proportional gain Kp and ki in a PI control algorithm? We have to control the PWM Duty Cycle to a motor based up on the current drawn by the motor. If the desired current is 5A, & if we measure current as 6A, then how will we know what should be the duty cycle to get the desired current. Because most of the explanation on the web says that desired - measured * Kp gives the duty cycle. How to convert the error which is in terms of current to duty cycle. More over, the current is varying at different voltage levels, i.e the measured current for a 70% and 60% duty cycle at 10V is different than the measured current for 70% and 60% dty cycle at 12V.
|