1 Introduction

A particular volume of water is required to be provided to a crop at predetermined intervals throughout the period in which it is developing. Irrigation is critical to the accomplishment of any agricultural project. The process of supplying water to plants via the use of mechanical methods is referred to as irrigation. Particularly helpful in areas prone to drought or subject to unpredictable rainfall. It is impossible to overestimate the significance of water in the life of a plant. Because the principles of water management vary depending on the weather, it is essential to have a solid understanding of how the soil and plants interact with one another. The soil may be sandy, silty, clay, or any number of other textures. Every type of soil has both advantages and disadvantages, depending on how it was formed. Consider, for example, the high water absorption capacity of sand. However, the nutrients are immediately flushed down the drain. On the other hand, silty soil is made up of extremely small particles and has an exceptional capacity to store water for extended periods of time. Sadly, water has a difficult time draining through this soil because of its structure. The quality of the soil in all of its facets, including its ability to retain water and nutrients, is absolutely necessary for agricultural production. Therefore, in order to effectively manage the water requirements of the various types of soil, it is essential to have a solid understanding of the characteristics of the soil [1].

Even if there is sufficient precipitation in many agricultural places, there is not enough moisture for crop development for a number of different reasons. These causes include a lack of storage capacity and/or precipitation that falls at inconvenient times. It has been stated that the rainfall is insufficient if it is less than one hundred centimeters, as the irrigation system requires at least that much rain in order to function properly [2]. Irrigation is also necessary in regions that see fluctuating amounts of precipitation, such as the dry Sahel, which receives a lot of rain during the monsoon season but suffers from dryness during the winter months. In order to assist in the development of crops at times of the year when there is a deficiency in rainfall, water irrigation is necessary.

The majority of the newest and highest-quality hybrid crop varieties need for a substantial amount of watering. As a consequence of this, it is very necessary to manage the flow of water in order to improve the yield and quality of the crops. Even the most common varieties of sugarcane and rice require a substantial amount of water to cultivate, which is demonstrated by the extensive and illustrious history of irrigation in the basin. This is something that has been well researched and written about. Each individual farmer is responsible for carrying out all aspects of agricultural labor, from sowing seeds and picking weeds to fertilizing, watering, and harvesting their crops. This process requires a significant investment of both time and water, in addition to a substantial amount of manual labor [3]. The method includes a number of decision-making phases that are spread out across the course of the agricultural cycle to enhance the productiveness of farming.

Precision agriculture assists farmers in mitigating these issues while also increasing crop yields. This is accomplished by continuously measuring the soil’s temperature, humidity, temperature gradient, and pH. There are a number of industrialized countries in which precision farming is carried out exclusively through the use of the Internet of Things. The process of a computer being able to learn new abilities by itself through observation and repeated practice is referred to as machine learning [4]. In order for the algorithms to learn from the input datasets, gradually train the samples, and increase their performance, the equations need to be modified. Its foundation in real-world settings enables it to develop decision-making capabilities with relatively minimal input from humans. Machine learning-based algorithms are increasingly being used in every sector of the economy. On the other hand, the accuracy might be very different depending on the quality of the data that was utilized. As a consequence of this, the representations of the datasets and the variables that are being targeted are both essential components of the machine learning approaches [5].

The ability to predict the properties of the soil and plants, as well as the water level, together with other meteorological information, is vital for the irrigation action timing plan used in precision agriculture. When designing irrigation schedules, it is important to highlight the kind of water distribution and to take into account the buffer time of the system. Whether deciding when to water plants, the moisture level of the soil is an extremely important aspect. As soon as the set amount is reached, the playing field will start to get flooded. When it comes to the Internet of Things, new agricultural systems are beneficial because of the simplicity with which they make farm maintenance. The creation of such an automated system makes it possible to hydrate plants without the need for human involvement.

Several different sectors have begun implementing IoT in order to increase their level of production. In today’s world, the Internet of Things is also being applied in farming in the form of smart farming. Devices connected to the internet of things have the ability to monitor the weather, find solutions to problems with irrigation, and assist farmers in increasing their crops in incremental steps. Innovative ideas are now necessary in the agriculture industry as a direct result of the growing population around the world and the accompanying rise in food consumption. Farmers can benefit from the Internet of Things in a number of ways, including increased crop productivity, improved harvesting yield, and proper field management; water monitoring; water usage limitation; crop monitoring; environmental impact prediction in advance; use of fewer people and fewer resources; prediction of environmental impact in advance; monitoring of water; and monitoring of crops.

As a result of increased worldwide demand for freshwater and the concurrent expansion in global population, the central area of the planet is currently facing a severe lack of available freshwater resources. It is anticipated that by the year 2050, the current world population of 7.2 billion would have increased to over 9 billion. The vast majority of freshwater is consumed for uses related to household and agricultural production. The majority of industrialised countries are in dire need of intelligent irrigation systems since the rapid advancement of technology has rendered them indispensable [6].

The Smart Irrigation System is equipment that is considered to be at the cutting edge of technology when it comes to managing the flow of water in agricultural infrastructure. The SIS controller will automatically change the irrigation schedule so that it is optimal for the conditions of the soil, the current weather, and the prediction for the next week. The water-soil interaction as well as the crop water demand that goes along with it may both be established via the process of characterising the soil feature.

Embedded system components, such as a microprocessor, together with the associated timers, sensors, and electrical valves, are responsible for regulating the flow of water in autonomous irrigation systems. As a result of this, the system is able to work in a more efficient manner. Controls for volume and timing, in addition to sensors that monitor the moisture content of the soil, are a few examples of automated irrigation.

The controllers of the intelligent irrigation system each have their own embedded intelligence, which works in conjunction with the other integrated components of the system. These sophisticated controls keep an eye on the weather as well as other aspects of the surrounding environment. Based on their findings, they modify watering schedules and quantities so that water is neither wasted nor wasted too quickly. You have to be aware that the most recent generation of intelligent irrigation controllers set the watering schedule for the irrigation system based on weather forecasts. People’s confidence in the correctness of the data projected is essential to the operation of such a system since it relies on their input.

This article presents IoT based Sensor integrated intelligent irrigation system for agriculture industry. IoT based humidity and soil sensors are used to collect soil related data. This data is stored in a centralized cloud. Features are selected by CFS algorithm. This will help in discarding irrelevant data. Clustering of data is performed by K means algorithm. This will help in keeping similar data together. Then classification model is build using the SVM, Random Forest and Naïve Bayes algorithm. Model is trained, validated and tested using the acquired data. Historical soil and humidity related data is also used in training the model. Section 2 presents literature survey of existing work related to intelligent irrigation system. Section 3 depicts the methodology part. Section 4 presents result analysis and discussion. This section includes performance comparison on the basis of certain parameters. Section 5 contains conclusion.

2 Literature survey

Weakly-Secured Networks, often known as WSNs, are an emerging technology that have the potential to completely transform the agricultural industry. Maurya and Jain were kind enough to supply details on how to make efficient use of fuzzy logic in agricultural precision farming [7]. They assert that the information collected by field sensors is transmitted to a base station, which is then delivered to a centralised location. Through the use of a threshold hybrid route, the information that has been received by the sensors is transmitted to the base station. The authors use fuzzy logic to select the best cluster head in order to bring down the total amount of energy consumed. Farmers are able to utilise the data received by the base station to figure out how much water should be used for irrigation in various parts of their property by using the information.

Farmers need to implement practises of precision agriculture in order to enhance their productivity. If this is the case, implementing WSN may significantly help farmers and other players in the agricultural sector, notably government irrigation agencies, make great judgements that aid in the forecasting of irrigation demands and crop yields. This might be a significant benefit of adopting WSN. A method for autonomous precision farming was developed by Dong et al. [8], and it makes use of centre pivot irrigation systems. This technological advancement makes use of sensor networks that are placed in the ground in order to monitor environmental elements in a field, such as the temperature of the soil and the moisture levels. As a result, sensors are installed, initial power settings are defined, and the network is maintained on a consistent basis in order to guarantee the most efficient utilisation of energy.

In the past, a number of different user applications have been developed to automate and make the task of managing and scheduling irrigation systems more straightforward. Vellidis and his colleagues came up with a system that allows for more effective watering of cotton crops [9]. In order to establish the soil water balance in their system, the researchers analysed data sets collected from a variety of cotton-growing locations. An android mobile application was developed by the author with the help of the datasets. In addition to that, they have designed their app in such a way that it can pull weather information from surrounding weather stations. In order to achieve optimal levels of cotton production, the software was designed to carry out automated planning of the irrigation systems on the basis of the calculated irrigation requirements arrived at by applying both local and downloaded meteorological data.

Imam et al. [10] conducted a study of the challenges associated with the design of wireless sensor networks and intelligent humidity sensors for use in precision agriculture. This was done with the goal of maximising the benefits that could be obtained. In the context of precision farming, they compared the performance of several microcontroller families and sensor node units with one another. In addition to this, an inventory of relative humidity sensor requirements along with modelling and interface methodologies was produced by them.

Chen et al. [11] suggested that precision farming would be impossible without the use of agricultural IoT systems. Several farmers have benefited greatly from the automated control and data monitoring systems. The agriculture industry is rapidly turning to the use of machine learning in response to the pressing need to enhance traditionally employed practises. The capabilities of the IoT to perform remote monitoring and data collecting help farmers save both time and effort thanks to the utilisation of preexisting internet infrastructure as well as mobile and web-based applications. The Internet of Things system used in agriculture incorporates a wide range of functions, one of the most important of which is irrigation. As a result of developments in technology that have rendered conventional farming methods archaic, people are more interested in modern irrigation methods than they are in traditional farming. Traditional agricultural methods are no longer viable. The Internet of Things would be of enormous use to farmers since it would save them the time and effort necessary for manual monitoring of their fields. This is a big deterrent for many people living in metropolitan areas, despite the abundance of farmland. Farmers would gain greatly from the IoT. Data from sensors stored in the cloud might potentially be combined with methods of machine learning in order to provide users with assistance in planning for future output.

A novel Internet of Things (IoT) enabled smart system was presented by Akshay and Ramesh [12] to predict the quantity of irrigation that is required for the field by sensing characteristics such as soil moisture, humidity, and temperature using a machine learning algorithm. This was accomplished by Akshay and Ramesh’s novel smart system. We resort to the K-closest neighbour strategy in order to circumvent the overfitting problem that occurs with the more traditional K-means and SVM methods. The outcomes of processing data using 3 weeks’ worth of predefined data are detailed, illustrating how the recommended method's usage of the K-nearest neighbour algorithm may produce a completely automated irrigation system. The predictions made by the recommended system have a high degree of accuracy.

The groundwater that is utilised for irrigation, home uses, and industrial reasons was analysed by Sarakutty et al. [13] in this particular paper. The writers also mention that in many extensive rural regions, irrigation is done with groundwater rather than surface water. Due to the fact that water is required for all forms of life on Earth, the problem of water conservation is an urgent one that has not yet been resolved. The global water system boosts the incomes and productivity of rural areas by providing assistance to farmers in reducing the impacts of drought and the variable nature of the weather. Irrigation is the most significant consumer of drinkable water but also contributes significantly to the depletion of ground water. The use of ground water is an unavoidable outcome brought about by the rising demand for agricultural goods. Because of this, it is very necessary to adopt cutting-edge technology in irrigation in order to make more efficient use of the water that is available.

In a smart irrigation system enabled by the Internet of Things, in order to minimise the amount of water that is used for irrigation while yet being able to accurately estimate the rate at which soil moisture is being drained, Singh and others Data collected from field sensors and forecasts of the weather that may be available online are used to generate estimates of the amount of moisture in the soil. The GBRT has been demonstrated to be the most accurate of the several ML approaches that can be used to estimate the soil's moisture content. The presented strategies have the potential to be a fruitful research avenue for reducing the amount of water required for irrigation.

Pratyush Reddy and colleagues [14] have developed an intelligent irrigation system that is able to forecast the amount of water that a crop will require by making use of an algorithm that is designed for machine learning. The amount of water that is required for agricultural purposes may be approximated based on a number of different criteria, the moisture content, temperature, and humidity being the three most essential of these. The system’s sensors for measuring temperature, humidity, and wetness send data to a central CPU, which then links the device to the cloud. These sensors are placed in an agricultural field. The data gathered in the field is input into a decision tree algorithm, which is an effective tool for machine learning and enables efficient result prediction.

Kirtana et al. [15] produced a work that combines the power of the internet of things (IoT) with an algorithm for machine learning in order to automate and speed up the process of developing new agricultural techniques. The planning and implementation of a smart irrigation system are described in depth in this article. This system makes use of machine learning techniques in order to fully and correctly automate the watering process. The sensor module is powered by solar energy, which results in a reduction in the system's overall energy consumption and an improvement in the lifetime of the system.

Singh and Sobti [16] investigated the potential applications of several ML algorithms in the field of agriculture as part of their research. In addition, the report shed light on the difficulties associated with merging IoT and WSN in order to achieve precision agriculture. It has come to light that the primary problems stem from a deficiency in intelligent infrastructure, accurate sensing technologies, careless water use, and an inability to predict important components that are required for irrigation. Therefore, according to the author, there is a significant demand for methods of machine learning that are both effective and efficient.

3 Methodology

In this section, Fig. 1 presents IoT based Sensor integrated intelligent irrigation system for agriculture industry. IoT based humidity and soil sensors are used to collect soil related data. This data is stored in a centralized cloud. Features are selected by CFS algorithm. This will help in discarding irrelevant data. Clustering of data is performed by K means algorithm. This will help in keeping similar data together. Then classification model is build using the SVM, Random Forest and Naïve Bayes algorithm. Model is trained, validated and tested using the acquired data. Historical soil and humidity related data is also used in training the model.

Fig. 1
figure 1

IoT based Sensor integrated intelligent irrigation system for agriculture industry

Important features are selected using CGS algorithm. K-Means Clustering [17] is one of the most common “Exploratory Data Analysis Techniques,” and if you want to evaluate the organisation of your data, you may make use of this technique, which gives you the opportunity to do so. It is a process that divides the dataset into a predetermined number of subsets in an iterative manner (clusters). In addition to making certain that the clusters do not intersect with one another, we checked to see that the data points contained within each cluster were as analogous to one another as was practically possible. The elements were grouped together into clusters according to their distances from the cluster's centre, with the elements that were located the furthest away receiving the least amount of weight. The K-Means Clustering Algorithm was successful in explaining 86.6% of the variation in the data that was observed. K indicates that there is less variance inside a group but a greater degree of diversity between groups.

A classifier known as a Support Vector Machine (SVM) [18] can be utilised to accomplish the task of separating data into linear and nonlinear categories. If you have more than one different group, support vector machine analysis can guide you through the process of building a hyperplane that maximises the distances that separate them. The number of classes must be added to the number of features to arrive at the total number of hyperplanes. The precise positioning and orientation of the hyperplanes can be determined by examining the points that make up the supports vector. With the assistance of these support vectors, it is possible to expand the margins of the hyperplanes. Support vector machines, often known as SVMs, are comprised of mathematical functions known as kernels. These kernels accept data as input and output it in the appropriate format. SVM kernels are available in a wide variety of shapes, such as linear, radial basis function, polynomial, and sigmoidal, amongst others. These kernels are included in accordance with the manner in which the data is dispersed. During the course of this investigation, we developed a support vector machine (SVM) classification model by making use of radial basis functions.

A random forest (RF) is a type of statistical analysis in which numerous individual decision trees are blended to generate a single forest. In the end, the ensemble forecast that was generated by many disparate models (tress) is superior to the prediction that was generated by any one prediction model. RF can be applied in classification in addition to its use in regression analysis, which is one of its more common applications. The research led to the development of the classification RF, which utilises three hundred trees. Out of bag error decreases with rising tree counts, but eventually levels off at 50 trees, which may be used to analyse the error rate by creating a plot. In other words, the error rate can be evaluated by drawing a plot [19].

The Naive Bayes (NB) algorithm is a type of supervised machine learning that is based on Bayes' theorem as well as the concept that the features that are utilised as predictors are independent of one another within a particular class. The Naive Bayes model outperforms a large number of other sophisticated classifiers and is notably helpful for making multiclass predictions with enormous datasets. It is possible to calculate the posterior probability with the assistance of Bayes' Theorem. The posterior probability, denoted by the symbol P(W|Y), is computed using the formula P(Y|W) * P(W)/P(Y), where P(W) represents the prior probability of the predictor, P(Y|W) represents the probability of the predictor given class, and P(Y|W) represents the prior probability of the class. We were able to generate a density map for each of the seven predictor variables with the help of the Naive Bayes function [20].

4 Result analysis and discussion

We created a dataset of several environmental parameters such as soil moisture, Humidity, Temperature, Pressure, and Luminosity. To create comprehensive data set with all important parameters, we have used data sets available at [21]. Rice crop related data set has 42665 records. 35000 records used to train the classification model and 7665 records used to test the classification model. IoT based soil and humidity sensors are used to acquire data. Features are selected by CFS algorithm. Results are represented in Figs. 2, 3, 4, 5, and 6. Amount of fresh water saved by proposed technique is presented in Fig. 7. Accuracy, precision, specificity, recall and F1 score are used as performance parameter [22].

$$ \begin{aligned} {\text{Accuracy}} & = \, \left( {{\text{TP }} + {\text{ TN}}} \right) \, / \, \left( {{\text{TP }} + {\text{ TN }} + {\text{ FP }} + {\text{ FN}}} \right) \\ {\text{Specificity }} & = {\text{ TN}}/ \, \left( {{\text{TN }} + {\text{ FP}}} \right) \\ {\text{Precision }} & = {\text{ TP}}/ \, \left( {{\text{TP }} + {\text{ FP}}} \right) \\ {\text{Recall }} & = {\text{ TP}}/ \, \left( {{\text{TP }} + {\text{ FN}}} \right) \\ \end{aligned} $$

where.

Fig. 2
figure 2

Accuracy of Classifiers for intelligent irrigation system

Fig. 3
figure 3

Specificity of Classifiers for intelligent irrigation system

Fig. 4
figure 4

Precision of Classifiers for intelligent irrigation system

Fig. 5
figure 5

Recall of Classifiers for intelligent irrigation system

Fig. 6
figure 6

F1 score of Classifiers for intelligent irrigation system

Fig. 7
figure 7

Amount of water saved by intelligent irrigation system

TP = True Positive.

TN = True Negative.

FP = False Positive.

FN = False Negative.

The accuracy of Kmeans-SVM hybrid technique is 98.5 percent. It is 6.5 percent more than random forest method and 13.5 percent more than the accuracy of Naïve Bayes classifier. The specificity of Kmeans-SVM hybrid technique is 98.7 percent. It is 12.7 percent higher than random forest and 16.7 percent higher than the specificity of naïve bayes method. Precision of Kmeans-SVM hybrid technique is 98.3 percent. It is higher than the precision of rabdom forest and naïve bayes classifier. F1 score of Kmeans-SVM hybrid technique is 97 percent. It is better than the F1 score of random forest (93 percet) and naïve bayes classifier (87 percent). The amount of fresh water save d by Kmeans-SVM hybrid technique based irrigation system is 42 percent.

5 Conclusion

Precision agriculture depends on being able to predict the properties of the soil and plants, as well as the water level and other weather information. This is important for the irrigation timing plan. When making irrigation schedules, it's important to pay attention to the type of water distribution and take the system's buffer time into account. The level of moisture in the soil is a very important part of deciding when to water plants. When the set amount is reached, the playing field will start to get flooded.This article presented an Internet of Things (IoT)-based sensor integrated intelligent irrigation system for the agricultural sector. In order to collect data pertaining to the soil, humidity and soil sensors based on the internet of things are utilised. This information is kept in a centralised cloud storage system. The CFS algorithm is responsible for the selection of features. This will aid in removing irrelevant data. The K means approach is used to conduct the clustering of the data. This will assist in keeping related data together in one place. The SVM, Random Forest, and Naive Bayes algorithms are utilised next in the construction of the classification model. Using the data that was obtained, the model is then trained, verified, and tested. The training of the model additionally makes use of data relating to the soil's history and the humidity. The K-means SVM hybrid classifier is producing superior results for classification, the forecast of water demand, and the conservation of fresh water through intelligent irrigation. Hybrid Kmeans SVM is saving fresh water up to 20 percent by intelligent irrigation.