RTO care

PID control +3

PID Intro

제어 및 operation2016. 7. 13. 11:09

PID Intro

From ControlsWiki

Jump to: navigation, search

<analytics uacct="UA-11196190-1" ></analytics> Title: P, I, D, PI, PD, PID Control

Note:

Video lecture available for this section!

Authors: Ardemis Boghossian, James Brown, Sara Zak

Date Presented: October 19, 2006

Stewards: Ji Sun Sunny Choi, Sang Lee, Jennifer Gehle, Brian Murray, Razili Stanke-Koch, Kelly Martin, Lance Dehne, Sean Gant, Jay Lee, Alex Efta

Date Revised: October 6, 2007

Introduction

Process controls are necessary for designing safe and productive plants. A variety of process controls are used to manipulate processes, however the most simple and often most effective is the PID controller.

   

Much more practical than the typical on/off controller, PID controllers allow for much better adjustments to be made in the system. While this is true, there are some advantages to using an on/off controller:

-relatively simple to design and execute

-binary sensors and actuators (such as an on/off controller) are generally more reliable and less expensive

   

Although there are some advantages, there are large disadvantages to using an on/off controller scheme:

-inefficient (using this control is like driving with full gas and full breaks)

-can generate noise when seeking stability (can dramatically overshoot or undershoot a set-point)

-physically wearing on valves and switches (continuously turning valves/switches fully on and fully off causes them to become worn out much quicker)

   

To allow for much better control and fine-tuning adjustments, most industrial processes use a PID controller scheme.

   

The controller attempts to correct the error between a measured process variable and desired setpoint by calculating the difference and then performing a corrective action to adjust the process accordingly. A PID controller controls a process through three parameters: Proportional (P), Integral (I), and Derivative (D). These parameters can be weighted, or tuned, to adjust their effect on the process. The following section will provide a brief introduction on PID controllers as well as methods to model a controlled system in Excel.

   

The Process Gain(K) is the ratio of change of the output variable(responding variable) to the change of the input variable(forcing function). It specifically defines the sensitivity of the output variable to a given change in the input variable.

   

   

Gain can only be described as a steady state parameter and give no knowledge about the dynamics of the process and is independent of the design and operating variables. A gain has three components that include the sign, the value, the units. The sign indicates how the output responds to the process input. A positive sign shows that the output variable increases with an increase in the input variable and a negative sign shows that the output variable decreases with an increase in the input variable. The units depend on the process considered that depend on the variables mentioned.

   

Example:

The pressure was increased from 21psi to 29psi. This change increased the valve position from 30%vp to 22%vp.

K = (29-21)psi / ((22-30)%vp) = -1.0psi/(%vp)

Dead Time(t0) is the between the change in an input variable and when the output variable begins. Dead time is important because it effects the controllability of the control system. A change in set point is not immediate because of this parameter. Dead time must be considered in tuning and modeling processes.

Types of Control

Process controls are instruments used to control a parameter, such as temperature, level, and pressure. PID controllers are a type of continuous controller because they continually adjust the output vs. an on/off controller, when looking at feed forward or feed backward conditions. An example of a temperature controller is shown in Figure 1.

   

Figure 1. Temperature controller in a CSTR

As shown in Figure 1, the temperature controller controls the temperature of a fluid within a CSTR (Continuous Stirred Tank Reactor). A temperature sensor first measures the temperature of the fluid. This measurement produces a measurement signal. The measurement signal is then compared to the set point, or desired temperature setting, of the controller. The difference between the measured signal and set point is the error. Based on this error, the controller sends an actuating signal to the heating coil, which adjusts the temperature accordingly. This type of process control is known as error-based control because the actuating signal is determined from the error between the actual and desired setting. The different types of error-based controls vary in the mathematical way they translate the error into an actuating signal, the most common of which are the PID controllers. Additionally, it is critical to understand feed-forward and feed-back control before exploring P, I, and D controls. Feed Forward Control Feedback Control

P, I, D, PI, PD, PID Control

As previously mentioned, controllers vary in the way they correlate the controller input (error) to the controller output (actuating signal). The most commonly used controllers are the proportional- integral-derivative (PID) controllers. PID controllers relate the error to the actuating signal either in a proportional (P), integral (I), or derivative (D) manner. PID controllers can also relate the error to the actuating signal using a combination of these controls.

Proportional (P) Control

One type of action used in PID controllers is the proportional control. Proportional control is a form of feedback control. It is the simplest form of continuous control that can be used in a closed-looped system. P-only control minimizes the fluctuation in the process variable, but it does not always bring the system to the desired set point. It provides a faster response than most other controllers, initially allowing the P-only controller to respond a few seconds faster. However, as the system becomes more complex (i.e. more complex algorithm) the response time difference could accumulate, allowing the P-controller to possibly respond even a few minutes faster. Athough the P-only controller does offer the advantage of faster response time, it produces deviation from the set point. This deviation is known as the offset, and it is usually not desired in a process. The existence of an offset implies that the system could not be maintained at the desired set point at steady state. It is analogous to the systematic error in a calibration curve, where there is always a set, constant error that prevents the line from crossing the origin. The offset can be minimized by combining P-only control with another form of control, such as I- or D- control. It is important to note, however, that it is impossible to completely eliminate the offset, which is implicitly included within each equation.

Mathematical Equations

P-control linearly correlates the controller output (actuating signal) to the error (diference between measured signal and set point). This P-control behavior is mathematically illustrated in Equation 1 (Scrcek, et. al).

   

c(t) = Kce(t) + b

(1)

c(t) = controller output

Kc = controller gain

e(t) = error

b = bias

   

In this equation, the bias and controller gain are constants specific to each controller. The bias is simply the controller output when the error is zero. The controller gain is the change in the output of the controller per change in the input to the controller. In PID controllers, where signals are usually electronically transmitted, controller gain relates the change in output voltage to the change in input voltage. These voltage changes are then directly related to the property being changed (i.e. temperature, pressure, level, etc.). Therefore, the gain ultimately relates the change in the input and output properties. If the output changes more than the input, Kc will be greater than 1. If the change in the input is greater than the change in the output, Kc will be less than 1. Ideally, if Kc is equal to infinity, the error can be reduced to zero. However, this infinitesimal nature of Kc increases the instability of the loop because zero error would imply that the the measured signal is exactly equal to the set point. As mentioned in lecture, exact equality is never achieved in control logic; instead, in control logic, error is allowed to vary within a certain range. Therefore, there are limits to the size of Kc, and these limits are defined by the system. Graphical representations of the effects of these variables on the system is shown in PID Tuning via Classical Methods.

As can be seen from the above equation, P-only control provides a linear relationship between the error of a system and the controller output of the system. This type of control provides a response, based on the signal that adjusts the system so that any oscillations are removed, and the system returns to steady-state. The inputs to the controller are the set point, the signal, and the bias. The controller calculates the difference between the set point and the signal, which is the error, and sends this value to an algorithm. Combined with the bias, this algorithm determines the action that the controller should take. A graphical representation of the P-controller output for a step increase in input at time t0 is shown below in Figure 2. This graph is exactly similar to the step input graph itself.

Figure 2. P-controller output for step input.

To illustrate this linear P-control relationship, consider the P-only control that controls the level of a fluid in a tank. Initially, the flow into the tank is equal to the flow out of the tank. However, if the flow out of the tank decreases, the level in the tank will increase because more fluid is entering than is leaving. The P-only control system will adjust the flow out of the tank so that it is again equal to the flow into the tank, and the level will once again be constant. However, this level is no longer equal to the initial level in the tank. The system is at steady-state, but there is a difference between the initial set point and the current position in the tank. This difference is the P-control offset.

Integral (I) Control

Another type of action used in PID controllers is the integral control. Integral control is a second form of feedback control. It is often used because it is able to remove any deviations that may exist. Thus, the system returns to both steady state and its original setting. A negative error will cause the signal to the system to decrease, while a positive error will cause the signal to increase. However, I-only controllers are much slower in their response time than P-only controllers because they are dependent on more parameters. If it is essential to have no offset in the system, then an I-only controller should be used, but it will require a slower response time. This slower response time can be reduced by combining I-only control with another form, such as P or PD control. I-only controls are often used when measured variables need to remain within a very narrow range and require fine-tuning control. I controls affect the system by responding to accumulated past error. The philosophy behind the integral control is that deviations will be affected in proportion to the cumulative sum of their magnitude. The key advantage of adding a I-control to your controller is that it will eliminate the offset. The disadvantages are that it can destabilize the controller, and there is an integrator windup, which increases the time it takes for the controller to make changes.

Mathematical Equations

I-control correlates the controller output to the integral of the error. The integral of the error is taken with respect to time. It is the total error associated over a specified amount of time. This I-control behavior is mathematically illustrated in Equation 2 (Scrcek, et. al).

(2)

c(t) = controller output

Ti = integral time

e(t) = error

c(t0) = controller output before integration

   

In this equation, the integral time is the amount of time that it takes for the controller to change its output by a value equal to the error. The controller output before integration is equal to either the initial output at time t=0, or the controller output at the time one step before the measurement. Graphical representations of the effects of these variables on the system is shown in PID Tuning via Classical Methods.

The rate of change in controller output for I-only control is determined by a number of parameters. While the P-only controller was determined by e, the rate of change for I-only depends on both e and Ti. Because of the inverse relationship between c(t) and Ti, this decreases the rate of change for an I-only controller.

The I-only controller operates in essentially the same way as a P-only controller. The inputs are again the set point, the signal, and the bias. Once again, the error is calculated, and this value is sent to the algorithm. However, instead of just using a linear relationship to calculate the response, the algorithm now uses an integral to determine the response that should be taken. Once the integral is evaluated, the response is sent and the system adjusts accordingly. Because of the dependence on Ti, it takes longer for the algorithm to determine the proper response. A graphical representation of the I-controller output for a step increase in input at time t0 is shown below in Figure 3. As expected, this graph represents the area under the step input graph.

Figure 3. I-controller output for step input.

Derivative (D) Control

Another type of action used in PID controllers is the derivative control. Unlike P-only and I-only controls, D-control is a form of feed forward control. D-control anticipates the process conditions by analyzing the change in error. It functions to minimize the change of error, thus keeping the system at a consistent setting. The primary benefit of D controllers is to resist change in the system, the most important of these being oscillations. The control output is calculated based on the rate of change of the error with time. The larger the rate of the change in error, the more pronounced the controller response will be.

Unlike proportional and integral controllers, derivative controllers do not guide the system to a steady state. Because of this property, D controllers must be coupled with P, I or PI controllers to properly control the system.

Mathematical Equations

D-control correlates the controller output to the derivative of the error. The derivative of the error is taken with respect to time. It is the change in error associated with change in time. This D-control behavior is mathematically illustrated in Equation 3 (Scrcek, et. al).

   

(3)

c(t) = controller output

Td = derivative time constant

de = change in error

dt = change in time

   

Graphical representations of the effects of these variables on the system is shown in PID Tuning via Classical Methods.

Mathematically, derivative control is the opposite of integral control. Although I-only controls exist, D-only controls do not exist. D-controls measure only the change in error. D-controls do not know where the setpoint is, so it is usually used in conjunction with another method of control, such as P-only or a PI combination control. D-control is usually used for processes with rapidly changing process outputs. However, like the I-control, the D control is mathematically more complex than the P-control. Since it will take a computer algorithm longer to calculate a derivative or an integral than to simply linearly relate the input and output variables, adding a D-control slows down the controller's response time. A graphical representation of the D-controller output for a step increase in input at time t0 is shown below in Figure 4. As expected, this graph represents the derivative of the step input graph.

Figure 4. D-controller output for step input.

   

Controller Effects on a System

The following images are intended to give a visual representation of how P, I, and D controllers will affect a system.

   

Description

Figure 5. Stable data sample.

   

   

Figure 6. Data disturbance.

   

   

Figure 7. P-controller effect on data.

   

   

Figure 8. I-controller effect on data.

   

   

Figure 9. D-controller effect on data.

Continue reading to see the results of combining controllers.

   

Proportional-Integral (PI) Control

One combination is the PI-control, which lacks the D-control of the PID system. PI control is a form of feedback control. It provides a faster response time than I-only control due to the addition of the proportional action. PI control stops the system from fluctuating, and it is also able to return the system to its set point. Although the response time for PI-control is faster than I-only control, it is still up to 50% slower than P-only control. Therefore, in order to increase response time, PI control is often combined with D-only control.

   

Mathematical Equations

PI-control correlates the controller output to the error and the integral of the error. This PI-control behavior is mathematically illustrated in Equation 4 (Scrcek, et. al).

   

(4)

c(t) = controller output

Kc = controller gain

Ti = integral time

e(t) = error

C = initial value of controller

   

In this equation, the integral time is the time required for the I-only portion of the controller to match the control provided by the P-only part of the controller.

The equation indicates that the PI-controller operates like a simplified PID-controller with a zero derivative term. Alternatively, the PI-controller can also be seen as a combination of the P-only and I-only control equations. The bias term in the P-only control is equal to the integral action of the I-only control. The P-only control is only in action when the system is not at the set point. When the system is at the set point, the error is equal to zero, and the first term drops out of the equation. The system is then being controlled only by the I-only portion of the controller. Should the system deviate from the set point again, P-only control will be enacted. A graphical representation of the PI-controller output for a step increase in input at time t0 is shown below in Figure 5. As expected, this graph resembles the qualitatitive combination of the P-only and I-only graphs.

Figure 10. PI-controller output for step input.

Effects of Kc and Ti

With a PI control system, controller activity (aggressiveness) increases as Kc and Ti decreases, however they can act individually on the aggressiveness of a controller's response. Consider Figure 11 below with the center graph being a linear second order system base case.

   

Figure 11. Effects of Kc and Ti [2]

The plot depicts how Ti and Kc both affect the performance of a system, whether they are both affecting it or each one is independently doing so. Regardless of integral time, increasing controller gain (moving form bottom to top on the plot) will increase controller activity. Similarly, decreasing integral time (moving right to left on the plot) will increase controller activity independent of controller gain. As expected, increasing Kc and decreasing Ti would compound sensitivity and create the most aggressive controller scenario.

   

   

With only two interacting parameters in PI control systems, similar performance plots can still cause confusion. For example, plots A and B from the figure both look very similar despite different parameters being affected in each of them. This could cause further problems and create a wildly aggressive system if the wrong parameter is being corrected. While trial and error may be feasible for a PI system, it becomes cumbersome in PID where a third parameter is introduced and plots become increasingly similar.

   

   

Another noteworthy observation is the plot with a normal Kc and double Ti. The plot depicts how the proportional term is practical but the integral is not receiving enough weight initially, causing the slight oscillation before the integral term can finally catch up and help the system towards the set point.

   

Proportional-Derivative (PD) Control

Another combination of controls is the PD-control, which lacks the I-control of the PID system. PD-control is combination of feedforward and feedback control, because it operates on both the current process conditions and predicted process conditions. In PD-control, the control output is a linear combination of the error signal and its derivative. PD-control contains the proportional control's damping of the fluctuation and the derivative control's prediction of process error.

   

Mathematical Equations

As mentioned, PD-control correlates the controller output to the error and the derivative of the error. This PD-control behavior is mathematically illustrated in Equation 5 (Scrcek, et. al).

   

(5)

c(t) = controller output

Kc = proportional gain

e = error

C = initial value of controller

   

The equation indicates that the PD-controller operates like a simplified PID-controller with a zero integral term. Alternatively, the PD-controller can also be seen as a combination of the P-only and D-only control equations. In this control, the purpose of the D-only control is to predict the error in order to increase stability of the closed loop system. P-D control is not commonly used because of the lack of the integral term. Without the integral term, the error in steady state operation is not minimized. P-D control is usually used in batch pH control loops, where error in steady state operation does not need to be minimized. In this application, the error is related to the actuating signal both through the proportional and derivative term. A graphical representation of the PD-controller output for a step increase in input at time t0 is shown below in Figure 6. Again, this graph is a combination of the P-only and D-only graphs, as expected.

Figure 12. PD-controller output for step input.

Proportional-Integral-Derivative (PID) Control

Proportional-integral-derivative control is a combination of all three types of control methods. PID-control is most commonly used because it combines the advantages of each type of control. This includes a quicker response time because of the P-only control, along with the decreased/zero offset from the combined derivative and integral controllers. This offset was removed by additionally using the I-control. The addition of D-control greatly increases the controller's response when used in combination because it predicts disturbances to the system by measuring the change in error. On the contrary, as mentioned previously, when used individually, it has a slower response time compared to the quicker P-only control. However, although the PID controller seems to be the most adequate controller, it is also the most expensive controller. Therefore, it is not used unless the process requires the accuracy and stability provided by the PID controller.

   

Mathematical Equations

PID-control correlates the controller output to the error, integral of the error, and derivative of the error. This PID-control behavior is mathematically illustrated in Equation 6 (Scrcek, et. al).

   

(6)

c(t) = controller output

Kc = controller gain

e(t) = error

Ti = integral time

Td = derivative time constant

C = intitial value of controller

   

As shown in the above equation, PID control is the combination of all three types of control. In this equation, the gain is multiplied with the integral and derivative terms, along with the proportional term, because in PID combination control, the gain affects the I and D actions as well. Because of the use of derivative control, PID control cannot be used in processes where there is a lot of noise, since the noise would interfere with the predictive, feedforward aspect. However, PID control is used when the process requires no offset and a fast response time. A graphical representation of the PID-controller output for a step increase in input at time t0 is shown below in Figure 7. This graph resembles the qualitative combination of the P-only, I-only, and D-only graphs.

Figure 7. PID-controller output for step input.

In addition to PID-control, the P-, I-, and D- controls can be combined in other ways. These alternative combinations are simplifications of the PID-control.

   

Note: Order of e(t)

The order of the elements in the e(t) can vary depending on the situation. It could be the fixed element minus the varying element or the other way around. To better illustrate the concept let's go to an example. Let's say you are creating a PID control to control the fluid level in a tank by manipulating the outlet valve. When the fluid level in the tank exceeds your set value, you will want the valve to open up more to allow more flow out of the tank. You are looking for a positive response. Therefore your e(t) should give a positive value when the fluid level is higher than the set. In this case your e(t) will be (V-Vset). The same logic can be used for other systems to determine what the e(t) should be in the PID controls.

   

Modeling PID Controllers With Euler in Excel

As with many engineering systems, PID controllers can be modeled in Excel via numerical methods such as Euler's Method. First begin with the initial value for a given parameter. Determine the change in that parameter at a certain time-step by summing the three controllers P, I, and D at that step, which are found using the equations listed in the P, I, D, PI, PD, PID Control section above. Take this change, multiply it by the chosen time-step and add that to the previous value of the parameter of interest. For more detailed information see Numerical ODE Solving in Excel. An example of a chemical engineering problem that uses this method can be seen in Example 4 below.

Troubleshooting PID Modeling in Excel

When setting up an Excel spreadsheet to model a PID controller, you may receive an error message saying that you have created a circular reference. Say you are controlling the flow rate of one reactant (B) to a reactor which is dependent upon the concentration of another reactant (A) already inside the reactor. Your PID equations look as follows:

   

After you have set up your columns for A - Aset, d(A - Aset)/dt, xi, and the cells for your parameters like Kc, taui and taud, you will need to set up your PID column with your PID equation in it. After entering your equation into the first cell of the PID column, you may receive the Circular Reference error message when trying to drag the equation down to the other cells in your column.

There are two things you can do:

  1. It is likely that you need to start your PID equation in the second or third cell of your PID column. Enter reasonable values into the first couple of cells before you start the PID equation, and you will find that these values shouldn't affect the end result of your controller.
  2. You can also try decreasing the step size (Δt).

   

Summary Tables

A summary of the advantages and disadvantages of the three controls is shown below is shown in Table 1.

   

Table 1. Advantages and disadvantages of controls

   

A guide for the typical uses of the various controllers is shown below in Table 2.

Table 2. Typical uses of P, I, D, PI, and PID controllers

   

A summary of definitions of the terms and symbols are shown below in Table 3.

   

Table 3. Definitions of terms and symbols.

Example 1

Hypothetical Industries has just put you in charge of one of their batch reactors. Your task is to figure out a way to maintain a setpoint level inside of the reactor. Your boss wants to use some type regulator controller, but he is not quite sure which to use. Help your boss find the right type of controller. It is extremely important that the level inside the reactor is at the setpoint. Large fluctuation and error cannot be tolerated.

   

SOLUTION:

You would want to use a PID controller. Because of the action of P control, the system will respond to a change very quickly. Due to the action of I control, the system is able to be returned to the setpoint value. Finally, because it is so critical for the system to remain at a constant setpoint, D control will measure the change in the error, and help to adjust the system accordingly.

Example 2

You go back to your high school and you notice an oven in your old chemistry class. The oven is used to remove water from solutions. Using your knowledge from ChE 466, you begin to wonder what type of controller the oven uses to maintain its set temperature. You notice some high school students eager to learn, and you decide to share your knowledge with them in hopes of inspiring them to become Chemical Engineers. Explain to them the type of controller that is most likely located within the oven, and how that controller works.

   

SOLUTION:

Since the oven is only used to remove water from a solution, fluctuation, error, and lag between the set point and the actual temperature are all acceptable. Therefore, the easiest and simplest controller to use would be the On-Off controller.

The On-Off controller turns on the heating mechanism when the temperature in the oven is below the setpoint temperature. If the temperature of the oven increases above the set temperature, the controller will turn the heating mechanism off.

Example 3

Having taken your advice, your boss at Hypothetical Industries decides to install a PID controller to control the level in the batch reactor. When you first start up the reactor, the controller initially received a step input. As the reactor achieves steady state, the level in the reactor tends to fluctuate, sending pulse inputs into the controller. For a pulse input, provide a grahical representation of the PID controller output.

Figure 8. Pulse input.

SOLUTION:

The PID-controller output will be a combination of the P-only, I-only and D-only controller outputs. Analogous to the P-controller output for the step input, the P-controller output for the pulse input will exactly resemble the input.

Figure 9. P-controller output for pulse input.

The I-controller output represents the area under the input graph. Unlike the step input, the area under the pulse input graph dropped back down to zero once the pulse has passed. Therefore, rather than continually increase, the I-controller output graph will level off in the end.

Figure 10. I-controller output for pulse input.

The D-controller output represents the derivative of the input graph. The derivative at the first discontinuity of the graph would be positive infinity. The derivative of the second downward discontinuity is negative infinity.

Figure 11. D-controller output for pulse input.

Combining the qualitative characteristics of all three graphs we can determine the PID-controller output for a pulse input.

Figure 12. PID-controller output for pulse input.

Example 4

Different kinds of disturbances are possible when determining the PID controller robustness. These different disturbances are used to simulate changes that might occur within your system. For a CSTR reactor, you decide to heat up your system to account for the cold outside weather. The disturbance in the input temperature is a ramp disturbance, as shown in figure #. If the controller responds to the input temperature, what will be the PID controller output?

Figure 13. Ramp input.

SOLUTION: Using a controller with a p-only controller only, we will see a proportional change in the controller output corresponding to the input variable change. See figure 14 below

Figure 14. P-controller output for ramp input.

Using an I-only controller, we will see the controller corresponding to the area under the graph, which in this case, seem to increase exponentially with the ramp geometry.

Figure 15. I-controller output for ramp input.

Using a D-only controller, we will see a step response to the ramp disturbance. This is because the D-component corresponds to the derivative, and a ramp input shows a constant slope (positive in this case) which is different than the starting condition slope (zero usually). See figure 16.

Figure 16. D-controller output for ramp input.

Using a PID controller, the three components all come to play in the controller output. As we would expect, the result will be just a simple addition of the three separate component graphs.

Figure 17. D-controller output for ramp input.

Example 5

Following is a P&ID of the process A+B-->C.

Figure 18. P&ID for a reaction process.

What is the PID controller expression on V3 controlling the volume in TK001 to a setpoint of 50 liters? Note: The PID controller uses LC1 to measure the volume.

   

SOLUTION: The general equation for a PID controller is:

c(t) = controller output

Kc = controller gain

e(t) = error

Ti = integral time

Td = derivative time constant

C = intitial value of controller

   

Therefore, for this example, the solution is:

Example 6

In this problem, the differential equations describing a particular first-order system with a PID controller will be determined. This is designed to show how well-defined systems can be modeled or explained mathematically. As a supplement to this problem, visit Constructing Block Diagrams. Note that this is an example of solution using integro-differential operators rather than Laplace transforms. Here we have set Kp = 1.

Consider a general first-order process:

τpY'(t) + Y(t) = X(t)

Where Y(t) is the output of the system and X(t) is the input. Add a PID controller to the system and solve for a single, simple differential equation. The operator or equation for a PID controller is below. Assume there is no dead time in the measurement.

Solution: Use Constructing Block Diagrams as a reference when solving this problem.

Equations defining system,

Process: τpY'(t) + Y(t) = X(t)

Controller: X(t) = Gε(t)

Comparator: ε(t) = R(t) M(t)

Measurement: M(t) = Y(t)

When these equations are combined into one equation, the following equation results. This is achieved by adding the measurement to the comparator to the controller to the process equation.

τpY'(t) + Y(t) = G(R(t) Y(t))

Substituting the controller operator and then evaluating yields:

   

Because there is an integral in the differential equation, it is necessary to take the derivative with respect to time.

   

To put this in standard notation for solving a second order differential equation, the Y(t) need to be on one side, and the R(t) terms need to be on the opposite side. Also, the coefficient of the Y(t) term needs to be one.

The above equation can then be solved by hand or using a program such as Mathematica. If using a computer program, different values for the control parameters Kc, τI, τD can be chosen, and the response to a change in the system can be evaluated graphically.

Multiple Choice Question 1

What type of controller is displayed by the equation below?

a.) Feedforward

b.) PID

c.) Derivative

d.) Proportional Integral

Answer: d

Multiple Choice Question 2

Which type of controller increases the stability of the system by keeping it at a consistent setting?

a.) Derivative

b.) Proportional

c.) On-Off

d.) Integral

Answer: a

Multiple Choice Question 3

Which type of controller increases the speed of response to reach the desired set point the fastest while eliminating offset?

a.) On-Off

b.) Proportional

c.) Integral

d.) Proportional-Integral

Answer: d

Example 4

  • Note that the problem and values used in it are fictional!*

A microbiology laboratory discovered a deadly new strain of bacteria, named P. Woolfi, in the city's water supply. In order to sterilize the water, the bacteria has to be heat killed at a temperature of 105 degrees Celsius. However, this is above the boiling point of water at 1 atm and the bacteria is only susceptible to heat when in liquid due to spore formation when in gas or vapor. To accomplish this sterilization it was suggested that an auto-clave be used to keep the water in the liquid state by keeping it at a pressure of 5 atm while heated for 30 seconds. The auto-clave can only handle up to 7 atm of pressure before exploding, so to ensure that the process is running at the desired specifications, a PID Controller Model must be created in Excel. See figure 18 for a visual of the system.

Figure 18.Auto-clave with PID Controls for Temperature and Pressure

   

Click on this link for the worked out Excel Solution

   

   

Explanation:

To simulate the real situation of pressure varying in the system, column B calls an equation to generate a random fluctuation in pressure. Pset is simply the desired specification. Error is the difference between the set pressure and measured signal. du/dt is the sum of the P, I, and D terms. The equations used to calculate each of these can be found in the article, these take into account the error associated with each time-step. dU/dt is the parameter that is varied in order to correct for the difference between the measured pressure and desired pressure.

Sage's Corner

Super PID Brothers

   

Slides without narration

Multiple Choice

   

   

Glucose Level

   

Glucose Level Spreadsheet

Glucose Level Slides without narration

References

[1] Astrom, Karl J., Hagglund, Tore., "Advanced PID Control", The Instrumentation, Systems and Automation Society. [2] Cooper, Douglas J. "Practical Process Control E-Textbook " http://www.controlguru.com [3] Scrcek, William Y., Mahoney, Donald P., Young, Brent R. "A Real Time Approach to Process Control", 2nd Edition. John Wiley & Sons, Ltd. [4] www.wikipedia.org

   

출처: <https://controls.engin.umich.edu/wiki/index.php/PIDIntro>

'제어 및 operation' 카테고리의 다른 글

통신 이야기  (0) 2016.09.22
PLC 기초 해설  (0) 2016.09.22
PID Controller  (0) 2016.07.13
PID control design  (0) 2016.07.13
모터의 PID 제어  (0) 2016.07.13

PID control

제어 및 operation2016. 7. 13. 11:01

Tuning a PID (Three-Mode) Controller

   

Controller Operation

There are three common types of Temperature/process controllers: ON/OFF, PROPORTIONAL, and PID (PROPORTIONAL INTEGRAL DERIVATIVE).

On/Off CONTROL

An on-off controller is the simplest form of temperature control device. The output from the device is either on or off, with no middle state. An on/off controller will switch the output only when the temperature crosses the setpoint. For heating control, the output is on when the temperature is below the setpoint, and off above the setpoint.

Although capable of more complex control functions, the NEWPORT microprocessor based MICRO-INFINITY ® AUTOTUNE PID 1/16 DIN Controller can be operated as a simple On/Off Controller. The NEWPORT INFINITY ® series and INFINITY C ® series of highly accurate microprocessor based digital panel meters can all function as simple On/Off controllers.

With simple On/Off control, since the temperature crosses the setpoint to change the output state, the process temperature will be cycling continually, going from below setpoint to above, and back below. In cases where this cycling occurs rapidly, and to prevent damage to contactors and valves, an on-off differential, or "hysteresis," is added to the controller operations. This differential requires that the temperature exceed setpoint by a certain amount before the output will turn off or on again. On-off differential prevents the output from "chattering" or fast, continual switching if the temperature cycling above and below setpoint occur very rapidly.

"On-Off" is the most commonly used form of control, and for most applications it is perfectly adequate. It's used where a precise control is not necessary, in systems which cannot handle the energy being turned on and off frequently, and where the mass of the system is so great that temperatures change extremely slowly.

Backup alarms are typically controlled with "On-Off" relays. One special type of on-off control used for alarm is a limit controller. This controller uses a latching relay, which must be manually reset, and is used to shut down a process when a certain temperature is reached.

Proportional Control

Proportional control is designed to eliminate the cycling above and below the setpoints associated with On-Off control. A proportional controller decreases the average power being supplied to a heater for example, as the temperature approaches setpoint. This has the effect of slowing down the heater, so that it will not overshoot the setpoint, but will approach the setpoint and maintain a stable temperature.

This proportioning action can be accomplished by different methods. One method is with an analog control output such as a 4-20 mA output controlling a valve or motor for example. With this system, with a 4 mA signal from the controller, the valve would be fully closed, with 12 mA open halfway, and with 20 mA fully open.

Another method is "time proportioning" i.e. turning the output on and off for short intervals to vary the ratio of "on" time to "off" time to control the temperature or process.

With the analog output option, the NEWPORT INFINITY ® series and INFINITY C ® series of 1/8 DIN digital panel meters can function as proportional controllers. In addition, NEWPORT offers models of "INFINITY C" for thermocouple and RTD inputs featuring Time-Proportioning Control with its built in mechanical relays.

With proportional control, the proportioning action occurs within a "proportional band" around the setpoint temperature. Outside this band, the controller functions as an on-off unit, with the output either fully on (below the band) or fully off (above the band). However, within the band, the output is turned on and off in the ratio of the measurement difference from the setpoint. At the setpoint (the midpoint of the proportional band), the output on:off ratio is 1:1; that is, the on-time and off-time are equal. If the temperature is further from the setpoint, the on- and off-times vary in proportion to the temperature difference. If the temperature is below setpoint, the output will be on longer; if the temperature is too high, the output will be off longer.

The proportional band is usually expressed as a percent of full scale, or degrees. It may also be referred to as gain, which is the reciprocal of the band. Note, that in time proportioning control, full power is applied to the heater, but cycled on and off, so the average time is varied. In most units, the cycle time and/or proportional band are adjustable, so that the controller may be better matched to a particular process.

One of the advantages of proportional control is the simplicity of operation. However, the proportional controller will generally require the operator to manually "tune" the process, i.e. to make a small adjustment (manual reset) to bring the temperature to setpoint on initial startup, or if the process conditions change significantly.

Systems that are subject to wide temperature cycling need proportional control. Depending on the precision required, some processes may require full "PID" control.

PID (Proportional Integral Derivative)

Processes with long time lags and large maximum rate of rise (e.g., a heat exchanger), require wide proportional bands to eliminate oscillation. The wide band can result in large offsets with changes in the load. To eliminate these offsets, automatic reset (integral) can be used. Derivative (rate) action can be used on processes with long time delays, to speed recovery after a process disturbance.

The most sophisticated form of discrete control available today combines PROPORTIONAL with INTEGRAL and DERIVATIVE or PID .

The NEWPORT MICRO-INFINITY® is a full function "Autotune" (or self-tuning) PID controller which combines proportional control with two additional adjustments, which help the unit automatically compensate to changes in the system. These adjustments, integral and derivative, are expressed in time-based units; they are also referred to by their reciprocals, RESET and RATE, respectively.

The proportional, integral and derivative terms must be individually adjusted or "tuned" to a particular system.

It provides the most accurate and stable control of the three controller types, and is best used in systems which have a relatively small mass, those which react quickly to changes in energy added to the process. It is recommended in systems where the load changes often, and the controller is expected to compensate automatically due to frequent changes in setpoint, the amount of energy available, or the mass to be controlled.

The "autotune" or self-tuning function means that the MICRO-INFINITY will automatically calculate the proper proportional band, rate and reset values for precise control.

   

Temperature Control

Tuning a PID (Three-Mode) Controller

Tuning a temperature controller involves setting the proportional, integral, and derivative values to get the best possible control for a particular process. If the controller does not include an autotune algorithm or the autotune algorithm does not provide adequate control for the particular application, the unit must then be tuned using a trial and error method.

The following is a tuning procedure for the NEWPORT® MICRO-INFINITY ® controller. It can be applied to other controllers as well. There are other tuning procedures which can also be used, but they all use a similar trial and error method. Note that if the controller uses a mechanical relay (rather than a solid state relay) a longer cycle time (10 seconds) is recommended when starting out.

   

The following definitions may be needed:

  • Cycle time Also known as duty cycle; the total length of time for the controller to complete one on/off cycle. Example: with a 20 second cycle time, an on time of 10 seconds and an off time of 10 seconds represents a 50 percent power output. The controller will cycle on and off while within the proportional band.
  • Proportional band A temperature band expressed in degrees (if the input is temperature), or counts (if the input is process) from the set point in which the controllers' proportioning action takes place. The wider the proportional band the greater the area around the setpoint in which the proportional action takes place. It is sometimes referred to as gain, which is the reciprocal of proportional band.
  • Integral, also known as reset, is a function which adjusts the proportional bandwidth with respect to the setpoint, to compensate for offset (droop) from setpoint, that is, it adjusts the controlled temperature to setpoint after the system stabilizes.
  • Derivative, also known as rate, senses the rate of rise or fall of system temperature and automatically adjusts the proportional band to minimize overshoot or undershoot.

    A PID (three-mode) controller is capable of exceptional control stability when properly tuned and used. The operator can achieve the fastest response time and smallest overshoot by following these instructions carefully. The information for tuning this three mode controller may be different from other controller tuning procedures. Normally an AUTO PID tuning feature will eliminate the necessity to use this manual tuning procedure for the primary output, however, adjustments to the AUTO PID values may be made if desired.

    After the controller is installed and wired:

    1. Apply power to the controller.

    2. Disable the control outputs. (Push enter twice)

    3. Program the controller for the correct input type (See Quick Start Manual).

    4. Enter desired value for setpoint 1

    5. For time proportional relay output, set the cycle time to 10 seconds or greater.

  • Press MENU until OUT1 is displayed.
  • Press ENTER to access control output 1 submenu.
  • Press MENU until cycle time is displayed.
  • Press ENTER to access cycle time setting.
  • Use MAX and MIN to set new cycle time value.
  • Press ENTER when finished.

    6. Set prop band in degrees to 5% of setpoint 1. (If setpoint 1 = 100, enter 0005. Prop band = 95 to 110). Note: Micro-Infinity takes degrees ( if input is temperature) / counts (if input is process) as Proportional Band value.

  • If ID is disabled: - Press MENU 1 time from run mode to get to setpoint 1; confirm SP1 LED is flashing. - Use MAX and MIN to set new setpoint value.
  • If ID is enabled: - Press MENU until Set Point is displayed. - Press ENTER to access setpoint 1 setting. - Use MAX and MIN to set new setpoint value.
  • Press ENTER to stored setting when finished.

    7. Set reset and rate to 0.

  • Press MENU until OUT1 is displayed.
  • Press ENTER to access control output 1 submenu.
  • Press MENU until autopid is displayed.
  • Press ENTER to access autopid setting.
  • Press MAX to disable autopid; press ENTER when done.
  • Press MENU until Reset Setup is displayed.
  • Press ENTER to access Reset setting.
  • Use MAX and MIN to set Reset to 0; press ENTER to store the new setting.
  • Display advances to Rate Setup.
  • Press ENTER to access Rate setting.
  • Use MAX and MIN to set Rate to 0; press ENTER to store the new setting.
  • Press MIN 2 times to return to run-mode. Should the unit reset, press ENTER twice to put it into stand-by mode.

    NOTE: On units with dual three-mode outputs, the primary and secondary proportional parameter is independently set and may be tuned separately. The procedure used in this section is for a HEATING primary output. A similar procedure may be used for a primary COOLING output or a secondary COOLING output.

    A. TUNING OUTPUTS FOR HEATING CONTROL

    • Enable the OUTPUT (Press Enter) and start the process.
    • The process should be run at a setpoint that will allow the temperature to stabilize with heat input required.
    • With RATE and RESET turned OFF, the temperature will stabilize with a steady state deviation, or droop, between the setpoint and the actual temperature. Carefully note whether or not there are regular cycles or oscillations in this temperature by observing the measurement on the display. (An oscillation may be as long as 30 minutes). 3. The tuning procedure is easier to follow if you use a recorder to monitor the process temperature.
    • If there are no regular oscillations in the temperature, divide the PB by 2 (see Figure 1). Allow the process to stabilize and check for temperature oscillations. If there are still no oscillations, divide the PB by 2 again. Repeat until cycles or oscillations are obtained. Proceed to Step 5.
    • If oscillations are observed immediately, multiply the PB by 2. Observe the resulting temperature for several minutes. If the oscillations continue, increase the PB by factors of 2 until the oscillations stop.
    • The PB is now very near its critical setting. Carefully increase or decrease the PB setting until cycles or oscillations just appear in the temperature recording.
    • If no oscillations occur in the process temperature even at the minimum PB setting skip Steps 6 through 15 below and proceed to paragraph B.
    • Read the steady-state deviation, or droop, between setpoint and actual temperature with the "critical" PB setting you have achieved. (Because the temperature is cycling a bit, use the average temperature.)
    • Measure the oscillation time, in minutes, between neighboring peaks or valleys (see Figure 2). This is most easily accomplished with a chart recorder, but a measurement can be read at one minute intervals to obtain the timing.

         

    • Now, increase the PB setting until the temperature deviation, or droop, increases 65%. The desired final temperature deviation can be calculated by multiplying the initial temperature deviation achieved with the CRITICAL PB setting by 1.65 (see Figure 3). Try several trial-and-error settings of the PB control until the desired final temperature deviation is achieved.
    • You have now completed all the necessary measurements to obtain optimum performance from the Controller. Only two more adjustments are required — RATE and RESET.
    • Using the oscillation time measured in Step 7, calculate the value for RESET in repeats per minutes as follows:
      RESET = (5/8 ) x To
      Where To = Oscillation Time in Seconds. Enter the value for RESET in OUT 1 (follow the same procedure as outlined in preparation section, step 7 to set RESET).
    • Again using the oscillation time measured in Step 7, calculate the value for RATE in minutes as follows:
      RATE = To 10
      Where T = Oscillation Time in Seconds. Enter this value for RATE in OUT 1 (follow the same procedure as outline in preparation section, step 7 to set RATE).
    • If overshoot occurred, it can be reduced by increasing the proportional band and the RESET time. When changes are made in the RESET value, a corresponding change should also be made in the RATE adjustment so that the RATE value is equal to:
      RATE = (4/25) x RESET
    • Several setpoint changes and consequent Prop Band, RESET and RATE time adjustments may be required to obtain the proper balance between "RESPONSE TIME" to a system upset and "SETTLING TIME". In general, fast response is accompanied by larger overshoot and consequently shorter time for the process to "SETTLE OUT". Conversely, if the response is slower, the process tends to slide into the final value with little or no overshoot. The requirements of the system dictate which action is desired.
    • When satisfactory tuning has been achieved, the cycle time should be increased to save contactor life (applies to units with time proportioning outputs only. Increase the cycle time as much as possible without causing oscillations in the measurement due to load cycling.
    • Proceed to Section C.

    B. TUNING PROCEDURE WHEN NO OSCILLATIONS ARE OBSERVED

    • Measure the steady-state deviation, or droop, between setpoint and actual temperature with minimum PB setting.
    • Increase the PB setting until the temperature deviation (droop) increases 65%.
    • Set the RESET in OUT1 to a low value (50 secs). Set the RATE to zero (0 secs). At this point, the measurement should stabilize at the setpoint temperature due to reset action.
    • Since we were not able to determine a critical oscillation time, the optimum settings of the reset and rate adjustments must be determined by trial and error. After the temperature has stabilized at setpoint, increase the setpoint temperature setting by 10 degrees. Observe the overshoot associated with the rise in actual temperature. Then return the setpoint setting to its original value and again observe the overshoot associated with the actual temperature change.
    • Excessive overshoot implies that the Prop Band and/or RESET are set too low, and/or RATE value is set too high. Overdamped response (no overshoot) implies that the Prop Band and/or RESET is set too high, and/or RATE value is set too low. Refer to Figure 4. Where improved performance is required, change one tuning parameter at a time and observe its effect on performance when the setpoint is changed. Make incremental changes in the parameters until the performance is optimized. Figure 4 Setting RESET and/or RATE PV

         

    • When satisfactory tuning has been achieved, the cycle time should be increased to save contactor life (applies to units with time proportioning outputs only.). Increase the cycle time as much as possible without causing oscillations in the measurement due to load cycling.

    C. TUNING THE PRIMARY OUTPUT FOR COOLING CONTROL

    The same procedure is used as defined for heating. The process should be run at a setpoint that requires cooling control before the temperature will stabilize.

    D. SIMPLIFIED TUNING PROCEDURE FOR PID CONTROLLERS

    The following procedure is a graphical technique of analyzing a process response curve to a step input. It is much easier with a strip chart recorder reading the process variable (PV).

    • Starting from a cold start (PV at ambient), apply full power to the process without the controller in the loop, i.e., open loop. Record this starting time.
    • After some delay (for heat to reach the sensor), the PV will start to rise. After more of a delay, the PV will reach a maximum rate of change (slope). Record the time that this maximum slope occurs, and the PV at which it occurs. Record the maximum slope in degrees per minute. Turn off system power.
    • Draw a line from the point of maximum slope back to the ambient temperature axis to obtain the lumped system time delay Td (see Figure 5) . The time delay may also be obtained by the equation: Td = time to max. slope – (PV at max. slope – Ambient)/max. slope
    • Apply the following equations to yield the PID parameters: Pr. Band = Td x max. slope Reset = Td/0.4 secs. Rate = 0.4 x Td minutes
    • Restart the system and bring the process to setpoint with the controller in the loop and observe response. If the response has too much overshoot, or is oscillating, then the PID parameters can be changed (slightly, one at a time, and observing process response) in the following directions: 5. Refer to figure 4, vary the proportional band, the Reset value, and the Rate value to achieve best performance.

    Example: The chart recording in Figure 5 was obtained by applying full power to an oven. The chart scales are 10°F/cm, and 5 min/cm. The controller range is -200 - 900°F, or a span of 1100°F. Maximum slope = 18°F/5 minutes = 3.6°F/minutes. Time delay = Td = approximately 7 minutes.

    Proportional Band = 7 minutes x 3.6°F / minutes = 25.2°F.

    Note: Prop Band in Micro-Infinity is set in degrees/ counts. Reset = 7/.04 minutes = 17.5 min. or 1050 secs. Note: Reset in Micro-Infinity is specified in seconds Rate = 0.4 x 7 minutes = 2.8 min. or 168 secs.

    Set Prop Band to: 025.0; Set Reset to: 1050 Set Rate to: 168 Follow step 6 and 7 of the preparation section to set new values for Prop Band, Reset, and Rate.

       

    원본 위치 <http://www.newportus.com/products/techncal/techncal.htm>

       

'제어 및 operation' 카테고리의 다른 글

PID 제어기  (0) 2016.07.13
Noise  (0) 2016.07.13
전달함수  (0) 2016.06.27
오차  (0) 2016.06.27
PID control  (0) 2016.06.27

PID control

제어 및 operation2016. 6. 27. 11:29

PID 제어기기의 일반적인 특징은 다음과 같다.

  1. PID 제어기는 구조가 간단하고 제어 성능이 우수하며, 제어이득 조정이 비교적 쉽기 때문에, 산업현장에서 80%이상을 차지할 정도로 많이 사용되고 있다. PID 제어는 비례제어, 적분제어, 마분제어를 단독으로 사용하거나 혹은 두가지 이상을 결합한 형태로 사용한다.
  2. 비례(P) 제어는 PID 제어기에서 반드시 사용하는 자장 기본적인 제어이며 구현하기 쉽다. 그러나, 비례제어 만으로는 플렌트에 적분기가 없을 경우에 정상상태 오차가 발생하기 쉽다.
  3. 적분(I) 제어는 주로 정상상태 오차를 없애기 위해 사용된다. 그러나, 적분 이득을 잘못 조정하면 과도한 오버슈트가 발생하거나 시스템이 불안해 진다.
  4. 미분(D) 제어는 잘 활용하면 안정성에 기인하고, 예측 기능이 있어 응답속도를 조절 할 수 있다. 하지만 시스템ㅇ 잡음 성분이 있을 때, 미분 값이 커지게 되어 제어 입력에 나쁜 영향을 미치는 단점이 나타난다.
  5. PID 제어기의 계수들은 근궤적 기법, 주파수 응답기법, 분석적 방법 등을 사용하여 설계할 수 있다.
  6. PID 제어기에 구동기를 연결하여 사용할 때, 구동기의 포화특성이 있으면 적분누적 integrator windup 현상이 생겨 불안정하게 되는데, 이를 막기 위하여 누적 방지 anti-windup 기법을 사용하여야 한다.
  7. PID 제어기의 형태는 병렬형이 기본형이지만, 실재로 구현할 때에는 필요에 따라 직렬형으로 하거나 미분기 필터를 부착하는 등 여러가지로 변형되어 쓰인다.
  8. PID 계수들을 자동적으로 조정하는 것을 auto-tunning 이라 하며, 산업계에서 많이 필요로 하고 있다. 대표적인 방법으로는 Ziegler-Nichols 동조법, Relay 동조법 등이 있으며, 이 방법들은 제어대상 시스템의 모델을 사용하지 않고 간단한 동조 과정을 거쳐 PID 계수를 결정한다.

       

'제어 및 operation' 카테고리의 다른 글

PID control  (0) 2016.07.13
전달함수  (0) 2016.06.27
오차  (0) 2016.06.27
PID  (0) 2016.06.27
자동제어 용어(일반)/ KS A 3008  (0) 2016.06.27