Fuzzy logic decission maker for automatic feeder and water quality monitoring system

Received Apr 29, 2020 Revised Nov 11, 2020 Accepted Jan 1, 2021 Feeding is one of the most important factors in vanammei shrimp culture. Feeding time must be scheduled regulary and it is prohibit from being late. Because it can affect to the development and growth of vanammei shrimp. The Research of monitoring and control system of vanammei shrimp feeding continues to be developed. The development of hardware and software in this study prioritizes monitoring of pH conditions, oxygen levels, and pond temperatures. The measurement results of pH, oxygen levels and pond temperature can be used as decision makers for vanammei shrimp feeding schedules. The decision making system using the Fuzzy Logic method. The development of control devices for feeding aims to set a schedule for feeding automatically. The use of monitoring devices and automatic Feeder control of shrimp feeding can reduce the accumulation of leftover shrimp feed, so that feeding can be more efficient.


INTRODUCTION
Vanammei Shrimp is one of the fishery commodities in Indonesia which has great potential to be developed, and also having the potential that is expected to improve the economy of Banyuwangi residents. According to the Aquafarmer, the feed management very helpful for the aqua farmer, because the experience in feeding is still lacking and the dosage has not been calculated correctly, the aquafarmer can compare the feeding method they use with the material provided. Disolved Oxygen (D)) or Oxygen content in water will decrease at night so that the feeding at night should be reduced in order to keep Disolved oxygen level in the normal value. And this is become on of the problem that need to be solved [1,2].
There are several things which influences the growth of fish or shrimp such as dissolved oxygen, temperature, salinity, pH phytoplankton stability and others were in the suitable range for shrimp growth, and some studies also reported about how to increase the production of fish and shrimp by using the intensive management like application of high stocking density, high quality and quantity of commercial feed, intensive aeration and others input. In this paper we offer new system of feeding management which are control automatically and also based on the real time condition of the feeder machine [2,3].

RESEARCH METHOD
The Feeding process of vanammei shrimp which proposed by this research is using fuzzy method in decision making. [4,5] The decision is based on three sensor input, temperature, pH & oxygen level in pond's water. The data obtained by the sensor will be process based on set of rules. The final decision is to power on & power off electrical motor in the automatic feeding machine. In this system we use several method and device as follows:

Feeding management
The Feed is the important component in shrimp cultivation and have big impact at shrimp's growth. Therefore, the substance of feed and the method of its cultivation should be well balanced. Bad feed management will impact to durability of the shrimp, which will made it's susceptible to disease. Another important factor for feeding process is dosage, time & response of the shrimp.Too much feed will made another waste in shrimp's ponds & will impact to water quality. Table 1 is the feeding guidance, based on the survey in Banyuwangi.

Arduino UNO
Arduino is an open source prototyping platform with easy to use hardware boards and software. User can give the input to the arduino boards through many sensors and through internet messages. arduino Boards have revitalized the automation industry with their easy to use platform where everyone with little or no technical background can get started with learning some basic skills to program and run the board.There are some basic features like PCB layout design, size, number of analog pins and breadboard friendly nature that make them different from each other. In terms of coding, all these boards are programmed in Arduino IDE software and you don't need to attach extra components or devices to put them in the running condition. Everything is already built in the board that makes this device readily available [6,7]. The example of Arduino board is shown in Figure 1.

The sensors
The DS18B20 temperature sensor is a digital temperature sensor which have high accuracy, 0,5°C on the range-10°C until +85°C. Temperature sensor generally need ADC and several pin port at microcontroller, but DS18B20 didn't need ADC to communicate with microcontroller and only need 1 wire. pH meter is a tool used to display concentrate of hydrogen ion (pH) which originated from "Power of Hidrogen" lateness. pH valued 7 stated that solvent in neutral condition. pH Value below 7 stated that solvent which have high acid, and pH value above stated salvent alkali. The scale value used is between 1 and 14. To measure pH using Arduino, will need pH sensor which have accuracy 0.1 at 25 C degree temperature [8].
pH is an important limiting chemical factor for aquatic life. If the water in a stream is too acidic or basic, the H+ or OH-ion activity may disrupt aquatic organisms biochemical reactions by either harming or killing the stream rganisms. pH is expressed in a scale with ranges from 1 to 14. A solution with a pH less than 7 has more H+ activity than OH-, and is considered acidic.The decision is based from the 3 inputs of sensors like Temperature, pH and Oxygen level from the water ponds. Each of data will be procees based on the specific rules. Fuzzy logic have several components, like the set of fuzzy, membership function, fuzzy membership operator, fuzzy interference & defuzyfication. The fuzzy logic rule is displayed in Figure 2.

Fuzzy logic takagi sugeno
This Method introduce by Takagi-Sugeno-Kang in 1985. The Fuzzy Interference System rules are a toolbox for building fuzzy logic systems based on the Sugeno Method. The main characteristic of the system is the flexibility, this help user modify the Data System (Dinamic System) easily can be use for every type of platform (Portability) and also working for multi operating system. [10,11]. One of the application that has developed by fuzzy logic is Fuzzy Inference System (FIS), FIS is the computation system that work based on the fuzzy logic principal.for example for determining the production of the stuff, decision support systems, data classification systems, and so on.
The system's function is to get decision through certain process using interference rule based on fuzzy logic. Fuzzy interference system have four step, the first step is fuzzification, and the second is Fuzzy logic reasoning. The third is knowledge base which have two parts data base & rule base. The database contain function of fuzzy membership which related with variable linguistic values. The rule base is set of rule which contain implication of fuzzy [10,11]. The steps of fuzzy interference system is shown in Figure 3.  [12] There are some benefit of Takagi-Sugeno method that can be explain as follows: − More efficient in computation problem − Work best for linear techniques − Work best for the optimation and adaptive techniques − Ensure the continuity of output surface Sugenos's fuzzy system improve weakness of origin fuzzy system. It ad simple mathematics calculation as a part of THEN.In this transformation, fuzzy system have Weighted Average Values inside fuzzy rule IF-THEN.Generic formula for fuzzification using Fuzzy Inference System TakagiSugeno-Kang method [11], as (1), (2), (3).

Membership Funtion a. Cold
Annotation: a: The smallest domain value which have membership degree "1" b: Domain value which have membership degree "1" c: The biggest domain value which have membership degree "1" x: Input value, will be transformed to fuzzy number The input from defuzzification process is a set of fuzzy which obtained from composition of fuzziy rules, while generated output was a number of in the set of fuzzy. If given a set of fuzzy in a certain range, then output must be generated. Using Sugeno's method, defuzzifikasi was done with searching of weighted average, as (2). General formula for dufuzzification using metode Fuzzy Inference System TakagiSugeno-Kang, as (4).

Feeder and monitoring system hardware
Arduino Uno Board is a microcontroller module that functions to control the performance of the device by connecting pins from Arduino to several sensors, or other devices. [13,14] Wemos d1 r2, a WiFibased module which deliver data from the sensor in to the web server. To connect with Arduino, Wemos D1 Mini requires a TX and TX connection, and a voltage of 5V. The design of hardware circuit made is shown in the Figure 4. The automatic feeder consist of several peripheral such as the Arduino uno, wemos and sensors (pH, Dissolved Oxigen and Temperature. Each of this peripHeral has their own function. Arduino is a hardware device that has an IC program that has been embedded with the Arduino boatloader. This IC program will control all activities in the designed control system [13,14]. Both sensor readings, input output, data communication between Arduino and other devices. Wemos D1 mini is a WiFi-based development board module Wemos D1 Mini use as bridge between data sent by the computer and displayed on the LCD Wireless display [15,16]. The Dissolved Oxygen sensors used to measure the oxygen level in water that will reflected the water quality. DO [17] The working principle of the pH sensors is detecting electron in the sample, the more acidic the liquid is and the fewer electrons are detected, the more alkaline the liquid sample will be. And the Temperature Sensor DS18B20. The characterization of the ds18b20 temperature sensor is done by comparing the sensor output value (digital value) with the value on the mercury thermometer [18,19].

Monitoring system
The Monitoring system has principles to allow user to capture data, process and disseminate information in systemic. Monitoring will be implement periodaclly in regular as the feeding time. We use MariaDB as database system, while the web server is using framework codeigniter MariaDB, which is the development version of MySQL and completely compatible each other. MariaDB was developed from MySQL source, then further developed by many developer, from community until enterprise so that it offer better performance and less bug than original MySQL. MariaDB is an implementation of relational database management system which distributed under license GPL (General Public License) [20].

RESULTS AND DISCUSSION
Fuzzification pHase is an early step of establishment of fuzzy logic method. This phase give out membership function which created in implementation of fuzzy logic in vanammei shrimp automatic feeder [21]. There are 3 function of membership function.

Membership function of temperature
The membership function of temperature have 3 condition, cold normal & hot temperature. The design of fuzzification sets of temperature as Figure 5.

Membership function of pH
The membership function of pH have 3 condition, acid, normal and alkali. The design of fuzzification sets of pH as Figure 6.  The membership function of these 3 parameter is rule for feeding, due to this parameter is used as base of automatic feeding process. In this fuzzy process, it's important to create sets of rule, as known as "rule". The rule is contain several possible condition might be occurred along with reaction after from that condition. The rule tables use as reference of the automatic feeder to take action of Water Pump Control running automatically. We get the value of water temperature, pH and Oxygen Level by using the governmet reference and the result of survey around the Banyuwangi Aquafarmer. The rule is show as Table 2.

Automatic feeder control
The Hardware system consist of several parts, each part of this system is related to other to decide the output result based on what the sensors detect like the temperature, pH and Oxygen level. The hardware circuit prototype made is shown in the Figure 8. Information: a. Arduino uno is a microcontroller module with functions to control the performance of the prototype by combining pins from Arduino to several sensors and components. b. Operation Control, the type of Operation Control used is the 3x4 Keypad where Operation Control is used as a regulator of blurred distances and motor turn times, 9 keys keypad, each button has data transmission in different forms, the data is used to be a reference to microcontroller in distinguishing the command execution button. c. DS18B20 Temperature Sensor, is a sensor that detects the pond temperature. This sensor requires a maximum power of 5 volts. d. Sensor pH-4502C, serves as a detector of ponds pH in order to determine the acidity of pond water for shrimp growth and conditions for feeding. e. Dissolved Oxygen sensor, functions as a detector of oxygen levels in the pond, for DO sensors have a module that is connected to 3 signal pins, VCC and GND. f. DC relay driver: used as a motor control switch, this relay module requires a 5 Volt DC voltage.
g. Wemos R1 R2, a WiFi-based development board module that aims to send sensor data to the Web server.
In order to connect with Arduino, Wemos D1 R2 requires an rx and tx connection, and a voltage of 5V.

Web monitoring
For the monitoring website is built using the PHP using the Code Igniter Framework and the website display using the CSS Bootsrap Framework. And in the Figure 9, we can see the monitoring result from the automatic feeder Figure 9. Web monitoring This web page dashboard shows the Monitoring value of Temperatures, pH, and Oxygen levels from automatic feeder. The output of this automatic feeder and monitoring system is shows in the website, we can also download the monitoring report grapH in the PDF format as shown in Figure 10. So, it will cut the time doing monitoring by coming in the fish farm and this sytem help the aquafarmer to monitor the ponds in realtime.

CONCLUSION
The membership function of 3 parameter is provision for feeding process, due to this parameter is used for base of automatic feeding process. The fuzzy process need to be create with several rules, which known as "rule". The rules is contain several confition might be occur along with the reaction after that condition. The prototype that has been made is used to determine the impact of feeding on pond conditions so that they can make decisions using the Takagi Sugeno fuzzy logic method in the form of an action on the auto feeder so that the next feed is not excessive, where to get the sensor value will read every 30 minutes to determine the feeder decision. The function of temperature, pH and oxygen diffusion sensors is used to determine the condition of the auto feeder on using the Sugagi Takagi method. Wemos is used for serial TX and RX communication, so that the data from sensor readings can be displayed in web monitoring via WiFi.