|
Re: PID Control algorithm(to control PWM Duty Cycle based on Current)
Oscillations are a result of a functioning PID loop that is not properly tuned. Play with multipliers for P and I to gauge their effect, as a prelude to proper tuning. Start with 1 for P and 0 for I, and work from there.
P gives you a direction and magnitude for your correction towards setpoint.
I takes care of long-term error, allowing the value to creep towards setpoint when P is small.
D keeps the correction from happening too fast.
__________________
I am N2IRZ - What's your callsign?
|