RSLogix 5000 PIDE Temperature Control with Adaptive Gains

ChemEng

Member
Join Date
Nov 2010
Location
PA
Posts
5
We are in the process of updating the temperature controls on a jacketed vessel using RSLogix 5000 and the PIDE Function. The heating system uses split range control. The cooling is approximately 5 times faster than heating for the jacket so the system is set up to use adaptive gains; for example Pgain heating = 5 and Pgain cooling =1. The jacket controller output is 0 to 100%, with 0% being full cooling and 100% being full heating. 50% is not heating or cooling and the cross over point where the Gains are switched out (for the adaptive Gains system).The issue I am having: When the jacket controller crosses over the 50% output, the first calculation that is made to change the output uses the last set of gains that were in the controller. Let's say we are at 50°C and the controller output is at 50%. If we increase the set-point to 60°C, the jacket temp will gradually rise to 60°C, and overshoot it slightly as expected. The issue is that when it over shoots it, the controller still has the heating gains in the controller. The calculation that changes the output to below 50% is still using the Heating Gains. Since the Heating Gains are used the change in output (to below 50%) significantly overshoots the set-point by calling for excessive cooling. Since the Pgain and Igain for cooling are so small, it takes a significant amount of time for the controller output to adjust and once again call for heating. This constant “fighting” doesn’t allow the system to stabilize.I have confirmed the system is responding as I have described by placing the system into simulation and trying various scenarios. If I set Pgain heating = Pgain cooling with Igain heating and Igain cooling equal to 0 (not using D since the jacket is an integrating system, Dgain = 0), then as I adjust the actual temp to the set-point, over shoot, and recover to the setpoint; the system returns to 50% output as expected. However if I set Pgain heating = 5 and Pgain cooling = 1, the system uses the last constants in the controller to change the output when it crosses over 50%. This results is the controller calling for heating (or cooling) when the actual temp is equal to the set-point after crossing over the 50% output a few times. Any help would be appreciated.
 
Two early morning simple solutions that may help, if I've understood your problem correctly:

Divide the control into two separate PIDE blocks and use the crossover point to determine which loop is actually in operation.

Or

Disable your loop when crossover is reached, dump your gain values, and then reenable the loop after the dump is complete. This solution I'm not sure will actually provide the best benefit to what you are describing, so I think the former is best.
 
Russ:
Thanks for your suggestions.
First off I should state that I am not the programmer, just the end user. So if I make a ridiculous assumption or use the incorrect terminology, please let me know.
I had considered two PIDE blocks operating in parallel, but there is no way to insure that they will both cross over the 50% mark at the same times. Since they will each have different gains, they will react differently to the process. When the PIDE for heating crosses over 50%, the PIDE for cooling could be at 55% or 45% (or some other value based in the process up to that point).
Perhaps I could do something so that when the output of the heating PIDE drops below 50%, it places the cooling PIDE into auto; with the output set to 50% and the same set-point. And at the same time put the Heating PIDE into manual. When the output for the cooling PIDE goes above 50%, it will place the Heating PIDE into auto and the Cooling into manual. However this seems a little cumbersome. Especially since the AB documentation provides examples of the “adaptive gains” scenario for switching out the gain values in the PIDE block.
 
The solution is simple. I would NOT have two PID gains just one BUT I would do this.
IF CO < 50 THEN CO= 50-(CO-50)/5
Now when CO=40% then it gets changed to 48%
However I bet you have two outputs so
Code:
IF CO>=50 THEN
     CO_HOT=CO-50;
     CO_COLD=0;
ELSE
     CO_HOT=0;
     CO_COLD=(50-CO)/5;
END_IF
I do this all the time in hyrdaulic control where the system gain while extending is higher than the gain while retracting.
 
Peter:
Thanks for your suggestion.
The PIDE output calculation uses both Pgain and Igain constants (at least for temperature control of an integrating proicess). Both the Pgain and Igain for heating and cooling are different, and not simply 5x greater, unfortunately. So the PIDE Output for heating is not just 5X the Output for cooling. I may have oversimplified the example in my post as it get complicated real quick to include the effects of Igain as they are effected by changes in time
 
How often is the instructions being updated? Even if the gains are wrong they should only be wrong for one instruction update. As long is the instruction is updated "very quickly" relative to the valve response you shouldn't have a problem.

Keith
 
Keith:
Thanks for the suggestion.
The instruction updates every second. However the output from the PIDE is based on the previous output plus a change based on the change in error since the last calculation (AB refers to this as the velocity form algorithm). So the calculation that takes the result below 50% and triggers the switching out the gains is based on the Heating Gains. This may be only one “erroneous” instruction; however it has significant consequences since the PIDE output is accumulative. This is further impacted by the fact that the Pgain and Igain for cooling are so small that it takes an excessive time for them to overcome the erroneous “first” value on the cooling side. When it does finally overcome the issue and returns to 50% (no heating or cooling), the Iterative portion of the calculation, which is based on the error over a change in time, has gotten so large (in order to overcome the initial error) that the process overshoots in the heating direction, and the whole process starts again.
 
Chemeng: My picture is not the exact solution for your problem, but try to use this approach but change the selection at the output and pid parameters so that when co > 50 use upper PIDE and when co < 50 use lower PIDE.

kurita.jpg
 
When heating or cooling only the plant gain is changing but not the plant time constant so controller gain needs to change, not the controller time constants. The thermal mass will be the same whether heating or cooling so the time constant of the system should be the same. This means the controllers integrator time constant will be the same. The integrator gain should be expressed as a time constant because then it won't change where as it you use an integrator gain, Ki then you do need to change Ki on-the-fly.

The answer is simple. Use the ISA PID
CO[n]= Kc*(Error[n]+SUM(ERROR,0,n)*Δt/τi+(τd/Δt)*(Error[n]-(Error[n-1]);
This way only the gain on the output must be changed.

I am a motion control guy. I use integrator gains instead of time constants because it makes sense. In your case it makes sense to use the ISA PID because it is the right tool.

Ki=Kc/τi
Kc is the controller gain
Ki is the integrator gain
τi is the integator time constant.
Now you can see that if τi is to remain the same then Ki will need to change as Kc does. It is simpler to use use τi.
 
Widelto:
I like your approach. It definitely has me thinking. One thing I am missing, which CO value do I use to switch between the Heating and Cooling PIDE output. My concern is that they won’t cross the 50% mark at the same time. Since they will both be using the same CVprevious, they should be relatively close in value. However since the gains are so different, the CO from each will cross the 50% mark at different times. Let’s say the CVprevious is 51%, the next calculation from PIDE Heating may take it to less than 50%, but the output from PID Cooling will be 50.8% (still above 50%). If I use the CO from the PIDE Heating to make the change, I will be calling for heating since the output from PIDE Cooling is still above 50%. If I use the CO from PIDE Cooling to decide when to make the change, I will be excessively cooling the reactor until CO PIDE Cooling goes below 50%.
If I use a GRT (greater than instruction) to hold the minimum output of the PIDE Heating to 50% and a LES (less than instruction) to hold the maximum output of the PIDE Cooling to 50%; then I can base the decision on the PIDE Cooling output. As it will change at a lower rate it won’t create the step in output that basing it on the PIDE Heating output would create. Also during the cross over, CV previous for both blocks will be set to 50% so their will be a smooth transition.
Please let me know if you see any flaws in my logic.
And thanks, I really appreciate the help.
Peter:
Thanks once again for the suggestion. Sorry, but I was not able to describe the issue clear enough. Whether I need to switch out one or two constants isn’t the issue, it is the timing of when they are changed. When to change is based on the output of an equation. However if that result triggers the change, then a different set of gains should have been used in that step to produce the correct output. You don’t know which set of gains to use until you make the calculation, but you can’t change the gains until you have the result of the calculation. Widelto’s suggestion to make the calculations in parallel and choose the one you need, seems to resolve the issue.
Thanks
 
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
147
Hello im using PIDE in rslogix 5000 - mode is DEPENDENT. im using it to control the temperature, via burners. im having some problems with...
Replies
10
Views
5,128
While troubleshooting control issues due to windup, it would be helpful to be able to view the error term due specifically to the error term in...
Replies
5
Views
1,898
Hi all, Having some issues setting up a PIDE Cascade control loop. Have been trying to go through the Wp008 doc but there's probably something...
Replies
9
Views
5,703
I have an application that I was wondering if these function blocks could help me out. I work at a hydro-dam (less than 4 MWatts), and we control...
Replies
5
Views
2,614
Back
Top Bottom