PID Principle
PID Principle
https://www.integrasources.com/blog/basics-of-pid-controllers-design-applications/#:~:text=A%20PID%20controller
%20calculates%20the,the%20whole%20term%20becomes%20zero.
https://www.ni.com/en/shop/labview/pid-theory-explained.html?srsltid=AfmBOoodGLOResOd0xIjM_wsOUQDQWm-
VKZWl3Acjr3x6fUFk2N79w4U
https://www.omega.com/en-us/resources/how-does-a-pid-controller-work
https://www.zhinst.com/others/en/resources/principles-of-pid-controllers
https://www.elprocus.com/the-working-of-a-pid-controller/
https://en.wikipedia.org/wiki/Proportional%E2%80%93integral%E2%80%93derivative_controller
https://www.multispanindia.com/blog-detail.php/pid-controller-types-working-and-its-application
https://www.eurotherm.com/in/temperature-control-in/principles-of-pid-control-and-tuning/
https://www.youtube.com/watch?v=ZxoguZcmnT0&t=4s
Proportional–integral–derivative controllers have been in use since the
beginning of the 20th century. They find applications in almost any area
where automatic control is required. As of 2021, the global PID controller
market was estimated at $1.42 billion and is forecasted to reach
$1.94 billion by 2029. In this article, we will explain the popularity of this
mechanism and cover the basics of PID controllers: their working principle,
types, and applications. We will also touch upon their pros and cons,
implementation peculiarities, and alternatives.
A temperature
control system with a PID controller. It controls the temperature (process
variable) in the furnace (plant/system) with the help of the heater
(actuation device).
As the algorithm deals with numbers, it doesn’t matter to which kind of
process it is applied. That’s why the mechanism is widely used
in electronics development .
If a gain is set to zero, the whole term becomes zero. This way, the PID
mechanism can be turned into a P controller, a PI controller, and other
modifications.
Proportional term
The proportional term is the difference between the set point (SP) and the
measured process variable (PV) multiplied by the P gain (K p). This
difference is referred to as the error value, or e(t).
The error value represents how far the system is from the desired value.
The higher it is, the higher the value of the manipulated variable and the
faster the system will drive the process variable to the desired value. In
the heating process shown below, the manipulated variable drops as the
measured process variable (temperature) rises.
A pure I
controller is very slow and typically causes the process variable to
overshoot the set point. That’s why engineers use PI or PID controllers
more often.
The plots below show the work of a P controller (on the left) and a PI
controller (on the right) with the same P gain. As you can see, the process
on the left causes a steady-state error. But adding the I term eliminates
the error (graph on the right).
Adding the
derivative term and setting the K d to 1 decreases the oscillations in the
process.
The D term is important for systems that face violent changes, such as
quadcopters. At the same time, it amplifies measurement noise and
external disturbances. Often, the D term is left out when dealing with slow
systems.
- A proportional controller reduces the rise time (time required for the
process variable to reach the set point) and speeds up the response.
When our team developed hardware and software for an autonomous lawn
mower , it decided to use a P controller for regulating the robot’s movement
speed. Stable speed allowed the mower to cut grass more efficiently.
The motor of the lawn mower is equipped with a quadrature encoder. The
data from this sensor is fed to the PID algorithm implemented on the
microcontroller of the device. The control signal regulates the voltage
applied to the motor, thus controlling the speed. In this project, we didn’t
need high accuracy, and even a small steady-state error was not a
problem. That’s why the team didn’t use the I and D terms.
The same solution was applied to the recharging system of the lawn
mower.
- A derivative controller minimizes the overshoot and oscillations in the
output of the system.
- An integral controller reduces the time-invariant error and lags the
output phase.
- A PI controller allows for reducing the rise time and eliminating the
steady state error.
- A PD controller reduces the rise time, overshoot, and oscillations in the
plant.
Apart from these modifications, there are types of PID controllers
augmented with more complicated algorithms. They can perform tasks
with which the classical PID algorithm cannot cope.
Conclusion
A PID controller is a closed feedback loop system that can control a plant
based on the measurement of the process variable. Since it deals with
numbers only, it can be applied to almost any process.
The PID algorithm has been in use for over 70 years. Despite that, it
remains the most popular solution in almost any industry. PID controllers
are used in metallurgy, chemical, pharmaceutical, and automotive
industries, as well as in robotics, power conversion, photovoltaics, and
other spheres.
Although there are many advanced alternatives, the basics of PID
controllers are easier to understand. These solutions are affordable and
easy to implement. The PID gains can often be tuned by trial and error.
Unless optimized efficiency is a must, a proportional–integral–derivative
controller should be sufficient. Our team has used PID controllers in many
projects that required a control system. We have enough experience to
understand when and how to use it, or how to modify it to achieve the
highest efficiency. Contact us directly to discuss your project and possible
solutions.
The PID Controller & Theory
Explained
Updated Sep 9, 2024
Overview
Proportional-Integral-Derivative (PID) control is the most common control algorithm used in
industry and has been universally accepted in industrial control. The popularity of PID
controllers can be attributed partly to their robust performance in a wide range of operating
conditions and partly to their functional simplicity, which allows engineers to operate them
in a simple, straightforward manner.
As the name suggests, PID algorithm consists of three basic coefficients; proportional,
integral and derivative which are varied to get optimal response. Closed loop systems, the
theory of classical PID and the effects of tuning a closed loop control system are discussed in
this paper. The PID toolset in LabVIEW and the ease of use of these VIs is also discussed.
Contents
PID Control System
PID Theory
Tuning
NI LabVIEW and PID
Summary
References
In many cases, the actuator output is not the only signal that has an effect on the system.
For instance, in a temperature chamber there might be a source of cool air that sometimes
blows into the chamber and disturbs the temperature.Such a term is referred to
as disturbance. We usually try to design the control system to minimize the effect of
disturbances on the process variable.
Defintion of Terminlogies
The control design process begins by defining the performance requirements. Control
system performance is often measured by applying a step function as the set point
command variable, and then measuring the response of the process variable. Commonly,
the response is quantified by measuring defined waveform characteristics. Rise Time is the
amount of time the system takes to go from 10% to 90% of the steady-state, or final, value.
Percent Overshoot is the amount that the process variable overshoots the final value,
expressed as a percentage of the final value. Settling time is the time required for the
process variable to settle to within a certain percentage (commonly 5%) of the final value.
Steady-State Error is the final difference between the process variable and set point. Note
that the exact definition of these quantities will vary in industry and academia.
After using one or all of these quantities to define the performance requirements for a
control system, it is useful to define the worst case conditions in which the control system
will be expected to meet these design requirements. Often times, there is a disturbance in
the system that affects the process variable or the measurement of the process variable. It
is important to design a control system that performs satisfactorily during worst case
conditions. The measure of how well the control system is able to overcome the effects of
disturbances is referred to as the disturbance rejection of the control system.
In some cases, the response of the system to a given control output may change over time
or in relation to some variable. A nonlinear system is a system in which the control
parameters that produce a desired response at one operating point might not produce a
satisfactory response at another operating point. For instance, a chamber partially filled with
fluid will exhibit a much faster response to heater output when nearly empty than it will
when nearly full of fluid. The measure of how well the control system will tolerate
disturbances and nonlinearities is referred to as the robustness of the control system.
Loop cycle is also an important parameter of a closed loop system. The interval of time
between calls to a control algorithm is the loop cycle time. Systems that change quickly or
have complex behavior require faster control loop rates.
Once the performance requirements have been specified, it is time to examine the system
and select an appropriate control scheme. In the vast majority of applications, a PID control
will provide the required results
Back to top
PID Theory
Proportional Response
The proportional component depends only on the difference between the set point and the
process variable. This difference is referred to as the Error term. The proportional
gain (Kc) determines the ratio of output response to the error signal. For instance, if the error
term has a magnitude of 10, a proportional gain of 5 would produce a proportional response
of 50. In general, increasing the proportional gain will increase the speed of the control
system response. However, if the proportional gain is too large, the process variable will
begin to oscillate. If Kc is increased further, the oscillations will become larger and the
system will become unstable and may even oscillate out of control.
Figure 4: Block diagram of a basic PID control algorithm.
Integral Response
The integral component sums the error term over time. The result is that even a small error
term will cause the integral component to increase slowly. The integral response will
continually increase over time unless the error is zero, so the effect is to drive the Steady-
State error to zero. Steady-State error is the final difference between the process variable
and set point. A phenomenon called integral windup results when integral action saturates a
controller without the controller driving the error signal toward zero.
Derivative Response
The derivative component causes the output to decrease if the process variable is increasing
rapidly. The derivative response is proportional to the rate of change of the process variable.
Increasing the derivative time (Td) parameter will cause the control system to react more
strongly to changes in the error term and will increase the speed of the overall control
system response. Most practical control systems use very small derivative time (T d), because
the Derivative Response is highly sensitive to noise in the process variable signal. If the
sensor feedback signal is noisy or if the control loop rate is too slow, the derivative response
can make the control system unstable
Back to top
Tuning
The process of setting the optimal gains for P, I and D to get an ideal response from a
control system is called tuning. There are different methods of PID tuning of which the
“guess and check” method and the Ziegler Nichols method will be discussed.
The gains of a PID controller can be obtained by trial and error method. Once an engineer
understands the significance of each gain parameter, this method becomes relatively easy.
In this method, the I and D terms are set to zero first and the proportional gain is increased
until the output of the loop oscillates. As one increases the proportional gain, the system
becomes faster, but care must be taken not make the system unstable. Once P has been set
to obtain a desired fast response, the integral term is increased to stop the oscillations. The
integral term reduces the steady state error, but increases overshoot. Some amount of
overshoot is always necessary for a fast system so that it could respond to changes
immediately. The integral term is tweaked to achieve a minimal steady state error. Once the
P and I have been set to get the desired fast control system with minimal steady state error,
the derivative term is increased until the loop is acceptably quick to its set point. Increasing
derivative term decreases overshoot and yields higher gain with stability but would cause
the system to be highly sensitive to noise. Often times, engineers need to tradeoff one
characteristic of a control system for another to better meet their requirements.
The Ziegler-Nichols method is another popular method of tuning a PID controller. It is very
similar to the trial and error method wherein I and D are set to zero and P is increased until
the loop starts to oscillate. Once oscillation starts, the critical gain K c and the period of
oscillations Pc are noted. The P, I and D are then adjusted as per the tabular column shown
below.
ol P Ti
0.5Kc -
0.45Kc Pc/1.2
0.60Kc 0.5Pc
Back to top
PID palette also features some advanced VIs like the PID Autotuning VI and the PID Gain
Schedule VI. The PID Autotuning VI helps in refining the PID parameters of a control system.
Once an educated guess about the values of P, I and D have been made, the PID Autotuning
VI helps in refining the PID parameters to obtain better response from the control system.
The reliability of the controls system is greatly improved by using the LabVIEW Real Time
module running on a real time target. NI provides data acquisition devices that provide
higher accuracy and better performance than an average control system
Figure 7: A typical LabVIEW VI showing PID control with a plug-in NI data acquisition device
The tight integration of these data acquisition devices with LabVIEW minimizes the
development time involved and greatly increases the productivity of any engineer. Figure 7
shows a typical VI in LabVIEW showing PID control using the NI-DAQmx driver API, which is
included with NI data acquisition hardware.
Back to top
Summary
The PID control algorithm is a robust and simple algorithm that is widely used in the
industry. The algorithm has sufficient flexibility to yield excellent results in a wide variety of
applications and has been one of the main reasons for the continued use over the years. NI
LabVIEW and NI plug-in data acquisition devices offer higher accuracy and better
performance to make an excellent PID control system.
Back to top
References
1. Classical PID Control
by Graham C. Goodwin, Stefan F. Graebe, Mario E. Salgado
Control System Design, Prentice Hall PTR
2. PID Control of Continuous Processes
by John W. Webb Ronald A. Reis
Programmable Logic Controllers, Fourth Edition, Prentice Hall PTR
Principles of PID Controllers
Principles of PID Controllers
Download the White Paper as PDF
Introduction
Self-regulating systems using feedback loops, i.e. the routing back of the output of a
system to its input, have existed since antiquity and have nowadays become an integral
part of modern technology. One of the first attempts to rigorously describe control loops
using feedback traces back to more than 150 years ago with James Clark Maxwell’s
article, On Governors[1].
In the context of control strategies, an open-loop control system refers to a controller
whose action is determined based on predetermined input values without considering
feedback. In contrast, a closed-loop controller incorporates continuous feedback,
enabling real-time adjustments to enhance precision, stability, and robustness, making it
more suitable for achieving desired control objectives in changing conditions.
Today, the most widespread type of closed-loop control systems is the Proportional–
Integral–Derivative (PID) controller. These types of controllers continuously measure and
adjust the output of a system to match a desired setpoint, that is, a given target
condition for the system or process under consideration. Requiring little prior knowledge
or model of the system, PID controllers are extremely versatile, relatively cost effective
and straightforward to implement, making their realization possible in a large variety of
systems: from hydraulics and pneumatics to analog and digital electronics.
For this reason, they have become extensively used in a variety of industries and
research applications, including manufacturing, photonics, sensors, material science and
nanotechnology.
PID control loops are widely employed in various aspects of everyday-life and industrial
automation, such as the gyroscopes found in smartphones and self-navigating cars,
ovens used for cooking food or samples, flow controllers in pipes, and even in managing
the daily vehicle traffic.
At the same time, their presence stands out in more advanced research fields as well,
for example in the stabilization of laser cavities and interferometers in optics and
photonics, in closed-loop control of MEMS-based (micro-electromechanical systems)
gyroscopes, and in the characterization of mechanical resonators in scanning probe
microscopy (SPM).
This white paper presents the key functions and principles of PID control loops by
analyzing their basic building blocks, by describing their strengths and limitations, and
by outlining the tuning and designing strategies and how they can be easily
implemented with Zurich Instruments’ lock-in amplifiers.
PID Working Principle and Building Blocks
The goal of a PID controller is to produce a control signal that can dynamically minimize
the difference between the output and the desired setpoint of a certain system.
Let's consider the exemplary scheme depicted in Figure 1. As a first step, the output of
the system y(t) is looped back and measured against the setpoint r(t) by the
comparator, thereby generating the time-dependent error signal e(t) = r(t) - y(t).
Subsequently, this error signal is minimized by the loop filter and then used to generate
the control signal u(t) that drives the output of the system, initiating closed-loop
operation. These steps are continuously executed to minimize the error; hence, apart
from considering the current error, it is also relevant to consider its accumulation over
time (represented by the integral) and its future tendency (represented by the derivative
at time t), as shown in Figure 2.
In the most general case, error minimization is accomplished by means of the three
primary components of the PID controller loop filter: the proportional, integral, and
derivative terms.
Mathematically, the complete control function in its most general form can be written as
the sum of the three individual contributions:
u(t)=uP(t)+uI(t)+uD(t)=Kpe(t)+Ki∫0te(τ)dτ+Kdddte(t)
where Kp, Ki and Kd are the gain coefficients related to the proportional, integral, and
derivative terms, respectively.
Figure 1: Schematic representation of a general PID control loop in its most general
form.
Figure 2: Example of error function with the highlighted contributions of the P, I and D
terms.
The proportional term
The proportional term, denoted with P, is based on the current error between the
setpoint and the measured output of the system. This term helps bring the output of the
system back to the setpoint by applying a correction that is proportional to the
amplitude of the error, leading to a reduction of the rise time of the correction signal,
see Figure 3. The larger the error, the larger the correction applied by the proportional
term -- that is, the larger the error with a fixed K p, the larger uP(t). Since the P term
always requires a non-zero error to generate its output, it cannot nullify the error by
itself. In steady-state system conditions, an equilibrium is reached, which includes a
steady-state error.
Figure 3: Effect of the proportional action. Increasing the K p coefficient reduces the rise
time, but the error never approaches zero. Additionally, a too high value of the
proportional gain might lead to an oscillating output.
The integral term
The integral term, denoted with I, applies a correction that is proportional to the time
integral of the error, i.e. the history of the error. For example, if the error persists over
time, the integral term continues to increase, resulting in a larger correction applied to
the output of the system. Unlike the proportional term, the integral term makes it
possible for the controller to generate a non-zero control signal even under a zero-error
condition at present. This property enables the controller to bring the system exactly to
the required setpoint. Its effect is illustrated in Figure 4.
Increasing the value of the integral gain coefficient increases the contribution of the
accumulated error over time to the control signal. This means that if there is a steady-
state error, an integral term with a large gain coefficient will drive the control signal to
eliminate the error faster than a smaller integral term.
However, increasing the integral term too much can lead to an oscillating output if too
much error is accumulated, causing the control signal to overshoot and create
oscillations around the setpoint. This phenomenon is sometimes called integral windup
[2].
Figure 4: Effect of the integral action with constant K p = 1. Increasing Ki, the response
will be faster but also lead to larger oscillations and overshoot if the value increases too
much (green curve).
The Derivative Term
The derivative term, denoted with D, provides a control over the error tendency, i.e. its
future behavior, by applying a correction proportional to the time derivative of the error.
This allows to reduce the rate of change of the error and so helps improve the stability
and responsiveness of the control loop. The aim is to anticipate the changes in the error
signal: if the error shows an upward trend, the derivative action tries to compensate
without waiting for the error to become significant (proportional action) or for it to
persist for some time (integral action).
In real-world implementations of PIDs, the derivative action is sometimes omitted due to
its high sensitivity to the quality of the input signal. When the reference value changes
rapidly, as in the case of a very noisy control signal, the derivative of the error tends to
become very large, causing the PID controller to undergo an abrupt change that can
result in instabilities or oscillations in the control loop.
To improve the stability, prior low-pass filtering of the error signal is often used as a
mitigation strategy; however, low-pass filtering and derivative control neutralize one
another, hence only a limited amount of filtering is possible.
If it is properly calibrated and if the system is "tolerant" enough, the derivative action
can give a decisive contribution to the controller performance. The effect of the
derivative term is shown in Figure 5.
The effect of each term on the system's response depends strongly on the system's
characteristics.
Therefore, the weighting of the Kp, Ki, and Kd gains can be adjusted to fine-tune the
performance of the control loop and achieve the desired responsiveness and accuracy.
Figure 5: The purpose of the derivative action is to increase the damping of the system;
however, too large values of Kd might make the system unstable or oscillatory, as
described in the text. The curves are obtained keeping the proportional and integral gain
constant (Kp = 4 and Ki = 1 s-1).
Some applications or simple systems may only require one or two of the three control
terms provided by a PID controller. To operate the controller with only a subset of these
terms, the unused terms can be set to zero, thus resulting in a PI, PD, P, or I controller.
For instance, the use of a PI controller is common in applications that prioritize steady-
state error elimination and stability, rather than fast response times, due to their slow
dynamics. A typical example is the control of an oven's temperature, where a PI
controller is normally employed to ensure precise temperature regulation and eliminate
any steady-state offset, considering the oven's relatively slow response characteristics.
Derivation of an initial set of parameters (Tuning)
One of the main advantages of PID controllers is that they can be implemented without
knowledge or a detailed model of the system. Thanks to heuristic calibration procedures,
it is possible to calculate coefficients based only on simple experimental tests to be
carried out directly on the process. Nevertheless, the initial tuning of the PID parameters
can be a delicate task.
There exist several well-established methods to derive an initial set of coefficients, many
of them involving the measurement of some open-loop parameters of the system.
As pointed out in the introduction, open-loop refers to the behavior of the system
without any feedback control, where an input signal is applied to the system and the
resulting output is just measured, but not fed back to the input. The input signal can be
a step function, a ramp, a sine wave, or any other type of signal that is appropriate for
the system being controlled. The output of the system is then recorded as a function of
time and can be analyzed to determine the system's response characteristics, such as
its time constant, natural frequency, and damping ratio.
The general strategy to find initial parameters involves typically three steps:
1. Obtain the open-loop response of the system and measure some of the characteristic parameters – e.g., the oscillation
period of the system output and the process delay.
2. Calculate coarse values of the gain coefficients Kp, Ki and Kd based on the measured parameters.
3. Tune the PID gain coefficients to optimize for noise, speed, or robustness.
Some of the most widespread techniques to achieve coarse tuning are the Ziegler-
Nichols method [3], the Cohen-Coon method [4], the relay method [5] and the Tyreus-
Luyben method [6].
In Table 1, a practical example of an initial tuning procedure is outlined, constructed
from the Ziegler-Nichols method.
Set the P,I, and D gain to zero
↓
Increase the proportional (P) gain until the system starts to show consistent and stable
oscillation. This value is known as the ultimate gain (K u).
↓
Measure the period of the oscillation (Tu).
↓
Depending on the desired type of control loop (P, PI or PID) set the gains to the following
values:
Kp Ki Kd
P controller 0.5 Ku 0 0
PI controller 0.45 Ku 0.54 Ku / Tu 0
PID controller 0.6 Ku 1.2 Ku / Tu 0.075 Ku Tu
↓
Test the response of the system and adjust the gains as necessary. If the response is
too slow or sluggish, increase the P or I gain. If the response is too fast or oscillatory,
decrease the P or I gain. If there is overshoot or ringing, increase the D gain.
Table 1: Step-by-step procedure for the Initial tuning of a PID controller, based on the
Ziegler-Nichols method.
Analog and Digital PID Controllers
In recent times, thanks to the advent of field-programmable gate array (FPGA)
technology, microprocessors and digital signal processing techniques, the digital
implementation of PID controllers – together with many other tools -- has outperformed
its analog counterpart in a number of aspects. In particular, the digital form of PID
control has the great advantage that it can be easily implemented as an algorithm and
executed by a microcontroller device. This vastly increases its flexibility, performance,
and the number of addressable applications.
Digital and analog PID controllers differ in the way they process signals and perform
control actions. Analog controllers use continuous signals and analog components such
as operational amplifiers and resistors to perform computations and generate control
signals. Conversely, digital PID controllers sample and digitize signals, perform
calculations and output discrete control signals. The use of digital signal processing
techniques allows digital controllers to execute more complex control algorithms without
adding extra analog circuitry whose physical properties might drift and thus degrade the
quality of the control action over time.
Furthermore, the storing/recalling of settings and the integration with other digital
systems can be easily achieved with digital controllers, thereby increasing their
adaptability to many more control problems and applications.
As with all implementations of digital signals, the most common issues of digital PID
controllers are related to quantization and sampling. Operating at discrete time
intervals, selecting the sampling rate is critical to avoid artifacts such as aliasing and
ensure accurate control. Furthermore, the implementation of the algorithms on digital
platforms (e.g. on FPGAs or microprocessors) might be more costly and require
additional technical expertise and careful evaluation of the corresponding numerical
methods used for signal calculation and conditioning.
Ultimately, the choice between analog and digital controllers often depends on the
application requirements, the available resources, and the desired performance.
Table 2 provides an overview of the advantages and disadvantages of the two
approaches.
Feature Analog PID Controller Digital PID Controller
Cost + (less expensive) - (more expensive)
Precision - (limited precision) + (high precision)
Flexibility - (difficult to modify) + (easy to modify)
Ease of + (simple to - (may require technical
implementation implement) expertise)
- (more sensitive to
Noise sensitivity noise) + (less sensitive to noise)
Dynamic range - (limited) + (wide)
Stability - (prone to drifting) + (stable)
-/+ (can be made faster with
faster processors, but
generally
Response time + (fast) not as fast as analog ones)
Conclusion
Thanks to their ability to adjust the system’s output accurately and quickly without
detailed knowledge about its dynamics, PID control loops stand as a powerful and widely
used tool for maintaining a stable and predictable output in a variety of applications. In
this paper, we have reviewed the fundamental principles and characteristics of these
control systems, providing insight into their functioning, tuning strategies, advantages
and trade-offs.
As a result of their integrated architecture, Zurich Instruments’ lock-in amplifiers allow
users to make the most of all the advantages of digital PID control loops, so that their
operation can be adapted to match the needs of different use cases.
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.
P-controller
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.
P-Controller Response
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.
PI controller
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.
PI Controller Response
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.
PID controller
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.
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 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.
Input sensors
An automatic controller requires some means of measuring the process value.
Eurotherm controllers will accept an input from almost any type of sensor. Linearisation of the measured value, if
necessary, will be performed within the controller.
In temperature applications, either a thermocouple or resistance thermometer is typically used. The type will depend
on the temperature range and the environment in which it has to operate.
In applications where it is difficult to attach a fixed temperature sensor, non-contact temperature measurement can
be made using infra-red or optical pyrometers. Eurotherm controllers support inputs from a wide range of
pyrometers.
Eurotherm controllers will accept direct inputs from strain gauges and pressure, flow, or Ph transducers.
In large process control applications, signal conditioners are normally used to convert the sensor measurement into
a 4 to 20mA or 0 to 10Vdc signal for transmission to the controller. In Eurotherm controllers it is a simple matter to
scale these inputs to the desired display range.
Controller outputs
An automatic controller requires some means of varying the heating power, or flow rate, or pressure, to the process
under control.
The main output types are:
Relay, which is used to operate a contactor or solenoid valve in heating and cooling applications.
Logic, which is used to switch a solid state relay. The benefits are: long life, no maintenance and the ability to
rapidly switch heaters which have a small thermal mass.
Triac, Triacs are solid state switches primarily used to operate solenoid valves. They are also ideal for the
positioning of motorised gas burner valves.
DC milliamps or volts, used for positioning control valves and to drive analogue input thyristors (used in phase
angle and three phase heating applications).
Types of control
There are three main types of control:
On/Off control
PID control
Motorised Valve Positioning
On/Off Control
On/Off control action is shown in the graph below. The heating power is either fully On when the temperature is
below setpoint or fully Off when it is above. As a result the temperature oscillates about the setpoint.
The amplitude and time period of the oscillation is a function of the thermal lag between the heating source and the
temperature sensor. To prevent the output ‘chattering’ as the measured temperature crosses the setpoint, the
controller does not turn On and Off at precisely the same point. Instead a small differential known as the ‘hysteresis’
is applied. A typical value is 1°C On/Off control is satisfactory for non-critical heating applications where some
oscillation in the temperature is permissible.
PID Control
Most industrial processes such as plastic extrusion, metals treatment or semiconductor processing require stable
‘straight-line’ control of the temperature as shown below. Eurotherm controllers employ advanced PID control
algorithms to provide exactly that.
PID control is also referred to as “Three-term” control. The three terms are:
P for Proportional
I for Integral
D for Derivative
The output of the controller is the sum of the above three terms. The combined output is a function of the magnitude
and duration of the error signal, and the rate of change of the temperature or process value.
Proportional term
The Proportional term delivers an output which is proportional to the size of the error signal. In the example below,
the proportional band is 10°C and an error of 3°C will produce an output of 30%.
Proportional only controllers will not, in general, control precisely at setpoint, but with an offset corresponding to the
point at which the output power equals the heat loss from the system.
Integral action
The Integral term removes steady state control offsets by ramping the output up or down in proportion to the
amplitude and duration of the error signal. The ramp rate (Integral time constant) must be longer than the time
constant of the process to avoid oscillations.
Derivative action
The Derivative term is proportional to the rate of change of the temperature or process value. It is used to prevent
overshoot and undershoot of the setpoint and to restore the process value rapidly to the setpoint if there is a sudden
change in demand, for example if an oven door is opened.
High and low cutback
While the PID parameters are optimised for steady state control at or near the setpoint, high and low cutback
parameters are used to reduce overshoot and undershoot for large step changes in temperature. They respectively
set the number of degrees above and below setpoint at which the controller will start to increase or cutback the
output power
Time Proportioning action
To obtain ‘straight-line’ temperature control, a PID controller requires some means of varying the power smoothly
between 0 and 100%.
Time proportioning varies the % on time of relay, triac and logic outputs to deliver a variable output power between
0 and 100%. The graphs below illustrate the principle.
The cycle time must be short enough to allow the thermal mass of the load to smooth out the switching pulses. 20
seconds is typical. Systems with a small thermal mass will need shorter cycle times than can be provided with a
relay. In these cases, a solid state relay is typically used with cycle times down to 0.2 seconds.
In practice Cycle Time may not be a constant, but vary with Power Demand, particularly at the extremes of the
range 0-100%.
In the above block diagram, each part has been shown properly:
Reference or Setpoint
Proportional Action (P)
Integral Action (I)
Derivative Action (D)
Plant Operation or Structure
Actual Response or Output
Feedback Path
Summing Points
The function of a PID controller
The PID controller serves the purpose of providing feedback to match a setpoint. For example, forcing a
thermostat to turn on or off based on preset temperature. PID controllers are best used in systems which
have relatively small mass and those that display quick reactions to changes in energy added in the
process. It automatically compensates the amount of energy available or the mass to be controlled due to
frequent changes in setpoint and is hence recommended in systems where the load changes often.
How does the PID controller work?
The PID controller works in a closed-loop system, maintaining output such that there is zero error
between the process variable and setpoint/desired output.
Closed-loop system: a brief overview
To understand the working of the PID controller adequately, let’s first discuss how the closed-loop system
works. The output of a PID controller is equal to the control input to the plant. It is calculated from the
feedback error. The following equation describes the calculation in the time domain:
u(t) = Kp*e(t) + Ki*e(t)*dt + Kp*dedt
Here, e(t) is the tracking error, i.e. the difference between the desired output (r) and the actual output (y).
The actions taken by the PID controller broadly depend on this value. On receiving this value, the
controller computes both the derivative and the integral of this error with respect to time. The control
signal (u) is fed to the plant and the new output (y) is obtained. This new output (y) is then fed back and
compared to the reference to find the new error signal (e).
The controller takes this new error signal and computes an updated control input. This procedure
continues indefinitely. The transfer function of a PID controller is found by taking the Laplace transform:
Kp +Kis+Kd*s = Kd*s2 + Kp*s + Kis
The P, I, and D Terms
Let’s understand the proportional, integral and derivative terms (Kp, Ki and Kd).
The P term is represented by Kp and is the proportional gain. Upon increasing Kp, the control signal for
the same level of error increases proportionally. Additionally, it’ll reduce (but not eliminate) the steady-
state error.
The I term represents the integral term Ki. Upon the build-up of persistent steady error, increasing the
value of I drives the error down. The downside to this is that it can make the system slow-moving and
oscillatory since when the error signal changes sign, it may take a while for the integrator to adapt
accordingly.
The D term is the derivative term of the controller (Kd). It allows the controller to anticipate error. As
derivative control increases so does the error, that is, the signal can become large if the error begins to
slope upward even if the magnitude of the error itself is relatively small.
P-Controller
Proportional or P-controller reduces the rise time, increases the overshoot
and reduces the steady-state error. It gives an output that is proportional to
the current error value e(t). It compares the desired or setpoint with the
actual value or feedback process value. The resultant error is multiplied
with a proportional constant to get the output. If the error is zero, the
output is zero (however, this is practically never the case).
When used alone, the P-controller needs biasing or manual reset. This is because it never reaches the
steady-state condition. While it provides stable operation, it always maintains some value of steady-state
error, however minimal. The response speed is directly proportional to Kp.
I-Controller
As the P-controller is limited in its ability to eliminate steady-state error, there is an offset between the
process variable and setpoint. This is where the I-controller comes in. It integrates the error over a period
of time until the error value reaches zero and holds the value to the final control device at which the error
becomes zero.
If the error values are negative, the integral control decreases accordingly. This simultaneously limits the
response speed and the stability of the system. The response speed increases as Ki decreases. Hence,
the PI controller is mostly used in cases where high-speed response is not critical.
D-controller
While the I-controller anticipates error, D-controller has the ability to predict the future behavior of error.
Its output depends on the derivative of the error with respect to time, multiplied by the derivative constant
Kd.
In the D-controller, the settling time of output is decreased. It also improves the stability of the system by
compensating for phase lag caused by the I-controller. Derivative gain Kd is directly proportional to the
response speed.
Tuning Methods
“Tuning” refers to the process of finding the range of values of the interacting parameters for which
optimal performance can be achieved.
Depending on the process, different tuning settings are required to better suit the various facets of the
situation the PID controller is being used in. For example, in a furnace, airflow will vary, the high
temperatures will change fluid density and viscosity steadily and barometric pressure will vary over time.
Hence, all of these need to be taken into account while selecting the PID settings (the gain applied to the
correction factor called “reset” and the time used in the integral and derivative calculations called “rate”).
Manual Tuning
Manual tuning is done by setting the reset time to its maximum value and the rate to zero. Then the gain
is gradually increased until the loop oscillates at a constant amplitude. Once this value is reached, the
gain is set to half this value and the reset is adjusted so it corrects for any offset within an acceptable
period. The biggest drawback is this process is too complex, challenging and involves a lot of calculations
and effort.
Tuning Heuristics
First described by Ziegler and Nichols in 1942, their methods entail measuring the delay in response and
the time taken to reach a new output value. Then the period of a steady-state oscillation is established.
One of the issues with this method is it sometimes produces a response considered too aggressive in
terms of overshoot and oscillation. It can also be time-consuming.
Automated Tuning
To overcome the disadvantages of the previous two methods, auto-tuning is preferred. All of Multispan’s
PID controllers come equipped with auto-tuning. Basically, the PID controller “learns” to calculate the
appropriate PID settings. It can respond to a disturbance or change in set point by observing both the
delay and the rate with which the change is made. This allows us to deal with imprecision and nonlinearity
in complex control situations.
Types of PID Controllers
Depending upon the system to be controlled, controllers can be divided into three basic types:
On/Off Controller
An on/off PID controller is the most fundamental form of the temperature control device. It gives a binary
output of on or off with no middle state. This output changes only when the temperature crosses the
setpoint. A particular example of on/off control is the limit controller. It is used to terminate a process
when a preset value of temperature is exceeded.
Proportional Controller
The proportional control was designed to remove the cycling associated with on/off control. As the
temperature approaches the setpoint, it decreases the average power supplied to the heater. This
ultimately slows down the heater so that it will not surpass the setpoint but will approach the setpoint and
maintain a stable temperature. This proportioning action can be accomplished by turning the output on
and off for short time intervals. This "time proportioning" varies the ratio of "on" time to "off" time to control
the temperature.