Pidpso2016 PDF
Pidpso2016 PDF
ABSTRACT
system is exceptionally paramount since correct tuning would help a control process
response without steady state error and overshoot. As the conventional gain tuning of PID
therefore current heuristics approach namely Particle Swarm Optimization (PSO) is utilized.
A tuning problem of a single tank water level dynamic control system is presented. The best
PID controller parameters are determined by using the ZN and PSO approaches.
Comparisons of process time performance and the performance measurement of the system
are made in order to evaluate both approaches in terms of their step response through the
MATLAB/Simulink platform. The results demonstrate that the PSO approach produces
promising results with lower overshoot compared to the ZN approach. It is found that the
PSO approach would be advantageous for the industries related with single tank water
water level.
1
INTRODUCTION
processes. Examples of this type of processes are in power plants, food and
Reddy, 2015). The PID controller comprises three-term controls: the proportional
(P), the integral (I) and the derivative (D) values. Each PID value can be interpreted
pressure, flow rate, chemical composition, speed and other applications for which
The main issue in PID process control is related with tuning. Tuning a control loop is
related with the adjustment of the three control parameters (proportional band,
integral, derivative) to the ideal qualities for the sought control response. In an
automated industry and plant, water control system is very important especially in
desired level. Without water level control, the output of the water level will varies
Most of the valves of water tanks are built with the electrical components which
tuning is required in this process, to ensure that the water height of the tank gives a
2
desired value by adjusting the gain of the process control of PID element. The
measures of process performances in a process control are the steady state error,
stability and overshoot. Adjusting the gain of PID in a process is very important
ensure that the process control is in control and stable without the steady state error
and stability.
Among the conventional PID tuning approaches, the Ziegler- Nichols (ZN) approach
is the most well-known one (Ogata, 1987). Studies found that the ZN approach is the
most favored by process control practitioners (Pillay & Govender, 2007). Pillay and
Govender (2007) believed that most of the practitioners were reluctant to apply other
approaches in the system because they had to learn new things which were
it does not provide good tuning and most of the time it has tendency to create an
enormous overshoot (Solihin, Tack, & Kean, 2011). Recently, the novel Particle
Eberhart, 1995), has opened a new path of optimal findings in process control. It is
3
This paper attempts to extend our previous research (Edaris & Abdul-Rahman, 2014)
by developing a PID tuning utilizing PSO approach to obtain stability of the tuning
process for a single tank water system. In addition, the PSO approach is compared
with the ZN approach to check the validity of the results and the dynamic of process
performances for both approaches. The results of this study show the process
water level control system. Simulation results considerably clarify the effectiveness
of the proposed approach PSO-PID approach and its flexibility towards improving
the dynamic behavior and stability of single tank water level control.
A description on the plant dynamic model of a single tank water system is presented
in the second section. The third section discusses the tuning process of ZN approach
results in the following section for both approaches. Finally, the conclusion is
LITERATURE REVIEW
traditional heuristics techniques that have been proposed for tuning the PID are by
Ziegler and Nichols, (1942); and Cohen and Coon, (1953). These techniques are still
having a placed due to its simplicity when compared with other modern tuning
techniques.
Other tuning techniques proposed in the literature are fuzzy logic, performance
index based technique, genetic algorithm and particle swarm optimization. A fuzzy
4
logic control provides a formal method of translating subjective and imprecise
and Singh, 2010). A study by Rahmat and Ghazaly, (2006) investigated the time
logic controller in the position control system of a DC motor. The result shows that
the PID controller performs better compared with fuzzy logic in terms of percentage
overshoot. Tunyasrirut, and Wangnipparnto (2007) carried out a study on the Fuzzy–
PID cascade controller in controlling the water level of horizontal tank. The results
of this study showed that the speed of responses of the level control system with and
without load interrupt in the tank are fast with the fuzzy logic controller and the PID
system can be designed and the PID parameters in the system could be adjusted to
meet the requirement specification. Solihin et al. (2011) applied these performance
indexes as the objective function in their study. The performance indexes were
Awouda and Mamat (2010) found an efficient tuning method of the PID controller
by using the optimization rule of ITAE performance criteria. The method implies an
analytical calculation of the gain of the controller for PID controlled systems. The
study shows that the ITAE tuning setting from the authors gives a small rise time.
5
The genetic algorithm (GA) uses a direct analogy of such natural evolution to do
represented by a set of parameters (Kim et al., 2008). Korkmaz, Aydogdu and Dogan
(2012) compared the performance of nonlinear PID and GA based PID. The result
shows the effectiveness of the approaches for tuning the PID controller. In a
bath system, Saini and Rani (2012) found that the use of advanced techniques such
as Artificial Neural Networks (ANN) and GA with the conventional Fuzzy Logic
Current studies on tuning PID controller focuses on the new approach of particle
swarm optimization. For example, Tandan and Swarnkar (2015) introduced modified
particle swarm optimization (MPSO) which is a simple and fast approach for
over the PSO based optimized PID controller parameters. In a study by Asifa and
Vaishnav (2010), PSO was proposed to improve the step response of a third order
system. Comparison with other conventional approaches shows that the PSO based
PID controller produced superior results especially on the stability convergence and
computational efficiency. The advantages of PSO approach has attract our attention
to apply this approach for solving a single water control system in this study.
The water level control system (SE-403) in the control laboratory of Sultan Abdul
6
equipment specifically built for engineering education. The water level control
system illustrates the dynamics of water from the sump tank to a process control
tank. The dynamic feature of water tank system is due to its flow of the water in and
out through time. The water level in a process tank can be monitored automatically
from the PID controller. The filling process of the water is carried out until it reaches
the set point value or the desired value of level control specified by the user.
The schematic drawing in Figure 1 represents the model. This system consists of two
tanks, the sump tank, TN 1 and the process tank, TN 2 with the controller valve or
the final elements and level sensors, LS at the bottom of the sump tank, a differential
pressure transmitter of diaphragm seal type, a pump and number of hand valves, HV.
The sump tank, TN 1 at the bottom in the system design has a diameter of 40.5 cm
and the process tank, TN 2 has a diameter of 150 mm. The pump provides in feed
from the sump tank, TN 1 to the outflow of process tank, TN 2. Water from the
sump tank, TN 1 which acts as the water reservoir, will flow into the process tank,
TN 2. Liquid is withdrawn from the base through an outflow orifice (outlet). The
outlet pressure is atmospheric pressure. The water level in the process tank is
measured utilizing a pressure sensitive sensor located at the base of the tank.
Furthermore, a vertical scale in centimeters is also placed beside each tank for visual
feedback concerning the water level in each tank also known as Level Gauge, LG to
7
Control Valve Process Tank
TN 2
HV: Hand valve
HV Sump
Tank TN 1
Rotational
Pump
Based on the environment case study, the dynamic equations for the liquid level are
derived as follows. For the process tank or TN 2 and the sump tank or TN 1 in Figure
dLi
= 1/Ai [Fin(t)-Fout(t)] cm/sec i=1,2 (1)
dt
where, Li(t) are the liquid levels, A is the tank cross sectional area, Fin is the inflow
rate for the process tank, Fout is the outflow rate for the process and sump tank and i
is the number of tanks in the water level system . The inflow rate of the water into
where, Kp is the pump constant (cm3/volt-sec) and Vp is the voltage applied to the
pump. Then, the velocity outflow for process tank is derived for flow through the
8
Vout (t ) 2 gL cm/sec (3)
where, Vout is the velocity outflow for the process tank, g is the gravitational force
acceleration and L is the liquid level for the process tank. Thus, the outflow rate for
where, a2 is the cross sectional area of the outflow orifice at the bottom of process
tank.
From Equation 1 to Equation 4, the dynamic equations for the water level in the
dL a Kp
2 2 gL(t ) V p (t ) (5)
dt A2 A2
where A2 is the tank cross sectional area. Next, the steady state pump voltage, VPSS
that produces the desired steady state constant level in the tank is constructed.
dL
Specifically, setting 0 in Equation 5, yields
dt
a 2 gLSS
VPSS (6)
Kp
tank and a1 is the cross sectional area of the outflow orifice at the bottom of sump
tank. Equations 6 and 7 can be used to regulate the water level in the process tank.
By designing a set of variable l2(t) as an output and u(t) as an input in water level
system,
l 2 (t ) L2 (t ) Lss (8)
dV p
u (t ) V pss
dt (9)
where L2(t) is water level that changes dynamically with time in process tank, Lss is
dV p
water level in steady state, is voltage applied to the pump that changes
dt
dynamically with time and VPSS is voltage in steady state. The dynamic Equation 5
dL
2 2 g l 2 (t ) Lss
a Kp
u(t ) V pss (10)
dt A2 A2
dL
l (t ) u (t ) (11)
dt
where,
a2 g Kp
, (12)
A2 2 Lss A2
Finally, a transfer function model was developed for the system by taking the
l 2 ( s)
G( s) (13)
u ( s) s
10
The numerical values of the parameters for the process control system are presented
in Table 1. The values and units from Table 1 were collected based on the actual data
from the environment case study of water level control system (SE-403). The
methods used in data collection were done through the registration system and the
experimental study.
The sump tank and process tank diameters, sump tank and process tank orifice
diameters and the pump constant are collected through a registration system from the
manual or the handbook of the environment case study. The experimental study of
the environment case was carried out to obtain the specific information regarding the
interviews with individuals in the laboratory such as the laboratory technicians and
the person in charge of the control laboratory were carried out. The interviewees
explained the mechanics and the workings of the environment case in-depth and
11
The block diagram shown in Figure 2 is simplified with the closed loop system of a
PID controller in the direct path with the transfer function of the plant or
environment case G(s) in which R(s) represents the desired input signal, F(s) is the
feedback signal, E(s) is the error signal of E(s)=R(s)-F(s), I(s) is the input signal for
the transfer function of plant G(s), Y(s) is the output signal for the whole control
system and Gc(s) is the transfer function of the PID controller. The transfer function
is defined as the ratio of Laplace transform of the output to the Laplace transform of
E(s) Output
Setpoint PID u(s) PLANT
F(s) Gc(s) G(s)
R(s) l2(s)
Kp
A2
G(s)
a2 g (14)
s ( )
A2 2 Lss
( D2 ) 2
A2 =176.738cm2, while a2 is the cross sectional area of the outflow orifice
4
(d 2 ) 2
at the bottom of process tank, TN 2 which is a 2 2.836cm 2 . Hence
4
12
substituting the values from Table 1 into Equation 14, the single water level tank
0.035
G(s)
s 0.355 (15)
The objective function used in this study is to minimize the performance index of
ISE e 2 (t )dt
0 (16)
By applying ISE as the objective function in this study, it has the capability to seek
for a set of PID parameters such that the feedback control system with least settling
METHODOLOGY
The gains of PID affect the process control system. For example, a proportional
control (Kp) can have the effect of reducing the rise time but never eliminate the
steady state error, an integral control (Ki) can have the effect of eliminating the
steady state error, but it may take the transient response to worsen and a derivative
control (Kd) can have the effect of increasing the stability of the system, reducing the
overshoot and able to improve the transient response. Thus, tuning the correct PID
The flowchart of PID tuning for ZN Close Loop Control is presented in Figure 3. To
do so, PID controller was tuned by setting the P only mode and the gain is adjusted
13
in order to keep the control system in continuous oscillation. Then the controlled
variable of the period oscillation and the amplitude of the step response are measured
START
Stability checking
Determine Ku and Pu
END
In this approach, applying proportional control and increasing the controller gain are
essential until the process output reaches a sustained oscillation. The PID parameters
14
are computed using the calculation given in Table 2, where Tu denotes as the period
Controller Kp Ti Td
P 0.5Ku
PI 0.4Ku 0.8Tu
PID 0.6Ku 0.5Tu 0.125Tu
Shamsuddin & Qasem, 2015) and ant colony algorithm (Alobaedy & Ku-Mahamud,
simplified social models, such as bird, fish and the swarming theory (Pan et al.,
2006) and utilizes population based stochastic optimization approach. PSO involves
set of particles that fly around in a multidimensional search space by adjusting their
directions and positions in searching for a better solution. A particle and that of its
neighbors with best position toward an optimal solution are known as pbest while
gbest is a global best of all particles. The current velocity and the distance from
Pbesti, to gbest are employed to calculate the modified velocity and position of each
15
xi(,tm1) xi(,tm) vi(,tm1) ; i 1,2,...n; m 1,2,..., d (17)
where ;
d: Dimension
Figure 4 shows the flowchart of PID-PSO approach in water level control system of
the environment case study. At first, initial swarm of particles in search space are
parameters. The values were set in the range of 0 to 50. This study involves three
dimensional problems, where the set of parameters Kp, Ki and Kd are represented by
matrices with a dimension of 3x swarm size. The swarm size is 50 and the number of
iteration for this study is also set to 50. The following parameters of PSO were
The parameters of w, c1 and c2 are weight parameters and are determined based on
PSO and Ziegler and Nichols tuning is implemented offline. MATLAB® system
identification toolbox was used to develop plant model for water level control
16
system, while tuning was implemented under simulated conditions within the
START
Random initialization of
individuals ofSTAR
population
T
including searching points,
velocities, pbest and gbest.
Stopping
condition
Return gbest
END
The performance of the proposed approaches in this study was measured in terms of
17
as the rise time, settling time, overshoot and steady state error. Results of this study
are presented in two forms, as table and plots for the figures. The table contains the
performance measurements of the system for the PID controller. The figure plots
amplitude of height for the water level into the x-axis and time in seconds into the y-
axis and the plot represents the process time performance for the system.
connecting a feedback loop with proportional control. The gain of the controller is
increased until the system reaches the stability boundary; the gain of the controller,
shown in Figure 5.
From Figure 5, the amplitude for the oscillations was the value of the Ultimate Gain,
Gm of 1.94. The Ultimate Period from the simulated results in Figure 5 can be
calculated by finding the differences between one peak and another peak from the
four peaks obtained. The three peak to peak time differences were then averaged and
this resulted in the value of 1.24 seconds for the Ultimate Period, wcg. The
parameters of Ultimate gain, Gm (1.94) and Ultimate Period, wcg (1.24) obtained
from the simulated oscillation in Figure 5 are able to contribute the findings of the
gain of the controller, Ku and period of the oscillation, Pu. It can be done by applying
Ku=10Gm/20 (18)
Pu=2/cg (19)
18
Substituting the values of Ultimate gain, Gm (1.94) and Ultimate Period, wcg (1.24)
Applying the values of Ku and Pu in Table 3 into the calculation of ZN Closed Loop
tuning (as presented in Table 2) gives the value of Kp, Ti and Td as shown in Table 4.
From the PID gains obtained in Table 4, the step response for ZN Closed Loop
tuning approach was simulated. The gain values of Kp, Ti and Td for the ZN approach
19
presented in Table 4 indicate the values of the Proportional (P), Proportional and
Integral (PI) and Proportional, Integral and Derivative (PID) for the proposed water
level control system. The gain values of Kp=0.750, Ti= 0.3950 and Td=0.633 for the
Proportional, Integral and Derivative (PID) control resulting process control with the
integral time, Ti that was set to slow, which behave the process that will not return to
the set point quickly enough. Besides that the derivative time, Td which was too
small, results a process control which was unable to reduce the amount of possible
measurement deviation and overshoot on process upset. Figure 6 shows that the
system behaves in a good manner. The response of the system has a small rise time
of 0.308 seconds and is able to minimize the steady state error by approaching the set
point value at 3.59 seconds. However, the process response had a high overshoot of
55.1%.
PID-PSO tuning
The results of PID-PSO Tuning for model control system are presented in Figure 7.
It shows that the process output increases responding to the speed and direction of
20
change of the process variable. The step response of PID-PSO Tuning does not show
Figure 8 (a) shows the contour plot of the local best position for the first test of PID-
PSO Tuning. The plot shows that the particles move randomly from the first iteration
until the end of iteration while searching for the best local position of the system. It
shows that the PSO approach for the process control has large searches of search
space in determination for the best local position. The test illustrates that the PSO
approach has the diversity of swarms for the controller gain determination. In Figure
8 (b), the 3-D contour plot shows the velocity of the model system. From the figure,
it is clearly seen that each particle moves freely and randomly in the search space.
Each different color in the 3-D represents different velocity of data from the first
iteration to the fiftieth iteration. It shows that a particle from the global best position
and its local best position is near, hence, the nearer or smaller of change in velocity
to move the particle back toward is the best solution. PSO leads to dynamic tuning
21
due to its ability to find the best optimal solution through time by searching best
(a)
(b)
Figure 8. (a) Contour plot for the local best position of PID-PSO Tuning, (b) 3-D contour plot for
the velocity of PID-PSO Tuning.
22
Comparison
In the ZN tuned PID controller, the environment case plant response produced high
overshoot while, the PID-PSO tuning show a better performance with reduced
amplitude peak of overshoot. The results of Kp, Ki and Kd obtained for both tuning
are shown in Table 5. The values of Kp, Ti and Td for the PID-PSO approach test
indicate that the integral time has been set from slow to fast, which resulting the
controller valve to move a bit faster than the measurement value. The derivative
time, Td has been increased to a value of 20.1525 that able to reduce the amount of
Tuning approach Kp Ti Td
Details of the results for process performances using both tuning approaches are
shown in Table 6 that was obtained from the data simulated by MATLAB prompt.
The transient response shows that the system has a subsequent change compared
with the ZN approach with overshoot at 0% in the process and zero steady state.
Based on the given values in Table 6, it is proved that the PID-PSO tuning approach
is able to eliminate 100% error in the single tank water level control system. The
transient response for both approaches proved that the PSO-PID tuning system was
in stability with less amplitude of steady state error and percentages of overshoot
were reduced. Therefore, the process response of PID-PSO shows a better positive
23
Dynamic behavior ZN-PID PSO-PID
Rise Time 0.308s 6.3s
Overshoot 1.16s NAN
55.1% A 0% A
Steady state amplitude 5s 10s
1%A 1%A
From the results and discussions presented in this section, it revealed that the PID-
PSO approach can give a good performance for solving single tank water level
control system. The experiments have shown that this approach can be easily
employed especially for the first single order tank water level control system.
Moreover, this study has shown that the PID-PSO gives a better performance than
the ZN tuning approach due to its capability to stabilize the system and to improve
its dynamic behavior. Since the ability of dynamic tuning of PSO to find best
solution through time, thus better performance is obtained compared with the Ziegler
This study shows that both PSO and Ziegler and Nichols approaches can be applied
in process plant for process optimization. However, it is proven that PSO approach
gives a better step response and performance compared to ZN approach. The PID-
function applied in the PSO approach which can minimize large overshooting in a
process plant. Inertia weight in PSO approach has a great effect in system
performance of the approach itself. Inertia weight determines the velocity and
optimal particles position in the search space. The particles in the search space
oscillated and the determination for the best position is challenging if a high value of
24
inertia weight is applied to the approach. Whereas if the inertia weight used was too
low, it tends to create the fast convergence speed (premature convergence) and local
minima.
CONCLUSION
This study presents a tuning problem of a single tank water level dynamic control
process control system. The tuning of water control system is important because the
incorrect tuning could lead to a control process response with steady state error and
overshoot. This study proposed the tuning approaches based on PSO and ZN
approaches. The result of the study shows that the conventional gain tuning of PID
comparison between PSO and ZN approaches prove that PSO approach gives a
applied in the PSO approach which can minimize large overshooting in a process
plant. Inertia weight in PSO approach has a great effect in system performance of the
approach itself which determines the velocity and optimal particles position in the
search space. Thus, PSO leads to dynamic tuning due to its ability to find the best
approaches within offline mode. It is suggested that this study can be improved by
exploring the offline and online (real-time) with the process plant. It is also
25
REFERENCES
Alobaedy, M. M., & Ku-Mahamud, K. R. (2015). Strategic Oscillation for Exploitation and
Exploration of ACS Algorithm for Job Scheduling in Static Grid Computing. In the
proceedings of The Second International Conference on Computing Technology and
Information Management, Johor; 04/2015.
Asifa, H. M., and Vaishnav, S. R. (2010). Particle Swarm Optimisation Algorithm Based
PID Controller. In the proceedings of The 3rd International Conference on
Emerging Trends in Engineering and Technology (ICETET), pages 628 – 631.
Das S., Chakraborty A., Ray J.K., Bhattacharjee S., & Neogi B. (2012, August). Study on
Different Tuning Approach with Incorporation of Simulation Aspect for Z-N
(Ziegler-Nichols) Rules. International Journal of Scientific and Research
Publications (IJSRP), 3(8).
Ebrahim M.A., El-Metwally K.A., Bendary F.M., & Mansour W.M. (2012). Optimization of
Proportional-Integral-Differential Controller for Wind Power Plant Using Particle
Swarm Optimization Technique. International Journal of Electrical and Power
Engineering, 6, 32-37
Edaris, Z. L., & Abdul-Rahman, S. (2014). Optimizing proportional integral derivative water
control system tuning based on particle swarm optimization. In the Proceedings of
the 1st International Conference on the Analysis & Mathematical Applications in
Engineering (AMEAS2014), Curtin University Malaysia, Malaysia, January 19-22,
pages 265-271.
Goldberg, D.E. (1989). Genetic Algorithms in Search, Optimization, and Machine Learning.
Addison-Wesley Publishing Co., Inc.
Ibrahim, A. O., Shamsuddin, S. M., & Qasem, S. N. (2015). Hybrid NSGA-II Optimization
for Improving the Three-Term Bp Network for Multiclass Classification Problems.
Journal of Information and Communication Technology, 14(1), 21-38.
Kennedy J., & Eberhart R. (1995). Particle swarm optimization. Proceeding of IEEE
International Conference on Networks (ICNN’95), 4, 1942-1948.
Korkmaz, M., Aydogdu, O., & Dogan, H. (2012). Design and performance comparison of
variable parameter nonlinear PID controller and genetic algorithm based PID
controller. In the Proceedings of the International Symposium on Innovations in
Intelligent Systems and Applications (INISTA), pages 1-5.
Kim, J. S., Kim, J. H., Park, J. M., Park, S. M., Choe, W. Y., & Heo, H. (2008). Auto tuning
PID controller based on improved genetic algorithm for reverse osmosis
plant. World Academy of Science, Engineering and Technology, 47, 384-389.
Malhotra, R., Singh, N. and Singh, Y. (2010). Design of Embedded Hybrid Fuzzy-GA
Control Strategy for Speed Control of DC Motor: A Servo Control Case
Study. International Journal of Computer Applications (0975–8887), 6(5), 37-46.
Mehta B., & Reddy Y., Industrial Process Automation Systems, 2015, Chapter 19-Advanced
process control systems, (pp. 547-557).
Ogata K., (1987). Modern Control Systems, University of Minnesota, Prentice Hall, 1987.
Pan, H., Wang, L., & Liu, B. (2006). Particle swarm optimization for function optimization
in noisy environment. Applied Mathematics and Computation, 908–919.
26
Pillay N., & Govender P. (2007). A Particle Swarm Optimization Approach for Model
Independent Tuning of PID Control Loop. IEEE Africon 2007, IEEE Catalog:
04CH37590C, ISBN: 0-7803-8606-X.
Rahmat M. F. and Ghazaly M. M. (2006). Performance Comparison between PID and Fuzzy
Logic Controller in Position Control System of DC Servomotor, Jurnal Teknologi
45(D), 1-17.
Saini, S., & Rani, S. (2012). Temperature Control Using Intelligent Techniques. In the
Proceedings of the Second International Conference on Advanced Computing &
Communication Technologies (ACCT), pages 138-145.
Solihin M. I., Tack L. F., & Kean M. L. (2011). Tuning of PID Controller Using Particle
Swarm Optimization (PSO). Proceeding of the International Conference on
Advanced Science, Engineering and Information Technology 2011, ISBN 978-983-
42366-4-9, 458-461.
Tandan, N., and Swarnkar, K. K. (2015). Tuning of PID Controller using Modified Particle
Swarm Optimization, International Journal of Electronics, Electrical and
Computational System, 4, 62-66.
Tunyasrirut S. and Wangnipparnto S. (2007). Level Control in Horizontal Tank by Fuzzy-
PID Cascade Controller, World Academy of Science, Engineering and Technology,
pp.78-82.
27