Re: PID question




John Popelish wrote:
hondgm@xxxxxxxxx wrote:

In general, I think a current control loop has to react much
faster than a voltage control loop. One way to accomplish
this is to have two PID controls, a fast one that controls
current, and a slow one than controls voltage, by modifying
the setpoint for the current loop. This is called a cascade
controller (a single output controlled by two measured
variables, one slaved to the other. You implement current
limit by having a low selector at the current controller
setpoint. In other words, the actual current controller
setpoint is the lower of, the current limit value, or the
output of the voltage controller. Both the setpoint for the
voltage controller, and the current limit value can come
from your DAC.

As to tuning the controllers, a visual method is quite
effective, if you have a load stepper that provides the
loops with clean, repeatable steps that you can sync a scope
to. If you need help with the tuning concepts based on
observing the time response of a PID control loop, I wrote a
tutorial (focused on industrial process control, but
applicable to any PIC controller) available at:
http://www.tcnj.edu/~rgraham/PID/popelish.html

You would tune the current controller, first, with only the
limit setpoint in effect, then tune the voltage controller
supplying the setpoint for the current controller.

Keep in mind the DAC provides a reference for a regulator, so I'm not
digitally regulating voltage. I'll be able to set the voltage via a
user interface (as well as current), but the PID controller will have
the capability of forcing the voltage lower to meet a current setpoint.

Does your response still apply? I'm a bit confused about how to apply
a cascade configuration to this. Also, I've been thinking about the
maximum value the accumulating error can reach, the "I" part.
Digitally, the output voltage can be set 0 - 2500. Right now, the
accumulating error is limited in software from exceeding +/- 28 000;
kind of a random value I chose. Is there a methodology to setting this
limit? It seems to me now that +/- 28K is a little high and will cause
sluggish response after settling into a "maximum error" condition for
long enough to hit this max.

.



Relevant Pages

  • Re: Strange control problem -- 3 phase "firing system"
    ... Another line of thought is that the controller assumes that the low ... Voltage sensor is not differential, ... adjust the pot slowly, there seems to be less wobble. ... Double check that my divider for voltage feedback is correctly done. ...
    (sci.electronics.design)
  • Re: Welding -- what to do about HUGE 2" arcs
    ... controller which wants a DC voltage limit signal, ... when current is above some threshold, in the same analog computer ... You need to get those voltage and current signals properly scaled, ...
    (sci.electronics.design)
  • Re: PID question
    ... using this value to provide current limiting, via a PID algorithm ... controlling the set voltage. ... One way to accomplish this is to have two PID controls, a fast one that controls current, and a slow one than controls voltage, by modifying the setpoint for the current loop. ... This is called a cascade controller (a single output controlled by two measured variables, ...
    (sci.electronics.design)
  • Re: 100kHz SMPS control
    ... ADC feedback of the output voltage and current fed into a DSP which ... that it would be better to use a SMPS controller IC with voltage and ... input into a DSP or CPLD/FPGA for controlling the primary side ... worthwhile to have some hardware gating to prevent doing something real ...
    (sci.electronics.design)
  • Re: 100kHz SMPS control
    ... ADC feedback of the output voltage and current fed into a DSP which ... that it would be better to use a SMPS controller IC with voltage and ... input into a DSP or CPLD/FPGA for controlling the primary side ...
    (sci.electronics.design)