# Using feedforward control to deal with disturbances

March 16, 2023
If a disturbance is measurable, then its measured value can be used in feedforward control to prevent the disturbance from upsetting the process.

If a disturbance is measurable, then its measured value can be used in feedforward control to prevent the disturbance from upsetting the process.

Feedback (PID, etc.) is like reactive maintenance. After you see the problem, start fixing it. By contrast, feedforward is like predictive maintenance. When you anticipate there will be a problem in the future, take action to prevent the problem from happening so it does not happen.

The “D” action in PID is anticipatory, but not in the feedforward or predictive sense. It leads the actuating error to anticipate what the error might become soon. This is not feedforward. PID looks at the actuating error, the deviation from set point, which is the process response to a disturbance. The evidence of a disturbance is not seen until after it starts to be expressed by the process. Even with “D” action, feedback does not respond until after the disturbance begins to show its effect on the process. Feedback looks at the process response, the present consequence of the past disturbance.

By contrast, feedforward looks at the disturbance variable, the cause of the future process deviation, not the actuating error. Feedforward acts before the actuating error would indicate action is needed.

An example by analogy

As a human example: It was chilly in the morning, so he wore a jacket. A while after the sun came up, he started sweating and took off the jacket. That was feedback. The corrective action (removing the jacket) came after the problem (sweating, too high of a body temperature) was sensed.

On the other hand, seeing the sun rising and knowing what would eventually happen, take off the jacket just prior to being uncomfortable. It is feedforward action is taken before the actuating error indicates it is needed.

Feedforward model coefficients

There are four coefficients in feedforward control (the action is often termed a dynamic compensator). The most important are delay and gain, which are also the easiest to determine.
• Delay: When do you take the action? Take the jacket off at dawn’s first sign of the sun rising? One hour later? If too early, he will be chilly for a while. The answer is: to take the action when you anticipate the disturbance (rising sun) will require removing the jacket. Do not take action immediately upon seeing the cause. Delay action until it is required, until the effect will happen. Maybe the delay is 4 hours, θff=4 hrs
• Gain: How much action should you take? If he takes off the jacket, shirt, and undershirt, then he may get chilly. This would be high gain, too large of a control action. By contrast, if he just unzips the jacket, it may not be enough heat removing action, and he will get hot. That would be low gain, too small of a control action. Maybe the gain is to remove the jacket and roll up his shirt sleeves per sunrise, ∆u=1.3 items of clothing/sun.
• Lag: Should he remove all cover immediately, or start taking action progressively? Should he first unzip, then remove jacket, and finally, roll up his shirt sleeves? This starts the taking action, but progressively lags or ramps it to the final value. What should be the lag time-constant? If you start predictive-corrective action after the delay, θff, and want the corrective action to be complete by a certain time, tfinish, with effectively are four time-constants in a lag duration, then τlag, ff=(tfinish-θff)/4.
Lead: If the control action has a delay in taking compensation, and that delay is longer than the delay for the disturbance, then you should take control action
before the disturbance is knowable. (You need to be a psychic to predict what nature is going to give you.) Since you cannot take action before you know that action is needed, take excessive initial action, then lag back to the proper value. This is a lead. The ratio of lead-time to lag-time is the initial overage of action. If τlead, ff/τlag, ff=1.5,  then 1.5∆u=1.5∙1.3 items of clothing=2 items of clothing. Initially, take off the jacket and shirt, then gradually put the shirt back on with sleeves rolled up during the θff  to tfinish interval. Alternately, if you have a feel for the initial kick relative to the final adjustment then: τlead, ff=τlag, ff(initial correction/final correction.)

The process model for feedforward control

We consider the process with output, y, being affected by both the measurable disturbance, d, and the controller MV, u. As illustrated in Figure 1, the process may be a reactor with yield as the output, y, with raw material composition the disturbance, d, and the controller signal to the reagent valve, u.  Alternately, the process may be distillation with distillate composition, y, being affected by both column feed rate, d, and the signal, u, to the reflux flow control valve.

Both d and u affect y. Conceptually, as illustrated in Figure 2, from step tests in d and u one can get FOPDT models for how y responds to either d or u.

From Figure 2, the FOPDT models are:  For the disturbance (3e-7s)/(10s+1), the gain is 3 [CV units per %], the delay is 7 [min], and the time-constant is 10 [min]. For the controller effect (3e-4s)/(7s+1), the gain is 3 [CV units per %], the delay is 4 [min], and the time-constant is 7 [min]. These are conveniently rounded values and determined using eye-ball estimates from the steepest-slope extrapolation method. These are approximate values. You could use any preferred method to determine the model coefficient values.

However, one does not need single perfect steps from an initial steady state to a final steady state. I believe that experience could provide reasonable estimates for the gain and delays, and perhaps even the lead and lag.

Without such experience, I recommend using regression on multiple input changes, which do not need to be steps. The input changes might also be what naturally happens. However, when getting the response to the disturbance, keep the controller in MAN with a fixed output, or else the control action will confound the response. When getting the process response to the controller MV, make sure that the MV changes are large enough to overshadow the naturally occurring d impact on the CV. My FOPDT regression program [1] can be used to convert I/O data to the models.

Determining feedforward action

Intuitively, it is easy to determine the feedforward delay and gain from process response models.  As illustrated in Figure 2, the delay for the process to show the impact of the disturbance is 7 min, and the delay for the process to express the impact of the MV is 4 min.  Then the MV should respond to the d at 7-4=3 min after the d changes.  This rule is θff=θd-θu.

If the gain of the disturbance impact on the process is 5 [CV/%] and d makes a +2 [%] change then you expect the eventual process response to be +2*5=10 [CV units]. So, the MV needs to have a -10 [CV units] impact to cancel the d impact. If the gain of the MV impact on the process is 6 [CV/%] then, to create the needed -10 [CV units] impact, the MV needs to move -10/6=-1.67 [%].  This rule is Kff=-Kd/Ku.

Both rules are from intuitive logic. As we’ll see they are also outcomes of mathematical analysis, the lag and lead can be intuitively chosen also, but the logic is a bit complex. However, mathematical analysis of a model of the system can lead to gain, delay, lead, and lag values.

To mathematically derive the feedforward action, use a simple concept that the u and d effects on the process are independent and additive. This model is illustrated in Figure 3.

Using FOPDT models for how y is affected by u and d, in Laplace notation, the concept of Figure 3 is this mathematical model:

y=(3e-7s/10s+1)(d)+(3e-4s/7s+1)(u)

We want to determine u such that the change of y is zero when d changes.  So, set y=0:

0=(Kde-θds/τds+1)(d)+(Kue-θus/τus+1)(u)

And solve for u.  Although the abstraction of Laplace is difficult, the algebra is easy. The answer to how u should change is:

u=-(Kde-θds/τds+1)(τus+1/Kue-θusd=-(Kd/Ku)e-(θdu)s(τus+1/τds+1)d

With data from the two FOPDT models from Figure 2:

θff=θd-θu=7min-4min=3 min

Kff=-Kd/Ku=-(3y_units/d_unut)/(3y­_units)(u_unit)=-1(u_units/d_unit)

τlag, ff=τd=10 min

In this case, the rule is, “Add the following action to whatever the feedback controller wants to do: When d makes a change, wait θff=3 min before changing u. Make the change in u be Kff∆d=-1(u_units)/(d_unit)∆d. But don’t implement the entire change now, jump to τlead, ff/τlag, ff=7 min10 min=0.7 of the ultimate value. Then lag to the final value with τlag, ff=10 min.”

Characteristic of Laplace analysis, this analysis is in deviation variables. The change in the disturbance from a base value determines the change in MV.

∆u=Kff∙∆d

The action is not based on the disturbance value, but its deviation from a base or reference value.

Include feedback control

• We still need feedback control. There are several reasons:
• Feedforward can only fix the measurable disturbance. Other disturbances will still affect the process.  Feedback is needed to fix the others;
• The feedforward model is not perfect, it is an FOPDT approximation. So, although feedforward help will be very good, it will not be perfect.  Feedback is needed to trim the feedforward imperfection;
• If the disturbance measurement is in error (perhaps due to calibration drift), then the feedforward correction will be imperfect. Feedback is needed to compensate; and
• Feedforward cannot move the process to a new set point. Feedback is needed to do that.

Typically, feedforward control action is added to the feedback action with a control structure illustrated in Figure 4.

In a sense, this is like an override situation. The output of the feedback controller (FB) does not go to the process. Added to it, is the feedforward (FF) action. The sum of the two go to the process.

Here is the issue: If the FB action is 90% and the FF action is 20% then the combined 110% is infeasible. Only 100% can go to the process. (Figure 4 does not show the override from the summation circle.) The override causes an effect similar to wind up. If the FB controller wants to correct a CV error by lowering the signal by 5%, lowering its output to 85%, the sum is 105% and the valve remains 100% open. Nothing happens until the feedback output winds down to 79%.

If the feedforward controller is adding 20%, then the output of the feedback controller should be limited to 80%. If either using limits on the integral or external reset feedback (erf), the FF action needs to be included in the feedback bias limitation. For instance, the erf signal to the feedback controller must be adjusted for the FF contribution.

erf=MVactual-FF

The control device should take care of all this for you. You need to determine the four FF coefficient values: θff, Kff, τlead, ff, and τlag, ff.

Illustration

First, here is an illustration of feedback alone.

Figure 5 illustrates a tuned PID feedback controller (MV is the middle trace) with no feedforward action reacting to a disturbance (the lower step change). The CV and SP are the upper traces.

Notice: The control action does not start until after the CV deviation is visible. When the deviation is small the control action is small, even though it eventually needs to be much larger.  The “D” action in the PID controller does not anticipate what the fully developed deviation will be.

Second, Figure 6 illustrates the same feedback controller and same disturbance, but with feedforward.

Notice: There is a 3-min delay in the MV response (middle trace). The initial MV jumps to 70% of the final value, even when there is barely noticeable CV deviation (upper trace) at that time.  The lag to the final MV value that takes about 28 min, which is about 4 times the lag time of 7 min. There is nearly, but not perfect, cancellation of the d effect on the CV. The simple FOPDT models are not perfect matches to the high order process responses. Also, the additive and independent model of action is an approximation. Finally, the FOPDT coefficients are convenient values. So, for several reasons, compensation based on the simple models is not expected to be perfect. But it is good.  There is a feedback trim during the transient due to the residual CV deviations, which makes the combined feedback and feedforward MV response not a perfect lag from the initial jump to the final value. There is much better CV control than feedback alone.

Even a simple FF without lead and lag can be a very good prevention. Figure 7 illustrates the same situation but with both τlead, ff and τlag, ff set to zero.

Quality giveaway

How can you quantify the benefit of feedforward?  Here is one method. Figure 8 illustrates the process in regulatory mode. The dotted line at the CV value of 200 represents the CV limit—perhaps a customer specification or a safety or operational limit. The process set point at 185 is 15 CV units lower than the limit. The disturbance continually causes deviations from the SP, which are countered by the well-tuned feedback controller. There are only occasional and very small PV violations of the limit. But if the set point is increased, closer to the limit, there will be many and significant violations of the limit.

We would like to have the set point closer to the limit. The 15 CV units deviation between set point and limit is termed quality giveaway. Consider that the CV represents impurity and 200 is the specification (maybe the units are ppm). Then if the set point was at the specification there would be many unacceptable purity deviations. In this example, to prevent purity violations, one must manufacture on average a product that is 15 units purer than required.  Higher purity requires greater energy input, or more culled product, or slower production, or some other operational aspect that can be converted to manufacturing costs.  Process owners should be able to quantify such costs.

Figure 9 shows what happens with feedforward control helping the feedback controller. The set point is still 15 CV units from the limit.

Notice: There is much reduced variation in the CV. At no time is the CV close to the limit. The MV (red trace) is a mirror image of the disturbance (blue trace) but with a bit of a delay.

Now that control is greatly improved, the set point can be closer to the limit. In Figure 10, the set point is just five quality giveaway units from the specification. There are no violations.

Takeaway

If a disturbance source is measurable and has a dominating impact on the CV, then feedforward action can be a substantial benefit to regulatory control.

Implement feedforward within the manufacture’s devices so that integral wind up, initialization, and MAN-AUTO transfer issues are properly handled.

You don’t need perfect models. Often just intuitive values for feedforward gain and delay, and zero for the lead and lag time-constants, will provide substantial feedforward benefit.

You don’t need to determine models from ideal step tests. Regression can be very beneficial in fitting models to data.

Feedforward assists feedback. It is not the primary signal to the final control element.  It trims the feedback controller signal based on disturbance deviations from a base value.

You still need feedback control for set point changes, compensation for measurement errors, feedforward model errors, and other disturbances.

Russ Rhinehart started his career in the process industry.  After 13 years and rising to engineering supervision, he transferred to a 31-year academic career.  Now “retired”, he enjoys coaching professionals through books, articles, short courses, and postings on his web site www.r3eda.com.

### R. Russell Rhinehart | Columnist

Russ Rhinehart started his career in the process industry. After 13 years and rising to engineering supervision, he transitioned to a 31-year academic career. Now “retired," he returns to coaching professionals through books, articles, short courses, and postings to his website at www.r3eda.com.