0% found this document useful (0 votes)
53 views6 pages

Design of Water Level Control Systems Using Pid and Anfis Based On Firefly Algorithm

This document describes a study comparing different methods for controlling water level in a tank, including an uncontrolled model, standard PID control, PID with auto-tuning, PID optimized with a Firefly Algorithm (PID-FA), and an Adaptive Neuro-Fuzzy Inference System (ANFIS) combined with PID-FA (ANFIS-PID-FA). The water tank system consists of a valve subsystem and water tank subsystem. Simulation results show that the five control models have different performances, with ANFIS-PID-FA performing best with the smallest overshoot and undershoot. ANFIS-PID-FA combines ANFIS, PID tuned with the FA optimization algorithm, to effectively control water discharge and level

Uploaded by

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

Design of Water Level Control Systems Using Pid and Anfis Based On Firefly Algorithm

This document describes a study comparing different methods for controlling water level in a tank, including an uncontrolled model, standard PID control, PID with auto-tuning, PID optimized with a Firefly Algorithm (PID-FA), and an Adaptive Neuro-Fuzzy Inference System (ANFIS) combined with PID-FA (ANFIS-PID-FA). The water tank system consists of a valve subsystem and water tank subsystem. Simulation results show that the five control models have different performances, with ANFIS-PID-FA performing best with the smallest overshoot and undershoot. ANFIS-PID-FA combines ANFIS, PID tuned with the FA optimization algorithm, to effectively control water discharge and level

Uploaded by

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

ISSN 2614-4859 9

DOI : https://doi.org/10.26905/jeemecs.v2i1.2804

DESIGN OF WATER LEVEL CONTROL


SYSTEMS USING PID AND ANFIS BASED
ON FIREFLY ALGORITHM
Machrus Ali, A.N. Afandi, Asnun Parwanti, Ruslan Hidayat, Cholil Hasyim

 partially as a water system. Moreover, different models


Abstract—At present, a controlling system of the fluid lead to different control strategies which are very
flow measurement is needed in industrial processes. important for the overall control system design [5].
Determination of the water quantity is also used to reduce Water level control systems are used to control
the volume of water usage in the holding tank varies. The water circulation and the level of water. These processes
effort to overcome this problem has made using a system may include, water dams, petrochemical process plants,
for regulating performances while a water flow based on water treatment plants, pharmaceuticals, and food
the tank volume controlled using a PID system. This
processing plants, overhead tanks and others [2],[6],[7].
system uses a flow sensor to detect the water speed, an
electric ball valve as an actuator. In principles, this tool is A device that performs a controlling action is
used to stabilize the output water speed per minute at a determined by a valve attached to control and maintain
predetermined set point. This study is focused in five the desired set point level [3].
designed method comparison in associated with a water Currently, Artificial Intelligence (AI) is often used
level without control, standard PID method, PID-Auto to develop various sciences including the Imperialist
tuning method Matlab, PID-FA method, and ANFIS-PID- Competitive Algorithm (ICA) [8][9], Firefly Algorithm
FA method. The results of the PID-FA training data are (FA) [10], Ant Colony Optimization (ACO)[11], and
used as an input from ANFIS. From the simulation, it is Particle Swarm Optimization (PSO), Artificial Salmon
also found that five control models have different
Tracking Algorithm (ASTA)[12], and ANFIS[13]. In
performances while the ANFIS-PID-FA model is
performed in the best control model. The ANFIS-PID-FA addition, many applied cases have used these
model has also the smallest overshot and undershot on the algorithms, such as a wind turbine blade control [14], as
water level and output flow of 0.0021 pu, 0.0093 pu, 0.0072 a DC motor speed control [15], as wind-diesel control
pu, and 0.0096 pu. [16], a vehicle steer control[8][17], reconfiguration of
the distribution network[18][19]. In this work, the
Kata Kunci— ANFIS, Firefly Algorithm, PID, Water ANFIS and proportional integral derivative (PID)
Level. controller which is tuned with FA artificial intelligence
to control water discharge at the water level in the tank
I. INTRODUCTION is discussed clearly. The combining ANFIS, PID, and
FA methods will also be compared in an effort to
I n general, a physical mechanism of the water level
system (WLS) is analyzed while the estimated linear
model is also constructed to represent the dynamic
control the water flow in the tank.

property of the WLS around the equilibrium point [1]–


II. RESEARCH METHOD
[4]. In addition, the identification method recognizes a
dynamic character of the WLS using measured input A. Design of Water Tank System
and output data. Technically, the water tank level
The water tank system consists of two block
instrument is developed using a nonlinear time process
subsystems, namely a valve system and a water tank.
control system, which can be modeled globally or
Both systems have own functions as joined interaction
during an existing the fluid flow as running as on the
Machrus Ali are with the Electrical Engineering Departement of processes to complete all interactions of the sequencing
Universitas Darul Ulum, Jombang, Indonesia (email : parts. Technically, the input system is conditioned by
[email protected]) the constant value of water discharge, signal generator,
A.N. Afandi are with the Electrical Engineering Departement of
Universitas Negeri Malang, Malang, Indonesia (email : and tank maximum inflow. The water flow is supplied
[email protected]) using a pump from the storage tank and the water flow
Asnun Parwanti are with the Electrical Engineering Departement of is controlled using an actuator as given in Figure 1
Universitas Darul Ulum, Jombang, Indonesia (email :
[email protected])
Ruslan Hidayat are with the Electrical Engineering Departement of
Universitas Darul Ulum, Jombang, Indonesia (email :
[email protected])
Cholil Hasyim are with the Electrical Engineering Departement of
Universitas Darul Ulum, Jombang, Indonesia (email :
[email protected])

JEEMECS Vol. 2, No. 1, February 2019


10 ISSN 2614-4859

Figure. 1. Simulink Block diagram uncontrolled

As detailed in Figure 1 for the designed water block


system, this figure informs that the Simulink block
diagram is developed based on the uncontrolled joined
subsystems which are interacted in main sections as
presented in valve and tank units. In particular, other
one is concerned in the controlled system for this
interaction as given in Figure 2 using the PID system Figure. 4. Water tank subsystem
and Figure 3 for the ANFIS system.

Figure. 2. Simulink Block diagram PID Controller

Figure. 5. Valve subsystem

Regarding the water tank system, Figure 4 shows the


Simulink block diagram for water tank subsystem and
Figure 5 shows the valve subsystem. These systems are
subjected to control inlet and outlet of the water during
flowing in the tunnel or pipe system. the models are
developed based on its criterias to reach and perform its
characteristc during the water running.

The indicator light set at the water level can be seen


in figure 6.
Figure. 3. Simulink ANFIS Block diagram

JEEMECS Vol. 2, No. 1, February 2019


ISSN 2614-4859 11

Figure. 8. The pseudo code of the firefly algorithm (FA)

The PID parameters set by FA are Kd, Kp, Ki. The


Figure. 6. Simulink Block diagram uncontrolled data of the standard FA parameters used are shown in
Table 1.
B. PID Controller
Proportional – Integral – Derivative controller Table 1. FA Parameters
(PID) controller is a feedback controller that is mostly
Parameters Value
used in industrial equipment. A PID controller
distinguishes the error between the desired set-point and Alpha 0,25
measurable process variables. PID control has been Beta 0,2
widely used for equipment control design in the Gamma 1
industry, even modified with artificial intelligence[15]. Dimensi 3
The structure of the PID controller can be seen in Figure
Number of fireflies 50
7.
Maximum Iteration 50
Kp 0-50
Ki 0-10
Kd 0-10

D. Adaptive Neuro-Fuzzy Inference System


The Adaptive-Neuro-Fuzzy-Inference-System
(ANFIS) is a kind of artificial neural network based on
an inference system from fuzzy Takagi-Sugeno. The
Figure. 7. Structure of PID controller ANFIS structure can be seen in Figure 8.
C. Firefly Algorithm (FA)
The desire of a firefly is to attract the attention of
other fireflies. Xin-She who formulated this firefly
algorithm as follows; All fireflies are unisexual, and
will be attracted to other fireflies. Attraction is
proportional to its brightness. Fireflies, the less bright
ones will be attracted to and approach the firmer
fireflies. Brightness intensity decreases in proportion to
the distance between fireflies. If there are no fireflies
that are brighter, fireflies will move randomly.
Brightness must be associated with the objective
function. To test the system stability, the objective Figure. 9. ANFIS Structure
function is used Integral Time Absolute Error
III. RESULTS AND ANALYSIS
(ITAE)[25].
t As many reported works regarding the ANFIS,
ITAE   t  (t ) dt PID, and FA applications, these works are also dveloped
0 ……..………………..……. (8) using a designed model for the problem. In these
The firefly algorithm can be expressed in studies, the Design of Water Level Control Systems is
pseudocode, with the steps in Figure 7: simulated using a diagram as shown in Figure 10.
The pseudo code of FA can be seen in Figure 7.

JEEMECS Vol. 2, No. 1, February 2019


12 ISSN 2614-4859

0.0572 pu, PID-FA model is 0.0165 pu, and ANFIS-


PID-FA model is 0.0093 pu. In addition, the output Flow
simulation results are illustrated in Figure 11.
Water Level
1.8
Uncontrolled
1.6 PID
PID-Auto
1.4 PID-FA
ANFIS-PID-FA

Signal Response(pu)
1.2

0.8

0.6

0.4

0.2
0 20 40 60 80 100 120 140
Time (Sec)

Figure. 11. Water Level Tank Results

Flow Output
0.3
Uncontrolled
0.28 PID
PID-Auto
0.26 PID-FA
ANFIS-PID-FA
0.24
Signal Response(pu)

0.22

0.2

Figure. 10. Design of Water Level Control Systems 0.18

0.16
By considering Figure 10, all the integrated systems
are run in a single flow for determining system 0.14
performances based on the technical parameters. From
0.12
the simulation results, the constant values of Kp, Ki, Kd, 0 20 40 60 80 100 120 140
Time (Sec)
Overshoot, and Undershoot can be seen in Table 2.
Figure. 12. Output Flow Results
Table 2. Overshot and Undershot
As the previous performances, the results can be also
Unc PID PID- PID- ANFIS- known that the overshoot output flow on the un-
Auto FA PID-
controlled model is remained in 0.2952 pu while PID
FA
model is reached 0.2881 pu. Moreover, other results are
Kp 0 1 0.2314 40.4904 -
given in the PID-Auto model of 0.0284 pu, PID-FA
Ki 0 1 0.0089 0.0055 -
model of 0.0074 pu, and ANFIS-PID-FA of 0.0072 pu.
Kd 0 0 1.3667 3.0319 -
The undershot on the un-controlled model is 0.0250 pu,
Overshot 0.3046 0.2751 0.0742 0.0033 0.0021
Water
PID model is 0.0231 pu, PID-Auto model is 0.0087 pu,
level PID-FA model is 0.0022 pu, and ANFIS-PID-FA model
Undershot 0.1853 0.1423 0.0572 0.0165 0.0093 is 0.0096 pu.
Water
IV. CONCLUSION
level
Overshot 0.2952 0.2881 0.0284 0.0074 0.0072 From the simulation results, it is known that the
Flow five control models show that the ANFIS-PID-FA
Undershot 0.0250 0.0231 0.0087 0.0022 0.0096 model is the best control model. The ANFIS-PID-FA
Flow model has the smallest overshot and undershot on the
Water Level Tank simulation results can be also seen water level and output flow. These works can be
in Figure 10 as the characteristics during the system is developed more with other methods as the appropriate
controlled using various types of the controller. From design study in the further work.
these results, it is found that the Overshot Water Level I
obtained in the un-controlling model of 0.3046 pu, PID V. REFERENCES
model of 0.2751 pu, PID-Auto model of 0.0742 pu, PID- [1] X. Li, J. Li, and L. Shi, “Modeling and simulation of water
FA model of 0.0033 pu, and ANFIS-PID-FA of 0.0021 level system,” in Proceedings of the IEEE International
Conference on Automation and Logistics, ICAL 2008, 2008,
pu while the undershoot of the un-controlling model is pp. 2856–2859.
0.1853 pu, PID model is 0.1423 pu, PID-Auto model is [2] A. A. M. Eltaieb and Z. J. Min, “Automatic Water Level

JEEMECS Vol. 2, No. 1, February 2019


ISSN 2614-4859 13

Control System,” Int. J. Sci. Res., vol. 4, no. 12, pp. 1505–
1509, 2015.
[3] B. Mondal, S. Rakshit, R. Sarkar, and N. Mandal, “Study of
PID and FLC based water level control using ultrasonic
level detector,” in 2016 International Conference on
Computer, Electrical and Communication Engineering,
ICCECE 2016, 2017.
[4] Y.-T. Lin, Y.-C. Lin, and J.-Y. Han, “Automatic water-level
detection using single-camera images with varied poses,”
Measurement, vol. 127, pp. 167–174, Oct. 2018.
[5] S. Omran, R. Broadwater, J. Hambrick, M. Dilek, C.
Thomas, and F. Kreikebaum, “Load growth and power flow
control with DSRs: Balanced vs unbalanced transmission
networks,” Electr. Power Syst. Res., vol. 145, pp. 207–213,
Apr. 2017.
[6] E. Terzi, A. Cataldo, P. Lorusso, and R. Scattolini,
“Modelling and predictive control of a recirculating cooling
water system for an industrial plant,” J. Process Control,
vol. 68, pp. 205–217, Aug. 2018.
[7] C. M. Chew, M. K. Aroua, and M. A. Hussain, “Advanced
process control for ultrafiltration membrane water treatment
system,” J. Clean. Prod., vol. 179, pp. 63–80, Apr. 2018.
[8] M. Ali, F. Hunaini, I. Robandi, and N. Sutantra,
“Optimization of active steering control on vehicle with
steer by wire system using Imperialist Competitive
Algorithm (ICA),” in 2015 3rd International Conference on
Information and Communication Technology (ICoICT),
2015, pp. 500–503.
[9] H. Nurohmah, M. Ali, and M. R. B. Djalal, “Desain
Frekuensi Kontrol pada Hibrid Wind-Diesel Dengan PID–
Imperialist Competitive Algorithm (ICA),” J. Intake, vol. 6,
no. 2, pp. 35–42, 2015.
[10] N. Hamedazimi et al., “FireFly,” in Proceedings of the 2014
ACM conference on SIGCOMM - SIGCOMM ’14, 2014, pp.
319–330.
[11] M. Dorigo, M. Birattari, and T. Stutzle, “Ant colony
optimization,” IEEE Comput. Intell. Mag., vol. 1, no. 4, pp.
28–39, 2006.
[12] A. N. Afandi et al., “Artificial salmon tracking algorithm:
Preliminary designing approach for optimizing the
integrated mixed energy composition,” MATEC Web Conf.,
vol. 204, p. 4002, 2018.
[13] J. S. R. Jang, “ANFIS: Adaptive-Network-Based Fuzzy
Inference System,” IEEE Trans. Syst. Man Cybern., vol. 23,
no. 3, pp. 665–685, 1993.
[14] M. F. Rachman, S. Muttaqin, and M. Ali, “Penggunaan
Metode Imperialist Competitive Algorithm (ICA) untuk
kontrol Frekuensi pada Wind-Turbine dan Hybrid Wind-
Diesel,” in SAINTEK II-2017, UB, Malang, 2017, pp. 99–
102.
[15] M. Ali, “Kontrol Kecepatan Motor DC Menggunakan PID
Kontroler Yang Ditunning Dengan Firefly Algorithm,” J.
Intake, vol. 3, no. 2, pp. 1–10, 2012.
[16] M. R. Djalal and M. Ali, “Particle Swarm Optimization
Untuk Mengontrol Frekuensi Pada Hibrid Wind-Diesel,” J.
Intake, vol. 7, no. 2, pp. 1–13, 2016.
[17] D. H. Kusuma, M. Ali, and N. Sutantra, “The comparison of
optimization for active steering control on vehicle using PID
controller based on artificial intelligence techniques,” in
Proceedings - 2016 International Seminar on Application of
Technology for Information and Communication,
ISEMANTIC 2016, 2017.
[18] M. Ali, D. Ajiatmo, and M. Djalal, “Aplikasi Modified-
Imperialist-Competitive-Algorithm (MICA) Untuk
Merekonfigurasi Jaringan Radial,” JEEE-U, vol. 1, no. 2,
pp. 17–20, 2017.
[19] M. Ali, D. Ajiatmo, and M. R. Djalal, “Aplikasi Modified-
Imperialist-Competitive-Algorithm (MICA) Untuk
Merekonfigurasi Jaringan Radial Tenaga Listrik Pada
Penyulang Mojoagung,” J. JEEEU, vol. 1, no. 2, pp. 17–21,
2017.

JEEMECS Vol. 2, No. 1, February 2019


14 ISSN 2614-4859

JEEMECS Vol. 2, No. 1, February 2019

You might also like