Keywords

1 Introduction

There has been no other time in the history of humanity’s development that has suffered as many changes as those that have happened in the last fifty years. Although technological development has brought great benefits, it is clear that these have not been distributed efficiently, increasing the inequality gap existing in already developed countries and those still in development.

Agriculture in its different forms is one of the methods used to guarantee a constant food flow. The impact it has had on humanity until today is clear, since it is the basis of past and current nourishment [1]. The generation of food security is given when people have constant physical and economic access to a sufficient amount of healthy, nutritious food, with which they can satisfy all their dietary needs and thus expect an active and healthy life [2].

The key aspects of food security are given by the availability of food referring to national or regional supply or production, the access to food understood as the ability to obtain food and the need to have resources for it and finally the use of food represented in the levels of nutrition obtained [2]. How much food security there is in a certain population can be known by making an analysis of said factors, and this can be a source of policies and programs that work to guarantee food security.

But today, achieving an efficient availability of food is undoubtedly linked to agricultural development and the management of production at different scales. However, this agricultural development that supplies the necessary food production is carried out through gigantic agroproductive operations with the capacity to supply these demands. Technological production directly impacts the use of vital resources such as water or the quality of the soil. This is mainly due to the need to use effective elements in pest control, fertilization and the extensive use of agrochemicals that affect the areas of influence of these crops [3].

Indeed, the need to face these environmental and economic challenges has made it necessary to look at other viable production alternatives to be created. This is how small crops begin to be an option at an environmental level: because they have used ancient crops techniques to interact with the environment, they cause little or no impact on it. This can ensure local food security where the communities are widely integrated for this purpose. At an economic level, production is specialized towards the native crops of each region and those effective for nutrition. This diminishes the need to use the classic crops that are previously supplied by large agricultural operations. This type of production is seen to a large extent in countries in development where they feed a large part of the population [4].

In this sense, the de-monopolization of the large agro-alimentary operations in the world is a valid approach for sustaining food security. Linking small farmers to this approach would ensure the integration of communities that could feed a huge number of people from their own self-supply, taking into account common socio-cultural aspects. This can achieve an effective use of the foods coming from each group of people.

In order to achieve the optimization and development of small crops, it is necessary to include technology in agriculture, since it can complement the knowledge acquired by farmers over generations. Making use of the knowledge they have earned, for example, balance can be achieved over combating pests using other insects and plants that allow nature to balance its environment and thus control other factors [4].

According to the above, this study intends to monitor environmental factors such as soil moisture, solar radiation, temperature and relative humidity, in order to maintain the ideal growth conditions of different types of crops. The proposal is the deployment of a monitoring and control system of these factors that allow obtaining data through devices that are used for the collection of information. These data are made available to the farmer through the use of technological platforms from the Internet of Things (IoT). The way the user interacts with the system is through a web application that provides permanent control and analysis of the information. The system allows generating the respective control alerts that can be received in a mobile app or in simpler cases by SMS-type messages. All this allows the small farmer to develop the necessary adjustments to the crop in real time, allowing to optimize its growth. By monitoring small crops, farmers not only improve the conditions of their crops, but also the possibility of implementing crop diversification by expanding the nutritional range with foreign crops. The following parts of this document analyze related studies in which the contributions related to the growth of crops are shown, such as precision agriculture that can be applied to this type of development with the incorporation of monitoring through the use of elements from the Internet of Things. Next, the initiatives for the development of this study are outlined. Then it is explained how the architecture of the system would be applied by studying the different processes that are used in the development of the proposed system. In the following part, the results that are related to the operation of the system and the different interaction with the user are discussed. Finally, the conclusions delivered by the development of the study are shown.

2 Related Work

The possibilities offered by systems based on the Internet of Things are directly related to its ability to allow its use in a number of sensors and devices. Through these sensors, it allows the development of a wide variety of applications with the possibility of taking the information obtained by these devices and making it available to users, according to their needs. This allows planning and controlling the development of the growth of different types of crops. With IoT applications, developing pollution control has been managed, as well as standardization and food control techniques and soil quality management among others with the purpose of increasing production and caring for public health [6].

The use of the IoT is currently linked to many fields of action. In cities, for example, it has increasingly become necessary to manage their basic infrastructure to improve the quality of life of its inhabitants. For example, there are studies that seek to implement environmental control platforms with the use of the IoT by obtaining, analyzing and controlling environmental variables in urban areas [7], in this case environmental data is collected through monitoring stations and then placed at the disposal of the authorities and the population.

In agriculture applications with the IoT, there are studies [8] that allow its use in small-scale crop optimization. The implementation of systems related to the monitoring of protected crops, in which the parameters that are involved with the growth and development of crops are analyzed, is based on the use of a network of sensors and actuators. These allow effective control by monitoring factors such as temperature, relative humidity, and volumetric water content in soil through a network of sensors and the use of IoT. The results of this study are reflected in the ease of application and control in crops. Low-cost production processes are compared to the poor configuration capabilities of the systems currently offered. In Europe, especially in the Mediterranean area, there is currently a broad growth of this type of crops and the possibility of applying systems like this.

There is another type of work that explores the development of a monitoring system of the IoT in precision agriculture for small-scale crops. The latter is understood as the art or science of using technology to improve crop production. This type of study resents the development of a prototype for a system that, based on a network of sensors and an IoT cloud, alerts the farmer when his crop must be irrigated. Once deployed, the wireless sensor network (WSN) cooperates with each of the other nodes of the same infrastructure autonomously to collect and transmit information to the base station [9].

The optimization of crops through the control of their environmental factors is presented with the development of a visual monitoring system for the estimation of water balance in vegetable crops using low cost camera systems. This allows the use of this sensor system to accurately estimate the water balance. This is achieved through the obtaining of images through a period of time. After its process, the percentage of greenness coverage (PCG) can be estimated. All this allows the system to calibrate the quantity of water that is needed for an optimal growth, allowing a substantial saving of this resource. The whole focus of this study is on the algorithmic process of the images, allowing knowing water consumption needs [10].

Regarding the control of environmental variables that can be used in the context of crop growth and optimization, focused on small areas, the implementation of a meteorological station in Acacias, Meta, where IoT and other tools are used, can be appreciated. This study seeks to provide techniques and tools in the design of autonomous devices, especially low cost and connected to the cloud, which serve in the development of intelligent systems aimed at the use of the Internet of Things [11].

3 Motivation

Colombia is currently in a situation where it is immersed in gigantic challenges to achieve development and get past difficult internal conflict, which have afflicted the country for decades. It is seeking to achieve social stability by trying to reach social equity. Based on this, programs that, in general, seek to consider countryside to make agricultural production one of the priorities have been developed. With this, the technological tools proposed in this study present viable alternatives to realize these purposes. The development of crops on a small scale makes it possible to deal more quickly with external factors that can strongly affect all aspects of food security, such as the decrease in production, crop growth and deficiency in nutritional quality. Among these factors, the slow but constant impact of global climate change can be highlighted.

Climate change begins to affect large-scale production, largely due to the decrease in vital resources such as water, soil quality, the unforeseen increase in solar radiation, and, as a consequence, bring imbalances in rainfall cycles and floods. The increase of arid areas where they did not exist before or with changes in the frequencies that appear in other areas can also be seen [5].

4 Proposal

This study shows the development of a system that allows the monitoring of small crops through the control of factors related to the growth and development of plants. For this purpose, a software architecture designed for the Internet of Things was designed, taking elements from precision agriculture, used in large-scale extensive crops and mass production, in order to be incorporated into small-scale agricultural production environments.

4.1 Theoretical Models Analyzed to Obtain the Samples

Soil moisture is one of the parameters that present a high need for control, since it is in the soil where all the growth of the plants that make up the crop takes place. Due to the different properties of the soil, it is necessary to know a general estimate of humidity, which represents a challenge, due to its lack of homogeneity. For the exploration of the different models destined for the estimation of data, multiple linear regression methods and some spatial correlation techniques have been incorporated by means of geostatistical methods. Some methods are described below.

Multiple Linear Regression Method. This statistical method adjusts a lineal function to a determined group of independent variables (given by Xj) approximating the dependent variable (Y) [12]. What is sought with this is the calculation of the values of the coefficients (\(\beta _{i}\)), as it can be appreciated in Eq. 1 below:

$$\begin{aligned} Y=\beta +\beta _{0}xX_{1}+\beta _{2}xX_{2}+ \dots \beta _{p}xX_{p}+\varepsilon \end{aligned}$$
(1)

In this case, the least squares method is used to estimate \(\beta _{i}\). Error is defined as sum of square differences [13]. For the model, it is required of the input variables to be explanatory in relation to the output variable.

After choosing the input variables that are representative of the output variables, the multicollinearity is analyzed using the inflation factor of the variance in a normal least squares regression analysis, as shown in Eq. 2.

$$\begin{aligned} FIV = \frac{1}{1-R^{2} _{i}} \end{aligned}$$
(2)

Once the variance inflation factor was obtained, the magnitude of multicollinearity was analyzed, considering the size of FIV(\(\beta _{i}\)). Where \(\text {FIV}(\beta _{i})>10\), it would have a high multicollinearity, where the values of the variables would not be reliable.

Inverse Distance Weighting Method (IDW). In this method, the sample points are weighted in the realization of the interpolation, developing this in such a way that the influence of one point in relation to the others decreases with the distance from the unknown point that is to be found.

This is achieved by weighting the points through the use of a weighting coefficient that will control the way in which the influence of the weighting is inversely proportional to the distance of the point to be predicted. Thus, the greater the weighting coefficient, the lower the effect that the points would have.

It is necessary to keep in mind that the quality of the interpolation result could decrease if it is found that the distribution of the data points of the samples is unequal, this can be seen in Eq. 3.

$$\begin{aligned} \hat{z}=\frac{\displaystyle \sum _{i=1}^{n} Z(x_i) .d^{-\alpha } _{ij}}{\displaystyle \sum _{i=1}^{n} d^{-\alpha } _{ij}} \end{aligned}$$
(3)

Estimation of Soil Moisture Using the Kriging Method. In the temporal space estimation models, the Kriging tool [14] is very useful for predicting data on a surface, as well as providing some measure of certainty or accuracy of predictions.

This is ideal for areas where it is difficult to collect samples due to the extension of the test field or the difficulty when extracting them. The possibility that this method presents is to determine the statistical relationships between midpoints by means of self-correlation, as they produce a higher prediction surface.

With the Kriging, it is possible to predict the distance or the direction between the different points of sample, which arrive to show a spatial correlation that comes to be used like explanation of the variation of the surface. This is achieved by adjusting a mathematical function to a certain number of sample points within a specific radius with which the output values of each sample area are determined.

The Kriging is given by the general formula that also has the interpolation process IDW, and is formed as a sum of data weighting (Eq. 4).

$$\begin{aligned} Z=\displaystyle \sum _{i=1}^{N} \lambda _i Z(S_i) \end{aligned}$$
(4)

The weighting will depend exclusively on the distance to the location of the prediction. It is important to note that the Kriging is based on the general spatial arrangement of the measured points.

This method allows generating the prediction of interpolation through the location of the rules of dependence and the realization of the prediction. For this, the creation of variograms and covariance functions is necessary, which allows to calculate the values of statistical dependence or spatial auto-correlation that later allow the adjustment of the model. Once this adjustment is made, it is necessary to make the prediction. The construction of the experimental semivariogram calculates the semivariancy of each point in relation to the others, which is given by Eq. 5:

$$\begin{aligned} v(h= d_{ip})= \frac{1}{2n}\displaystyle \sum _{i=1}^{n} (f_i-f_p)^{2} \end{aligned}$$
(5)

The Kriging tool shows its application, which is the prediction of attribute values in the locations that were not taken in the initial sample. When making the different predictions, the Kriging weights are used, which are given from the semivariogram. Then, for the realization of a continuous surface, the predictions are made for each point or location in the study area that are based on the semivariogram and the spatial disposition of the values that have been measured closely.

The result of this tool can be seen in Fig. 1, which shows a sample prediction map through the interpolation of data using regionalized variables.

Fig. 1.
figure 1

Schematic of interpolated data surface.

In Table 1, it can be seen that the most efficient method is the Kriging, because a structural analysis is performed using the correlation functions such as the variogram. These calculate the weighted averages of the sample observations that come from the description of the correlation of points in space, which allows estimating values in places lacking information.

Table 1. Characteristics of data interpolation methods.

4.2 Conceptualization of the Proposed Architecture

The architecture is located within a client-server organization, in which a structuring in the form of layers, deployed throughout the proposed system, can be seen.

Data Capturing. This is done through the permanent reception of the information from the respective sensor array of each station located in the monitored crop. The stations allow the connection through the use of IoT platforms in the cloud, using the MQTT protocol. In the same way, this also allows the management and calibration of the sensor system [15], so that later these data can be integrated to the following layers of systems.

Administration and Capture Processes. In this part, the main objective is the permanent collection of data made through the topics subscribed to each sensor in its respective arrangement. The protocol used in this layer comes from the family of M2M protocols [16], which is the MQTT protocol and allows the wireless and/or wired system to make the necessary connections. Information management is handled by an interface that collects the data sent by the device system.

Client Services Interface. The requests generated by the client, coming from the web interface, are sent to the next layer, in which the management of the system is processed. This layer also shows the responses of the different clients (web, mobile, webservice consumption, etc.), which are updated by HTTP protocol.

Administration and Management. Through the subscription of the PAHO-MQTT client to a broker of the Cloud-IoT platform, the link is made with the database to obtain the persistence of the data collected by the monitoring phase, which for this case may come from soil moisture, temperature, relative humidity and UV radiation.

The requirements of the clients are visualized in the interface thanks to the implementation of a Python script, which in turn implements OPS libraries. The submission topic is processed through a string that is the source of the data that becomes persistent in the system database, restarting the cycle of the new reading separated by a predetermined delay by the sensor array driver of the respective reading stations.

The underlying layer is responsible for the recovery and delivery of information. This will depend on the requirements made by users, as well as the arrangement of sensors. This process is handled by the system through the generation of queries. The organization of the system’s architecture can be seen in Fig. 2.

Fig. 2.
figure 2

System architecture.

Each station and its respective sensor array must verify the proper functioning through proper calibration tests. Then it proceeds with the reading of the data, originated in the process of monitoring the controlled factors and then they are sent using the Cloud-IoT platform, as can be seen in Fig. 3.

Fig. 3.
figure 3

Case of administration of sensor usage

The sequence of the sending and transmission process, originating in the reading of the array of sensors, goes through the system until achieving persistence in the base of data (Fig. 4).

Fig. 4.
figure 4

Sending and transmission process sequence

5 Results

Once the system is deployed, the data is obtained in real time and the update is developed automatically, allowing the user to verify the information in the web or mobile application. The view of the information in fact originates from the array of sensors, configured in scalar measurement format. The periodicity of reading for the collection according to the parameter to be measured is developed between one and thirty minutes.

This is due to the fact that the measurements vary according to the type of sensor, in this case for soil moisture a thirty-minute interval is determined, as well as the temperature, while the solar radiation is taken every minute. The process of generation of alerts is verified according to the design of thresholds for the adequate growth of crops, creating artificial conditions to force the development of alerts.

5.1 Case Study in Small Crops in Rural Area

For crops grown in areas far from urban centers or rural areas and where the deployment of mobile telecommunications infrastructure is lower, it has some disadvantage compared to the crops studied in the periphery of cities. This is mainly due to the limited coverage and capacity of the same network, allowing some processes, especially real-time ones, not to be exploited. For this case, two solutions are presented, one which allows the crop processing stations to issue short text messages (SMS), which can be received in any type of mobile terminal. This is possible even without Internet connection and only using the basic platform of mobile communication services, so that alerts can be sent via SMS messages almost in real time. This solution allows traditional farmers to achieve integration with the technological tools presented in the monitoring of small crops for the measurement of environmental factors through IoT. On the other hand, the other solution proposes the use of a dedicated connection link to the Internet through satellite service, which would require a more structured organization and infrastructure of production, due to the technical and economic needs required. These solutions seek to present different options to small farmers, both traditional and those who tend to their crops using more advanced technology. In Fig. 5, the deployment for rural areas can be seen.

Fig. 5.
figure 5

Implementation in rural areas.

This study explains the development of a small crop monitoring system through the control of environmental factors and the use of Internet of Things technologies. Data generated by the arrangement of sensors in the crop oriented by the different stations were collected and later sent to further processing through subscription to a Cloud-IoT and the use of MQTT protocol. The collection infrastructure is based on free hardware, using the Arduino platform to manage the sensors and raspberry pi to control the shipping logic.

In this step of information gathering, the use of different statistical tools such as multiple linear regression analysis was analyzed for the process of soil moisture data. However, the use of this tool would be difficult because this method needs to incorporate other input variables different from the soil moisture. It can be seen that the multiple linear regression method is useful for indirect estimation of soil moisture.

The other method that was analyzed was the use of geostatistics tools such as the inverse distance weighting (IDW) and the application of simple Kriging to estimate the soil moisture of the cultivation area. This last tool is efficient predicting the data of the points not taken in the sample and, since it depends on the average relation between points, the estimation of the data is much more accurate and reliable. Therefore, it is an indication that the sample taken when processed will deliver a realistic estimate of the soil moisture in the study area.

This study seeks the development of tools that take advantage of IoT technologies, allowing applying this type of systems in any crop, especially those of small scale. The analysis of the collated information allows an effective control of the growth of crops, anticipating elements that could end up damaging the final production. With the generation of alerts, it is possible to prevent the effect caused by sudden changes that may put the growth of crops at risk. The use of MQTT protocol, designed for those sensors that consume little energy and little bandwidth, increase the possibility of implementing the system in rural and remote areas and at low costs.

The possibilities that this type of systems suggest are the implementation of another element of the IoT, carrying out the automated control of irrigation systems, pest control, and verification by images of the moment of growth and harvest. In addition, this type of monitoring would help the implementation of foreign crops adapted to other climates that must have very precise conditions for their growth. Hence, it would be difficult to achieve their success without the use of this type of studies.