# PID Controller

Proportional Integral Derivative(PID) control is The most commonly used control method as it is suitable for 95%[Citation Needed] of control applications due to the simplicity of implementation, easy tuning in linear systems, and the beneficial characteristics introduced by the integral and derivative terms.

$u(t)=K_{P}e(t)+K_{I}\int _{0}^{t}(e(\tau )d\tau )+K_{D}{\frac {de(t)}{dt}}$ The Laplace transform of the above PID controller may thus be written as:

$U(s)=\left(K_{P}+{\frac {K_{I}}{s}}+K_{D}s\right)E(s)$ Converting to a transfer function gives:

$G_{c}(s)={\frac {U(s)}{E(s)}}=K_{P}+{\frac {K_{I}}{s}}+K_{D}s$ ## Basic Explanation of PID

### Proportional Term

The proportional term in a PID controller acts directly on the current error measurement. The error is multiplied by the proportional gain in order to calculate the control output.

### Integral Term

The integral term accounts for the past error measurements. The integral of the error is multiplied by the integral gain which gives a stronger control signal, the more time is spent with an error. This term is used to compensate for steady-state errors seen in pure proportional controllers.

### Derivative Term

The derivative term adds damping to the controller relative to the rate of change in error. The derivative term is calculated from the derivative of the error which lowers the control output the faster the error is changing. This term is typically used to reduce oscillation around the target value as it will damp high frequencies in the system.

## Types of PID Controller

As all three components of the PID controller are not always necessary, the individual combinations of proportional, integral, and derivative terms are considered separately.

### P Controller

A pure proportional controller consists of a pure gain term that reacts directly to the current error measurement and thus neglects the dynamics of the error. The controller transfer function of a proportional controller is thus:

$G_{c}(s)=K_{p}$ Proportional controllers are typically suitable when the desired transient and steady-state responses are achievable with only a gain term. This is very often not the case as most systems have some nonlinear terms which require further compensation. The proportional term, however, provides a rapid response dynamic and is thus used as a component of many other controllers.

### PI Controller

A proportional integral controller augments the gain of the P controller with an integral term to improve the steady-state response of the system. With the integral term added, the controller transfer function becomes:

$G_{c}(s)=K_{P}+{\frac {K_{I}}{s}}$ ### PD Controller

$G_{c}(s)=K_{P}+K_{D}s$ ### PID Controller

$G_{c}(s)=K_{P}+{\frac {K_{I}}{s}}+K_{D}s$ 