0% found this document useful (0 votes)
128 views14 pages

Design and Deployment of A Practical IoT Based Monitoring System For Protected Cultivations

Design and Deployment of a Practical IoT Based Monitoring System for Protected Cultivations

Uploaded by

cabean9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views14 pages

Design and Deployment of A Practical IoT Based Monitoring System For Protected Cultivations

Design and Deployment of a Practical IoT Based Monitoring System for Protected Cultivations

Uploaded by

cabean9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Computer Communications 186 (2022) 51–64

Contents lists available at ScienceDirect

Computer Communications
journal homepage: www.elsevier.com/locate/comcom

Design and deployment of a practical IoT-based monitoring system for


protected cultivations
Carlos A. Hernández-Morales a , J.M. Luna-Rivera a ,∗, Rafael Perez-Jimenez b
a
Facultad de Ciencias, Universidad Autonoma de San Luis Potosi (UASLP), San Luis Potosí, Mexico
b
IDeTIC, Universidad de Las Palmas de Gran Canaria, Las Palmas de Gran Canaria, Spain

ARTICLE INFO ABSTRACT


Keywords: According to the United Nations’ latest forecast, the world population will reach 8.5 billion people by 2030.
Internet of Things This rapid population growth imposes severe requirements in food production to meet demand. Moreover,
Smart agriculture the rise of temperatures and climate changes are also adversely affecting food supplies. In this paper, we
LPWAN
design a scalable IoT-based monitoring system with prediction capabilities for agricultural applications. It
Sensors
provides an effective four-layered architecture that consist of sensing, networking, processing, and applications
Monitoring
Prediction model
with low deployment and management costs. Hence, to demonstrate its feasibility, the proposed IoT system
Greenhouse micro-climate was constructed, experimentally tested, and validated by monitoring the temperature and humidity of a
commercial-size greenhouse in Mexico for six months. Additionally, we integrated a data-driven predictive
model for greenhouse microclimate conditions. Temperature predictions were accurately performed 24-hour in
advance within an error of 1 ◦ C. The obtained results confirm that the proposed IoT framework would facilitate
farmers to monitor crops and enable productivity gains by increasing the level of technology progressively.

1. Introduction ventilation, and the balance between plant transpiration and soil evap-
otranspiration. This factor contributes directly to problems such as root
Plant growing methods under artificially controlled conditions are and leaf diseases, plant stress, quality loss, among others in which the
becoming popular areas of technological development and innova- root and stem system may not be able to supply adequate water to the
tion [1]. The protected agriculture provides favorable weather condi- plant leaves. Concerning CO2 , the right doses have a positive effect on
tions to enhance the production levels of food through the full or partial both photosynthetic and water use efficiency. The additive effects could
control of the microclimate. To achieve this, large-scale commercial result in improved crop yields. Finally, light is another requirement
greenhouse structures and the application of advanced irrigation tech- for plant growth that influences the photosynthesis process, which
nologies are now commonly used to provide suitable environmental occurs only when light is absorbed by chlorophyll located mainly in
conditions with minimum labor. Among other advantages, it allows the the plant leaves. With excess direct light, the temperature increases,
development of crops outside of their natural cycle and in a shorter the transpiration of the plant increases, and therefore, the demand for
time, obtaining superior performance, better quality and greater control irrigation increases.
against pests and diseases. However, maintaining a suitable growing Over the last years, the proliferation of the Internet of Things (IoT)
environment within greenhouses can be complicated. There is a full has brought an extensive scientific literature. There are several archi-
combination of factors that influence plant growth, among the main mi- tectures, frameworks, or conceptual models for IoT systems proposed
croclimate parameters that have an important impact on plant growth by organizations, the academic community, and the business sector.
are for example temperature, relative humidity, the concentration of However, there is no single standard reference architecture for IoT
carbon dioxide (CO2 ), and light [2–4]. During the growing period of as it encompasses a variety of technologies [5–11]. Fig. 1 presents a
the crop, temperature is the variable that most influences the growth comparative of IoT patterns models existing in the current state-of-the-
of plants with a direct impact on their physiological processes. It also art. Particularly, the incorporation of IoT technologies for sustainable
affects the hormonal mechanisms involved in the flowering and fruiting agriculture has attracted significant attention [12,13]. More recently,
of plants. Another highly important factor for crop success is humidity. proof-of-concept studies of IoT solutions has become a research topic
The relative humidity is the amount of water vapor present in the of growing interest in the literature. Some of these related works are
air that is the result of condensation on the cover, vapor losses from discussed next.

∗ Corresponding author.
E-mail address: [email protected] (J.M. Luna-Rivera).

https://doi.org/10.1016/j.comcom.2022.01.009
Received 31 March 2021; Received in revised form 7 December 2021; Accepted 12 January 2022
Available online 20 January 2022
0140-3664/© 2022 Elsevier B.V. All rights reserved.
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 1. Comparison of layer-based IoT architecture reference models.

Yang et al. [14], implemented a three-layer IoT monitoring system of the WSN measurements for air temperature, relative humidity and
for indoor plant cultivation. Various sensors were deployed to collect leaf temperature. The distributed layout consisted of 5 Zolertia Z1
environmental data including temperature, humidity, luminosity, CO2 , wireless sensor nodes placed at the center, north, south, east and west
among others. In the data sensing layer, the IoT devices are able to of a half-hectare greenhouse. Obtained data from the wireless nodes
connect to the cloud service layer via a Wi-Fi network, and the collected were analyzed to represent the spatial variation of the greenhouse
data from sensors are shown through a user interaction layer consisting conditions. A cloud-based IoT Platform for enhancing the greenhouse
of an Android or web interface. In [15], the authors performed research microclimate has been presented in [22] by using a set of sensors con-
on developing a scalable network architecture for the application of nected to an Arduino Mega that forwards the collected data to a Wi-Fi
IoT technologies in agriculture. This study outlines the IoT challenges module (ESP8266). The end-user accesses the real-time data through a
and constraints for the agri-food sector with an overview of potential user interface provided by the commercial ThingSpeak cloud platform.
solutions involved in designing large-scale pilots. Khoa et al. [16], pro- The system is validated on a cucumber greenhouse. Another end-to-
posed a real-time monitoring watering management system for smart end IoT prototype has been introduced recently in [23] for greenhouse
agriculture. The focus was laid on the construction of a low-cost sensor monitoring. It deploys a WSN using LoRaWAN to transmit data over
network structure using a LoRa-based wireless communication system. long distances where the collected data are forwarded to the Things
The IoT system was validated in real farms in Vietnam during one- network. At the backend, it uses the MQTT protocol for implementing
week data acquisition campaign. Aafreen et al. [17] introduced a GSM a customized dashboard for data analysis and visualization.
based telemetric IoT system for measuring CO2 levels, light intensity More recently, the advancement on technologies such as cloud-
and humidity. This proposed system used the Blynk IoT platform to computing, big data, machine learning, unmanned aerial vehicle, etc.,
integrate the data sent by the sensors to the cloud, which includes a is clearly expanding the possibilities of IoT for smart agriculture. For
web application to the end-user. In addition, the same interface has instance, the authors in [24] discussed some relevant IoT agriculture
the possibility of activating different actuators inside the greenhouse research trends such as network architectures and layers, applications,
for control tasks such as soil irrigation, etc. In [18], the authors security, and the integration of cloud-computing, big data and analytics
presented a scalable network architecture for precision agriculture and technologies. Moreover, Misra et al. [25] presented an overview of
farming in rural areas. This IoT solution combines the existing wireless the impact of IoT, big data, and artificial intelligence technologies in
sensor network (WSN) concept with the WiLD Network to cover longer building future agri-food systems. These discussions are mainly focused
ranges. A cross-layer based MAC and routing solution was introduced around the sensor nodes, data processing, and the implementation
to reduce the network latency and improve throughput. The network challenges to monitor agricultural and food processes. On the other
architecture performance was evaluated and analyzed for both simula- hand, there are also works related to the prediction of the behavior of
tion and testbed scenarios. Geng et al. [19], proposed a four-layer IoT different climatic variables using information collected through mon-
system architecture for mobile greenhouse environment monitoring. As itoring systems such as sensor networks and meteorological stations.
compared to the traditional coverage problem in WSN, the authors used In [26], Chen et al. presented an IoT system for monitoring different
a mobile acquisition strategy with a Raspberry Pi serving as the data environmental variables in a greenhouse. The system monitors the
server and an Arduino as the master chip for the mobile system. All four light, air temperature and humidity, soil temperature, humidity, and
layers of the architecture were deployed on the mobile system, reducing CO2 concentration levels. These data are sent to the Internet using
the physical distances and data collection costs. To test the system, a NB-IoT network technology. In addition, the node-sensor has an Edge-
monitoring experiment was carried out in a real greenhouse over a computing model to generate alerts when the values of the climatic
week where data were collected every 30 s. Vu et al. [20], focused variables are outside the optimal ranges. A prediction model based on
on developing an automatic irrigation system for greenhouses. The ARIMA is also presented that forecasts the different variables in short
designed system used LoRa technology to overcome the shortcomings periods. It highlights that such a model improves its performance as
of transmission range in existing wireless sensor nodes, as those using the number of previous samples grows. Finally, a graphical interface
ZigBee communications. The system’s architecture implementation in- allows the user to view the different monitored parameters. This system
cluded End nodes to measure temperature, humidity, and soil moisture; was implemented in a greenhouse dedicated to the cultivation of straw-
a concentrator to forward the data sent by the end-nodes to a Web berries. A remote climate monitoring system for smart greenhouses is
Server via WiFi; and a Web Interface to integrate the functionalities of presented in [27] by Mellit et al. This system is capable of monitoring
remote monitoring and control. Konstantinos et al. [21] implemented environmental variables such as air temperature, air humidity, soil
a distributed monitoring system using a WSN in a commercial green- moisture, light intensity, and CO2 levels, as well as capturing images of
house. This system aimed at investigating the reliability and accuracy crops through a camera. The information is sent to the Firebase cloud

52
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Table 1
Analysis of some selected research works in the literature for protected agriculture.
Communication Machine Studies Purpose Limitations
technologies learning
Wi-Fi, Bluetooth, No [4,18,19,21, Greenhouse monitoring system based on existing wireless Coverage, lack of modularity and scalability, need additional
Zigbee 38,39], LAN technologies network devices, high power consumption.
[40,41],
4G, 3G, GPRS, No [17,42–45] Greenhouse monitoring system based on existing cellular Lack of modularity, cost, interoperability, autonomy,
GSM, technologies complexity
Hybrid Yes [12,15,17,22, Greenhouse monitoring system based on a combination of Lack of modularity, cost, interoperability, scalability,
27,29,34,46, existing wireless technologies and computing paradigms autonomy, complexity
47] (edge, fog, cloud)
LoRa, Sigfox, No [7,16,20,23, Greenhouse monitoring based on LPWAN technologies Lack of modularity, interoperability, need additional network
NB-IoT 28,48,49] equipment (LoRa)
LoRa, Sigfox, Yes [26,27,30,46, Greenhouse monitoring system based on LPWAN technologies Lack of modularity, interoperability, need skilled labor, need
NB-IoT 50] and computing paradigms (edge, fog, cloud) additional network equipment (LoRa)

platform through an ESP8266 WiFi module for storage and visualiza- • It proposes a practical and scalable IoT system applied to monitor
tion. In addition, a mobile application is developed using React-Native and control the microclimate factors in protected cultivations.
tools. The system can classify possible diseases in crops using a deep The IoT structure consists of a four-layered architecture which
convolutional neural network and send SMS alerts to a mobile phone includes a perception layer for gathering information of the green-
through a GSM module. In [28] an intelligent IoT-based energy sys- house, a network layer to make internet connections possible,
tem for controlling and monitoring greenhouse temperature has been a middleware layer to enable software and cloud services, and
designed. This system ensures that the greenhouse temperature reaches the application layer to deliver application-specific services to the
the desired references. Although the temperatures and energy consump-
user.
tion are recorded, it does not perform any prediction algorithm. Other
• It introduces a sensing coverage strategy based on the packing
strategies based on machine learning can also be found in [29–34]. For
density theory. This strategy would enable farmers to monitor
a more exhaustive review of related research studies in this domain,
crops remotely and facilitate productivity gains by increasing the
the reader is referred to the following surveys in [5–10,24,35–37] and
their references lists. Finally, Table 1 summarizes the state-of-the-art level of technology progressively. The IoT devices are directly
features and limitations of various relevant works within the field of connected to an LPWAN base station, using a star topology that
protected agriculture related to the current study. ensures immediate access to connected sensors, a long transmis-
Despite the recent advancements in IoT technologies, the implemen- sion range, low energy consumption, and low-cost deployment.
tation of IoT-based solutions in protected agriculture are still in their • It integrates a data-driven artificial neural network (ANN) pre-
early stages of development with many existing challenges limiting dictive method capable of forecasting a temperature trend with
their adoption. One of the main problems is, of course, to combat 24-h in advance. To the best of the authors’ knowledge, no
the weather conditions variability within the greenhouses due to the prediction technique in the literature provides a 24-h forecast for
strong impact on their productivity. It becomes then necessary to greenhouses. This model was successfully applied in a Mexican
place efficiently several measurement points within the fields to obtain tomato greenhouse, yielding temperature predictions within an
better information on the behavior of the environmental conditions error of 1 ◦ C using a few past inputs of the same temperature
inside a greenhouse. In addition, future agriculture will use advanced signal. This model demonstrates the potential of the proposed
technologies such as robotics, information and communication technol- IoT monitoring system to assist farmers with the operations and
ogy, artificial intelligence, etc. However, these new technologies are
strategic decision-making needed to optimize crop productivity
evolving very fast that they have become a challenging task to farmers
and resource-use efficiency.
or users who have a lot to learn. The amount of money that comes along
with such developments are not cheap. Moreover, tools for analysis The remainder of this paper is structured as follows. Section 2
and interpretation of data may further be required which is an added introduces the architecture of the proposed IoT monitoring system for
cost. Although, there is a need for using smart agriculture technologies smart agriculture. Section 3 describes the IoT system’s components
and despite all their benefits, they are still too expensive, complex and design and implementation. Section 4 validates experimentally the
lacking clarity about the point when the farmers’ investments pay off.
proposed IoT monitoring system by deploying this scheme in a tomato
Therefore, this work aims to increase knowledge and understanding of
greenhouse in Mexico. After deployment, experimental results verify
this current undergoing technological transformation in the agriculture
the effectiveness of the monitoring and forecasting climate conditions
sector.
of the greenhouse. Finally, Section 5 includes the conclusions of this
This paper presents the design and deployment of an IoT-based
monitoring system for protected cultivations using a scalable, mod- work.
ular, and low-cost system architecture. This architecture enables the
integration of an efficient coverage sensing strategy and a flexible 2. System architecture
structure to adopt the emerging computing paradigms (cloud, edge,
and fog computing). The system focuses on monitoring the microcli-
Fig. 2 shows the proposed multi-layer reference architecture for
mate conditions and disease risk factors in greenhouses. We built our
the IoT-based greenhouse monitoring system. This design contains four
customized IoT device and used the Sigfox network to forward the
data to the internet. The proposed middleware layer structure ensures layers, namely, the perception, network, processing (middleware), and
cloud interoperability by using a microservice-based architecture. We application layers. We highlight that this architecture design aims to
have designed and implemented our cloud IoT platform with a Web offer a compromise between the level of agility in the processes and
application for analysis and data visualization. The validation of the cost. That means the architecture allows monitoring a single variable
system was conducted during a trial of 6 months at a commercial-size or a complete process at a proportional cost. This structure will benefit
tomato greenhouse in Mexico. The main contributions of this paper can the farmers with low-tech or medium-tech greenhouses by increasing
be summarized as follows: the level of technology progressively.

53
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 2. Proposed four-layer architecture for the IoT-based monitoring system.

2.1. Perception layer This property will be of particular benefit if there is a need to do some
data processing locally. Nevertheless, we require upgrading at least
In general, the optimal conditions of plant growth will depend one of the IoT devices to an edge computing device within the sensor
upon the needs and requirements of each kind of plant. Therefore, coverage network to bring the processing power. But this last topic lies
an environmental monitoring system is a key to maximizing crop outside of the objective of this work, and we leave it for future work.
production effectively and sustainably. The perception layer represents Finally, we remark that our primary focus is to evaluate the func-
the sensors and connected devices that enable remote climate monitor- tionality and effectiveness of the proposed IoT system architecture as
ing. Typically, the microclimatic parameters that determine crop yield an indispensable tool to support the operations and strategic decision-
must be continuously monitored and controlled to ensure that an op- making for the emerging concept of smart agriculture. Therefore, a
timum environment is created. However, climatic heterogeneity inside complete analysis and understanding of all environmental factors af-
a greenhouse can cause significant differences in terms of quantitative fecting plant growth are beyond the scope of this work.
and qualitative characteristics of the plants, productivity, as well as the
development of several diseases. 2.2. Network layer
For our perception layer, we introduce a flexible, cost-effective, and
scalable sensor coverage strategy. Without loss of generality, we con- The communication technologies play an important role for a suc-
sider the problem of deploying a set of sensors with the same sensing cessful deployment of IoT systems. There are several standards for
range 𝑟 in a two-dimensional (2D) rectangular space of length 𝐴 and transmitting data between sensors and IoT platforms. They can be clas-
width 𝐵. The particular problem of finding the least number of circles, sified as short range wireless networks (e.g. Zigbee, Bluetooth, Z-Wave,
assuming that a circle represents the coverage area of each IoT device, WiFi, etc.) or long-range wireless networks (GPRS, 3G, 4G, and 5G).
is a classical NP-Hard problem that arises in many different fields. Short-range networks are very restrictive in offering a global coverage,
Fortunately, an exact solution to this problem is not required due to its whereas conventional long-range network solutions are expensive and
practical relevance. Instead of dealing with this not-obvious solution, with high power requirements. In consequence, IoT applications have
we use the circle packing theory to maximize the total coverage area driven the emergence of a new type of wireless technology called low
of the greenhouse while minimizing the number of IoT devices [51]. power wide area network (LPWAN) [52]. These new wireless commu-
The packing efficiency can be expressed as nication networks are better suited to machine-to-machine (M2M) and
𝑛𝜋𝑟2 IoT devices needs, where LoRaWAN, Sigfox and NB-IoT are among the
𝑃 (𝑟, 𝑆) = (1)
𝑆 leading LPWAN technologies for IoT deployments. Depending on the
where 𝑛 is the number of non-overlapping equal circles and 𝑆 the area use case, each business activity places different requirements on the
of the rectangle. This problem can be extended to cover a 3D space type of IoT connectivity specifications, such as coverage, throughput,
using sphere packing. packet size, power consumption, cost, etc.
Fig. 2 represents the design view of the physical components in the For the low-medium tech greenhouse application problem, it is
perception layer (leftmost side). It contains the hardware devices of critical to build connections that enable mainly the use of low-cost
the proposed IoT system as deployed in the greenhouse. Some envi- hardware, long-distance coverage, low-power consumption, and scal-
ronmental factors affecting plant growth are commonly temperature, ability. With these premises, the connectivity to the IoT devices of the
relative humidity, CO2 , light, and water. For the case study, the IoT proposed greenhouse monitoring system is implemented over a Sigfox
device includes only the temperature and relative humidity sensors network. Once the data is collected in the IoT device, it uses the LPWAN
which are connected over SPI interface and digital input, respectively, module to send data to the internet using the Sigfox network. The data
of an Arduino microcontroller. After that, our own LPWAN module that communication follows the sigfox protocol, where each device has a
can be mounted on top of the Arduino board enables the IoT device unique ID for routing and signing the messages. Table 2 summarizes the
to send data over the internet to an IoT platform using the Sigfox technical details of the sigfox communication protocol. This network
network infrastructure. All possible IoT devices that the network may infrastructure comprises base stations (gateways) that provide coverage
require for covering a specific area would be built in the same way. and a core network in charge of processing the messages and sending
However, it is also relevant to mention that the proposed IoT devices them through callbacks to the customer system. The reader is suggested
can communicate with each other and gather and share real-time data. to consult the available literature about Sigfox technology for a more

54
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Table 2
Overview of the Sigfox network technology.
Feature Sigfox
Standardization Private
Frequency Unlicensed (ISM)
Range 3–10 km urban/ 30–50 km rural
Modulation UNB/GFSK/BPSK
Channel bandwidth 100 Hz
Data transfer rate 100–600 bps
Payload 12 bytes (UL)/8 bytes (DL)
Regulated messages/day 140 (UL), 4 (DL)
Power efficiency Very high
Interference immunity Very High
Localization Yes (RSSI)

comprehensive understanding of the Sigfox support system. It is im-


portant to highlight those other LPWAN technologies, e.g. LoRaWAN,
NB-IoT, LTE-M, Weightless, etc., which can also be served as the net-
work layer solution in our proposed IoT framework. However, we have
opted for implementing Sigfox technology because it furnishes our IoT
system with autonomy, simplicity, and cost-efficiency, but also because
of our accumulated experience with the hardware of this technology.

2.3. Processing (middleware) layer


Fig. 3. Middleware architecture.
Changes in weather patterns derived from current global warming
will adversely affect crop production, including a substantial increase
in water demands. In consequence, there is a need to enhance the
capacity of the protected greenhouse systems for adaptation to these extreme temperatures. With the crop monitoring and prediction service,
unfavorable effects, especially for those low-cost or low and medium farmers can given the advantage of choosing adequate crops, planting
dates, resistant crop varieties, and in general, operating their systems
tech farms/greenhouses. The middleware layer, or service layer, is the
more effectively. In Section 3.3, we provide a data-driven solution by
step where the users’ services or software applications are created and
building a machine learning algorithm based on neural networks to
managed. The adoption of data analytics in agriculture is a challenge
predict in the short-term the temperature changes for the proposed
that involves engaging small and medium farmers in creating data
monitoring system.
processing services. Therefore, more information and work is needed
in the use of data analytics in agriculture to optimize the production
2.4. Application layer
cycle of crops.
In this context, we integrate a scalable middleware layer with
This last layer of the proposed architecture is the user interface of
the flexibility for the development, deployment, and operations of
the IoT system that allows monitoring, visualization and interpretation
software. Fig. 3 shows the integrated microservice-based middleware
of the data coming from the greenhouse sensors. In this case, a web
architecture for the proposed IoT system. We define three interface
application interface is developed and integrated to the Sigfox back-
modules, each with its specific purpose. First, the device interface
end platform via their application programming interfaces (API). The
component is the software that provides an interface to the IoT devices
network API’s integration are based on HTTPS REST requests (PUT,
on the monitoring system. The information received of each IoT device GET, DELETE or POST) and provides the interface from the protocol
is then stored in the database management system (DMS) by the Engine. stack to the application. Therefore, our web application retrieve the
In this work, we implemented an interface for communications in the collected measurements from the greenhouse sensors by triggering calls
RESTful API that serves to interact with the backend of the Sigfox through the Sigfox REST API. For demonstration purposes, we have
network. Then, the learning system component is the software that built a simple web-based application which works as a bridge between
provides the interface for developing machine learning algorithms. the implemented IoT system and the user interface. A description of
Thus, the collected data from the IoT devices are processed and ana- the implemented web-based application architecture is presented in
lyzed over time for making short-term and long-term predictions of the Section 3.4.
environmental conditions in the greenhouses. The availability of this
prediction service will enable improvements in operational greenhouse 3. Implementation of the IoT-based monitoring system
productivity by applying cost-effective adaptation measures, more effi-
cient water use, cost management reduction, among others. The User 3.1. Perception layer
interface component is the software that implements the end-user web
application. This component allows users to interact in a friendly man- The perception layer is composed of every single node, named IoT
ner, through a web application (registration rules, data visualization, device, that will be used for gathering and monitoring information
etc.), with the data generated on the IoT system. Finally, the proposed of the environmental conditions in the greenhouse. Fig. 4 presents
IoT middleware layer offers a modular architecture with the ability to the IoT device built to monitor the temperature and humidity in the
interact with other instances to consume provided services. greenhouse. This prototype comprises four main components: a power
Temperature and humidity are important variables in the green- supply unit, our own multipurpose LPWAN communication module,
house climate that need to be monitored. Greenhouse temperature and the temperature and humidity sensors. It can be powered by
operational ranges depend on the type of crop, but the high and low either battery or mains electricity. The LPWAN communication module,
temperatures influence the production of the crops. The reduction of shown in a yellow rectangle in Fig. 4, enables wireless connection to
crop products, as well as their quality, will cause significant economic the cloud, through the Sigfox network service, and has the following
losses to farmers, so they must take preventive measures to avoid features:

55
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 4. Hardware for the prototypes of the IoT devices. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

• MCU programmable via JTAG interface If the temperature obtained from (3) is negative, then the following
• Sigfox compatible radio chipset polynomial approximation is used
• Arduino UNO compatible
𝑇𝑐 = −242.02 + 2.22𝑅𝑅𝑇 𝐷 + 2.58 × 10−3 𝑅2𝑅𝑇 𝐷
• Programmable Push Button
• Four general-purpose input/output (GPIO) − 4.82 × 10−6 𝑅3𝑅𝑇 𝐷 − 2.81 × 10−8 𝑅4𝑅𝑇 𝐷 +
• 1.9 V–3.3 V operating voltage 1.52 × 10−10 𝑅5𝑅𝑇 𝐷 . (4)
• Very low current consumption in Standby Mode (4.5 μA)
To get a good precision with the PT1000 sensor, we used the
As mentioned previously, the IoT device includes two sensors to Adafruit RTD sensor amplifier MAX31865 to read the low resistances.
monitor the temperature and humidity in the air of the greenhouse. The following modifications are required to connect the three-wire
These are the temperature sensor PT1000 and the humidity sensor PT1000 to the MAX31865:
DHT21. Despite DTH21 having an integrated temperature sensor, we
have opted to use the PT1000 to ensure a faster response time and • Solder closed the jumpers labeled 2/3 Wire
more accuracy. Generally, the choice of sensors for the IoT system • Cut the thin trace in between the jumper labeled 2 4 (just above
will require a given specification involving a tradeoff between cost and Rref resistance) and the jumper on the right side
• Solder closed the jumpers label 3 with the terminal block on the
precision. Next, we describe the two implemented sensors.
left side.
Temperature sensor
Fig. 5 shows the MAX31865 module with the required modifica-
The precision three-wire PT1000 sensor, shown in Fig. 4, is a plat-
tions. In this way, it is now possible to connect the wires with the
inum resistance temperature detector (RTD) that modifies its resistance
same color of the three-wire PT1000 sensor in the terminal on the right,
value as the temperature varies. The transfer function of the PT1000 is
and the wire of different color is connected to the terminal on the left.
given by [53]
The corresponding wiring diagram to connect the PT1000 temperature
{
𝑃1 (𝑇𝑐 )𝑅𝑟𝑒𝑓 for 𝑇𝑐 ≥ 0 ◦ C sensor to the MAX31865 module, and then to Arduino UNO, is shown
𝑅𝑅𝑇 𝐷 (𝑇𝑐 ) = (2) in Fig. 6(a).
𝑃2 (𝑇𝑐 )𝑅𝑟𝑒𝑓 otherwise
Humidity sensor
where 𝑃1 (𝑇𝑐 ) = 1+𝛼1 𝑇𝑐 +𝛼2 𝑇𝑐2 and 𝑃2 (𝑇𝑐 ) = 1+𝛼1 𝑇𝑐 +𝛼2 𝑇𝑐2 +𝛼3 (𝑇𝑐 −100).
Finally, sensor DHT21 is used with a digital interface to measure
In (2), 𝑅𝑅𝑇 𝐷 is the resistance value of the sensor, 𝑅𝑟𝑒𝑓 the reference
humidity. It incorporates a capacitive sensor to measure the percentage
value of the resistance at 0 ◦ C, which for the case of PT1000 is 1000
of relative humidity in the air, and a microcontroller for converting
Ω, 𝑇𝑐 the temperature variable, 𝛼1 = 3.9083 × 10−3 , 𝛼2 = −5.775 × 10−7
analog to digital values. It has a measuring range for humidity from 0
and 𝛼3 = −4.183 × 10−12 . There are various methods for calculating the
to 100% with a relative humidity accuracy of +∕−3% and a resolution
temperature through the resistance of the RTD detector. In this case,
of 0.1%. The physical appearance of the DHT21 can also be seen in
we use the direct method of solving the quadratic equation in (2), for Fig. 4 which includes a protective case. This sensor uses a single-bus
𝑇𝑐 ≥ 0 ◦ C, which results in communication (1-Wire), and for each measurement transmission, the

𝑅 sensor sends a data frame of 40 bits (5 bytes) consisting of 16 bits to the
−𝛼1 + 𝛼12 − 4𝛼2 (1 − 𝑅𝑅𝑇 𝐷 ) relative humidity value, 16 bits to the temperature value, and 8 parity
𝑟𝑒𝑓
𝑇𝑐 = . (3) bits. The DHT21 sensor is powered up with a voltage of 3.3 V to 5 V,
2𝛼2

56
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

In this work, we follow the specific data frame format of the


Sigfox protocol to send the collected data from the temperature and
relative humidity sensors to the cloud. Fig. 8 shows the uplink data
frame structure implemented in our IoT device. It allows to send a
maximum data payload up to 12 bytes for uplink messages and 8 bytes
for downlink messages. The bandwidth available for each message is
100 Hz wide which allows to transmit at a data rate of 100 or 600 bits
per second. In addition, we remark that the IoT devices are limited to
transmit with a maximum frequency of 140 uplink messages, and 4
downlink messages, per day to the sigfox network, this is because of
the unlicensed spectrum regulations. Finally, the flowchart in Fig. 9
shows the data transmission process towards the Sigfox network. Once
the data is received by the Sigfox backend, it will automatically be
forwarded to the IoT platform using callback services.

3.3. Prediction

In recent years, artificial neural networks (ANN) are becoming


increasingly used for the prediction of climatic variables inside green-
houses. ANN techniques are a family of mathematical models that
Fig. 5. Modifications required to use the MAX319865 module. follows the principles of the biological neuron functions, whose most
significant property is their ability to learn from data [54,55]. They are
usually arranged in layers and connected in a network architecture [32,
and connected directly to the LPWAN communication module as shown 33]. Other ML-based approaches may be used to forecast the climatic
in Fig. 6(b). variables such as support vector machine, genetic models, fuzzy logic,
and including other neural networks-based methods. However, the
Coverage area
ANN model has shown to offer a good compromise among performance
Because of local weather variations and the level of technology
and complexity for this problem, with the advantage of a structure that
used, there is uncertainty regarding whether the data measured at a
particular location accurately represents the entire greenhouse environ- is simple to implement.
ment. Therefore, the problem for the physical layer consists of deciding In this section, we develop a data-driven (supervised) learning
the number of sensors that are needed and their locations to map solution through the middleware layer to forecast the temperature
the environmental condition of the entire greenhouse with the desired changes in a greenhouse. We built our prediction model using a three-
precision and cost. In this work, we give an heuristic lower bound to layer ANN (input, hidden and output) [54]. This structure follows the
this problem by following the packing efficiency presented in Eq. (1). Kolmogorov theory that establishes that any continuous function can be
To achieve this, we first gauge experimentally the variations of the approximated by a network with a single hidden layer [55]. The three-
temperature values measured by two different IoT devices, each one layer feed-forward ANN has the structure shown in Fig. 10. Thus, the
using a PT1000 sensor. The first device was placed at a fixed point, temperature prediction at time 𝑚 is expressed as
and measurements were taken as the second device was moving away. ∑
𝑀
Fig. 7 shows the mean, 𝜇, and standard deviation, 𝜎, of the temperature 𝑥[𝑚]
̂ = 𝑤(2)
𝑗,1
𝜙(𝑎𝑗 ) (5)
error measurements in terms of distance, up to 40 m. We observe that 𝑗=0
the temperature variations reach an error of 1.5 ◦ C within the first 12 with
m, and then it continues growing but with a smaller slope. The mean {
error attained within the maximum distance measured did not exceed 0 if 𝑗 = 0,
𝑎𝑗 = ∑𝑁 (1) 𝑇 (1)
(6)
the value of 2.5 ◦ C. Based on these results, we are able to obtain a lower 𝑖=0 𝑤𝑖,𝑗 𝑥[𝑖] = 𝐱 𝐰𝑗 otherwise.
bound for (1) given a trade-off among accuracy (maximum tolerated
where 𝜙(𝑎𝑗 ) is the output from the 𝑗th neuron with activation function
errors), the number of IoT devices packed in the greenhouse of interest
𝜙(𝑎𝑗 ) = tanh(𝑎𝑗 ), 𝐱 = (1, 𝑥[1], … , 𝑥[𝑁])𝑇 the vector of input signals, and
(costs), and coverage (packing density).
𝐰 = {𝐰1(𝑙) , … , 𝐰(𝑙)
𝑀
}, with 𝐰(𝑙) (𝑙) (𝑙) 𝑇
𝑗 = (𝑤1,𝑗 , … , 𝑤𝑁,𝑗 ) for 𝑙 = 1, 2, the sets
of all weight and bias parameters in the network. The transpose of a
3.2. LPWAN communication
vector is denote by ()𝑇 . For simplicity, we used an equivalent notation
to include the weight (𝑤𝑖,𝑗 ) and bias (𝑤0,𝑗 ) parameters in vector 𝐰,
LPWAN networks have been designed to achieve long-range com-
munications at a low-power cost, high scalability, real-time communi- but considering an additional input signal 𝑥[0] that is always set to 1.
cation, and a low bit-rate. With such attributes, LPWAN technologies The identity activation function 𝑓 (𝑧) = 𝑧 determines the overall output
are among the best suited wireless communication protocols for pro- of the neural network. Lastly, the network is trained with a gradient
tected agriculture. As previously mentioned, the Sigfox technology is back-propagation algorithm to calculate the gradient of the error [55].
used in this work. It is a global network provider that connects devices
with a large coverage and a relative low cost. The sigfox network archi- 3.4. User interface
tecture consists of two layers: one-hop star topology to gather data from
the IoT devices; and a second layer that is responsible to process data The implemented IoT monitoring system allows users to access
messages delivered from the base stations (gateways) which are then information about the climatic conditions of the greenhouse via a web
sent to the client application server. Sigfox operates in the industrial, application. To create the user interface app, we followed the flex-
scientific and medical (ISM) licence-free frequency bands, providing ible Model-View-Controller (MVC) design pattern whose architecture
long-range communications (3−10 km urban, 30−50 km rural) using the is shown in Fig. 11. Basically, this framework comprises the relation-
3D-UNB protocol. UNB takes advantage of random access techniques ships and interactions between the application components and the
in time, frequency and space to reduce the power consumption and middleware layer (see Fig. 3). The following tasks are built-in the Web
complexity of the end device. Application:

57
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 6. (a) PT1000 temperature sensor wiring diagram, (b) LPWAN module interfacing with DHT21 sensor.

Fig. 7. Mean and standard deviation of the temperature error measurements at various distances.

Fig. 8. Uplink data frame format.

58
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

aims to provide insights into the current understanding of new IoT


technologies and their impact to existing production methods.
The size of the studied greenhouse is approximately two hectares
with 𝐴 = 126 m in length and 𝐵 = 162 m in width. Thus, we
can calculate the packing density of IoT devices in the greenhouse
by following Eq. (1). It can be shown that for 𝑛 = 5 and a sensing
radius of 35 m per device, the packing efficiency yields 94% coverage
in the greenhouse for 𝜎 < 2 (standard deviation of the temperature
error variations). We deployed the proof of concept of the IoT system
with only one single IoT device connected to the electricity mains
available in the greenhouse of study. Figs. 12 and 13 show a view of
the greenhouse used as a case of study, and the IoT sensor device which
was placed in the center of the greenhouse. The collected measurements
from the temperature and humidity sensors were transmitted, via the
Sigfox protocol, to a cloud server to support data storage and signal
processing. A Web user interface application was also developed for
real-time monitoring, interpretation and visualization. Fig. 14 shows
the resulting measurements dataset over the web user interface. The
temperature and humidity measurements were collected every 10 min,
with the total equivalent to 144 samples per day, for a period of 203
days between march and october 2019. However, due to some commu-
nication, power or other failures, there were missing samples. To solve
this problem, we estimate the missing samples by using the 2-nearest
neighbor as an imputation technique. During the monitoring period,
manual labor was used for climate control which included irrigation
and fogging systems, and manual side-wall windows for ventilation.

4.2. ANN training and testing

Fig. 9. Flow diagram of how to send messages to the Sigfox network.


The next step was to train the ANN to fit the prediction model
for the temperature inside the greenhouse and to test its performance
accuracy. It consisted of finding first the optimal set of parameters
• Real-Time Dashboard: It has a user interface that contains mul- that minimizes the loss function using back-propagation and SGD. In
tiple widgets with a simple but meaningful layout. This design this case, these parameters were first learned by training the ANN
allows us to keep on adding sections as we need it. model with a simulated dataset to avoid any artifacts from the real
• Collect and visualize data: The web app shows the collected measurement data. The following expression was used to generate the
data and stats in real-time from multiple IoT devices. simulated dataset for the temperature during a day
• Scalability: The web application has been tested with only a {
few IoT devices simultaneously. However, it can include a large ℎ[𝑘𝑇 ] + 𝜂[𝑘𝑇 ] for 𝑘𝑇 ∈ [𝑡𝑙 , 𝑡ℎ ]
𝑑𝑠 [𝑘𝑇 ] = (7)
number of IoT devices to meet the changing needs in the IoT ℎ[𝑘𝑇 ] otherwise
solution for protected agriculture. where ℎ[𝑘𝑇 ] = (𝐴 + 10) + sin (2𝜋𝑓 𝑘𝑇 ) − 𝐴 cos (2𝜋𝑓 𝑘𝑇 ) with 𝐴 = 15,
• Multiple accounts: Multiple users can be added to the client’s 𝑓 = 1, and 𝑇 = 1∕143, for 𝑘 = 0, 1, … , 143. This is equivalent to
account. acquire a total of 144 samples daily, i.e. every 10 min. The choice
We have aimed the end-user web application interface to be easy to use of (7) was made to mimic the circadian behavior of the temperature
and easy to integrate with the proposed IoT system. This user interface inside the greenhouse. To handle the variability of the manual methods
allows farmers to monitor real-time and historical data of the climatic for the greenhouse climate control, we added random samples from a
conditions of the greenhouse, as well as access to prediction models, Gaussian distribution, 𝑁(0, 1), in two different intervals [0:00,5:00] and
over a web browser. [12:00,18:00]. Fig. 15 shows a comparison of the real and simulated
samples during a period of 24 h. Moreover, the best practices for
properly training the neural network is to normalize the dataset which
4. Validation results and discussion
makes it less sensitive to the scale of features. Therefore, we normalized
the simulated dataset prior to training the ANN model as follows
4.1. Deployment: A case study [ ]
𝑑 [𝑘𝑇 ] − 𝑑𝑚𝑖𝑛
𝑑̄𝑠 [𝑘𝑇 ] = 𝑠 (𝑟𝑚𝑎𝑥 − 𝑟𝑚𝑖𝑛 ) + 𝑟𝑚𝑖𝑛 (8)
The proposed IoT monitoring system was deployed in a low-cost and 𝑑𝑚𝑎𝑥 − 𝑑𝑚𝑖𝑛
low-technology greenhouse dedicated to tomato production in Soledad where 𝑑𝑚𝑎𝑥 and 𝑑𝑚𝑖𝑛 are the largest and smallest values in the dataset,
de Graciano Sanchez, San Luis Potosi, Mexico. Tomato crops account with 𝑟𝑚𝑎𝑥 = 1 and 𝑟𝑚𝑖𝑛 = −1 as the maximum and minimum values for
for about 55% of the vegetables grown under protected agriculture the mapping range.
in our country. In general, the optimal temperatures for tomato de- Thereby, we generated a simulated dataset for a full year (365 days)
velopment during the day are 21–29 ◦ C and 18–21 ◦ C at night [56], and split it into the training and testing sets with a proportion of 75%–
and relative humidity of 70%. However, low-tech or medium-tech 25%. After training completes, the accuracy of the optimized weights
greenhouses hardly maintain these variables within these ranges, like and biases of the ANN were evaluated on the test dataset. We used the
our study case. Alternatively, farmers focus on avoiding temperatures mean absolute error (MAE) and the root means square error (RMSE)
below 15 ◦ C and above 35 ◦ C and humidity below 50% [56,57], which between the 𝑚th actual value, 𝑥[𝑚𝑇 ] = 𝑑𝑠 [𝑚𝑇 ], and the predicted value
are the values that start altering the development of the tomato and 𝑥[𝑚𝑇
̂ ] to measure and compare the ANN’s accuracy while performing
usually cause poor fruiting. We highlight that our quantitative analysis hyperparameter tuning [31,32]. Finally, the prediction outputs are

59
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 10. Structure of the proposed three-layer neural network.

Fig. 11. Web application for the proposed IoT monitoring system: (a) Architecture and (b) sitemap.

denormalized at the end of the ANN to compare them with the unscaled Table 3
simulated data. Error variations in terms of the number of inputs (𝑁) and the number of neurons (𝑀)
in the hidden layers of the ANN.
We started the evaluation by setting up a grid search of the hyper-
M 1 2 4 8 12
parameter values (𝑁, 𝑀) and for each combination, trained the model,
and scored the performance results. Table 3 shows the error variations N MAE RMSE MAE RMSE MAE RMSE MAE RMSE MAE RMSE

results when performing a grid search for the finite sets of values 𝑀 1 1.13 1.54 1.05 1.54 1 1.52 0.97 1.5 1.05 1.52
2 1.05 1.38 1 1.38 0.98 1.35 0.91 1.3 0.9 1.3
∈ {1, 2, 4, 8, 12} and 𝑁 ∈ {1, 2, 4, 6, 8, 10, 12, 14}. We observe that the
4 0.84 1.30 0.82 1.3 0.81 1.28 0.78 1.26 0.78 1.27
lowest error is achieved with the pair of hyperparameters (𝑁 = 8, 𝑀 = 6 0.81 1.24 0.8 1.22 0.79 1.22 0.75 1.16 0.75 1.16
8) in the ANN. It can also be seen in Table 3 that the RMSE results were 8 0.77 1.17 0.75 1.16 0.74 1.16 0.72 1.15 0.74 1.17
higher than MAE due mainly to the noisy samples. 10 0.78 1.18 0.78 1.17 0.76 1.16 0.72 1.16 0.72 1.16
12 0.77 1.18 0.77 1.17 0.76 1.17 0.74 1.16 0.74 1.16
14 0.81 1.21 0.81 1.2 0.78 1.19 0.77 1.2 0.8 1.24
4.3. Prediction results using real measurements

Let us now validate the predictive performance and accuracy of days, see the samples in Fig. 14. In the same manner as before, we
the ANN’s model using the real-time measurements generated by the split the dataset with the real measurements into training and test
implemented IoT-based monitoring system. A total of 29,232 samples sets using a 75:25 ratio, and selected the optimal ANN architecture
were collected from the IoT sensor device during a period of 203 based on the previous results with the simulated dataset, i.e. the ANN

60
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 12. Case study: greenhouse interior with tomato crop.

Fig. 13. Case study: IoT device located inside the greenhouse.

structure implemented had 3-layers, 𝑁 = 8 variables in the input layer, 20 epochs for 𝜆 = 0.015. Notice how quickly the model is adapted to
𝑀 = 8 neurons in the hidden layer, and one node in the output the temperature prediction problem.
layer. Thus, the ANN learned the optimal weights and biases from The prediction accuracy evaluations for the implemented IoT-based
the normalized time-series input data received from the temperature greenhouse monitoring system are listed in Table 4. These results show
sensor. Our prediction model was used for one day-ahead temperature
higher accuracy when the testing dataset was 51 days, the maximum
forecasting whose inputs corresponds to the samples collected at the
number of samples available for testing (25% of the total 203 days).
same time during the last 8 days. As a strategy, we tested different
Notice that predicting the temperature with real measurements had a
input selection approaches to enhance the reliability and accuracy of
slightly lower accuracy than using simulated samples. For example, the
the prediction model based on a small number of observation samples.
Taking the temperature samples during consecutive days, at the same MAE rises from 0.72 (simulated) to 0.98 (real). However, this effect
time, allowed us to reduce the variance of the input samples for the may be caused by the sudden changes of the real-valued temperature
prediction model. For example, the temperature forecast for next day at samples. This variability was partially yielded by the climate-control
11:00 h will require to input the samples collected from the greenhouse system, which operated manually and in a non-systematic way. Fi-
at 11:00 h in the last eight days. Tuning the learning rate helped to nally, the consistency achieved by the prediction results is illustrated
improve the training efficiency. We used learning rate decay from 0.8 in Fig. 17. Here, the predicted values are compared to the actual
to 0.01. The behavior of the loss function can be seen in Fig. 16 over temperature measured by the IoT system during a period of one week.

61
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 14. Temperature (red line) and Humidity (blue line) measurements. (For interpretation of the references to color in this figure legend, the reader is referred to the web
version of this article.)
which provided an efficient trade-off between costs and accuracy (max-
imum tolerated errors). For our case study, it is shown that 94% spatial
coverage can be achieved with only 5 IoT devices for a greenhouse of
two hectares.
We have also investigated how the IoT system can be further
developed to integrate the emerging concepts of smart agriculture.
In particular, we implemented a data-driven prediction modeling for
the microclimate in the greenhouse using an artificial neural network.
These results showed that the ANN model can be successfully used for
making a temperature forecast over a 24-h period with a simple three-
layer ANN of 8 neurons in the hidden layer. It was able to model the
future values of the internal greenhouse temperature (with MAE values
less than 1 ◦ C) simply from the past 8 inputs of the same temperature
time-series. Compared to other similar solutions in the literature, the
proposed IoT framework is more flexible, and it includes the main
features to optimize productivity and sustainability. Further studies
will be focused on performing experimental validations for the spatial
monitoring strategy proposed in this work using the packing efficiency,
which provides an effective and practical trade-off for maximizing the
coverage area with the minimum number of sensors. Another relevant
future research direction is the implementation and evaluation of spe-
cific operations and/or strategic decision-making using the proposed
Fig. 15. Simulated and real data for the temperature in the greenhouse during a period IoT system’s architecture.
of 24 h.

Table 4 CRediT authorship contribution statement


Prediction accuracy of the implemented IoT-based monitoring system.
38 days 40 days 46 days 51 days Carlos A. Hernández-Morales: Investigation, Developed software,
MAE 1.79 1.06 1.02 0.98 Performed the experiment, Validation, Analyzed the data, Writing.
RMSE 2.78 1.68 1.61 1.57 J.M. Luna-Rivera: Investigation, Conceptualization, Methodology, An-
alyzed the data, Supervision Writing, Resources. Rafael Perez-Jimenez:
Investigation, Reviewed and edited the final draft.
5. Conclusions
Declaration of competing interest
In this paper, a practical IoT-based monitoring system solution is
The authors declare that they have no known competing finan-
presented for smart agriculture, which is designed and implemented
cial interests or personal relationships that could have appeared to
to provide optimal conditions and cost effective solutions for plant
influence the work reported in this paper.
growing methods and greenhouse life cycles. We discussed in detail
our system design and deployment, along the application of machine Acknowledgments
learning for environmental prediction. For more than 6 months, the IoT
system was experimentally validated by monitoring temperature and All authors have read and agreed to the published version of the
humidity in a greenhouse of tomato crop in Mexico. The system avail- manuscript.
ability percentage during this period was 92%. We highlight though
that the missing samples were mainly caused by human errors (unin- Funding
tentional actions of greenhouse workers). Since climatic conditions may
vary from the greenhouse center to its sidewalls, and from the floor to This research was supported by CONACYT, Mexico, under grant
the ceiling levels, we adopted a practical sensors’ deployment strategy 236188.

62
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

Fig. 16. Variation of the loss function with a number of iterations (epochs).

Fig. 17. Temperature inside the greenhouse and predicted temperature.

References [10] Yogeswaranathan Kalyani, Rem Collier, A systematic survey on the role of cloud,
fog, and edge computing combination in smart agriculture, Sensors 21 (17)
[1] Genhua Niu, Joseph Masabni, Plant production in controlled environments, Hor- (2021) 5922, http://dx.doi.org/10.3390/s21175922.
ticulturae (MDPI) 4 (2018) 28, http://dx.doi.org/10.3390/horticulturae4040028. [11] O. Araujo Sara, Ricardo S. Peres, Jose Barata, Fernando Lidon, Jose C. Ra-
[2] D.T. Santosh, K.N. Tiwari, Vikas Kumar Singh, A. Raja Gopala Reddy, Micro malho, Characterising the agriculture 4.0 landscape—Emerging trends, challenges
climate control in greenhouse, Int. J. Curr. Microbiol. Appl. Sci. 6 (3) (2017) and opportunities, Agronomy 11 (4) (2021) 667, http://dx.doi.org/10.3390/
1730–1742, http://dx.doi.org/10.20546/ijcmas.2017.603.199. agronomy11040667.
[3] E.M. Khah, H.C. Passam, Flowering, fruit set and development of the fruit and
[12] Salinee Santiteerakul, Apichat Sopadang, Korrakot Yaibuathet Tippayawong,
seed of sweet pepper (Capsicum annuum L.) cultivated under conditions of high
Krisana Tamvimol, The role of smart technology in sustainable agriculture: A
ambient temperatures, J. Hortic. Sci. 67 (1992) 251–258, http://dx.doi.org/10.
case study of wangree plant factory, Sustainability (MDPI) 12 (4640) (2020)
1080/00221589.1992.11516245.
http://dx.doi.org/10.3390/su12114640.
[4] R.K. Kodali, S.C. Rajanarayanan, L. Boppana, Iot based weather monitoring
and notification system for greenhouses, in: 11th International Conference on [13] Y. Liu, X. Ma, L. Shu, G.P. Hancke, A.M. Abu-Mahfouz, From industry 4.0 to
Advanced Computing (ICoAC), Chennai, India, 2019, pp. 342–345, http://dx. agriculture 4.0: Current status, enabling technologies, and research challenges,
doi.org/10.1109/ICoAC48765.2019.246864. IEEE Trans. Ind. Inf. (2020) http://dx.doi.org/10.1109/TII.2020.3003910.
[5] Xiaojie Shi, Xingshuang An, Qingxue Zhao, Huimin Liu, Lianming Xia, Xia Sun, [14] Jun Yang, Mengchen Liu, Jiayi Lu, Yiming Miao, M. Anwar Hossain, Mo-
Yemin Guo, State-of-the-art internet of things in protected agriculture, Sensors hammed F. Alhamid, Botanical internet of things: Toward smart indoor farming
19 (8) (2019) 1833, http://dx.doi.org/10.3390/s19081833. by connecting people, plant, data and clouds, Mob. Netw. Appl. 23 (2018)
[6] V.P. Kour, S. Arora, Recent developments of the internet of things in agriculture: 188–202, http://dx.doi.org/10.1007/s11036-017-0930-x.
A survey, IEEE Access 8 (2020) 129924–129957, http://dx.doi.org/10.1109/ [15] Christopher Brewster, Ioanna Roussaki, Nikos Kalatzis, Kevin Doolin, Keith Ellis,
ACCESS.2020.3009298. IoT In agriculture: Designing a europe-wide large-scale pilot, IEEE Commun. Mag.
[7] Gaia Codeluppi, Antonio Cilfone, Luca Davoli, Gianluigi Ferrari, LoRaFarM: A
55 (9) (2017) 26–33, http://dx.doi.org/10.1109/MCOM.2017.1600528.
LoRaWAN-Based smart farming modular IoT architecture, Sensors 20 (7) (2020)
[16] Tran Anh Khoa, Mai Minh Man, Tan-Y. Nguyen, VanDung Nguyen,
2028, http://dx.doi.org/10.3390/s20072028.
[8] R.K. Singh, R. Berkvens, M. Weyn, Agrifusion: An architecture for IoT and Nguyen Hoang Nam, Smart agriculture using IoT multi-sensors: A novel watering
emerging technologies based on a precision agriculture survey, IEEE Access 9 management system, J. Sens. Actuator Netw. (MDPI) 8 (2019) 45, http://dx.doi.
(2021) 136253–136283, http://dx.doi.org/10.1109/ACCESS.2021.3116814. org/10.3390/jsan8030045.
[9] S.I. Hassan, M.M. Alam, U. Illahi, M.A. Al Ghamdi, S.H. Almotiri, M.M. Su’ud, [17] R. Aafreen, S.Y. Neyaz, R. Shamim, M.S. Beg, An IoT based system for telemetry
A systematic review on monitoring and advanced control strategies in smart and control of greenhouse environment, in: 2019 International Conference on
agriculture, IEEE Access 9 (2021) 32517–32548, http://dx.doi.org/10.1109/ Electrical, Electronics and Computer Engineering (UPCON), ALIGARH, India,
ACCESS.2021.3057865. 2019, pp. 1–6, http://dx.doi.org/10.1109/UPCON47278.2019.8980258.

63
C.A. Hernández-Morales, J.M. Luna-Rivera and R. Perez-Jimenez Computer Communications 186 (2022) 51–64

[18] N. Ahmed, D. De, I. Hussain, Internet of things (IoT) for smart precision [38] A. Vishwakarma, A. Sahu, N. Sheikh, P. Payasi, S.K. Rajput, L. Srivastava, IOT
agriculture and farming in rural areas, IEEE Internet Things J. 5 (6) (2018) Based greenhouse monitoring and controlling system, in: 2020 IEEE Students
4890–4899, http://dx.doi.org/10.1109/JIOT.2018.2879579. Conference on Engineering & Systems (SCES), 2020, pp. 1–6, http://dx.doi.org/
[19] X. Geng, et al., A mobile greenhouse environment monitoring system based on 10.1109/SCES50439.2020.9236693.
the internet of things, IEEE Access 7 (2019) 135832–135844, http://dx.doi.org/ [39] S.R. Prathibha, A. Hongal, M.P. Jyothi, IOT Based monitoring system in smart
10.1109/ACCESS.2019.2941521. agriculture, in: 2017 International Conference on Recent Advances in Electronics
[20] V.A. Vu, D.C. Trinh, T.C. Truvant, T.D. Bui, Design of automatic irrigation system and Communication Technology (ICRAECT), 2017, http://dx.doi.org/10.1109/
for greenhouse based on LoRa technology, in: Proc. International Conference on icraect.2017.52.
Advanced Technologies for Communications (ATC), 2018, http://dx.doi.org/10. [40] H. Andrianto, A. Suhardi Faizal, Development of smart greenhouse system
1109/ATC.2018.8587487. for hydroponic agriculture, in: 2020 International Conference on Information
[21] Konstantinos P. Ferentinos, Nikolaos Katsoulas, Antonis Tzounis, Thomas Technology Systems and Innovation (ICITSI), 2020, http://dx.doi.org/10.1109/
Bartzanas, Constantinos Kittas, Wireless sensor networks for greenhouse climate icitsi50517.2020.9264.
and plant condition assessment, Biosyst. Eng. 153 (2017) 70–81, http://dx.doi. [41] A. Sagheer, M. Mohammed, K. Riad, M. Alhajhoj, A cloud-based IoT platform
org/10.1016/j.biosystemseng.2016.11.005. for precision control of soilless greenhouse cultivation, Sensors 21 (2021) 223,
[22] Ala Sagheer, Maged Mohammed, Khaled Riad, Mohammed Alhajhoj, A cloud- http://dx.doi.org/10.3390/s21010223.
based IoT platform for precision control of soilless greenhouse cultivation, [42] Abhishek Kumar, Vikrant Singh, Saurabh Kumar, Shiva Pujan Jaiswal,
Sensors 21 (2021) 223, http://dx.doi.org/10.3390/s21010223. Vikas Singh Bhadoria, IoT Enabled system to monitor and control greenhouse,
[23] Ritesh Kumar Singh, Michiel Aernouts, Mats De Meyer, MaartenWeyn And Mater. Today: Proc. (ISSN: 2214-7853) (2020) http://dx.doi.org/10.1016/j.
rafael berkvens, leveraging LoRaWAN technology for precision agriculture in matpr.2020.11.040.
greenhouses, Sensors 21 (2021) 223, http://dx.doi.org/10.3390/s21010223. [43] R. Aafreen, S.Y. Neyaz, R. Shamim, M.S. Beg, An IoT based system for telemetry
[24] M.S. Farooq, S. Riaz, A. Abid, K. Abid, M.A. Naeem, A survey on the role of IoT and control of greenhouse environment, in: 2019 International Conference on
in agriculture for the implementation of smart farming, IEEE Access 7 (2019) Electrical, Electronics and Computer Engineering (UPCON), 2019, http://dx.doi.
156237–156271, http://dx.doi.org/10.1109/ACCESS.2019.2949703. org/10.1109/upcon47278.2019.89802.
[25] N.N. Misra, Y. Dixit, A. Al-Mallahi, M.S. Bhullar, R. Upadhyay, A. Martynenko, [44] Yong Wu, Li Li, Minzan Li, Man Zhang, Hong Sun, Nikolaos Sygrimis, Wangfeng
IoT, Big data and artificial intelligence in agriculture and food industry, IEEE Lai, Remote-control system for greenhouse based on open source hardware, IFAC-
Internet Things J. (2020) http://dx.doi.org/10.1109/JIOT.2020.2998584. PapersOnLine (ISSN: 2405-8963) 52 (30) (2019) 178–183, http://dx.doi.org/10.
[26] X. Chen, X. Wang, H. Shen, Design of greenhouse environment monitoring 1016/j.ifacol.2019.12.518.
system based on NB-IoT and edge computing, in: 2021 IEEE 5th Advanced [45] A. Sofwan, S. Sumardi, A.I. Ahmada, I. Ibrahim, K. Budiraharjo, K. Karno, Smart
Information Technology, Electronic and Automation Control Conference (IAEAC), greetthings: Smart greenhouse based on internet of things for environmental engi-
2021, http://dx.doi.org/10.1109/iaeac50856.2021.93906. neering, in: 2020 International Conference on Smart Technology and Applications
[27] A. Mellit, M. Benghanem, O. Herrak, A. Messalaoui, Design of a novel remote (ICoSTA), 2020, http://dx.doi.org/10.1109/icosta48221.2020.1570.
monitoring system for smart greenhouses using the internet of things and deep [46] F. Li, Y. Weng, H. Chen, P. Zhuang, Intelligent greenhouse system based
convolutional neural networks, Energies 14 (2021) 5045, http://dx.doi.org/10. on remote sensing images and machine learning promotes the efficiency of
3390/en14165045. agricultural economic growth, Environ. Technol. Innov. 24 (2021) 101758,
[28] A.F. Subahi, K.E. Bouazza, An intelligent IoT-based system design for controlling http://dx.doi.org/10.1016/j.eti.2021.101758.
and monitoring greenhouse temperature, IEEE Access 8 (2020) 125488–125500, [47] N.P. Li, Y.M. Xiao, L. Shen, Z.Y. Xu, B.T. Li, C.X. Yin, Smart agriculture with
http://dx.doi.org/10.1109/ACCESS.2020.3007955. an automated IoT-based greenhouse system for local communities, Adv. Internet
[29] G. Verma, P. Mittal, S. Farheen, Real time weather prediction system using Things 9 (2019) 15–31, http://dx.doi.org/10.4236/ait.2019.92002.
IOT and machine learning, in: 2020 6th International Conference on Signal [48] F. Pitu, N.C. Gaitan, Surveillance of SigFox technology integrated with envi-
Processing and Communication (ICSC), Noida, India, 2020, pp. 322–324, http: ronmental monitoring, in: 2020 International Conference on Development and
//dx.doi.org/10.1109/ICSC48311.2020.9182766. Application Systems (DAS), 2020, http://dx.doi.org/10.1109/das49615.2020.
[30] U. Shafi, et al., A multi-modal approach for crop health mapping using 9108957.
low altitude remote sensing, internet of things (IoT) and machine learning, [49] J. Dai, M. Sugano, Low-cost sensor network for collecting real-time data for
IEEE Access 8 (2020) 112708–112724, http://dx.doi.org/10.1109/ACCESS.2020. agriculture by combining energy harvesting and LPWA technology, in: 2019 IEEE
3002948. Global Humanitarian Technology Conference (GHTC), 2019, http://dx.doi.org/
[31] A. Ali, H.S. Hassanein, Wireless sensor network and deep learning for 10.1109/ghtc46095.2019.903311.
prediction greenhouse environments, in: 2019 International Conference on Smart [50] U.J.L. Dos Santos, G. Pessin, C.A. da Costa, R. da Rosa Righi, AgriPrediction: A
Applications, Communications and Networking (SmartNets), Sharm El Sheik, Proactive internet of things model to anticipate problems and improve production
Egypt, 2019, pp. 1–5, http://dx.doi.org/10.1109/SmartNets48225.2019. in agricultural crops, Comput. Electron. Agric. (2018) http://dx.doi.org/10.1016/
9069766. j.compag.2018.10.010.
[32] I. Ullah, M. Fayaz, N. Naveed, D. Kim, ANN Based learning to Kalman filter [51] P.G. Szabo, M.C. Markot, T. Csendes, E. Specht, L.G. Casado, I. Garcia, New
algorithm for indoor environment prediction in smart greenhouse, IEEE Access approaches to circle packing in a square: with program codes, in: Optimization
8 (2020) 159371–159388, http://dx.doi.org/10.1109/ACCESS.2020.3016277. and its Applications, Vol. 6, Springer, New York, NY, USA, 2007.
[33] Dae-Hyun Junga, Hyoung Seok Kima, Changho Jhina, Hak-Jin Kimb, Soo Hyun [52] U. Raza, P. Kulkarni, M. Sooriyabandara, Low Power Wide Area networks: An
Parka, Time-serial analysis of deep neural network models for prediction of overview, IEEE Commun. Surv. Tutor. 19 (2) (2017) 855–873, http://dx.doi.org/
climatic conditions inside a greenhouse, Comput. Electron. Agric. 173 (2020) 10.1109/COMST.2017.2652320.
1–11, http://dx.doi.org/10.1016/j.compag.2020.105402. [53] RTD Interfacing and linearization using an ADuC8xx MicroConverter, 2014,
[34] G. Codeluppi, A. Cilfone, L. Davoli, G. Ferrari, AI At the edge: a smart Available online: https://www.analog.com/media/en/technical-documentation/
gateway for greenhouse air temperature forecasting, in: 2020 IEEE International application-notes/AN709_0.pdf [Accessed: 7-Jan-2021] www.analog.com.
Workshop on Metrology for Agriculture and Forestry (MetroAgriFor), Trento, [54] Christopher M. Bishop, Pattern Recognition and Machine Learning, Springer, New
2020, pp. 348–353, http://dx.doi.org/10.1109/MetroAgriFor50201.2020. York, USA, 2006.
9277553. [55] Richard O. Duda, Peter E. Hart, David G. Stork, Pattern Classification, John Wiley
[35] M. Ayaz, M. Ammad-Uddin, Z. Sharif, A. Mansour, E.M. Aggoune, Internet-of- & Songs, New York, USA, 2003.
things (IoT)-based smart agriculture: Toward making the fields talk, IEEE Access [56] Shamshiri Redmond, Jones James, Thorp Kelly, Ahmad Desa, Che Man Hasfalina,
7 (2019) 129551–129583, http://dx.doi.org/10.1109/ACCESS.2019.2932609. Sima Taheri, Review of optimum temperature, humidity, and vapour pressure
[36] O. Friha, M.A. Ferrag, L. Shu, L. Maglaras, X. Wang, Internet of things for the deficit for microclimate evaluation and control in greenhouse cultivation of
future of smart agriculture: A comprehensive survey of emerging technologies, tomato: A review, Int. Agrophys. 32 (2018) 287–302, http://dx.doi.org/10.1515/
IEEE/CAA J. Autom. Sin. 8 (4) (2021) 718–752, http://dx.doi.org/10.1109/JAS. intag-2017-0005.
2021.1003925. [57] G. Li, L. Tang, X. Zhang, J. Dong, M. Xiao, Factors affecting greenhouse
[37] Y. Mekonnen, S. Namuduri, L. Burton, A. Sarwat, S. Bhansali, Review—Machine microclimate and its regulating techniques: A review, IOP Conf. Ser.: Earth
learning techniques in wireless sensor network based precision agriculture, J. Environ. Sci. 167 (2018) 012019, http://dx.doi.org/10.1088/1755-1315/167/1/
Electrochem. Soc. 167 (3) (2020). 012019.

64

You might also like