PIDE Integral Gain

frorge

Member
Join Date
Jun 2011
Location
Texas
Posts
12
Hey guys, first time poster, but visit on occasion. Appreciate any help.

I am using a PIDE instruction to control temperature. I have both a heating source and a cooling source and am using te output split range. Setup is independent equation calculation off the error.

My question is this: I am wanting to change the proportional gain and the integral gain when I switch into cooling, ie less than 50% output. I see that the proportional gain can be changed on the fly but am seeing problems when I change the integral value. Namely, when I make a large set point change it seems to use the old integral setting.
I have played around with the .CVPrevious and .CV Prog inputs trying to initialize te controller but to no avail. Is there any way I can change the integral gain of the controller in auto mode?

Thanks again
 
An integral term is the sum of some items that happened in the past. Past events that happened during heating are preventing your cooling function from working correctly. Somehow you need to reset the integral sum - or use 2 PIDs, one for heating, one for cooling.
 
The PIDE equation in Allen Bradley does not use a traditional Integral sum. The sum of errors is integrated into the CV. This is known as the Velocity algorithm vs the traditional Positional algorithm.
At each iteration the I contribution is calculated as:
Ki * E * dT
This is added directly to CV(prev) at each scan. In this way it is "integrated" into the CV over time. Notice that the I gain is multiplied by the CURRENT error, not a sum of errors. It may look similar to a traditional usage of the P gain. But in the PIDE algorithm, the P contribution is:
Kp * dE
So only the CHANGE in error is considered here.

This method is good because it makes integral windup impossible, as the CV cannot go beyond user specified limits.

Velocity Equation (PI, Independent Gains)
CV(n) = CV(n-1) + Kp * dE + Ki * E * dT

Positional Equation (PI, Independent Gains)
CV(n) = Kp * E + Ki * dT * Esum

If using SRTP in a healing/cooling application, then you may want to set your CV to the "neutral" value (typically 50%) when switching from heating to cooling. To do this, your code has to move a value into the CVPrev parameter, and set CVSetPrev high. This is similar to resetting the I sum in a traditional PID controller, because it changes the starting point for current and future iterations of the PIDE.

EDIT: The parameters to reset your CV are .CVPrevious .CVSetPrevious I believe. You will need to make sure the CVSetPrevious tag is reset after the next execution of the PIDE.
 
Last edited:

Similar Topics

Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
132
Have a logix controller and I'm using the PIDE block for the autotuner. I've got the hang of doing it for direct control things like pressure...
Replies
21
Views
1,767
Studio 5000 version 34. Have error on PIDE CVFaulted (Status1.2), Control variable (CV) health bad. No more information online or in...
Replies
3
Views
967
Hi everyone, I am trying to add a control loop to my HMI interface however I keep getting the following issue, any idea why this would happen?
Replies
8
Views
1,613
We have a routine that we trigger with a JSR every 10 seconds that has PIDE instructions. This resides in a Periodic task that triggers every...
Replies
6
Views
923
Back
Top Bottom