« February 2007 | Main | April 2007 »

March 2007 Archives

March 5, 2007

The Good, the Bad, and the Ugly

by Greg McMillan

Most of the literature makes valve nonlinearity seem bad or just plain ugly. However, if you take into account process dynamics and valve stick-slip, you might actually consider valve nonlinearity as good in some applications. So before we continue on to a discussion of the implications of mixing on tuning next week, let's consider the role played by the valve.

If we consult the last page of Advanced Application Note 4, we see the controller gain is proportional to the process time constant and inversely proportional to the open loop gain and dead time for maximum disturbance rejection. If we further consider that this same note shows that the open loop gain is the product of the valve gain, process gain, and measurement gain, we have the principles to be more intelligent in our valve trim choices and gain scheduling. Most people call the “open loop gain” a "process gain" even though it depends upon the valve flow characteristic and measurement scale besides the process.

The equal percentage trim has an inherent flow characteristic whose valve gain (curve slope) is proportional to flow. A lot has been published on how bad this is for controller tuning. For flow loops, this is true, but for temperature and composition (including pH) control in pipelines, static mixers, and heat exchangers (plug flow), this valve gain helps cancel out the process gain that is inversely proportional to flow. If you further consider the dead time is inversely proportional to flow, this valve nonlinearity is good.

How about well mixed vessels? Well the valve nonlinearity does the same thing so far as canceling the effect of flow on the process gain. However, since the residence time becomes a time constant rather than a dead time for a back mixed volume as discussed last week, the numerator for the controller gain is inversely proportional to flow so the benefit of canceling it out of the denominator is not such a good deal. Now the dead time from mixing is set by the turnover time and is only a weak function of feed flow. If there is a pipeline or dip tube with a significant transportation delay or poor mixing, then we are back to the case of the dead time being inversely proportional to flow. So for vessels, an equal percentage characteristic may be good or bad from a controller gain view point. There are other considerations that make this trim choice the right choice.

While a linear trim supposedly has the greatest rangeability based on best conformity of the flow coefficient to a designated curve, if you consider the effect of stick-slip which is greatest near the seat, the equal percentage trim has the best turndown (smallest controllable flow), which is more important to me than conformity of the trim characteristic. If you also consider that this trim can deal with the diminishing valve pressure drop caused by higher piping system pressure drops at higher flows and can thus prevent the installed characteristic from flattening out at large lifts, you have clues as to why an equal percentage trim is so popular.

In my book, quick opening trim is mostly ugly because the valve gain is so high near the seat it accentuates stick-slip and the process gain nonlinearity for temperature and composition control. This trim also hastens the premature flattening of the installed characteristic from a diminishing valve drop. However, for liquid pressure control, the process gain is proportional to flow so you can make a case a quick open trim is good for this loop. In fact pressure regulators tend to have this characteristic. Also, for anti-surge control and pressure relief, quick opening trim is used to establish a vent flow as quickly as possible.

Finally, I have to admit quick opening trim can help flush solids out of the seat. However, I would rather preprogram some kicker action in the DCS configuration to provide this burst so I can have a good flow characteristic to work with. I can also switch to pulse duration control for small controller outputs to prevent small flow areas that would plug.

Technorati Tags: | | | |

March 16, 2007

Back to the Future of Tuning

by Greg McMillan

New adaptive controllers are coming soon to your control room to individually schedule the tuning as a function of any variable. So given all the choices, what process variable generally works best taking into account what we have recently learned about mixing and process dynamics?

The short answer is controller output for continuous processes and level for batch processes. Of course this is just a best guess and doesn't replace the need to test any variable or calculation used to set controller tuning.

If you are curious as to how I arrived at the above conclusions, read on.

Let’s consider first the flow loop. Nothing complicated here, we just need to remember that the controller gain is inversely proportional to the product of the valve gain, process gain, and measurement gain for a control loop. The valve gain is generally nonlinear since it is the slope of the installed characteristic of the valve. For flow, the process gain is one (how lucky can one be). Just like for other loops, the measurement gain is simply 100% divided by the scale span of the PID. So the only nonlinearity in a flow loop (barring a missing square root extractor for a head meter) is the valve. A good choice for the controller gain would be to schedule it as a function of controller output (position on the installed characteristic of the valve). The reset time is set equal to the largest time constant in the loop. For liquid flow, the process time constant is only 50 to 100 milliseconds, which is generally smaller than the effective time constant associated with the valve, measurement or DCS. Thus, the reset time depends upon on the slowest part of the automation system. If a signal filter in the DCS becomes the largest time constant in the loop, the reset time is approximately the filter time setting. For aggressively tuned flow loops or big valves, it is a good idea to enable the Dynamic Reset Limit and use the read back of actual valve position as the external reset to prevent the PID reset action from outrunning the speed of the valve.

Let’s further consider that we put this flow loop to good use as a secondary controller for cascade control where the primary loop is level, temperature, or concentration. A secondary flow loop removes the control valve nonlinearity from the primary loop and makes the primary loop ready, willing, and able to use flow feedforward (e.g. a flow ratio corrected by the output of the primary loop).

Finally, let's focus on volumes with different types of mixing. The two major types are inline (e.g. pipeline) volumes that have only some radial mixing from bafflis or pipe fittings and vessel (tank) volumes that have axial mixing as the result of an agitator, eductor, and/or sparger. The inline systems have a uniform composition and temperature in a cross section but not along the length of the pipeline. The process dead time is much larger than the process time constant. These inline volumes provide little to no smoothing with respect to time and are called “plug flow.” Well mixed vessel volumes have a uniform composition and temperature throughout the vessel volume. The process dead time is much smaller than the process time constant. These vessel volumes provide maximum smoothing with respect to time and are called “back mixed.” For batch operations, these “back mixed” volumes have an integrating response. The following figures show the self-regulating response for “plug flow” and “back mixed” volumes for continuous processes and the integrating response for batch operations.

Mixing Effect on Open Loop Responses

For plug flow volumes, the residence time (volume/flow) becomes a process dead time making the dead time inversely proportional to flow. The process gain is also inversely proportional to flow. As a result, the primary controller gain for composition control is proportional to flow and flow squared, if the Lambda is set equal to a factor of the integral time and dead time, respectively. Since most applications set Lambda equal to multiple of the integral time, controller output would be a good choice again for gain scheduling. Examples of plug flow systems are pipelines, static mixers, desuperheaters, sheet lines, web lines, extruders, and sheet lines. The process dead time is larger than the process time constant in these primary composition loops. Like the secondary flow loop, the integral time depends upon the valve, measurement, or filter time lag.

One word of caution, these primary loops may not be much faster than the flow loop, so the primary loop may have to be tuned to be slower than expected to avoid violating the cascade rule (primary loop should be at least 4 times slower than the secondary loop). Using gain scheduling in the flow loop helps makes make the flow loop faster, which reduces the need to make the primary loop slower.

For back mixed volumes, the residence time (volume/flow) almost entirely becomes a process time constant for composition control. If the primary loop’s integral time is set to be a factor of the time constant, it is then inversely proportional to flow. This assumes the injection delay associated with the dip tube or pipeline feed is small (not a good assumption for small additive or reagent flows). The process gain is also inversely proportional to flow. The process dead time is the turn over time and is relatively fixed for a constant agitator speed. Good gosh, controller output is again a good choice for scheduling tuning settings. Examples of back mixed volumes are agitated reactors and fermentors (except mammalian cell). Most agitated blend tanks, crystallizers, and evaporators behave more like a stirred reactor than a pipeline. The dynamics can be approximated by splitting the total volume into a small plug flow volume combined with a large back mixed volume.

For pH, I would use signal characterization to translate the controlled variable from pH to reagent demand based on the titration curve. This makes it just a reagent concentration loop whose process gain like other composition loops is inversely proportional to flow, which means I can again schedule the controller gain as a function of controller output.

Hmm, I wonder what the default variable will be for scheduling controller tuning for these self-regulating loops. Could it be controller output?

Composition loops of large back mixed volumes and batches have a “near” and true integrating response, respectively. The process gain is inversely proportional to liquid volume. For liquid temperature, the change in heat transfer surface area covered by liquid may cancel this effect out. For gas pressure, the process gain increases as the liquid level decreases. So for integrating loops, the variable for scheduling tuning is often level.

Technorati Tags: | | | |

March 21, 2007

World Batch Forum PAT Webcast

by Greg McMillan

I just completed today a World Batch Forum (WBF) Webcast on Process Analytical Technology (PAT). The Webcast was fun and I can see where it opens up a whole new avenue of education even though the technology is not quite as far along as I expected. The Webcast went well thanks to the help of Deb Franke and Ed Guinn at Emerson Process Management and Mike McEnery (committee chairman for the WBF Webcast & Education Committee). I would encourage anyone doing this for the first time to do a pretest and trial run with the same equipment and in the same room used for the Webcast with two PCs and the help of audio and Web people. One PC is in the normal view to see the Q&A pane and provide faster navigation between slides. The other PC is in the full screen presentation mode. It is also important to realize that custom animation is not yet consistently feasible for a webcast due to variations in internet connection speeds and there are compatibility issues between Internet Explorer 7.0 and "Live Meeting."

This WBF PAT Webcast was based on the book New Directions in Bioprocess Modeling and Control. You can check out a review of the book by Control magazine editor Walt Boyes in his March 13 blog http://waltboyes.livejournal.com/207809.html

The following questions and answers may be instructive:

What are some examples of “near” and true integrators for batch operation?

The classic true integrator is level where the rate of liquid mass accumulation in a batch (level ramp rate) is proportional to the feed rates.

Gas pressure in the head space is a “near” integrator when the change in drop across the vent valve from a change in head space pressure is small compared to the normal pressure drop. Also, since the process constant is much larger than the process dead time, the open loop response looks like a ramp in the control region. If the drop across the vent valve becomes critical, the gas pressure becomes a true integrator because a change in pressure does not cause a change in vent flow.

For liquid temperature and composition, there is no discharge flow during the part of the batch of interest. Consequently, there is a loss of self-regulation inherent in continuous processes. For a change in temperature, there is change in temperature drop across the heat transfer surfaces (e.g. jacket), but this is small compared to the normal drop. Like the gas pressure loop, the process constant is much larger than the process dead time for the temperature loop. Finally, the magnitude besides the relative size of the process time constant is very large making any steady state beyond the time frame of interest.

For pH and substrate control, as the reagent or substrate is consumed (e.g. ammonia and glucose), the response is a “near” integrator from its large process time constant although the nonlinearity of the titration curve may cause the response to accelerate or decelerate for increases and decreases in pH, respectively.

Normally there is a peak in the plot of biomass growth rate or product formation rate versus pH, substrate, or temperature. Deviations from the optimum operating conditions can alter the metabolic rates enough to change the reagent demand and cause a delayed and very slow secondary effect in the same or opposite direction of the initial change.

How much wireless communication delay can I have before I see degradation in fermenter control?

Let’s assume there are no aliasing or jitter issues communication delay so we can focus on the effect of an increase in lop dead time on loop performance.

Dead time dominant loops do not have as much leeway as loops where the process time constant is greater than the dead time but a communication delay that is less than 20% of the existing dead time is normally within the variation already seen from the many sources dead time so this is a reasonable rule of thumb. This allowable additional dead time is quite small for secondary flow and speed loops and depends heavily upon the module execution time and final element resolution.

For “near’ or true integrators you can introduce an interval up to 50% of the existing dead time for a controller that has a Lambda factor of one (Lambda equal to the process time constant). This permissible additional delay is quite large for the slow primary fermenter loops.

When should a batch MPC for production rate optimization be turned on?

The MPC should be turned on when the concentration and rate of change of the concentration becomes significant. In the example given, the MPC was turned at about the peak in the product formation rate so the set point track PV feature could capture the best rate for the batch and try to hold it until the end point was reached. There could be a separate MPC to first maximize biomass growth and then to maximize product formation rate.

What are some other examples of MPC used for bioreactors?

Amgen at the 2004 Emerson Exchange and Rutgers in the Control magazine August 2004 issue showed the use of MPC for pH and DO. In this blog site we discussed the setup of an MPC to eliminate split ranged controller outputs and the associated limit cycling around the split range point. The MPC is documented in the Advanced Application Note 002 titled “MPC Implementation Methods for the Optimization of the Responses of Control Valves available on http://www.easydeltav.com/ControlInsights/

How can I get enough batch data for batch analytics?

Best bet is to run bench top trials that have an industrial DCS and data historian with automated lab entry. Match up the virtual plant to these profiles and then use the virtual plant to generate more data.

How can I predict batch end points?

You could run a virtual plant faster than real time out to completion of the batch. If you have MPC helping to maintain the slope of the batch profile, after the peak in the product formation rate you can multiply the slope by the remaining batch time and add it to the product concentration from the last sample. You can keep updating this prediction after each lab sample. If the slope is variable, you could do the prediction piece wise based on a reference profile. If none of this is possible, you could simply bias the predicted batch profile by the difference between it and the current profile much like the simple feedback correction of the future process trajectory for MPC. A prediction is generally not viable until the concentration and rate of change of the concentration are both significant.

Technorati Tags: | | | | | |

March 26, 2007

Linear in a Nonlinear World – Part II

by Greg McMillan

In my December 18 blog “Linear in a Nonlinear World” we discussed the use of signal characterization to compensate for the installed characteristic of the control valve where the valve gain depends upon the operating point on the control valve characteristic. In part II we are looking at the use of signal characterization to compensate for a nonlinear process gain by translation of the original nonlinear process variable to a new linear one to enable adaptive controllers to better focus on other nonlinearities such as feed flow. Here in part II the process gain depends upon the operating point of the process variable. Examples of this translation to a new controlled variable are:

(1) Conductivity to % acid, base, or salt concentration
(2) Column top temperature to % reflux demand
(3) pH to % reagent demand

For conductivity, there is a peak in a plot of conductivity versus the acid, base, or salt concentration. The new process variable scale must be on one side or other of the peak. There is uncertainty in the exact location of the peak. If the operating point were to cross the peak, the process gain would go to zero and then change sign, which is disastrous to a control loop. The operating point must steer well clear of the peak.

For all of these examples, concentrations of other components in the feed can shift or change the shape of the curve but often the translation is better than no compensation at all for the process nonlinearity. For conductivity and pH, the effect of process temperature based on lab samples should be part of the calculation. For temperature, the effect of column pressure should be included (e.g. shift in boiling point with pressure).

The implementation involves first plotting the original versus the new process variable. For the examples noted this would be conductivity versus ion concentration for various temperatures, column temperature versus % reflux to feed ratio for various pressures, and pH versus % reagent to feed ratio for various temperatures. Since you are getting the X axis from the Y axis (the opposite of what is being done by the process), the data points for signal characterization are entered as Y,X pairs with a nonlinear bias to Y from a fit to the shift in the family of curves. Since the Fieldbus signal characterizer allows variable space of data points, closer points are used in the area of greatest curvature near the set point. This translation must be done for both the set point and the process variable. The original and new set points and process variables must be displayed and historized.

The benefits are most noticeable in pH loops because of their extreme sensitivity nonlinearity, and rangeability where changes in process gain of 100:1 and of reagent demand of 1000:1 are routine. Signal characterization has been shown to make dramatic reductions in startup time by the loop’s recognition that the acid or base reagent flow is really decades away from set point. It also prevents pH from zipping right through the neutral point (e.g. 7 pH) and banging between the flat portions of the titration curve, offering a settling time where there was none. The characterization restores the process time constant by slowing down the excursion rate and helps a continuous pH loop look more self-regulating by removing the acceleration from movement to steeper slopes on the titration curve. Thus, you see and realize the benefit from an investment in a well mixed vessel where the residence time is a process time constant that slows down concentration disturbances as discussed in blogs from the past few weeks.

There are some issues besides inaccurate curves and confusion in the operator interface. If your set point is always on a flat portion of the curve and the control system can keep the operating point close to the set point for the largest disturbance, the benefit from linearization is minimal. Additionally, if an excursion to the steep portion of the curve represents an extremely undesirable situation for equipment or environmental protection, then the elimination of the overreaction of the loop by removal of the acceleration through linearization may be the wrong thing to do even though it reduces overshoot and wasted reagent when returning the pH to its set point.

While you increase the dead time from valve dead band and resolution limits when the set point is on the steep part of the curve because you are slowing down the rate of change of the process variable and the overreaction of the controller output, this normally is much less important then the suppression of oscillations. The increase in dead band for operating points on the steep portions of the valve characteristic can be a concern for control valves because there is usually no stability issue from the much less severe nonlinearity of a valve.

These and other considerations and an application for pH control are shown in the attached file on “Linear Reagent Demand Control” which is an excerpt from my ISA pH Web Seminar at 2:00 EDT on May 16.

Linear Reagent Demand Control

I conclude with a top ten list that will appear in a future “Control Talk” column.

Top Ten Reasons Not to Use Linear Reagent Demand Control

(10) How do you know it is a pH loop if it is not oscillating
(9) You can better see if the pH sensor is still alive
(8) You can better tell if the operator is still alive
(7) You like bang-bang control
(6) Gives you chance to try out the manual mode
(5) The titration curve from the lab shows a straight line through the set point
(4) You like seeing the full effect of valve stick-slip
(3) Retuning loops is job security
(2) You can eat more doughnuts while waiting for a loop to startup and settle out
(1) Linear loops are for wimps

Technorati Tags: | | | | | |

Subscribe

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-2008 Greg McMillan and Terry Blevins. All rights reserved.