![Intelligent IoT Projects in 7 Days](https://wfqqreader-1252317822.image.myqcloud.com/cover/751/36700751/b_36700751.jpg)
Introducing the PID controller
Proportional-integral-derivative (PID) control is the most common control algorithm used in the industry and has been universally accepted in industrial control. The basic idea behind a PID controller is to read a sensor and then compute the desired actuator output by calculating proportional, integral, and derivative responses and summing those three components to compute the output. The design of a general PID controller is as follows:
![](https://epubservercos.yuewen.com/D02D72/19470404208938806/epubprivate/OEBPS/Images/d3bea2fb-b896-44d2-a4c9-42bf0b17caee.png?sign=1739532998-25LznTcR8yfZoN9AX5NJwRzY7z5lJ30P-0-6b145ccc882f74d7ec74750867c461d9)
Furthermore, a PID controller formula can be defined as follows:
![](https://epubservercos.yuewen.com/D02D72/19470404208938806/epubprivate/OEBPS/Images/4e853f45-203d-4bfb-b83e-9f862a71327a.png?sign=1739532998-Iv2fXZsoJiEqCbGJylx9uFmiIxlzMhNt-0-36eb807f72532ea5cac8083f7a38ceb2)
represents the coefficients for the proportional, integral, and derivative. These parameters are non-negative values. The variable
represents the tracking error, the difference between the desired input value i and the actual output y. This error signal
will be sent to the PID controller.