Showing posts with label variability. Show all posts
Showing posts with label variability. Show all posts

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


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


Motivation and Terminology of Automatic Process Control


Automatic control systems enable us to operate our processes in a safe and profitable manner. Consider, as on this site, processes with streams comprised of gases, liquids, powders, slurries and melts. Control systems achieve this "safe and profitable" objective by continually measuring process variables such as temperature, pressure, level, flow and concentration - and taking actions such as opening valves, slowing down pumps and turning up heaters - all so that the measured process variables are maintained at operator specified set point values.

Safety First
The overriding motivation for automatic control is safety, which encompasses the safety of people, the environment and equipment.

The safety of plant personnel and people in the community are the highest priority in any plant operation. The design of a process and associated control system must always make human safety the primary objective.

The tradeoff between safety of the environment and safety of equipment is considered on a case by case basis. At the extremes, the control system of a multi-billion dollar nuclear power facility will permit the entire plant to become ruined rather than allow significant radiation to be leaked to the environment.

On the other hand, the control system of a coal-fired power plant may permit a large cloud of smoke to be released to the environment rather than allowing damage to occur to, say, a single pump or compressor worth a few thousand dollars.

The Profit Motive
When people, the environment and plant equipment are properly protected, our control objectives can focus on the profit motive. Automatic control systems offer strong benefits in this regard.

Plant-level control objectives motivated by profit include:

  • meeting final product specifications
  • minimizing waste production
  • minimizing environmental impact
  • minimizing energy use
  • maximizing overall production rate
It can be most profitable to operate as close as possible to these minimum or maximum objectives. For example, our customers often set our product specifications, and it is essential that we meet them if failing to do so means losing a sale.

Suppose we are making a film or sheet product. It takes more raw material to make a product thicker than the minimum our customers will accept on delivery. Consequently, the closer we can operate to the minimum permitted thickness constraint without going under, the less material we use and the greater our profit.

Or perhaps we sell a product that tends to be contaminated with an impurity and our customers have set a maximum acceptable value for this contaminant. It takes more processing effort (more money) to remove impurities, so the closer we can operate to the maximum permitted impurity constraint without going over, the greater the profit.

Whether it is a product specification, energy usage, production rate, or other objective, approaching these targets ultimately translates into operating the individual process units within the plant as close as possible to predetermined set point values for temperature, pressure, level, flow, concentration and the other measured process variables.

Controllers Reduce Variability
As shown in the plot below, a poorly controlled process can exhibit large variability in a measured process variable (e.g., temperature, pressure, level, flow, concentration) over time.

Suppose, as in this example, the measured process variable (PV) must not exceed a maximum value. And as is often the case, the closer we can run to this operating constraint, the greater our profit (note the vertical axis label on the plot).

To ensure our operating constraint limit is not exceeded, the operator-specified set point (SP), that is, the point where we want the control system to maintain our PV, must be set far from the constraint to ensure it is never violated. Note in the plot that SP is set at 50% when our PV is poorly controlled.


Below we see the same process with improved control. There is significantly less variability in the measured PV, and as a result, the SP can be moved closer to the operating constraint.

With the SP in the plot below moved to 55%, the average PV is maintained closer to the specification limit while still remaining below the maximum allowed value. The result is increased profitability of our operation.


Terminology of Control
We establish the jargon for this site by discussing a home heating control system as illustrated below.

This is a simplistic example because a home furnace is either on or off. Most control challenges have a final control element (FCE), such as a valve, pump or compressor, that can receive and respond to a complete range of controller output (CO) signals between full on and full off. This would include, for example, a valve that can be open 37% or a pump that can be running at 73%.

For our home heating process, the control objective is to keep the measured process variable (PV) at the set point value (SP) in spite of unmeasured disturbances (D).

For our home heating system:

PV = process variable is house temperature
CO = controller output signal from thermostat to furnace valve
SP = set point is the desired temperature set on the thermostat by the home owner
D = heat loss disturbances from doors, walls and windows; changing outdoor temperature; sunrise and sunset; rain...


To achieve this control objective, the measured process variable is compared to the thermostat set point. The difference between the two is the controller error, which is used in a control algorithm such as a PID (proportional-integral-derivative) controller to compute a CO signal to the final control element (FCE).

The change in the controller output (CO) signal causes a response in the final control element (fuel flow valve), which subsequently causes a change in the manipulated process variable (flow of fuel to the furnace). If the manipulated process variable is moved in the right direction and by the right amount, the measured process variable will be maintained at set point, thus satisfying the control objective.

This example, like all in process control, involves a measurement, computation and action:
  • is the measured temp colder than set point (SP - PV > 0)? Then open the valve.
  • is the measured temp hotter than set point (SP - PV < 0)? Then close the valve.

Note that computing the necessary controller action is based on controller error, or the difference between the set point and the measured process variable, i.e.

e(t) = SP - PV (error = set point - measured process variable)

In a home heating process, control is an on/off or open/close decision. And as outlined above, it is a straightforward decision to make. The price of such simplicity, however, is that the capability to tightly regulate our measured PV is rather limited.

One situation not addressed above is the action to take when PV = SP (i.e., e(t) = 0). And in industrial practice, we are concerned with variable position final control elements, so the challenge elevates to computing:
  • the direction to move the valve, pump, compressor, heating element...
  • how far to move it at this moment
  • how long to wait before moving it again
  • whether there should be a delay between measurement and action

Read more

Followers

Powered by Blogger.

About This Blog

categories

Web hosting for webmasters