Rice-irrigation automation using a fuzzy controller and weather forecast

HIGHLIGHTS: The use of the fuzzy logic allows the realization of an intelligent rice crop-level control. The consideration of the weather forecast is an incipient practice, which can be adopted for en-hancing irrigation systems. The smart control of rice irrigation can generate high energy efficiency gains and significant re-ductions in water catchments. ABSTRACT This paper presents a new irrigation controller based on fuzzy logic that uses weather forecast data and crop characteristics to evaluate the real-time need for irrigation of rice crops and to increase the efficiency of irrigation systems. Tests were performed with real data obtained from three different crop fields in Rio Grande do Sul State, Brazil, and on four meteorologically different days of the 2021/2022 harvest to demonstrate the ability to reduce power consumption for irrigation; the power consumption on days of heavy precipitation was above 80% under all simulated conditions. Depending on the size of the crop and the tested meteorological conditions, the minimum reductions in energy consumption were between 33-66% on dry days with no precipitation forecast. More than 15% reduction in the flow of the water catchment was also observed, even in the most adverse farming scenarios. This study reveals the necessity for technological advances in rice-crop irrigation systems to increase the efficiency of flood irrigation in large areas for reducing electricity consumption, increasing the profitability of rural producers, and ensuring the preservation and availability of water resources.


HIGHLIGHTS:
The use of the fuzzy logic allows the realization of an intelligent rice crop-level control.
The consideration of the weather forecast is an incipient practice, which can be adopted for enhancing irrigation systems.
The smart control of rice irrigation can generate high energy efficiency gains and significant reductions in water catchments.

Introduction
Irrigation systems play a fundamental role in agroindustrial production.However, high levels of power and water loss have been observed despite the recent modernization of the agroindustry (Fagundes et al., 2020;Filippi & Guarnieri, 2020;Silva et al., 2021;Brunning et al., 2023).The current rice irrigation systems possess outdated equipment, lack of automation, and inefficient water management techniques (Kaehler et al., 2014;Gollo et al., 2021;Abioye et al., 2022).
In Brazil, irrigated rice cultivation accounts for approximately 40% of the catchment water volume (ANA, 2021).According to the IRGA (2022), the cost of electrical energy for rice irrigation represented a movement of approximately R$ 647 million in Rio Grande do Sul State only in the 2021/2022 harvest.Considering this large amount and the inefficiencies of many installations, the need for energy conservation and financial savings for rural producers is significant.
Meteorological conditions have a significant impact on the water requirements of rice crops.The use of weather forecast data can contribute to technological advancements in making irrigation systems up to 23% more efficient (Zinkernagel et al., 2020;Chen et al., 2021;Zhang et al., 2021;Köksal et al., 2022;Villa et al., 2022).
Improving the efficiency of irrigation systems involves cost reduction for consumers, improvement of the quality of energy in electrical networks, and preservation of water resources and fundamental aspects.Therefore, in this study, a new irrigation controller was developed based on fuzzy logic that uses weather forecast data and crop characteristics to evaluate the real-time need for rice irrigation and increases the efficiency of irrigation systems.

Material and Methods
The irrigation controller proposed in this study is an intelligent water-level controller for irrigated rice fields based on fuzzy logic (Zadeh & Aliev, 2018).This method is currently used to add computational intelligence to irrigation systems, as demonstrated by Ibrahim et al. (2018), Khatri (2018), Mendes et al. (2019), Krishnan et al. (2020), Azry et al. (2022), andSingh et al. (2022).The main difference between the proposed controller and the controllers from the aforementioned studies is the response to weather forecast.The incorporation of this aspect in a flood irrigation system, which is a characteristic of irrigated rice crops, is emerging in recent research.
Considering inputs such as the water level in the field, soil characteristics, area to be irrigated, and meteorological forecast data, an irrigation automation model was proposed that interprets the real-time need for irrigation and has a positive impact on reducing electric energy and water consumption.Figure 1 shows an overview of the irrigation controller structure.
The output of the irrigation controller is a speed reference signal that is sent to the frequency inverter; the frequency inverter varies the speed of the electric motor of the irrigation system to power it.The flow of the replacement water in the irrigated rice crop is directly proportional to the mechanical speed of the irrigation system.Thus, larger reference signals sent by the controller lead to larger water replacement rates, causing the water level in the field to rise faster.
The irrigation controller is a closed-loop control system; it has a sensor that measures the water level present in the crop and returns it as input to the controller after comparing it with the level adjustment (setpoint in cm) selected by the user.The setpoint level was added to the model to allow the controller to adapt to the different water management methods used by rice farmers.
While selecting the controller inputs, it was considered the greatest number of relevant aspects of the crop water balance to represent the real situation with the greatest possible fidelity.Characteristics of the crop and weather forecast data were considered: • irrigated area (ha), which is directly proportional to the volume of water required to flood the crop, as collected by INMET (2022).
• average soil permeability (mm per day), which affects the volume of water drained and the need for replacement, as classified by EMBRAPA (2022).
• delta level (cm), in which the level relative to the setpoint is inversely proportional to the need for irrigation.
• precipitation/rainfall (mm per day), which contributes to the replacement of water losses through crop percolation Figure 1.Schematic of the irrigation controller and evapotranspiration as well as reduces the need for complementary irrigation.
• average wind speed (m s -1 ), which accelerates crop evapotranspiration and contributes to lateral losses by dragging water into the drainage channel, thereby increasing the need for irrigation.
• average air temperature (°C), which may cause evaporation at higher values and thus increase the need for irrigation.
The information on the irrigated area and the average soil permeability was fixed for a crop, and the other inputs were set as variable.Meteorological variables were collected daily from the nearest meteorological station, the data of which were provided by INMET (2022).
The proposed fuzzy controller comprises two stages, as shown in Figure 2.
In the first step, the variables were grouped into two sets based on their origin, crop type, and weather forecast, comprising two distinct fuzzy systems to obtain a better relationship between the variables for the definition of rules within the inference blocks.The output variables of the first step are used as inputs for the subsequent inference step.This inference block generates a signal from 0 to 100% at the output, which is proportional to the speed (rotation) at which the irrigation motor-pump set must operate with 100% being the nominal speed.Mamdani controllers were used for the inference blocks, and the centroid method was adopted for defuzzification (Zadeh & Aliev, 2018).
The reference signal of the controller causes variations in the speed of the irrigation equipment through the frequency inverter.While the flow rate of the centrifugal pump is directly proportional to its mechanical speed, the relationship between the mechanical power of the same pump with the speed is cubic (Azevedo Netto & Fernández, 2015).This characteristic explains the energy efficiency gain when a frequency inverter is used to vary the speed of the equipment.Using Eq. 1, the power reduction that occurs in an irrigation system because of the reduction in the motor-pump-set rotation speed can be calculated.) where: P2 -the final mechanical power, in W; P1 -the initial mechanical power, in W; N1 -initial mechanical speed, in rad s -1 ; and, N2 -final mechanical speed, in rad s -1 .
The term with an addition of 10% in Eq. 1 compensates for the losses introduced by the frequency inverter to trigger the irrigation system (Andrade Filho & Gomes, 2013).
To perform the irrigation controller functioning tests, information was collected from three irrigated rice fields.Table 1 presents the crop-related data that served as inputs for the irrigation controller.
These crop fields are geographically close to each other and located in the southern region of Rio Grande do Sul State.
Table 1.Crop characteristics adopted for the tests (1) The average soil permeabilities of these crops were identical, indicating that the range of possibilities tested during the simulation was reduced; however, it was focused on poor drainage as it is a typical characteristic of regions undergoing flood-irrigated rice cultivation (Magalhães Júnior et al., 2004).The soil in the treated region was composed mainly of Alfisols.
The data considered for the meteorological variables of the irrigation controller functioning tests was searched on the website of the National Institute of Meteorology (INMET, 2022).It was selected from the nearest available meteorological station and the historical data from four different days of the 2021/2022 harvest, as shown in Table 2.
For the precipitation variable, the daily accumulated precipitation was collected, and the average hourly records of these variables were considered for the wind speed and air temperature variables.
With the collected data described above, a sequence of simulations was conducted based on various combinations of available data to verify the behavior of the irrigation controller in different situations.

Results and Discussion
Simulations were performed with the developed controller to verify its behavior using the input information.A summary of the speeds generated by the irrigation controller for Crop Field A under the four weather conditions and with different delta levels is presented in Table 3.The pump speeds for Crop Fields B and C are listed in Tables 4 and 5, respectively.The Tables show the pumped water reduction, which is proportional to the pump speed and reduction in power consumption.
The data were compared with the manual control data that is currently used in these irrigation facilities, where the pumps are turned on at a nominal speed for 21 hours per day, and turned off only during the peak hours of the electrical system when the cost of electrical energy is higher.
According to the results, the energy reduction was greater with the forecast of a rainy day than with that of dry and hot days.This behavior is consistent because the pump speed generated by the irrigation controller is reduced when there is a forecast of natural water replacement in the crop through rainfall.Similar results were obtained by Bamurigire et al. (2020) using real-time rainfall and evaporation data.
By following the values from the tables in the horizontal direction within the same line, the behavior of the speed reference signal of the irrigation controller for different meteorological situations can be verified with the other fixed variables.The columns represent the weather conditions from the day with the highest precipitation to the driest day (from left to right).
The tables demonstrate the responses of the irrigation controller to variations in the water level of the crop, from high levels at the top to lower levels (negative values) at the bottom.It is important to note that as the crop level decreases, the pump rotation speed increases.This, when associated with a conservative level setpoint, will keep the crop flooded, preventing the risk of production loss.The "pump speed/water flow" columns represent the speed signal generated by the fuzzy controller, which serves as a reference for the frequency inverter, and must be forwarded to its analog input.The values in these columns also indicate a reduction in the flow of the water catchment from the water body, which is proportional to the reduction in the speed of the irrigation system.
It was verified that under favorable conditions (rainy days and positive delta level), the power and water use reductions exceeded 90 and 50%, respectively, in comparison to the nominal values of the equipment (manual irrigation).These results are similar to those of Jamroen et al. (2020) that achieved 67.35 and 59.61% of power and water use reduction, respectively, in a drip-irrigation system without weather forecast.Similar to the results of Kaehler et al. (2014), a 40-58.9%reduction in the power demand was achieved using pump automation.
Even under conditions of greater need for irrigation (dry days and low water levels), the reduction in power demand remained above 33%, demonstrating that a small reduction in the nominal speed can generate a significant return in terms of energy efficiency in rice-crop irrigation.For example, a reduction of 33.58% in the power demand was achieved with a reduction of only 15.48% in the centrifugal pump rotation; that is, 100 to 84.52% of the nominal speed was achieved in the most adverse testing conditions using a meteorological forecast of very dry days, with 300 ha of irrigated area, and with the water level of the crop below the setpoint selected by the farmer.
Water consumption was reduced by 15-79% between the most unfavorable and favorable conditions tested.Krishnan et al. (2020) designed a fuzzy smart irrigation system and achieved 65% water usage reduction in comparison with manual flood irrigation.Chen et al. (2021) achieved a watersaving rate of 23% by adopting rainfall forecasts in an irrigation strategy using a deep Q-learning technique.
The speed variation caused by the fuzzy controller shows that even in the most unfavorable conditions for the crop, there was a significant reduction in water consumption, which helps guarantee the availability of water resources during summer when they are most needed for agriculture and society in general.

Conclusions
1. Real-time need for irrigation of rice crops can be evaluated based on the meteorological and water level conditions through computational techniques.
2. Significant reductions in the power consumption of irrigation systems were observed, with a minimum reduction in consumption by 33% under unfavorable conditions.
3. The proposed irrigation controller has the advantage of considering short-term weather forecasts and reducing the water irrigation volume when natural replacements are predicted to occur.
4. The reduction in water consumption for irrigation, with values starting from 15%, can help in preserving and ensuring the availability of this resource during the rice harvest months.

Figure 2 .
Figure 2. Structure of the proposed fuzzy model

Table 2 .
Meteorological data adopted for the tests

Table 5 .
Irrigation controller results for Crop Field C

Table 4 .
Irrigation controller results for Crop Field B

Table 3 .
Irrigation controller results for Crop Field A