In Fig. 16.1, the valve could be controlling the gas going to a heater, the chilling of a cooler, the pressure in a pipe, the flow through a pipe, the level in a tank, or any other process control system.
Fig. 16.1 PID controller
What the PID controller is looking at is the difference (or “error”) between the PV and the SP. It looks at the absolute error and the rate of change of error. Absolute error means-is there a big difference in the PV and SP or a little difference? Rate of change of error means-is the difference between the PV or SP getting smaller or larger as time goes on.
When there is a “process upset”, meaning, when the process variable or the setpoint quickly changes-the PID controller has to quickly change the output to get the process variable back equal to the setpoint. [2] If you have a walk-in cooler with a PID controller and someone opens the door and walks in, the temperature (process variable) could rise very quickly. Therefore the PID controller has to increase the cooling (output) to compensate for this rise in temperature.
Once the PID controller has the process variable equal to the setpoint, a good PID controller will not vary the output. You want the output to be very steady (not changing) . If the valve (motor, or other control element) is constantly changing, instead of maintaining a constant value, this could cause more wear on the control element.
So there are these two contradictory goals. Fast response (fast change in output) when there is a “process upset”, but slow response (steady output) when the PV is close to the setpoint.
Note that the output often goes past (over shoots) the steady-state output to get the process back to the setpoint. For example, a cooler may normally have its cooling valve open 34% to maintain zero degrees (after the cooler has been closed up and the temperature settled down) . If someone opens the cooler, walks in, walks around to find something, then walks back out, and then closes the cooler door-the PID controller is freaking out because the temperature may have raised 20 degrees! So it may crank the cooling valve open to 50, 75, or even 100 percent-to hurry up and cool the cooler back down-before slowly closing the cooling valve back down to 34 percent. [3]
Let’s think about how to design a PID controller.
We focus on the difference (error) between the process variable (PV) and the setpoint (SP). There are three ways we can view the error.
This means how big is the difference between the PV and SP. If there is a small difference between the PV and the SP-then let’s make a small change in the output. If there is a large difference in the PV and SP-then let’s make a large change in the output. Absolute error is the “proportional” (P) component of the PID controller. The sum of errors over time
Give us a minute and we will show why simply looking at the absolute error (proportional) only is a problem. The sum of errors over time is important and is called the “integral” (I) component of the PID controller. Every time we run the PID algorithm we add the latest error to
the sum of errors. In other words Sum of Errors=Error1+Error2+Error3 +Error4+…. The dead time
Dead time refers to the delay between making a change in the output and seeing the change reflected in the PV. The classical example is getting your oven at the right temperature. When you first turn on the heat, it takes a while for the oven to “heat up”. This is the dead time. If you set an initial temperature, wait for the oven to reach the initial temperature, and then you determine that you set the wrong temperature-then it will take a while for the oven to reach the new temperature setpoint. This is also referred to as the “derivative” (D) component of the PID controller. This holds some future changes back because the changes in the output have been made but are not reflected in the process variable yet.
Absolute Error/Proportional
One of the first ideas people usually have about designing an automatic process controller is what we call “proportional”. Meaning, if the difference between the PV and SP is small-then let’s make a small correction to the output. If the difference between the PV and SP is largethen let’s make a larger correction to the output. This idea certainly makes sense.
We simulated a proportional only controller in Microsoft Excel. Fig. 16.2 is the chart showing the results of the first simulation (DEADTIME=0, proportional only) :
Proportional and Integral Controllers
The integral portion of the PID controller accounts for the offset problem in a proportional only controller. We have another Excel spreadsheet that simulates a PID controller with proportional and integral control. Here (Fig. 16.3) is a chart of the first simulation with proportional and integral (DEADTIME=0, proportional=0.4) .
As you can tell, the PI controller is much better than just the P controller. However, dead time of zero (as shown in the graph) is not common.