Showing posts with label basics. Show all posts
Showing posts with label basics. Show all posts

Integral (Reset) Windup, Jacketing Logic and the Velocity PI Form




A valve cannot open more than all the way. A pump cannot go slower than stopped. Yet an improperly programmed control algorithm can issue such commands.

Herein lies the problem of integral windup (also referred to as reset windup or integral saturation). It is a problem that has been around for decades and was solved long ago. We discuss why it occurs and how to prevent it to help those who choose to write their own control algorithm.

The PI Algorithm
To increase our comfort level with the idea that different vendors cast the same PI algorithm in different forms, we choose the independent, continuous, position PI form for this discussion:

12.jpg

Where:
CO = controller output signal (the wire out)
CObias = controller bias or null value
e(t) = current controller error, defined as SP - PV
SP = set point
PV = measured process variable (the wire in)
Kc = proportional gain, a tuning parameter
Ki = integral gain, a tuning parameter

Note that Kc is the same parameter in both the dependent and independent forms, though it is more typically called controller gain in the dependent form.

Every procedure and observation we have previously discussed about PI controllers applies to both forms. Both even use the same tuning correlations. To tune Ki, we compute Kc and Ti for the dependent form and then divide (Ki = Kc/Ti).

Integral (Reset) Windup
Our previous discussion of integral action noted that integration is a continual summing. As shown below, integration of error means that we continually sum controller error up to the present time.

13.jpg

The integral sum starts accumulating when the controller is first put in automatic and continues to change as long as controller error exists.
If an error is large enough and/or persists long enough, it is mathematically possible for the integral term to grow very large (either positive or negative):

14.jpg

This large integral, when combined with the other terms in the equation, can produce a CO value that causes the final control element (FCE) to saturate. That is, the CO drives the FCE (e.g. valve, pump, compressor) to its physical limit of fully open/on/maximum or fully closed/off/minimum.

And if this extreme value is still not sufficient to eliminate the error, the simple mathematics of the controller algorithm, if not jacketed with protective logic, permits the integral term to continue growing.

If the integral term grows unchecked, the equation above can command the valve, pump or compressor to move to 110%, then 120% and more. Clearly, however, when an an FCE reaches its full 100% value, these last commands have no physical meaning and consequently, no impact on the process.

Control is Lost
Once we cross over to a "no physical meaning" computation, the controller has lost the ability to regulate the process.

When the computed CO exceeds the physical capabilities of the FCE because the integral term has reached a large positive or negative value, the controller is suffering from windup. Because windup is associated with the integral term, it is often referred to as integral windup or reset windup.

To prevent windup from occurring, modern controllers are protected by either:
▪ Employing extra "jacketing logic" in the software to halt integration when the CO reaches a maximum or minimum value.
▪ Recasting the controller into a discrete velocity form that, by its very formulation, naturally avoids windup.
Both alternatives offer benefits but possess some fairly subtle drawbacks that we discuss below.

Visualizing Windup
To better visualize the problem of windup and the benefit of anti-windup protection, consider the plot from our heat exchanger process below (click for a large view).
To the left is the performance of a PI controller with no windup protection. To the right is the performance of the same controller protected by an anti-windup strategy.
For both controllers, the set point is stepped from 200 °C up to 215 °C and back again. As shown in the lower trace on the plot, the controller moves the CO to 0%, closing the valve completely, yet this is not sufficient to move the PV up to the new set point.

15.jpg

To the left in the plot, the impact of windup is a degraded controller performance. When the set point is stepped back to its original value of 200 °C , the windup condition causes a delay in the CO action. This in turn causes a delay in the PV response.

To the right in the plot, anti-windup protection permits the CO, and thus PV, to respond promptly to the command to return to the original SP value of 200 °C.

More Details on Windup
The plot below (click for large view) offers more detail. As labeled on the plot:

1) To the left for the Controller with Wind-up case, the SP is stepped up to 215 °C. The valve closes completely but is not able to move the PV all the way to the high set point value. Integration is a summing of controller error, and since error persists, the integration term grows very large.
The sustained error permits the controller to windup (saturate). While it is not obvious from the plot, the PI algorithm is computing values for CO that ask the valve to be open -5%, -8% and more. The control algorithm is just simple math with no ability to recognize that a valve cannot be open to a negative value.
Note that the chart shows the CO signal bottoming out at 0% while the controller algorithm is computing negative CO values. This misleading information is one reason why windup can be difficult to diagnose as the root cause of a problem from visual inspection of process data trend plots.

2) When the SP is stepped back to 200 °C, it seems as if the CO does not move at first. In reality, the control algorithm started moving the CO when the SP changed, but the values remain in the physically meaningless range of negative numbers.
So while the valve remains fully closed at 0%, the integral sum is accumulating controller errors of opposite sign. As time passes, the integral term shrinks or "unwinds" as the running sum of errors balance out.
3) When the integral sum of errors shrinks enough, it no longer dominates the CO computation. The CO signal returns from the physically meaningless world of negative values. The valve can finally move in response.
4) To the right in the plot above, the controller is protected from windup. As a result, when the set point is stepped back to 200 °C, the CO immediately reacts with a change that is proportional to the size of the SP change. The PV moves quickly in response to the CO actions as it tracks the SP back to 200 °C.

◊ Solution 1: Jacketing Logic on the Position Algorithm
The PI controller at the top of this article is called the position form because the computed CO is a specific intermediate value between full on/open/maximum and closed/off/minimum. The continuous PI algorithm is specifying the actual position (e.g., 27% open, 64% of maximum) that the final control element (FCE) should assume.

Simple Logic Creates Additional Problems
It is not enough to have logic that simply limits or clips the CO if it reaches a maximum (COmax) or minimum (COmin) value because this does nothing to check the growth of the integral sum of errors term.
I
n fact, such simple logic was used in the "control with windup" plots just discussed. The CO seems stuck at 0% and we are unaware that the algorithm is actually computing negative valve positions as described in item 1 above.

Anti-Windup Logic Outline
When we switch from manual mode to automatic, we assume that we have initialized the controller using a bumpless transfer procedure. That is, at switchover, the integral sum of error is set to zero, the SP is set equal to the current PV, and the controller bias is set equal to the current CO (implying that COmin < CObias < COmax).

Thus, there is nothing to cause CO to immediately change and "bump" our process at switchover.

One approach to creating anti-windup jacketing logic is to artificially manipulate the integral sum of error itself. With our controller properly initialized, the approach is to flip the algorithm around and back-calculate a value for the integral sum of error that will provide a desired controller output value (COdesired), or:

16.jpg

Note that COdesired can be different in different situations. For example,
▪ We do not want tuning parameter adjustments to cause sudden CO movements that bump our process. So if tuning values have changed, COdesired is the value of CO from the previous loop calculation cycle.
▪ If the PI controller computes CO values that are above COmax or below COmin, then we must be concerned about windup and COdesired is set equal to the limiting COmax or COmin value.

The anti-windup logic followed at every loop sample time, T, is thus:

1) If tuning parameters have changed since the last loop calculation cycle, then COdesired = current CO. Back calculate the integral sum of error so CO remains unchanged from the previous sample time. This prevents sudden CO bumps due to tuning changes.

2) Update SP and PV for this loop calculation cycle.
3) compute:
17.jpg

4) If CO > COmax or if CO < COmin, then the anti-windup (integral desaturation) logic of step 5 is required. Otherwise, proceed to step 6.

5) If CO > COmax, then CO = COdesired = COmax. if CO < COmin, then CO = COdesired = COmin. Back calculate the integral sum of error using our selected COdesired and save it for use in the next control loop calculation cycle.

6) Implement CO

◊ Solution 2 - Use the Velocity (Discrete) Controller Form
Rather than computing a CO signal indicating a specific position for our final control element, an alternative is to compute a signal that specifies a change, ∆CO, from current position for the FCE. As explained below, this is called the velocity or discrete controller form.

We employ the dependent algorithm for this presentation, but the derivation that follows can be applied in an analogous fashion to the independent PI form. To derive the discrete velocity form, we must first write the continuous, position form of the PI controller to include the independent variable on the controller output, showing it properly as CO(t) to reflect that it changes with time:

18.jpg

Please note that this controller is identical to all dependent PI forms as presented in other articles. The only difference is we are being more mathematically precise in our expression of CO(t).

Deriving the Discrete Velocity Form
The first step in deriving the discrete form is to take the time derivative of the continuous form. In physics, the time derivative (rate of change) of a position is a velocity. This is why the final form of the PI controller we derive is often called the velocity form.

Taking the derivative of the continuous PI controller above with respect to time yields:
  19.jpg

Since CObias is a constant and the derivative of a constant is zero, then:

20.jpg

Removing this term from the equation results in:

21.jpg

If we assume discrete or finite difference approximations for the continuous derivatives, then the controller becomes:

22.jpg

where ei is the current controller error, ei-1 is the controller error at the previous sample time, T, and ∆ei = ei - ei-1.
Recognizing that loop sample time is T = ∆t, then the PI controller becomes:

23.jpg

Rearranging, we arrive at the discrete velocity form of the PI controller:

24.jpg

Reason for Anti-Windup Protection
Discrete velocity algorithms compute a ∆CO that signals the FCE to move a specific distance and direction from its current position. As we can see from the PI controller form above, the computation does not keep track of the current FCE position, nor does it mathematically accumulate any integral sums.

In a sense, the accumulation of integration is stored in the final control element itself. If a long series of ∆CO moves are all positive, for example, the valve, pump or compressor will move toward its maximum value. And once the FCE reaches its maximum limit, any ∆CO commands to move further will have no impact because, as stated in the first sentences of this article, a valve cannot open more than all the way and a pump cannot go slower than stopped. It is the physical nature of the FCE itself that provides protection from over-accumulation (i.e., windup).

As long as the CO never reaches COmax or COmin, the continuous position and discrete velocity forms of the PI controller provide identical performance. A properly jacketed continuous position PI controller will also provide windup protection equal to the discrete velocity form. Implicit in these statements is that sample time,T, is reasonably fast and that T and the tuning values (Kc and Ti) are the same when comparing implementations.

Concerns with Discrete Velocity PID
Unfortunately, the usefulness of the discrete velocity form is limited because the method suffers problems when derivative action is included. We find that we must take the derivative of a derivative, yielding a second derivative. A second derivative applied to data that contains even modest noise can produce nonsense results.

Some vendors implement this form anyway and include a signal filter and additional logic sequences to address the problem. Thus, even with the anti-windup benefits of a discrete velocity algorithm, we find the need to jacket the algorithm with protective logic.

Read more


Interacting Tuning Parameters




Many process control practitioners tune by "intuition," fiddling their way to final tuning by a combination of experience and trial-and-error.

Some are quite good at approaching process control as art. Since they are the ones who define "best" performance based on the goals of production, the capabilities of the process, the impact on down stream units, and the desires of management, it can be difficult to challenge any claims of success.

To explore the pitfalls of a trial and error approach and reinforce that there is science to controller tuning, we consider the common dependent, ideal form of the PI controller:

3.jpg

Where:
CO = controller output
e(t) = controller error = set point - process variable = SP - PV
Kc = controller gain, a tuning parameter
Ti = reset time, a tuning parameter

For this form, controller activity or aggressiveness increases as Kc increases and as Ti decreases (Ti is in the denominator, so smaller values increase the weighting on the integral action term, thus increasing controller activity).

Since Kc and Ti individually can make a controller more or less aggressive in its response, the two tuning parameters interact with each other. If current controller performance is not what we desire, it is not always clear which value to raise or lower, or by how much.

Example of Interaction Confusion
To illustrate, consider a case where we seek to balance a fairly rapid response to a set point change (a short rise time) against a small overshoot. While every process application is different, we choose to call the response plot below our desired or base case performance.

mapbasecase.jpg

Now consider the two response plots below. These were made using the identical process and controller to that above. The only difference between the base case response above and plot A and plot B below is that different Kc and Ti tuning values were used in each one.

And now the question: what tuning adjustments are required to restore the desired base case performance above starting from each plot below? Or alternatively: how has the tuning been changed from base case performance to produce these different behaviors?

There are no tricks in this question. The "process" is a simple linear second order system with modest dead time. Controller output is not hitting any limits. The scales on the plot are identical. Everything is as it seems, except PI controller tuning is different in each case.

Study the plots for a moment before reading ahead and see if you can figure it out. Each plot has a very different answer.

mapchallenge.jpg

Some Hints
Before we reveal the answer, here is a hint. One plot has been made more active or aggressive in its response by doubling Kc while keeping Ti constant at the original base case value.

The other cuts Ti in half (remember, decreasing Ti makes this PI form more active) while keeping Kc at the base case value:

So we have:
• Base case = Kc and Ti
• Plot A or B = 2Kc and Ti
• Other Plot B or A = Kc and Ti/2

Still not sure? Here is a final hint: remember from our previous discussions that proportional action is largely responsible for the first movements in a response. We also discussed that integral action tends to increase the oscillatory or cycling behavior in the PV.

It is not easy to know the answer, even with these huge hints, and that is the point of this article.

The Answer
Below is a complete tuning map with the base case performance from our challenge problem in the center. The plot shows how performance changes as Kc and Ti are doubled and halved from the base case for the dependent, ideal PI controller form.

maptuningsmall.jpg

Starting from the center and moving up on the map from the base case performance brings us to plot B. As indicated on the tuning map axis, this direction increases (doubles) controller gain, Kc, thus making the controller more active or aggressive. Moving down on the map from the base case decreases (halves) Kc, making the controller more sluggish in its response.

Moving left on the map from the base case brings us to plot A. As indicated on the tuning map axis, this direction decreases reset time (cuts it in half), again making the controller more active or aggressive. Moving right on the map from the base case increases (doubles) reset time, making the controller more sluggish in its response.

It is clear from the tuning map that the controller is more active or aggressive in its response when Kc increases and Ti decreases, and more sluggish or conservative when Kc decreases and Ti increases.

Building on this observation, it is not surprising that the upper left most plot (2Kc and Ti/2) shows the most active controller response, and the lower right most plot (Kc/2 and 2Ti) is the most conservative or sluggish response.

Back to the question. With what we now know, the answer:
• Base case = Kc and Ti
• Plot B = 2Kc and Ti
• Plot A = Kc and Ti/2


Interacting Parameters Makes Tuning Problematic

The PI controller has only two tuning parameters, yet it produces very similar looking performance plots located in different places on a tuning map.

f our instincts lead us to believe that we are at plot A when we really are at plot B, then the corrective action we make based on this instinct will compound our problem rather than solve it. This is strong evidence that trial and error is not an efficient or appropriate approach to tuning.

When we consider a PID controller with three tuning parameters, the number of similar looking plots in what would be a three dimensional tuning map increases dramatically. Trial and error tuning becomes almost futile.

We have been exploring a step by step tuning recipe approach that produces desired results without the wasted time and off-spec product that results from trial and error tuning.

If we follow this industry-proven methodology, we will improve the safety and profitability of our operation.

Interesting Observation

Before leaving this subject, we make one more very useful observation from the tuning map. This will help build our intuition and may help one day when we are out in the plant.

The right most plot in the center row (Kc, 2Ti) of the tuning map above is reproduced below.

mapintegral.jpg

Notice how the PV shows a dip or brief oscillation on its way up to the set point? This is a classic indication that the proportional term is reasonable but the integral term is not getting enough weight in the calculation. For the PI form used in this article, that would mean that the reset time, Ti, is too large since it is in the denominator.

If we cover the right half of the "not enough integral action" plot, the response looks like it is going to settle out with some offset, as would be expected with a P-Only controller. When we consider the plot as a whole, we see that as enough time passes, the response completes. This is because the weak integral action finally accumulates enough weight in the calculation to move the PV up to set point.

This "oscillates on the way" pattern is a useful marker for diagnosing a lack of sufficient integral action.

Read more


Integral Action and PI Control

 Like the P-Only controller, the Proportional-Integral (PI) algorithm computes and transmits a controller output (CO) signal every sample time, T, to the final control element (e.g., valve, variable speed pump). The computed CO from the PI algorithm is influenced by the controller tuning parameters and the controller error, e(t).
PI controllers have two tuning parameters to adjust. While this makes them more challenging to tune than a P-Only controller, they are not as complex as the three parameter PID controller.
Integral action enables PI controllers to eliminate offset, a major weakness of a P-only controller. Thus, PI controllers provide a balance of complexity and capability that makes them by far the most widely used algorithm in process control applications.

The PI Algorithm

While different vendors cast what is essentially the same algorithm in different forms, here we explore what is variously described as the dependent, ideal, continuous, position form:

Where:
CO = controller output signal (the wire out)
CObias = controller bias or null value; set by bumpless transfer as explained below
e(t) = current controller error, defined as SP - PV
SP = set point
PV = measured process variable (the wire in)
Kc = controller gain, a tuning parameter
Ti = reset time, a tuning parameter

The first two terms to the right of the equal sign are identical to the P-Only controller referenced at the top of this article.
The integral mode of the controller is the last term of the equation. Its function is to integrate or continually sum the controller error, e(t), over time.

Some things we should know about the reset time tuning parameter, Ti:
▪ It provides a separate weight to the integral term so the influence of integral action can be independently adjusted.
▪ It is in the denominator so smaller values provide a larger weight to (i.e. increase the influence of) the integral term.
▪ It has units of time so it is always positive.


Function of the Proportional Term

As with the P-Only controller, the proportional term of the PI controller, Kc·e(t), adds or subtracts from CObias based on the size of controller error e(t) at each time t.

As e(t) grows or shrinks, the amount added to CObias grows or shrinks immediately and proportionately. The past history and current trajectory of the controller error have no influence on the proportional term computation.

The plot below illustrates this idea for a set point response. The error used in the proportional calculation is shown on the plot:
▪ At time t = 25 min, e(25) = 60-56 = 4
▪ At time t = 40 min, e(40) = 60-62 = -2

pierrorsmall.jpg

Recalling that controller error e(t) = SP - PV, rather than viewing PV and SP as separate traces as we do above, we can compute and plot e(t) at each point in time t.

Below is the identical data to that above only it is recast as a plot of e(t) itself. Notice that in the plot above, PV = SP = 50 for the first 10 min, while in the error plot below, e(t) = 0 for the same time period.

pierror2small.jpg

This plot is useful as it helps us visualize how controller error continually changes size and sign as time passes.

Function of the Integral Term

While the proportional term considers the current size of e(t) only at the time of the controller calculation, the integral term considers the history of the error, or how long and how far the measured process variable has been from the set point over time.

Integration is a continual summing. Integration of error over time means that we sum up the complete controller error history up to the present time, starting from when the controller was first switched to automatic.

Controller error is e(t) = SP - PV. In the plot below, the integral sum of error is computed as the shaded areas between the SP and PV traces.

piintsmall.jpg

Each box in the plot has an integral sum of 20 (2 high by 10 wide). If we count the number of boxes (including fractions of boxes) contained in the shaded areas, we can compute the integral sum of error.

So when the PV first crosses the set point at around t = 32, the integral sum has grown to about 135. We write the integral term of the PI controller as:

Since it is controller error that drives the calculation, we get a direct view the situation from a controller error plot as shown below:

piint2small.jpg

Note that the integral of each shaded portion has the same sign as the error. Since the integral sum starts accumulating when the controller is first put in automatic, the total integral sum grows as long as e(t) is positive and shrinks when it is negative.

At time t = 60 min on the plots, the integral sum is 135 - 34 = 101. The response is largely settled out at t = 90 min, and the integral sum is then 135 - 34 7 = 108.

Integral Action Eliminates Offset
The previous sentence makes a subtle yet very important observation. The response is largely complete at time t = 90 min, yet the integral sum of all error is not zero.

In this example, the integral sum has a final or residual value of 108. It is this residual value that enables integral action of the PI controller to eliminate offset.

As discussed in a previous article, most processes under P-only control experience offset during normal operation. Offset is a sustained value for controller error (i.e., PV does not equal SP at steady state).

We recognize from the P-Only controller:

ponlycontrollereq.jpg

that CO will always equal CObias unless we add or subtract something from it.

The only way we have something to add or subtract from CObias in the P-Only equation above is if e(t) is not zero. It e(t) is not steady at zero, then PV does not equal SP and we have offset.

However, with the PI controller:

picontroller.jpg

we now know that the integral sum of error can have a final or residual value after a response is complete. This is important because it means that e(t) can be zero, yet we can still have something to add or subtract from CObias to form the final controller output, CO.

So as long as there is any error (as long as e(t) is not zero), the integral term will grow or shrink in size to impact CO. The changes in CO will only cease when PV equals SP (when e(t) = 0) for a sustained period of time.

At that point, the integral term can have a residual value as just discussed. This residual value from integration, when added to CObias, essentially creates a new overall bias value that corresponds to the new level of operation.

In effect, integral action continually resets the bias value to eliminate offset as operating level changes.

Challenges of PI Control

There are challenges in employing the PI algorithm:
▪ The two tuning parameters interact with each other and their influence must be balanced by the designer.
▪ The integral term tends to increase the oscillatory or rolling behavior of the process response.

Because the two tuning parameters interact with each other, it can be challenging to arrive at "best" tuning values. The value and importance of our design and tuning recipe increases as the controller becomes more complex.

Initializing the Controller for Bumpless Transfer

When we switch any controller from manual mode to automatic (from open loop to closed loop), we want the result to be uneventful. That is, we do not want the switchover to cause abrupt control actions that impact or disrupt our process

We achieve this desired outcome at switchover by initializing the controller integral sum of error to zero. Also, the set point and controller bias value are initialized by setting:
▪ SP equal to the current PV
▪ CObias equal to the current CO

With the integral sum of error set to zero, there is nothing to add or subtract from CObias that would cause a sudden change in the current controller output. With the set point equal to the measured process variable, there is no error to drive a change in our CO. And with the controller bias set to our current CO value, we are prepared by default to maintain current operation.

Thus, when we switch from manual mode to automatic, we have "bumpless transfer" with no surprises. This is a result everyone appreciates.

Reset Time Versus Reset Rate

Different vendors cast their control algorithms in slightly different forms. Some use proportional band rather than controller gain. Also, some use reset rate, Tr, instead of reset time. These are simply the inverse of each other:
Tr = 1/Ti

No matter how the tuning parameters are expressed, the PI algorithms are all equally capable.

But it is critical to know your manufacturer before you start tuning your controller because parameter values must be matched to your particular algorithm form. Commercial software for controller design and tuning will automatically address this problem for you.

Implementing a PI controller

We explore PI controller design, tuning and implementation on the heat exchanger in this article and the gravity drained tanks in this article.

Read more


The P-Only Control Algorithm

The simplest algorithm in the PID family is a proportional or P-Only controller. Like all automatic controllers, it repeats a measurement-computation-action procedure at every loop sample time, T, following the logic flow shown in the block diagram below (click for large view):

 

Starting at the far right of the control loop block diagram above:
  • A sensor measures and transmits the current value of the process variable, PV, back to the controller (the 'controller wire in')
  • Controller error at current time t is computed as set point minus measured process variable, or e(t) = SP - PV
  • The controller uses this e(t) in a control algorithm to compute a new controller output signal, CO
  • The CO signal is sent to the final control element (e.g. valve, pump, heater, fan) causing it to change (the 'controller wire out')
  • The change in the final control element (FCE) causes a change in a manipulated variable
  • The change in the manipulated variable (e.g. flow rate of liquid or gas) causes a change in the PV

The goal of the controller is to make e(t) = 0 in spite of unplanned and unmeasured disturbances. Since e(t) = SP - PV, this is the same as saying a controller seeks to make PV = SP.

The P-Only Algorithm
The P-Only controller computes a CO action every loop sample time T as:

CO = CObias Kc∙e(t)

Where:
CObias = controller bias or null value
Kc = controller gain, a tuning parameter
e(t) = controller error = SP - PV
SP = set point
PV = measured process variable


Design Level of Operation
Real processes display a nonlinear behavior, which means their apparent process gain, time constant and/or dead time changes as operating level changes and as major disturbances change. Since controller design and tuning is based on these Kp, Tp and Өp values, controllers should be designed and tuned for a pre-defined level of operation.

When designing a cruise control system for a car, for example, would it make sense for us to perform bump tests to generate dynamic data when the car is traveling twice the normal speed limit while going down hill on a windy day? Of course not.

Bump test data should be collected as close as practical to the design PV when the disturbances are quiet and near their typical values. Thus, the design level of operation for a cruise control system is when the car is traveling at highway speed on flat ground on a calm day.

Definition: the design level of operation (DLO) is where we expect the SP and PV will be during normal operation while the important disturbances are quiet and at their expected or typical values.

Understanding Controller Bias
Let's suppose the P-Only control algorithm shown above is used for cruise control in an automobile and CO is the throttle signal adjusting the flow of fuel to the engine.

Let's also suppose that the speed SP is 70 and the measured PV is also 70 (units can be mph or kph depending on where you live in the world). Since PV = SP, then e(t) = 0 and the algorithm reduces to:

CO = CObias Kc∙(0) = CObias

If CObias is zero, then when set point equals measurement, the above equation says that the throttle signal, CO, is also zero. This makes no sense. Clearly if the car is traveling 70 kph, then some baseline flow of fuel is going to the engine.

This baseline value of the CO is called the bias or null value. In this example, CObias is the flow of fuel that, in manual mode, causes the car to travel the design speed of 70 kph when on flat ground on a calm day.

Definition: CObias is the value of the CO that, in manual mode, causes the PV to steady at the DLO while the major disturbances are quiet and at their normal or expected values.

A P-Only controller bias (sometimes called null value) is assigned a value as part of the controller design and remains fixed once the controller is put in automatic.

Controller Gain, Kc
The P-Only controller has the advantage of having only one adjustable or tuning parameter, Kc, that defines how active or aggressive the CO will move in response to changes in controller error, e(t).

For a given value of e(t) in the P-Only algorithm above, if Kc is small, then the amount added to CObias is small and the controller response will be slow or sluggish. If Kc is large, then the amount added to CObias is large and the controller response will be fast or aggressive.

Thus, Kc can be adjusted or tuned for each process to make the controller more or less active in its actions when measurement does not equal set point.


P-Only Controller Design
All controllers from the family of PID algorithms (P-Only, PI, PID) should be designed and tuned using our proven recipe:
  1. Establish the design level of operation (the normal or expected values for set point and major disturbances).
  2. Bump the process and collect controller output (CO) to process variable (PV) dynamic process data around this design level.
  3. Approximate the process data behavior with a first order plus dead time (FOPDT) dynamic model.
  4. Use the model parameters from step 3 in rules and correlations to complete the controller design and tuning.
The Internal Model Control (IMC) tuning correlations that work so well for PI and PID controllers cannot be derived for the simple P-Only controller form. The next best choice is to use the widely-published integral of time-weighted absolute error (ITAE) tuning correlation:

Moderate P-Only:  

This correlation is useful in that it reliably yields a moderate Kc value. In fact, some practitioners find that the ITAE Kc value provides a response performance so predictably modest that they automatically start with an aggressive P-Only tuning, defined here as two and a half times the ITAE value:


Aggressive P-Only: Kc = 2.5 (Moderate Kc)

Reverse Acting, Direct Acting and Control Action
Time constant, Tp, and dead time, Өp, cannot affect the sign of Kc because they mark the passage of time and must always be positive. The above tuning correlation thus implies that Kc must always have the same sign as the process gain, Kp.

When CO increases on a process that has a positive Kp, the PV will increase in response. The process is direct acting. Given this CO to PV relationship, when in automatic mode (closed loop), if the PV starts drifting too high above set point, the controller must decrease CO to correct the error.

This "opposite to the problem" reaction is called negative feedback and forms the basis of stable control.

A process with a positive Kp is direct acting. With negative feedback, the controller must be reverse acting for stable control. Conversely, when Kp is negative (a reverse acting process), the controller must be direct acting for stable control.

Since Kp and Kc always have the same sign for a particular process and stable control requires negative feedback, then:
  • direct acting process (Kp and Kc positive) −› use a reverse acting controller
  • reverse acting process (Kp and Kc negative) −› use a direct acting controller
In most commercial controllers, a positive value of the Kc is always entered. The sign (or action) of the controller is then assigned by specifying that the controller is either reverse or direct acting to indicate a positive or negative Kc respectively.

If the wrong control action is entered, the controller will quickly drive the final control element (e.g., valve, pump, compressor) to full on/open or full off/closed and remain there until the proper control action entry is made.

Proportional Band
Some manufacturers use different forms for the same tuning parameter. The popular alternative to Kc found in the marketplace is proportional band, PB.

In many industry applications, both the CO and PV are expressed in units of percent. Given that a controller output signal ranges from a minimum (COmin) to maximum (COmax) value, then:

PB = (COmax - COmin)/Kc

When CO and PV have units of percent and both range from 0% to 100%, the much published conversion between controller gain and proportional band results:

PB = 100/Kc

Many case studies on this site assign engineering units to the measured PV because plant software has made the task of unit conversions straightforward. If this is true in your plant, take care when using these conversion formula.

Implementation Issues
Implementation of a P-Only controller is reasonably straightforward, but this simple algorithm exhibits a phenomenon called "offset." In most industrial applications, offset is considered an unacceptable weakness. We explore P-Only control, offset and other issues for the heat exchanger and the gravity drained tanks processes.

Read more


Proportional Control - The Simplest PID Controller

he P-Only Control Algorithm
The simplest algorithm in the PID family is a proportional or P-Only controller. Like all automatic controllers, it repeats a measurement-computation-action procedure at every loop sample time, T, following the logic flow shown in the block diagram below (click for large view):

 

Starting at the far right of the control loop block diagram above:
  • A sensor measures and transmits the current value of the process variable, PV, back to the controller (the 'controller wire in')
  • Controller error at current time t is computed as set point minus measured process variable, or e(t) = SP - PV
  • The controller uses this e(t) in a control algorithm to compute a new controller output signal, CO
  • The CO signal is sent to the final control element (e.g. valve, pump, heater, fan) causing it to change (the 'controller wire out')
  • The change in the final control element (FCE) causes a change in a manipulated variable
  • The change in the manipulated variable (e.g. flow rate of liquid or gas) causes a change in the PV

The goal of the controller is to make e(t) = 0 in spite of unplanned and unmeasured disturbances. Since e(t) = SP - PV, this is the same as saying a controller seeks to make PV = SP.

The P-Only Algorithm
The P-Only controller computes a CO action every loop sample time T as:

CO = CObias Kc∙e(t)

Where:
CObias = controller bias or null value
Kc = controller gain, a tuning parameter
e(t) = controller error = SP - PV
SP = set point
PV = measured process variable


Design Level of Operation
Real processes display a nonlinear behavior, which means their apparent process gain, time constant and/or dead time changes as operating level changes and as major disturbances change. Since controller design and tuning is based on these Kp, Tp and Өp values, controllers should be designed and tuned for a pre-defined level of operation.

When designing a cruise control system for a car, for example, would it make sense for us to perform bump tests to generate dynamic data when the car is traveling twice the normal speed limit while going down hill on a windy day? Of course not.

Bump test data should be collected as close as practical to the design PV when the disturbances are quiet and near their typical values. Thus, the design level of operation for a cruise control system is when the car is traveling at highway speed on flat ground on a calm day.

Definition: the design level of operation (DLO) is where we expect the SP and PV will be during normal operation while the important disturbances are quiet and at their expected or typical values.

Understanding Controller Bias
Let's suppose the P-Only control algorithm shown above is used for cruise control in an automobile and CO is the throttle signal adjusting the flow of fuel to the engine.

Let's also suppose that the speed SP is 70 and the measured PV is also 70 (units can be mph or kph depending on where you live in the world). Since PV = SP, then e(t) = 0 and the algorithm reduces to:

CO = CObias Kc∙(0) = CObias

If CObias is zero, then when set point equals measurement, the above equation says that the throttle signal, CO, is also zero. This makes no sense. Clearly if the car is traveling 70 kph, then some baseline flow of fuel is going to the engine.

This baseline value of the CO is called the bias or null value. In this example, CObias is the flow of fuel that, in manual mode, causes the car to travel the design speed of 70 kph when on flat ground on a calm day.

Definition: CObias is the value of the CO that, in manual mode, causes the PV to steady at the DLO while the major disturbances are quiet and at their normal or expected values.

A P-Only controller bias (sometimes called null value) is assigned a value as part of the controller design and remains fixed once the controller is put in automatic.

Controller Gain, Kc
The P-Only controller has the advantage of having only one adjustable or tuning parameter, Kc, that defines how active or aggressive the CO will move in response to changes in controller error, e(t).

For a given value of e(t) in the P-Only algorithm above, if Kc is small, then the amount added to CObias is small and the controller response will be slow or sluggish. If Kc is large, then the amount added to CObias is large and the controller response will be fast or aggressive.

Thus, Kc can be adjusted or tuned for each process to make the controller more or less active in its actions when measurement does not equal set point.


P-Only Controller Design
All controllers from the family of PID algorithms (P-Only, PI, PID) should be designed and tuned using our proven recipe:
  1. Establish the design level of operation (the normal or expected values for set point and major disturbances).
  2. Bump the process and collect controller output (CO) to process variable (PV) dynamic process data around this design level.
  3. Approximate the process data behavior with a first order plus dead time (FOPDT) dynamic model.
  4. Use the model parameters from step 3 in rules and correlations to complete the controller design and tuning.
The Internal Model Control (IMC) tuning correlations that work so well for PI and PID controllers cannot be derived for the simple P-Only controller form. The next best choice is to use the widely-published integral of time-weighted absolute error (ITAE) tuning correlation:

Moderate P-Only:  

This correlation is useful in that it reliably yields a moderate Kc value. In fact, some practitioners find that the ITAE Kc value provides a response performance so predictably modest that they automatically start with an aggressive P-Only tuning, defined here as two and a half times the ITAE value:


Aggressive P-Only: Kc = 2.5 (Moderate Kc)

Reverse Acting, Direct Acting and Control Action
Time constant, Tp, and dead time, Өp, cannot affect the sign of Kc because they mark the passage of time and must always be positive. The above tuning correlation thus implies that Kc must always have the same sign as the process gain, Kp.

When CO increases on a process that has a positive Kp, the PV will increase in response. The process is direct acting. Given this CO to PV relationship, when in automatic mode (closed loop), if the PV starts drifting too high above set point, the controller must decrease CO to correct the error.

This "opposite to the problem" reaction is called negative feedback and forms the basis of stable control.

A process with a positive Kp is direct acting. With negative feedback, the controller must be reverse acting for stable control. Conversely, when Kp is negative (a reverse acting process), the controller must be direct acting for stable control.

Since Kp and Kc always have the same sign for a particular process and stable control requires negative feedback, then:
  • direct acting process (Kp and Kc positive) −› use a reverse acting controller
  • reverse acting process (Kp and Kc negative) −› use a direct acting controller
In most commercial controllers, a positive value of the Kc is always entered. The sign (or action) of the controller is then assigned by specifying that the controller is either reverse or direct acting to indicate a positive or negative Kc respectively.

If the wrong control action is entered, the controller will quickly drive the final control element (e.g., valve, pump, compressor) to full on/open or full off/closed and remain there until the proper control action entry is made.

Proportional Band
Some manufacturers use different forms for the same tuning parameter. The popular alternative to Kc found in the marketplace is proportional band, PB.

In many industry applications, both the CO and PV are expressed in units of percent. Given that a controller output signal ranges from a minimum (COmin) to maximum (COmax) value, then:

PB = (COmax - COmin)/Kc

When CO and PV have units of percent and both range from 0% to 100%, the much published conversion between controller gain and proportional band results:

PB = 100/Kc

Many case studies on this site assign engineering units to the measured PV because plant software has made the task of unit conversions straightforward. If this is true in your plant, take care when using these conversion formula.

Implementation Issues
Implementation of a P-Only controller is reasonably straightforward, but this simple algorithm exhibits a phenomenon called "offset." In most industrial applications, offset is considered an unacceptable weakness. We explore P-Only control, offset and other issues for the heat exchanger and the gravity drained tanks processes.

Read more


Controller process architecture

A controller seeks to maintain the measured process variable (PV) at set point (SP) in spite of unplanned and unmeasured disturbances. Since e(t) = SP - PV, this is equivalent to saying that a controller seeks to maintain controller error, e(t), equal to zero.


A controller repeats a measurement-computation-action procedure at every loop sample time, T. Starting at the far right of the control loop block diagram above:
  • A sensor measures a temperature, pressure, concentration or other property of interest from our process.
  • The sensor signal is transmitted to the controller. The pathway from sensor to controller might include: a transducer, an amplifier, a scaling element, quantization, a signal filter, a multiplexer, and other operations that can add delay and change the size, sign, and/or units of the measurement.
  • After all electronic and digital operations, the result terminates at our controller as the "wire in" measured process variable (PV) signal.
  • This "wire in" process variable is subtracted from set point in the controller to compute error, e(t) = SP - PV, which is then used in an algorithm (examples here and here) to compute a controller output (CO) signal.
  • The computed CO signal is transmitted on the "wire out" from the controller on a path to the final control element (FCE).
  • Similar to the measurement path, the signal from the controller to FCE might include filtering, scaling, linearization, amplification, multiplexing, transducing and other operations that can add delay and change the size, sign, and/or units of our original CO signal.
  • After any electronic and digital operations, the signal reaches the valve, pump, compressor or other FCE, causing a change in the manipulated variable (a liquid or gas stream flow rate, for example).
  • The change in the manipulated variable causes a change in our temperature, pressure, concentration or other process property of interest, all with the goal of making e(t) = 0.
Design Based on CO to PV Dynamics
The steps of the controller design and tuning recipe include: bumping the CO signal to generate CO to PV dynamic process data, approximating this test data with a first order plus dead time (FOPDT) model, and then using the model parameters in rules and correlations to complete the controller design and tuning.

The recipe provides a proven basis for controller design and tuning that avoids wasteful and expensive trial-and-error experiments. But for success, controller design and tuning must be based on process data as the controller sees it.

The controller only knows about the state of the process from the PV signal arriving on the "wire in" after all operations in the signal path from the sensor. It can only impact the state of the process with the CO signal it sends on the "wire out" before any such operations are made in the path to the final control element.

As indicated in the diagram at the top of this article, the proper signals that describe our complete "process" from the controller's view is the "wire out" CO and the "wire in" PV.

Complete the Circuit
Sometimes we find ourselves unable to proceed with an orderly controller design and tuning. Perhaps our controller interface does not make it convenient to directly record process data. Maybe we find a vendor's documentation to be so poorly written as to be all but worthless. There are a host of complications that can hinder progress.

Being resourceful, we may be tempted to move the project forward by using portable instrumentation. It seems reasonable to collect, say, temperature in a vessel during a bump test by inserting a spare thermocouple into the liquid. Or maybe we feel we can be more precise by standing right at the valve and using a portable signal generator to bump the process rather than doing so from a remote control panel.

As shown below, such an approach cuts out or short circuits the complete control loop pathway. External or portable instrumentation will not be recording the actual CO or PV as the controller sees it, and the data will not be appropriate for controller design or tuning.


Every Item Counts
The illustration above is extreme in that it shows many items that are not included in the control loop. But please recognize that it can be problematic to leave out even a single step in the complete signal pathway.

A simple scaling element that multiplies the signal by a constant value, for example, may seem reasonably unimportant to the overall loop dynamics. But this alone can change the size and even the sign of Kp, thus having dramatic impact on best tuning and final controller performance.

From a controller's view, the complete loop goes from "wire out" to "wire in" as shown below.


Every item in the loop counts. Always use the complete CO to PV data for process control analysis, design and tuning.

Pay Attention to Units
As detailed in this related article, signals can appear in a control loop in electronic units (e.g., volts, mA), in engineering units (e.g. oC, Lb/hr), as percent of scale (e.g., 0% to 100%), or as discrete or digital counts (e.g. 0 to 4095 counts).

It is critical that we remain aware of the units of a signal when working with a particular instrument or device. All values entered and computations performed must be consistent with the form of the data at that point in the loop.

Beyond the theory and methods discussed in this e-book, such "accounting confusion" can be one of the biggest challenges for the process control practitioner.

Read more


Sample Time Impacts Controller Performance

There are two sample times, T, used in process controller design and tuning.

One is the control loop sample time that specifies how often the controller samples the measured process variable (PV) and then computes and transmits a new controller output (CO) signal.

The other is the rate at which CO and PV data are sampled and recorded during a bump test of our process. Bump test data is used to design and tune our controller prior to implementation.

In both cases, sampling too slow will have a negative impact on controller performance. Sampling faster will not necessarily provide better performance, but it is a safer direction to move if we have any doubts.

Fast and slow are relative terms defined by the process time constant, Tp. Best practice for both control loop sample time and bump test data collection are the same:

Best Practice:
Sample time should be 10 times per process time constant or faster (T ≤ 0.1Tp).

We explore this "best practice" rule in a detailed study here. This study employs some fairly advanced concepts, so it is placed further down in the Table of Contents.

Yet perhaps we can gain an appreciation for how sample time impacts controller design and tuning with this thought experiment:

Suppose you see me standing on your left. You close your eyes for a time, open them, and now I am standing on your right. Do you know how long I have been at my new spot? Did I just arrive or have I been there for a while? What path did I take to get there? Did I move around in front or in back of you? Maybe I even jumped over you?

Now suppose your challenge is to keep your hands at your side until I pass by, and just as I do, you are to reach out and touch me. What are your chances with your eyes closed (and loud music is playing so you cannot hear me)?

Now lets say you are permitted to blink open your eyes briefly once per minute. Do you think you will have a better chance of touching me? How about blinking once every ten seconds? Clearly, as you start blinking say, two or three times a second, the task of touching me becomes easy. That's because you are sampling fast enough to see my "process" behavior fully and completely.

Based on this thought experiment, sampling too slow is problematic and sampling faster is generally better.

Keep in mind the "T ≤ 0.1Tp" rule as we study PID control. This applies both to sampling during data collection, and the "measure and act" loop sample time when we implement our controller.

Read more


Process Data, Dynamic Modeling and a Recipe for Profitable Control

It is best practice to follow a formal procedure or "recipe" when designing and tuning a PID (proportional-integral-derivative) controller. A recipe-based approach is the fastest method for moving a controller into operation. And perhaps most important, the performance of the controller will be superior to a controller tuned using a guess-and-test or trial-and-error method.

Additionally, a recipe-based approach overcomes many of the concerns that make control projects challenging in a commercial operating environment. Specifically, the recipe-based method causes less disruption to the production schedule, wastes less raw material and utilities, requires less personnel time, and generates less off-spec product.

The recipe for success is short:

  1. Establish the design level of operation (DLO), defined as the expected values for set point and major disturbances during normal operation
  2. Bump the process and collect controller output (CO) to process variable (PV) dynamic process data around this design level
  3. Approximate the process data behavior with a first order plus dead time (FOPDT) dynamic model
  4. Use the model parameters from step 3 in rules and correlations to complete the controller design and tuning.
We explore each step of this recipe in detail in other articles on this site. For now, we introduce some initial thoughts about steps 2 and 4.

Step 2: Bumping Our Process and Collecting CO to PV Data
From a controller's view, a complete control loop goes from wire out to wire in as shown below. Whenever we mention controller output (CO) or process variable (PV) data anywhere on this site, we are specifically referring to the data signals exiting and entering our controller at the wire termination interface.



To generate CO to PV data, we bump our process. That is, we step or pulse the CO (or the set point if in automatic mode as discussed here) and record PV data as the process responds. Here are three basic rules we follow in all of our examples:

  • Start with the process at steady state and record everything
The point of bumping the CO is to learn about the cause and effect relationship between it and the PV. With the plant initially at steady state, we are starting with a clean slate. The dynamic behavior of the process is then clearly isolated as the PV responds. It is important that we start capturing data before we make the initial CO bump and then sample and record quickly as the PV responds.
  • Make sure the PV response dominates the process noise
When performing a bump test, it is important that the CO moves far enough and fast enough to force a response that clearly dominates any noise or random error in the measured PV signal. If the CO to PV cause and effect response is clear enough to see by eye on a data plot, we can be confident that modern software can model it.
  • The disturbances should be quiet during the bump test
We desire that the dynamic test data contain PV response data that has been clearly, and in the ideal world exclusively, forced by changes in the CO.

Data that has been corrupted by unmeasured disturbances is of little value for controller design and tuning. The model (see below) will then incorrectly describe the CO to PV cause and effect relationship. And as a result, the controller will not perform correctly. If we are concerned that a disturbance event has corrupted test data, it is conservative to rerun the test.

Step 4: Using Model Parameters For Design and Tuning
The final step of the recipe states that once we have obtained model parameters that approximate the dynamic behavior of our process, we can complete the design and tuning of our PID controller.

We look ahead at this last step because this is where the payoff of the recipe-based approach is clear. To establish the merit, we assume for now that we have determined the design level of operation for our process (step 1), we have collected a proper data set rich in dynamic process information around this design level (step 2), and we have approximated the behavior revealed in the process data with a first order plus dead time (FOPDT) dynamic model (step 3).

Thankfully, we do not need to know what a FOPDT model is or even what it looks like. But we do need to know about the three model parameters that result when we fit this approximating model to process data.

The FOPDT (first order plus dead time) model parameters, listed below, tell us important information about the measured process variable (PV) behavior whenever there is a change in the controller output (CO) signal:
  • process gain, Kp (tells the direction and how far PV will travel)
  • process time constant, Tp (tells how fast PV moves after it begins its response)
  • process dead time, Өp (tells how much delay before PV first begins to respond)

Aside: we do not need to understand differential equations to appreciate the articles on this site. But for those interested, we note that the first order plus dead time (FOPDT) dynamic model has the form:

Where:
PV(t) = measured process variable as a function of time
CO(t - Өp) = controller output signal as a function of time and shifted by Өp Өp = process dead time t = time
The other variables are as listed above this box. It is a first order differential equation because it has one derivative with one time constant, Tp. It is called a first order plus dead time equation because it also directly accounts for a delay or dead time, Өp, in the CO(t) to PV(t) behavior.
We study what these three model parameters are and how to compute them in other articles, but here is why process gain, Kp, process time constant, Tp, and process dead time, Өp, are all important:
  • Tuning
These three model parameters can be plugged into proven correlations to directly compute P-Only, PI, PID, and PID with CO Filter tuning values. No more trial and error. No more tweaking our way to acceptable control. Great performance can be readily achieved with the step by step recipe listed above.
  • Controller Action
Before implementing our controller, we must input the proper direction our controller should move to correct for growing errors. Some vendors use the term "reverse acting" and "direct acting." Others use terms like "up-up" and "up-down" (as CO goes up, then PV goes up or down). This specification is determined solely by the sign of the process gain, Kp.
  • Loop Sample Time, T
Process time constant, Tp, is the clock of a process. The size of Tp indicates the maximum desirable loop sample time. Best practice is to set loop sample time, T, at 10 times per time constant or faster (T ≤ 0.1Tp). Sampling faster will not necessarily provide better performance, but it is a safer direction to move if we have any doubts. Sampling too slowly will have a negative impact on controller performance. Sampling slower than five times per time constant will lead to degraded performance.
  • Dead Time Problems
As dead time grows larger than the process time constant (Өp > Tp), the control loop can benefit greatly from a model based dead time compensator such as a Smith predictor. The only way we know if Өp > Tp is if we have followed the recipe and computed the parameters of a FOPDT model.
  • Model Based Control
If we choose to employ a Smith predictor, a dynamic feed forward element, a multivariable decoupler, or any other model based controller, we need a dynamic model of the process to enter into the control computer. The FOPDT model from step 2 of the recipe is often appropriate for this task.

Fundamental to Success
With tuning values, loop specifications, performance diagnostics and advanced control all dependent on knowledge of a dynamic model, we begin to see that process gain, Kp; process time constant, Tp; and process dead time, Өp; are parameters of fundamental importance to success in process control.

Read more


Control Loop Basics.

Components of a Control Loop

A controller seeks to maintain the measured process variable (PV) at set point (SP) in spite of unmeasured disturbances (D). The major components of a control system include a sensor, a controller and a final control element. To design and implement a controller, we must:
  1. have identified a process variable we seek to regulate, be able to measure it (or something directly related to it) with a sensor, and be able to transmit that measurement as an electrical signal back to our controller, and
  2. have a final control element (FCE) that can receive the controller output (CO) signal, react in some fashion to impact the process (e.g., a valve moves), and as a result cause the process variable to respond in a consistent and predictable fashion.
Home Temperature Control
As shown below, the home heating control system can be organized as a traditional control loop block diagram. Block diagrams help us visualize the components of a loop and see how the pieces are connected.

A home heating system is simple on/off control with many of the components contained in a small box mounted on our wall. Nevertheless, we introduce the idea of control loop diagrams by presenting a home heating system in the same way we would a more sophisticated commercial control application.



Starting from the far right in the diagram above, our process variable of interest is house temperature. A sensor, such as a thermistor in a modern digital thermostat, measures temperature and transmits a signal to the controller.

The measured temperature PV signal is subtracted from set point to compute controller error, e(t) = SP - PV. The action of the controller is based on this error, e(t).
In our home heating system, the controller output (CO) signal is limited to open/close for the fuel flow solenoid valve (our FCE). So in this example, if e(t) = SP - PV > 0, the controller signals to open the valve. If e(t) = SP - PV < 0, it signals to close the valve. As an aside, note that there also must be a safety interlock to ensure that the furnace burner switches on and off as the fuel flow valve opens and closes.

As the energy output of the furnace rises or falls, the temperature of our house increases or decreases and a feedback loop is complete. The important elements of a home heating control system can be organized like any commercial application:
  • Control Objective: maintain house temperature at SP in spite of disturbances
  • Process Variable: house temperature
  • Measurement Sensor: thermistor; or bimetallic strip coil on analog models
  • Measured Process Variable (PV) Signal: signal transmitted from the thermistor
  • Set Point (SP): desired house temperature
  • Controller Output (CO): signal to fuel valve actuator and furnace burner
  • Final Control Element (FCE): solenoid valve for fuel flow to furnace
  • Manipulated Variable: fuel flow rate to furnace
  • Disturbances (D): heat loss from doors, walls and windows; changing outdoor temperature; sunrise and sunset; rain...
A General Control Loop and Intermediate Value Control
The home heating control loop above can be generalized into a block diagram pertinent to all feedback control loops as shown below:


Both diagrams above show a closed loop system based on negative feedback. That is, the controller takes actions that counteract or oppose any drift in the measured PV signal from set point.

While the home heating system is on/off, our focus going forward shifts to intermediate value control loops. An intermediate value controller can generate a full range of CO signals anywhere between full on/off or open/closed. The PI algorithm and PID algorithm are examples of popular intermediate value controllers.

To implement intermediate value control, we require a sensor that can measure a full range of our process variable, and a final control element that can receive and assume a full range of intermediate positions between full on/off or open/closed. This might include, for example, a process valve, variable speed pump or compressor, or heating or cooling element.

Note from the loop diagram that the process variable becomes our official PV only after it has been measured by a sensor and transmitted as an electrical signal to the controller. In industrial applications. these are most often implemented as 4-20 milliamps signals, though commercial instruments are available that have been calibrated in a host of amperage and voltage units.

With the loop closed as shown in the diagrams, we are said to be in automatic mode and the controller is making all adjustments to the FCE. If we were to open the loop and switch to manual mode, then we would be able to issue CO commands through buttons or a keyboard directly to the FCE. Hence:
  • open loop = manual mode
  • closed loop = automatic mode
Cruise Control and Measuring Our PV
Cruise control in a car is a reasonably common intermediate value control system. For those who are unfamiliar with cruise control, here is how it works.

We first enable the control system with a button on the car instrument panel. Once on the open road and at our desired cruising speed, we press a second button that switches the controller from manual mode (where car speed is adjusted by our foot) to automatic mode (where car speed is adjusted by the controller).

The speed of the car at the moment we close the loop and switch from manual to automatic becomes the set point. The controller then continually computes and transmits corrective actions to the gas pedal (throttle) to maintain measured speed at set point.

It is often cheaper and easier to measure and control a variable directly related to the process variable of interest. This idea is central to control system design and maintenance. And this is why the loop diagrams above distinguish between our "process variable" and our "measured PV signal."

Cruise control serves to illustrate this idea. Actual car speed is challenging to measure. But transmission rotational speed can be measured reliably and inexpensively. The transmission connects the engine to the wheels, so as it spins faster or slower, the car speed directly increases or decreases.

Thus, we attach a small magnet to the rotating output shaft of the car transmission and a magnetic field detector (loops of wire and a simple circuit) to the body of the car above the magnet. With each rotation, the magnet passes by the detector and the event is registered by the circuitry as a "click." As the drive shaft spins faster or slower, the click rate and car speed increase or decrease proportionally.

So a cruise control system really adjusts fuel flow rate to maintain click rate at the set point value. With this knowledge, we can organize cruise control into the essential design elements:
  • Control Objective: maintain car speed at SP in spite of disturbances
  • Process Variable: car speed
  • Measurement Sensor: magnet and coil to clock drive shaft rotation
  • Measured Process Variable (PV) Signal: "click rate" signal from the magnet and coil
  • Set Point (SP): desired car speed, recast in the controller as a desired click rate
  • Controller Output (CO): signal to actuator that adjusts gas pedal (throttle)
  • Final Control Element (FCE): gas pedal position
  • Manipulated Variable: fuel flow rate
  • Disturbances (D): hills, wind, curves, passing trucks…
The traditional block diagram for cruise control is thus:


Instruments Should be Fast, Cheap and Easy
The above magnet and coil "click rate = car speed" example introduces the idea that when purchasing an instrument for process control, there are wider considerations that can make a loop faster, easier and cheaper to implement and maintain. Here is a "best practice" checklist to use when considering an instrument purchase:
  • Low cost
  • Easy to install and wire
  • Compatible with existing instrument interface
  • Low maintenance
  • Rugged and robust
  • Reliable and long lasting
  • Sufficiently accurate and precise
  • Fast to respond (small time constant and dead time)
  • Consistent with similar instrumentation already in the plant

Read more

Followers

Powered by Blogger.

About This Blog

categories

Web hosting for webmasters