A STUDY ON PID CONTROLLER DESIGN FOR SYSTEMS WITH TIME DELAY THESIS

A STUDY ON PID CONTROLLER DESIGN FOR SYSTEMS WITH TIME DELAY  THESIS
A STUDY ON PID CONTROLLER DESIGN
FOR SYSTEMS WITH TIME DELAY
THESIS
Submitted in Partial Fulfillment of the Requirements for the Degree of
BACHELOR OF TECHNOLOGY
in
ELECTRICAL ENGINEERING
By
ANURAG MISHRA
107EE010
Under the supervision of
Prof. Sandip Ghosh
Department of Electrical Engineering
National Institute of Technology
Rourkela -769 008, Orissa, India.
2011
Page | 1
CERTIFICATE
This is to certify that the thesis entitled, “Study of PID controller design for systems
with Time delay” submitted by Shri Anurag Mishra in partial fulfilment of the
requirements for the award of Bachelor of Technology degree in Electrical
Engineering at the National Institute of Technology, Rourkela (Deemed University),
is an authentic work carried out by him under my supervision and guidance.
To the best of my knowledge the matter embodied in the thesis has not been
submitted to any other University/Institute for the award of any degree or diploma.
Date:
Place: Rourkela
Prof. Sandip Ghosh
Department of Electrical Engineering
National Institute of Technology Rourkela
Page | 2
ABSTRACT
PID controllers are being widely used in industry due to their well-grounded
established theory, simplicity, maintenance requirements, and ease of retuning online.
In the past four decades, there are numerous papers dealing with tuning of PID
controller. Designing a PID controller to meet gain and phase margin specification is
a well-known design technique. If the gain and phase margin are not specified
carefully then the design may not be optimum in the sense that could be large phase
margin (more robust) that could give better performance. This paper studies the
relationship between ISE performance index, gain margin, phase margin and
compares two tuning technique, based on these three parameters. These tuning
techniques are particularly useful in the context of adaptive control and auto-tuning,
where the control parameters have to be calculated on-line.
In the first part, basics of various controllers, their working and importance of PID
controller in reference to a practical system (thermal control system) is discussed.
In the latter part of the work, exhaustive study has been done on two different PID
controller tuning techniques. A compromise between robustness and tracking
performance of the system in presence of time delay is tried to achieve. Results of
simulation, graph, plots, indicate the validity of the study.
Page | 3
ACKNOWLEDGEMENTS
I have been very fortunate to start my thesis work under the supervision and
guidance of Prof. Sandip Ghosh. He introduced me to the field of Control systems,
educated me with the methods and principles of research, and guided me through the
details of PID controllers. He is the whole Philosopher and Guide behind this thesis.
Working with him, a person of values has been a rewarding experience.
I am highly indebted and express my deep sense of gratitude for his invaluable
guidance, constant inspiration and motivation with enormous moral support during
difficult phase to complete the work. I acknowledge his contributions and appreciate
the efforts put by him for helping me complete the thesis.
I would like to take this opportunity to thank Prof. B. D. Subudhi, the Head of the
Department for letting me use the laboratory facilities for my project work. I am
thankful to him for always extending every kind of support to me.
At this moment I would also like to express my gratitude for the technical staff of our
laboratories. They have always helped me in every-way they can during my
experimental phase of the work.
Page | 4
CONTENTS
COVER PAGE
1
CERTIFICATE
2
ABSTRACT
3
ACKNOWLEDGEMENTS
4
LIST OF FIGURES
7
LIST OF TABLES
8
.
Chapter 1 INTRODUCTION.....................................................................................9
1.1 Proportional Control............................................................................................11
1.2 Integral Control...................................................................................................12
1.3 PI Control............................................................................................................12
1.4 PD Control...........................................................................................................13
1.5 PID Control.........................................................................................................13
1.6 Application..........................................................................................................15
Chapter 2 STUDY OF PROCESS CONTROL SIMULATOR (PCS327)...............16
2.1 Basic Introduction...............................................................................................16
2.2 Experiments........................................................................................................18
Chapter 3 TUNING OF PID CONTROLLER..........................................................25
3.1 Basic Introduction................................................................................................25
3.2 Ziegler-Nichols Rules for tuning PID Controller................................................26
3.3 Recent Trends......................................................................................................28
3.3.1 Optimum PID Controller Design................................................................28
3.3.2 Automatic Tuning of PID controller........................................................... 28
3.4 First order delay time process..............................................................................29
Chapter 4 DESIGN OF PID CONTROLLER...........................................................32
4.1 Method – I : Tuning based on Gain and Phase margin........................................32
4.1.1
Introduction..............................................................................................32
4.1.2
Methodology............................................................................................32
4.1.3
Computation.............................................................................................36
4.1.4
Algorithm.................................................................................................36
4.1.5
Simulink Model........................................................................................40
4.1.6
Project Report...........................................................................................42
Page | 5
4.1.7
Graphs and Plots.........................................................................................46
4.2 Method – II : Gain-Phase Margin Tester Method ..................................................48
4.2.1
Introduction.............................................................................................. 48
4.2.2
Advantage..................................................................................................48
4.2.3
Methodology..............................................................................................48
4.2.4
Computation...............................................................................................51
4.2.5
Algorithm...................................................................................................51
4.2.6
Simulink Model..........................................................................................56
4.2.7
Project Report.............................................................................................57
4.2.8
Graphs and Plots.........................................................................................61
RESULT OF THE ANALYSIS AND COMPARISION.............................................63
CONCLUSION AND FUTURE SCOPE.....................................................................65
BIBLIOGRAPHY........................................................................................................66
Page | 6
LIST OF FIGURES
FIGURE NO.
TITLE
PAGE NO.
Fig 1.1
Control System block
9
Fig 1.2
PI Controller
12
Fig 1.3
PID controller
14
Fig 1.4
Closed Loop Step Response
15
Fig 2.1
Circuit Diagram of PCS327
17
Fig 2.2
Terminal diagram of Proportional part
18
Fig 2.3
Terminal diagram of Integral part
19
Fig 2.4
Terminal diagram of Derivative part
20
Fig 2.5
Terminal diagram of Limits part
21
Fig 2.6
Terminal diagram of Dead-Band part
22
Fig 2.7
Terminal diagram of Overlap part
23
Fig 2.8
Power Circuit diagram of PCS327
24
Fig 3.1
Ziegler-Nichols Ultimate sensitivity test
27
Fig 3.2
Ziegler-Nichols Step Response Method
27
Fig 3.3
Frequency response of Dead Time
30
Fig 4.1
Simulink Model of Gain-phase margin method
40
Fig 4.2
PI response
41
Fig 4.3
Graphs and Plots
47
Fig 4.4
Plot of Kp Vs Ki in Gain-phase tester method
53
Fig 4.5
Simulink model of Gain-phase tester method
56
Fig 4.6
Graphs and Plots
62
Page | 7
LIST OF TABLES
TABLE NO.
TITLE
PAGE NO.
Table 4.1
PID Parameters and Integral Square Error for
Gain = 2.0(using gain-phase margin method)
42
Table 4.2
PID Parameters and Integral Square Error for
Gain = 3.0(using gain-phase margin method)
43
Table 4.3
PID Parameters and Integral Square Error for
Gain = 4.0(using gain-phase margin method)
44
Table 4.4
PID Parameters and Integral Square Error for
Gain = 5.0(using gain-phase margin method)
45
Table 4.5
PID Parameters and Integral Square Error for
Gain = 2.0(using gain-phase tester method)
57
Table 4.6
PID Parameters and Integral Square Error for
Gain = 3.0(using gain-phase tester method)
58
Table 4.7
PID Parameters and Integral Square Error for
Gain = 4.0(using gain-phase tester method)
59
Table 4.8
PID Parameters and Integral Square Error for
Gain = 5.0(using gain-phase tester method)
60
Page | 8
Chapter 1 INTRODUCTION
In the recent years, control system has assumed an increasingly important role in the
development and advancement of modern civilization and technology. Practically
every aspect of our day-to-day activities is affected by some type of control systems.
Automatic control system are found in abundance in all sectors of industry, such as
quality control of manufactured products, automatic assembly line, machine-tool
control, space technology and weapon system, computer control, transportation
systems, power systems, robotics and many others. It is essential in such industrial
operations as controlling pressure, temperature, humidity, and flow in the process
industries.
Recent application of modern control theory includes such non-engineering systems
as biological, biomedical, control of inventory, economic and socioeconomic systems.
The basic ingredients of a control system can be described by:
 Objectives of control.
 Control system components.
 Results or output.
Fig1.1
Automatic Controllers:An automatic controller is used to compare the actual value of plant result
with reference command, determines the difference, and produces a control
signal that will reduce this difference to a negligible value. The manner in
which the automatic controller produces such a control signal is called the
control action.
An industrial control system comprises of an automatic controller, an actuator,
a plant, and a sensor (measuring element). The controller detects the actuating
Page | 9
error command, which is usually at a very low power level, and amplifies it to
a very high level. The output of the automatic controller is fed to an actuator,
such as a hydraulic motor, an electric motor or a pneumatic motor or valve (or
any other sources of energy). The actuator is a power device that produces
input to the plant according to the control signal so that the output signal will
point to the reference input signal.
The sensor or the measuring element is a device that converts the output
variable into another optimum variable, such as a displacement, pressure or
voltage, that can be used to compare the output to the reference input
command. This element is in a feedback path of the closed loop system. The
set point controller must be converted to reference input with the same unit as
the feedback signal from the sensor element.
Classification of Industrial controllers:-
Industrial controllers may be classified according to their control action as:

Two-position or on-off controllers

Proportional controllers

Integral controllers

Proportional-plus-integral controllers

Proportional-plus-derivative controllers

Proportional-plus-integral-plus-derivative controllers
Type of controller to use must be decided depending upon the nature of the plant and
the operating condition, including such consideration as safety, cost, availability,
reliability, accuracy, weight and size.
Two-position or on-off controllers:-
In a two-position control system, the actuating part has only two fixed
positions, which are, in many simple cases, simply on and off. Due to its simplicity
and inexpensiveness, it is being very widely used in both industrial and domestic
control system.
Page | 10
Let the output signal from the controller be u(t) and the actuating error signal
be e(t). Then mathematically,
u(t) = U1, for e(t) > 0
= U2, for e(t) < 0
Where,
U1 and U2 are constants and the minimum value of U2 is usually either
zero or - U1.
1.1 Proportional Control :A proportional control system is a type of linear feedback control system.
Proportional control is how most drivers control the speed of a car. If the car is at
target speed and the speed increases slightly, the power is reduced slightly, or in
proportion to the error (the actual versus target speed), so that the car reduces speed
gradually and reaches the target point with very little, if any, "overshoot", so the result
is much smoother control than on-off control [5].
In the proportional control algorithm, the controller output is proportional to the error
signal, which is the difference between the set point and the process variable. In other
words, the output of a proportional controller is the multiplication product of the error
signal and the proportional gain. This can be mathematically expressed as
Pout = Kp e(t)
Where
Pout: Output of the proportional controller
Kp: Proportional gain
e(t): Instantaneous process error at time 't'. e(t) = SP − PV
SP: Set point
PV: Process variable
With increase in Kp :

Response speed of the system increases.
Page | 11

Overshoot of the closed-loop system increases.

Steady-state error decreases.
But with high Kp value, closed-loop system becomes unstable.
1.2 Integral Control:In a proportional control of a plant whose transfer function doesn‟t possess an
integrator 1/s, there is a steady-state error, or offset, in the response to a step input.
Such an offset can be eliminated if integral controller is included in the system.
In the integral control of a plant, the control signal, the output signal from the
controller, at any instant is the area under the actuating error signal curve up to that
instant. But while removing the steady-state error, it may lead to oscillatory response
of slowly decreasing amplitude or even increasing amplitude, both of which is usually
undesirable [5].
1.3 Proportional-plus-integral controllers:In control engineering, a PI Controller (proportional-integral controller) is a
feedback controller which drives the plant to be controlled by a weighted sum of the
error (difference between the output and desired set-point) and the integral of that
value. It is a special case of the PID controller in which the derivative (D) part of the
error is not used.
The PI controller is mathematically denoted as:
Gc = Kp +
Ki
s
or
G c = K p (1+
1
)
sTi
Fig.1.2 (courtesy-[5])
Page | 12
Integral control action added to the proportional controller converts the original
system into high order. Hence the control system may become unstable for a large
value of Kp since roots of the characteristic eqn. may have positive real part. In this
control, proportional control action tends to stabilize the system, while the integral
control action tends to eliminate or reduce steady-state error in response to various
inputs. As the value of Ti is increased,

Overshoot tends to be smaller

Speed of the response tends to be slower.
1.4 Proportional-plus-derivative controllers:Proportional-Derivative or PD control combines proportional control and derivative
control in parallel. Derivative action acts on the derivative or rate of change of the
control error. This provides a fast response, as opposed to the integral action, but
cannot accommodate constant errors (i.e. the derivative of a constant, nonzero error is
0). Derivatives have a phase of +90 degrees leading to an anticipatory or predictive
response. However, derivative control will produce large control signals in response
to high frequency control errors such as set point changes (step command) and
measurement noise [5].
In order to use derivative control the transfer functions must be proper. This often
requires a pole to be added to the controller.
Gpd(s) = Kp + Kds or
= Kp(1+Tds)
With the increase of Td

Overshoot tends to be smaller

Slower rise time but similar settling time.
1.5 Proportional-plus-integral-plus-derivative controllers:The PID controller was first placed on the market in 1939 and has remained the most
widely used controller in process control until today. An investigation performed in 1989
in Japan indicated that more than 90% of the controllers used in process industries are
PID controllers and advanced versions of the PID controller. PI controllers are fairly
common, since derivative action is sensitive to measurement noise
Page | 13
“PID control” is the method of feedback control that uses the PID controller as the main
tool. The basic structure of conventional feedback control systems is shown in Figure
below, using a block diagram representation. In this figure, the process is the object to be
controlled. The purpose of control is to make the process variable y follow the set-point
value r. To achieve this purpose, the manipulated variable u is changed at the command
of the controller. As an example of processes, consider a heating tank in which some
liquid is heated to a desired temperature by burning fuel gas. The process variable y is the
temperature of the liquid, and the manipulated variable u is the flow of the fuel gas. The
“disturbance” is any factor, other than the manipulated variable, that influences the
process variable. Figure below assumes that only one disturbance is added to the
manipulated variable. In some applications, however, a major disturbance enters the
process in a different way, or plural disturbances need to be considered. The error e is
defined by e = r – y. The compensator C(s) is the computational rule that determines the
manipulated variable u based on its input data, which is the error e in the case of Figure.
The last thing to notice about the Figure is that the process variable y is assumed to be
measured by the detector, which is not shown explicitly here, with sufficient accuracy
instantaneously that the input to the controller can be regarded as being exactly equal to y.
Fig. 1.3(courtesy-[5])
When used in this manner, the three element of PID produces outputs with the
following nature:
 P element: proportional to the error at the instant t, this is the “present” error.

I element: proportional to the integral of the error up to the instant t, which can
be interpreted as the accumulation of the “past” error.
Page | 14

D element: proportional to the derivative of the error at the instant t, which can
be interpreted as the prediction of the “future” error.
Thus, the PID controller can be understood as a controller that takes the present, the past,
and the future of the error into consideration. The transfer function Gc(s) of the PID
controller is :
G c (s) = K p (1+
=
Kp +
1
+Tds)
sTi
Ki
+ K ds
s
1.6 Application:In the early history of automatic process control the PID controller was implemented
as a mechanical device. These mechanical controllers used a lever, spring and
a mass and were often energized by compressed air. These pneumatic controllers were
once the industry standard [5].
Electronic analog controllers can be made from a solid-state or tube amplifier,
a capacitor and a resistance. Electronic analog PID control loops were often found
within more complex electronic systems, for example, the head positioning of a disk
drive, the power conditioning of a power supply, or even the movement-detection
circuit of a modern seismometer. Nowadays, electronic controllers have largely been
replaced by digital controllers implemented with microcontrollers or FPGAs.
Most modern PID controllers in industry are implemented in programmable logic
controllers (PLCs) or as a panel-mounted digital controller. Software implementations
have the advantages that they are relatively cheap and are flexible with respect to the
implementation of the PID algorithm [5].
Fig.1.4 Close-loop step response.
Page | 15
Chapter 2 STUDY OF PROCESS CONTROL SIMULATOR
(PCS 327)
2.1 Basic Introduction:A process control simulator contains electronic circuits for modifying set-point
control signals by summing, integrating, differentiating and introducing step functions
on continuous, single or periodic bases to determine off-line the behaviour of a
process control system [6]. Provisions are made for several interacting control loops,
for dead-time delays and for faster than actual response times to speed up simulation.
The dead-time delays are provided by scanning a set of storage capacitors with a
variable speed scanning motor through a scanning control cycle of operation. A three
control loop controller section provides for setting the gain of the controller system
and controlling integration and difference modes responsive to step disturbances
introduced into an integration process after a selectable dead-time adjustment. The
output signal is reproduced in the form of a process response waveform.
It is a special-purpose analogue simulator employing integrated circuit operational
amplifiers laid out in such a manner to allow the principles of process control methods
to be taught at both technician and technological levels. Numerous variable
interconnections together with a rage of non-linear functions make the simulator
sufficiently versatile to permit a detailed study of the dynamic responses of a wide –
variety of linear
and non-linear processes and the application of proportional,
integral, derivative, two-step, three-step(with and without overlap) and many other
modes of control to the improvement of their performance. At the same time
provision is made for the process characteristics and controller configuration to be
preset by the instructor and the full mimic diagrams concealed by simplified overlays;
this helps to present the ideas of process control in the simplest possible terms to
technicians whose acquaintance with process control methods will be of a more
empirical nature.
Basically the motive here is to first, carry the physical investigation of the Process
Control Simulator (PCS 327) and establish the ideal working condition of the device.
For this purpose, first, all the individual Capacitances and Resistances were measured
and compared to their specified values. Secondly, the Proportional, Integral,
Page | 16
Derivative units and the Non-linear units (Limits, Dead-band, Neutral zone) were
individually studied and inferences were drawn. Then, after the ideal working
apparatus is established, tuning of the controller is carried out and matched with the
theoretical data from MATLAB to confirm its perfect working condition. All this is
discussed in detail.
Fig.2.1 Diagram of Process Control Simulator PCS327(Courtesy: Feedback
Instruments [6])
Page | 17
2.2 Experiments
2.2.1 Experiment-1
Aim:- Study of ‘Proportional’ feature of PCS327.
PROPORTIONAL
0% [TERMINAL-1]
200% [TERMINAL-2]
COMMON
TERMINAL[C]
Fig.2.2 Terminal diagram of Proportional part
Procedure:1. Using Multi-meter, the individual resistances across the terminals of the
Proportional band were measured.
2. According to the change in the resistances, pattern was observed and inference was
drawn.
Tabulation:SERIAL NO.
PROPORTIONAL %
1
2
3
4
5
0
30
50
100
200
RESISTANCE OF [1-C]
(Ohms)
6.16 M
45.6 K
38.9 K
25.57 K
3.3 K
RESISTANCE OF [2-C]
(Ohms)
5
0.99 K
1.059 K
1.102 K
1.126 K
Inference :As the resistances are varying properly (1-C is decreasing and 2-C is increasing), we
can infer that the band is functioning properly.
Page | 18
2.2.2 Experiment-2
Aim:- Study of ‘integral’ feature of PCS327.
INTEGRAL
0.5 [TERMINAL-1]
OFF [TERMINAL-2]
COMMON
TERMINAL[C]
Fig.2.3 Terminal diagram of Integral part
Procedure:1. Using Multi-meter, the individual resistances across the terminals of the Integral
band were measured.
2. According to the change in the resistances, pattern was observed and inference was
drawn.
Tabulation:SERIAL NO.
INTEGRAL
1
2
3
4
5
OFF
5
1.5
1
0.5
RESISTANCE OF [1-C]
(Ohms)
9
2.32 K
5.47 K
6.45 K
954
RESISTANCE OF [2-C]
(Ohms)
472.9
2.7 K
5.65 K
6.44 K
524.6
Inference :As the resistances are NOT varying properly (Both 1-C and 2-C is increasing first and
then decreasing), we can infer that the band may have some problems and it is
considered for further investigation.
Page | 19
2.2.3 Experiment-3
Aim:- Study of ‘Derivative’ feature of PCS327.
DERIVATIVE
2 [TERMINAL-1]
0 [TERMINAL-2]
COMMON
TERMINAL[C]
Fig.2.4 Terminal diagram of Derivative part
Procedure:1. Using Multi-meter, the individual resistances across the terminals of the Derivative
band were measured.
2. According to the change in the resistances, pattern was observed and inference was
drawn.
Tabulation:SERIAL NO.
DERIVATIVE
1
2
3
4
5
0
0.4
1
1.4
2
RESISTANCE OF [1-C]
(Ohms)
887
5.51 K
12.75 K
17.46 K
24.6 K
RESISTANCE OF [2-C]
(Ohms)
25.07 K
20.42 K
13.13 K
8.26 K
145.8
Inference :As the resistances are varying properly (1-C is increasing and 2-C is decreasing), we
can infer that the band is functioning properly.
Page | 20
2.2.4 Experiment-4
Aim:- Study of ‘Limits’(Non-linear Unit) feature of PCS327.
LIMITS
10 [TERMINAL-1]
0.5 [TERMINAL-2]
COMMON
TERMINAL[C]
Fig.2.5 Terminal diagram of Limits part
Procedure:1. Using Multi-meter, the individual resistances across the terminals of the Limits
band were measured.
2. According to the change in the resistances, pattern was observed and inference was
drawn.
Tabulation:SERIAL NO.
LIMITS
1
2
3
4
5
0.5
2
4
8
10
RESISTANCE OF [1-C]
(Ohms)
6.2 K
5.62 K
4.69 K
2.82 K
1.66 K
RESISTANCE OF [2-C]
(Ohms)
946
3.0 K
4.07 K
5.79 K
6.64 K
Inference :As the resistances are varying properly (1-C is decreasing and 2-C is increasing), we
can infer that the band is functioning properly.
Page | 21
2.2.5 Experiment-5
Aim:- Study of ‘Dead-Band’(Non-linear Unit) feature of PCS327.
DEAD BAND
10 [TERMINAL-1]
0 [TERMINAL-2]
COMMON
TERMINAL[C]
Fig.2.6 Terminal diagram of dead-band part
Procedure:1. Using Multi-meter, the individual resistances across the terminals of the Dead-band
were measured.
2. According to the change in the resistances, pattern was observed and inference was
drawn.
Tabulation:SERIAL NO.
DEAD-BAND
1
2
3
4
5
0
2
4
6
10
RESISTANCE OF [1-C]
(Ohms)
5.86 K
5.22 K
4.51 K
3.69 K
0.73 K
RESISTANCE OF [2-C]
(Ohms)
281.5
2.23 K
3.39 K
4.22 K
5.38 K
Inference :As the resistances are varying properly (1-C is decreasing and 2-C is increasing), we
can infer that the band is functioning properly.
Page | 22
2.2.6 Experiment-6
Aim:- Study of ‘Overlap’(Non-linear Unit) feature of PCS327.
OVERLAP
20 [TERMINAL-1]
0 [TERMINAL-2]
COMMON
TERMINAL[C]
Fig.2.7 Terminal diagram of Overlap part
Procedure:1.Using Multi-meter, the individual resistances across the terminals of the Overlap
band were measured.
2. According to the change in the resistances, pattern was observed and inference was
drawn.
Tabulation:SERIAL NO.
OVERLAP
1
2
3
4
5
0
4
10
16
20
RESISTANCE OF [1-C]
(Ohms)
0.79 K
9.45 K
16.46 K
15.42 K
12.91 K
RESISTANCE OF [2-C]
(Ohms)
11.69 K
16.02 K
15.58 K
9.80 K
2.89 K
Inference :As the resistances are NOT varying properly (Both 1-C and 2-C is increasing first and
then decreasing), we can infer that the band may have some problems and it is
considered for further investigation.
Page | 23
2.2.7 Experiment-7
Aim:- Study of Power Circuit of PCS327.
Procedure:1.Using Multi-meter, all the individual resistances and Capacitances of the circuit
were measured.
2. These experimental values were compared with the theoretical values and for those
parts, which were either damaged or mismatching was found, inference was drawn
that they need to be replaced.
Mis-matching in R1
value
C3 was
damaged
Fig 2.8. Diagram of Power circuit of PCS327(Courtesy: Feedback Instruments)
Observation:From the above experiment the marked parts (R1 and C3) did not satisfy the
theoretical conditions and so it was concluded that they need to be replaced for perfect
functioning of PCS327.
Page | 24
Chapter 3 TUNING OF PID CONTROLLER
3.1 Basic Introduction:“Tuning” is the engineering work to adjust the parameters of the controller so that the
control system exhibits desired property. Currently, more than half of the controllers
used in industry are PID controllers [5]. In the past, many of these controllers were
analog; however, many of today's controllers use digital signals and computers. When
a mathematical model of a system is available, the parameters of the controller can be
explicitly determined. However, when a mathematical model is unavailable, the
parameters must be determined experimentally. Controller tuning is the process of
determining the controller parameters which produce the desired output. Controller
tuning allows for optimization of a process and minimizes the error between the
variable of the process and its set point [5].
Types of controller tuning methods include the trial and error method, and process
reaction curve methods. The most common classical controller tuning methods are the
Ziegler-Nichols and Cohen-Coon methods. These methods are often used when the
mathematical model of the system is not available. The Ziegler-Nichols method can
be used for both closed and open loop systems, while Cohen-Coon is typically used
for open loop systems. A closed-loop control system is a system which uses feedback
control. In an open-loop system, the output is not compared to the input [5].
The equation below shows the PID controller:-.
1
u(t) = K p [ e(t) +
Ti
t
 e(t') dt'
0
+ Td (
de(t)
)]+b
dt
Where,
u is the control signal.
e is the difference between the current value and the set point.
Kc is the gain for a proportional controller.
Ti is the parameter that scales the integral controller.
Td is the parameter that scales the derivative controller.
t is the time taken for error measurement.
b is the set point value of the signal, also known as bias or offset.
Page | 25
3.2 Ziegler-Nichols Rules for tuning PID Controller:It has been observed that step responses of many processes to which PID controllers
are applied have monotonically increasing characteristics as shown in Figures a and b,
so most traditional design methods for PID controllers have been developed implicitly
assuming this property. However, there exist some processes that exhibit oscillatory
responses to step inputs.
Two tuning methods were proposed by Ziegler and Nichols in 1942 and have been
widely utilized either in the original form or in modified forms. One of them, referred
to as Ziegler–Nichols‟ ultimate sensitivity method, is to determine the parameters as
given in Table 1 using the data Kcr and Tcr obtained from the ultimate sensitivity test.
The other, referred to as Ziegler–Nichols‟ step response method, is to assume the
model FOPDT and to determine the parameters of the PID controller as given in
Table 2 using the parameters R and L of FOPDT which are determined from the step
response test.
Kp
Ti
Td
P
0.5Kcr

0
PI
0.45Kcr
0.833Tcr
PID
0.6Kcr
0.5Tcr
Type of controller
0
0.125Tcr
Fig.3.1 Ziegler-Nichols ultimate sensitivity test [17].
Kp
Ti
Td
P
1/RL

0
PI
0.9/RL
L/0.3
0
PID
1.2/RL
2L
0.5L
Type of controller
Fig.3.2 Ziegler-Nichols step response method (RL0) [17].
Page | 26
Frequency-domain stability analysis tells that the above way of applying the Ziegler–
Nichols‟ step response method to processes with self-regulation tends to set the
parameters on the safe side, in the sense that the actual gain and phase margins
become larger than the values expected in the case of integrating processes.
.These
methods to determine PID parameter using empirical formula, as well as
several other tuning methods developed on the same principle, are often referred to as
“classical” tuning methods. Some of the other classical tuning methods are, Chien–
Hrones–Reswick formula, Cohen–Coon formula, refined Ziegler–Nichols tuning,
Wang–Juang–Chan formula.
Disadvantage :The classical tuning methods explained above have the following features:
• The process is assumed, implicitly (in the case of Ziegler–Nichols‟ ultimate sensitivity
method) or explicitly (in the case of Ziegler–Nichols‟ step response method), to be
modelled by the simple transfer function.
• The optimal values of the PID parameters are given by formulae of the process
parameters that are determined directly and uniquely from experimental data.
The first feature is a weakness of these classical methods, in the sense that the applicable
processes are limited, or in other words that the claimed “optimal” values are not
necessarily, and are sometimes fairly far from, the true optimal in practical situations
where the transfer function is nothing but an approximation of the real process
characteristics. Specifically, the problem is serious when the pure delay L of the process
is very short or very long, where “very short” and “very long” roughly means outside the
range 0.05≤L/T≤1.0 [17]. It can be interpreted as a weakness in the sense that there is no
room to improve the results by making use of more detailed information about the process
which is obtainable from theoretical study and accurate measurement.
Many attempts have been made to make up for these weaknesses of the classical methods.
Many theoretical considerations have been used to develop sophisticated methods that
use, as the basis of tuning, the shape of the frequency response of the return ratio, poles
(and zeros) of the closed-loop transfer function, time-domain performance indices such as
ISE, or frequency-domain performance indices.
Page | 27
3.3 Recent Trends :3.3.1 Optimum PID Controller Design:Optimum setting algorithms for a PID controller were proposed by Zhuang and
Atherton for various criteria. Consider the general form of the optimum criterion
J n ( ) =

 [t
n
e( ,t)]2 dt
0
Where e(,t) is the error signal which enters the PID controller, with θ the PID
controller parameters. For the system structure shown in Fig. 2, two setting strategies
are proposed: one for the set-point input and the other for the disturbance signal d(t).
In particular, three values of n are discussed, i.e., for n = 0, 1, 2. These three cases
correspond, respectively, to three different optimum criteria: the integral squared error
(ISE) criterion, integral squared time weighted error (ISTE) criterion, and the integral
squared time-squared weighted error (IST2E) criterion.
3.3.2 Automatic tuning of PID Controller:In 1984, Astrom and Hagglund proposed an automatic tuning method based on a
simple relay feedback test, using the describing function analysis, the critical gain and
the critical frequency of the system. This method is popularly known as Gain-phase
margin (G-P) method.
This topic was further studied and discussed by Ho, Hang, and Cao in the year 1995.
All this studies on the approach of optimal design of PID controller based on Gain
margin, phase margin have resulted in the following recommended range:
Gain Margin – 2 – 5;
Phase Margin – 30o – 70o
And two important factors that have been considered are:

ROBUSTNESS: larger the phase margin greater is the robustness of the
system.
Page | 28

PERFORMANCE: lower the value of ISE better is the performance.
In this study on optimal design of PID Controller, we will be analysing the two
technique, on how they perform to the given specification or range discussed above.
The two methods are:
Method - 1 : Based on Gain and Phase margin i.e. numerical solution method.
Method – 2 : Based on Gain-Phase margin tester method.
Both the method is based on First Order Plus Delay Time (FOPDT) process. It is
given by:
G p (s) = (
K
)e-sL
1+sT
3.4 First order delay time process :A first-order system is one whose output y(t) is modelled by a first-order differential
equation.1 In the Laplace Domain, general first-order transfer functions are described
by Equation:
G p (s) =
K
1+sT
Equation : First-Order Process
Dead time (θ) is the time delay between the process and the sensor. The transfer
function for dead time is:
G p (s) = e-sL
Cause of dead time is:

Transportation lag

Sensor lag
Effect of Dead Time on the system is:
Time delay occurs in the control system when there is a delay between command
response and the start of output response. The delay cause a decrease phase margin
which implies a lower damping ratio and a more oscillatory response for the closeloop system. Further it decreases the gain margin thus moving the system to
instability [5].
Page | 29
„Pade‟ approximation is used for approximation of dead time function in FOPDT
transfer function.
FOPDT models are the combination of a first-order process model with dead time.
G p (s) = (
K
)e-sL
1+sT
Where,
K : process gain
T : process time constant
L : dead time constant
Frequency response of the dead time:
Fig 3.3
Example:
Thermal control system is a best example of FOPDT process. A heater takes time
delay to attain the temperature desired or the set-point.
How PID works for this process?
Only very control of temperature can be achieved by causing heater power to be
simply switched on and off according to an under or over temperature condition
respectively. Ultimately, the heater power will be regulated to achieve a desired
system temperature but refinement can be employed to enhance the control accuracy.
Such refinement is available in the form of proportional (P), integral (I), and
derivative (D) functions applied to the control loop. These functions, referred to as
Page | 30
control “terms” can be used in combination according to system requirements. The
desired temperature is usually referred to as the set-point (SP).
Proportional (P) – A form of anticipatory action which slows the temperature rise
when approaching set-point. Variations are more smoothly corrected but an offset will
occur (between set and achieved temperatures) as conditions very.
Average heater power over a period of time is regulated and applied power is
proportional to the error between sensor temperature and set-point (usually by time
proportioning relay switching). The region over which power is thus varied is called
the Proportional Band (PB) it is usually defined as a percentage of full scale.
.
Proportional + Integral + Derivative (PID) :Adding an integral term and derivative term to P control can provide automatic and
continuous elimination of any offset. Integral action operates in the steady state
condition by shifting the Proportional Band upscale or downscale until the system
temperature and set-point coincide.
It is clear from the above example that to achieve optimum temperature control use of
such PID technique is indispensible.
Thus next we will be studying two technique of optimal design of such PID controller
applied to similar First order plus delay time (FOPDT) process as mentioned above
and we will be analysing the performance of both the method. The controller so
designed would compensate for the instability induced by the delay time and endows
the system with robust safety margin in terms of gain and phase, as well greater
performance by reducing ISE.
Page | 31
Chapter 4 DESIGN OF PID CONTROLLER
4.1 METHOD – I : Tuning based on Gain and Phase margin
4.1.1 Introduction:It is based on the approach to minimise a performance index i.e. ISE, IAE, ITAE, in
order to get an optimum design of PID controller. The performance index considered
here is ISE error, which is given by
ISE = 0 e2(t) dt
Where, e(t) is error signal at time t.
Gain and Phase margin are used as Measure of
„Robustness‟
and also the
„Performance‟ of closed-loop system. So such design is based on specifying the gain
and phase margin wisely to give the best of performance and robustness [7].
The recommended range of Gain and Phase margin according to “Astrom and
Hagglund, 1995” is given by:
G.M. – 2-5
P.M. – 30o-70o
4.1.2 Methodology:Various denotations used are as follows:
Gp(s) = process transfer function.
Gc(s) = controller transfer function.
Am
= gain margin.
m
= phase margin.
Page | 32
The PI controller transfer function is given as:
G c (s) = K c (1+
1
).
sTi
(1)
First order plus death-time process model given by:
G p (s) = (
K
)e-sL
1+sT
(2)
From the basic definition of gain and phase margin following set of equations are obtained:
m= arg [Gc(jwg)Gp(jwg) ] + π
(3)
Am= 1/(| Gc(jwp)Gp(jwp)|)
(4)
Where wg and wp are given by
[Gc(jwg)Gp(jwg) ] = 1;
(5)
Arg [Gc(jwp)Gp(jwp)] = -π;
(6)
From eqn.(1) and (2), forward loop transfer function is given by
G c (s)G p (s) =
K c K p (1+ sTi )
sTi (1+sT)
e-sL
(7)
Solving eqn (7) into (3) to (6) gives:
π/2 + arc tan(wpTi) – arc tan(wpT) - wpL = 0
A m K c K p = w p Ti
K c K p = w g Ti
(8)
(w 2p T 2 +1)
( w 2p Ti 2 +1)
(9)
(w g2 T 2 +1)
( w g2 Ti 2 +1)
m= π/2 + arc tan(wgTi) – arc tan(wgT) – wgL
(10)
(11)
Page | 33
For a given process Kp , T, L , and specification of Am, m, eqn. (8) – (11) can be
solved for
the PI control parameter
Kc, Ti, and crossover frequency wg, wp ,
numerically but not analytically because of the presence of “arc tan” function.
However approximate analytical solution can be obtained if we make the following
approximation for the “arc tan” function.
Arc tan x  π/2 – π/4x (|x|>1)
(12)
The numerical solution of eqn. (8) – (11) shows that for
L/T > 0.3 , Ti  T
Thus eqn. (9) and (10) can be reduced to,
AmKcKp = wpT
(13)
KcKp = wgT
(14)
Using the approximation in eqn. (12) for the “arc tan” function, eqn. (8) and (11) can
be approximate as
π/2 - π/(4wpTi)+ π/(4wpT) - wpL = 0
(15)
m= π/2 – π/(4wgTi) + π/(4wgT) – wgL
(16)
Solving eqn. (15) for wp,
π/2- wpL = π/(4wpTi) - π/(4wpT)
π - 2wpL =(πT – πTi) / (2wpTiT)
4wp2TiTL - 2πwpTiT + πT – πTi
wp = (2πTiT + (4π2Ti2 T2 - 16π T2TiL + 16π TTi2L)) / (8 TiTL)
= (2πTiT + (4πTi T [πTi T - 4 TL + 4TiL])) / (8 TiTL)
= π/4L + ((πTi T [πTi T - 4 TL + 4TiL])) / (4 TiTL)
(17)
Page | 34
Putting the value of wp in eqn. (13)
Kc = wpT/(AmKp)
= [π/4L + ((πTi T [πTi T - 4 TL + 4TiL])) / (4 TiTL)]* T/(AmKp)
= [πTi T + (πTi T [πTi T - 4 TL + 4TiL])] / (4AmKpTiL)
(18)
Solving eqn. (16) for wg,
π/2 – wgL- m = π/(4wgTi) - π/(4wgT)
π – 2wgL- 2m = (πT – πTi) / (2wgTiT)
4wg2 TiTL + wg(4TiTm - 2 πTi T) + πT – πTi = 0
wg = [2 πTi T - 4TiTm + (B2 – 4AC)] / (8 TiTL)
(19)
where,
B2 – 4AC = (16Ti2T2m2 + 4π2Ti2 T2 - 16πTi2 T2m – 16π T2TiL + 16π TTi2L)
Putting the value of wp in eqn. (14)
KcKp = wgT
[πTi T + (πTi T [πTi T - 4 TL + 4TiL])] / (4AmTiL)
= [2 πTi T - 4TiTm + (B2 – 4AC)] / (8 TiL)
(20)
Eqn. (20) has Ti in terms of known process parameters like T, L, π and specified gain
and phase margin m, Am. So the value of Ti can be calculated by “numerical analysis
method”. The value of this Ti is then put into the eqn. (18) to get the corresponding
value of Kc with given specification.
Page | 35
4.1.3 Computation:The procedure followed to calculate the value of Kc and Ki corresponding to the
specified G.m. and P.m using the above method is given below. For simplicity we have taken a
example of a case were,
Am = 3;
m = 50;
4.1.4 Algorithm:Step 1: The first thing to do is to calculate the value of Ti by “numerical analysis method” for
the given process parameters and a given specification of gain and phase margin. In
Matlab file “pid.m” all the known values corresponding to the FOPDT system is
entered. The value of Ti is varied within a range of 0.1 to 5.0 and the value of it
corresponding to the minimum value on the R.H.S. is calculate. This value corresponds
to the Ti value for the given specification. The code to do this job is as follows:
MATLAB CODE :function value = pid(tao)
Am=3;
L=0.5;
theta=50;
phi=(pi/180)*theta;
display(phi);
i1=1;
for Ti= 0.1:0.001:5.0
value1(i1)= (2*pi*Ti*tao*Am)- (4*Ti*tao*phi*Am)- (2*pi*Ti*tao)+
(16*Ti*tao*Am^2*(Ti*tao*phi^2+pi^2*Ti*tao/4-Ti*tao*pi*phi-pi*taon
*L+pi*Ti*L))^0.5 - (4*pi*Ti*tao*(pi*Ti*tao-4*tao+4*Ti))^0.5;
i1=i1+1;
end
[value,I]=min(value1);
display(value);
display(I);
Ti_value=0.9+(0.001*(I-1));
display(Ti_value);
Step 2: Function “pid.m” is run and result of „tri_value‟ gives the value of minimum
Ti value corresponding to the given specification. The following operation is
performed on Matlab command window :
MATLAB Command Window:
>> pid(1)
Page | 36
phi =
0.8727
value =
0.0015
I=
688
Ti_value =
0.7870
ans =
0.0015
Step 3: The value of minimum Ti obtained in step – 2 is then put in M-file “pid4Kc.m” to get
the corresponding Kc value. The code is given below:
MATLAB CODE:Am=5.0;
L=0.5;
Kp=1.0;
tao=1.0;
Ti=0.97;
display(Ti);
Kc= (pi*Ti*tao +(pi*Ti*tao*(pi*Ti*tao4*tao*L+4*Ti*L))^0.5)/(4*Ti*L*Am*Kp);
display(Kc);
Step 4: The M-file “pid4Kc.m” is run and the value of Kc is obtained in MAtlab command
window.
OUTPUT:Ti =
0.7870
Page | 37
Kc =
1.0000
Step 5: The value obtained in step-4 gives the values of Kc(taken as Kp in the program) and Ti
respectively for the specified parameters. This value is put in the function “exp2” written in Mfile „exp2.m‟.To obtain the system transfer function i.e. Go(s)= Gc(s)*Gp(s).
MATLAB CODE:function tf = exp2(Kp,Ti)
syms s
Ki=Kp/Ti;
tf1=(s^4+13*s^3+60*s^2+48*s);
vpa(tf1,4);
tf=(s^3*Kp+s^2*(Ki-12*Kp)+s*(48*Kp-12*Ki)+48*Ki)/(tf1);
On running the above code on the Matlab command window we get the system forward
transfer function.
MATLAB Command Window:
>> exp2(1.000,0.7870)
ans =
(s^3-8444/787*s^2+25776/787*s+48000/787)/(s^4+13*s^3+60*s^2+48*s)
>> vpa(ans,4)
ans =
(s^3-10.73*s^2+32.75*s+60.99)/(s^4+13.*s^3+60.*s^2+48.*s)
Step 6: The system transfer function obtained in the step-5 is used to check for the actual G.M.
and P.M. using the Matlab function “sisotool(sys)”. The code is given below,
MATLAB Command Window:
>> num = [1.0 -10.73 32.75 60.99]
Page | 38
num =
1.0000 -10.7300 32.7500 60.9900
>> den=[1 13 60 48 0]
den =
1
13
60
48
0
>> sys=tf(num,den)
Transfer function:
s^3 - 10.73 s^2 + 32.75 s + 60.99
--------------------------------s^4 + 13 s^3 + 60 s^2 + 48 s
>> sisotool(sys)
OUTPUT:Open-Loop Bode Editor for Open Loop 1 (OL1)
Root Locus Editor for Open Loop 1 (OL1)
40
5
30
4
Magnitude (dB)
20
3
2
0
-10
-20
1
Imag Axis
10
-30
0
G.M.: 9.29 dB
Freq: 3 rad/sec
Stable loop
-40
270
-1
180
Phase (deg)
-2
-3
-4
-5
-15
90
0
-10
-5
0
Real Axis
5
10
P.M.: 50.9 deg
Freq: 1.13 rad/sec
-90
-2
10
10
-1
0
10
Frequency (rad/sec)
10
1
Step 7: Actual values of G.M and P.M. are tabulated using the symbol *(asterisk) as a
superscript. All the data obtained above are also tabulated.
Page | 39
10
2
Step 8: The value of „ISE‟ error for the given specification can be obtained using SIMULINK.
Using it a model is designed to display the values of :

ISE Error

IAE Error

Output of the PROCESS.
The above values are calculated with step input and step load disturbance .
4.1.5 Simulink Model:-
|u|
1
s
Absolute
Integrator 2
u
1.194
IAE Error
1
s
2
SQUARE
0.6699
Integrator 1
ISE Error
Disturbance
1
PID
Step
Subtract
PID Controller
s+1
Transport Transfer Function
Delay
OUTPUT
out
To Workspace
Fig 4.1
Page | 40
Output of the process with PI controller is given below:
OUTPUT Vs TIME (Am=3:Phi=50)
1.2
1
Process Output
0.8
0.6
0.4
0.2
0
-0.2
0
1
2
3
4
5
6
7
8
9
10
Time
Fig 4.2
Page | 41
4.1.6 Project Report:-
TABULATION – 4.1:
G.M.
(gain margin)
In db.

Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
30
1.3719
2.8252
0.5900
35
1.4221
2.1878
40
1.4890
45
P.M.
(phase margin)
In
degrees.
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
0.9446
27.5
5.17
0.6500
0.7107
30.7
5.40
1.5458
0.7632
0.6263
36.1
5.72
1.5710
1.5710
1.0000
0.6062
45.0
6.08
50
1.6110
1.0739
1.5001
0.6031
50.6
6.24
55
-
-
-
-
-
-
60
-
-
-
-
-
-
65
-
-
-
-
-
-
70
-
-
-
-
-
-
2.0
(6.02db)
Page | 42
TABULATION – 4.2 :
G.M.
(gain margin)
In db.

Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
30
0.9146
1.5502
0.59
35
0.9379
1.4887
40
0.9574
45
P.M.
(phase margin)
In
degrees.
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
0.7492
40.4
8.69
0.63
0.6930
42.6
8.85
1.4289
0.67
0.6838
44.9
8.99
0.9778
1.3580
0.72
0.6801
47.5
9.13
50
1.0080
1.2759
0.79
0.6699
51.0
9.30
55
1.0240
1.1636
0.88
0.6790
55.1
9.46
60
1.0470
1.0470
1.00
0.6742
60.0
9.61
65
1.0732
0.9018
1.19
0.6837
66.6
9.76
70
1.0994
0.7378
1.49
0.7193
74.9
9.90
3.0
(9.54db)
Page | 43
TABULATION – 4.3:
G.M.
(gain margin)
In db.

P.M.
(phase margin)
In
degrees.
Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
30
-
-
-
-
-
-
35
0.7034
1.1165
0.63
0.7718
50.5
11.3
40
0.7181
1.0568
0.67
0.7667
52.5
11.5
45
0.7333
1.0184
0.72
0.7666
55.1
11.6
50
0.7437
0.9735
0.76
0.7742
57.1
11.7
55
0.7549
0.9319
0.81
0.7763
59.5
11.8
60
0.7680
0.8727
0.88
0.7829
62.6
12.0
65
0.7788
0.8197
0.95
0.7921
65.5
12.0
70
0.7913
0.7536
1.05
0.8085
69.4
12.2
4.0
(12.04db)
Page | 44
TABULATION – 4.4:
G.M.
(gain margin)
In db.

P.M.
(phase margin)
In
degrees.
Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
30
-
-
-
-
-
-
35
0.5627
0.8931
0.63
0.8734
55.7
13.3
40
0.5744
0.8573
0.67
0.8752
57.4
13.8
45
0.5844
0.8230
0.71
0.8791
59.8
13.5
50
0.5950
0.7828
0.76
0.8863
62.2
13.7
55
0.6039
0.7455
0.81
0.8955
64.4
13.8
60
0.6116
0.7111
0.86
0.9062
66.6
13.9
65
0.6183
0.6794
0.91
0.9183
68.6
13.9
70
0.6252
0.6445
0.97
0.9341
70.9
14.0
5.0
(13.97db)
Page | 45
4.1.7 Graphs and plots
Am=2: Phi = 45
Am=2: Phi = 50
Am=3: Phi = 45
Am=3: Phi = 60
Page | 46
Am=4: Phi = 50
Am=4: Phi = 60
Am=5: Phi = 50
Am=5: Phi = 60
Fig 4.3
Page | 47
4.2 METHOD – II :- Gain-Phase margin tester method
4.2.1 Introduction :Gain margin and Phase margin plays an important role concerning the robustness of a
system. This method is being applied to a non-minimum phase plant containing an uncertain
delay time with specifications in terms of gain and phase. The gain-phase margin tester
method is adopted to test the stability boundary in the parameter plane (2-D) for any given
gain or phase margin specification. These margins serve as restriction to scheduling the
controller. Such method guarantees both relative and absolute stability margin. Such
parameter area in 2-D is used to achieve compromise between good tracking performance and
system robustness with respect to external disturbance [14].
4.2.2 Advantage:
System performance resulting from such tuning can be realized completely.

Especially when delay time is uncertain, this method works effectively well [14].

It avoids extensive or unnecessary on-line tuning and results in easier implementation.

It can be applied to both stable and unstable systems of higher order.
4.2.3 Methodology:For a first order plus delay time non-minimum system, its transfer function is shown as
follows:-
G p (s) = (
K
)e-sL
1+sT
(1)
Where, K = a constant.
T = „tao‟- time constant.
L = delay time constant.
Notations:
Gp(s) = process transfer function.
Gc(s) = controller transfer function.
D(s) = external disturbance transfer function.
An Error- actuated PID controller has the transfer function:
Page | 48
G c (s) = K p +
Ki
+ K ds
s
.
(2)
So, the forward open-loop transfer function is-
Go(s) = Gc(s)*Gp(s) = N(s)/D(s).
(3)
By putting s = jw in equation (3), we get,
Go (s) = | Go (jw) | e j
(4)
Now putting eqn. (4) in eqn. (3) we get ,
D(jw) -
N(jw)
| G o (jw) | e j
(5)
Let,
A = 1/| Go(jw) |
(6)
 =  + 180
(7)
When,  = 0; A gives the value of the gain margin.
and when, A = 0;  gives the value of phase margin.
We can now define the gain-phase margin tester function as :
F(jw) = D(jw) + A e-j * N(jw)
(8)
Eqn. (8) implies that the function F(jw) should always be equal to zero. This indicates that
the G.M. and the P.M. can be calculated from the characteristic equation.
Now by adding a so-called gain-phase margin tester A exp(-j) into the system as shown in
the above fig.1., the characteristic equation is,
1 + A e-j * (Kp +
Ki
K -sL
+ K ds) * (
e )=0
s
1+sT
(9)
Page | 49
Now putting ,A exp(-j) = A cos - jA sin, K = 1 , T = 1,eqn. (8) and (9) give rise to –
F(jw) = Xa(jw) + A(cos(+wL) – j sin(+wL))*[KpXb(jw) + KiXc(jw) + KdXd(jw)] (10)
Where,
Xa(jw) = -w2+jw ;
(11)
Xb(jw) = jw ;
(12)
Xc(jw) = 1 ;
(13)
Xd(jw) = -w2 ;
(14)
Taking eqn. (10) into consideration we obtain two more eqn. by separating all real and
imaginary part of F(jw) and by putting 1 = (+wL) , Kd = 0, we get,
Fr(jw) = KpB1 + KiC1 + D1
= Re(Xa) + A cos1(KpRe(Xb) + KiRe(Xc) + KdRe(Xd))
+ A sin1(KpIm(Xb) + KiIm(Xc) + KdIm(Xd)) = 0 ;
(15)
Fr(jw) = KpB2 + KiC2 + D2
= Im(Xa) + A cos1(KpIm(Xb) + KiIm(Xc) + KdIm(Xd))
- A sin1(KpRe(Xb) + KiRe(Xc) + KdRe(Xd)) = 0 ;
(16)
Where,
B1 = A cos1Re(Xb) + A sin1Im(Xb)
(17)
= wA sin1
C1 = A cos1Re(Xc) + A sin1Im(Xc)
(18)
= A cos1
D1 = Re(Xa) + A cos1KdRe(Xd)+ A sin1KdIm(Xd)
(19)
= -w2 – w2 Kd A cos1
`
B2 = A cosIm(Xb) - A sin1Re(Xb)
(20)
= w A cos1
C2 = A cos1Im(Xc) - A sin1KiRe(Xc)
(21)
Page | 50
= - A sin1
D2 = Im(Xa) + A cos1KdIm(Xd) - A sin1KdRe(Xd)
(22)
=w
Solving eqn. (15) and (16) we get the value of Kp and Ki as,
Kp = (C1D2 – C2D1) / (B1C2 – B2C1)
(23)
Ki = (D1B2 – D2B1) / (B1C2 – B2C1)
(24)
Parameter Pane analysis:-
By varying one of the parameters, A,, and w, and fixing the others , it suffices to plot
the constant gain margin boundary ( A = constant ,  = 0, w is varied over a range) and the
constant phase margin boundary ( A = 0 ,  = constant, w is varied over a range) in the
parameter plane. The above locus representing the stability boundary of the system is plotted in
the Kp-Ki plane. Region left of the stability boundary, facing the direction in which „w‟
increases, is the “stable parameter area”. The region characterizes all feasible control parameter
sets which guarantees the controlled system “robust margin” i.e. G.M. and P.M. of the system
[14].
4.2.4 Computation:-
The procedure followed to calculate the value of Kp and Ki corresponding to the
specified G.m. and P.m using the Kp-Ki plot is given below. For simplicity we have taken a
example of a case were,
A = 3;
 = 50;
4.2.5 Algorithm:Step 1: In the MATLAB, M-file ‘ j1_final2.m‟, all the known values corresponding to the
given FOPDT system is entered. Code for the case considered is :
MATLAB CODE:% PART -------------------> 1
% PM varying with a Constant GM Kp Vs Ki
Page | 51
% for theta 50
A=1.0;
theta=50.0;
T=0.5;
Kd=0.0;
format short;
phi=(pi/180)*theta;
i1=1;
for w=0.7:0.01:10.8
B1=A*sin(phi+w*T)*w;
C1=A*cos(phi+w*T);
D1=-(w^2)-A*cos(phi+w*T)*Kd*w^2;
B2=A*cos(phi+w*T)*w;
C2=-A*sin(phi+w*T);
D2=w;
Ki(i1)=(D1*B2-D2*B1)/(B1*C2-B2*C1);
Kp(i1)=(C1*D2-C2*D1)/(B1*C2-B2*C1);
i1=i1+1;
end;
plot(Kp,Ki,'b')
xlabel('Kp'); ylabel('Ki');
hold on
% % % PART ----------------------------------------->2
% % % GM varying with constant PM Kp Vs Ki
% %A=3.0;
A=3.0;
theta=0.0;
T=0.5;
Kd=0.0;
format short;
phi=(pi/180)*theta;
i1=1;
for w=0.7:0.01:10.8
B1=A*sin(phi+w*T)*w;
C1=A*cos(phi+w*T);
D1=-(w^2)-A*cos(phi+w*T)*Kd*w^2;
B2=A*cos(phi+w*T)*w;
C2=-A*sin(phi+w*T);
D2=w;
Ki(i1)=(D1*B2-D2*B1)/(B1*C2-B2*C1);
Kp(i1)=(C1*D2-C2*D1)/(B1*C2-B2*C1);
i1=i1+1;
end;
plot(Kp,Ki,'b:')
xlabel('Kp'); ylabel('Ki');
hold on
hold off
% PART ------------------------------------------>DISPLAY PART
xlabel('Kp'); ylabel('Ki');
title(' PLOT of Kp Vs Ki w- 0 to 10.8')
Page | 52
Step 2: The M-file ‘ j1_final2.m‟ is run in the editor window. A plot is obtained between
Kp Vs Ki for a specified range of „w‟. The plot is checked for the point of
intersection.
PLOT of Kp Vs Ki Am=3 and Phi = 50
3
data1
data2
2.5
Ki
2
1.5
1
0.5
0
0
0.5
1
1.5
2
Kp
2.5
3
3.5
4
Fig 4.4
Step 3: The point of intersection of the locus in the plot of Kp Vs Ki is located using a
command “ginput(1)” in the MATLAB command window. The window below shows the
same:
MATLAB Command Window:
>> ginput(1)
ans =
0.9405
1.2666
Page | 53
Step 4: The value obtained in step-3 gives the values of Kp and Ki respectively for the
specified parameters. This value is put in the function “exp2” written in M-file „exp2.m‟.
To obtain the system transfer function i.e. Go(s)= Gc(s)*Gp(s).
MATLAB Code:-
function tf = exp2(Kp,Ki)
syms s
tf1=(s^4+13*s^3+60*s^2+48*s);
vpa(tf1,4);
tf=(s^3*Kp+s^2*(Ki-12*Kp)+s*(48*Kp-12*Ki)+48*Ki)/(tf1);
OUTPUT:>> exp2( 0.9405,1.2666)
ans =
(1881/2000*s^3-50097/5000*s^2+37431/1250*s+37998/625)/(s^4+13*s^3+60*s^2+48*s)
>> vpa(ans,4)
ans =
(.9405*s^3-10.02*s^2+29.94*s+60.80)/(s^4+13.*s^3+60.*s^2+48.*s)
Step 5: The system transfer function obtained in the step-4 is used to check for the actual G.M.
and P.M. using the Matlab function “sisotool(sys)”. The code is given below,
MATLAB Code:
>> num=[0.9405 -10.02 29.94 60.80]
num =
0.9405 -10.0200 29.9400 60.8000
>> den=[1 13 60 48 0]
den =
1
13
60
48
0
Page | 54
>> sys=tf(num,den)
Transfer function:
0.9405 s^3 - 10.02 s^2 + 29.94 s + 60.8
--------------------------------------s^4 + 13 s^3 + 60 s^2 + 48 s
>> sisotool(sys)
OUTPUT:Open-Loop Bode Editor for Open Loop 1 (OL1)
Root Locus Editor for Open Loop 1 (OL1)
40
5
30
4
Magnitude (dB)
20
3
2
0
-10
-20
1
Imag Axis
10
-30
0
G.M.: 9.6 dB
Freq: 2.96 rad/sec
Stable loop
-40
270
-1
225
180
Phase (deg)
-2
-3
-4
135
90
45
0
-45
-5
-15
-10
-5
0
5
10
Real Axis
P.M.: 50 deg
Freq: 1.1 rad/sec
-90
-2
10
10
-1
0
10
Frequency (rad/sec)
10
1
10
2
Step 6: Actual values of G.M and P.M. are tabulated using the symbol *(asterisk) as a
superscript. All the data obtained above are also tabulated.
Step 7: The value of „ISE‟ error for the given specification can be obtained using SIMULINK.
Using it a model is designed to display the values of :

ISE Error

IAE Error

Output of the PROCESS.
The above values are calculated with step input and step load disturbance .
Page | 55
4.2.6 Simulink Model:|u|
1
s
Absolute
Integrator 2
u
1.255
IAE Error
1
s
2
SQUARE
0.683
Integrator 1
ISE Error
Disturbance
1
s+1
Transport Transfer Function
Delay
PID
Step
PID Controller
Subtract
OUTPUT
out
To Workspace
Fig 4.5
OUTPUT:OUTPUT Vs TIME (Am=3:Phi=50)
1.4
1.2
Process Output
1
0.8
0.6
0.4
0.2
0
0
1
2
3
4
5
Time
6
7
8
9
10
Page | 56
4.2.7 Project Report:-
TABULATION – 4.5:
G.M.
(gain margin)
In db.

P.M.
(phase margin)
In degrees.
Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
30
1.1811
2.1327
0.553
0.7483
29.6
6.05
35
1.3597
1.9716
0.689
0.6604
35.0
6.08
40
1.4790
1.7800
0.830
0.6329
40.0
6.08
45
1.5720
1.5762
0.997
0.6072
44.9
6.07
50
1.6512
1.3569
1.216
0.5906
49.8
6.05
55
1.7070
1.1376
1.500
0.5868
54.8
6.08
60
1.7602
0.9046
1.945
0.6199
59.8
6.09
65
1.8085
0.6447
2.800
0.6738
65.0
6.10
70
1.8540
0.3647
5.080
0.8241
70.0
6.11
2.0
(6.02db)
Page | 57
TABULATION – 4.6-

G.M.
(gain margin)
In db.

P.M.
(phase margin)
In degrees.
30
Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
-
-
-
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
-
-
-
35
0.4875
1.3746
0.3546
0.5906
35.0
9.57
40
0.7418
1.4391
0.5150
0.7721
40.0
9.58
45
0.8600
1.3669
0.6290
0.7369
45.0
9.59
50
0.9404
1.2666
0.7424
0.6830
50.0
9.62
55
1.004
1.1574
0.8670
0.6874
55.1
9.58
60
1.0472
1.0472
1.0000
0.6714
60.0
9.61
65
1.0848
0.9398
1.1543
0.6745
65.0
9.61
70
1.1157
0.8363
1.3340
0.6876
70.0
9.61
3.0
(9.54db)
Page | 58
TABULATION – 4.7:
G.M.
(gain margin)
In db.

P.M.
(phase margin)
In
degrees.
Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
30
-
-
-
-
-
-
35
-
-
-
-
-
-
40
-
-
-
-
-
-
45
0.4816
1.0836
0.4440
0.9034
45.0
12.1
50
0.6061
1.0563
0.5730
0.8184
50.0
12.1
55
0.6789
0.9871
0.6870
0.8000
55.0
12.1
60
0.7303
0.9075
0.8047
0.7907
60.0
12.1
65
0.7678
0.8223
0.9337
0.7957
65.0
12.1
70
0.7998
0.7458
1.0720
0.8074
70.0
12.1
4.0
(12.04db)
Page | 59
TABULATION – 4.8:
G.M.
(gain margin)
In db.

P.M.
(phase margin)
In
degrees.
Kc
Ki
Ti
(Proportional
Constant )
( integral
constant )
(Ti = Kp / Ki)
30
-
-
-
ISE
Integral square error
*
(actual P.M)
*
(actual G.M)
In degrees.
In db.
-
-
-
35
-
-
-
-
-
-
40
-
-
-
-
-
-
45
-
-
-
-
-
-
50
0.3579
0.8599
0.4160
1.0180
50.0
14.0
55
0.4792
0.8486
0.5640
0.9334
55.0
14.0
60
0.5421
0.7912
0.6850
0.59124
60.0
14.0
5.0
(13.97db)
65
-
-
-
-
-
-
70
-
-
-
-
-
-
Page | 60
4.2.8 Graphs and Plots:NOTE: Here, Data 1 – Phase margin; Data 2 – Gain margin
PLOT:-
Corresponding Outputs:
PLOT:-
Corresponding Output:
Page | 61
PLOT:-
Corresponding Output:-
PLOT:-
Corresponding Output:-
Fig 4.7
Page | 62
RESULT OF THE ANALYSIS AND COMPARISION
Reliability:Method -2 is more reliable than Method – 1. The result obtained in the Method – 2 is
almost near to accurate with minimal error. Method – 1 doesn‟t show desired result
for low values of Phase margin.
Computational Simplicity:We can easily tune PID controller using Method – 1 given the Ti range is correctly
chosen. Though there is some ambiguity in the results for some particular values of
gain and phase margin. Citing one of such examples is the parameters value when
gain margin is equal to 2 and phase margin is equal to 60. The tuning procedure may
get cumbersome if the Ti is not correctly chosen.
Whereas method -1 though quite lengthy is easy to compile and the results obtained is
almost satisfactory. The fact that data is being taken from a plot make it more valid.
Performance:The performance of both the method could be compared on the basis of ISE
performance index value. The lower the values, better is the performance of the
particular method.
From the tabulation it is quite clear that Method-2 gives lower values of ISE
performance index values for most of the cases. This stands as a prove to the fact that
Method -2 performs better than the Method-1.
Scope of Application:Method-2 has a wide range of scope of application. Two factors given below support
the fact that this method is more flexible then the latter one.
Page | 63

It‟s applicable to both lower order as well as higher orders of process transfer
function.

It gives more robust design parameter for a non-minimum phase system with
uncertain delay time.
Method-1 has got some limitation. They are:
 They are applicable to process having L/T value within a particular range i.e.
0.1 - 1.0.
 They are specified for only FOPDT process system and doesn‟t hold good for
higher order of process system
Validity of the Procedure:Both the method described above is based on well-grounded established theory.
Method-1 is based on gain and phase margin specification as formulated by Astrom
and Hagglund in 1995. But as the process is based on numerical analysis, it is not
accurate. The fact that we are searching for the value of Ti that gives the minimum
value on the L.H.S., we may not determine the exact value Ti desired.
Method-2 is based on the work of Shenton and Shafiei (1994) on graphical technique
for calculating PID control parameters. The procedure is based on graphical approach,
thus its validity can‟t be questioned. This very fact helps to determine the exact value
of PID controller parameter i.e. value of Kp and Ki.
Page | 64
CONCLUSION AND FUTURE SCOPE
(Process Control Simulator)PCS327 may be used at high speed for oscilloscope
observation or at a low speed for meter or chart recorder observation, speed selection
being achieved by independent controls on the process and the Controller [6]. When
the controller is set for low speed use it is suitable for the application of three-term
control to the Feedback process trainer PT326.The equipment is fully compatible with
all Feedback signal sources and all results may be observed on any laboratory
oscilloscope with direct coupled horizontal and vertical amplifiers. Some additional
features of the equipment are :
Simulated Distance-velocity lag(transport lag)

Self-contained power supplies

Integrated-circuit reliability

Student-proof design
The fact that since last four decades there has been innumerable paper published on
PID control design speak for itself the importance and demand of such controller in
present day modern industry scenario. Despite of a huge number of theoretical and
application papers on tuning techniques of PID controllers, this area still remains open
for further research. There is a great scope of research into this field of control
system. But what lacks is the comparative analysis between different tuning
techniques. This study would thus surely come handy to such need of comparative
analysis and also help in understanding the changing trends in the field of PID
controller design. Few of the recent trends in the field of PID control design are
optimal design through graphical approach and minimisation of error due to
approximation in numerical analysis technique.
Page | 65
BIBLIOGRAPHY
[1] Shenton, A.T., & Shafiei, Z., Relative stability for control system with adjustable
parameters, J. of guidance, Control and Dynamics 17(1994) 304-310.
[2] Xue Dingyu, Chen Yang Quan and Atherton P. Derek ,"Linear Feedback Control".
[3] Ogata Katsuhiko, Modern control Engineering, fourth edition, 2002.
[4] Kuo C. Benjamin, Automatic Control System, seventh edition, October 2000.
[5] Wikipedia.org
[6] Process Control Simultor PCS 327 Manual,Feedback Instruments.
[7] Ho, W. K., Hang C. C. & Cao L. S., Tuning of PID controllers based on gain and
phase margin specifications. Automatica, 31(3)(1995),497-502.
[8] Astrom, K. J., & Hagglund, T. Automatic tuning of simple regulators with specifications on
phase and amplitude margins. Automatica, 20(1984), 645-651
[9] Ziegler, J. G., & Nichols, N. B. Optimum settings for automatic controllers.
Transactions of the ASME, 64(1942), 759-768.
[10] Ho, W. K., Hang, C. C., Zhou, J. H., Self-tuning PID control of a plant with
under-damped response with specifications on gain and phase margins. IEEE
Transactions on Control Systems Technology, 5 (4) (1997), 446-452.
[11] Ho, W.K., Xu, W., PID tuning for unstable processes based on gain and phase-margin
specifications, IEE Proc. – Control Theory and Appl. 145 (5) (1998) 392-396.
Page | 66
[12] ] Ho, W. K., Lim, K. W., & Xu, W., Optimal gain and phase margin tuning for
PID controllers. Automatica, 34(8) (1998), 1009-1014.
[13] Ho, W.K., Lim K.W. , Hang C.C. , Ni L.Y. , getting more phase margin and performance
out of PID controllers. Automatica, 35 (1999), 1579-1585.
[14] Huang J. Ying, Wang Yuan-Jay, Robust PID Controller Design for Non-minimum phase
time delay systems, ISA Transaction 40 (2001) 31-39.
[15] Kealy Tony and O‟Dwyer Aidan, Analytical ISE Calculation and Optimum Control
System Design, Proceedings of the Irish Signals and Systems Conference, University of
Limerick, July 2003, pp. 418-423.
[16] Wen Tan, Jizhen Liu, Tongwen Chen, Horacio J.Marquez , Comparison of some wellknown PID tuning formulas, Computers and Chemical Engineering 30 (2006) 1416–1423.
[17] Araki M., Control Systems, Robotics, and Automation – Vol. II - PID Control -, Kyoto
University, Japan.
Page | 67
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement