PID loop tuning

@Ones_Zeros: what is the highest CV you have seen in stable (i.e. not startup) operation? If it's less than 70%, then clamp the PID CV output to 10% or so above that value, and make sure the PID implements some form of anti-windup on the reset (integral term).

E.g. if the maximum stable value is 40%, clamp the PID CV output to 45%. This may require scaling the controller gain, depending on the PID implementation.
 
Sorry guys been tied up. I'll try to answer all the feedback questions.

- CV - sliding stem valve
- Body Style = Globe
- PLC - AB 1769-L30ER (Studio 5000)
- PV = Pressure Transmitter (At startup the pressure can be ~700+ psi
- PID SP = 515


Attached are some screen shots of the PID setup. I feel my PID settings are low and don't understand why the valve is slamming open and close.

At startup the valve travel will over shoot the SP by sometimes by 50-60 psi
Once the pressure gets down to the SP the PID does seem to control the valve better and not move in large increments.

I appreciate you guys patience with me as I'm no PID expert but trying my best to learn this.


thanks again

Tuning.JPG Configuration.JPG
 
Are you sure the PID is only executing every 0.1s? Can you post the code that triggers the PID, perhaps it is in a 100ms STI task? Or something like what is at the top of page 699 near this link?

We don't know your process. Can you

  • put it in manual,
  • let the process come to steady state,
  • trend the PV and the CV,
  • change the CV by a few percent,
  • keep the trend going until it reaches steady state again,
  • and finally post the trend results here, with units on the PV, CV, and time axes?
 
I have my “P” and “I” settings low and my question is for a fast loop like this should the P & I settings be higher?

Based on the limited description of controlled PV behavior so far I would say one or both may actually need to be lower. Also, if the valve stem moves slowly, there may also be a need for Derivative action, but I would think that unlikely.

"Low" is a relative term in this context: since we know nothing about the process, we, and I suspect OP, do not know what the definition of "low" tuning parameters would for this particular combination of process (volume), control valve size, and downstream pressure*.

drbitboy, DMD

* Since

  • Control Action configuration is direct, i.e. Error = [PV - SP],
  • So an increase in PV (pressure), from one PID update to the next, will increase the Error,
    • AND that increase in Error will tend to increase CV (CV High and Low Limits are 100 and 0, respectively),
      • AND I assume an increase in CV will open the valve,
        • Which should act to counter the increase in pressure,
  • THEREFORE, for this process, the valve is relieving pressure by controlling flow to a lower, i.e. downstream, pressure sink
    • Presumably there is another, uncontrolled, inlet flow to the volume where the PV pressure is being measured.
 
Sidebar

Summary

Tell us about the doggone process; we already know how a PID works.

Details


Sidebar to @Ones_Zeros: we are almost two dozen posts into this thread, and I am pretty sure you have gotten nothing useful out of it, although @KenM's dry wit early on is almost certainly the qualitative answer.

The reason for this is that the seminal query is little different from "How long is a piece of string?"

For comparison, please look at the thread at this link, which had tuning suggestions withing an hour in the second response; that is directly correlated to the information provided in the original post. Think about it, please: more information is better than a paucity of information.

- drbitboy, DMD (I think it's about time for one of @PeterN's favorite images to be posted here ;))
 
- drbitboy, DMD (I think it's about time for one of @PeterN's favorite images to be posted here ;))
Done.
pt1.jpg
A problem I have with too many threads like this is that the OP does not answer questions.


A trend showing the SP, PV, and CV is always helpful.
Has this system ever worked or is it new?
 
How fast does the valve move? Or how long does it take the valve stem to move from closed to open, and vice versa?

What is the valve position when it reaches steady state control e.g. SP ~ PV and steady?
 
Non-linearity is the problem, and that in the flow equation contributes, but a bigger effect, and the primary reason the system is resistant to tuning, is the non-linearity in the CV to Cv relationship i.e. the valve characteristic.

Where

  • CV = PID output signal e.g 0-100%
  • Cv = valve flow coefficient; this is what should be in @PeterN's flow equations
I called the valve flow coefficient Kv instead of CV. See the first equation I posted above. That is the Kv as a function of CV and if the valve is linear then Kv is a constant and the control output is scaled from -1 to 1 in my example. Kv could be scaled to be in terms of percent CV.



What are the units of Kv or your Cv? This will keep you scratching your head. The sqrt(ΔP) makes the units for Kv interesting.
 
What are the units of Kv or your Cv? This will keep you scratching your head. ...

Why?

[quantity]**1 [time]**-1 PSID**-0.5

If we go back to Navier-Stokes, or Bernoulli it's simplification, the quantity and/or time units can go under the square root with the composite unit PSID and I think the square root disappears.
 
Last edited:
The wrong way to tune a PID loop ...

I ginned up a quick&dirty™ model from what could be inferred from OP's paucity of posts. Here it is with the original tuning constants:
4.0_2.0.png
Well whutdya know, the CV hits 100% 'nall.

OP said the control was not unreasonable once PV got near SP, so if I infer from that that Kp=4 is also not unreasonable (whatever that means ;)), even though it interacts with Ki of course, Ki is probably too high, so reduce it by an order of magnitude:
4.0_0.2.png
Still a bit of overshoot, which may or may not be acceptable, so drop Ki by another factor of two:
4.0_0.1.png
By guess and by gosh, bringing my own teeth now.

That sound your hear is @someone's eyes rolling :whistle:, if not spinning.

The real solution is to apply a proper tuning method, but there are plenty of those out there (click here) and OP does not need this forum to find them.
 

Similar Topics

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,166
Hi all, splitting out from this thread because it's a somewhat different question to the original. I have to migrate some code from a Micrologix...
Replies
17
Views
4,074
Long time listener, first time caller. I have a Micro850 PLC controlling the temperature in seven fermentation vessels at a local brewery. Each...
Replies
2
Views
2,588
I am using PID instruction in RS Logix 5000 with independent equation. I am confused about its tuning. Please somebody explain under listed...
Replies
1
Views
4,924
Hi all, I'm working on this small batching project and this is my first time when i have to develop PID loop tuning screen on my HMI. I was just...
Replies
0
Views
1,691
Back
Top Bottom