Arduino Control Theory - The PID Controller
We continue with the post dedicated to giving some basic knowledge of automatic control systems on a processor like Arduino. In this post we will look at the PID controller, one of the most widely used controllers due to its simplicity and its ability to achieve good performance in a wide variety of situations.
In the first post, we saw some generalities and definitions about system theory. In the second one, we saw one of the simplest controls, the all or nothing control with hysteresis, as well as its limitations.
Of course, we insist that we are not going to go into the details of the PID, since it is a very extensive (and interesting) topic. If you are interested, you can consult the abundant documentation available.
Here we will try to give an intuitive vision of the controller and the motivation that explains its behavior. Without using equations or mathematics. In fact, one of the great things about the PID is that you do not need to know in detail how it works to make it work.
我们将介绍在 Arduino 等处理器上使用自动控制系统的一些基本知识。 在这篇文章中,将介绍 PID 控制器,它是应用最广泛的控制器之一,因为它简单易用,而且能够在各种情况下实现良好的性能。 在第一篇文章中,我们了解了一些系统理论的常识和定义。 在第二篇文章中,我们了解了最简单的控制器之一,即带有滞后的全有或全无控制器,以及它的局限性。 当然,我们坚持不详细介绍 PID,因为这是一个非常广泛(而且有趣)的话题。 在此,我们将尝试以直观的方式介绍控制器以及解释其行为的动机。 不使用方程式或数学。 事实上,PID 的一大优点就是无需详细了解其工作原理就能使其工作。
What is the PID controller?
The PID controller is one of the most widely used in the industry for controlling feedback systems. Some of its strengths are its simplicity and its ability to achieve a good performance in a wide variety of situations without the need to know in detail the plant to be controlled.
The PID controller has been known for a long time. Its first uses date back to 1911, and its first theoretical analysis in 1922 by Nicolas Minorsky. In those times, the PID control was exclusively analog. However, it is easy to implement a digital PID in programming and the calculations it requires are simple and efficient. Also, it is “relatively simple” to extrapolate the theory of analog PIDs to its digital equivalent.
Despite its popularity, we must say that currently the PID is not the best controller available. But in most cases, it is more than enough. On the other hand, many of the “most modern” controllers are nothing more than improved versions of a PID, such as the different families based on PID with adaptive parameters.
PID 控制器是工业界最广泛使用的反馈系统控制器之一。 它的一些优点是简单易用,能够在各种情况下实现良好的性能,而无需详细了解要控制的工厂。 PID 控制器很早就为人所知。 它的首次应用可追溯到 1911 年,1922 年 Nicolas Minorsky 对其进行了首次理论分析。 在那个时代,PID 控制完全是模拟的。 然而,数字 PID 很容易在编程中实现,所需的计算也简单高效。 此外,将模拟 PID 理论推广到数字等效理论也 “相对简单”。 尽管 PID 很受欢迎,但我们必须承认,它目前还不是最好的控制器。 但在大多数情况下,它已经绰绰有余。 另一方面,许多 "最先进 "的控制器不过是 PID 的改进版,例如基于自适应参数 PID 的不同系列。
How does the PID work?
The PID algorithm (proportional, integral, derivative) is formed by the sum of three components, Proportional, Integral, and Derivative. Mathematically, a PID controller has the following formulation.
One moment, one moment. We said no equations! Well yes, but we can’t do a post about PID without seeing at least its formulation. I promis