PID control is one of the most commonly used closed-loop control mechanisms in industrial control systems. PID controllers work great when applied and configured correctly, and they are often viewed as a sort of magic wand that can solve any process control problem. To successfully apply and tune these controllers, it is important to understand how they work, the math behind them, and the nuances of their specific implementation by various manufacturers. Part 1 of this blog post provides an intuitive look at how a PID works before we dive deeper into the math of PID in part 2.
PID stands for Proportional-Integral-Derivative (PID) and consists of three parameters that control your process: P, I, and D. PID controllers can be applied whether you are pumping water, processing chemicals in a plant, or controlling the temperature in a furnace. Using a PID controller, one parameter is adjusted (controlled) to maintain another parameter at a desired value. For instance, in the above examples, pump speed is adjusted to maintain pressure, valve position is adjusted to maintain flow, and fuel feed rate is adjusted to maintain temperature. The following list describes the formal names of each PID parameter:
The following table shows example CVs and PVs:
Ideally, the PV changes in a predictable manner in accordance with the adjustment in CV. However, in a real-world situation, the load or demand will not be constant. This alters the relation between the CV and PV; the CV must be adjusted by a larger amount during peak load periods compared to off-peak periods in order to change the PV by the same amount.
Imagine you are driving down the road and see an increase in the posted speed. Woohoo! Time to lay on the gas pedal. The higher the posted speed, the harder you can press down on the pedal. You could choose to not press down very hard on the pedal, but then it would take longer to accelerate up to that higher speed. As you start closing in on the speed limit, you are going to ease up on the pedal. If you leave your foot in exactly the same position, then you will end up either going over the speed limit (overshooting) or going under the limit (undershooting). This is the Proportional Control in a PID loop. Naturally, you would likely make small adjustments with your foot as you approach the speed limit, and that’s where the real magic of PID happens.
Now imagine you are driving with a friend whose sole purpose in life is to keep reminding you that you are below the speed limit. You succumb to the nagging and slowly increase the pressure on the gas pedal. You continue increasing the pressure on the pedal as long as your friend remembers that you are below the speed limit. And that forms the basis of the second part of the PID loop, known as the Integral Control. Integral Control ensures that your car reaches the posted speed limit faster and stays there.
Let’s make the analogy a little more interesting. Now you are driving with your mom who still treats you like a little kid. Every time you press down on the gas pedal, she assumes you are going to continue pushing harder and get into a car crash! She is looking at your current behavior, predicting the future, and urging you to take corrective action before the future plays out. This is how Derivative Control works.
To summarize, a PID loop controls a process based on three questions:
In math-speak, the equation looks like this:
Hopefully you now have a basic understanding of the three components of a PID loop and how they work. Next, take a look at part 2 of this blog post, where I provide some practical tips on tuning PID loops as well as guidance on what adjustments to make when you see a certain type of PV response. We'll also explore the role played by each term using simplified examples and basic arithmetic.
Want to learn more about control systems? Check out our other blog posts about control systems.
This blog was originally published on January 30, 2018, and was last updated June 26, 2024.