applied to agriculture, most of the time they are
installed in areas where it is not possible to connect
the device to the electricity grid. For this reason,
devices and technologies with minimal energy
consumption are often used. To achieve this, in the
field of communications it is ideal to use technologies
such as Low-Power Wide-Area Network (LPWAN).
Among the LPWAN technologies, we can
highlight Long Range (LoRa) (LoRa Alliance, 2020),
due to its low cost, long range, and the use of license-
free bands. The main problem that can be found is that
the information transmitted through the air must be as
optimized as possible to reduce as much as possible
what is known as "time on air" or "airtime", that is,
the time necessary to transmit the message from the
sender node to the receiver (gateway). The more time
utilized for data transmission, the greater the
saturation of the frequency and greater energy
consumption; therefore, it is vital to keep the payload
of the transmissions as low as possible.
Greenfield defines and differentiates Fog
Computing and Edge Compu-ting. When using Fog
Computing a decentralized network structure is
employed in which resources, including data and
applications, will be found somewhere between the
data source and the Cloud (Fog Computing vs. Edge
Computing: What’s the Difference?, 2016). By using
Edge Computing, intelligence is brought into
individual hardware systems such as sensors. Using
Edge Compu-ting, the source devices are already in
charge of filtering data. Redundant data and even
false positives can be removed depending on the
architecture.
In our work we present the proposal of a multi-
layer fog computing framework for a precision
agriculture and irrigation water quality monitoring
system. Which has been designed to be implemented
in two areas. One of the control zones are the canals
that transport the irrigation water, where the salinity
or turbidity levels of the water are observed, and if
any of the two parameters exceeds a threshold, an
alarm is forwarded. The other zone is that of the crop
fields, where parameters such as soil moisture and
soil salinity will be observed. Through our proposal,
decision-making, regarding the actions to be carried
out to achieve optimal irrigation of the crops, will
occur in nodes located near the sensor nodes.
Furthermore, data aggregation is performed to adapt
to the constrained LoRa network. In this way, the
energy consumption will be reduced by filtering the
data and reducing the number of messages sent to the
data center. The proposed framework will provide the
system with fault tolerance capabilities as well,
eliminating the need of depending on continued
computations at the Data Center.
The remainder of this paper is organized as
follows. Section 2 presents the related work. The
multi-layer fog computing framework description is
explained in Section 3. The simulation results are
carried out in Section 4. Finally, Section 5 draws the
main conclusions and future works.
2 RELATED WORK
The introduction of several layers to the edge and fog
computing architecture provides many benefits
compared to the classic cloud architecture. Gia et al.
(2019) discuss these benefits applied to smart systems
in remote areas. At these areas, the chosen
communication technology, such as LoRa, has a low
bandwidth and performing the analysis and decision-
making activities at the edge allows providing more
functionalities. The presented architecture has an
edge, a fog and a cloud layer and performs image
compression based on CNNS. Results show 67% of
data size reduction with less than 5% of
decompression errors. Guardo et al. (2018) also
presents a fog computing framework with two tiers
intended for precision agriculture. The first tier is
comprised of the sensing nodes and the second tier is
the gateway. Both tiers perform data filtering and
analysis to reduce the amount of data forwarded to the
Cloud. The LoRa and MQTT protocols were utilized
for communication. The authors expected a reduction
in cost, a waiting times and load balancing as a result
of implementing the proposed architecture.
On the other hand, conventional fog computing
networks have some challenges as well. Chang et al.
(2017) present a fog computing infrastructure called
In-die Fog in order to solve some of these challenges.
With Indie Fog, the authors aim to provide a solution
that can be implemented with consumer devices
eliminating the need and the restrictions of the
devices owned by the service provider. Furthermore,
fog computing reduces latency and provides
communication and computation efficiency. Indie fog
can be implemented in an integrated manner, where
the router incorporates a virtual machine to perform
computations, or in a collaborative manner, where a
computer is connected to the router. However, other
devices such as smartphones or vehicles can also be
used as fog devices. Wang et al. (2019) designed a
multilayer system for edge computing. The
architecture is comprised of three layers being the
edge device, the Access Point and the Cloud Center.
The authors divide the system into a blocking and a