PID Loop windup prevention

You may be fighting the wrong problem.

OK lets forget about 2 PID loops
Let's say I have one level control SP 80 PV 70 OUT 100
How do I prevent the integrator from windup?
Reduce the error to 0. So why can't the error be reduced to 0? If it is because the outflow is more than what the pump can supply then there is nothing you can do!!! The pump will run at 100% just trying to keep up let alone reduce the error. Are you sure the pump is running at 100% when you give it a 100% signal? If so then you got a pump sizing problem.

Most level control system should be easy. If it isn't there is usually a design problem and no matter how the control guy tunes the system it will not put out more than 100%. It is time to start asking the system designers.
 
yes I found this too.
Logix5000 Controllers General
Instructions

Anti-reset Windup And Bumpless Transfer From Manual To Auto
The PID instruction automatically avoids reset windup by preventing the
integral term from accumulating whenever the CV output reaches its
maximum or minimum values, as set by .MAXO and .MINO. The
accumulated integral term remains frozen until the CV output drops below its
maximum limit or rises above its minimum limit. Then normal integral
accumulation automatically resumes.
 
If you handle this in a single instruction that will work. However, if you are truly cascaded this won't help. In your case you don't specifically care that the outer loop is saturated. You need to know if the inner loop is saturated and freeze the outer loop until the inner loop gains control again. Basically the outer loop shouldn't ask the inner loop to do something it can't do.

Like Liam 28 I write my own controllers so I don't know what hooks are available in the AB instructions. If there is a digital in the PID data structure that allows you to freeze the integral you could drive that in the outer loop based on the condition of the innder loop Cv.

Keith
 
nuts and bolts ...

(looks like a LOT of us were all simultaneously thinking and typing the same thing) ...

I'm going to have to go along with my distinguished colleague Keith ... specifically, I'm not sure that your personal definition of "windup" is exactly the same as most of the forum members' ...

more to the point: what makes you think that the Integral is actually "winding up" in your specific application? ...

as shown in the Help window (below) the Allen-Bradley PIDs don't normally suffer from "windup" problems ...

going further:

try monitoring your PID's .DATA[0] location – which is where the Integral accumulates/stores its value ... I think you'll find that the value there will NOT continue to "windup" once it reaches the maximum defined value of the CV ...

I've just GOT to ask: is this a school assignment – or a real-world application? ... we'll be glad to help either way, but it would be much easier on you (and on us) if we knew more about what you're trying to accomplish ...

in GENERAL terms, using PID to control a "level" quite often falls into the "overkill" department ... I'm specifically talking about cases where all you can actually control is the amount of liquid "coming in" to the tank ... by using PID, you're PROBABLY saying: "I want to keep the tank level constant by controlling the amount of INFLOW to the tank to EXACTLY MATCH the amount of OUTFLOW FROM THE TANK ...

but consider this:

if the tank is pretty BIG (and usually it is) - then as the level of the tank rises SLOWLY (and usually it does) - then it's quite common for the amount of INFLOW to become "saturated" or fully ON under PID control ... of course the INFLOW can also be turned completely OFF by the PID - since the level in a BIG tank (usually) falls quite SLOWLY as it's being drained ...

so ...

(again in GENERAL terms) usually we just monitor the level of the tank and turn the INFLOW either fully ON or fully OFF to keep the level between two acceptable (HIGH/LOW) values ... (note that we do NOT need PID control to accomplish the task this way) ...

the biggest exception to this "GENERAL" rule of thumb is in school assignments where "level control" by PID is (for better or for worse) quite a popular laboratory exercise ...

finally ... the more you can tell us about your project, the better advice we can give ... right now we're just doing the best that we can – but we're not quite sure that we're all on the same page ...

I hope this helps ...

windup.JPG
 
Last edited:
I guess that by my user name we all know that i can;t speak english
but Iam trying. THANKS to all for the help

IT is a real life application.
This is what Iam doing
cascade loop
master=level out 0-100
slave flow sp range from level 500gpm min 4000gpm max
my device can only handle flow changes at a certain rate. and also has a min and max flow.
I am taking the output of level and scaling to 0=500 and 100=4000 and making it the setpoint of the flow(slave)
on top of that if the output of the level is to fast,even with small proportional band or slow response tunning. I am ramping it wich is going to make the level PID beleive that the output wasn't big enough and keep increasing.
 
Would it be common to size the pump so small that it can't keep up with the in-flow? A properly designed system should have some 'head room' so the control never needs to go to 100% for any length of time. The error should always be decreasing rapidly to 0.

If you think about it the integrator will 'wind up' to match the flow. It must. I can prove it.
So if the outflow is greater than what the pump can supply the integrator will try to wind up as far as it can. The PID tuning, integrator windup etc is not the problem. The design is.

I just read the last post.
I believed you.
Beginning don't do cascade control.

slave flow sp range from level 500gpm min 4000gpm max
So what are you going to do when the flow demands are greater or less than your min and max. If the designers didn't limit the out-flow to that range then there is a problem with design. You can try stopping the pump with the outflow is less than 500 gpm for a time but how do you expect a pump to keep up with a 4100 gpm outflow? It can't.

The ramp needs to be on the outer loop, not the inner loop but this doesn't help if the set point remains constant and the out flow increases.

So can the pump match the flow requirements? Until you find the answer to this you are wasting time.
 
Last edited:
Actually from this device goes into a tank.
if they empty the tank they will have to wait.
I've been doing it the same way for a while ,but this time some smart guy came to FAT and wrote this on the punch list
"Cascade master should be in track when ramp is active to prevent reset windup"
I have about 10 job out there and no one has complaint of poor performance. this job still on the shop doing FAT now.

thanks again
 
[we're all typing simultaneously I guess..the following comment is still of value although.]
I (and others too) am trying to envision your plant..

You havent said so, but you seem to have a tank with an outflow. And your goal appears to be to deliver a liquid at between 500 to 4000 GPM to somewhere else, as long as the tank level is adequate? If thats the case then you just want a Flow PID with a setpoint from the downstream receiver, and you want to lower the max OUTPUT command limit of the Flow PID if the tank gets too low (because you'll start sucking air maybe?)

With the minimal plant info given, I'd question why you have a PID to PID cascade at all. You must determine what is the goal of the system? Which is worse, bad flow control or bad level control? Is flow control the goal, as long as level is Ok, or is Tank inventory to be absolutley maintained, and the discharge flow a secondary factor?

This could be a simple fix, or it could require some more advanced changes as stated above to setup the PIDs per the actual system parameters.
 
Last edited:
Tank inventory to be absolutley maintained, and the discharge flow a secondary factor is the goal.
the customer will have his own ramp for start up if they don't want start and stop because of tank level low.
deman will ask for more output out of the level PID but they can only have it at X gpm increments after the ramp is completed the supply is more that the demand can ask for (big pumps)and yes my scope of work is only to the tank. because i have not control of how much they take out of the tank I do my own ramp to prevent my device (clarifier)from getting upset, but again they suppose to have a ramp too
 
Even I did not understand my last posting.
Again the goal is to mantaing the level but flow trugh the clarifier can't exceed maximum rate nor maximum flow
 
Here's a type of windup that can happen with cascaded systems: your level loop (primary or outer loop) sends its output as the setpoint to the flow loop (secondary or inner). If the flow loop saturates (maximizes its output), the level loop will 'wind up' if its integral (or reset) component continues then to increase its output (setpoint to the flow loop). This can happen if the pump cannot achieve the desired flow setpoint.

According to the documentation at least, the PIDE instruction can be configured to prevent windup of the primary when the secondary saturates. See P18+ of this link: http://samplecode.rockwellautomation.com/idc/groups/literature/documents/wp/logix-wp008_-en-p.pdf

The basic PID function lacks this configurability for cascaded systems.

Let us know what happens.
 
But that is not a problem for me. the pumps are size properly. Flow will never ask for more because 100% of level PID output is scale not only to the max the clarifier can do but is about 75% of what the pumps can do
 

Similar Topics

I have to program two PID loops where the two loop outputs feed into a low signal selector (LSS) before driving the final control valve. I need a...
Replies
14
Views
5,992
Hello, I am attempting to tune a PID loop on a process. The process involves a valve with electronic actuator that has quite a high deadband...
Replies
10
Views
2,208
We have a PID loop at the plant that measures our drum outlet temp. It adjusts a damper to control the temp within the set point. We have a...
Replies
8
Views
1,437
Hello All, Has anyone on here used Soft PLC brand PLCs? I've just now started doing PLC programming and I am totally stuck on trying to make a PID...
Replies
4
Views
1,559
Hello and thanks for reading my question/problem. I am working on an a application where I have a servo controlled gate that allows product (dry)...
Replies
14
Views
2,778
Back
Top Bottom