2.2.1. PID Controller

The PID controller is the most commonly used in industrial applications due to its simple structure. However, its linear nature makes it not very suitable for non-linear systems. It is a control technique which reduces the error (*e*(*t*)) of a system using three control gains (Proportional, Integral and Derivative) in a mathematical operation to produce a control output (*u*(*t*)). The equation for the PID controller in the time domain is described by (6) [32].

$$u(t) = K\_p e(t) + K\_i \int c(t)dt + K\_d \frac{de(t)}{dt} \tag{6}$$

When the controller is digital, it can be approximated with a backward difference and a sum for the derivative and integral terms [4], respectively. The digital PID controller is given by (7).

$$u(n) = K\_p e(n) + K\_i \sum\_{j=1}^n e(j) T\_s + K\_d \frac{e(n) - e(n-1)}{T\_s} \tag{7}$$

where *n* and *Ts* represent the number of the sample and the sample time of the digital system.
