1. Introduction
Numerous wireless components and devices in the Internet of Things (IoT) are integrated and are capable of communicating, sensing, and interconnecting with external and internal states of the embedded system [
1]. A number of notable research studies have highlighted the use cases of IoT in advancing smart farming methods and solutions in agricultural areas. Examining numerous complications and challenges in farming, IoT is a great revolution in the agriculture sector [
2]. To fulfill the compulsory food needs in all civilizations worldwide, agriculture has become a vast topic of interest in research-based development in the modern era. Over the decades, environmental changes have had a direct effect on agriculture, which includes scarcity of water, climate changes, soil condition changes, etc. Due to this dependency of agriculture on climate conditions, more technological advancement is needed to control and provide suitable conditions for effective farming [
3].
Cotton is a commonly grown product in South Asia because of its suitable environmental and topographic features. However, due to changes in the atmosphere, many insects and pests damage the crops and hence reduce production. The pest that widely attack cotton crops include whitefly. The perfect watering of crops, avoiding excessive or too little watering, can prevent not only crop damage but also help in avoiding pests attack [
4]. In the case of excessive rainfall and in dry seasons, automatic irrigation makes it easy to control these changes for good yield to save water and enable smart agriculture farming by providing smart desired specifications of irrigation systems for standard crop growth. Various control methodologies are developed for smart farming, including fuzzy logic. Fuzzy logic is one of the decision-making systems that works in a manner similar to human control and utilizes tools from fuzzy set theory in conjunction with human knowledge to obtain optimal desired results. The Membership Function (MF) is fundamental to fuzzy logic systems because it indicates the degree to which an element belongs to a fuzzy set based on user inputs in the form of linguistic variables. The Fuzzy Logic Toolbox is used to define this. These functions model uncertainty and imprecision and are used to compute membership degrees for given inputs. The variables are formulated to form a fuzzy set and connected with the precondition’s fuzzy logic rules defined by the user to obtain the desired output in a Fuzzy Inference System (FIS), which is a mathematical model that uses fuzzy logic to convert incoming data through established rules and MF for distinct fuzzy sets [
5,
6]. Fuzzy logic can be best used to design a controller for normal and required irrigation. Fuzzy logic provides an easy way to reach the conclusion of a system having vague and ambiguous installation details. The main aim of this work is to define the best rules for the implementation of a fuzzy control system that can optimally control the irrigation time by considering the input variables while helping the farmers to minimize electricity consumption, save water, and reduce pest growth rates.
This study employs the fuzzy cognitive mapping method of soft computing in order to analyze the process of yield prediction in the cotton crop-producing industry. The first experiment to add fuzzy logic techniques into the process of developing yield models for precision farming was discussed and a fuzzy logic-based irrigation control system was created for agricultural production as part of the research project [
7]. The purpose of this article is to provide a method that makes use of the knowledge and experience of experts in order to produce an estimation of agricultural output. As a result, it can help farmers obtain insights about the ways in which yield fluctuates. As the foundation for a decision support system for precision agriculture, this work employs a fuzzy cognitive map-based approach for predicting yield in cotton crop production. This study explored the use of fuzzy cognitive maps in cotton crop yield prediction in order to investigate yield and yield variability [
8,
9].
Conventional cotton crop management strategies cannot accurately estimate crop production. Current decision-making technologies lack expert knowledge, resulting in inferior outcomes [
9]. Conventional irrigation methods waste water. Existing technologies might be costly to implement and maintain, preventing small farmers from using them [
10]. However, fuzzy rule-based techniques can improve decision-making by being more accurate and efficient. Fuzzy logic systems may include expert knowledge and accurately anticipate crop production, improving cotton crop management decisions. Fuzzy logic-based irrigation control methods conserve water. Fuzzy logic temperature and humidity monitoring systems are cost-effective and fast. Thus, fuzzy rule-based cotton crop management can be more efficient and cost-effective [
7,
9].
2. Related Work and Research Methods
Enhancing crop productivity is essential in agriculture to meet the rapidly rising demand for food due to population growth. There is an urgent need to switch from manual to automated methods in order to increase crop productivity [
11]. In agricultural fields, received soil moisture and temperature data affect the crop’s quality [
12]. A considerable amount of water is mandatory to fulfill the requirements of conventional irrigation. Hence, efficient utilization of water leads to increased agriculture yields [
13]. Furthermore, prominent attention of farmers is needed in agriculture to ensure that the crops receive the required amount of water, as shortage or excessive amount of water can damage the crop [
14]. To solve the problem of unusual water consumption, “automation in irrigation” is one of the demanding technologies to improve agriculture [
15].
Numerous studies have been performed to design and improve different methodologies for smart irrigation. The authors in [
16] implemented the drip irrigation system by controlling it using mobile networks. Controlled valve are used to irrigate crops using the fuzzy logic technique, where the authors analyze the demand for water to avoid overconsumption and save water. The author in [
17] proposed a bespoke-based smart irrigation system, where low-cost moisture sensors are applied, which works on XBee-based communication technology to manage water supply in areas with water deficiencies. Moreover, the author analyzed that the system is automated by incorporating the moisture sensors in the drip irrigation system. In [
18], the authors present a framework for efficient utilization of water in the smart irrigation system, where the dampness and water rate are detected and controlled, respectively, in the crops. Similarly, the author in [
19] proposed a smart, automated irrigation system with disease detection capability in crops, where the moisture sensors are deployed to sense humidity and temperature, and optical sensors are used for pest detection. The soil study in [
20] implies that the biodegradation of antibiotics in agricultural soil can be affected by factors such as the type of biochar used and the antibiotic class used. Strategies for controlling antibiotic contamination in farming settings can be influenced by knowledge of these connections. The research in [
21] analyzes the impact of canopy and understory nitrogen addition strategies on fine root biomass and shape in the soil of temperate deciduous forests.
The authors in [
22] present an automated control irrigation system where low-cost Arduino controllers operate the motor and improve crop yield in an area with less water. The authors in [
23] focus on an optimal irrigation system with a rainfall prediction algorithm to find a favorable area for specific crop growth and introduce a method to control water. In [
24], the authors propose a smart irrigation system where Android phones and a wireless sensor network are deployed for monitoring and controlling purposes. Moreover, the author analyzed human interaction by incorporating the Zegbee communication module. In [
25], a smart irrigation system using a fuzzy logic controller is implemented, where the system contains the Mamdani fuzzy controller technique to control water flow for maintaining the irrigation system at proper time and frequency. Similarly, in [
26], the author presented a design of a smart irrigation system based on fuzzy logic with the ability to locate the availability of water resources and electricity provided to the pump. In [
27], the author aims to present a smart irrigation system using a Raspberry Pi module, where real-time input data of moisture variations and temperature is analyzed to control the system. The author in [
28] introduces a fuzzy logic and wireless sensor network-based smart irrigation decision support system, where the system analyzes environmental parameters through sensors, and fuzzy logic rules are applied to control the water flow. The authors in [
29] elaborate on irrigation issues by simulating the fuzzy logic controller in MATLAB and studying symbolic logic to design an optimal system using artificial intelligence, computer science, and mathematical logic to solve agricultural problems. The authors in [
30] review the applications of fuzzy logic in smart agriculture and analyze different aspects of fuzzy logic in various agriculture technologies to improve crop yield. Moreover, in [
31], the author implements a fuzzy-based irrigation control system by using LabVIEW and GPRS communication module with the ability to represent the solution for scheduling irrigation by turning OFF and ON the valve. The authors in [
32] present an automatic cloud-based irrigation system with microcontroller ESP32-Lora and SIGFOX network to design a node network and internet connection and attempt to obtain stability in the communication network to improve irrigation. In [
33], authors present a fuzzy logic algorithm for smart irrigation with comparison of two methods (Mamdani and Sugeno) for open and closed fuzzy logic control system in MATLAB, where more number of input variables are used to extract the data which create complexity. Similarly, the authors in [
34] implement a fuzzy logic control system for irrigation, controlling the pump speed, an IoT network is deployed, and the authors claim an improvement in irrigation with a reduced workforce. Authors in [
35] present an irrigation system on chili plant, where a fuzzy logic control system is connected with an IoT system for controlling and monitoring management. The authors analyzed the system with two input and three output variables to test the growth rate under a controlled environment. In [
36], authors presented a wireless data logging application in Qatar to enhance the irrigation system based on a feedback fuzzy logic controller, where the system contained Xbee–GPRS for monitoring purposes and as a database platform. Moreover, the authors analyze this system can be easily deployed with drip irrigation to manage watering time in crops. Similarly, in [
37], a smart irrigation system is installed with a global system for mobile communication (GSM), where the system provides information in messages about the environmental condition and motor working state related to the power supply. Furthermore, a fuzzy logic controller is utilized for input and output control. In [
38], the authors installed a Mamdani control system based on smart irrigation with an open-loop fuzzy control system. In addition, the simulation of fuzzy logic is performed in MATLAB, v. R2023a.
In order to automatically track environmental data and water plants, the authors of the study [
39] propose building a smart agricultural monitoring system with the help of an ESP32 microcontroller, sensors, and a water pump actuator, all underpinned by fuzzy logic. Another study considers soil type, geographic location, and climate variables such as annual average temperature and precipitation in the analysis. Productive crops for cultivation are suggested using a method that takes into account location-specific factors. Experiments show that the proposed approach is superior to state-of-the-art alternatives in terms of both accuracy and efficiency [
40]. Comparative research was carried out to examine the role of recommendation systems in modern agricultural practices. Farmers should routinely switch up the variety of pesticides and water sources they employ. This strategy can help farmers increase their yields of high-quality crops. Because of this, they are able to raise their standard of living and give back even more to the community [
41]. The study in [
42] showed that fuzzy goal logic can be deployed to form a decision support system to help farmers plan apple cultivation. This research sought to demonstrate fuzzy goal programming’s practicality.
Based on the related work, the purpose of this research is to strive to make the agriculture system more efficient. Despite this, other significant factors, specifically demanding crops, require additional effort in smart farming practices. Cotton crop is a widely grown product affected by various pests, including highly attacked pest whiteflies due to unfavorable environmental conditions. The proposed research demonstrates that intelligent irrigation systems require additional work to achieve optimal climatic conditions for cotton crops while conserving water and electricity. The following solution is a clear strive to achieve smart agriculture farming with less complexity compared to alternative approaches.
2.1. Existing Methodologies for Field Irrigation
The primary objective of smart agriculture farming is to enhance crop yields at minimum cost and environmental damage. The crop yield is typically influenced by pests and diseases—furthermore, inadequate irrigation leads to diminished yields and heightened loss of water resources. Researchers have explored many methodologies for fighting against pests, disease, and optimal irrigation systems.
Methodologies for Field Irrigation
In the modern era, advanced irrigation system technologies such as surface irrigation, localized irrigation, and other environmentally focused irrigation methods are essential to optimize crop production. Crop growth needs a suitable combination of temperature, humidity, and optimal soil moisture level. Selecting a satisfactory irrigation technique can improve the crop yield. The contemporary irrigation techniques for conventional farming are as follows. (1) Surface irrigation system: the widely used irrigation technique spreading water to the field relies on gravity. Typically referred to as flood irrigation, it implies the haphazard distribution of water used for cultivation. Level basin irrigation, border strip basin irrigation, and furrow basin irrigation fall under the category of surface irrigation [
43]. (2) Level basin irrigation is utilized for small-scale farming, where crops are grown at close intervals. Water circulates from end to end of the farm and runs off to the pond to ensure efficient use of water [
44]. (3) Border strip basin irrigation is an expansion of level basin irrigation, where the land on the farm is divided into strips with borders. The most complicated irrigation method of surface irrigation is suitable for crops such as barley and wheat [
45]. (4) Furrow basin irrigation minimized water consumption. Furrow irrigation cultivates the crops instead of submerging the whole farm with water. Vegetables and plants that are sensitive to ponded water consider it ideal [
46]. (5) Micro irrigation system: The frequently utilized methods involved in micro irrigation systems are drip irrigation, sprinkler irrigation, and channel irrigation [
47]. Drip irrigation, also called trickle irrigation, is considered the easiest and optimal approach for watering. Water is directly delivered to the root of crops at the proper time and in the required amount. Water is transported everywhere through pipes called drip lines. Pipes contain small units to drip water. Water is released in the form of drops, which results in an equal amount of water provided to every plant’s root in the field. Drip irrigation is an approach working on low pressure. It provides 100% land utilization, with great stability, crop protection, and efficient utilization of water at lower risk [
48]. Drip irrigation distributes water in smaller doses, ensuring proper plant growth to produce maximum yield. The scarcity of water in many regions clearly indicates the requirement to find ways to efficiently utilize limited resources and enhance agricultural productivity [
49]. Drip irrigation is an efficient solution to fulfill the requirements and make things easy for the farmers. All except that this method of irrigation demands high installation cost [
50]. Sprinkler irrigation, having high demand in cultivated areas, suffers from water shortage. Water is distributed through sprinklers that imitate natural rainfall, preventing water wastage. Fast wind condition often demands high-cost operation with poor working efficiency [
51]. Channel irrigation technique is beneficial for large areas of cultivation, which requires a considerable quantity of water. This technique is cheaper and improves the quality and growth of crops. On the other hand, this technique results in excessive water consumption [
52]. A comparison of different techniques integrated with fuzzy logic is presented in
Table 1.
2.2. Contribution and Paper Organization
This research provides a study of the performance of cotton crop production by utilizing a fuzzy logic control system with a specific focus on irrigation time. We are proposing a novel method that aims to optimize irrigation time in order to preserve environmental conditions and reduce the population of the pest species “whitefly” on cotton crops. The key contribution of this paper is to design effective knowledge-based IF-THEN rules for smart irrigation systems using fuzzy logic and utilizing real-time data of soil temperature and humidity of cotton crop fields. Rules are incorporated to make these climatic parameters suitable for avoiding pest “whitefly” with good irrigation time. IF-THEN-based rules combinations are established using human expertise and comparing these rules in MATLAB. The results demonstrate that by using appropriate rules, irrigation time can be improved for the purpose of saving water consumption and electricity. Suitable soil conditions such as humidity and temperature help diagnose problems earlier, enabling necessary action to reduce crop failure. Inform the system promptly about the environmental circumstances that can minimize crop failure.
The rest of the paper is organized as follows.
Section 2 introduces related work.
Section 3 deals with fuzzy logic control for field irrigation. MATLAB implementations are present in
Section 4, and results and discussion are presented in
Section 5. Finally, the paper is concluded in
Section 6.
3. Fuzzy Logic Control for Field Irrigation
The proposed methodology is based on determining the requirement for irrigation based on humidity and temperature levels in the environment. Moreover, it analyzes the chances of pest incursions, especially “Whitefly,” in cotton plantations due to environmental influences. Smart analysis of environmental parameters using fuzzy logic helps create an intelligent system to prevent pests and execute efficient irrigation. The fuzzy logic controller structure is comprised of five steps.
In
Figure 1, the first step identifies the input and output variables to determine the descriptor for both. In the second step, the MF for each input and output variable needs to be defined. In the third step to operate, reserve, and sort the data, man-made rules are incorporated. A fuzzy logic system’s basic structure and learning/adaptive components are designed. The fuzzified output performs as a fuzzy logic controller to command when it feeds into the crop field.
Figure 2 demonstrates the fuzzy system to find irrigation time through a fuzzy logic decision-making system. The defined input variables are humidity temperature, and the output variable is irrigation time. Input variables are subdivided into MF. After fuzzification is finished, the defuzzification process is employed to produce the output for creating irrigation status.
Figure 3 represent the triangular MF of temperature. Linguistic values used for temperature are low, medium, and high.
Equations of triangular MFs of temperature are derived by using line equations.
Figure 4 presents the MF of humidity having linguistic variables dry, normal, and moist. The graph shows that the humidity of the environment is dry from the range 0 < x < T, normal T < x < 2T, and medium from the range of 3T/2 < x < 2T. Equations of MFs of humidity are derived from the above method using a line equation.
Here, we assume the humidity and temperature values of the environment are ‘h
’ and ‘t
’, respectively. In
Figure 3 the respective temperature ‘t
’ cut the two points of lines which represent high and medium lines of temperature. Therefore, both equations at respective temperatures `t1’ give the equation.
In
Figure 4 respective ‘h
’ value touches the two points of lines representing normal and moist environment. The equations derived from it are given below.
These Equations (6)–(8) lead to four rules that need to be evaluated.
Rule (1). Humidity is normal; Temperature is medium.
Rule (2). Humidity is normal; Temperature is high.
Rule (3). Humidity is moist; Temperature is medium.
Rule (4). Humidity is moist; Temperature is high.
From these rules, the minimum value of each can be derived by the respective value of temperature ‘t’ and humidity ‘h’. The last step of defuzzification helps to exclude the maximum value from the derived minimum values. This maximum value corresponds to any rule given above. Each rule contains two cases that execute two values at the respective value of ‘t’ and ‘h’. The average of both values gave the required irrigation time suitable for the environment.
Fuzzy Logic Technique for the Cotton Crop
Fuzzy logic, neural networks, and knowledge-based techniques can be used to create an expert system. Weather-based forecasting can predict the probability of diseases based on the current state of the atmosphere in a specific location.
Table 2 represents a defined fuzzy rule base applying on the fuzzy inference system of the cotton crop field. A disease occurs when a certain weather condition happens at a specific range of temperature and humidity. Analyzing parameters of temperature and humidity are Very small (VS), Small (S), Medium (M), Large (L), and Very large (VL).
Table 3 illustrates a few other pests’ production in cotton crops at specific temperature and humidity rate.
The FIS (Fuzzy Inference System) produces linguistic variables as a result of its work. In order to evaluate the theories, the proposed study will look at one disease. Whitefly is a frequent pest in the cotton crop, as is the red cotton bug spot. FIS is framed using information gathered from high-risk environments. The chance of illnesses appearing in linguistic variables is a system output that serves as a decision-making tool for farmers. The linguistic output provides farmers an early warning regarding the risk of the disease occurring. Farmers will be able to act appropriately and quickly. This will not only cut down on pesticide use but will also improve crop protection. The importance of establishing an expert system cannot be overstated. Three conceptual components make up the basic framework of a FIS. In fuzzy modeling, rules known as antecedents or premises describe the output limitations, also known as repercussions, and provide the related outcome for a fuzzy region of the input space.
Figure 5 and
Figure 6 is the implementation of fuzzy logic at the soil humidity and temperature of the cotton crop, respectively. Each considered input has five MFs, as shown in the below equations.
4. MATLAB Implementaion
The fuzzy logic is applied to the system involving cotton crops and demonstrates the possibility of whitefly attack as a result of different environmental factors such as humidity and temperature. Two factors, temperature and humidity, have a major influence on pest growth. The fuzzy logic-based methodology focuses on the pest whitefly in MATLAB and obtained results with variances in temperature and humidity. The temperature range is 0–60 °C, and the humidity range is from 0–100%. The IF-THEN conditions act as a framework for the fuzzy rules of temperature and humidity, having parameters large, small, medium, etc. Defuzzification shows results of efficient irrigation time for maintaining temperature and humidity to reduce whitefly growth. In this study, two input variables are considered with five linguistic variables or MF as represented by formulas. The number of fuzzy logic rules is calculated according to the number of every input variable’s MFs. Hence, two input parameters contain five MFs. Therefore, the total number of rules will be
, as shown in
Table 4. The fuzzy rules and linguistic variables are assumed by the researchers according to the fuzzy inference concept.
Figure 7 demonstrates the humidity range between 0–100% with triangular type of MF. The analyzed parameters of humidity are Very dry, Dry, Medium, Moist, and Very moist. The threshold of each MF of humidity is elaborated in
Table 3. Threshold of each MF of temperature is elaborated in
Table 5 and
Table 6 representing each input and its relevant threshold, such as when the temperature will be very low, low, medium, high, and very high or how the humidity will change from very dry to very moist.
Figure 8 highlighted the temperature range between 0–60 °C with triangular MF. Analyzing parameters of temperature are Very small, small, Medium, Large, and Very large.
Figure 9 indicates the window of knowledge base fuzzy rules settings to fulfill the condition for MFs for the fuzzy inference system. Fuzzy rules are set in the form of IF-THEN conditions of humidity and temperature. MATLAB software is utilized to implement these rules using the Mamdani method.
Figure 10 shows the output status of irrigation with triangular MFs. Analyzing parameters of irrigation are Very small, Small, Medium, Large, and Very large. The threshold of each MF of irrigation is given in
Table 7.