Allen-Bradley SLC500 PID Block Freezing?!?

J

Thread Starter

J

Just curious if anyone has experienced a PID block in a SLC 5/05 freezing. The scenario that this happened to me was when I "calculated" a process variable (basically an average of all sensors) and when the PID was not required (placed in manual) I would clear this temporary calculation. Before putting it back in auto, all in one scan a new average would be calculated, the block placed in auto, and then finally the PID block was scanned at the bottom of the ladder. For the first 5-7 minutes, the PID output would freeze at zero (0%) even as the scaled error continued to grow. After this delay the PID block would work fine as it is expected to. After much headache I discovered that if I didn't clear this temporary average when the PID block was offline the PID block would respond right away no problem. Basically what I have summized is that AB PID blocks do not like a huge change in scaled error that can be attributed to either a drastic/instant change in PV or possible setpoint as well. Even though I put the block in and out of auto using the bit in the control word this still occured. I understood that if it was in manual it shouldn't matter what you do. Anyway any thoughts or insight into this? Anyone else experienced this?

Thanks,

J
 
B

Bill Clemons

"Basically what I have summized is that AB PID blocks do not like a huge change in scaled error that can be attributed to either a drastic/instant change in PV or possible setpoint as well."

In more general terms, this problem occurs when using derivative action and when the derivative source is error. Some equipment types allow the user to disable the derivative gain when a set point change is made (to prevent overshoot due to sensitive derivative action) or optionally, source the derivative action to the process variable and not the error. We are just getting under way with SLC 5/05 installs. You might take a look at their on-line manuals or give them a call.
 
Without seeing the PID and the variables I'll take a couple of guesses. First, make sure you clear the Integral term when going into MANUAL mode. This will clear the integral value and possibly the windup. Also, the process of going from MANUAL to AUTO produces a bumpless transfer. This sets the PID to not generate an instantaneous change in the output variable. Instead, it will integrate (rather slowly) to the desired position. If you didn't place into manual, making drastic changes to either the process variable or setpoint would drive the output based on the proportional and derivitive gains. First, you don't have to clear the process variable. Set the p-gain to zero. If you set the p-gain and i-gain to zero (i'll presume you are not using the d-gain), the output will go to zero. After you reset the process variable, set the PID to Auto. Wait a scan or two then reset the p-gain and i-gain to their original values. I'll bet the PID snaps.
let me know if this works for you or if you have any other problem

Bob Wolff
 
R

Ron Beaufort

Greetings, J,

You made the assumption that: "... AB PID blocks do not like a huge change in scaled error that can be attributed to either a drastic/instant change in PV or possible setpoint as well." This is not quite correct. The "frozen PID" effect that you witnessed when you put the PID back into automatic mode was not caused by the sudden change in the PV. Actually it resulted from the fact that you had forced the PV to an artificial zero value while the PID was in manual mode. You’ve already figured out the solution to your problem. Specifically, just don't clear the PV while the PID is in the manual mode. From your post it looks like you’re still wondering "WHY?" ... so here is a quick attempt at an explanation. Note that this is a simplified version based on certain assumptions as to how you have your PID set up.

The basic idea is that (contrary to popular belief) the PID does not simply "go to sleep" while it is in the manual mode. Instead it is still actively making certain mathematical calculations... it just does not send the results of any of those calculations out to the CV. The main reason for performing these calculations has to do with "bumpless transfer". A full discussion of that topic is beyond the scope of this post.

The "manual mode" calculation that we’re most interested in for this discussion is the stored value of the Integral term. In simple language, even while the PID is in the manual mode, it continues to update the amount of Integral action which is currently stored in its internal registers. You can monitor this value yourself by looking at words 17 and 18 of the PID's control block. (Example: if your PID control block is located at N10:0, then the Integral term is stored in words N10:17 and N10:18). Word 17 contains the Most Significant Word of the value. To preserve your sanity, I'd recommend that you simply ignore word 18 (the Least Significant Word) since it has a weird format and it only amounts to pocket change which won't affect the outcome of this discussion.

I can't go into too much detail here since I don't know exactly how you have configured your PID... but the basic idea is that even while you’re in the manual mode, the PID continuously calculates and stores an Integral term into words 17 and 18 of its control block. Think of this as something like a "bankroll" which the PID will be able to use as soon as it is switched back to the automatic mode. This "bankroll" allows the PID to get up and running again with little or no delay once the system is switched from manual back to automatic. It can also be used to prevent a sudden bump to the output when switching modes. But in your case... you were clearing the PV to zero while in the manual mode... and that presents a problem. Simply stated, forcing the PV to zero can cause the PID to calculate and store a NEGATIVE balance in its Integral term "bankroll". OOPS!

Now when we finally crank in a valid PV... and switch back to the automatic mode, the PID must work to overcome this "in-the-hole" negative balance before it can finally start to increase its CV output to the field device. If all you look at is the CV, then it can certainly appear that the PID instruction "freezes" for awhile. Actually the PID is not "frozen" at all. It just can't start increasing its CV until it finally works off that negative value stored in the Integral term. You can actually see this process happening during your "frozen" periods. Just monitor the value of the Integral term which will be steadily increasing in word 17... even though the CV remains unchanged.

Summing up: All of this might (or might not) be interesting from a theoretical viewpoint... but the simple fact remains: you should not clear the PV while the PID is in the manual mode. You've already figured that out for yourself... but since you asked about the underlying reasons, I've tried to answer your question.

Disclaimer to one and all: Please keep in mind that this was intended to answer one specific question. It is certainly not intended to cover all of the ways that the PID instruction could possibly be configured.

I hope this helps.

Best regards,
Ron
 
Thanks guys for your reply. Your posts do make sense to me. I am going to make myself more aware of the "background" calculations that the PID block is doing. I made an incorrect assumption that the Auto/Manual bit turns the PID block off. I do utilize it for a bumpless transfer though but now I have a better unterstanding about what it truly does.

Thanks!!

J
 
Top