Problems with PID loops

Daba, one question:

You mentioned using slaving the fruit addition PID loop to the main loop. My understanding is that the a percent of the master loop PV is set to the slave CV. If I did this how do I specify the percent of the master loop PV? What would I set the CV for the slave loop?
 
One question regarding the behavior of the PID instruction. What happens when the input (XIO instruction) goes low? do the registers that contain the calculated error clear? Does the PID instruction retain any of information from the previous execution. This input goes high and executes the PID instruction several times a minute for riughly 15-20 secs, and then goes low. Also, could I use the .SWM bit for the move instructions that force the CV to 100% to backcalculate the error?

The PID instruction itself should not be disabled by making the rung false. Doing so effectively "freezes" the values held in the instruction tag. When you make the instruction execute again, it believes it was last executed 250mS previously, and any changes in the feedback that have occurred in the extended interval will be wrongly calculated upon. This leads to instability, and the need to "de-tune" the PID to give the appearance of some degree of control.

Yes, you use the .SWM control to turn the PID on/off.

plc.ucd said:
There are motor drives are PowerFlex 40s and the accel/decel parameters are set at 5 secs (registers P039 and P040) for both the main and the addition. It looks like I can bring them down to 0.1 secs, but doesn't that risk damaging the drives as the are rapidly accelerating / decelerating without any ramping? These parameters were configured a long time ago by a different control engineer.

You won't damage the drives, the motors, or the pumps, accelerating/decelerating them at the maximum the drives will allow. This is akin to having a DOL starter on a pump/motor. The time taken for the motor to spin up to synchronous speed will be predominantly determined by the inertial loading.

You want the drives to respond as quickly as possible to the PID output, otherwise the PID has to have very low proportional gain to prevent PV overshoot, thus taking a long time to achieve SP. Some people compensate for this by adding high Derivatives, but this is like pulling the reins on a bolting horse, at the same time as digging your spurs into it.

Another analogy that I've used before is that the PID is like a tow-truck, and you want the trailer to move at the same speed. Anything you have in your system that doesn't allow the trailer to run at the same speed as the tow-truck will make the system harder to control. Having accle/decel ramps in your drives is like the tow-line being made of elastic. By the time the trailer has got up to speed, the elastic will have stretched to it's limits, and then of course it will want to contract, thus pulling the trailer faster than the tow-truck.
 
Last edited:
In these cases I would just turn on the heating until the PV is close (depends on inertia), then enable PID control. I would not need to mess with PID terms for the initial "warm-up".
That would have been nice, if allowed by the contract. However the customer (US Army Chemical Command) specified that the temperature for this rocket-motor decommissioning furnace "must rise in a controlled manner from ambient to 1800 over a 4-hour period". How would you have done that?
 
Daba, one question:

You mentioned using slaving the fruit addition PID loop to the main loop. My understanding is that the a percent of the master loop PV is set to the slave CV. If I did this how do I specify the percent of the master loop PV? What would I set the CV for the slave loop?

The formula you gave earlier uses the Master PIDs SP, multiplied by the ratio required. Just replace the master SP with the master PV.

Are you getting your terms mixed up? Surely the calculated ratio of the Master.SP (or PV if you go wtth it) is written to the Slave.SP, not the CV (Control Variable). The Slave PID instruction sets the CV, to drive the pump at a speed that reduces the error SP-PV to zero.
 
That would have been nice, if allowed by the contract. However the customer (US Army Chemical Command) specified that the temperature for this rocket-motor decommissioning furnace "must rise in a controlled manner from ambient to 1800 over a 4-hour period". How would you have done that?

Yes, I missed the "4-hour warm-up". I was thinking of a furnace that needed to get up to temperature rapidly, then control accurately at setpoint.

Anyway, your furnace, I would ramp the SP over the warm-up time.
 
What kind of pumps are these? If one or both are positive displacement (PD) pumps you may not need a P-I-D loop at all. Simple ratio control of a PD pump based on the flow rate of the otehr pump should do the job.
 
I did think about PD pumps, Tom, but would still put a PID and a flowmeter and close the loop.

Any problem with the pump would not be spotted, you'll be just running it at a theoretical speed vs. pump output forever, and have no idea what it was actually pumping.

Anyway, in this case, the OP has the pumps, the flowmeters, and the PIDs, so all we are trying to esatblish is the best method of control for his appliation.
 
Neither the Integral accumulation, nor the Derivative memories are user-accessible. And there is no way to restart a loop "from where it left off". Switching away from "Auto" will clear the internal accumulators. Every start is a new one.

Daba,

In the RSL5k PID ladder instruction, the Integral sum is indeed accessible. If the control tag is "PID_Control", then the I Sum is located at "PID_Control.DATA[0]". See page 508 of the Contrologix general instructions manual, Publication 1756-RM003L-EN-P.
This parameter is neither write nor read-protected, which allows for clearing or back-calculating the Isum on Bumpless Transfers or gain-scheduling applications.
In fact the .DATA array of the PID control tag holds several historical values of the PID calculations which a programmer could use to perform various tasks.

Just wanted to put that out there.

Cheers,
Dustin
 
Daba,

In the RSL5k PID ladder instruction, the Integral sum is indeed accessible. If the control tag is "PID_Control", then the I Sum is located at "PID_Control.DATA[0]". See page 508 of the Contrologix general instructions manual, Publication 1756-RM003L-EN-P.
This parameter is neither write nor read-protected, which allows for clearing or back-calculating the Isum on Bumpless Transfers or gain-scheduling applications.
In fact the .DATA array of the PID control tag holds several historical values of the PID calculations which a programmer could use to perform various tasks.

Just wanted to put that out there.

Cheers,
Dustin

I stand corrected - but how much use this data is i'm not so sure. My guess is not much - since in over 30 years of process control I've never had the need to, or seen anybody else's code that even retrieved, let alone acted upon, that data.

Take a step backwards - imagine the PID wasn't in the PLC, but was a standalone instrument, eg a Eurotherm or similar. This data would definitely not be accessible, yet we managed to make blending line flow loops work very well, just by having "correct" PID terms. We never had to reset integral or derivative accumulators, that was taken care of by Auto/Manual or Enable/Disable switching. It simply didn't come into the equation to look at any "history" - we just had loops that were tuned to the process - and they worked.
 
We just had loops that were tuned to the process - and they worked.
They worked pretty good, but I ran into many cases where the I & D histories caused problems. True, you could limp along by tuning, but it sometimes was not a very satisfactory solution.
This parameter is neither write nor read-protected, which allows for clearing or back-calculating the Isum on Bumpless Transfers or gain-scheduling applications.
Dustin, that is good news indeed. Rockwell does listen to customers (sometimes). I doubt if they would have included this access to the PID parameters if there were not considerable customer demands for it.
 
go back to sparky66 post #3. Do what he has said! No derviative, low gain, lots of integral.

As already stated - it is wrong to suggest PID tuning parameters without seeing the process first-hand. Even with a trend (already requested), it would be near impossible to give good recommendations for PID terms.

Yours and Sparky66's posts are not much help "low gain" - how low is "low" ? : "lots of integral" - how much is "lots" ?

Successful PID tuning isn't always about the theory, you cannot tune a loop you can't see working, no matter how much experience you have.

For a very difficult PID control application (a cascade loop - super-fine control needed), our client requested final tuning of the PID controller by the manufacturer. They sent a man who spent many hours just watching the process, making notes as he observed the process. Day 2 he punched in the parameters he'd calculated back at the hotel, then spent another couple of hours watching the process again. He made a couple of minor adjustments, but not many. That control loop was one of the very, very, best I have ever witnessed, and the guy deserves a mention:geek: Sadly I forget his name, he worked for Eurotherm.
 
They worked pretty good, but I ran into many cases where the I & D histories caused problems. True, you could limp along by tuning, but it sometimes was not a very satisfactory solution.
Dustin, that is good news indeed. Rockwell does listen to customers (sometimes). I doubt if they would have included this access to the PID parameters if there were not considerable customer demands for it.

What if you dont have access to the "histories" what you gonna do then ?
 
They worked pretty good, but I ran into many cases where the I & D histories caused problems.
And how did you overcome those issues when the PID controller was NOT in the PLC ?

True, you could limp along by tuning, but it sometimes was not a very satisfactory solution.
If correct tuning is "Limping Along", then you will have to redefine "3-term control".

Dustin, that is good news indeed. Rockwell does listen to customers (sometimes). I doubt if they would have included this access to the PID parameters if there were not considerable customer demands for it.

I don't think the access to the parameters was designed. It's simply an array in the PID tag that is (possibly) used in the calculations. Yeah, you can use the values if you want, but must make the point that successful control, pre-PLC-PID, did happen, lots of times. We didn't get to see this "history" or anything like it - we had P, I, and D terms fed to, or stored in, a standalone controller.

The PLC is not totally predominant in the industrial control world - there a many successful processes controlled with simple stand-alone PID controllers
 

Similar Topics

All- I was hoping you could shed some light on the PID instruction. I have done a lot of research but I still have some gaps in my...
Replies
1
Views
2,277
hi i have an program to control motor valve with temperature and pid and the problem is if the setpoint is 12 then it dosent start control...
Replies
6
Views
2,147
I am working on a drive system where I'm using a PID closed loop to control the speed of a drive (AB PF40). I developed my own PID block but am...
Replies
18
Views
7,072
Hey guys, I have no real experience with PLCs or PID control, but I was given a project that involves both and don't know anyone who can help me...
Replies
1
Views
8,819
Hi, Im new in with this equipment and i need to made run this drive, i need to control one pump with this drive. i made all the installation and...
Replies
6
Views
3,620
Back
Top Bottom