Sunteți pe pagina 1din 15

The Working Principle of a PID

Controller for Beginners


 ELECTRICAL
14 COMMENTS

As the name suggests, this article is going to give a precise idea about the structure and
working of 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 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.

Working of PID controller


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.
Working of PID Controller
With the use of low cost simple ON-OFF controller only two control states are possible, like
fully ON or fully OFF. It is used for limited control application where these two control states
are enough for 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 process variable
and set point/ desired output by closed loop operations. PID uses three basic control
behaviors that are explained below.

P- Controller:

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

P-Controller Response
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. Speed of the response is increased when the proportional constant Kc
increases.

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

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

PI Controller Response
In above figure, as the gain of the I-controller decreases, steady state error also goes on
decreasing. For most of the cases, PI controller is used particularly where 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 integral output goes on increasing even at zero error
state, due to nonlinearities in the plant.
D-Controller
PID controller
I-controller doesn’t have the capability to predict the future behavior of error. So it reacts
normally once the set point is changed. D-controller overcomes this problem by anticipating
future behavior of the error. Its output depends on 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.

PID Controller Response


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

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

Tuning methods of PID Controller


Before the working of 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 best values of
proportional, integral and derivative gains. Some of these are given below.
Trial and Error Method: It is a simple method of PID controller tuning. While 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 proportional term (Kp) until system reaches to oscillating
behavior. Once it is oscillating, adjust Ki (Integral term) so that oscillations stops and finally
adjust D to get fast response.

Process reaction curve technique: It is an open loop tuning technique. It produces 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 response curve.

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

Process reaction curve


Zeigler-Nichols method: Zeigler-Nichols proposed closed loop methods for tuning the PID
controller. Those are continuous cycling method and damped oscillation method.
Procedures for both methods are 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 system oscillates at constant amplitude.

Gain at which system produces constant oscillations is called ultimate gain (Ku) and period
of oscillations is called ultimate period (Pc). Once it is reached, we can enter the values of P,
I and D in PID controller by Zeigler-Nichols table depends on the controller used like P, PI or
PID, as shown below.
Zeigler-Nichols table
PID Controller Structure
PID controller consists of three terms, namely proportional, integral and derivative control.
The combined operation of these three controllers gives 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.

PID Controller Structure


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

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

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

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


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 PID controller and why?
PID Controllers: Working, Structure and Tuning
Methods
ELECTRONICS
ByRavi Kansagara Jan 07, 20184

What is PID Controller?


Before explaining PID Controller, let's revise about Control System. There are two types of systems;
open loop system and close loop system. An open loop system is also known as an uncontrolled
system and close loop system is known as a controlled system. In open loop system, the output
is not controlled because this system has no feedback and in a close loop system, the output is
controlled with the help of controller and this system requires one or more feedback paths. An open
loop system is very simple but not useful in industrial control applications because this system is
uncontrolled. Close loop system is complex but most useful for industrial application, because in this
system output can be stable at a desired value, PID is an example of Closed Loop System. Block
diagram of this systems is as shown in below figure-1.

Open and Closed loop system for controllers


A close loop system is also known as feedback control system and this type of system is used
to design automatically stable system at desired output or reference. For this reason, it generates an
error signal. Error signal e(t) is a difference between the output y(t) and the reference signal u(t).
When this error is zero that means desired output is achieved and in this condition output is same as
a reference signal.
For example, a dryer is running for a several times, which is pre-set value. When dryer is turned ON,
timer starts and it will run until timer ends and give output (dry cloth). This is a simple open loop system,
where output is need not to control and not require any feedback path. If in this system, we used a
moisture sensor which provide feedback path and compare this with set point and generates an error.
Dryer runs until this error is zero. It means when moisture of cloth is same as set point, dryer will stop
working. In open loop system, dryer will run for fixed time irrespective of clothes are dry or wet. But
in close loop system, dryer will not run for fixed time, it will run until clothes are dry. This is the
advantage of close loop system and use of controller.

PID Controller and Its Working:


So what is PID controller? PID controller is universally accepted and most commonly used controller
in industrial application because PID controller is simple, provide good stability and rapid
response. PID stands for proportional, integral, derivative. In each application, coefficient of these
three actions are varied to get optimal response and control. Controller input is error signal and output
is given to the plant/process. Output signal of controller is generated, in such a way that, output of
plant is try to achieve desired value.
PID controller is a Close loop system which has feedback control system and it compares the
Process variable (feedback variable) with set Point and generates an error signal and according to
that it adjusts the output of system. This process continues until this error gets to Zero or process
variable value becomes equal to set point.

PID controller
*We will learn about Proportional, Integral and Derivative actions later in this article.
PID controller gives better results than ON/OFF controller. In ON/OFF controller, only two states
are available to control the system. It can either ON or OFF. It will ON when process value is less than
set point and it will OFF when process value is greater than set point. In this controller, output will
never be stable, it will always oscillate around the setpoint. But PID controller is more stable and
precise compare to ON/OFF controller.
PID controller is a combination of three terms; Proportional, Integral and Derivative. Let us
understand these three terms individually.

PID Modes of Control:


Proportional (P) response:
Term ‘P’ is proportional to the actual value of the error. If the error is large, control output is also large
and if the error is small control output is also small, but gain factor (Kp) is
Also taking in to account. Speed of response is also directly proportional to proportional gain factor
(Kp). So, the speed of response is increased by increasing the value of Kp but if Kp is increased beyond
normal range, process variable starts oscillating at high rate and make system unstable.

y(t) ∝ e(t)

y(t) = ki * e(t)

Where Kp is proportional gain factor.

PID controller Proportional response


Here, the resulting error is multiplied with proportionality gain factor (proportional constant) as shown
in above equation. If only P controller is used, at that time, it requires manual reset because it maintain
steady state error (offset).

Integral (I) response:


Integral controller is generally used to decrease the steady state error. Term ‘I’ is integrate (with
respect to time) to the actual value of the error. Because of integration, very small value of error, results
very high integral response. Integral controller action continues to change until error becomes zero.

y(t) ∝ ∫ e(t)

y(t) = ki ∫ e(t)
Where Ki is a proportional gain factor.

PID controller Integral response


Integral gain is inversely proportional to the speed of response, increasing k i, decrease the speed of
response. Proportional and Integral controllers are used combined (PI controller) for good speed of
response and steady state response.

Derivative (D) response:


Derivative controller is used to with combination of PD or PID. It never used alone, because if error is
constant (non-zero), output of the controller will be zero. In this situation, controller behave life zero
error, but in actual there are some error (constant). Output of derivative controller is directly
proportional to the rate of change of error with respect to time as shown in equation. By removing sign
of proportionality, we get derivative gain constant (kd). Generally, Derivative controller is used when
processor variables starts oscillating or changes at a very high rate of speed. D-controller is also used
to anticipates the future behaviour of the error by error curve. Mathematical equation is as shown
below;

y(t) ∝ de(t)/dt

y(t) = Kd * de(t)/dt

Where Kd is a proportional gain factor.

PID controller Derivative response


Proportional and Integral controller:
This is a combination of P and I controller. Output of the controller is summation of both (proportional
and integral) responses. Mathematical equation is as shown in below;

y(t) ∝ (e(t) + ∫ e(t) dt)

y(t) = kp *e(t) + ki ∫ e(t) dt

Proportional and Derivative controller: This is a combination of P and D controller. Output of


controller is summation of proportional and derivative responses. Mathematical equation of PD
controller is as shown below;

y(t) ∝ (e(t) + de(t)/dt)

y(t) = kp *e(t) + kd * de(t)/dt

Proportional, Integral and Derivative controller: This is a combination of P, I and D controller.


Output of controller is summation of proportional, integral and derivative responses. Mathematical
equation of PD controller is as shown below;

y(t) ∝ (e(t) + ∫ e(t) dt + de(t)/dt)

y(t) = kp *e(t) + ki ∫ e(t) dt + kd * de(t)/dt

PID controller Block diagram


Thus, by combining this proportional, integral and derivative control response, form a PID controller.
Tuning Methods for PID Controller:
For desired output, this controller must be properly tuned. The process of getting ideal response from
the PID controller by PID setting is called tuning of controller. PID setting means set the optimal
value of gain of proportional (kp), derivative (kd) and integral (ki) response. PID controller is tuned for
disturbance rejection means staying at a given setpoint and command tracking, means if setpoint is
change, output of controller will follow new setpoint. If controller is properly tuned, output of controller
will follow variable setpoint, with less oscillation and less damping.

Disturbance Rejection by PID controller tunner


There are several methods for tuning PID controller and getting desired response. Methods for
tuning controller is as below;
1. Trial and error method
2. Process reaction curve technique
3. Ziegler-Nichols method
4. Relay method
5. Using software

1. Trial and error method:


Trial and error method is also known as manual tuning method and this method is simplest method.
In this method, first increase the value of kp until system reaches to oscillating response but system
should not make unstable and keep value of kd and ki zero. After that, set value of ki in such a way
that, oscillation of system is stops. After that set the value of kd for fast response.

2. Process reaction curve technique:


This method is also known as Cohen-Coon tuning method. In this method first generate a process
reaction curve in response to a disturbance. By this curve we can calculate the value of controller gain,
integral time and derivative time. This curve is identified by performing manually in open loop step test
of the process. Model parameter can find by initial step percentage disturbance. From this curve we
have to find slop, dead time and rise time of curve which is nothing but the value of kp, ki and kd.

3. Zeigler-Nichols method:
In this method also first set the value of ki and kd zero. The proportional gain (kp) is increase until it
reaches at the ultimate gain (ku). ultimate gain is nothing but it is a gain at which output of loop starts
to oscillates. This ku and the oscillation period Tu are used to derive gain of PID controller from below
table.
Type of Controller kp ki kd
P 0.5 ku  
PI 0.45 ku 0.54 ku/Tu 
PID 0.60 ku 1.2 ku/Tu 3 kuTu/40

4. Relay method:
This method is also known as Astrom-Hugglund method. Here output is switched between two values
of the control variable but these values are chosen in such a way that process must cross the setpoint.
When process variable is less than setpoint, the control output is set to the higher value. When process
value is greater than setpoint, the control output is set to the lower value and output waveform is
formed. The period and amplitude of this oscillatory waveform is measured and used to determine
ultimate gain ku and period Tu which is used in above method.

5. Using software:
For PID tuning and loop optimization, software packages are available. These software packages
collect data and make a mathematical model of system. By this model, software finds an optimal tuning
parameter from reference changes.

Structure of PID controller:


PID controllers are designed based on the microprocessor technology. Different manufactures use
different PID structure and equation. Most common used PID equations are; parallel, ideal and
series PID equation.
In parallel PID equation, proportional, integral and derivative actions are working separately with
each other and combine effect of these three actions are act in the system. Block diagram of this type
of PID is as shown below;

Parallel PID controller Block Diagram

In ideal PID equation, gain constant kp is distributed to all term. So, changes in k p affects all other
terms in the equation.
Ideal PID controller Block Diagram

In series PID equation, gain constant kp is distributed to all terms same as ideal PID equation, but in
this equation integral and derivative constant have an effect on proportional action.

Series PID controller Block Diagram

Applications of PID controller:


Temperature control:
Let us take an example of AC (air-conditioner) of any plant/process. Setpoint is temperature (20 ͦ C)
and current measured temperature by sensor is 28 ͦ C. Our aim is to run AC at desired temperature
(20 ͦ C). Now, controller of AC, generate signal according to error (8 ͦ C) and this signal is given to the
AC. According to this signal, output of AC is changed and temperature decrease to 25 ͦ C. further same
process will repeat until temperature sensor measure desired temperature. When error is zero,
controller will give stop command to AC and again temperature will increase up to certain value and
again error will generate and same process repeated continuously.

Designing of MPPT (Maximum power point tracking) charge controller for solar PV:
The I-V characteristic of a PV cell depends on temperature and irradiance level. So, operating voltage
and current will change continuously with respect to change in atmospheric conditions. Therefore, it is
very important to track maximum power point for an efficient PV system. To find MPPT, PID controller
is used and for that current and voltage setpoint is given to the controller. If atmospheric conditions
will change, this tracker keeps voltage and current constant.

Power electronics converter:


PID controller is most useful in power electronics application like converters. If a converter is
connected with system, according to change in load, output of converter must change. For example,
an inverter is connected with load, if load increase more current will flow from inverter. So, voltage and
current parameter is not fix, it will change according to requirement. In this condition, PID controller is
used to generate PWM pulses for switching of IGBTs of inverter. According to change in load,
feedback signal is given to controller and it will generate error. PWM pulses are generated according
to error signal. So, in this condition we can get variable input and variable output with same inverter.

S-ar putea să vă placă și