In this GATEKEEPER series, we introduced the Ultimate Gain Plot (Figure 1) and the variables dead time (DT), time constant (TC), and controller gain (Kp). These four aspects along with a basic understanding of the control loop to be tuned, are all that is required to develop preliminary tuning parameters. The examples in this GATEKEEPER demonstrate simple tuning rules. Rules for several types of loops are presented, but as a general rule:
Set Ti = TC and set controller gain, Kp = 0.25 * UG.
As in the first two GATEKEEPERs in the series, an Ideal controller algorithm is assumed.
Tuning an Integrating Loop—Level Control Example
Step 1: Determine the Upper Bound on Gain
The process time constant of a level control loop is roughly the time taken to drain the vessel with the level valve wide open. For most vessels, this will be 30 to 60 seconds or more. The dead time will usually be smaller than that; hence DT/TC <<1. From Figure 1, it can be observed that there is effectively no upper limit to the gain in this loop.
A very high gain will cause the level valve to respond aggressively to any error and will keep the level
very close to the set point. This will overwork the valve and result in valve wear failures.
Step 2: Determine the Lower Bound on Gain
The next obvious question is “how low can the gain be set?”. The answer — to avoid a high level or low level trip, the level control valve should be fully closed at the low level alarm point and generally (unless the valve is oversized), fully open at the high level alarm point. This should occur without depending on the integral or derivative terms.
For example, suppose that:
- Set Point (SP) = Normal Liquid Level (NLL) = 50% (0.5)
- Level Alarm High (LAH) = 70% (0.7)
- Level Alarm Low (LAL) = 25% (.25)
- Valve is 50% open at steady state (Controller Output (Posss) = 0.5)
The minimum gain for this loop is 2.5. If the gain is smaller than that, the system may trip on high level with the valve less than fully open.
Step 3: Determine the Integral Time (Ti)
A loop with only gain will feature some proportional offset as shown in Figure 2. The integral action is used to draw the level back to the set point.
In the gain-only case shown in Figure 2, the loop responds to a large flow decrease and reaches a new steady state value in about 75 seconds. The new level is about 0.3 feet less than the previous level. A Ti of 75 seconds will bring the level back to the set point in about 300 seconds (4*75) as shown in Figure 3a. In order for the level to reach the set point faster, a lower Ti, such as 40 sec, should be selected (refer to Figure 3b). Equations for determining Ti for a slow and a fast response are shown below.
Slow Response: Ti = 4 / (Kp * PG) Fast Response: Ti = 2 / (Kp * PG)
Tuning a Self-Regulating Loop – Pressure Control Example
Step 1: Determine the Process Gain (PG)
Consider a loop controlling pressure in a vessel. If the valve is opened a little without changing the inlet gas flow to the vessel, the pressure will decrease to a new steady state. That new steady state pressure is the pressure required to move the same amount of gas through a larger valve Cv. PG is the change in vessel pressure (in % of span) divided by the change in valve position (in %).
PG = ∆PV% / ∆PD%
For example, assume that for a gas flow rate of 20.2 MMSCFD:
- Pressure at separator (Psep) = 600 psig,
- Pressure at separator outlet (Pout) = 500 psig,
- Linear Valve with max Cv = 160
At operating conditions, a Cv = 80 yeilds Pos = 50% open. Opening valve to 55% yields a Cv of 88. At that Cv, a pressure of 587 psig is required to flow 20.2 MMSCFD. If transmitter range is 0 to 1000 psig, then:
- ∆PV% = (600-587)/1000*100 = 1.3 %
- PG = ∆PV% / ∆PD% = 1.3/5 = 0.26
Step 2: Determine the Process Time Constant (TC)
This can be done relatively easily with a spreadsheet taking a slice of time on each row and tracking the pressure change over time. Results from such a spreadsheet are shown in Figure 4. From this figure we see the TC graphically estimated at 62% of the steady state pressure change.
Without using a spreadsheet, some relatively simple calculations will yield a reasonable estimate of TC. Suppose that the vessel is 6 feet in diameter, 20 feet in length, and half full of liquid. This yields a volume of about 280 ft3. Assuming Ideal Gas (close enough for our purposes here):
- At 600 psig the vessel will contain about 11,430 scf of gas (280 ft3 * 600/14.7).
- At 592 psig the vessel will contain about 11,275 scf (280* 592/14.7). Hence, the vessel will lose 155 scf between T = 0 and T = TC.
Determining the rate of mass loss via valve flow calculation yields:
- At T = 0, Flow = 22.2 MMSCFD (flow through 88 Cv valve at 600 psig inlet)
- At T = TC, Flow = 21.0 MMSCFD (flow through 88 Cv valve at 592 psig inlet)
Since the inlet flow is 20.2 MMSCFD throughout, the average mass loss from the system is 1.4 MMSCFD.
TC = 155 SCF / 1.4 MMSCFD = 10 sec
Step 3: Set Gain = ¼ of the Ultimate Gain (UG)
The dead time in this loop will be small; limited to the dead time of the valve and control system. Assuming a dead time of 2 seconds, then:
- DT/TC = 2/10 = 0.2.
- Use UG = 8 (from Figure 1)
- Kp = 8* PG = 8*0.26 = 2.1
Step 4: Set Ti = TC
Tuning a Temperature Control Loop (Self-Regulating)
Dead time includes residence time in the exchanger. Lags include temperature measurement instrument lag, metal thermal mass & process fluid thermal mass. Lags are typically larger than dead time, but that may not be the case at low flow rates.
- Assuming dead time = time constant (DT/TC = 1) yields UG = 2.
- Set the gain at 25% of the UG; Kp < 0.5*PG.
- Set Ti = time constant or 60 to 120 seconds.
Caution: Use these rules for sensible heat transfer exchangers only. Exchangers with a change of phase may be horribly non-linear and difficult to tune.
Tuning a Flow Control Loop (Self-Regulating)
In a flow loop, the dynamics are mainly in the valve. Assume dead time is approximately twice the time constant (DT/TC = 2). This yields UG/PG = 2. Set Ti = 5 to 10 seconds.