Learn the basics of PID
Proportional-Integral-Derivative (PID) control is used in more than 99% of the loops for chemical, pharmaceutical, and food and beverage production. PID has proven to be capable of the best load rejection by using the best tuning and the extensive flexibility of functionality offered by the PID structure and options, most notably external-reset feedback. Bohl and McAvoy enlightened us about it in a 1976 landmark paper, āLinear Feedback vs. Time Optimal Control, II. The Regulator Problemā (Industrial & Engineering Chemistry, Process Design and Development, Vol. 15, No. 1, 1976, p. 30-33).
The opening challenge with PID control is recognizing the effect of PID form, structure and tuning units. Going from proportional band in percent to a dimensionless PID gain, and from a reset in repeats per minute to seconds, are recognizable factors to address, but are sometimes overlooked. Less understood is how to convert tuning settings to the ISA Standard Form from the Series (Real) Form in analog control and early DCS systems, and from the Parallel (Independent) Form in the control literature, converting integral and derivative gains to reset and rate times.
Especially noteworthy is that in the Series Form, the derivative time (rate time) could be set as large as the integral time (reset time). Some older tuning methods even suggested this. Interaction between these modes in the time domain by Series Form would inherently prevent oscillations by effectively reducing integral and proportional action thru interaction factors. When using the ISA Standard Form, the rate time has to be setĀ less than one-fourth the reset time to preventĀ oscillations. Many users have made mistakesĀ in system upgrades by not paying attentionĀ to the changes in form and units by the evenĀ the same system supplier.
Literature canāt alwaysĀ be taken literally
The literature is also misleading by nearly always citing a process deadtime, process time constant and process gain when the actual dynamics depend on what's in the automation system (Figure 1). PID tuning needsĀ to use the open-loop gain, open-loop timeĀ constant (primary time constant), secondaryĀ time constant and total loop deadtime. TheĀ open-loop gain is the product of the valve orĀ variable-frequency drive (VFD) gain, processĀ gain and measurement gain. The resultingĀ gain is dimensionless for self-regulatingĀ processes and has units of 1/sec for integratingĀ processes. The open-loop time constantĀ is the largest time constant in the loop, andĀ hopefully in the process to slow down disturbancesĀ on the process input. UnfortunatelyĀ for flow, liquid pressure and surge control,Ā the largest time constant is in the automationĀ system, slowing down the ability to see andĀ correct forĀ disturbances.
Figure 1: For a first-order approximation, the total loop deadtimeĀ Īø0Ā ā ĪøVĀ + ĪøSĀ + ĪøPĀ + Īøm1Ā + Īøm2Ā + ĪøCĀ + Y*ĻVĀ + Y*ĻSĀ + Y*Ļm1Ā + Y*Ļm2Ā + Y*ĻC1Ā + Y*ĻC2. The Y fraction of small lag that is equivalent to deadtime is a logarithmic function of the ratio of the smallest to largest lag (Y=0.28, 0.88 for ratios of 1.0 and 0.01, respectively). KV is the slope of the installed flow characteristic, andĀ Ļ0 is the largest lag in the loop, hopefullyĀ Ļp. For self-regulating processes, K0 = KV * Kd * Km; for near-integrating processes, Ki = KV * (Kp/Ļp) * Km.
The secondary time constant is the second largest time constant in the system, often in either heat transfer surfaces or the automation system. The total loop deadtime is the sum of all the deadtimes and the fraction of all the small time constants creating equivalent deadtime. To better communicate, realize the implications of dynamics, and achieve the best PID, see the Control Talk blog post, āUnderstanding terminology to advance yourself and the automation profession.ā
Another major point of confusion is lack ofĀ recognition that nearly all disturbances are onĀ the process input and not the process output,Ā as is commonly depicted in the control literature.Ā Also, except for flow and liquid pressureĀ control, the response is near-integrating or trueĀ integrating, requiring integrating process tuningĀ rules and an overshoot by PID output of itsĀ final resting value that's the output after completionĀ of the response to a load or setpointĀ change. What's in the literature are self-regulatingĀ processes with a process time constant-to-deadtimeĀ ratio for dynamics that rarely gets belowĀ 0.25 or above 4, leading to Internal ModelĀ Control. While these dynamics are infrequentĀ in chemical plants except for flow loops, they'reĀ applicable to pulp and paper and mining plantsĀ due to a lack of back mixing.
You can convert back and forth betweenĀ self-regulating and integrating process dynamicsĀ by realizing that open-loop, near integratingĀ process gain is simply the open-loop self-regulatingĀ process gain divided by the open-loopĀ time constant (Figure 1).
Integrating process tuning rules are designedĀ to provide the best disturbance rejection.Ā This can be tested by momentarilyĀ putting the PID in manual and making theĀ largest step change in PID output that theĀ operator is comfortable with (e.g., 5-10%).Ā Changes less than 1% typically show a muchĀ slower and possibly no response due to actuatorĀ and positioner sensitivity limit, as wellĀ as valve backlash and stiction.
Feedforward and ratio controlĀ are underused
Nearly all control loops end up manipulatingĀ a flow either directly by cascade control,Ā where a primary process controller manipulatesĀ a secondary controller setpoint, or byĀ directly positioning a control valve. Here,Ā we consider changes in speed as effectivelyĀ causing changes in flow even in sheet lines.Ā Nearly all fast disturbances are changes inĀ flow, and decoupling signals from interactingĀ loops are changes in manipulated flow. TheĀ needed end result is a ratio of the manipulatedĀ flow or speed to a leader flow or speedĀ that is a disturbance from an uncontrolledĀ (wild) flow, a manipulated flow by anotherĀ loop, or a deliberate change in productionĀ rate or composition.
If there's no secondary controller, flowĀ feedforward is used primarily via a feedforwardĀ summer. The most common exampleĀ is steam header letdown pressure control,Ā where feedforward signals from steam usersĀ and suppliers and decoupling signals fromĀ other header letdown valves are summedĀ together in a feedforward summer. Signal characterization is used where there areĀ not flow measurements to convert a percentĀ valve signal to a percent valve flow perĀ installed flow characteristics. For compressorĀ surge and pressure control, feedforwardĀ summers are used for decoupling betweenĀ headers and disturbances from downstreamĀ users, since the controller outputs go directlyĀ to valves and vanes. Secondary flow controllersĀ would be too slow in these cases.
Most process equipment involving liquidsĀ can benefit from secondary flow controllers.Ā Here, ratio control is used to achieve andĀ correct as needed the ratios of flows seenĀ on a process flow diagram (PFD). Many processes,Ā particularly distillation columns, areĀ started up on ratio control. The ratio is correctedĀ by a bias to the secondary controllerĀ setpoint for volumes with some mixing, suchĀ as crystallizers, columns, evaporators, neutralizersĀ and reactors. For sheet lines andĀ extruders, the ratio setpoint is corrected.
Dynamic compensation must be applied to a leader flow before it becomes a feedforward signal or ratio controller input flow. To make sure a change in manipulated flow arrives in the process at the same place at the same time as a change in leader flow, a deadtime and lead/lag (L/L) block is used. If the correction arrives too soon or too late, inverse response and sequel disturbance are created, respectively. Unfortunately, tuning software packages may not identify the deadtime and L/L settings. The block deadtime for dynamic compensation is the deadtime in the disturbance variable path minus the deadtime in the manipulated variable path. The L/L block lead time is the lag time in the manipulated variable path, and the L/L lag time is the lag time in the disturbance path. The lag time should be at least one-fourth the lead time to prevent noise. ModelĀ predictive control (MPC) does this identificationĀ and correction for the user, which, alongĀ with ability to avoid tuning override controllers,Ā are the principal reasons why MPCĀ replaces PID for even a small applicationsĀ where a PID could suffice (e.g., one decoupler,Ā one feedforward and one constraint).
After good load disturbance rejection isĀ achieved, good setpoint response is possibleĀ by using a filter lag equal to the reset time, orĀ a structure with proportional and derivativeĀ action on the process variable and IntegralĀ action on error (PD on PV and I on E). If youĀ want a faster approach to setpoint, you canĀ use a L/L instead of a filter on the setpointĀ with the L/L lag time equal to reset time, andĀ the L/L lead time equal to one fourth the lagĀ time, or a two-degrees-of-freedom (2DOF)Ā structure with the setpoint weights for proportionalĀ and derivative action set equal to 0.5Ā and 0.25, respectively. Most of the literatureĀ concentrates on setpoint response, ignoringĀ load response and advantages of lead/lagĀ and structure options.
Remember external-reset feedback
The other thing most users are not aware of is the incredible capability offered by external-reset feedback (e.g., dynamic reset limit) to:
- Suppress oscillations from a slow secondaryĀ loop, slow control valve or VFD,Ā and deadband and resolution limits.
- Provide directional move suppressionĀ to prevent unnecessary crossings ofĀ split-range points; enable gradual optimizationĀ and fast getaway by a VPC, aĀ fast-opening and slow-closing vent, orĀ recycle valve for surge control; and minimizationĀ of upsets to other loops.
- Achieve deadtime compensation as good as a Smith Predictor or MPC without having to know the open-loop gain or time constant, or needing to provide a special operator interface. Deadtime compensation is achieved by simply inserting a deadtime block in the external-reset feedback path and tuning the PID much more aggressively (e.g., reset time can be decreased by an order of magnitude if deadtime is accurately updated).
Figure 2: All signals are percent-of-scale in the PID algorithm but inputs and outputs are in engineering units. For structures with no P action, gain is zero for the proportional mode. Gain is one for the integral mode, and equal to the PID block gain setting for derivative mode. Bias is used as input to the reset time filter block when there is no integral action. Bias is the PID output when the error is zero, and is filtered by the reset time whose best setting is reduced to be about the deadtime. External-reset feedback (ERF) is, for example, secondary loop process variable (%PVs) or fast valve readback.Ā
Figure 2 shows the only known timeĀ domain block diagram that details the ISAĀ Standard Form with the ability to achieveĀ eight different structures and true external-resetĀ feedback with the positive feedbackĀ implementation of integral action.Ā
Relative gain analysis is a powerful techniqueĀ for accessing the type and degree ofĀ interaction. The relative gain for a given loopĀ is its open-loop steady state gain with theĀ other loops open divided by its open-loopĀ steady state gain with the other loops closed.Ā The given loop is open for the tests with theĀ other loops open and then closed, to showĀ response without and with interaction, respectively.Ā A loop is considered open if theĀ mode is manual or remote output.
For integrating processes, the processĀ variable is translated to a rate of change,Ā so a steady ramp rate gives a steady state.Ā The relative gain is dimensionless, and thusĀ doesn't depend on the engineering units ofĀ the loops involved. The relative gain doesn'tĀ change when a flow ratio rather than a flowĀ is manipulated. Operating point nonlinearitiesĀ will affect the analysis but not changesĀ in time constants and deadtimes. Ideally,Ā pairing of loops should have a relative gainĀ close to one or slightly higher. NegativeĀ relative gains are disastrous. Often, the relativeĀ gain array can be simplified to showĀ the relative gains for the four pairs possibleĀ between two controlled variables and twoĀ manipulated variables (2 x 2).
If you want a comprehensive, conciseĀ view of how to achieve the best PID control,Ā and gain an excellent understanding ofĀ everything else needed for a successful automationĀ project, look for the McGraw-HillĀ handbook Process/Industrial InstrumentsĀ and Controls, Sixth Edition, due out earlyĀ in 2019. The handbook covers the design,Ā installation, calibration, commissioning andĀ maintenance of every part of an automationĀ system, concluding with a list of bestĀ practices for each of its 100 sections.Ā Meanwhile, the sidebar provides bestĀ practices excerpted from the handbookāsĀ PID Basics section.
Gregory K. McMillan, Control columnist and Hall of Fame member, can be reached at [email protected], and P. Hunter Vegas, engineering manager, Wunderlich-Malec Engineering, can be reached at [email protected].