|
Re: PID Control algorithm(to control PWM Duty Cycle based on Current)
You might want to consider using a feedback loop instead of strictly PID.
Think of it this way - when the error drops to zero, you don't want to set your Duty Cycle to zero, you want to keep it exactly the same.
New Duty Cycle = Old Duty Cycle + Error * Constant.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
|