February 15, 2010

Exceptional Opportunities in Process Control - Adaptive Level Control

By Greg McMillan

The tuning settings of many level loops aren't in the ball park. The result is persistent oscillations that spread throughout the process.

Level loops frequently manipulate feed flows to process operations. Variability in these feed flows causes variability in the temperature and composition in equipment whose process loops end up chasing continual changes in feed. Often the level loop creates slow rolling oscillations due to the product of level controller gain and reset time being too small. The solution of increasing the controller gain is counter intuitive and is rarely done correctly since the range of controller gains for level loops is exceptionally large and changes with the density of the fluid and the cross sectional area of the vessel.

Level loops make a good educational lab experiment in process control. To see how a DeltaV Insight adaptive controller automatically identified the tuning and compensated for nonlinearities for level control of a conical tank checkout the article "Adaptive Level Control". For more background on the dynamics and tuning of loops for integrating processes, see Appendix A referenced in this article and the September 2, 2009 entry on this website.




April 27, 2009

What Have I Learned? - Cost and Source of Oscillations (Part 2)

By Greg McMillan

The loops with the most severe oscillations listed in order from biggest amplitude to smallest amplitude are pH loops, level loops, flow loops, pressure loops, batch temperature loops, heat exchanger temperature loops, and column temperature loops.

The following is a list of the sources of product quality oscillations in the approximate descending order of frequency of occurrence based on my experience. I have even offered my best guess in parentheses as to the percentage of applications that can be tracked to these root causes for chemical and biochemical products. You may wonder why pH loops didn't make the top of the list since it has the most severe oscillations. The main reason pH loops are down the list is that most pH loops are in waste treatment (WT). Also, the pH loops in reactors and bioreactors tend to have much lower process gains than WT pH loops and some process regulation from reagent consumption. Interacting temperature loops on furnaces, reformers, and reactors are severe problems but are near the bottom of the list for applications for specialty chemicals and biochemical products because multi-zone or profile temperature control are more prevalent in the petroleum, petrochemical, and bulk chemical industries. The following list is for normal operation of loops with good valves and does not consider oscillations that originate from the startup and shutdown and failure of equipment. Next week we will see the implications of "not so good" valves.

(1) Too much reset action in level loops on surge and feed tanks (40%)
(2) Discontinuities at split range point for pH, pressure, and temperature loops (20%)
(3) Interacting pressure and flow loops on headers (10%)
(4) Too much reset action in overhead pressure loops on columns and vessels (10%)
(5) Set point response of batch temperature loops (5%)
(6) Interacting temperature loops for 2 point composition control of columns (5%)
(7) Interacting temperature loops on furnaces and reactors (5%)
(8) Set point response of batch pH loops (5%)




April 7, 2009

What Have I Learned? - Ratio Control (Part 2)

By Greg McMillan

So the question on the minds of automation engineers for process control and even the members of congress for the banks and the economy is how do you fix your model? Will feedback correction be enough? Will the correction arrive too late? How do you deal with a response that is not self-regulating but is integrating or a possibly a runaway?

If you want the bottom line and don't have time for technical jibber-jabber: "The most universal but not well known solution for feedback correction of the flow feedforward model for ratio control uses a Ratio block in tandem with a Bias/Gain block as shown in slide 7 of RatioControl.pdf. The Ratio block operates in the AUTO mode and has its local setpoint adjusted by the operator. The Bias/Gain block runs in the CAS mode and has its CAS setpoint (bias) connected to the output of the process controller used for rapid feedback correction." Of course, you need to checkout and test this solution like any other.

Ratio control is basically a very simple flow feedforward model that involves a simple bias and gain applied to independent flow to compute the dependent flow. On a plot of dependent flow (Y-axis) versus independent flow (X-axis), the gain is the slope and the bias is the intercept. The feedforward multiplier and summer in a process controller for feedback correction of the ratio control would change the slope and bias, respectively. The slope is the ratio factor (delta dependent flow/ delta independent flow).

Nearly all PID blocks have internal feedforward functionality. Some PID blocks have feedforward multipliers besides feedforward summers but the internal structure is fixed and often difficult to understand and maintain. For ratio control, the feedback correction by multiplication or summation is best done outside of the PID block. The use of the Ratio block and Bias/Gain block provide the flexibility and visibility needed through its BKCAL and built-in features and options such as bumpless transfer to the existing ratio. In either case, the independent flow is the IN_1 input and the dependent flow is the IN input to the Ratio (RTO) block as shown in Slide 7 of RatioControl.pdf. The setpoint of the RTO block is the desired flow ratio and the PV is the actual flow ratio.

For a feedback correction by multiplication, the output of the process controller manipulates the ratio factor used in the multiplication of the independent flow. The RTO block is put in the CAS mode and the output of process feedback PID is connected to the CAS_IN of the RTO block. The output of the RTO block becomes the CAS_IN setpoint of the dependent flow loop.

For a feedback correction by summation, the output of the process controller directly manipulates a bias after the multiplication of the independent flow by an operator set ratio factor. The RTO block is put in the AUTO mode and the operator adjusts the local setpoint (SP). The output of the RTO block becomes the input (IN) and the process feedback controller becomes the setpoint (SP) of a Bias/Gain (BG) block. The output of the BG block becomes the CAS_IN setpoint of the dependent flow loop.

A straightforward feedforward explanation can be found on pages 73-83 of the E-book posted on this site on April 3 titled Continuous Control Techniques for Distributed Control Systems. Just ignore the antiquated Figures 5-1a and 5-1b that offered a solution to the missing adjustable filter and time delay blocks back in the early days of the DCS. For more on the nuances of feedforward, check out the May 2008 Control Talk Column "Feeding on Feedforward:" http://www.controlglobal.com/articles/2008/171.html

To visualize and quantify the correction you can use Excel to plot on the Y axis the dependent flow and on the X axis the independent flow for various operating conditions (e.g. compositions and temperatures) so you have a family of lines. If the lines all intercept close to zero, then the slope or ratio factor is mostly changing and a feedforward multiplier would be the apparent choice as shown in Figure 5-2a on page 77 for a ratio of reagent to feed flow. This relationship holds for most blend, composition, pH, % solids, and temperature control systems in continuous (self-regulating) processes. In other words, if the feed flow goes to zero, the reagent, reactant, blend, or coolant flow should go to zero.

On the other hand, if the intercept varies and the slope is relatively constant, then a feedforward summer is the first choice as shown in Figure 5-2b on page 78 for a ratio of feed water flow to steam flow where the blow down flow shifts the operating line.

The steady state process gain for continuous processes is best seen on a plot of the controlled variable (temperature, composition, % solids, blend, and pH) on the Y-axis versus the ratio of manipulated flow (coolant, reactant, dilution, blend, and reagent flow) to the feed flow. These plots can be generated from the first principle equations in the Advanced Application Note 3 posted April 3 on this website or by simulation programs that use first principle equations. The result is a steady state process gain that is inversely proportional to the feed flow. By using a feedforward multiplier, you are effectively multiplying the controller output by the feed flow which cancels out the steady state gain.

So why are feed forward summers mostly used in industrial applications? The short answer is that they work well enough and are easy to implement and understand. You can do an awful lot with a bias correction. The feedback correction of nearly all advanced control tools such as model predictive control, neural network estimators, and partial least squares estimators use a simple bias that is a fraction of the error between the predicted value and the measured value.

There are also good technical reasons to use a summer if you dig deeper. The bias corrects for offset and drift, which is the largest error in most flow measurements. You don't need to nail the ratio factor range for scaling the controller output. You can simply use a + and - % correction to the flow feedforward. In some older versions of the DCS you had to implement a bias of 50% so that we could get a "+ and - 50% correction. If the controller output was 50%, the flow feedforward was perfect. The deviation from 50% was a measure of the flow feedforward error. An integral only valve position controller (VPC) whose setpoint (SP) is 50% and whose process variable (PV) is the feedback controller output can then trim the ratio factor (RTO setpoint). If the VPC IDEADBAND option is employed so you get no integral action if the PV is within 10% of the SP, you get a gradual slope correction only if the fast bias correction is insufficient.

For well mixed vessels and distillation columns, the process time constant is inversely proportional to the feed flow. Since the maximum controller gain for load rejection is proportional to the process time constant divided by the process gain which itself is inversely proportional to flow, the net effect of feed flow on controller gain is cancelled out. The use of a feedforward multiplier now creates a nonlinearity where the controller tuned for low flow will tend to oscillate at a higher flow. This is often aggravated by an equal percentage flow characteristic whose slope (valve gain) is proportional to flow.

If you have an integrating process response, you need an overcorrection to get you back to set point. The correction is most readily visualized as a bias. The easiest to understand example of an integrating response is the level loop where the correct ratio of manipulated discharge flow to the feed flow is one. If the level is too high, keeping the discharge flow equal to the feed flow will not bring the level down. Batch temperature, pH, and composition control tend to have integrating responses. Continuous processes where the process output flow comes from vapor phase tend to have an integrating response in liquid phase. Conductivity (total dissolved solids) control of a boiler drum is an example because the only way to get solids out of the liquid is by blowdown. The ratio of blowdown flow to feedwater flow shifts based on the amount of unbalance in the integrated response. If the total dissolved solids is below the set point, the correct ratio of blowdown to feedwater flow is zero. Similarly, impurity concentration builds up in reactors with a vapor phase product or a significant recycle stream. Here the ratio of purge rate to fresh feed rate shifts due to the integrating response. The overcorrect requirements for a runaway response are even greater because the process is accelerating away from the setpoint. For some reactors, there is a point of no return where the best you can do is to implement the emergency and evacuation procedures. Let's hope that is not the case for the economy. Mars doesn't look terribly inviting and the Martians in the movies have bad attitudes

The main scope of applications where a feedforward multiplier provides a desirable compensation for a nonlinearity is when the feedback controller output goes to a linear installed characteristic or flow controller for blend, composition, % solids, and pH control at the outlet of a static mixer or for temperature control at the outlet of an exchanger because this process equipment has essentially plug flow (with very little backmixing) and hence a negligible process time constant.

This leaves us with the final question, why do oxygen controllers on a boiler stack correct the air flow rather than the ratio of air to fuel flow? Why go to the confusion of a calculated versus a real air flow? The main reason is to actively use the cross limits or lead-lag systems employed in a combustion control system to insure the air flow leads the fuel flow on an increase in firing demand and air lags fuel on a decrease in firing demand.

Regardless of whether a feedforward multiplier or summer is used, the desired ratio before feedback correction and the actual ratio after feedback correction should be displayed, historized, and trended along with the controller output and independent flow.




March 30, 2009

What Have I Learned? - Ratio Control (Part 1)

By Greg McMillan

Ratio control provides coordination of multiple flows. One flow is an "independent flow" that is used to set production rate. Sometimes this flow is also termed a "wild flow" when the availability of this flow is not determined by the production unit. In a ratio control system, the process variable (PV) or set point (SP) of the independent flow (leader) is multiplied by a ratio factor and becomes the set point for the dependent flow (follower). Slide 1 in RatioControl.pdf shows two flow loops in a ratio control system.

If the flow is noisy, the SP of the independent loop may be preferred. Flow transmitter damping or signal filtering can be used to smooth out the noise but this adds a lag that reduces the ability of the flow loop to deal with pressure disturbances and valve issues. If pressure swings and valve response problems are negligible, the slowing down of the independent loop (leader) by the use of a signal filter may be useful in allowing the dependent flow loop (follower) to catch up with changes in production rate. If this is not the case, then the signal filtering is only put on the independent flow PV passed for multiplication by the ratio factor. I favor using whatever means possible to eliminate noise so the ratio control can use the PV rather than the SP of the independent flow loop to reduce the downstream errors from the transient response of this loop.

Regardless of whether the PV or SP of the independent loop is used, the measurement should have good repeatability and rangeability, the control valves should have minimal backlash and sticktion, and the controllers should be tuned so the follower can keep up with the leader to minimize the errors downstream.

Some blend tanks totalize the ingredient flows and use a tank blend controller to correct the input ratio to keep the blend composition in the tank closer to its target. The total in the tank for the independent feed is multiplied by the ratio, which is the set point for the total in the tank for the dependent feed. The actual total of dependent feed is the process variable for a tank blend controller to correct the ratio control system on the tank's input flows. A proportional only controller may be desirable. The totalization of flows can be done on a batch or continuous basis. For a continuous blend tank, the material balance Equation 4-7f (without the reaction rate) in the Advanced Application Note "First Principle Process Gains ...." posted March 25, 2009 on this website is integrated. For this blend system, achieving a particular ratio is the final objective. For most ratio control systems, the target ratio changes with the composition, physical properties, and temperature of the input flows.

When a critical process variable loop is used to provide feedback correction of the target ratio, the independent flow multiplied by the ratio factor is called flow feedforward and the ratio factor may be called a feedforward gain. Some people reserve the term "ratio control" to the case of no feedback correction of the target ratio.

There are many examples of ratio control and its extension to flow feedforward control. A simple example is the inline control system where ingredient flows (main and additive flow) are added to a pipeline mixer as shown in slide 2. Often this pipeline mixer is simply a baffled piece of pipe called a "static mixer". The combined stream coming out of the mixer is at the current ratio set by the inputs to the mixer. Sometimes the real intent is to provide a specific viscosity, density, percent solids, or consistency. In these cases, online measurements of these critical process variables at the exit of the static mixer are used in a loop whose output provides feedback correction of the target ratio.

Another examples of ratio control is catalyst to reactant feed ratio control as shown in slide 3. An enhancement used for this application is a correction for catalyst activity, which is particularly important when the catalyst is recovered and recycled. Property estimators based on batch conditions and completion times biased by at-line or lab analytical measurements are used to provide feedback correction of the target ratio.

Reactors typically use ratio control of reactant feeds. It is desirable to have an online analyzer to provide automatic correction of the target ratio of reactants as shown in slide 4. The independent flow may be the main reactant feed or a recycle reactant feed.

Neutralizers often use flow feedforward where the pH controller corrects the target ratio of reagent to the main flow (e.g. influent flow) when accurate flow measurements with sufficient rangeability are available. For food sweetener production it was found that the mass flow ratio control by the use of coriolis flow meters was tighter than pH control. The pH was then relegated to indication only. This was an extreme case where the feed compositions had tight specs and the set point was on the flat part of the titration curve so that the error in the pH measurement corresponded to a greater error in the ratio than what was achieved with the coriolis flow measurements.

Temperature control of heat exchangers is often improved by flow feedforward where the coolant flow is ratioed to the feed flow and corrected by the temperature loop. Feed forward control of columns has saved millions of dollars in many plants by a straightforward ratio of the reflux or distillate and/or steam flow to the feed flow and correction of the target ratio by a tray temperature control loop.

Combustion control of boilers and furnaces rely on air to fuel ratio control. In some cases, stack or combustion zone oxygen analyzers are used to correct the target ratio for the changes in mixing efficiency and heating values of waste fuels.

Have you ever wondered why so many ratios exist? Is it just convention or is there a fundamental underlying reason? Why do some users prefer feedforward summers over feedforward multipliers for target ratio correction? Why do oxygen controllers provide a correction of a calculated air flow rather than a target ratio? If waiting on the answers is going to keep you awake at night, you can call me at 512-832-3029 and I will tell you an answer that will put you to sleep. Warning from the Automation General: "Calling Greg McMillan while driving a car is hazardous to your health."




September 24, 2007

Feedforward Techniques - Part 4

By Greg McMillan

One of the simplest and easiest techniques to evaluate and implement is set point feed forward. The maximum feedforward gain is the inverse of the process gain. You just need to make sure the process gain is converted to the same units used for the feedforward gain and only a fraction of the maximum is used as the actual feedforward gain to allow for nonlinearities, errors, and PID action. New adaptive controllers such as DeltaV Insight can find and schedule the process gains and hence the set point feedforward.

If the controller gain is large (> 1.0) and the controller structure has proportional action on error, set point feed forward has little value because there is already a sizeable step in controller output from a set point change. However, large dead times can cause low controller gains. Here, set point feedforward can get you to a set point much faster, which can be useful for loop set points driven by batch, cascade, or advanced control.




September 18, 2007

Feedforward Techniques - Part 3

By Greg McMillan

In many of the plants I worked in the production capacity had been increased over the years by a series of debottlenecking projects. Unfortunately the surge tanks volumes were not increased probably because of a lack of understanding of dynamics. Consequently, unit operations upstream and downstream of the surge tank had to be decreased because of high and low levels, respectively. Also, abrupt changes in the surge tank's discharge flow which are unavoidable as these level limits are approached were disruptive to nearly every type of unit operation.

If batch units or continuous units that are going up and down are dumping into a surge tank, you have a tough scenario to achieve both maximum availability of the surge volume and maximum smoothing of the outlet flow by feedback control alone. Notch gain and error squared level controllers can help but are difficult to tune. Also, low controller gains cause slow oscillations from reset action unless the reset time is also increased so that the product of the reset time and controller gain stays above a minimum. The fact that a low PI controller gain for an integrating process, such as level, can cause oscillations is not well recognized. For more details on this source of oscillations see the equation on page 109 of Good Tuning - A Pocket Guide (2nd Edition) and Equation 3-3j on page 81 of New Directions in Bioprocess Modeling and Control published by ISA. These equations are consistent once you consider the maximum integrating process gain is the inverse of the fastest full scale ramp time.

One solution is to add a velocity limited feedforward. For a surge tank level controller that manipulates the tank's discharge flow, the total flow of all units that are dumping into surge tanks is a feedforward signal to set the discharge flow. If the flow engineering units are consistent and there is cascade control of level to discharge flow the feedforward gain is one. The big question is what is the velocity or rate limiting needed to spread the disturbance from batch and on-off operations over the available surge volume.

A material balance and dimensions of the tank can be used to compute the velocity or rate limit on a first principle basis. The attached file shows the calculation and implementation in a graphic representation of a Function Sequence Table (FST). Furthermore, the calculation offers continuous directional adaptation of the velocity or rate limit. The only adjustment is to set a filter time for the feedforward measurement that is equal to the normal time that the feedforward flow could be zero. For a single batch operation upstream, this time would be the batch cycle time plus the normal time between batches. For more info on this technique see Appendix B - Batch to Continuous Transition in Advanced Control Unleashed published by ISA.

BatchToContinuousTransition





September 8, 2007

Feedforward Techniques - Part 2

By Greg McMillan

Maybe I have just been unlucky or maybe the plants I worked in were as stressed as the typical project schedule these days but often for column temperature, boiler level control, and neutralizer pH, feedforward control didn't live up to expectations. The problem was abusive unmeasured disturbances. The feedforward signal is often flow, which doesn't tell the whole story. If there were only flow disturbances, life sure would be simple.

Consider a distillation column with a feedforward of feed flow corrected by a tray temperature controller output that manipulates steam flow. For an increase in feed flow, the feedforward initiates an increase in steam. Seems great but what if the tray temperature is rising because of a change in feed concentration Adding steam adds to the rate of rise of temperature toward a possible product spec limit plus wasting steam.

Consider a boiler drum with a feedforward of steam flow corrected by a drum level controller that manipulates feed water flow. For an increase in steam flow, the feedforward initiates an increase in feed water flow. Technically sound but what if the drop in drum pressure causes a swell from the expansion of bubbles that is headed for the high drum level trip point set to prevent liquid carry over into the steam header. Adding hot feed water adds to rate of rise of level and the possibility of boiler shutdown.

Consider a neutralizer with a feedforward of acid waste flow corrected by a pH controller that manipulates a basic reagent flow. For an increase in waste flow, the feedforward initiates an increase in base flow. Seems smart but what if the pH is rising because of a decrease in acid concentration in the feed. Adding base adds to the rate of rise of pH toward a possible environmental limit plus wasting reagent.

A smart technique would preemptively correct the feedforward signal by subtracting a signal that is the rate of rise of the filtered rate limited controlled variable multiplied by an adjustable factor. Here, the correction for a positive rate of change only occurs when the controlled variable is above the set point plus some noise band. The correction for a negative rate of change only occurs when the controlled variable is below the set point minus some noise band. In each case, the feed forward is corrected to help deal with an unmeasured upset. If the controlled variable is near the set point, the controlled variable is lined out, or the unmeasured upset is driving the controlled variable back to set point, the feedforward correction is zero. The adjustable factor like the feed forward gain can be initialized based on first principles (e.g. material, component, and energy balances). Note that the above scenario is for a reverse controller and a direct feed forward action.

Concentration and temperature measurements of the feed may help make the feedforward signal calculation inherently smarter and reduce the number and size of unmeasured disturbances. But, there can be extenuating circumstances. For example, cold feed water would cause bubbles to collapse and the inverse response that might counteract steam flow induced shrink or swell. Also, a pH feedforward based on a pH measurement of the incoming waste may do more harm than good because the electrode error and failure rate in low or high pH streams is larger and error in reagent demand greater because the titration curve is flatter. Testing is always a must before putting even the best idea online.




Subscribe

Archives

The opinions expressed here are the personal opinions of Greg McMillan and Terry Blevins. Content published here is not read or approved by Emerson before it is posted and does not necessarily represent the views and opinions of Emerson. © 2006-2010 Greg McMillan and Terry Blevins. All rights reserved.