### Theory of Proportional Integral and Derivative Controller

Before Entering the topic just a heads up, the images are taken from a book the graphs shown are self-explaining and  I couldn't find a more perfect image.

Continuous controller mode

In this mode of control, the relationship between the controller output and an error signal is a continuous mathematical function. Theoretically, a functional relationship could be of any form; but in practice, the function must be linear. So, for practical purposes, the mathematical functions used in the controller mode are limited to proportional, integral, derivative, and various combinations of these three.

Proportional mode (P controller)

In a two-position controller, the output can be either 0% to 100%. In multiposition controllers, more divisions of controller output are possible. The natural extension of multiposition controllers is the proportional mode in which a smooth, linear relationship exists between the controller output and the error.

The dynamic behavior of the P controller after a step-change in the error variable figure.

The amplitude of the manipulated variable P is determined by the error Ep and the proportional action Kp. Figures clearly show that a high Kp represents a strongly rising gradient so that even small system deviations can cause strong control actions.

In the ideal control situation, i.e., with zero error. P controllers do not generate control action. Some amplitude is required, however, if the controlled variable is to be kept at any level of equilibrium is a system with self-regulation. In order to achieve this, P controllers have an option for adjusting the operating point. This option is provided by adding a variable offset Po to the P controller.

The governing equation of P controller is

P= KpEp+Po

Integral mode( I controller)

In this mode, the rate of controller output is proportional to the error. Integral the controller is also called a reset controller. As long as the error is non-zero, integral action will cause the value of the manipulated variable to change. In other words, the controller output is not only a function of the magnitude of the error but also a function of the duration of the error.

The governing equation of I controller is:

P(t)= K i ∫ Ep (t) dt + Po

Characteristics of the integral controller are-

No error at steady state

Sluggish response at high reset time

Derivative mode(D controller)

It is also known as rate mode or anticipatory mode. The controller output in derivative mode is proportional to the rate of error. A steady-state error signal, however, is not recognized by the derivative controller. This is because regardless of how big the error is, its rate of change would be zero at a steady state. Therefore, derivative controllers are rarely used in practice. They are usually used in combination with other control modes, mostly in combination with proportional controllers.

The governing equation of derivative controller is:

P(t)= Kd dEp/dt +Po

Composite control modes

Three important and commonly used combinations are PI, PD, PID.

Proportional-Integral mode

This controller mode results from the combination of proportional and integral mode. This model combines the advantages of both controller types so that their disadvantages are compensated for at the same time.

The governing equation of the PI controller is:

P(t)= KpEp + KpKi ∫ Ep(t)dt + Po

When there is no error, the controller output remains fixed at Po. We have chosen t=0 as the time at which the observation starts. If the error is not zero, then the proportional term contributes a correction and the integral term begins to increase or decrease the accumulated value, depending on the sign of the error and whether the action is direct or reverse.

The integral term of PI controller causes its output to change as long as the error is non zero. The main advantage of this mode is that it implements one to one correspondence of proportional control, and makes use of integral action to eliminate offset.

The combination is favorable for systems in which large load change occurs. The proportional mode provides the stabilizing influence, while reset (integral) mode provides the necessary action to continue correction until the controlled variable is returned to the set point. This mode can be used in systems subjected to large and frequent load changes. Because of integration time, the process must have relatively slow changes in load to prevent oscillations induced by an integral overshoot.

Proportional-Derivative (PD) mode

In PD controllers with proportional plus derivative control action, the manipulated variable results from the addition of the individual P and D control elements.

The governing equation of the PD controller is:

KpEp + KpKd dEp/dt + Po

This mode cannot eliminate the offset caused by proportional control, but it can handle frequent load changes as long as the offset error is acceptable. For a linearly changing error, the immediate output will be due to the derivative effect, the magnitude of which will depend upon Kd and the rate of change of error. To start with, higher values of rate of change of error and Kd will result in greater output. The PD controller, in a way, anticipates the corrective action that has to be taken for a particular rate of change of error.

Proportional-Integral-Derivative (PID) mode

By combining all the three modes( proportional, derivative, integral modes), optimum performance can be achieved. A proportional controller will have the effect of reducing the rise time; and it will reduce, but never eliminate, the steady-state error. An integral control will have the effect of eliminating the steady-state error, but it may make the transient response worse. A derivative control will have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response.

The PID mode is the most popular feedback controller algorithm used in industries. It is a robust, easily understood algorithm that can provide an excellent result.

The governing equation of PID controller is:

P(t)= KpEp + Kp Kd dEp/dt + Kp Ki  Ep dt + Po