Why Tuning Tests are Not Repeatable Tips

This post, Why Tuning Tests are Not Repeatable Tips, by Greg McMillan first appeared in the Control Talk blog on ControlGlobal.com.

Each process test will typically give a different result in the process dynamics identified and consequential tuning settings calculated. Here we look at the sources of this lack of repeatability, the implications, and what can be done to improve tuning tests.

Valve deadband from backlash and resolution from stiction will reduce the actual step change in valve position for a given step change in PID output. This will lead to the identification of a smaller than actual valve gain and the calculation of a larger than desirable PID gain. The effect is not repeatable because the valve dead band and resolution vary with stroke and time and the effect depends upon the last response. The effect of deadband is not seen until the direction is reversed. The degree of the effect of resolution depends upon whether the step is an exact multiple of the resolution limit and whether the valve position just changed (slip) or is stationary (stick).

Most valve installed characteristics are nonlinear and change as system resistances and static head change. The valve gain (one of the factors of the open loop gain) is the change in flow divided by the change in valve position. Thus, the gain is the slope of the line connecting the two points on the valve characteristic curve. Only for small changes in the signal is the slope of this line the slope of curve. However, we do not want the change in signal to be small for many reasons. Consequently, the slope of the line will change with step size even if the starting point is the same unless the installed flow characteristic is linear.

The process gain (other major factor of the open gain) is nonlinear for most composition, pH, and temperature loops. The process gain for all of these loops is fundamentally inversely proportional to the production rate. The other part of the process gain is best found on a plot of composition, pH, and temperature versus the ratio of the manipulated flow to the feed flow. Just as with the valve, the nonlinearity of the curve seen depends upon the size of the change in manipulated flow. The process gain is the slope of the line connecting the starting point and end point of a step test and is only the slope of the process curve for small changes in manipulated flow. The slope of a temperature curve for distillation depends upon tray and operating conditions besides ratio. The slope of the pH curve (titration curve) depends upon feed and reagent concentrations besides ratio.

The sensor time constant of thermowells and electrodes depends upon the velocity, coatings, process conditions, and the direction and size of the process change. pH electrodes are the most sensitive of the sensors to these changes besides the age and condition of the glass surface. Measurement time constants become the secondary time constant or dead time in liquid volumes. For gas plug flow volumes where feeds are manipulated for temperature or composition control, the measurement time constant may become the primary time constant since the process time constant is so small. This is confusing to say the least because a larger sensor time constant leads to more aggressive tuning and a smoother looking process trend as extensively discussed in the 12/2/2014 blog Measurement Attenuation and Deception Tips.

Valves have a second order velocity limited exponential response that depends upon the stroking time and dynamics and tuning of the positioner. The apparent size of the valve time constant will depend upon the size and direction of the change in signal.

The process time constant is generally inversely proportional to production rate for well mixed volumes. The process time constant also changes with the direction of the change. Decreases in temperature are generally slower than increases in temperature due to the smaller temperature difference acting as the driving force especially for ambient cooling. Decreases in vessel pressure are generally slower than increases in pressure due to smaller pressure drop for a vent flow especially vessel pressures close to atmospheric. Decreases in reactant concentration are slower than increases in reactant concentration where reaction rates are relatively slow. Decreases in substrate concentration (e.g. glucose) are much slower than increases due to the incredibly slow cell growth rates and slow product formation rates in bioreactors.

The process dead time is generally inversely proportional to production rate but is also affected by transportation delays. The injection delay of small reagents flows in dip tubes is horrendously large and variable due to the dip tube transportation delay. Poor mixing patterns and short circuiting of manipulated flows to discharge flows causes erratic measurement dead time in vessels and measurement noise.

The measurement dead time due to discontinuous signals depends upon when the disturbance or output change arrived in the discontinuous signal processing time interval. On the average, the disturbance arrives in the middle of the time interval. Consequently the dead time from digital and wireless devices is ½ the update time (e.g. default update rate) assuming negligible latency. Changes larger than the threshold sensitivity (e.g., trigger level) can cause an earlier update. The average dead time from analyzers is the sample transportation delay plus 1 ½ the analyzer cycle time assuming the analyzer result is available at the end of the analysis cycle time.

There are many sources of noise. Most are associated with the changes in the axial and radial concentration, temperature, and velocity as determined by sensor type, location and installation. The minimum straight length requirement for differential head meters and vortex meters often does not take into account the actual piping system details that necessitate longer lengths. Sensors inserted in a pipeline (e.g., thermowells, electrodes, and insertion flow meters) do not take into account the radial profile and the changes due to less than ideal mixing.

The more traditionally recognized source of noise is electromagnetic interference (EMI). Variable frequency drives (VFD) were the source of many EMI problems when less expensive drives and installations were used and strict practices on the type of VFD cables and the isolation from signal cables were not followed. Poor shielding and grounding practices will lead to many EMI problems.

Disturbances are a big source of changes in the test result. If there were no disturbances, you would not need feedback control. The only thing for certain is the process conditions on the Process Flow Diagram (PFD) are not the conditions in the plant at any given time. The test time should be made as short as possible to reduce the probability of an occurrence of a disruptive disturbance. This is particularly important for distillation columns that may take one or more shifts to reach a steady state.

The tuning test time can be minimized by using a large step size and using a tuning test and method that looks at the dead time and ramp rate of an excursion in the right direction for processes that take a long time to reach a steady state or do not have a steady state in a reasonable time frame (e.g., near-integrating and true integrating processes).

Don’t get discouraged. Simply get realistic. Do not expect results to be repeatable to more than 2 significant figures even in the best scenarios. Use best practices to deal with the consequences of test variations. Four or more tuning tests should be done at each setpoint and plant production rate. Day and night tests are advisable if ambient conditions or shift operations make a difference. The tests should use steps in both direction. The step size should be large enough to make the effect of measurement noise band, valve dead band and valve resolution negligible and to reduce the test time. The operator should not be making feed changes when the tests are being done. Maintenance work should not be in progress. Process engineers should not be asking for setpoint changes. A quiet time (mostly likely a weekend) is best when the control room is not crowded. The step change should be made in the PID output rather than the PID setpoint so that the effects of PID structure and setpoint lead-lags used to improve setpoint response do not obscure the identification of the process dynamics. This can be done by injecting a step change by software automatically adding an increment or decrement or momentarily putting the PID in remote output or manual mode. The test results with the maximum open loop gain, minimum primary time constant, maximum secondary time constant, and maximum dead time should be used. This rule can be moderated to the degree that the maximums and minimums are physically not possible to be coincident and nonlinearities are compensated by signal characterization, adaptive control, and scheduling of tuning.

Of course, tuning should not be a cover up. If a test is not repeatable due to poor equipment, piping, or automation system design and installation, the problem should be fixed not only for better tuning but for greater knowledge and control of the process. After all, we want our processes to be as repeatable as possible.