PID lecture
PID lecture
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. The controller attempts to correct the error between
ameasured 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
• 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 including that they are (1) relatively simple to
design and execute and (2) 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. They are (1) inefficient (usingthis control is like driving with full gas
and full breaks), (2) can generate noise when seeking stability (can dramatically
overshoot orundershoot a set-point), and (3) physically wearing on valves and switches
(continuously turning valves/switches fully on and fullyoff causes them to become worn
out much quicker).
Process Gain [k]
• 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.
• 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.
Dead Time [to]
• 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, K will be greater than 1. If the change in the input is greater
than the change in the output, K will be less than 1. Ideally, if K is equal to infinity, the error can be
reduced to zero.
• However, this infinitesimal nature of K 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 earlier, 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 K, and these limits are defined by the system.
• 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.
•
Example of P controller
• 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] controller
• 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.
Philosophy of I-controller
• 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.
• 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
• 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
• 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 T. Because of the
inverse relationship between c(t) and T, 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 T, it takes longer for the
algorithm to determine the proper response.
Derivative [D] controller
• 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 feedforward 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.
• 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
• 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.
Proportional-integral [PI] controller
• 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 to50% slower than P-only control.
• Therefore, in order to increase response time, PI control is often combined with D-only control.
• PI-control correlates the controller output to the error and the integral of the error. This PI-control behavior is
mathematically illustrated in Equation
• 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.
• The plot depicts how T and K 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 K and decreasing T would compound sensitivity and create the
most aggressive controller scenario.
• 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 K and double T.
• 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] controller
• 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.
• 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 .
• 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
Proportional-Integral-Derivative [PID] controller
• 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.
• 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.
• PID control is the combination of all three types of control.
• In the 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.
• 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.
• 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.
• 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.
PID TUNING
• Controller tuning is the process of determining the controller parameters
which produce the desired output.
• Controller tuning allows for optimization of a process and minimizes the
error between the variable of the process and its set point.
• Types of controller tuning methods include the trial and error method, and
process reaction curve methods.
• The most common classical controller tuning methods are the Ziegler-
Nichols and Cohen-Coon methods.
• The Ziegler-Nichols method can be used for both closed and open loop
systems
• while Cohen-Coon is typically used for open loop systems.
TRIAL AND ERROR
• The trial and error tuning method is based on guess-and-check.
• In this method, the proportional action is the main control, while the integral
and derivative actions refine it.
• The controller gain, K , is adjusted with the integral and derivative actions
held at a minimum, until a desired output is obtained.
For flow control
• P or PI control can be used with low controller gain
• Use PI control for more accuracy with high integration activity.
• Derivative control is not considered due to the rapid fluctuations in flow dynamics with lots of noise.
• Kc = 0.4-0.65 ; Ti = 6s
For Level control
• P or PI control can be used, although PI control is more common due to inaccuracies incurred due to
offsets in P-only control
• Derivative control is not considered due to the rapid fluctuations in flow dynamics with lots of noise.
• The following P only setting is such that the control valve is fully open when the vessel is 75% full and
fully closed when 25% full, being half open when 50% filled.
• Kc = 2 Bias b = 50% Set point = 50%
• For PI control: Kc = 2-20 Ti = 1-5 min
For Pressure control
• Tuning here has a large range of possible values of K and T for use in PI
control, depending on if the pressure measurement is in liquid or gas
phase.
• Liquid :Kc = 0.5-2; Ti = 6-15 s
• Gas: Kc = 2-10; Ti = 2-10 min