Applying fuzzy proportional integral derivative on Internet of things for figs greenhouse

ABSTRACT


INTRODUCTION
Indonesia is an agrarian country where most of the population living as farmers. Fertile nature, vast expanses of land and a tropical climate are very supportive of farming without any restrictions. But lately productivity in the agricultural sector is very lacking, due to changes in extreme climatic conditions that cause plants cannot grow optimally. While optimizing productivity in the agricultural sector will provide extraordinary benefits, both to support food, food sovereignty, public welfare, and create a country that can produce the largest food output in the world, the agricultural sector is one of the largest in maintaining the national economy.
One of the efforts undertaken by the community to strengthen the economy at this time is to move to cultivate some rare fruits and have promising business value such as figs. Figs village in the Semarang area was developed in the village of Karang Tempel, East Semarang, where figs plants have been developed since about 4-5 years ago. Figs is a fruit that contains carbohydrates, protein, and oil. Apart from being a food supply, figs can also be used for health because they contain alkaline substances that the body needs. The active substance inside resembles a cleanser that can be used to treat external wounds [1].
In order to increase the productivity of figs, various planting media have been developed in Indonesia such as the use of greenhouses in the treatment of figs have things to consider such as water needs, sunlight, temperature, and humidity, because figs are not native plants of Indonesia Based on the description above, this research will create a control and monitoring system by applying fuzzy proportional integral derivative (FPID) as artificial intelligence on Internet of things (IoT) for figs plants in greenhouses [2]- [4]. Using of the fuzzy Tsukamoto method serves to monitor air conditions and soil conditions and then coupled with proportional integral derivative (PID) control to control air temperature, air humidity, and soil moisture so that it is always in the ideal condition of figs in greenhouse. By implementing FPID on IoT for greenhouse, the development of figs in greenhouse can be optimized because air and soil conditions can be maintained in ideal conditions.

RESEARCH METHOD 2.1. Internet of things
IoT is a very promising technological development to optimize life based on smart sensors and smart equipment that works together through the internet network [5], [6]. Using computers in the future is able to dominate human work and defeat human computing capabilities such as controlling electronic equipment remotely using internet media, IoT allows users to manage and optimize electronics and electrical equipment that uses the internet. We can utilize the IoT system for monitoring and control of the greenhouse environment [5], [7]- [10]. This speculates that in the near future communication between computers and electronic equipment is able to exchange information between them thereby reducing human interaction. This will also increase the number of internet users with various internet facilities and services [6], [11]. Design of IoT system on greenhouse shown in Figure 1. Description: − Microcontroller has input and output, for input using DHT11 sensor and soil moisture sensor, both sensors are in greenhouse. − From two sensors get data which is then sent to the microcontroller to be processed. − After data is processed, data becomes the value of the output status determinant, the first output in the water pump to meet water needs and the second output is an air controller that serves to neutralize temperature and humidity of greenhouse. − Data that has been processed in the microcontroller is also sent to the adafruit.io server in order to monitor the state of air temperature, humidity, and soil conditions in greenhouse. − After sending to adafruit.io server, the server will display data on users using the website.

Cloud computing
A simple understanding of cloud computing is computing happens on the internet. The internet is generally visualized as cloud, so the term "cloud computing" for computing is processed through the Internet. Users can access database resources via internet from anywhere, as long as they need. In addition, databases in the cloud are very dynamic and can be scaled. cloud systems to enable data-based services and overcome the challenges of complexity and resource demands for online, offline data processing, storage, and analysis [10]- [13]. The best example of cloud computing is Google Apps where any application can be accessed

MQTT protocol
The message queuing telemetry transport (MQTT) protocol is a simple, lightweight publish/subscribe communication protocol designed for devices with limited capabilities. MQTT has the ability to be able to support an IoT device. MQTT in principle has an information exchange center between subscriber and publisher namely MQTT broker. Publisher is sending data such as sensors while the subscriber is sending data such as humans [6], [12]. Concept of MQTT shown in Figure 3. There are MQTT Clients and MQTT brokers or can also be called MQTT servers. When the MQTT client wants to broadcast or publish some information to the MQTT broker, the client needs to make a connection with the MQTT broker. The client asks the broker to connect, then the broker sends a connection request notification to the client after a connection is made between the client and the MQTT broker. Clients can send or publish information to brokers [15], [16]. The MQTT protocol is divided into several features namely: a. Publish and subscribe provide one to many messaging. b. Has three levels of qualities of service (QoS): "At most once", messages will be sent using the best TCP/IP network. Message missing or duplication is likely to occur "at least once", the message will be delivered even though duplication can occur. "Exactly once", the message can arrive exactly once. c. Uses TCP/IP connections for basic connections.

539
Fuzzy logic is a branch of computer science that studies the value of truth that has a lot of value [6], [17]. It is different from the truth value in classical logic which is 0 (false) or 1 (true). Fuzzy logic has a real truth value in the interval [0,1]. Fuzzy logic was first developed by Lotfi A. Zadeh, an Iranian American scientist from the University of California at Berkeley. However, fuzzy logic was more developed by Japanese practitioners. Design of triangle curve shown in Figure 4.
In the fuzzy Tsukamoto method, each consequence of IF-THEN rules must be presented with a fuzzy set with a monotonous membership function. Tsukamoto's fuzzy logic was chosen because it gives an output of sharp individual rules [18]- [20]. As a result, the output of the inference results from each rule is given explicitly (crisp) based on α-predicate (fire strength), then the final result is obtained using a weighted average. Stages of how fuzzy Tsukamoto works: a. Fuzzification The process of converting system inputs that have explicit values into linguistic variables uses membership functions stored in the knowledge base. b. Formation of a fuzzy knowledge base (Rule in the form of IF-THEN). c. Inference engine Process of converting fuzzy input into fuzzy output by following the rules (IF-THEN Rules) that have been set on fuzzy knowledge. d. Aggregation There are often cases where there is more than one rule. This means that the results of the implication are worth more than one. Therefore, we need to combine all the results of these results into one single fuzzy set. The aggregation method used here is the MIN method. e. Defuzzification Process for converting fuzzy output obtained from an inference engine into an explicit value using the membership function that is in accordance with when Fuzzification was performed.

Proportional integral derivative control
Proportional integral derivative (PID) control is a control system that has long been used in industry or the military. 90% of industrial equipment already uses PID control because it is easy and simple to use. The use of this PID aims to stabilize the output speed in the form of a water pump and air controller [4], [21]- [24]. The advantages of using PID controls are: − If using a relay can only control Output with active and inactive status only. However, if using PID control, the status control is not active and no longer active, but with a slow, normal, and fast status. Using the PID control can be used separately or together and not use any of the P, I or D components [25], [26] shown in Figure 5. Proportional control Proportional control has an output that is proportional to the error signal (the difference between the intended value and actual value, error). Changes in input will affect output by its multiplying constant. The proportional control equation is formulated as: Description: Kp = Proportional parameters e = error u = is an output of values relative to time (t) − Integral control Integral control has a function to eliminate the steady-state error to zero. If a plan does not have an integrator element (1/s), the proportional controller cannot be able to guarantee that system output will be exactly according to desired response, so an integral controller is needed. The integral control equation is formulated as:

Derivative control
Output value of derivative is differential, derivative control using speed of error signal changes as a control parameter. If there is no change in error signal, output of derivative control will not change. The derivative control equation is formulated as: Description: Kd = Proportional parameters e = error u = is an output of values relative to time (t)

RESULTS AND ANALYSIS
Implementation is the stage carried out to implement a system that has been built in accordance with the system design. The following is an interface display of the IoT system on the greenhouse that has been developed based on the web shown in Figure 6. Figure 6. IoT data monitor dashboard on the greenhouse Information displayed by the Adafruit IO dashboard to monitor data from IoT in the greenhouse. Data displayed in system are soil moisture, air temperature, humidity, water pump status, air controller status, and defuzzification value from calculation results that have been made. The value of humidity and air temperature obtained from DHT11 sensor and soil moisture values obtained from soil moisture sensor. Three input variables will be input from the fuzzy process. To get the defuzzification value of three variables will be processed on the rule base and inference engine. As a result of defuzzification of the pump into a setpoint value for PID control, PID control is used to control the speed of the water pump and the air controller to keep it stable so that the speed suddenly increases or decreases dramatically, as a pump speed test without using PID and using PID is shown in Figures 7 and 8.
In Figure 7 the pump speed that does not use PID control so that to adjust pump speed it still looks rough in an increasing and decreasing position. Very different if you use a PID control as shown in Figure 8. In Figure 8 is the pump speed using PID control. PID tuning using a trial-error method with the simulation conditions used values of Kp = 2, Kd = 0.03, Ki = 0.2 with t = 0.10s and the setpoint of the results of defuzzification will produce 370 that are close to the setpoint number.

CONCLUSION
The system developed to implement FPID on IoT installed in greenhouse has run according to expectations. With the presence of IoT air and soil conditions can be monitored in real-time, process of watering also runs according to needs of the figs with real-time. By applying FPID as artificial intelligence to IoT installed in a greenhouse, the development of figs in the greenhouse can be optimal because air and soil conditions can be maintained in ideal conditions.