Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PID Power supply control with dynamic load

Status
Not open for further replies.

kebo2K

Electrical
Nov 28, 2007
7
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



 
Replies continue below

Recommended for you

I assume if you provide either a voltage or a current control signal to the power supply that the power supply uses that sontrol signal as its internal setpoint and modulates its current or voltage so as to maintain that control SP?

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.
 
Thanks....

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
 
It could easily be that your PS freaks on any step discontinuities on its control inputs.

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 -
 
As I said in the first post....."This is a theoretical situation..."

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)
 
Is there a common method to control a system in this fashion? or does anyone have any good advice?
Yes, first you can control current and voltage at the same time. You can control one or the other OR you can limit both. It is also possible with LQR control you can minimize a cost function made up of the voltage and current errors but I doubt you want to do this.

There is a way to get a low select
 
I was driving down the road about 1/2 hour after I posted that and went, what was I thinking? What's PID needed for when the power supply does what it does?

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
 
My problem is not supplying the control signals when they need to be, the problem is making it so there is a smooth transition between voltage and current control when the transition is required. If I could guarantee a 50% control signal would create 50% output signal there would be no issue and this post wouldn't exist. Each implementation will be a different however, and it is not possible to know how much control signal will be required to create the smooth transition. I really wish I could just simply set it and forget it, but that is not possible.
kevin
 
I just done something with a voltage regulator and used a PIDs, but the idea might be the same. We had to have different PID parameters for the different parts of the control curve. So say at the start there are different KpKiKd for the ramp up, then during the last 10-20% of curve change over to a different set of KPKiKd but during the transistion, ZERO OUT or CLEAR the data during changeover to the new parameters.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor