Implementation of dataflow programming based Fuzzy Logic algorithm for gas concentration index in around of Sidoarjo mudflow , Indonesia

Sidoarjo mudflow or known as Lapindo mudflow erupted since 2006. The Sidoarjo mudflow is located in Sidoarjo City, East Java, Indonesia. The mudflow-affected area has high air pollution level and high health risk. Therefore, in this paper was implemented a system that can categorize the level of air pollution into several categories. The air quality index can be categorized using fuzzy logic algorithm based on the concentration of air pollutant parameters in the mudflow-affected area. Furthermore, Dataflow programming is used to process the fuzzy logic algorithm. Based on the result, the measurement accuracy of the air quality index in the mudflow-affected area has an accuracy rate of 93.92% in Siring Barat, 93.34% in Mindi, and 95.96% in Jatirejo. The methane concentration is passes the standard quality even though the air quality index is safe. Hence, the area is indicated into Hazardous level. In addition, Mindi has highest and stable methane concentration. It means that Mindi has high-risk air pollution.


Introduction
Air is a natural resource that played important role in the lives of human and other living things [1].The air quality must be monitored for the maintenance of human health and protection of other living thing [2].The air was around in everyday life is called ambient air [3].One of the areas that monitored by ambient air pollution is the Sidoarjo mudflow-affected area [4].The mudflowaffected area is an area that closes to hot mudflow accordance with the mapping of the Muds Area Control Map (Sidoarjo Mudflow Management).
The Sidaorjo mudflow or known as Lapindo mudflow erupted in Porong district, Sidoarjo city, East Java, Indonesia.The Sidoarjo mudflow is located at 900 km east Jakarta (the capital city of Indonesia) or 14 km south of Surabaya (the capital of East Java).The mudflow erupted because of drilling activities for gas exploration sine 2006.The mudflow has enormous volume and spread quickly.Hence, it covers surrounding area and cause air pollution [5].
Indonesia has six national standards for air quality criteria in ambient air, such as: carbon monoxide (CO), nitrogen oxide (NOx), sulphur oxide (SOx), hydro-carbon (HC), ozone (O3), and dust particles [6].Carbon monoxide (CO) and dust particles are the important gas parameter in the mudflow-affected area.Beside of that, methane (CH4) is a dangerous air pollutant in the mudflow-affected area [7].Moreover, The air pollution can cause respiratory disturbances.Respiratory disturbance is caused by high concentration of air pollutant parameters.It can make adverse effects on the human body and hamper the daily activities [8].
Therefore, the mudflow-affected area has high air pollution level and high health risk.Numerous researchers have observed the concentration value of air pollution parameters based on Ambient Air Quality Standard and Unmoved Source Emission [9,10].However, that is less effective because there is not dangerous levelling while the concentration of air pollution crossing the standard.Therefore, in this paper was implemented a system that can categorize the level of air pollution into several categories.The air quality index can be categorized using fuzzy logic algorithm based on the concentration of air pollutant parameters in the mudflow-affected area.Furthermore, Dataflow programming is used to execute parallel execution and pipelining technique [11].It is required in the processes of data acquisition of sensors, data processing of sensors, and fuzzy logic algorithm.

Air Quality Index
The air quality index is used to determine the air quality status.AirNOW is the international standard of air quality index used.US Environmental Protection Agency (EPA) publishes it [12].The categories of air quality index those shown in Table 1.

System Overview
The system is consisting of hardware part and software part.The hardware part has three kinds of sensors: 1) MQ4 sensor, which is methane gas sensor, 2) MQ7 sensor, which is CO gas, and 3) Dust sensor SHARP MATEC Web of Conferences 154, 03012 (2018) https://doi.org/10.1051/matecconf/201815403012ICET4SD 2017 GP2Y1010AU0F, which is a sensor to detect dust particles.All of sensors are connected to NI MyRio through analog input pin is shown in Figure 1.NI MyRio also used as microcontroller.Therefore, NI LabVIEW is used for software part.There are the function of NI LabVIEW in this system: 1) It used to display the value of gas parameters (methane, CO, and dust), 2) It is stored the data into .csvformat file on USB flash-disk through USB port on MyRio, 3) It is displayed the result of fuzzy logic algorithm.

No
Range Level

Linear Regression
Linear regression is used to determine the concentration of each gas parameters.The value of gas parameters is obtained from datasheet on each sensor.The concentration of methane gas, CO gas, and dust gas can be seen in Equation 1, Equation 2, and Equation 3, respectively.Where, y is the gas concentration in units of part per million (ppm) and x represents the shifting of (Rs/Ro) ratio.Rs is resistance at 1000 ppm gas parameters in ambient air while Ro represents sensor resistance in another gas. = 1021 −2.7887 (1)  = 96.311−1.239  (2)  = 0.172 0.0999 (3)

Fuzzy Logic Algorithm
The fuzzy logic algorithm consists of the following steps.

Defining the variables
The system uses three gas parameters as input variable (methane, CO, dust) to calculate air quality index.However, CO and dust were used as input fuzzy.It is based on air quality criteria [6].While, air quality index is used as output fuzzy.

Fuzzyfication
The fuzzyfication is used to transform the crisp input into fuzzy input.The membership function must first be determined for each input and output variable.The membership function for CO, dust, and air quality was already adopted by international standard of air quality index as shown in Figure 2, Figure 3, and Figure 4.

Fuzzy Interface Rules
The rules are used to determine the input and output of fuzzy logic algorithm.The rules based 7x7 membership function those shown in Table 2. Fuzzy Mamdani or known as Min-Max Method is related to process the rules.

Defuzzyfication
The center of area (CoA) method is used in this step.It is used to get a crisp output.The method calculates the weighted average of a fuzzy set.

Linear Interpolation
The linear interpolation used to calculate air quality index manually by using Equation 4. Where, I is air quality, Ia is upper limit of air quality, Ib is lower limit of air quality, Xa is upper limit of ambient air, Xb is lower limit of ambient air, and Xx is air measurement results.Furthermore, the calculate result will be compared with the result of fuzzy logic algorithm.

The implementation and Testing Result
Figure 5 shows the implementation of all system on Dataflow programming.Firstly, USB flash drive folder is used to call directory path of fuzzy logic file (.fs) that is saved in USB flash-disk.Then, FL Load Fuzzy System will load and save the fuzzy logic file (.fs).Local variable will call the output data of MQ4 sensor, MQ7 sensor, and Dust sensor.Furthermore, FL Fuzzy Controller will process the data.There are fuzzycation process, fuzzy interface rules, and defuzzycation process in the FL Fuzzy Controller.
The process of MQ4 sensor, MQ7 sensor, and Dust sensor to determine the concentration of methane, CO, and dust are shown in Figure 6, Figure 7, and Figure 8.The linear regression method (Equations 1-3) is used in these processes.The value of each sensor output in ppm will becomes an input on FL Fuzzy Controller.The system was already implemented in three areas, which closed to Sidoarjo mudflow.The areas are: 1) Siring Barat, 2) Mindi, 3) Jatirejo.The result of air quality test in Siring Barat, Mindi, and Jatirejo are shown in Table 3, Table 4, and Table 5, respectively.However, there is a change in each methane concentration result.It means that MQ4 sensor produces different methane concentration (Rs value) in each area.Therefore, the comparison between methane concentration and (Rs/Ro) ratio is necessary to determine the influence of methane concentration in each area.

Fig 10. Comparison between methane concentration and (Rs/Ro) ratio
Figure 10 shows the linear regression of methane concentration and (Rs/Ro) ratio.97.37% of methane concentration is influenced by (Rs/Ro) ratio while 2.63% of methane concentration is influenced by other variables in Siring Barat.83.75% of methane concentration is influenced by (Rs/Ro) ratio while 16.25% of methane concentration is influenced by other variables in Jatirejo.77.08% of methane concentration is influenced by (Rs/Ro) ratio while 22.93% of methane concentration is influenced by other variables in Mindi.The linear regression graph also shows that Mindi has the lowest gradient slope.Therefore, Mindi has highest and stable methane concentration.

Fig 1 .
Fig 1.The hardware of the system

Fig 5 .
Fig 5. Implementation of all system on Dataflow programming

Fig 6 .
Fig 6.Dataflow programming to determine the concentration of methane

Fig 7 .
Fig 7. Dataflow programming to determine the concentration of CO

Fig 8 .
Fig 8. Dataflow programming to determine the concentration of dust

Figure 9
Figure9shows the implementation of fuzzy logic algorithm.The fuzzy interface rules is consist of 7x7 membership function that must be declared.The rules are obtained based on the combination of each input to fuzzy output.The system was already implemented in three areas, which closed to Sidoarjo mudflow.The areas are: 1) Siring Barat, 2) Mindi, 3) Jatirejo.The result of air quality test in Siring Barat, Mindi, and Jatirejo are shown in Table3, Table 4, and Table 5, respectively.

Fig 9 .
Fig 9. Fuzzy logic algorithm on Dataflow programming

Table 3 .
The result of air quality test in Siring Barat

Table 4 .
The result of air quality test in Mindi

Table 3 ,
[13]e 4, and Table 5, all area is indicated into hazardous level.It is caused bymethane concentration passed the standard quality.The standard quality of methane is 0.24 ppm[13].In other words, all area has methane concentration more than 0.24 ppm.

Table 5 .
The result of air quality test in Jatirejo