Water Quality Level for Shrimp Pond at Probolinggo Area Based on Fuzzy Classification System

in shrimp farming which has 6 important parameters, namely salinity, pH, DO, nitrogen, temperature and hydrogen sulfide (H2S). This is reinforced by research conducted by Mubarok, et.al [9] which uses 4 parameters to determine water quality, namely DO, temperature, pH and salinity. Where these four parameters are parameters that must be measured daily on a regular basis [10]

also in food industry such as used to fruit rottenness detector [13], egg rottenness detector [14], and in aquaculture sector such as koi fish water quality identification system [15].
Water quality decisions have been widely discussed by several researchers, such as water quality decisions for ex-mining shrimp ponds in Bangka Belitung using 3 parameters: pH, temperature and salinity. They used fuzzy logic Mamdani with 27 rules for their method to determine the level of water quality. This method is done under simulation program utilizing MATLAB software. The result is shown in the water quality scale of 0-100. The water quality is classified as "bad" if it has a value of <60, classified as "normal" if it has a value of 50-90, and classified as "good" if it has a value of <90. There are two types of simulation, one dynamic variable and two static variables, and one static variable and two dynamic variables are taken into observation. The simulation results show that a change in one dynamic variable can cause a decrease in water quality index to 70, and a change in the two dynamic variables can reduce the water quality index to 25.1 [16].
Another research done by Samura, et al. [17]. They monitor and control the water quality of tiger prawns which is implemented in miniature ponds in the form of plastic containers with 3 parameters i.e, temperature, salinity and turbidity. Fuzzy logic mamdani method is used in this research which is processed by NI MyRIO using the LABView program. In the monitoring process, comparing two types of membership function numbers used to know the water quality level with a comparison of error accuracy of 3.22 for 3 membership functions and error accuracy of 0.51 for 5 membership functions. So it can be said that the 5 membership functions are more accurate than 3 membership functions. In the control process, fuzzy logic is used to control the PWM rotational speed of each water pump including temperature pump, salinity pump and turbidity pump.
A portable pond water quality monitoring system was created to help aquaculture cultivators to monitor water quality parameters, then the data is processed using fuzzy logic to obtain water quality. These measured parameters will be stored in a google spreadsheet for further use in evaluating production achievements in the aquaculture sector, particularly shrimp production.

II. System Design and Method
In this research, authors divided the system into two blocks i.e., data acquisition module and fuzzy classification which is embedded in cloud system as shown in Figure 1. Data acquisition module that is shown by red dash line consist of four sensors i.e DO, pH, temp and EC, data acquisition unit, LCD and IoT device. This module collect data, display in LCD and send the data to cloud utilizing IoT device. Data are saved in the google spreadsheet where the fuzzy logic embedded as shown in Figure 1 inside blue dash line. In order to easily access the data, the farmer is ask to register a google account. By doing this manner, farmer is easy to see the history of shrimp pond water quality on their smartphone.
In Figure 2a it is the external shape of the tool, while in Figure 2b it is the internal shape of the tool. In Figure  2b, it can be seen that there is an Arduino Mega 2560, NodeMCU ESP8266 and several sensors as shown in Figure 1 in the red dash line.
This research was carried out on a pond located in the coastal area of Probolinggo City, East Java as shown in Figure 3 with yellow colour.

A. Data Acquisition Module
Data acquisition module consists of several parts i.e. sensing device, collecting data device, IoT device, and LCD.
Sensing device consists of four sensors, i.e: -Dissolved Oxygen (DO) Sensor by Atlas Scientific, used to determine the dissolved oxygen content in water. The dissolved oxygen used is in part-per-million (ppm). -Hydrogen Potential (pH) Sensor by Atlas Scientific, used to determine the acidity of the water. -Temperature Sensor by Atlas Scientific, used to determine the temperature of the water. The temperature used is in Celcius degrees (°C).

-Electrical Conductivity (EC) Sensor by Atlas
Scientific, used to determine the content of dissolved salts in water or salinity. The salinity used is in part per trillion (ppt). Collecting data device use Arduino Mega 2560, IoT device utilizing NodeMCU ESP8266, while LCD using 16×2 characters.

B. Fuzzy Classification System
After 4 parameter data successfully sent to cloud, the data is processed by fuzzy logic to generate the water quality level. For this purpose, authors propose fuzzy classification using Tsukamoto method as shown in Figure  4. By using fuzzy classification, it is possible to generate water quality level based on four parameters.
The inference system of the Tsukamoto fuzzy method forms a rule base in the form of "if-then". The first step in Tsukamoto's Fuzzy method is to create a fuzzy rule. The next step is to calculate the degree of membership according to the rules that have been made. After knowing the degree of membership of each fuzzy rule, the alpha predicate value can be determined by using fuzzy set operations.
The important thing before the design of fuzzy logic, intensive communication between author and farmer is conducted to adjust and determine the parameter in fuzzy logic such as membership function and rule base so the output of fuzzy logic will meet the requirement of farmer.
After the classification results are obtained, the farmers will verify the data for the feasibility of the next trial. For this purpose, authors must refer the standard data for shrimp cultivation. In this paper, authors utilize the result from other researches [3] [18] for generating membership function as shown in Table 1.
In this study, the authors represent the membership function input in the form of a trapezoidal curve. Where there are 3 types of functions to get the alpha predicate value, i.e a descending linear function, an ascending linear function and a trapezoidal function.
The descending linear function shown in Figure 5 is the fuzzy set starting from the area value with the highest degree of membership on the left side, then moving up to a lower degree of membership. A fuzzy membership degree function is called a descending linear function if it has 3 parameters, i.e a, b, c ∈ R, and is expressed by the following rule: The ascending linear function shown in Figure 6 is the fuzzy set starting from the area value with the lowest degree of membership on the left side, then moving up to a higher degree of membership. A fuzzy membership degree function is called an ascending linear function if it has 3 parameters, i.e a, b, c ∈ R, and is expressed by the following rules: The trapezoid function is a combination of two linear lines, with some points having absolute membership values. The Trapezoid Curve is shown in Figure 7.
For the first membership function, authors develop temperature membership function. The temperature parameters divided into four membership functions: good, medium, bad, and very bad. Temperature can be classified as "good" if it is 29.3-30°C, classified as "medium" if it is 26-29.3°C or 30-31°C, classified as "bad" if it is 25-26°C or 31-33°C, and classified as "very bad" if it is <25°C or >33°C. The temperature membership function is shown in Figure 8.
The second input is the power of hydrogen (pH). The pH parameters divided into four membership functions: good, medium, bad, and very bad. pH can be classified as "good" if it is 8.0-8.5, classified as "medium" if it is 7.5-8 or 8.5-8.7, and classified as "bad" if it is 7-7.5 or 8.7-8.8, classified as "very bad" if it is <7.0 and >9.0. The pH membership function is shown in Figure 9.
The third input is dissolved oxygen. The DO parameters    Figure 10.
The fourth input is salinity. The salinity parameters divided into four membership functions: good, medium, bad and very bad. Salinity can be classified as "good" if it is worth 17-25 ppt, classified as "medium" if it is worth 10-17 ppt or 25-30 ppt, classified as "bad" if it is 4-10 ppt or >30 ppt, and classified as "very bad" if it is <4 ppt. The salinity membership function is shown in Figure 11.
For testing each parameter, the α-predicate is taken from membership function of its parameter. Then, the largest α-predicate value is taken to determine the status of the parameter. The input data for fuzzy logic testing is in the form of random data to generate the status of each parameter as shown in Table 2.
After getting the α-predicate for each parameter, it will be compared to the rule base. There are 80 rule bases in Table 3 that are created and will get the value of each rule to be defuzzified.
Before entering the defuzzification process, there is an implication process which is used at this stage is the MIN function, namely by taking the smallest membership value between elements in the fuzzy set in one rule as the α value of water quality. The result of the function of the implications of each rule is called α-predicate or can be written α. The output of this system is water quality level. The level of water quality is represented by the numbers 0-100. The water quality index is classified as "very bad" if the level is under 40, classified as "bad" if the level is 35-60, classified as "medium" if the level is 55-80, and classified as "good" if the level is >80. The water quality membership function is shown in Figure 12.
After knowing the α value of the water quality, the next step is to know the z i value. To find out the z i value, refer to Figure Table 2, the α value can be obtained from the column score/good where in these column it has 0.67 for pH, 0.8 for DO, 0.6 for salinity and 0.59 for temperature. Based on these number, all of parameters are in good condition, giving good result for water quality classification, as shown in Table 3. Based on equation (3), the minimum number of those parameter must be chosen yielding 0.59 as the α value. If a horizontal line is drawn from α = 0.59, this line will cross several classification lines shown in Figure 12. Since the classification result is "good", the horizontal line will cross "good" line indicated by green line. Then, using equation (4) will get the z i result is 89.75.
After that, a defuzzification process will be carried out to obtain the percentage of water quality. The defuzzification method used in this study is the weighted average method, which is obtained by the following formula as shown in (8)

III. Result and Discussion
Based on studies in introduction section, authors interest to bring four parameters as shown in Table 4, for leveling water quality using fuzzy classification system.

A. Fuzzy Logic System
The fuzzy logic system is done by combining the possibilities that exist by using parameter data to determine the status of each parameter and the percentage of its water quality. To verify whether fuzzy logic created in this system is correct, several parameter, i.e sensor sensing value are randomly created. These parameter are then processed by fuzzy classification system and confirmed by farmer. Based on this test, all result produced by fuzzy classification system are meet the expectation of farmer. Table 5 shows some samples of defuzzification which is verified by farmers.
In the real measurement, data acquisition module with the sensor is placed in the pond. Ten days experiment was carried out. The data is taken from the pond morning and evening as shown in Table 6.
On the 14th and 15 th of June, there was an anomaly in the DO data which looked very high, above 10ppm. The anomaly is caused by human error, where the sensor has not been properly calibrated before measurement on that day.
DO values tend to be lower in the morning than in the afternoon due to algae activity that produces oxygen during the day and consumes oxygen at night. The activity of these algae will also affect the pH parameters towards alkaline, so that the pH measurement during the day is higher than the pH in the morning. As for changes in temperature due to exposure to sunlight which affects the temperature of the water itself. Salinity values tend to be stable because usually salinity is strongly influenced by rainfall, while in June there is almost no significant rainfall.

B. Testing of Data Delivery, Data Storage and Data Processing on Google Spreadsheet
This test is carried out to test the flow of data from the data acquisition tool to google spreadsheet as the data storage area and also to ensure the data is processed with fuzzy logic so that the results are in the form of water quality. Figure 13 shows the parameter data stored on a google spreadsheet. The first and second column contains the date

IV. Conclusions
In this study, authors build a water quality classification system using a fuzzy logic classification model. The parameters used have been discussed with the farmers in the hope that the output produced by the system will be in accordance with the standards or wishes of the farmers. There are 4 parameters that are classified into 4 categories which will be processed to obtain a water quality that is  From the experimental results, it can be seen that the classification results are in accordance with the expectations of farmers. Fuzzy logic that is placed in the cloud can run well, because the output on the spreadsheet is in accordance with the results that have been discussed.
For further development, authors will carry out measurement and analysis in different places. To see if the system being built will work in a different geographic location, authors will do the same case in a different location.