P, I, D, PI, PD, and PID Control
P, I, D, PI, PD, and PID Control
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.
For example, the pressure was increased from 21 psi to 29 psi. This change increased the valve position from 30% vp to 22% vp.
(29 − 21) psi
K = = −1.0 psi/(%vp)
(22 − 30)%vp
Dead Time (t ) is the between the change in an input variable and when the output variable begins. Dead time is important because it
0
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 1/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
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
where
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 2/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
where
c(t) is the controller output
Ti is the integral time
e(t) is the error
In Equation 9.2.2 , 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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 3/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
where
c(t) is the controller output
Td is the derivative time constant
de is the differential change in error
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 t is shown below in Figure 4. As expected, this graph represents the derivative of the step input graph.
0
Description
Figure 5. Stable data sample.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 4/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
where
c(t) is the controller output,
Kc is the controller gain,
T is the integral time,
i
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 qualitative combination of the P-only and I-only graphs.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 5/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
where
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 6/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
1 de
c(t) = Kc (e(t) + ∫ e(t)dt + Td )+C (9.2.6)
Ti dt
where
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.
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 7/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
1 d (A − Aset )
F B = 1 + Kc [(A − Aset ) + ∫ (A − Aset ) dt + τd ]
τi dt
and
d (A − Aset )
xi =
dt
After you have set up your columns for A − A , d(A − A )/dt , x , and the cells for your parameters like K , τ and τ , you will
set set i c i d
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 ).
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 8/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
EXAMPLE 9.2.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 9.2.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 9.2.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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3A… 9/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
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.
EXAMPLE 9.2.3
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?
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3… 10/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
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.
EXAMPLE 9.2.6
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3… 11/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
Solution
The general equation for a PID controller is:
1 de
c(t) = Kc [e(t) + ∫ e(t)dt + Td ]+C
Ti dt
where
c(t) = controller output
Kc = controller gain
e(t) = error
T = integral time
i
EXAMPLE 9.2.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 K = 1 .
p
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.
t
1 d
G = Kc [1 + ∫ dτ + τD ]
τI 0 dt
Solution: Use Constructing Block Diagrams as a reference when solving this problem.
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3… 12/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
τI (τp − Kc τD ) τI (1 + Kc )
′′ ′ ′′ ′
Y (t) + Y (t) − Y (t) = τI τD R (t) + τI R (t) + R(t)
Kc Kc
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.
Exercise 9.2.1
1
c(t) = Kc [e(t) + ∫ e(t)dt]
Ti
a. Feedforward
b. PID
c. Derivative
d. Proportional Integral
Answer
d
Exercise 9.2.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
Exercise 9.2.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
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.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3… 13/14
8/26/22, 3:30 PM 9.2: P, I, D, PI, PD, and PID control - Engineering LibreTexts
9.2.6: REFERENCES
Astrom, Karl J., Hagglund, Tore., "Advanced PID Control", The Instrumentation, Systems and Automation Society.
Cooper, Douglas J. "Practical Process Control E-Textbook " http://www.controlguru.com
Scrcek, William Y., Mahoney, Donald P., Young, Brent R. "A Real Time Approach to Process Control", 2nd Edition. John Wiley &
Sons, Ltd.
This page titled 9.2: P, I, D, PI, PD, and PID control is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Ardemis
Boghossian, James Brown, Sara Zak, & Sara Zak via source content that was edited to the style and standards of the LibreTexts platform; a detailed
edit history is available upon request.
https://eng.libretexts.org/Bookshelves/Industrial_and_Systems_Engineering/Book%3A_Chemical_Process_Dynamics_and_Controls_(Woolf)/09%3… 14/14