Integrating fuzzy logic and genetic algorithm for upwelling prediction in Maninjau Lake

Upwelling is a natural phenomenon related with the increase in water mass that also occurs in Maninjau Lake, West Sumatra. The upwelling phenomenon resulted in considerable losses for freshwater fish farming because make mass mortalities of fish in farming using the method of floating net cages (karamba jaring apung/KJA). It takes a system that can predict the possibility of upwelling as an early warning to the community, especially fish farming to immediately prepare early anticipation of upwelling prevention. With historical water quality monitoring data at six sites in Maninjau Lake for 17 years, a prediction model can be made. There are three input criteria for Tsukamoto FIS that is water temperature, pH, and dissolve oxygen (DO). The model is built with fuzzy logic integration with the genetic algorithm to optimize the membership function boundaries of input and output criteria. After the optimization, hybrid Tsukamoto FIS and genetic algorithm successfully make a correct upwelling prediction on of 16 data with 94% accuracy.


Introduction
Upwelling is a natural phenomenon associated with the rise of water masses, both in seawater and lake water [1].Upwelling has a good impact if it occurs at sea because it causes an algal explosion so that the amount of food for marine biota is increasing.But the upwelling phenomenon is more negative if it occurs in the lake which used for freshwater fish farming.Mass mortalities of fish in farming using the method of floating net cages (aquaculture/karamba jaring apung/KJA) often occurs due to upwelling.Losses are affecting not only economically but also socially and environmentally [2].According to Suwedi et al. [2], many cases of reservoir or lakes that often suffer from the mass mortality of fish.One of them is Maninjau Lake, West Sumatra with total mass mortality of fish reached 2,000 tons in November 2010.
By 2013 the number of KJA in Maninjau Lake has grown rapidly with the number of 15,680 plots [3].Pressure on Maninjau Lake environment is not only caused by the increase of fish farming with KJA system but also caused by land use in the catchment area, land use in lake's border for settlement, conversion of rice field to fish pond and other designation for infrastructure development [3].Increased activity has led to the increased organic loading of the lake's water bodies which directly impacts on water quality degradation so that when upwelling occurs that can lead to mass mortalities of fish.To support the development of KJA in Maninjau Lake, an anticipation of upwelling impact is required.It takes a method that can accurately predict the occurrence of upwelling.
The fuzzy logic method is often used to solve predictive problems because it has a simple model and fairly good accuracy [4].Meanwhile, fuzzy logic performance can be improved if there are parts that are optimized.One of the optimization methods used to optimize fuzzy is the ISSN: 1693-6930  Integrating fuzzy logic and genetic algorithm for upwelling prediction... (Muhammad Rofiq) 227 genetic algorithm.The predicted results on fuzzy that have been optimized with genetic algorithm give a better result.One example is the hybrid Tsukamoto FIS and genetic algorithm that has been used by Wahyuni and Mahmudy [5] to rainfall prediction in Tengger, East Java.The method successfully predicted rainfall with with smaller root mean squared error (RMSE) about 6.63.Hybrid Tsukamoto FIS and the genetic algorithm (GA) used as an upwelling prediction method on Maninjau Lake.The data used is water quality monitoring results scattered in Maninjau Lake, namely Sungai Batang, Bayur, Sigiran, Muko-Muko, Koto Gadang, and Pandan are presented in Table 1.There are three parameters to be used as fuzzy inputs: water temperature (°C), pH, and Dissolved Oxygen (DO).The output parameter used the possibility of upwelling or water contamination.
The objective of this research is to make an optimized algorithm that can predict possibility of upwelling in Maninjau Lake with small error rate.The first step is make a model using Tsukamoto FIS.And the second step is the boundaries of membership function on Tsukamoto FIS optimized by genetic algorithm to find the most optimal value for predicting upwelling.

Maninjau Lake
Maninjau Lake is a tecto volcanic lake, located in Tanjung Raya District of Agam Regency, West Sumatera Province, Indonesia.It's located at an altitude of 461.50 m above sea level with the surface area 9737.50 ha [6].Maninjau Lake is one of the lakes that have an important role in West Sumatra as a means of tourism, hydropower (PLTA), fisheries, and aquaculture operations with 4,316 KJA plot [3], [7].There are six location in Maninjau Lake that are used as test data are found on the floating net cage spread over Maninjau Lake.Details and descriptions of these locations are shown in Table 1.
Table 1.Detail and Description of the Sampling Sites in Maninjau Lake [6], [8,9] Sampling site Description Sungai Batang Littoral waters were ramps, mud, and sand substrate, floating net cages farming of tilapia, and the riparian lakes were human settlement area and hotels.

Bayur
Littoral waters were ramps, mud, and sand substrate, floating net cages farming of tilapia, and the riparian lakes were human settlement area and hotels.

Sigiran
Littoral waters were a steep area, little aquatic vegetation, substrate dominated by rocks, the area for floating net cages farming of tilapia, and human settlement area.Muko-Muko It was an outlet for hydroelectric power plant intake, conservation area, and tourist area.Koto Gadang Littoral zone, area for aquaculture, the surrounding area is agricultural Pandan Littoral zone, area for aquaculture

Upwelling
As mentioned earlier, upwelling in lake is cause by several factors such as water quality and weather around the lake.In this research used water quality factor to determine the possibility of upwelling they are Temperature (°C), pH, and Dissolved Oxygen (DO).According to the Class 3 Standard Quality of Water Quality (BMKA) based on Government Regulation No. 82/2001 [10], good parameter values for fish farming are shown in Table 2. Water temperature, pH, and DO data taken from the six locations were searched for average values to determine the possibility of upwelling at Maninjau Lake for testing data.For the test used the observational data from 2001 until 2017.In upwelling criteria, there are  3.

Tsukamoto Fuzzy Inference System (FIS) 4.1. Fuzzy Association
Upwelling prediction model in Maninjau Lake will do with Tsukamoto FIS.Before calculating with FIS Tsukamoto, it is necessary to specify the fuzzy set model consisting of the membership function, linguistic value, and range value of each criterion that used as input and output for upwelling prediction.In this research used three input criteria: Temperature (°C), pH, and Dissolved Oxygen (mg/L).The output parameters used are the possibility of upwelling or water contamination.The modeling of the created fuzzy set is shown in Table 4.

Fuzzification
The fuzzification process can be defined as calculating the crisp value or the input value to the degree of membership.The calculations in the fuzzification process are based on the limits of membership functions [11].The membership function for input criteria and output criteria with boundaries value for each linguistic value optimized by genetic algorithm.The result boundaries of membership function used for upwelling prediction.The fuzzy set membership function for the input criteria is shown in Figure 1 until Figure 3, while the fuzzy set membership function for the output criterion is shown in Figure 4.

Fuzzy Inference System
Tsukamoto FIS establish a rule-based in the form of "if-then".The first step in calculating the Tsukamoto FIS method is to establish a rule-base.The next step, calculated degree of membership in accordance with the rules that have been made.Tsukamoto FIS rulebased is made with the standards of Class 3 of BMKA under Indonesian Government Regulation No. 82/2001 [10].Once it is known that the degree of membership of each fuzzy rule can be determined the predefined alpha value by using fuzzy set operations [11].There are 8 rule-bases presented in Table 5.The fuzzy inference system method uses several formulas in drawing its conclusions, the one used in the drawing of the Tsukamoto FIS conclusion using the Center Average Defuzzifier formula shown in (1): description: Z = defuzzification value α_p = alpha predicate value (minimum value of membership function boundaries) Zi = crisp value obtained from the conclusion i = number of rule-based

Hybrid Tsukamoto FIS and Genetic Algorithm
The use of FIS Tsukamoto for the prediction process requires the determination of the boundaries of the appropriate fuzzy set membership function in order to obtain accurate prediction results.The limits determined automatically by using a genetic algorithm.The genetic algorithm will look for the combination of the most optimal membership function boundaries value to make predictions with great accuracy.Stages in the genetic algorithm in its application have several stages to solve the problem, namely chromosome representation, population initialization, fitness value count, reproduction process consisting of crossover and mutation process, and selection process [12].

Chromosome Representation Process
In this study, chromosomes were formed with Real-Coded Genetic Algorithms (RCGA).RCGA uses real numbers in an array as a chromosome representation for membership function boundaries [13] which was designed to find the solution optimization of the problem.
In one chromosome there are 15 genes.Each gene represents the membership function boundaries of each input criterion and output criteria on modeling with Tsukamoto FIS.The value of each gene will be generated according to the range specified in Table 2.The illustration of the chromosome representation is shown in Figure 5.After randomly generating chromosomes, the gene values on chromosomes are sequenced ascending.The gene values will be sorted according to the segments modeled on the chromosome representation.The chromosome sequencing results can be seen in Figure 6.

Population Initialization Process
The first stage when the genetic algorithm run is the initialization of the population.The number of populations in genetic algorithms is often called the popSize variable.For example, the population will be formed by 3 chromosomes or it can be said number of population amounted to 3 starting from C1…Cn, where n=3.Illustration of population initialization is shown in Table 6.The population number or popSize used in this study amounted to 200 according to Wahyuni and Mahmudy [5].The size of the population will affect the computation time so that too much amount will result in inefficient computational time.

Fitness Function Calculation
The fitness function is used to measure the accuracy of the solutions obtained [12].The process of calculating the fitness value, in this case, is done by applying Tsukamoto FIS.By applying Tsukamoto FIS, it can be known as the chromosome that produces the greatest precision of prediction value.Precision value of predicted results of Tsukamoto FIS sought by looking at the match between the prediction results (A) with the actual data (n).The formula for calculating the fitness value () is shown in (2).The Tsukamoto FIS calculating process is described in previous studies [5].

Selection Process
The selection method that will be used is the Roulette wheel selection, which will select the parent to pass to the reproduction process by taking into account the probability value of each parent [14].The calculation of the probability values of each chromosome is shown in Table 7.The first step in the Roulette wheel selection is to calculate the probability and cumulative probability value of each chromosome and offspring.After that, there will be randomly scored between [0, 1] twice to determine the chromosome to be a parent with the provision C[n-1]<R<C [n].Roulette wheel selection results are shown in Table 8.
Figure 7. Examples of extended intermediate crossover processes

Mutation Process
The mutation technique used a simple random mutation.The process of this mutation begins by determining the parent (p)  = ( 1 , . . .,   ) and random value (α) between intervals [-0.1, 0.1] then produced offspring ()  = ( 1 , … ,   ) using (4) [16].An example of a simple random mutation process is shown in Figure 8.The values of cr and mr used in this study are based on previous research done by Grefenstette [17] and Wahyuni & Mahmudy [5] is cr 0.95 and mr 0.05.The combination of cr and mr values is considered optimal because it multiplies the individual crossover results rather than mutation.Suppose the cr used is 0.95, so the number of offspring is generated as much as:  =  ×  = 0.95 × 3 = 2.85 = 3.

Elitism Process
The second selection process is used to select the chromosomes that will pass to the next generation using elitism.This selection method selects the chromosome to pass to the next generation by sorting the fitness value from the largest to the smallest [18].After that will be selected some chromosomes with the highest fitness value.Selection results with elitism are shown in Table 9.

Stopping Condition
To stop the GA iteration process while determining the best solution, one of the conditions used for stopping state is to take a value as a regeneration limit, for example, to be used limit to n generations [19].Based on previous studies that have used genetic algorithms for optimization of Tsukamoto FIS, used number of generations used as many as 300 [5].

Results and Analysis
The solution generated from the calculation of the genetic algorithm is a chromosome that has the best fitness value as the membership function boundaries in Tsukamoto FIS.Optimization results of membership function boundaries for input criteria is still same as with the previous model because of its boundaries according to the Class 3 Standard Quality of Water Quality (BMKA) [10].Optimization successfully is done in membership function boundaries for output criteria, there are shown in Figure 9.

. Calculation of Prediction Results Accuracy
Upwelling prediction results using hybrid Tsukamoto FIS and genetic algorithm in Maninjau Lake are shown in Table 10.The table shows the precision calculation of the prediction results between FIS Tsukamoto and hybrid Tsukamoto and GA.The result using Tsukamoto FIS haven't optimized on membership function boundaries of input and output criteria.Furthermore, the membership function boundaries of input and output criteria was optimized by genetic algorithm and the optimal optimization was done at membership function boundaries for output criteria.Based on the prediction results shown in Table 10, there are only one false prediction using hybrid FIS Tsukamoto and GA, so it can be seen that the proposed method is better than Tsukamoto FIS.The percentage of correct prediction using Tsukamoto FIS and genetic algorithm methods are 94%.That result is better than using Tsukamoto FIS without optimized which only has accuracy 47%.The time needed to run the FIS-GA hybrid results is only 16 seconds difference with the FIS running time.
There are several things that affect the error of the prediction results, one of which is the lack of a number of criteria, the number of rule base that has not been optimal, and the amount of test data that is lack detail because it is still in annual form.To get better prediction result can be done by adding more input criterion for the determinant of upwelling.In addition, the fuzzy rule base can be optimized with genetic algorithms [20] or with particle swarm optimization (PSO) [21].The test data used can also be supplemented with daily water quality measurement data to make the prediction result more accurate.

Conclusion
Integrating Tsukamoto FIS and the genetic algorithm can be used to optimize membership function limits for upwelling prediction in Maninjau Lake, West Sumatra.After modeling and testing, the optimal membership function limits to predict upwelling using historical data from 2001 to 2017 from six location monitoring of water quality in Maninjau Lake.Obtained precision value from the predicted with the result of 94%.The precision value can be quite good as the test data is still in the form of annual average data.In the next research we will optimize the fuzzy rules using genetic algorithm or PSO.In addition, the test data will be made into a daily, so it can be used to predict upwelling in the daily period.

Figure 1 .
Figure 1.Membership functions for water temperature

Figure 5 .
Figure 5. Illustration of chromosome representation

Figure 8 .
Figure 8. Example of simple random mutation process

Figure 9 .6. 1
Figure 9. Optimization results of membership function boundaries for output upwelling

Table 2 .
Class 3 Standard Quality of Water Quality (BMKA)

Table 5 .
Rule Base

Table 7 .
Individual Probability Calculation Results

Table 8 .
Results of Roulette Wheel Selection

Table 9 .
Elitism Selection Result

Table 10 .
Prediction Results