You are on page 1of 6

The 2019 IEEE International Conference on Industry 4.

0, Artificial Intelligence, and Communications Technology (IAICT)

Monitoring and Classification System of River


Water Pollution Conditions with Fuzzy Logic
Khalid Waleed A. S., Purba Daru Kusuma, Casi Setianingsih,
School of Electrical Engineering, Telkom University, Indonesia
khalidwaleedas@gmail.com

several levels of pollution, these conditions are divided


Abstract The development of the current era, and the into determining the level of water use in the community
rapid development of technology and the need for a as well as the industry, the levels are divided into several
significant increase in demand, as well as pollution, the which are physical, chemical, or biological. Pollution in
water sector, especially the river has experienced a general can be seen from several aspects of water starting
decline in water quality even to the occurrence of from the level of turbidity of water, water temperature
pollution, resulting in water can no longer be consumed and pH value of water [2]. These advanced conditions,
either by human body also for other needs. Some of the many systems have been developed with the aim of
systems that were developed began to be able to process
monitoring the condition of an object. This is because we
existing data, be it conditions from water, chemical
can already know some important aspects of the
observations or physically. This is done because water is
monitoring, starting from the current condition of the
a necessity that cannot be tolerated, so this research is
done to help fulfill or even provide a calm warning of object even to the prediction of the condition of the object
water quality. With the development of Internet of Things in the future based on current conditions. According the
(IoT) the monitoring system will develop, because with existence of a logic function, this the development of a
the existence of technology such as low-power wide-area system can be performed both now and in the future. One
network (LPWAN) as specific as possible, short data can of the logical functions that are widely used is fuzzy logic,
be sent using lower power. In this research, it was proven because with this logic function we can process some
that the author could make a monitoring system and existing data into a form of output, the output itself can
classification of river water pollution. By using an be in the form of a status or state of action that will be
artificial intelligence, using the fuzzy logic method. The performed by a tool [3]. And supported by the existence
results of system testing show that the average accuracy of Internet of Thing (IoT) that supports to make the data
of the monitoring system results is 99.7% and the results obtained can be accommodated so that the results of the
of the appropriate classification values are based on the data can be processed as well, the results can be displayed
results of system testing. better.

Keywords : Fuzzy Logic, Monitoring, Classification, Water II. BACKGROUND THEORY


Pollution, Internet of Things
A. Water Pollution
I. INTRODUCTION1
Water pollution is a change in the condition of a water
In Indonesia, river water has a very important role in reservoir such as lakes, rivers, oceans and groundwater
life in the community, for example, for transportation and due to human activities. Lakes, rivers, oceans and
economic activities of its inhabitants. However, used groundwater are important parts of the human life cycle
water from industrial, agricultural and domestic use is and are part of the hydrological cycle. In addition to also
immediately disposed of into the river, this is a lot drain the water drain sediment and pollutants. Its various
happening in developing countries because of the functions greatly help human life. The biggest use of
incomplete system of escape. River water itself has been lakes, rivers, oceans and groundwater is for agricultural
utilized as drinking water, agricultural irrigation systems irrigation, drinking water raw material, as a drainage
and various fish cultivation throughout human history. channel for rain water and waste water, even potentially
However, water pollution has become one of the most felt as a tourist attraction.
problems in many countries, including developing Although natural phenomena such as volcanoes,
countries such as Indonesia, rivers also play an important storms, earthquakes etc. also result in large changes in
role in transportation and many economic activities. water quality, this is not considered pollution. In the
Therefore, research on monitoring water quality is very journal [7] it is explained that some water pollution
important to do with the current situation [1]. occurs not only because of natural conditions but rather
The water conditions themselves are divided into the results of the water treatment itself, which results in

978-1-7281-3745-2/19/$31.00 ©2019 IEEE 112


The 2019 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT)

changes in the number of important ingredients contained conductivity of the solution. Temperature is measured on
by them. the centigrade scale.
B. pH E. Fuzzy Logic
pH is defined as a measure of the amount of alkalinity Fuzzy Logic is a branch of Artificial Intelligence,
or acidity in drinking water, which is basically a which is a knowledge that makes computers able to
measurement of the concentration of hydrogen ions in mimic human intelligence so that computers are expected
water. pH analysis helps in a variety of applications such to be able to do things that when done by humans need
as industrial or domestic applications. This varies from intelligence. In other word fuzzy logic has a function to
the process of treating wastewater to water conditioning "mimic" intelligence possessed by humans to do
for industrial processes. Excerpted from the journal [10] something and implement it to a device, such as robots,
effective, monitoring the pH of drinking water is vehicles, household appliances, and others. In the journal
important for many reasons such as: in the human body, [8], it is explained about the use of fuzzy logic to
metabolic processes cannot withstand pH imbalances. determine the condition of how much sensor data is
Any variation in pH in biological fluids can even cause obtained which can then be made a prediction in the
the production of toxins in the body and weaken the future.
body's ability to produce enzymes and hormones that can
cause central nervous system problems. It can also affect
the electrophysiology of brain activity, being able to
change form enzymes results in failure in the normal
functioning of the metabolic activity of the human body.
pH measurement can be performed using the principle of
a combined glass electrode, which is the hydrogen ion in
the solution migrates through a selective barrier,
producing a potential difference (voltage) that is
measured proportional to the pH value of the solution.
The pH of drinking water must be between 6.5 and 9.
C. Turbidity
Turbidity is the number of grains of matter that cannot
be seen with the naked eye inundated in water. Turbidity
usually occurs because of the presence of suspended and
dissolved organic and inorganic materials (silt and fine
sand) while in organic and inorganic forms of Fig. 1. Fuzzy Process
microorganisms and plankton. Turbidity is expressed as
a unit of turbidity, which is equivalent to the size of 1mg Figure 1 is a fuzzy system designed in this research,
/ liter siO2. It was explained in the journal [9], that with the following explanation:
turbidity itself can be measured by changes in the 1. Fuzzy input used is sensor measurement data such
intensity of light penetrating water, besides the as pH, turbidity, and temperature of river water.
compounds contained in this study more focus at the level Input data will be processed by the fuzzification
of turbidity that occurs in water. module. The final goal to be obtained in
fuzzification is to get fuzzy values for each input
D. Temperature data which then becomes the input of the inference
Temperature indicates the degree of heat objects. module
Easily, the higher the temperature of an object, the hotter 2. The second module is Inference. The final goal to
the object will be. Microscopically, the temperature be obtained in the inference section is to get the
shows the energy possessed by an object. Each atom in fuzzy output value and then become the
an object each moves, both in the form of displacement defuzzification module input. In this module there
are rules from each case obtained from experts,
and movement in the vibration. The higher the energy of
namely the Citarum River Hall Officer, Bandung,
the atoms making up the objects, the higher the
West Java, Indonesia. The type of inference used
temperature of the object. A long-term global map of the
is Mamdani model
average monthly air temperature in the Mollweide 3. The last module is Defuzzification. The final goal
projection. Temperature is also called temperature to be obtained in defuzzification is to get an output
measured by a thermometer. The four best known types value that is crisp (firm) as the final result
of thermometers are Celsius, Reaumur, Fahrenheit and 4. In the Defuzzification module there are several
Kelvin. Then in the journal [10] described significant methods that can be used. In this study, the
changes occur at water temperature due to chemical calculation of the final crisp value is used the
reactions that affect the conductivity and TDS of water. Centroid Method (Center of Gravity) method with
This can be determined by careful observation. Ion the equation:
mobility and ion concentration also change the

978-1-7281-3745-2/19/$31.00 ©2019 IEEE 113


The 2019 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT)

7. Website: Data will be analyzed and results can be


displayed on the web.
(1)
B. Sensors Systems
5. After the final crisp value has been produced, it The data used in this study was taken from several
can be concluded that water pollution conditions sensors installed on the microcontroller. Each sensor has
are included in low, medium, or high pollution. a specific function depending on what elements you want
to know from contaminated water. The data from the
III. METHODOLOGY sensor is used.
A. System Design 1) pH Sensors
In this study a data classification technique will be The data obtained from the pH sensor is in the
applied using the Fuzzy Logic algorithm. These form of an electric current voltage level ranging
algorithms function as pattern formers to classify from 0 to 5 volts. Then the voltage is converted
conditions. The conditions discussed in this paper are into digital values 0 to 1024. To obtain the final
conditions of river water pollution, contamination pH value, enter an equation into the system, then
monitored and classified as polluted rivers and then data after the calibration will be done with the
on pH, temperature, and turbidity levels contained in the following conditions:
water are found. The conditions that will be obtained will
be in the form of water pollution levels, which can be
divided into low, medium or high pollution. Fig 2 is an 1
illustration of this research.

0.5
f(X)

0
0 5 6.5 8.5 9 14
Sensor value
Acid Neutral Base

Fig. 3. Member function of pH sensors

In Figure 3, it is seen that river water can be said


to be acidic if the value on the sensor is below 6.5
while the Ajika bass value is higher than 8.5. then
river water is said to be neutral in conditions
between 6.5 to 8.5.
Fig. 2. General description of the system
2) Turbidity Sensors
the system designed in this research has several At the turbidity sensor or turbidity level sensor,
important parts such as the data received by the voltage from the sensor
1. Input Sensor: Data input on the system is the data probe, the received one ranges from 0 to 5 volts,
measured by sensors on river water. the data is then changed to get the turbidity value
2. Microcontroller: The measurement data of the where on the sensor, the lowest value lies in the
sensor will be processed by a microcontroller to be voltage 2.5 volts while the bottom is at 0 and 5
changed to a valid sensor value after calibration volts. Then the data is divided into the following:
with a comparison measuring instrument.
3. LoRa: Data from the microcontroller will be sent
to the server using LoRa communication. 1
4. Server: All data sent by the microcontroller will be
stored on an IoT server / platform (Antares)
0.5
5. Fuzzy Logic: The web will retrieve data from
f(X)
Antares and then be processed with a Fuzzy
Inference System to get a conclusion on the level 0
of pollution from the water condition. 0 500 600 1200 1500 3000
6. Real Time Data: The microcontroller will send
Sensor value
sensor measurement data automatically and real
time at any given time interval and the server will Low Medium High
automatically update the data to the web.
Fig. 4. Member function of Turbidity sensors

978-1-7281-3745-2/19/$31.00 ©2019 IEEE 114


The 2019 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT)

0 , 500 ≥ ≥ 1500
In figure 4, the division of the turbidity sensor results , 500 < < 600
in a diagram. The unit of water turbidity itself is NTU (6)
(Nephelometric Turbidity Unit), in the case of Low , 1200 < < 1500
turbidity water sensor if the NTU value is lower than 1 , 600 ≤ ≤ 1200
600, while the Medium is in the range of 500.1 to
1499.9. then High if more than 1200. 0 , ≤ 1200
ℎ , 1200 < < 1500 (7)
3) Temperature Sensors
Temperature sensor or water temperature sensor will 1 , ≥ 1500
produce digital data which is specified as follows:
From figure 3, it can be seen the membership function
from pH, from the membership chart, the equation is as
1 follows.

0.5 0 , ≥ 6.5
f(X) .
, 5 < < 6.5 (8)
.
1 , ≤ 5
0
0 22.5 26 27.5 30.5 100
0 , 5 ≥ ≥ 9
Sensor value
, 5 < < 6.5
Rendah
Low Normal Tinggi .
High (9)
, 8.5 < < 9
.
Fig. 5. Member function of pH sensors 1 , 6.5 ≤ ≤ 8.5

In Figure 5, it is explained if the sensor value is below


26 degrees Celsius, the river water is categorized as 0 , ≤ 8.5
.
cold, in the range 22.5 to 30.5 it is said to be normal, , 8.5 < < 9 (10)
.
while above 27.5 it can be said to be high. 1 , ≥ 9
C. Fuzzy Systems
Based on the membership function above, the data will
on fuzzy systems, each sensor value will have a then be processed and processed into an output system in
membership value, from the value of the membership can the form of pollution levels in river water. after the input
be obtained by the membership function of each input is given the subsequent functional function, each input
value. From figure 5, it can be seen the membership will be input into a rules function on fuzzy logic.
function from Temperature, from the membership chart
the following equation is obtained. Table. 1. Fuzzy Rules
Num. pH Turbidity Temperature Condition
0 , ≥ 26
, 22.5 < < 26 (2) 1 Acid Low Low Med
.
1 , ≤ 22.5 2 Acid Low Normal Low

0 , 22.5 ≥ ≥ 30.5 3 Acid Low High Med


.
, 22.5 < < 26 4 Acid Med Low High
.
. (3)
, 27.5 < < 30.5 5 Acid Med Normal Med
. .
1 , 26 ≤ ≤ 27.5
6 Acid Med High High
0 , ≤ 27.5 7 Acid High Low High
.
ℎ , 27.5 < < 30.5 (4)
. .
8 Acid High Normal Med
1 , ≥ 30.5
9 Acid High High High
From Figure 4, it can be seen the membership function of
Turbidity, from the membership chart, the equation can 10 Neutral Low Low Low
be obtained as follows. 11 Neutral Low Normal Low
0 , ≥ 600 12 Neutral Low High Low
, 500 < < 600 (5)
13 Neutral Med Low Med
1 , ≤ 500
14 Neutral Med Normal Low

978-1-7281-3745-2/19/$31.00 ©2019 IEEE 115


The 2019 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT)

Num. pH Turbidity Temperature Condition IV. RESULST AND DISCUSSION

15 Neutral Med High Med A. Sensors Test Result


16 Neutral High Low Med From the system being run, it is known that the
system runs smoothly, but it can get data from the river
17 Neutral High Normal Low water being tested. the data is in the form of water quality
18 Neutral High High Med
values which are divided into temperature, turbidity, and
pH of water. The following are the results of the sensor
19 Base Low Low Med tests performed.
20 Base Low Normal Low

21 Base Low High Med

22 Base Med Low High

23 Base Med Normal Med

24 Base Med High High


25 Base High Low High

26 Base High Normal Med

27 Base High High High

Fig. 7. Output Sensors


From the results of table 1. you can see and determine the
results of the output of each existing data. from the table
can also be observed the value of the system output is B. System Result
divided into 3 into Low, Medium, and High. the value of The system that was made succeeded in carrying out
the output itself has a membership chart as follows. data retrieval, feeding from the system can be input
obtained from sensor, then the next system will be
processing data so that the input system can reach the
1 1 1 1 1 1 output which is the final result of the classification of
river water pollution done. after the data passes through
the process stage by artificial intelligence used to use the
f(X) fuzzy logic algorithm, then the system will display the
results in the form of water quality values and also the
0 0 0 0 0 0 level of pollution in the water. The following are the
0 20 30 70 80 100 results of the system that has been made.
Sensor value
Low Medium High

Fig. 6. Member function of Output system.

From the graph above, we get the following equation.

0 , ≥ 30
, 20 < < 30 (11)
1 , ≤ 20

0 , 20 ≥ ≥ 80
, 20 < < 30 Fig. 8. Output Systems
(12)
, 70 < < 80
1 , 30 ≤ ≤ 70 V. CONCLUSION

0 , ≤ 70 Based on the results of this Paper, conclusions can be


ℎ , 70 < < 80 (13) drawn, namely:
1 , ≥ 80 1. The classification process of river water
pollution data is only given 3 types of classes
(Low, Medium, or High) using the fuzzy logic
algorithm.
2. When testing the sensor, the sensor value gets a
fairly accurate result after being compared with

978-1-7281-3745-2/19/$31.00 ©2019 IEEE 116


The 2019 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT)

the measurement of each aspect of water quality.


With an average error of 0.3% after testing using
a measuring instrument.
3. The system can visualize the output of the river
water pollution level.

REFERENCES
[1]. Sritrusta Sukaridhoto, Dadet
Pramadihanto,Taufiqurrahman, Muhammad Alif, Andrie
Yuwono, Nobuo Funabiki. A Design of Radio-controlled
Submarine Modification for River Water Quality
Monitoring. (2015).
[2]. K. Sri Dhivya Krishnan, P.T.V. Bhuvaneswari. Multiple
Linear Regression Based Water Quality Parameter Modeling
to Detect Hexavalent Chromium in Drinking Water. (2017).
[3]. Aris Pujud Kurniawan, Agung Nugroho Jati, Fairuz Azmi.
Weather Prediction Based on Fuzzy Logic Algorithm for
Supporting General Farming Automation System, 9 Agustus
(2016).
[4]. Muhammad Faisal, Harmadi, Dwi Puryanti. Perangcangan
Sistem Monitoring Tingkat Kekeruhan Air Secara Realtime
Menggunakan Sendor TSD-10. ISSN 1979-4657. Maret
(2016).
[5]. Mohd Adli Ikram Shahrulakram, Juliana Johari. Water
Storage Monitoring System with pH Sensor for
Pharmaceutical Plants. 3 Oktober (2016).
[6]. Putu Virga Nanta Nugraha, Sunu Wibirama, Risanuri
Hidayat. River Body Extraction And Classification using
Enhanced Models of Modified Normalized Water
Difference Index At Yeh Unda River Bali. (2018).
[7]. Xu Luo, Jun Yang. Problems and Challenges in Water
Pollution Monitoring and Water Pollution Source
Localization Using Sensor Networks. (2017).
[8]. R.Suchithra, R.Shanmathi, V.Sruthilaya, P. Navaseelan,
V.Sneha. pH Controller for Water Treatment Using Fuzzy
Logic. (2016).
[9]. Youchao Wang, S M Shariar Morshed Rajib, Chris Collins
and Bruce Grieve. Low-cost Turbidity Sensor for Low-
power Wireless Monitoring of Fresh-Water Courses. (2018).
[10]. Indu .K, Jishmi Jos Choondal. Modeling, Development &
Analysis of Low Cost Device for Water Quality Testing.
(2016).
[11]. S. Hajrahnur, M. Nasrun, C. Setianingsih and M. Murti,
"Classification of posts Twitter traffic jam the city of jakarta
using algorithm C4.5," in International Conference on
Signals and System, 2018.
[12]. N. Arifin, B. Irawan and C. Setianingsih, "Traffic sign
recognation appplication using speeded-up robust features
(SURF) and support vector machine (SVM) based on
android," in IEEE Asia Pacific Conference on WIreless and
Mobile, 2018.
[13]. H. Z. Muhammad, M. Nasrun, C. Setianingsih and M.A.
Murti, "Speech Recognation for English to Indonesia
translator using hidden Markov model," in Int. Conf. Signals
Syst. ICSigSys, 2018.
[14]. F. M. A. Azis, M. Nasrun, C. Setianingsih and M. A. Murti,
"Face Recognition in night day using method eigenface," in
Int. Conf. Signals Syst. ICSigSys 2018, 2018.
[15]. R. Ratnasari, B. Irawan and C. Setianingsih, "Traffic sign
recognition application using scale invariant feature
transform method and support vector machine based on
android," in APWimob 2017 - IEEE Asia Pacific Conf.
Wirel. Mobile, 2018.
[16]. D. F. Azid, B. Irawan and C. Setianingsih, "Translation
Russian cyrillic to latin alphabet using SVM (support vector
machine)," in APWibMob 2017-IEEE Asis Pacific Conf.
Wirel. Mobile, 2018.
[17]. V. E. Vyanza, C. Setianingsih and B. Irawan, "Design of
smart door system for live face recognition based on image
processing using principal component analysis and template
matching correlation methods," in APWiMob 2017-IEEE
Asia Pacific Conf. Wirel. Mobile, 2018.

978-1-7281-3745-2/19/$31.00 ©2019 IEEE 117

You might also like