What Have I Learned? To Lag or Not to Lag?

The idea of a lag in the control loop just sounds bad but are lags always bad news? The popular consensus is yes. Could a lag could be your best friend despite its bad rep?

I was instructed in a graduate class on distillation column modeling and control decades ago that the big problem with columns is the big process lag. This didn’t sit well with me but I didn’t stand up and object. I concluded there seems to be a lag in the understanding of lags.

If the lag is a process time constant in the input path of the disturbance into the process, it is actually beneficial. This process time constant slows down the effect of a disturbance and gives a chance for controller to catch up. The controller gain for the ultimate performance of most tuning methods is proportional to the ratio of the largest time constant to the total loop deadtime as seen in Appendix C of New Directions in Bioprocess Modeling and Control. BioprocessModelingControlBookAppendixC

Furthermore, the peak error from a disturbance for this tuning is inversely proportional to this ratio of time constant to total loop deadtime as shown in Equation 2-40 in Chapter 2 of Advanced Control Unleashed. This ratio is about 5:1 for distillation column temperature due to interactive process lags. In other words, you can anticipate a 5:1 reduction in error by closed loop control for a step disturbance. For well mixed crystallizers, evaporators, and reactors this ratio could be 50:1 or more. This leads to permissible controller gains much larger than we are accustomed to using.

Often there is a similar type of process lag on the path of the manipulated flow into the process used for correction of the disturbance. When reflux rate is adjusted directly or indirectly to compensate for a feed disturbance and the temperature used for control is about half way between the feed tray and the top of the column, the process lags could be about the same. If the tray for temperature control is closer to the feed tray, the feed upset would be seen before the correction can arrive, not a good deal.

For continuous composition and temperature control of well mixed volumes, the process lag is approximately the residence time (volume/flow). This process lag is in the path of both the disturbance and the manipulated flows and temperatures. The process delay (process deadtime) is usually quite small relative to the process lag except for neutralizers where small reagent flows cause incredibly large injection delays.

When the process lag also exists in the path of the manipulated variable, it is important to use a high controller gain to overdrive the controller output so the loop can catch up to the disturbance.

Large process lags from large process volumes smooth out oscillatory disturbances from poor control or limit cycles and are the principal reason why we don’t see as much variability in storage tanks as we might expect. Equation 3-4 in Chapter 3 of Advanced Control Unleashed can be used to predict this attenuation of oscillations by process volumes.

If there is a final element lag (e.g. slow valve or positioner) or there are volumes in the path of the manipulated flow that don’t exist in the path of the disturbance, then the controller can’t react to a disturbance fast enough. If there is a measurement lag due to a sensor lag (e.g. thermowell lag) or DCS filter (e.g. AI or PID PV filter time), then the controller can’t see the disturbance fast enough. What is hideous and not well recognized is that the time constant in the tuning equations is for the largest time constant in the loop and doesn’t matter where it is located in the loop. If the largest time constant is in the measurement, the user is seeing an attenuated version of the real process variable. An increase in the measurement lag allows the user to increase the controller gain. The oscillation amplitude may also look smaller due to filtering. The key indicator is an increase in the oscillation period. Not all measurement lags are bad. A small judiciously set PV filter to keep measurement noise from causing fluctuations in the controller output greater than the valve resolution can prevent self-inflicted disturbances from reaction to noise.

While control textbooks show step disturbances, most process disturbances have a process lag because they are the result of control loop reset action and valve throttling and are smoothed by intervening volumes. The worse case disturbance is a manual action by an operator, a discrete action by a batch sequence or interlock, and an on-off flow from level switches or an overly aggressive level controller that directly feeds into an important unit operation. The best bet is to slow down the disturbance, and then use a properly tuned PID and MPC and add feedforward control.

Lags slow down the set point response and make tuning a test of patience. However, if you tune the controller with a gain close to the maximum permitted by the use of small Lambda factors or simplified internal model control tuning per Appendix C, the closed loop time constant can be made much less than the process time constant by overdriving the output past its resting point. This is only true if the PID structure chosen has proportional action on error so the loop kicks the output from the set point change. If the setpoint change is large enough to saturate the loop output, you don’t see the full boost in the response from the higher controller gain. If rapid changes in controller output upset the operator or another loop, set point velocity limits or filters can be employed but these limits or filters should not be used on the secondary loop of a cascade control system.

To summarize; a lag in the disturbance path on the input to the process should be maximized and lags anywhere else should be minimized for disturbance rejection. If the largest lag in the loop is much larger than the total loop dead time, the Lambda factor should be set less than one to give higher controller gains for a faster response. Tuning tests take a long time for long process lags and people get frustrated but if the higher controller gains that are permitted are used, the results can be great.