1. Introduction
Farmers depend on rain and bore wells for the irrigation of their farmland. In present days, farmers are mistreated with farm irrigation techniques, which are labor-intensive during irrigation due to the need to turn the water pump on or off as required in routine intervals. The objective of this paper is to present an approach allowing farms to intelligently manage the plant system from anywhere at any time. The overall health of a plant and the need for water is analyzed by using the parameters temperature, humidity, light intensity, and soil moisture. Using Internet of things (IoT) technology, our proposed system measures the soil moisture, and whenever it gets dry, it gives an alert to the device so watering can be managed on time. In this paper, we used some hardware devices to measure the aforementioned parameters, effectively creating a “smart plant”. The hardware devices included sensors to measure temperature, humidity, and soil moisture, and the results were sent to the cloud using an IoT-based cloud system.
1.1. Advantages of the Proposed Method in the Agricultural Sector
1.1.1. Information Assortment
All information can be gathered by introducing sensors. Information could include climate conditions and the wellbeing of livestock, crops, and so forth. Information is stored in one place, and farmers can easily check it and evaluate it to settle on the correct choice.
1.1.2. Decrease of Risk
After the rancher’s data is gathered, they can gain perspective and foresee issues that may emerge in the future. Additionally, ranchers could utilize the information to improve their deals and change business forms.
1.1.3. Business Moves towards Mechanization and Automation
Numerous business forms have become mechanized, and their effectiveness is developing. Accordingly, ranchers can focus on other significant procedures.
1.2. Higher Caliber and Low Cost to Implement
Excellent agribusiness makes it possible to avoid difficulties and expel all issues that may emerge during operation. As the relevant technology develops, consumers are getting increasingly high-caliber results. Previously, various kinds of methods have been used, but the proposed methodology has low implementation costs.
The proposed system can used in three ways. For indoor house plants, this system uses a small infrastructure. Secondly, to maintain a nursery or garden, a medium-scale infrastructure is used. Finally, to maintain a farm, extensive infrastructure must be used. Herein we describe a system comprising one pot that includes water storage, sensors, and a controller for indoor plantation. The users can place it anywhere and fill the water once or twice per week, and the proposed system manages everything else with the pot itself. The system has data on many plants, and the user has to select the plant they are growing with the mobile application. Medium-scale implementation for gardens or nurseries includes only one controller, and sensors are included as required. The user needs to link plants and sensors with a straightforward user interface.
Common plants have a single connection with the water supply, which is controlled by the controller. Greenhouses can be fitted with temperature and humidity sensors in order to easily control the greenhouse’s environment. Large farm systems with different crop data include machine-learning algorithms for weather prediction and notify the user about the weather in advance. This proposed methodology will be very helpful for the farmers, even if the network is unreachable. The necessity of increasing farming production by minimizing effort, time, and price are the key reasons for building detector systems that are as effective as possible. The sensors can be used to take advantage of all accessible resources and to minimize the use of expensive merchandise [
1]. Sensor devices coupled with wireless technologies [
2] were used to monitor the essential parameters for intelligent agriculture towards smart, profitable farming. Smart automatic watering procedures for farms using wireless sensor networks (WSNs) to control the system can make some growth condition decisions [
3]. A moisture sensor was used to determine how much water was present in the soil. The device was wireless and could communicate with any end device, then software was used to manage the decision.
The accurate agriculture refers to exact farming, greenhouse automation, and surroundings watching management [
4]. The authors in [
4] gave a system initiative for outlining reference designs of sensible planting management supported group action IoT capabilities to make a possible industrial system. The system comprises plant management, utilization, synchronization, sub-systems, and supervision layers. They additionally consider a system model that defines the physical parts of smart planting management processes in a large hierarchical system. In [
5], the author introduced a system for intelligent planting using closed-circuit television supported by the IoT. They proposed a planting approach with the aim of planting a Web of things. Wireless sensors that combine this concept into the plant management system were used to handle the smart system. IoT with mobile and cloud-based design for the smart planting system was presented in [
6], with a flexible and versatile approach. This context engine was used to desegregate useful health applications with IoT connectivity and simplify the predictive modeling task.
In [
7], two machine-learning algorithms—linear regression and functional regression models—were used to predict the weather from data collected from the sensor. Functional regression performed better than the simple linear regression because linear regression has low bias and high variance, whereas functional regression has high bias and low variance. In [
8], Bayesian networks were used in rainfall forecasting, involving conditional chances between different nodes. This model worked well for the prediction of monthly rainfall, but it requires a great deal of historical data. Otherwise, it did not yield good results. Another approach [
9] focused on a more specific case of predicting severe weather for a specific geographical location, which limited the need for subtle tuning Bayesian network dependencies. However, the research was limited in scope. Another technique using support vector machine (SVM) [
10] was adopted and executed on five years of weather data along with the use of different kernel functions, but the results did not outperform the neural network approach. Another widely used method [
11] uses a neural network model for weather forecasting while yet another [
12] applies direct learning to predict weather conditions.
The remote checking of fields lessens the need for human labor, and it enables the client to see precise changes in crop yield. Through incorporating the smart agriculture system which we developed and implemented, operations became less costly, increasingly knowledgeable, with improved outcomes, and consumed less electricity. The system gives data about the temperature and relative humidity in the agricultural field through messages to the farmers if there are deviations from the ideal ranges. The framework can be utilized in the nursery and temperature-subordinate plants. The utilization of such a framework in the field can improve harvest yield and increase global production. The utilization of smart management in farming is only the beginning, and holds extraordinary potential for what is to come.
The rest of this paper is organized as follows: The proposed solution and its system architecture is described in detail in
Section 2 and
Section 3. The results and discussion are described in
Section 4. Finally, we draw conclusions in
Section 5.
2. Methodology
We used three leading technologies—IoT, machine learning, and cloud computing—for our smart agriculture system. The IoT contributes significantly towards enhancing cultivation. Cultivating difficulties brought by the global environmental changes have made it increasingly essential for businesses to use the IoT [
13]. The mix of remote sensors with mobile-based farming applications and cloud storage helps in gathering relevant information related to the ecological conditions—temperature, precipitation, humidity, wind speed, insect invasion, soil humus substance, or supplements. The application-based yield recognition conjointly reduce the issues associated with overseeing crops in numerous areas. For example, ranchers must keep track of which regions have been treated (or wrongly missed), if the land is excessively dry, and must predict future yields.
In this methodology, the DHT-22 sensor is used for measuring the temperature, humidity, and soil moisture of the plant. We interfaced these two sensors with an Arduino, which is used to fetch the data from the sensors and upload it to the cloud by connecting it to the wireless network.
The sensor is connected with the plant and records data on temperature, humidity, and soil moisture level, as shown in
Figure 1. it is possible to add more sensors as required. This diagram shows the interfacing of sensors. After interfacing the sensors, they are connected to the Arduino, which processes the data. It is interfaced with the wireless network for the Internet connection, then the collected data is sent to the cloud for storage. The cloud improves decision making and enhances Web-based communications. However, new difficulties emerge once the IoT meets the cloud [
14,
15]. Distributed computing offers a reasonable utility-based model that adjusts organizations and clients to access applications on request at any time and place. We used the “ThingSpeak Cloud” platform to save data in the cloud. The next part of the implementation is to send the data to the cloud and retrieve it from the cloud, as shown in
Figure 2.
In
Figure 2, the connection between the sensor and the wireless network is shown, where the sensors fetch the data using Bluetooth/Wi-Fi. The wireless network is established after the controller passes the data to the cloud using a wireless network. Bluemix is used to store the data in the cloud database. The concept behind machine learning is to automate the creation of analytical models to change algorithms based on continuous learning with the assistance of accessible information. Continuously evolving models turn out progressively better results, reducing the necessity for human interaction. The machine learning algorithms are used in cloud services for weather prediction. The user can obtain knowledge about their plant data via the Web interface and from automatically generated notifications.
We used the exponential moving average model (EMAM) for weather prediction [
16]. In response to the most recent data updates, EMAM reacts with high specificity and intensity. Because the EMAM responds quickly to new information, it provides a correspondingly earlier indication of future data movement (e.g., temperature, humidity). The EMAM responds considerably quicker than the regression model. The main benefit of this model is that it learns from its historical knowledge, and accuracy improves over time. The EMAM model [
17] can be represented in different types of equations. One of the methods to present the model is to define a series S that describes the current level (i.e., local mean value) of the series as determined from data up to the present.
At time t, the value of S can be computed using a recursive definition (i.e., from its previous value) like this:
where α is smoothing constant.
Smoothing constant whose range is between 0 and 1. This will play a critical role, so the constraints discussed above can be avoided. Hence, the estimated level at given times is calculated by interpolating between the just-observed value and last determined level, with the weight assigned to them as α and 1 − α, respectively. This appears to be an instinctively sensible approach to utilize the most recent data to refresh the weight factor of the present level. The series S gets smoother as α approaches zero since it does not change as quickly with each new value of Y. The model considers that the series has no trend, so it predicts zero change in the level from one period to the next. Due to the assumption that no trend exists in the series, the model predicts no change in the level between one period to the next. With this assumption, the estimation for period t + 1 is just the predicted level of the series at time t:
The explanation behind specifying the different series S is to show the calculation of the local average before turning around and considering it as an estimation of the next period.
Here we can observe that the next estimation value with α = 1 is similar to the constant-forecast model EMAM with α = 0. Hence, to respond to the new data, the EMAM model is considered as an interpolation between the mean model and the random walk model. We can also write the equation as: Error = Actual value – Forecast value.
The EMAM forecast for period t + 1 is determined as
where α is the part of the forecast error involved in an unexpected change in the level of the series rather than an unexpected one-time event. In the limit as α approaches 1 (i.e., the random walk model), all of the variation from one period to the next is changing due to the fundamental level rather than just a momentary deviation. In the limit as α approaches 0 (i.e., a constant model), the fundamental level of the series is considered as stable, and all of the period-to-period variations are attributed to temporary deviations from it. EMAM for all past values is given by Equation (6).
The cloud provides the Web interface to the user for retrieving their plant data. The user will can obtain their plant data from the Web interface and also from notifications.
Some advantages of using EMAM are as follows:
It can be studied and implemented quickly.
For exponential smoothing methods, only three pieces of data are needed. The third criterion is the smoothing effect, which is a weighting factor representing the weight given to the latest figures.
It makes accurate estimates.
Exponential smoothing helps in a one-period projection. Predictions for further periods can then be produced using the pattern prediction technique. The forecast is considered accurate since the gap between actual predictions and what really happens is taken into consideration.
More recent findings become more relevant.
The data measured is the total of two or more elements, and one is the statistical error (the difference between the value observed and the real value). Statistical variance is ignored in a smoothing procedure. As such, the fundamental cause is much simpler to see.
Though this method gives us the proper results, it has some challenges which must be met at the time of application.
The challenges are as follows:
The method predict better than the current model.
The pause is a side effect of the smoothing. This approach “smooths” because the ups and downs involved with random variations are ignored. As a consequence, a straight line or curve is shown in a graph. Nevertheless, avoiding the natural variance still helps one to see the fundamental pattern that will enable you to present data and to predict future values.
The approach cannot cope well with patterns.
Exponential smoothing is typically used in the case of short-term predictions and in the absence of seasonal or periodic fluctuations. As a consequence, the estimates are not reliable when cyclical or natural changes occur. As such, if the sequence is a pattern, this method of combining will not perform well.
Sometimes this approach cannot deal with new developments.
Techniques like this are only valid if good consistency can be inferred between the past and the future. As such, it is best suited to short-term modeling, since it predicts that future trends and behaviors will be similar to current ones. Although this sort of prediction may sound reasonable in the short term, more problems arise as the prediction is cast farther into the future.
Our goal in this proposed methodology was to implement a novel approach that is very easy to install where the cost of implementation is less than other previous methodologies. Some previous methods have constraints which have been purposely removed in this proposed methodology.
Propose method performs much better in terms of accuracy and reliability. A line or curve is thus shown in a map. However, it still helps one to look at the fundamental pattern, which can enable information to be produced and future values to be predicted by avoiding natural variance.
Sometimes patterns are not able to cope well. In the case of short projections and the absence of variations in season or cycles, exponential smoothing is typically employed. Therefore, when cyclical or natural shifts happen, the forecasts are not accurate. The hybrid strategy does not work well if the series is a repeat.
4. Results and Discussion
We tested our model with a small prototype, and a picture of the prototype is shown in
Figure 6. In
Figure 6, the soil moisture sensor is connected to the Arduino, and the Arduino board is connected to the laptop. The soil moisture sensor measures the soil moisture and generates data. The obtained reading was tremendous (200–1200) hPa. From that value, we could easily set the absolute value for that particular plant. Each plant has various requirements and set the best value for that plant.
We set the application for the particular plant so the user can easily select the plant from the visual and animated mobile application. Once a user is used to choosing the plant from the mobile application, the smart pot can take care of everything. The water tank must be filled by the user two days a week (according to the pot size). The water pot can also be connected directly to the main water tank, which fills automatically using a water level sensor and pump motor. The prototype of the proposed model is shown in
Figure 6, with a water container outside the pot. All external areas can be covered with water, and the center of the pot is covered with soil. So, it looks pretty and elegant, and a user can easily store that pot anywhere in the house.
Figure 7 shows the collected data from the sensor or another source (Historical Data).
Figure 7A represents the humidity data available on the cloud. The
y-axis denotes the values of humidity while the
x-axis denotes the date on which the data was collected. This helps for prediction in the next phase, described in
Figure 8. Red points denote the humidity value on a given date and time, collected using the sensor.
Figure 7B represents temperature data that was saved in the cloud. The
y-axis denotes values of temperature while the
x-axis denotes the date on which the data was collected. Red points denote the temperature at a given date and time, collected using the sensor.
Figure 7C represents the rainfall data available in the cloud, which was collected by us. The
y-axis denotes the rainfall status while the
x-axis denotes the date on which the data was collected. Here we have collected rain data as a binary, where zero denotes rain and one denotes no rain. Red points signify rain status at the date and time they were recorded.
Figure 7D represents the atmospheric pressure, collected from the local weather. No observable shifts in the climate or atmospheric conditions can be observed in
Figure 7E, where the
y-axis indicates power level of data while the
x-axis indicates the date of data collection. Red points signify the power received.
Figure 7F represents light intensity collected from the sensor.
Figure 8 describes how the moving average algorithm can be applied to temperature data to obtain the predicted value of temperature. In the figure, the blue line represents actual data while the red line represents the moving average from previous sample data. It is visible that the actual and predicted data are approximately the same. Here we provide the value of temperature after 5 h, because it is an appropriate timescale for demonstration purposes. We can change that period as per our requirement.
Figure 9 describes how the moving average algorithm can be applied to humidity data, and a prediction was performed. In
Figure 9, the blue line represents actual data, while the red line represents the moving average from previous sample data. It can be seen that actual and predicted data are approximately the same. We show here the value of humidity after one hour.
Figure 10 describes how the moving average algorithm can be applied to light intensity for prediction. In the figure, the blue line represents actual data, while the red line represents the moving average from previous sample data. It can be seen that the actual and predicted data are approximately the same. We have found here the value of light intensity after 3 h.
Figure 11 describes how the moving average algorithm can be applied to rain status for prediction. In
Figure 11, the blue line represents actual data, while the red line represents the moving average from previous sample data. It can be seen that the actual and predicted data are approximately the same. We were able to find the value of rain after one day.
Figure 12 describes how the moving average algorithm can be applied to pressure to predict the atmospheric pressure available from the local weather service. It can be seen that the actual and predicted data are approximately the same.
We compared (shown in
Table 1) our model with two other recent comparable methods based on the multi-layer perceptron (MLP) [
17] and spatial spectral Schrodinger eigenmaps (SSSE) with support vector machine (SVM) [
18]. An MLP with four hidden layers was used for a data analysis and classification system [
17]. In another work [
18], SVM prefixed by SSSE was used as a prediction method wherein partial knowledge propagation was leveraged to improve the classification accuracy. The proposed moving-average-based method gave better results in terms of performance metrics [
19] such as sensitivity (65.8%), specificity (80.5%), precision (61%), negative predictive rate (83.5%), and accuracy (75.8%).
Modern agriculture utilizes computerized advances in numerous regions to upgrade the yield from fields. Robotized innovations are currently utilized principally for machine control and authoritative procedures. However, the advances of the Internet of things and cloud computing with machine learning are progressively moving into agribusiness, and enable the continuous control of farming exercises. The gathered information is compacted and offered to help growers use them in a smart, innovative, and analytical way in the right circumstance at the ideal time.