PID Power supply control with dynamic load
PID Power supply control with dynamic load
(OP)
Hi All,
Here is my situation...
I have a 10V, 10A supply with independent voltage and current control inputs. During a process I have a load attached to the output that will increase in size as time goes. So at the beginning of the process I might set the power supply to 5V,5A and have a .5 ohm load so the power supply output will initially be 2.5V,5A (current control). As time goes however the load will reach 1 ohm and the output becomes 5V, 5A (transition from current control to voltage control). After more time the load becomes 2 ohms and the supply output would be 5V, 2.5A (voltage control). This is a theoretical situation but exactly models what I need to control.
I can use a PID to control either the voltage OR current without issue, but when I try to use a PID for the voltage and a PID for the current, I get a terrible transition from current control to voltage control. The reason for the bad transition is because while the supply is under current control, the voltage PID is trying to output 5V, but the current control and ohms law is limiting the output to 2.5V. This causes the voltage PID to eventually max's out the voltage control signal on the power supply. Therefore when the transition point comes, the PID's output signals have the supply set to 10V,5A and there is a time (which depends on the response of the voltage PID) where the voltage exceeds 5V. This is not good.
I know enough about PID and controls to make simple PID loops very effectively, but the only method I can come up with to handle this situation is to run a single PID for voltage and assume the output for the current, then start a different PID for current and assume the output for voltage. I have tried this, but it has severe limitations caused by the 'assumptions'
Is there a common method to control a system in this fashion? or does anyone have any good advice?
I am using an AB compactlogix system
thanks
kevin
Here is my situation...
I have a 10V, 10A supply with independent voltage and current control inputs. During a process I have a load attached to the output that will increase in size as time goes. So at the beginning of the process I might set the power supply to 5V,5A and have a .5 ohm load so the power supply output will initially be 2.5V,5A (current control). As time goes however the load will reach 1 ohm and the output becomes 5V, 5A (transition from current control to voltage control). After more time the load becomes 2 ohms and the supply output would be 5V, 2.5A (voltage control). This is a theoretical situation but exactly models what I need to control.
I can use a PID to control either the voltage OR current without issue, but when I try to use a PID for the voltage and a PID for the current, I get a terrible transition from current control to voltage control. The reason for the bad transition is because while the supply is under current control, the voltage PID is trying to output 5V, but the current control and ohms law is limiting the output to 2.5V. This causes the voltage PID to eventually max's out the voltage control signal on the power supply. Therefore when the transition point comes, the PID's output signals have the supply set to 10V,5A and there is a time (which depends on the response of the voltage PID) where the voltage exceeds 5V. This is not good.
I know enough about PID and controls to make simple PID loops very effectively, but the only method I can come up with to handle this situation is to run a single PID for voltage and assume the output for the current, then start a different PID for current and assume the output for voltage. I have tried this, but it has severe limitations caused by the 'assumptions'
Is there a common method to control a system in this fashion? or does anyone have any good advice?
I am using an AB compactlogix system
thanks
kevin





RE: PID Power supply control with dynamic load
I assume you can monitor both the current and the voltage outputs of the supply.
A single PID, sequentially changing the SP source and the final control element the PID drives would do it.
Mode 1 = load resistance < 1 ohm
Mode 2 = load resistance > 1 ohm
(It might require some initialization logic to force Mode 1 on start-up)
Mode 1
when load resistance < 1 ohm,
then SP source = current; PID SP = 5A
PID output drives AOx which drives power supply's current control input
Power supply's voltage modulates to regulate current in load circuit to 5A
Independent 'alarm' circuit to determine mode 1 or mode 2
When Current = 5A AND Voltage = 5V (for some duration?), then switch to Mode 2
Mode 2
When load resistance > 1 ohm,
then SP source = voltage; PID SP (2) = 5V
PID output drives AOy which drives power supply's voltage control input
Power supply's current modulates to regulate voltage in load circuit to 5V
ControlLogix undoubtably has the logic and analog switch function blocks with which you can
- switch the setpoint source on the PID from the current output to the voltage and back.
- switch the output of PID block to drive an AO to either the current or the voltage side of the power supply.
RE: PID Power supply control with dynamic load
Both of your assumptions are correct.... the power supply regulates it output based on the SP I provide and I do monitor both output of the supply...
Sounds simple enough and is very close to what I have tried. My problem occurs when I switch 'modes'. At the time, I don't know the value of the control output that will give me the desired set point, so at the transistion, the CV starts at zero. This however causes the power supply voltage to go to zero until the PID corrects it and brings it up to the desired SP. To overcome this, I make 'assumptions' based on the desire SP voltage and set the initial CV as follows....
CVi = (SP/Max ouput) * CVmax
but depending on the calibration of the system, an output of CVmax/2 does not create an output of Vmax/2, so in some cases (most I have seen) there is a step response in the power supply output voltage when I make the transition from mode 1 to mode 2.
kevin
RE: PID Power supply control with dynamic load
I'm trying to understand your whole point. If you can set the PS up for 5V and 5A and you're good with that. And at the end you are good with 5V and 2.5A why are you doing any control at all? VI controlled supplies do that right out of the box, that's all they do! (Screamed like Kyle in Terminator)
Keith Cress
kcress - http://www.flaminsystems.com
RE: PID Power supply control with dynamic load
The project is to retrofit into large supplies that control metal finishing. Currently the supply inputs are manual knobs, but I need plc control in place of the knobs. And no.. it's not just a matter of set it and forget it. It's a matter of using a plc to actually handle the control. (No point in screaming about man)
RE: PID Power supply control with dynamic load
There is a way to get a low select
http://
RE: PID Power supply control with dynamic load
Keith caught it right off: why is anything other than a 5V control signal to the voltage side and then at the appropriate time, a 5A control signal to the current side needed?
Unless the power supply squawks at the changeover?
Dan
RE: PID Power supply control with dynamic load
kevin
RE: PID Power supply control with dynamic load
This resolved the spurious problem of the PID going out of control during this spike or a big bump in speed regulation.
Since this is a contrologix platform you would zero out the variable that the PID uses. Example
PID Parmameter = this_variable.Data[0]
Use the clear instruction to clear the data before transferring new parameters into the PID
CLR this_variable.Data[0]
Then copy the other parameters PID after or before this on same rung used to transisition from voltage to current control or vis versa.
Hope this helps