# What is a PID Controller : Working & Its Applications

As the name suggests, this article is going to give a precise idea about the structure and working of the PID controller. However going into details, let us get an introduction about PID controllers. PID controllers are found in a wide range of applications for industrial process control. Approximately 95% of the closed-loop operations of the industrial automation sector use PID controllers. PID stands for Proportional-Integral-Derivative. These three controllers are combined in such a way that it produces a control signal. As a feedback controller, it delivers the control output at desired levels. Before microprocessors were invented, PID control was implemented by the analog electronic components. But today all PID controllers are processed by the microprocessors. Programmable logic controllers also have the inbuilt PID controller instructions. Due to the flexibility and reliability of the PID controllers, these are traditionally used in process control applications.

## What is a PID Controller?

The term PID stands for proportional integral derivative and it is one kind of device used to control different process variables like pressure, flow, temperature, and speed in industrial applications. In this controller, a control loop feedback device is used to regulate all the process variables.

This type of control is used to drive a system in the direction of an objective location otherwise level. It is almost everywhere for temperature control and used in scientific processes, automation & myriad chemical. In this controller, closed-loop feedback is used to maintain the real output from a method like close to the objective otherwise output at the fixe point if possible. In this article, the PID controller design with control modes used in them like P, I & D are discussed.

### History

The history of the PID controller is, In the year 1911, the first PID controller was developed by Elmer Sperry. After that, TIC (Taylor Instrumental Company) was implemented a former pneumatic controller with completely tunable in the year1933. After a few years, control engineers removed the error of steady-state that is found within proportional controllers through retuning the end to some false value until the error wasn’t zero.

This retuning included the error which is known as the proportional-Integral controller. After that, in the year 1940, the first pneumatic PID controller was developed through a derivative action to reduce overshooting problems.

In 1942, Ziegler & Nichols have introduced tuning rules to discover and set the suitable parameters of PID controllers by the engineers. At last, automatic PID controllers were extensively used in industries in the mid of 1950.

### PID Controller Block Diagram

A closed-loop system like a PID controller includes a feedback control system. This system evaluates the feedback variable using a fixed point to generate an error signal. Based on that, it alters the system output. This procedure will continue till the error reaches Zero otherwise the value of the feedback variable becomes equivalent to a fixed point.

This controller provides good results as compared with the ON/OFF type controller. In the ON/OFF type controller, simply two conditions are obtainable to manage the system. Once the process value is lower than the fixed point, then it will turn ON. Similarly, it will turn OFF once the value is higher than a fixed value. The output is not stable in this kind of controller and it will swing frequently in the region of the fixed point. However, this controller is more steady & accurate as compared to the ON/OFF type controller.

### Working of PID Controller

With the use of a low cost simple ON-OFF controller, only two control states are possible, like fully ON or fully OFF. It is used for a limited control application where these two control states are enough for the control objective. However oscillating nature of this control limits its usage and hence it is being replaced by PID controllers.

PID controller maintains the output such that there is zero error between the process variable and setpoint/ desired output by closed-loop operations. PID uses three basic control behaviors that are explained below.

**P- Controller**

Proportional or P- controller gives an output that is proportional to current error e (t). It compares the desired or set point with the actual value or feedback process value. The resulting error is multiplied with a proportional constant to get the output. If the error value is zero, then this controller output is zero.

This controller requires biasing or manual reset when used alone. This is because it never reaches the steady-state condition. It provides stable operation but always maintains the steady-state error. The speed of the response is increased when the proportional constant Kc increases.

**I-Controller**

Due to the limitation of p-controller where there always exists an offset between the process variable and setpoint, I-controller is needed, which provides necessary action to eliminate the steady-state error. It integrates the error over a period of time until the error value reaches zero. It holds the value to the final control device at which error becomes zero.

Integral control decreases its output when a negative error takes place. It limits the speed of response and affects the stability of the system. The speed of the response is increased by decreasing integral gain, Ki.

In the above figure, as the gain of the I-controller decreases, the steady-state error also goes on decreasing. For most of the cases, the PI controller is used particularly where the high-speed response is not required.

While using the PI controller, I-controller output is limited to somewhat range to overcome the integral wind up conditions where the integral output goes on increasing even at zero error state, due to nonlinearities in the plant.

**D-Controller**

I-controller doesn’t have the capability to predict the future behavior of error. So it reacts normally once the setpoint is changed. D-controller overcomes this problem by anticipating the future behavior of the error. Its output depends on the rate of change of error with respect to time, multiplied by derivative constant. It gives the kick start for the output thereby increasing system response.

In the above figure response of D, the controller is more, compared to the PI controller, and also settling time of output is decreased. It improves the stability of the system by compensating for phase lag caused by I-controller. Increasing the derivative gain increases the speed of response.

So finally we observed that by combining these three controllers, we can get the desired response for the system. Different manufacturers design different PID algorithms.

### Types of PID Controller

PID controllers are classified into three types like ON/OFF, proportional, and standard type controllers. These controllers are used based on the control system, the user can be used the controller to regulate the method.

#### ON/OFF Control

An on-off control method is the simplest type of device used for temperature control. The device output may be ON/OFF through no center state. This controller will turn ON the output simply once the temperature crosses the fixed point. A limit controller is one particular kind of ON/OFF controller that uses a latching relay. This relay is reset manually and used to turn off a method once a certain temperature is attained.

#### Proportional Control

This kind of controller is designed to remove the cycling which is connected through ON/OFF control. This PID controller will reduce the normal power which is supplied toward the heater once the temperature reaches the fixed point.

This controller has one feature to control the heater so that it will not exceed the fixed point however it will reach the fixed point to maintain a steady temperature.

This proportioning act can be achieved through switching ON & OFF the output for small time periods. This time proportioning will change the ratio from ON time to OFF time for controlling the temperature.

#### Standard Type PID Controller

This kind of PID controller will merge proportional control through integral & derivative control to automatically assist the unit to compensate modifications within the system. These modifications, integral & derivative are expressed in time-based units.

These controllers are also referred through their reciprocals, RATE & RESET correspondingly. The terms of PID must be adjusted separately otherwise tuned to a specific system with the trial as well as error. These controllers will offer the most precise and steady control of the 3 types of controller.

#### Real-Time PID Controllers

At present, there are various kinds of PID controllers are available in the market. These controllers are used for industrial control requirements like pressure, temperature, level, and flow. Once these parameters are controlled through PID, choices comprise utilize a separate PID controller or either PLC.

These separate controllers are employed wherever one otherwise two loops are required to be checked as well as controlled otherwise in the conditions wherever it is complex to the right of entry through larger systems.

These control devices provide different choices for solo & twin loop control. The standalone type PID controllers provide several fixed-point configurations to produce the autonomous several alarms.

These standalone controllers mainly comprise PID controllers from Honeywell, temperature controllers from Yokogawa, autotune controllers from OMEGA, Siemens, and ABB controllers.

PLCs are used like PID controllers in most of the industrial control applications The arrangement of PID blocks can be done within PACs or PLCs to give superior choices for an exact PLC control. These controllers are smarter as well as powerful as compared with separate controllers. Each PLC includes the PID block within the software programming.

### Tuning Methods

Before the working of the PID controller takes place, it must be tuned to suit with dynamics of the process to be controlled. Designers give the default values for P, I, and D terms, and these values couldn’t give the desired performance and sometimes leads to instability and slow control performances. Different types of tuning methods are developed to tune the PID controllers and require much attention from the operator to select the best values of proportional, integral, and derivative gains. Some of these are given below.

PID controllers are used in most industrial applications but one should know the settings of this controller to adjust it correctly to generate the preferred output. Here, tuning is nothing but the procedure of receiving an ideal reply from the controller through setting best proportional gains, integral & derivative factors.

The desired output of the PID controller can be obtained by tuning the controller. There are different techniques available to get the required output from the controller like trial &error, Zeigler-Nichols & process reaction curve. The most frequently used methods are trial & error, Zeigler-Nichols, etc.

**Trial and Error Method: **It is a simple method of PID controller tuning. While the system or controller is working, we can tune the controller. In this method, first, we have to set Ki and Kd values to zero and increase the proportional term (Kp) until the system reaches oscillating behavior. Once it is oscillating, adjust Ki (Integral term) so that oscillations stop and finally adjust D to get a fast response.

**Process Reaction Curve Technique: **It is an open-loop tuning technique. It produces a response when a step input is applied to the system. Initially, we have to apply some control output to the system manually and have to record the response curve.

After that, we need to calculate slope, dead time, the rise time of the curve, and finally substitute these values in P, I, and D equations to get the gain values of PID terms.

**Zeigler-Nichols method: **Zeigler-Nichols proposed closed-loop methods for tuning the PID controller. Those are the continuous cycling method and damped oscillation method. Procedures for both methods are the same but oscillation behavior is different. In this, first, we have to set the p-controller constant, Kp to a particular value while Ki and Kd values are zero. Proportional gain is increased till the system oscillates at a constant amplitude.

Gain at which system produces constant oscillations is called ultimate gain (Ku) and the period of oscillations is called the ultimate period (Pc). Once it is reached, we can enter the values of P, I, and D in the PID controller by Zeigler-Nichols table depends on the controller used like P, PI or PID, as shown below.

### PID Controller Structure

PID controller consists of three terms, namely proportional, integral, and derivative control. The combined operation of these three controllers gives a control strategy for process control. PID controller manipulates the process variables like pressure, speed, temperature, flow, etc. Some of the applications use PID controllers in cascade networks where two or more PID’s are used to achieve control.

The above figure shows the structure of the PID controller. It consists of a PID block which gives its output to the process block. Process/plant consists of final control devices like actuators, control valves, and other control devices to control various processes of industry/plant.

A feedback signal from the process plant is compared with a set point or reference signal u(t) and the corresponding error signal e(t) is fed to the PID algorithm. According to the proportional, integral, and derivative control calculations in the algorithm, the controller produces a combined response or controlled output which is applied to plant control devices.

All control applications don’t need all three control elements. Combinations like PI and PD controls are very often used in practical applications.

### Applications

The PID controller applications include the following.

The best PID controller application is temperature control where the controller uses an input of a temperature sensor & its output can be allied to a control element like a fan or heater. Generally, this controller is simply one element in a temperature control system. The entire system must be examined as well as considered while choosing the right controller.

#### Temperature Control of Furnace

Generally, furnaces are used to include heating as well as holds a huge amount of raw material at huge temperatures. It is usual for the material occupied to include a huge mass. Consequently, it takes a high quantity of inertia & the temperature of the material doesn’t modify rapidly even when huge heat is applied. This feature results in a moderately stable PV signal & permits the Derivative period to efficiently correct for fault without extreme changes to either the FCE or the CO.

#### MPPT Charge Controller

The V-I characteristic of a photovoltaic cell mainly depends on the range of temperature as well as irradiance. Based on the weather conditions, the current and operating voltage will change constantly. So, it is extremely significant to track the highest PowerPoint of an efficient photovoltaic system. PID controller is used to finding MPPT by giving fixed voltage and current points to the PID controller. Once the weather condition is changed then the tracker maintains current and voltage stable.

#### The Converter of Power Electronics

We know that converter is an application of power electronics, so a PID controller is mostly used in converters. Whenever a converter is allied through a system based on the change within the load, then the converter’s output will be changed. For instance, an inverter is allied with load; the huge current is supplied once loads are increased. Thus, the parameter of voltage as well as the current is not stable, but it will alter based on the requirement.

In this state, this controller will generate PWM signals to activate the IGBTs of the inverter. Based on the change within the load, the response signal is provided to the PID controller so that it will produce n error. These signals are generated based on the fault signal. In this state, we can obtain changeable input & output through a similar inverter.

Application of PID Controller: Closed Loop Control for a Brushless DC motor

### PID Controller Interfacing

The design and interfacing of the PID controller can be done using the Arduino microcontroller. In the laboratory, the Arduino based PID controller is designed using the Arduino UNO board, electronic components, thermoelectric cooler, whereas the software programming languages used in this system are C or C++. This system is used to control the temperature within the laboratory.

The parameters of PID for a specific controller are found physically. The function of various PID parameters can be implemented through the subsequent contrast between different forms of controllers.

This interfacing system can efficiently calculate the temperature through an error of ± 0.6℃ whereas a constant temperature regulates through simply a small difference from the preferred value is attained. The concepts used in this system will provide inexpensive as well as exact techniques to manage physical parameters in a preferred range within the laboratory.

Thus, this article discusses an overview of the PID controller which includes history, block diagram, structure, types, working, tuning methods, interfacing, advantages, and applications. We hope we have been able to provide basic yet precise knowledge about PID controllers. Here is a simple question for you all. Amongst the different tuning methods, which method is preferably used to achieve an optimum working of the PID controller and why?

You are requested to kindly give your answers in the comment section below.

**Photo Credits**

PID controller block diagram by wikimedia

PID controller structure, P-controller, P – controller response & PID controller by blog.opticontrols

P – controller response by controls.engin.umich

PID Controller response by wikimedia

Zeigler-Nichols table by controls.engin

Informative web page for electrical engineers.

Hi Capt. Waris Shaheen

Thank you for this positive feedback. To know more about electrical concepts please refer the below link

https://www.elprocus.com/category/electrical-2/

Thank you sir it was really useful.

I have a doubt that-“How should we get ultimate gain(Ku) and ultimate period (Pc) values?Do we need to use a special device to measure those values? And How should we relate it to self balancing robot?

This article is very useful to understand the basic concept. I thank you for this. I wish i could also get one article based on Thermocouple!!

I really liked your article , your article is very

petrified me in the learning process and provide

additional knowledge to me , maybe I can learn

more from you, you can also check out which is also a very good blog

It was explained in simple ways. Found it useful

It was very helpful , simple and clear . Can you please explain with examples like PI , PID tuning how to vary P , I & D values it would be more helpful.

Thank you sir it was really useful..