FROST RISK, IRRIGATION AND FERTILIZATION OPTIMIZATION WITH ARTIFICIAL INTELLIGENCE SUPPORTED AGRICULTURAL SYSTEMS
Full text
FROST RISK, IRRIGATION AND FERTILIZATION OPTIMIZATION WITH ARTIFICIAL INTELLIGENCE SUPPORTED AGRICULTURAL SYSTEMS Köksal GÜNDOĞDU 1 Ali ÇALHAN 2 [email protected] [email protected] ORCID Kimliği: 0000-0001-7694-1841 ORCID Kimliği: 0000-0002-5798-3103 Murtaza CİCİOĞLU 3 [email protected] ORCID Kimliği: 0000-0002-5657-7402 1 Electrical, Electronic and Computer Engineering, Düzce University, Düzce, TÜRKİYE 2 Computer Engineering, Düzce University, Düzce, TÜRKİYE 3 Computer Engineering, Bursa Uludağ University, Bursa, TÜRKİYE
ABSTRACT The ever-increasing world population, inefficient use of limited resources, and the adverse effects of changing living conditions cause the need for food to increase daily. Traditional agricultural methods cannot provide sufficient yields under different environmental conditions and land structures, which reveals the need for more effective approaches in agriculture. With the development of sensor technologies, satellite systems, and artificial intelligence-supported software, precision agriculture applications have gained significant momentum in recent years. This study presents the design of an electronic card developed to optimize the processes of fertilization and irrigation, and protect against the risk of agricultural frost in agricultural areas. The designed system collects data such as soil moisture, temperature, atmospheric pressure, ambient temperature, and humidity, analyzes them with an artificial intelligence algorithm, and accordingly provides frost prevention, water, and fertilizer optimization. The proposed system predicts frost in advance and prevents the negative effects of frost by activating fogging and heating mechanisms. It also performs humidity optimization to prevent negative effects such as microorganism spread, decay, photosynthesis reduction, and pest increase due to air humidity in the agricultural land. In this context, the study offers an integrated precision agriculture solution supported by artificial intelligence to increase agricultural productivity and ensure the sustainability of natural resources. Key Words: Artificial intelligence in agriculture, precision agriculture practice, decision tree algorithm, smart agriculture I. INTRODUCTION The rapid increase in the world population, the inadequate use of our resources, and the negative effects of the changing life structure are among the main problems that humanity must solve. These problems lead to an increase in the need for food. When we cannot use our resources effectively, mankind will face the risk of starvation soon. With the development of technology and especially artificial intelligence in recent years, it is possible to optimize food production. Many organizations and governments have recently carried out serious studies in this field. Today, although traditional agricultural systems and technologies contribute to food production, their contribution to productivity is less than expected due to the structure of the land or the differences in crops in agricultural areas. To increase productivity in agriculture, the concept of Precision Agriculture was first discussed in the late 1980s in the USA, Canada, and some European countries, but it remained only as a concept due to the insufficient development of technology in those years [1-3]. With the development of sensors, satellite technology, data processing capacities in the mid-2000s, and the development of drones, smartphones, and artificial intelligence-supported software after 2010, precision agriculture ceased to be a concept and started to turn into projects used in the field of agriculture [4-6]. The fact that Artificial Intelligence data processing capacity reached its peak after 2020, compared to previous years, has increased the role and effectiveness of Artificial Intelligence in Precision Agriculture applications [1]. Various studies have been carried out to eliminate the most basic problems in agriculture with technology. It has been observed that the PH and mineral structure of the soil change due to unnecessary fertilization [7, 8]. Due to unnecessary irrigation, problems such as water loss up to 50%, energy consumption, rotting of plant roots, and fungal growth have been encountered [9, 10]. In addition, crop losses have occurred due to incorrect detection of agricultural frost [11-13]. All these are the main factors that reduce yields in agriculture. In addition, the spread of microorganisms due to air humidity, decrease in photosynthesis, excessive water intake by the plant, rot and mold, lack of oxygen, and increase in pests due to humidity cause crop losses in agricultural lands [14,15]. It has been
observed in the literature that there are various precision agriculture and artificial intelligence applications to optimize irrigation, fertilization, and agricultural frost events. These applications aim to optimize irrigation and fertilization and to predict agricultural frost. In these applications, the application of irrigation with timing is highly preferred, while for fertilization and agricultural frost, fertilizer application by informing farmers or systems to combat agricultural frost is widely used [16-25]. Depending on the condition of the land, complex environmental conditions, and changing plant species, measurement results are evaluated independently of the land. In addition, various deficiencies are encountered depending on the results, such as obtaining agricultural land information from satellite [12, 13]. It has been observed that the moisture and atmospheric pressure parameters on the land are not taken into account while producing solutions. In this study, an electronic card design has been realized for the acquisition of precision agricultural measurement results and their evaluation with an artificial intelligence algorithm. With this card, atmospheric pressure, soil moisture, soil temperature, ambient humidity, and ambient temperature data are taken from the agricultural land as input. Fertilizer and water optimization is provided according to the ambient conditions, with the water tank and fertilizer tank, and fertilization and irrigation are made according to the needs of the land. In addition, the heating and fogging engine connected to the system helps protect the land from frost. The system uses an artificial intelligence algorithm to trigger fogging and heating actions before and during frost conditions, based on measurement results. The humidity optimization is carried out to prevent the spread of microorganisms caused by air humidity, decrease in photosynthesis, excessive water intake by the plant, rot and mold, lack of oxygen, and increase in harmful insects due to humidity. II.SYSTEM DESIGN A. SYSTEM OVERVIEW As can be seen in Figure 1, the system is designed in three modules. The first part is the “Input” module, where the measurement results are taken from the agricultural land. The second part is the “Data Processing” module, where the measurement results in the Input section are evaluated with an artificial intelligence algorithm, and results are generated. The third part is the “Output” module, where the results produced in the Data Processing are put into practice. Figure 1. Block Diagram of the Designed System
The Input Module contains the atmosphere sensor, ambient humidity sensor, ambient temperature sensor, soil humidity sensor, and soil temperature sensor. The Data Processing Module runs the decision tree algorithm, which is one of the artificial intelligence algorithms, and produces results. The Output Module is where the information from the Input Module is processed by the Data Processing Module and then put into action. It includes a fertilizer and water tank, which is controlled by the Data Processing Module to optimize fertilization and irrigation. It also features a system with a heater, humidifier, and fogging unit to optimize protection against agricultural frost and maintain proper ambient humidity levels. B. INPUT UNIT The Input Unit contains an atmosphere sensor, an ambient humidity sensor, an ambient temperature sensor, a soil humidity sensor, and a soil temperature sensor. Atmosphere sensor is a sensor that can measure from -500m depth to 9000m altitude, according to sea level. This sensor can operate between -40°C and +85°C temperature levels. Thanks to the sensor, the atmospheric pressure of the agricultural land is measured. The soil temperature sensor can measure soil temperature between -55°C and +125°C. It works according to ±0.5°C degree of accuracy. The soil moisture sensor operates with 10-bit sensitivity. It has an operating current of approximately 20mA. It works according to the principle of electrical conductivity between two probes planted in the soil. If the soil is moist, conductivity increases; if the soil is dry, conductivity decreases. The ambient temperature sensor can measure ambient temperature between -40°C and +80°C. It works according to ±0.5°C accuracy. The ambient humidity sensor works within the range of 0% ~ 100% RH. It has ±1% RH humidity sensitivity. C. DATA PROCESSING UNIT In the Data Processing Unit, as can be seen in Figure 2, there is an ATMEGA32U4 microcontroller. There is a Mini USB on the card for programming, and special socket inputs for the sensors. It has a Buzzer and SMD LEDs on it to give a warning. The microcontroller works as an 8-bit. It has a 16MHz operating frequency, 32KB of flash memory, 2.5KB SRAM, 1KB EEPROM, 7 PWM outputs, 26 digital I/O, UART, I2C (TWI), and SPI communication interfaces [26]. The decision-making mechanism uses the decision tree structure, which is one of the artificial intelligence algorithms. Figure 2. The Designed Electronic Board D. OUTPUT UNIT In the Output Unit, there are fertilization and water tanks. There are also electronic valves to control them. As a result of soil analysis, the fertilizers that should be given to the agricultural land are added to the fertilizing tank in diluted form. The system is controlled by the
microcontroller inside, and the liquid fertilizers are given to the drip irrigation system in a controlled manner. In this way, fertilization optimization of the soil is ensured. According to the moisture content of the soil and the decision tree algorithm inside the system, the water tank valves are opened in a controlled manner by the microcontroller, and irrigation optimization is achieved through the drip irrigation system. Figure 3. The Designed Fan Motor System As can be seen in Figure 3, there is a fan system that includes a heater, humidification, and fogging unit to prevent agricultural frost events and to optimize ambient humidity. In this way, according to the results of the data evaluated in the data processing unit, the necessary heating, humidification, and fogging units to increase/decrease the humidity or to prevent agricultural frost are operated in a controlled manner and sent to the system with the help of the fan motor. In this way, agricultural frost or humidity optimization is provided. III. FINDINGS AND DISCUSSION The test system in Figure 4 was realized to test the system shown in Figure 1 in a real environment. After various trials were performed on this system, the operation of the system was observed, and the results were obtained. Machine learning, a sub-branch of artificial intelligence, was used in our system. Decision tree algorithm is preferred among machine learning algorithms. Since our system has an 8-bit microcontroller, the decision tree algorithm makes very fast predictions in real-time applications outside the training process on these processors. Studies on the performance and optimization of decision trees in embedded systems show that trees with a depth of 12 can run with latencies less than 50 ns [38]. In agriculture, the process of improvements and interventions to minimize negative impacts is called optimization[39]. For this reason, we preferred to use optimization titles in the content. Figure 4. Physical Form of the System
A. AGRICULTURAL FROST OPTIMIZATION In the literature, soil temperature and ambient temperature parameters are mainly used in studies on agricultural frost. It has been observed that soil moisture parameter, ambient humidity parameter, and especially atmospheric pressure parameter, due to soil irrigation and other reasons, have not been used [16-25]. In our study, it is seen that effective results are obtained when we measure these parameters and subject them to a decision tree structure. Decision trees are widely used in classification and prediction problems, especially in data mining and machine learning. This method branches the data according to certain characteristics and presents a class label or prediction value at each leaf node. In this way, effective analysis can be performed on large data sets and meaningful results can be obtained [27]. 𝑓(𝑥)=𝑦,𝑖𝑓 𝑥≤ 𝑡∧ 𝑥> 𝑡 𝑦,𝑖𝑓 𝑥≤ 𝑡∧ 𝑥≤ 𝑡 𝑦,𝑖𝑓 𝑥> 𝑡 (1) In equation (1): x=(x1,x2,...,xn) : Input vector (e.g. sensor data) xi: i. property (e.g x1= soil moisture, x2 = air temperature) ti: i. node threshold value yj: class/action (e.g., “Turn on Fan”, “Turn on Fog Motor”) Atmospheric pressure is also an important concept in agricultural frost. The freezing point of water is accepted as 0°C at 1 atm pressure. As the atmospheric pressure changes, the freezing point changes. This change is explained by the Clausius-Clapeyron Equation [28]. ∆ ∆ (2) In equation (2): : Derivative of freezing point change for pressure ΔV: Volume change during phase transition ΔHf : Melting (fusion) enthalpy T: Absolute temperature (Kelvin) According to this equation, when the pressure decreases, the formation temperature (freezing point) of ice decreases.
Figure 5. Phase diagram of pure water between pressure and temperature The relationship between atmospheric pressure and freezing temperature can be seen in the phase diagram between pressure and temperature for pure water, shown in Figure 5. As can be seen in Equation (2) and Figure 5, the formation temperature of ice decreases when the pressure decreases. 𝑓(𝑥)= ⎩ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎧ 𝑀,𝑖𝑓 𝑇≤0 𝑀 ,𝑖𝑓 𝑇≤0 𝑀,𝑖𝑓 ∆𝑃<0 𝑀,𝑖𝑓 𝑅𝐻≥80% ∧ <0 𝑀,𝑖𝑓 𝑇→0 ∧ |𝑇−𝑇 |≫0 𝑀 ,𝑖𝑓 𝑇→0 ∧ |𝑇−𝑇 |≫0 𝑀,𝑖𝑓 𝑇𝑙𝑜𝑤∧ 𝑅𝐻 ℎ𝑖𝑔ℎ 𝑁𝑜 𝐴𝑐𝑡𝑖𝑜𝑛, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 (3) In equation (3): 𝑇: Soil temperature (°C) 𝑇: Air temperature (°C) 𝑅𝐻: Air humidity (% relative humidity) 𝑃: Atmospheric pressure ∆𝑃: Sudden change in atmospheric pressure (derivative) 𝑀: Heater motor active 𝑀 : Fogging motor active The decision tree structure in Equation (3) is executed in the data processing unit. In this way, agricultural frost prevention optimization works successfully by using soil temperature, air temperature, atmospheric pressure, and air humidity data obtained from the input unit.
B. AIR HUMIDITY OPTIMIZATION In the literature, it is seen that the spread of microorganisms, a decrease in photosynthesis, excessive water intake by the plant, rot and mold, lack of oxygen, and an increase in pests due to humidity caused by air humidity [29]. In other words, ambient humidity in agriculture is also an important parameter that contributes to productivity. To prevent the negative effects of humidity, humidity optimization is carried out. The measurement results are applied to the decision tree algorithm as shown in equation (1). The decision tree algorithm for the applied data is shown in equation (4). 𝑓(𝑅𝐻,𝑇 )=𝑀,𝑖𝑓 𝑅𝐻≥80% ∧ 𝑇<5 𝑀 ,𝑖𝑓 𝑅𝐻≥80% ∧ 𝑇≤0 𝑀 ,𝑖𝑓 𝑅𝐻≤40% 𝑁𝑜 𝐴𝑐𝑡𝑖𝑜𝑛, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 (4) 𝑇: Air temperature (°C) 𝑅𝐻: Air humidity (% relative humidity) 𝑓 (𝑅𝐻,𝑇 ): Decision function that determines action based on humidity and temperature inputs 𝑀: Heater motor active 𝑀 : Fogging motor active 𝑀 : Humidification motor active The ambient humidity optimization is achieved by running the decision tree algorithm in equation (4) in the data processing unit. In other words, the humidity value is kept under control within the desired value range. The RHair value here may vary depending on the agricultural product to be grown. Information about this is given in Table 1[30]. Table 1. Recommended Ambient (Air) Humidity Values in Agricultural Production Plant Type / Environment Recommended Relative Humidity (%) Explanation Vegetables (tomatoes, peppers) 60–80 High humidity can increase fungal diseases, so caution should be exercised. Fruit trees 50–70 Moisture control is important during the flowering period. Cereals (wheat, barley) 40–60 Low humidity reduces the risk of disease. Greenhouse environment 70–85 High humidity may be required in a controlled environment.
C. WATER OPTIMIZATION Over-irrigation leads to inefficient use of resources. It also reduces productivity. While 50% water saving is achieved in controlled irrigation, it leads to efficient and economical use of energy resources. While unnecessary irrigation disrupts the PH and mineral balance of the soil, it also leads to root rotting of plants [31, 32]. Irrigation according to soil moisture level is an effective irrigation method. Recommended soil moisture ranges in agricultural lands are shown in Table 2[33, 34]. Table 2. Recommended Soil Moisture Ratios in Agricultural Lands Plant Type Recommended Soil Moisture Range (%) Explanation Vegetables (tomatoes, peppers, etc.) 60–80% Constantly moist, but no puddles Fruit trees 50 – 70% Flowering and fruiting critical Cereals (wheat, barley) 40–60% Important during germination and sprouting Legumes 40 – 60% Excess water can cause root rot Greenhouse plants 70–85% Requires high humidity in controlled environment The measurement results are applied to the decision tree algorithm as shown in equation (1). The decision tree algorithm for the applied data is shown in equation (5). 𝑓(θ)= 𝑀,𝑖𝑓 θ<θ 𝑀 ,𝑖𝑓 θ>θ 𝑁𝑜 𝐴𝑐𝑡𝑖𝑜𝑛,𝑖𝑓 θ≤θ≤θ (5) θ: Soil moisture content (%) θ: Minimum moisture threshold (For example, %30) θ: Maximum humidity threshold (For example, %70) 𝑓(θ): Decision function 𝑀: Irrigation engine in operation No Action: No action is taken 𝑀: Irrigation is stopped Soil moisture optimization is achieved by running the decision tree algorithm in equation (5) in the data processing unit. In other words, the soil moisture value is controlled within the desired value range.