PID controllers for beginners

A PID controller consists of the proportional, integral, and derivative blocks connected in parallel. It brings together the characteristics of its building blocks and can therefore be used in all applications.

Output signal and transfer function

The output signal m(t) and the transfer function G(s) of the regulator, placed e(0)=0, are respectively equal to:

m(t)=K_{p}e(t)+K_{D}\frac{de(t)}{dt}+K_{I}\int_{0}^{t}e(t)dt

M(s)=K_{P}E(s)+K_{D}sE(s)+K_{I}\frac{1}{s}E(s)
G(s)=\frac{M(s)}{E(s)}=K_{P}\left ( 1+\frac{K_{D}}{K_{P}}s+\frac{K_{I}}{K_{P}}\frac{1}{s}\right)

High and low frequency gain limitation

As seen, the ideal PID controller is an improper system, because \left|G(j\omega ) \right|\to \infty when the pulsation ω tends to infinity and when ω=0. To limit the gain, in high and low frequency, the real PID regulator represented in the figure is used, whose transfer function is:

G(s)=\frac{R_{6}}{R_{5}}+\frac{R_{Cl}}{R_{l}}\frac{1}{1+sR_{Cl}C_{l}}+\frac{sR_{D}C_{D}}{1+sR_{CD}C_{D}}

Regolatore PID reale

PID Controllers Design

The designer must calculate the value of the KP, KI e KD coefficients so that they meet the specifications of the frequency response (phase and gain margin, bandwidth, etc.) and those of the time response (full error, settling time, delay time, etc.).

The Ziegler-Nichols method

Among the many methods available, this method is quite widespread in the industrial field. It consists in obtaining the optimal values of the KP, KI e KD parameters by acting on special knobs of the regulator calibrated at the factory.

The phases of optimal regulation are:

  • set KP=0, KI=0 e KD=0 and the adjustment ring is closed;
  • the value of the KP parameter is gradually increased, after excluding the derivative and integral actions, until the system reaches the limit of stability;
  • the value of KP=KPmax is measured, for which the response of the system to the unit step is an oscillation of constant amplitude;
  • the pulsation values are measured ωc and the Tc period of the persistent oscillation;
  • adjust the other knobs so that the parameters KP, KI and KD take the values shown in the following table.

Regolatori PID progetto

Deep in

Avatar photo
About Carlo Bazzo 17 Articles
Sysadmin & network eng. @Epysoft, editor @TheTechGoggler, CTO @HDEMO. Former developer @MSFT @GOOG. Former MOps consultant @XRX @HPQ. LinkedIn: it.linkedin.com/in/carlobazzo