0% found this document useful (0 votes)
28 views35 pages

Inno2020 Emt4203 Control II Chap2a Pids

The document discusses PID controllers, which use proportional, integral and derivative control actions to minimize error in an industrial control system. The PID controller calculates error as the difference between a measured process variable and setpoint. It then adjusts the process using proportional, integral and derivative terms to reduce oscillation, overshoot and response time. Tuning the three parameters allows designing the controller for specific process requirements. Common configurations include PI, PD, P and I controllers by setting parameters to zero. The proportional, integral and derivative terms are defined and their effects on response, steady state error and stability are explained.

Uploaded by

kabuej3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views35 pages

Inno2020 Emt4203 Control II Chap2a Pids

The document discusses PID controllers, which use proportional, integral and derivative control actions to minimize error in an industrial control system. The PID controller calculates error as the difference between a measured process variable and setpoint. It then adjusts the process using proportional, integral and derivative terms to reduce oscillation, overshoot and response time. Tuning the three parameters allows designing the controller for specific process requirements. Common configurations include PI, PD, P and I controllers by setting parameters to zero. The proportional, integral and derivative terms are defined and their effects on response, steady state error and stability are explained.

Uploaded by

kabuej3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Chapter 2 1

PID Controller

1.0.1 Introduction
A proportional-integral-derivative controller (PID controller) is a control loop feedback
mechanism (controller) widely used in industrial control systems. A PID controller calculates an
error value as the difference between a measured process variable and a desired setpoint. The
controller attempts to minimize the error by adjusting the process through use of a
manipulated variable.

The PID controller algorithm involves three separate constant parameters, and is accordingly
sometimes called three-term control: the proportional, the integral and derivative values,
denoted P, I, and D. Simply put, these values can be interpreted in terms of time: P depends on
the present error, I on the accumulation of past errors, and D is a prediction of future
errors, based on current rate of change. The weighted sum of these three actions is used to
adjust the process via a control element such as the position of a control valve, a damper, or
the power supplied to a heating element.

By tuning the three parameters in the PID controller algorithm, the controller can provide
control action designed for specific process requirements. The response of the controller can be
described in terms of the responsiveness of the controller to an error, the degree to which the
controller overshoots the setpoint, and the degree of system oscillation. Note that the use of the
PID algorithm for control does not guarantee optimal control of the system or system stability.

Some applications may require using only one or two actions to provide the appropriate system
control. This is achieved by setting the other parameters to zero. A PID controller will be called a PI,
PD, P or I controller in the absence of the respective control actions. PI controllers are fairly
common, since derivative action is sensitive to measurement noise, whereas the absence of an
integral term may prevent the system from reaching its target value due to the control action.
2

1.0.2 PID Controller Theory


The PID control scheme is named after its three correcting terms, whose sum constitutes the
manipulated variable (MV). The proportional, integral, and derivative terms are summed to
calculate the output of the PID controller. Defining 𝑢(𝑡) as the controller output,
Controller manufacturers arrange the Proportional, Integral and Derivative modes into three
different controller algorithms or controller structures. These are called
Interactive, Noninteractive, and Parallel algorithms. Some controller manufacturers allow you
to choose between different controller algorithms as a configuration option in the controller
software. The PID Algorithms are:

1) Interactive Algorithm
1 𝑡 𝑑
𝑢(𝑡) = 𝐾𝑐 [𝑒(𝑡) + ∫ 𝑒(𝜏)𝑑𝜏] × [1 + 𝑇𝑑 𝑒(𝑡)]
𝑇𝑖 0 𝑑𝑡

Figure 1: Interactive Algorithm

2) NonInteractive Algorithm
1 𝑡 𝑑
𝑢(𝑡) = 𝐾𝑐 [𝑒(𝑡) + ∫ 𝑒(𝜏)𝑑𝜏 + 𝑇𝑑 𝑒(𝑡)]
𝑇𝑖 0 𝑑𝑡

Figure 2: NonIneractive Algorithm


3

3) Parallel Algorithm

𝑡
𝑑
𝑢(𝑡) = 𝐾𝑝 𝑒(𝑡) + 𝐾𝑖 ∫ 𝑒(𝜏)𝑑𝜏 + 𝐾𝑑 𝑒(𝑡)
0 𝑑𝑡

Figure 3: Parallel Algorithm


Where
𝐾𝑝 = 𝐾𝑐 : 𝑃𝑟𝑜𝑝𝑜𝑡𝑖𝑜𝑛𝑎𝑙 𝐺𝑎𝑖𝑛
𝐾𝑐
𝐾𝑖 = : 𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑙 𝐺𝑎𝑖𝑛
𝑇𝑖
𝐾𝑑 = 𝐾𝑐 𝑇𝑑 : 𝐷𝑒𝑟𝑖𝑣𝑎𝑡𝑖𝑣𝑒 𝐺𝑎𝑖𝑛
𝑒(𝑡) = 𝑟(𝑡) − 𝑦(𝑡)
1.1.1 PID: Interpretation of the Terms 4

For the sake of simplicity, we consider the transfer function of the plant as a simple first order
system without time delay as:

We now consider each of the terms, assuming that the others are zero.

Proportional control:

With Ki = Kd = 0, we simply have u(t) = Kp e(t) . Thus at any instant in time, the control
is proportional to the error. It is a function of the present value of the error. The larger the
error, the larger the control signal. One way to look at this term is that the farther away
from the desired point we are, the harder we try. As we get closer, we dont try quite as
hard. If we are right on the target, we stop trying. As can be seen by this analogy, when we
are close to the target, the control essentially does nothing. Thus, if the system drifts a bit
from the target, the control does almost nothing to bring it back.

With the proportional control action only, the closed loop system looks like:

Now the closed loop transfer function can be expressed as:

Where

For step input


A
r(s) =
s
5
The system response is

Effects:

1
1. The time response improves by a factor 1+KK p
(i.e. the time constant decreases)
2. There is a steady state offset between the desired response and the output response =
KKp A
A{1 − }=
1 + KKp 1 + KKp

This offset can be reduced by increasing the proportional gain; but that may also cause
increase oscillations for higher order systems.

The offset, often termed as steady state error can also be obtained from the error transfer
function and the error function e(t) can be expressed in terms of the Laplace transformation
form:

Using the final value theorem, the steady state error is given by:
6

Often, the proportional gain term, Kp is expressed in terms of Proportional Band. It is


inversely proportional to the gain and expressed in percentage. For example, if the gain is
2, the proportional band is 50%. Strictly speaking, proportional band is defined as the %
error to move the control valve from fully closed to fully opened condition.

In a PID controller, the PB (Proportional Band) is the inverse of the Gain. One can
write: PB = 100 / Gain or Gain = 100 / PB where PB is in percent.
Take, for example, a level controller on a tank where we measure the level from bottom
to top as 0 to 100%. We have a control valve on the outlet of the tank whose job is to
maintain the level in the tank. The PB is defined as the range of level over which the control
valve will go from fully closed to fully open. Suppose we decide that if the tank level should
fall to 20% we want the control valve fully closed (0% open). Additionally, if the tank level
rises to 60% full, we want the control valve to be fully open (100% open). If the tank level
is between 20% and 60% we want the control valve to be open ”in proportion” the the level.
So if the tank level were to rise to 40% (half way up the PB), the control valve should be
set to 50% open). This controller would have a PB of 40% (60% - 20%).

Integral Control:
Rt
Assuming now that Kp = Kd = 0, we simply have u(t) = ki 0 e(τ )dτ . The addition of
this integral makes the open-loop forward path of Type I. Thus, the system, if stable, is
guaranteed to have zero steady-state error to a step input. This can also be viewed as an
application of the internal model principle. If e(t) is non-zero for any length of time (for
example,positive), the control signal gets larger and large as time goes on. It thus forces
the plant to react in the event that the plant output starts to drift. We can think of the
integral term as an accumulation of the past values of the error. It is not uncommon for the
integral gain to be related to the proportional gain by Ki = Kτip where τi is the integral time.
Generally, by itself, the I term is not used. It is more commonly used with the P term to
give a P I control. The I term tends to slow the system reactions down. In order to speed
up the system responses, we add the derivative term.

The Transfer function is given by


7

For step input


A
r(s) =
s

So the major advantage of this integral control action is that the steady state error due
to step input reduces to zero. But simultaneously, the system response is generally slow,
oscillatory and unless properly designed, sometimes even unstable. The step response of this
closed loop system with integral action is shown in Fig. 4.
8
Proportional Plus Integral (P-I) Control:

It is evident from the above discussions that the P-I action provides the dual advantages
of fast response due to P-action and the zero steady state error due to I-action. The error
transfer function of the above system can be expressed as:

In the same way as in integral control, we can conclude that the steady state error would
be zero for P-I action. Besides, the closed loop characteristics equation for P-I action is:

from which we can obtain, the damping constant as:

whereas, for simple integral control the damping constant is:

Comparing these two, one can easily observe that, by varying the term Kp , the damping
constant can be increased. So we can conclude that by using P-I control, the steady state
error can be brought down to zero, and simultaneously, the transient response can be im-
proved. The output responses due to (i) P, (ii) I and (iii) P-I control for the same plant can
be compared from the sketch shown in Fig. 6.
9
Derivative controller:

Assuming now that Kp = Ki = 0, we have u(t) = Kd de(t) dt


that is that the control is based on
the rate of change of the error. The more quickly the error responds, the larger the control
effort. This changing of the error indicates where the error is going. We can thus think of
the derivative term as being a function of the future values of the error. In general, a true
differentiator is not available. This is because true differentiation is a wide-band process, i.e.,
the gain of this term increases linearly with frequency. It is a non-causal process. It tends
to amplify high-frequency noises. In addition, if the error undergoes a sharp transition, for
example, when a step input is applied, the derivative skyrockets, requiring an unreasonably
large control effort. Generally, the control signal will saturate all amplifiers etc. To deal with
the impractical nature of the D term, it is not uncommon to use the modified derivative
1
ė(t) = (e(t) − e(τ1 )), u(t) = Kd ė(t)
τ1
where τ1 limits the bandwidth of the differentiator. In terms of Laplace transform variables,
we have
s
sE(s) ≈ ( )E(s)
τ1 + 1
Thus, the smaller τ1 , the better is approximation . This corresponds to the pole of the
differentiator getting larger. It is common to let
Kd
τ1 =
N Kp

where N is typically in the range from 10 to 20. This matter of the differentiator could
also be viewed using the Taylor expansion of e(t) .
A derivative controller may able to provide anticipative action but can also make the system
become noisy. Almost always used in conjunction with P control.
10
Proportional Plus Derivative (P-D) Control:

The transfer function of a P-D controller is given by:

C(s) = Kp (1 + τd s)

K
P-D control for the process transfer function P (s) = 1+τ s
apparently is not very useful, since
it cannot reduce the steady state error to zero. But for higher order processes, it can be
shown that the stability of the closed loop system can be improved using P-D controller. For
this, let us take up the process transfer function as P (s) = js12 . Looking at Fig.7, we can
easily conclude that with proportional control, the closed loop transfer function is

and the characteristics equation is js2 + Kp = 0; giving oscillatory response. But with
P-D controller, the closed loop transfer function is:

whose characteristics equation is js2 + Kp τd s + Kp = 0; that will give a stable closed loop
response.
The step responses of this process with P and P-D controllers are compared in Fig.8.
11
Proportional-Integral-Derivative (PID) control:

The order of the controller is low, but this controller has universal applicability; it can
be used in any type of SISO system, e.g. linear, nonlinear, time delay etc. Many of the
MIMO systems are first decoupled into several SISO loops and PID controllers are designed
for each loop. PID controllers have also been found to be robust, and that is the reason, it
finds wide acceptability for industrial processes.

1.1.2 Guideline for selection of controller mode:


1. Proportional Controller:
It is simple regulating type; tuning is easy. But it normally introduces steady state error.
It is recommended for process transfer functions having a pole at origin, or for transfer
functions having a single dominating pole; for example with

2. Integral Control:
It does not exhibit steady state error, but is relatively slow responding. It is particularly
effective for:

(i) very fast process, with high noise level


(ii) process dominated by dead time

3. Proportional plus Integral (P-I) Control:


It does not cause offset associated with proportional control. It also yields much faster
response than integral action alone. It is widely used for process industries for controlling
variables like level, flow, pressure, etc., those do not have large time constants.

4. Proportional plus Derivative (P-D) Control:


It is effective for systems having large time constants. It results in a more rapid response and
less offset than is possible by pure proportional control. But one must be careful while using
derivative action in control of very fast processes, or if the measurement is noisy (e.g. flow
measurement).
12
5. Proportional plus Integral plus Derivative (P-I-D) Control:
It finds universal application. But proper tuning of the controller is difficult. It is particu-larly
useful for controlling slow variables, like pH, temperature, etc. in process industries.

The PID controller performs especially well when the system has first order dynamics (a single
pole). Actually, in this case, the P controller is a state-feedback control! In general, for the
system with first-order dynamics the PI control is sufficient, and the D is not needed. For the
system with essentially second-order dynamics, the PD control corresponds to state feed-back.
The PID control generally works well for these systems. The PID controller can also work for
some systems of higher order. Generally speaking, the derivative term is beneficial when the
time constants of the system differ by orders of large magnitude. It is sometimes helpful when
tight control of higher-order dynamics is required. This is because the higher order dynamics
prevent the use of high proportional gain. The D provides damping and speeds up the
transient response.

The PID controller, of course, is not the end-all of controllers. Sometimes the controller
just wont work very well. The following are cases when the PID control does not perform
well. In general, these require the use of more sophisticated methods of control.

• Tight control of higher order process Systems with long delay times. In this case, the
derivative term is not helpful. A Smith predictor is often used in this case.

• Systems with lightly damped oscillatory modes

• Systems with large uncertainties or variations.

• Systems with harmonic disturbances

• Highly coupled multi-input, multi-output systems, especially where coordination is


important.

The PID control thus considers past, present and future values of the error in assigning its
control value. This partly explains its success in usage. Introducing a derivative controller
will add damping and in doing so:
1. increases system stability (add phase lead)
2. reduces overshoot
3. generally improves transient response
13

1.1.3 Summary of effects of control blocks


Increasing proportional control:
• Faster speed of response

• Improved reference tracking

• Improved disturbance rejection

• Can lead to overshoots when controlling second-order and higher systems

• Physical limitation on gain

Integral controllers give:

• Perfect reference tracking

• Perfect disturbance rejection

• Overall slow system response

Increasing integral control:

• Faster speed of response

• Can lead to overshoots even when controlling first-order systems

• Can cause instability

Derivative controllers give:

• Large response to error initiation

• No effect on reference tracking

• No effect on disturbance rejection

Increasing derivative control:

• Increase level of damping

All three blocks of PID have something to offer in controlling system response
14

Table 1: Effect of increasing parameter independently

Parameter Rise Time Overshoot Settling Time Steady-State Stability


Error

𝑲𝒑 Decrease Increase Small Change Decrease Degrade

𝑲𝒊 Decrease Increase Increase Eliminate Degrade

𝑲𝒅 Minor Change Decrease Decrease No Effect Improve if


𝐾𝑑 small

1.1.4 PID Controller Design (Tuning of PID controllers)


If we have a system whose response we wish to control, how do we go about choosing
the controller parameters Kp , Ki and Kd ? The process of determining these three terms
constitute PID cntroller design or PID Tunning.
The process of obtaining the optimum values of the controller parameters with respect
to a particular process is known as controller tuning. It may be experiment based or model
based.
Our objective i s to find out the optimum settings of the P,I,D parameters, namely Kp, τ d
and τ i through e xperimentation or model based, which will provide satisfactory c losed l oop
performance, of the particular process i n terms of, say, stability, overshoot, setting time.

1.1.5 Procedure in designing PID Controller


Four simple steps:

1. Understand capabilities of PID components (summarised previously)


2. Understand the strengths and weaknesses of the systems existing performance (conduct
simple time- domain experiments, often step response test)
3. Specify desired closed-loop performance general considerations and design specifications
4. Select the PID controller components and tune the constants:
15

1.1.6. Overview of Methods


There are several methods for tuning a PID loop. The most effective methods generally involve
the development of some form of process model, then choosing P, I, and D based on the dynamic
model parameters. Manual tuning methods can be relatively inefficient, particularly if the loops
have response times on the order of minutes or longer.
The choice of method will depend largely on whether or not the loop can be taken "offline" for
tuning, and on the response time of the system. If the system can be taken offline, the best tuning
method often involves subjecting the system to a step change in input, measuring the output as a
function of time, and using this response to determine the control parameters.

Table 2: Choosing a Tuning Method

Method Advantages Disadvantages

Manual Tuning No math required , Online Requires experienced personnel

Process upset, some trial-and-


Ziegler-Nichols Proven Method, Online
error, very aggressive tuning

Some math; offline; only good


Cohen-Coon Good process models
for first-order processes

Consistent tuning; online or offline - can


Software Tools employ computer-automated control Some cost or training involved
system design (CAutoD) techniques;

1. Manual Tuning (Trial and error method):


PID tunning can be done by trial-and-error but it is time- consuming to find
appropriate gains to satisfy the performance specifications for the system.

Manual tuning of PID control is still surprisingly common. Relies on intuitive links be-
tween what each of the component blocks offers in terms of performance.
Will only consider P and PI control.
16

1. Determine whether priority for closed-loop system is reference tracking, disturbance


rejection or trade-off

2. Determine whether steady-state accuracy is essential

3. Proportional control tuning increase until speed of response is acceptable

4. Integral control tuning if steady-state accuracy important increase until acceptable


settling time

5. Balance the controller terms fine tuning Kp , Ki and Kd

Manual procedure is trial and error process. Kp changes speed of response and Ki alters
the settling time, with a tendency to overshoot

Excessive overshoot needs to be avoided but settle time must be reasonably short so that
desired output level is achieved

Procedure is further complicated if satisfactory responses is required for reference track-


ing and disturbance rejection

Example: Manual tunning


It is decided that a controller is required for a process in a chemical works. The open-loop
step response is a 50 Coutput temperature change for a 100 C input change and the open-loop
time constant is 10 minutes. The design specifications are:

• Effect closed-loop time constant of about 3 minutes

• No steady-state error in reference tracking mode

• 5% settle time of better than 20 minutes

Solution

1. Reference tracking mode only required. Engineer decides to use reference step changes
of 100 C. Settling constraint means that system must settle to within 5%of the 100 C
reference signal within 20 minutes

2. Steady-state accuracy is seen to be important as steady-state errors need to be elim-


inated. This desire and requirement to speed up process response leads engineer to
select a PI controller
17

3. Proportional control tuning involves repeated step response tests with increasing Kp
values until system response is within 3 minutes.

Involved eight tests which took a total of three hours.

4. Integral control tuning involves repeated step response tests with increasing Ki values
until system has 5% settle time of better than 20 minutes

Involved three tests which took a further two hours.


18

2. Open Loop Method


In these methods, the PID is being tuned in open loop, isolated from the process plant. First a step
input is applied to the plant and the process reaction curve is obtained. Using the process reaction
curve with one of the First Order Plus Dead Time (FOPDT) estimation methods an approximation
of the process is calculated. Knowing 𝐾𝑚 , 𝜏𝑚 and 𝑡𝑑 the PID parameters can be evaluated from
the related correlations according to the method used.
First Order Plus Dead Time (FOPDT) is given by
𝐾𝑚
𝐺(𝑠) = 𝑒 −𝑡𝑑𝑠
𝜏𝑚 𝑠 + 1
2.1 Ziegler-Nichols Open Loop Method (Reaction Curve Technique:)
In the 1940's, Ziegler and Nichols devised two empirical methods for obtaining controller
parameters. Their methods were used for first order plus dead time situations, and involved intense
manual calculations. With improved optimization software, most manual methods such as these
are no longer used. However, even with computer aids, the following two methods are still
employed today, and are considered among the most common.
This method remains a popular technique for tuning controllers that use proportional, integral, and
derivative actions. The Ziegler-Nichols open-loop method is also referred to as S-shaped curve
method, because it tests the open-loop reaction of the process to a change in the control variable
output. This basic test requires that the response of the system be recorded, preferably by a plotter
or computer. Once certain process response values are found, they can be plugged into the Ziegler-
Nichols equation with specific multiplier constants for the gains of a controller with either P, PI,
or PID actions.
In this method, we obtain experimentally the open loop response of the FOPDT to a unit step input.
This method only applied if the response to a step input exhibits an s-shaped curve as shown in
figure 7. This means that if the plant involves integrators (like 2nd order prototypes system) or
complex-conjugate poles (general 2nd order system), then this method can’t be applied since s-
shaped will not be obtained.
This method remains a popular technique for tuning controllers that use proportional, integral, and
derivative actions. The Ziegler-Nichols open-loop method is also referred to as a process reaction
method, because it tests the open-loop reaction of the process to a change in the control variable
output.
The Tuning Procedure: 19

To use the Ziegler-Nichols open-loop tuning method, you must perform the
following steps:
Here the process is assumed to be a stable first order system with time delay. The closed loop
system is broken as shown in Fig.2; a step input is applied at m, output is measured at b. In
fact, a bias input may be necessary so that the plant output initially becomes close to the
nominal value. The step input is superimposed on this bias value. The input and the output
response are plotted by suitable means as shown in Fig. 3.

1. Make an open loop step test


2. From the process reaction curve determine the transportation lag or dead time, 𝑡𝑑 , the time
constant or time for the response to change, 𝜏𝑚 , and the ultimate value that the response
reaches at steady-state, 𝐾𝑚 , for a step change of 𝑋𝑜 .
3. Determine the loop tuning constants. Plug in the reaction rate and lag time values to the
Ziegler-Nichols open-loop tuning equations for the appropriate controller (P, PI, or PID) to
calculate the controller constants. Use the table 3.

Figure 3: Open Loop of First order system plus dead Time (s-shaped curve)
20
Table 3: Open-loop Calculation of (𝐾𝑝 . 𝑇𝑖 . 𝑇𝑑 )

𝑲𝒑 𝑻𝒊 𝑻𝒅
𝑋𝑜 𝜏𝑚
P- Controller ∞ 0
𝐾𝑚 𝑡𝑑
𝑋𝑜 𝜏𝑚
PI- Controller 0.9 3.3 𝑡𝑑 0
𝐾𝑚 𝑡𝑑

𝑋𝑜 𝜏𝑚
PID- Controller 1.2
𝐾𝑚 𝑡𝑑
2 𝑡𝑑 0.5 𝑡𝑑

The PID controller tuned by this method gives (according to the formula shown in Table (8.4)).
.

 1 
G c (s )  K p 1  T d s 
 Ti s 
X o m  1 
 1.2 1  0.5t d s 
K m t d  2t d s 
(s  1/ t d ) 2
 0.6 m
s
1
 This mean that the controller adds double zero at 𝑠 = − , and pole at origin
𝑡𝑑
 Advantages Ziegler-Nichols Open Loop Tuning Methods
1. Quick and easier to use than other methods
2. It is a robust and popular method

 Disadvantages Ziegler-Nichols Open Loop Tuning Methods


1. It depends upon purely 𝑡𝑑 to estimate I and D controllers.
2. Approximations for the 𝐾𝑝 . 𝑇𝑖 , and 𝑇𝑑 values might not be entirely accurate for different
systems.
3. It does not hold for I, D and PD controllers

2.2 Ziegler-Nichols Closed - Loop Tuning Method(Continuous Cycling


method):
The major objection to the tuning methodology using reaction curve technique is that pro-
cess has to be run in open loop that may not always be permissible. For tuning the controller
when the process is in under closed loop operation, there are two methodologies; continuous
cycling method and Damped oscillation method.

Here, Closed Loop Technique (Continuous Cycling method),Based on limit of stability,


ultimate sensitivity method, the controller i s first set to P-mode, making τ d = 0and τ i = ∞. The
proportional gain Kp i s i ncreased gradually to Kp =Kpmax till the system j ust starts oscillating
with constant amplitude continuously. The output waveform i s plotted as shown i n Fig.4.
21

The Ziegler-Nichols closed-loop tuning method allows you to use the critical gain value, 𝐾𝑐𝑟 , and
the critical period of oscillation, 𝑃𝑐𝑟 , to calculate 𝐾𝑝 . It is a simple method of tuning PID
controllers and can be refined to give better approximations of the controller. You can obtain the
controller constants 𝐾𝑝 , 𝑇𝑖 , and 𝑇𝑑 in a system with feedback. The Ziegler-Nichols closed-loop
tuning method is limited to tuning processes that cannot run in an open-loop environment.

Determining the ultimate gain value, 𝐾𝑐𝑟 . is accomplished by finding the value of the
proportional-only gain that causes the control loop to oscillate indefinitely at steady state. This
means that the gains from the I and D controller are set to zero so that the influence of P can be
determined. It tests the robustness of the 𝐾𝑝 value so that it is optimized for the controller.
Another important value associated with this proportional-only control tuning method is the
critical period (𝑃𝑐𝑟 ). The ultimate period is the time required to complete one full oscillation
while the system is at steady state. These two parameters, 𝐾𝑐𝑟 and 𝑃𝑐𝑟 , are used to find the loop-
tuning constants of the controller (P, PI, or PID). To find the values of these parameters, and to
calculate the tuning constants, use the following procedure:

 The Tuning Procedure:

1. Remove integral and derivative action. Set integral time (𝑇𝑖 ) to ∞ or its largest value and
set the derivative controller (𝑇𝑑 ) to zero.
2. Create a small disturbance in the loop by changing the set point. Adjust the proportional,
increasing and/or decreasing, the gain until the oscillations have constant amplitude.
3. Record the gain value (𝐾𝑐𝑟 ) and period of oscillation (𝑃𝑐𝑟 ).
4. Plug these values into the Ziegler-Nichols closed loop equations and determine the
necessary settings for the controller.

Figure 9: System tuned using the Ziegler-Nichols closed-loop tuning method


22

Figure 10: The Control system with Gain 𝐾𝑝


Table 4: Closed-Loop Calculation of (𝐾𝑝 . 𝑇𝑖 . 𝑇𝑑 )

𝑲𝒑 𝑻𝒊 𝑻𝒅
𝐾𝑐𝑟
P- Controller ∞ 0
2
𝐾𝑐𝑟 𝑃𝑐𝑟
PI- Controller 0
2.2 1.2
𝐾𝑐𝑟 𝑃𝑐𝑟 𝑃𝑐𝑟
PID- Controller
1.7 2 8

The PID controller tuned by this method gives (according to the formula shown in Table 8.5).

 1 
G c (s )  K p 1  T d s 
 Ti s 
 1 
 0.6K cr 1  0.125Pcr s 
 0.5Pcr s 
(s  4 / Pcr ) 2
 0.075K cr Pcr
s
4
Thus the PID Controllers adds a pole at origin and double zeros at 𝑠 = −
𝑃𝑐𝑟

If the system has a known mathematical model (Transfer function is given), then RL method can
be used to find K cr value (critical gain) and the frequency of the sustained oscillations w cr . After
that Pcr is found from

2
Pcr 
w cr
These values can be found from the crossing points of the root locus branches with the jw axis.
This method doesn’t apply if the root locus doesn’t cross the jw axis.
 Advantages Ziegler-Nichols Closed-Loop Tuning Methods
1. Easy experiment; only need to change the P controller
2. Includes dynamics of whole process, which gives a more accurate picture of how the
system is behaving
 Disadvantages Ziegler-Nichols Closed-Loop Tuning Methods
1. Experiment can be time consuming
2. Can venture into unstable regions while testing the P controller, which could cause the
system to become out of control
23
2.3 Closed Loop Technique (Damped oscillation method):
In many cases, plants are not allowed to undergo through sustained oscillations, as is the
case for tuning using continuous cycling method. Damped oscillation method is preferred
for these cases. Here, initially the closed loop system is operated initially with low gain
proportional control mode with τd = 0 and τi = ∞. The gain is increased slowly till a decay
ratio p2
p1
of 1/4th is obtained in the step response in the output, as shown in Fig. 5. Under
this condition, the period of damped oscillation, Td is also noted. Let Kd be the proportional
gain setting for obtaining 1/4th decay ratio.

The optimum settings for a P-I-D controller are:

3. Cohen-Coon Method
The Cohen-Coon tuning rules are suited to a wider variety of processes than the Ziegler-Nichols
tuning rules. The Ziegler-Nichols rules work well only on processes where the dead time is less
than half the length of the time constant. The Cohen-Coon tuning rules work well on processes
where the dead time is less than two times the length of the time constant (and you can stretch this
even further if required). Also it provides one of the few sets of tuning rules that has rules for PD
controllers.
Like the Ziegler-Nichols tuning rules, the Cohen-Coon rules aim for a quarter-amplitude damping
response. Although quarter-amplitude damping-type of tuning provides very fast disturbance
rejection, it tends to be very oscillatory and frequently interacts with similarly-tuned loops.
Quarter-amplitude damping-type tuning also leaves the loop vulnerable to going unstable if the
process gain or dead time doubles in value.

In this method the process response curve is obtained first, by an open loop test as shown in
figure 3 and then the process dynamics is approximated by a first order plus dead time
model, with following parameters:
24

Figure 7: The open loop response of plant


3
𝜏𝑚 = (𝑡2 − 𝑡1 )
2
𝑡𝑑 = 𝑡2 − 𝜏𝑚
Again the particular rules for this method are used to calculate the PID parameters. They are listed
in table 3
Table 3: the parameter of Cohen-Coon Method

Controller 𝑲𝒄 𝑻𝒊 𝑻𝒅

P 𝜏𝑚 𝑡𝑑 - -
(1 + )
𝐾𝑡𝑑 3𝜏𝑚

PI 𝜏𝑚 𝑡𝑑 3𝑡𝑑 -
(0.9 + ) 30 +
𝐾𝑡𝑑 12𝜏𝑚 𝜏𝑚
𝑡𝑑 ( )
20𝑡𝑑
9+
𝜏𝑚

PD 𝜏𝑚 𝑡𝑑 - 2𝑡𝑑
(1.25 + ) 6−
𝐾𝑡𝑑 6𝜏𝑚 𝜏𝑚
𝑡𝑑 ( )
3𝑡
22 + 𝑑
𝜏𝑚

PID 𝜏𝑚 𝑡𝑑 6𝑡𝑑
(1.33 + ) 32 + 4
𝐾𝑡𝑑 4𝜏𝑚 𝜏𝑚
𝑡𝑑 ( ) 𝑡𝑑 ( )
8𝑡𝑑 2𝑡
13 + 11 + 𝑑
𝜏𝑚 𝜏𝑚

4 Software Method (PID Tuning Toolbox In MATLAB)


4.1 Automatically Tune PID Controller Gains
PID tuning is the process of finding the values of proportional, integral, and derivative gains of a
PID controller to achieve desired performance and meet design requirements.
PID controller tuning appears easy, but finding the set of gains that ensures the best performance
of your control system is a complex task. Traditionally, PID controllers are tuned either manually
or using rule-based methods. Manual tuning methods are iterative and time-consuming, and if used
on hardware, they can cause damage. Rule-based methods also have serious limitations: they do
25

not support certain types of plant models, such as unstable plants, high-order plants, or plants with
little or no time delay.
You can automatically tune PID controllers to achieve the optimal system design and to meet
design requirements, even for plant models that traditional rule-based methods cannot handle well.

An automated PID tuning workflow involves:


 Identifying plant model from input-output test data
 Modeling PID controllers in MATLAB using PID objects or in Simulink using PID
Controller blocks
 Automatically tuning PID controller gains and fine-tune your design interactively
 Tuning multiple controllers in batch mode
 Tuning single-input single-output PID controllers as well as multiloop PID controller
architectures
4.2 PID Tuning Toolbox
Can be use the PID tuning toolbox to determine the parameter of controller depend on the
system form MATLAB or SIMULINK as following step:
1) MATLAB
Use the PID Tuner to interactively design a SISO PID controller in the feed-forward path of
single-loop, unity-feedback control configuration

The PID Tuner automatically designs a controller for your plant. You specify the controller
type (P, I, PI, PD, PDF, PID, PIDF) and form (parallel or standard). You can analyze the
design using a variety of response plots, and interactively adjust the design to meet your
performance requirements.
To launch the PID Tuner, use the pidTuner command:
pidTuner(sys,type)
where sys is a linear model of the plant you want to control,
type is a string indicating the controller type to design
26

 PID Controller Type


The PID Tuner can tune up to seven types of controllers. To select the controller type, use one
of these methods:
Provide the type argument to the launch command pidTuner.
In PID Tuner, use the Type menu to change controller types.

2) SIMULINK
Select the PID controller block form Simulink Library
27

Drag the PID controller and place in the Simulink model , and double click on block.
Example 1: 28

This example shows how to use the PID tuner to design a controller for the plant

1
𝐺(𝑠) =
(𝑠 + 1)3
1. Create the plant model and open the PID Tuner to design a PI controller for a first pass
design.

2.

3. The PIDTuner toolbox

4. Examine the reference tracking rise time and settling time.


29

Right-click on the plot and select Characteristics > Rise Time to mark the rise time as a blue
dot on the plot. Select Characteristics > Settling Time to mark the settling time. To see tool-
tips with numerical values, click each of the blue dots.

5. Slide the Response time slider to the right to try to improve the loop performance. The
response plot automatically updates with the new design
30

Moving the Response time slider far enough to meet the rise time requirement of less than 1.5
s results in more oscillation. Additionally, the parameters display shows that the new response
has an unacceptably long settling time.

To achieve the faster response speed, the algorithm must sacrifice stability.
6. Change the controller type to improve the response.
Adding derivative action to the controller gives the PID Tuner more freedom to achieve
adequate phase margin with the desired response speed.
In the Type menu, select PIDF. The PID Tuner designs a new PIDF controller
31

The rise time and settling time now meet the design requirements. You can use the Response
time slider to make further adjustments to the response. To revert to the default automated tuning
result, click Reset Design.
7. Analyze other system responses, if appropriate.
To analyze other system responses, click Add Plot. Select the system response you want to
analyze.

For example, to observe the closed-loop step response to disturbance at the plant input, in
the Step section of the Add Plot menu, select Input disturbance rejection. The disturbance
rejection response appears in a new figure.
32

Example 2:
Assume the system in example 1 Bu
1) Build the Simulink block represent the closed loop system
33

2) Add PID Controller block

3) Double click on PID controller block


34

4) Choose the controller type , click apply and click tune


The PID tuner window will appear and can follow the steps as example 1
34

Note:
If need change the controller type , must be close the tuner window, and repeat step 4

You might also like