**1. Introduction and Tutorial Contributions**

Currently, agriculture is the world's largest business, employing over one-third of the economically active global population and over 70% of the economically active population in Africa [1,2]. The impacts of high population growth rates and climate change-induced drought (according to Figure 1) on food security, unemployment threats and reduced crop

**Citation:** Effah, E.; Thiare, O.; Wyglinski, A.M. A Tutorial on Agricultural IoT: Fundamental Concepts, Architectures, Routing, and Optimization. *IoT* **2023**, *4*, 265–318. https://doi.org/10.3390/ iot4030014

Academic Editors: Antonio Cano-Ortega and Francisco Sánchez-Sutil

Received: 15 June 2023 Revised: 12 July 2023 Accepted: 17 July 2023 Published: 27 July 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

quantity/quality make smart Agricultural Internet-of-Things technology (Agri-IoT) via precision farming and greenhouses the most promising remedy. However, the existing benchmarking Agri-IoT solutions can only be acquired, deployed, and managed by farmers with sufficient financial resources, an electricity grid, Wi-Fi/cellular coverage, and technical expertise in IoT, which is generally not the case in Ghana and Sub-Saharan Africa. These call for a paradigm shift in farming techniques, and the most promising game-changers are precision farming and greenhouses whose underlying technology is a robust, affordable, autonomous, and optimized, innovative WSN-based Agri-IoT [3] that satisfies the critical design expectations presented in Figure 2.

**Figure 1.** Seasonal failure probability-2014 [4] depicting the extent of climate change impact on Africa's farmlands.

**Figure 2.** Generalized design expectations of WSN-based Agri-IoT technology.

Although few surveys and tutorials have been authored on this subject, they present mere classifications of communications trends on classical IoT [2,5–8] without any contextspecific technical considerations of the critical design expectations in Figure 2. For instance, the authors in [2,6,7] examined IoT's communication infrastructure, platforms, standards, development trends, and possible network solutions in agriculture. Similarly, the roles of industrial IoT (thus, identification-based IoT (example, RFID [6], WSN [9], QR codes [5], barcodes) and communication-based IoT (example, ZigBee [5], Z-wave [6], MQTT [5,6], LoRa [10], SigFox [11], BLE [12], Li-Fi [5], Wi-Fi [13], Near-Field Communication (NFC) [5], and power line area network) were reviewed in terms of current research trends, applications, and main challenges in [5]. Although RFID tags and WSNs have similar data acquisition capacities, the authors concluded that WSN technology is more energy-efficient and suitable for Agri-IoT than the costly RFID technologies [5]. Overall, Agri-IoT technology has not yielded its intended paradigm transformation in the agricultural sector due to several technical challenges that have not received adequate contextual research considerations [14]:


hensive intelligence services, remote monitoring, smart decision making, and the execution of precise control/actuation actions on the farm.


To the best of our knowledge, no survey or tutorial articles have sufficiently considered these technical issues and provided sufficient technical guidelines for the designers of Agri-IoT systems to make well-informed decisions in order to achieve satisfactory network performance. Additional realistic research is needed regarding the contextual evaluation of SN design and deployment factors, fundamental network design concepts and requirements, multi-objective optimization (MOO) analysis of the parameters for designing the associated routing protocol, and efficient operational metrics of the WSN sublayer of the Agri-IoT using the cluster-based architecture. In addition, the assessment of the possibility of using low-power and accessible wireless communication technologies such as BLE via cluster-based architecture to achieve a complete infrastructure-less, cheaper, energyefficient, self-healing, adaptive, and robust Agri-IoT network is imperative. Furthermore, a broader contextual overview covering all vital aspects such as the fundamental concepts of Agri-IoT, technical design requirements of SNs and WSN-based Agri-IoT, surveys of the benchmarking communication standards, routing protocols, and testbed solutions, and an in-depth case study on how to design a self-healing, energy-efficient, adaptive, and CA-IoT based on the performance and users expectations are illustrated in Figure 2. Such a reference document can help support researchers when they attempt to accurately model and optimize the performance of Agri-IoT [14] so that the performance gap between the simulated networks and the realized Agri-IoT testbed solutions [1] can be addressed. By way of addressing these technical challenges, this tutorial presents the following contributions:

• Perform an in-depth synthesis and review (1) the basic concepts of Agri-IoT, (2) the comprehensive design considerations of these networks, (3) the technical design requirements of Agri-IoT, and (4) the up-to-date research progress on routing techniques, communication standards, and testbed solutions of WSN-based Agri-IoT.


Overall, this tutorial is motivated to provide a contextualized, in-depth understanding of this technology and assist the reader in designing robust, affordable, and optimized Agri-IoT networks that can act as reliable game-changers to avert the stipulated challenges. Also, the critical design, deployment, and QoS requirements of WSN-based Agri-IoT networks from theoretical modeling to real-world deployment are unveiled in order to bridge the existing gap between the theory and practice of this technology [1,14].

The remainder of this paper is organized into the following sections: Section 2 provides a brief background comparative overview of WSN, IoT, and Agri-IoT technologies, while Section 3 focuses on their components, protocols, architectural layers, and proposed architectural layers for WSN-based Agri-IoT technology. Section 4 presents the detailed contextual design and implementation requirements of Agri-IoT networks, while Section V deduces the unique characteristics, challenges, and proposed performance expectations of the associated routing protocols for the WSN sublayer of Agri-IoT. Sections 6–8 present systematic surveys on routing protocols, FM techniques, and the canon real-world testbed implementations of WSN-based Agri-IoT solutions. Section 9 examines how the above discussions have evolved using a case study of cluster-based Agri-IoT (CA-IoT) for precision irrigation.Section 10 unveils open issues and future works, while Section 11 concludes the paper.

#### *1.1. Comparative Overview of WSN, IoT, and Agri-IoT Technologies*

A comparative overview of the underlying technologies (i.e., WSN, IoT, and Agri-IoT) forming the WSN-based Agri-IoT are compared from the perspective of architectural variations, users' expectations, and design and implementational differences in Table 1.

As depicted in Figure 3, WSNs are formed by spatially distributed, autonomous, resource-constrained SNs that wirelessly interconnect to communicate their sampled data to a BS for further monitoring or event tracking purposes without necessarily requiring the Internet. The main components of the WSN are the SNs, the BS/gateway, and the event sampling/routing software that supervises the entire network process. A node may route data directly or via relay SNs to the BS based on its location and assigned tasks. The BS locally takes actionable decisions and execution of the actuation actions. Although the WSNs are resource-constrained and fault-vulnerable, they constitute the inevitable part of this technology [2] and the underlying innovation of the WSN-based Agri-IoT framework. In contrast, classic IoT consists of IoT devices that sense and transmit their sampled information directly or via telemetry to the Internet for monitoring or eventtracking purposes, mostly via the centralized routing architecture. Like BS in WSNs, IoT devices can connect to the Internet/IoT cloud via fixed-line (thus, for a factory), 5G/4G/LTE cellular/mobile networks, or Wi-Fi for further processing, storage, and decisions/actions.


#### **Table 1.** Comparison of WSN, IoT, and Agri-IoT technologies.

As presented in Figure 4, WSN-based Agri-IoT is an information- and knowledgeintensive intelligent feedback control system for farm monitoring, data sampling/computing, resource optimization, automation of farm operation (e.g., precision irrigation, chemical application, livestock monitoring, and disease management [16]), and actionable decision making via a variety of battery-powered and wirelessly connected SNs with sensing, processing, and communication capacities [2,29,30]. Unlike the WSN, Agri-IoT and IoT sample data to an Internet-based cloud. The SNs that form the WSN sublayer are spatially distributed and self-configured to achieve a myriad of remote sensing, surveillance/monitoring, and control applications via automated sensing, wireless communication, and computing, making informed decisions and performing actuation control [31] using precise, accurate, and timely sampled information about a real-world phenomenon [32].

(b) Current Method of Agri-IoT Deployment

(c) Key Components of a SN for Agri-IoT Application

**Figure 3.** Generalized Agri-IoT framework consisting of: field layout overview of Agri-IoT framework (**a**), sample of classic Agri-IoT in the state of the art (**b**), and key components of an SN or a BS (**c**).

**Figure 4.** Conceptual framework: Agri-IoT-based farm monitoring and control cycle.

The main hardware components of an Agri-IoT framework, as presented in Figure 3 and Table 2, include the WSN (i.e., comprising the field-deployed SNs or IoT devices), a base station (BS) or gateway or actuator controller, cloud servers, and the user's monitoring/control devices. The on-farm participants (e.g., SNs and BS) in Agri-IoT are mostly battery-powered and must be equipped with sensing, computing, and communication abilities to form infrastructure-less, robust, self-healing, and self-configured WSNs for data collection and event management [33]. The core units of the SNs in Figure 3c and the BS are compared and contrasted in Table 2. As the framework in Figure 3a depicts, the IoT devices can sense, process, and transmit their sampled data directly to the Internet or IoT cloud without a gateway, whereas the SNs in WSN-based Agri-IoT perform likewise via a BS. This resource-sufficient BS interfaces between the IoT cloud/user and the WSN or actuator control system. It can also process the received data and locally execute actionable decisions via the actuator of the farm event being monitored. The received data can also be relayed to the analytical data engines in the IoT cloud via a wired and wireless medium for further processing and actions [13]. The resource-constrained WSN sublayer mainly uses data-centric protocols due to the SNs' high deployment densities, high network dynamics, and limited power supply of SNs. Although data-centric protocols are fragile and not standardized, they are more suitable than the high resource-demanding ID-based IPv4 or IPv6 protocols in the addressing space of the WSN-based Agri-IoT.



Agri-IoT combines WSN and IoT technologies into contextualized intelligent farm management systems to achieve higher event data quality and offer remote monitoring and control. WSN-based Agri-IoT consists of the WSN sublayer, the gateways, the cloud servers, and the remote interface application, as illustrated in Figures 3a and 5. Uniquely, the current trends of Agri-IoT mandate that both intra-SN and BS–cloud communication are based on low-power, ubiquitous, and freely available wireless standards [2]. Also, most Agri-IoT solutions support bidirectional communications between the BS/gateway and the cloud/users, whereby the BS updates the cloud/user database and receives actionable/control remote messages from the user or cloud analytical decision results for actuation purposes. The WSN-based Agri-IoT is the most dominant technology in the global smart farming use cases in the agricultural sector. The core tasks of SNs in a WSN-based Agri-IoT application, which are frequently supervised by the associated routing protocol, include network construction/management, data sensing, data processing/aggregation, fault tolerance, and communication [9,12]. Also, the routing architecture must be supported by the associated communication platform and the application-specific requirements of the network.

**Figure 5.** Proposed Agri-IoT architectural layers with core components of Agri-IoT ecosystem and the "things" taxonomy.

Unlike IoT and WSN whose design expectations are application-specific, WSN-based Agri-IoT requires holistic integrations of the expectations in Figure 2.

#### *1.2. Classifications of IoT Applications and Specific Roles of Agri-IoT*

Generally, IoT technology is application-specific. However, it has limitless applications and roles in the smart world agenda. Based on their intended purpose, WSN-based IoT systems can be broadly classified into condition monitoring and event-tracking categories [34], as illustrated in Figure 6.

The monitoring-based applications involve real-time event data collection and analysis, supervision, and operational control of systems. In contrast, tracking-based applications track changes in the phenomenon of interest, such as the locations of objects, persons, transported goods, animals, and vehicles. Both application domains can be subdivided into industrial, environmental, and societal IoT applications in Figure 6, where specific examples are provided for each application domain. For instance, monitoring-based applications may include indoor/outdoor environmental monitoring [6], industrial process monitoring [5,29], process control [2], greenhouse automation [7], precision agriculture (e.g., irrigation management, crop disease prediction, prediction of production quality, and pest and disease control) [2,8], biomedical or health monitoring [8], electrical grid network monitoring/control [12,29], military location monitoring [9], and so forth. Conversely, specific examples of tracking-based applications may include habitat tracking, traffic tracking, plant/animal condition tracking, and military target tracking, as outlined in Figure 6.

**Figure 6.** Generalized taxonomy of IoT applications.

#### *1.3. Agri-IoT Roles and Use-Cases*

The concept of intelligent farming involves data acquisition, data processing/planning, and smart control using the WSN and IoT technologies, big data, and cloud computing techniques to provide profitable solutions, as presented in Figure 7. These principal roles in Figure 7 define their use cases. For instance, monitoring the state of crops or the climate of the field using Agri-IoT technology can allow farmers to know precisely the amount of pesticides, water, and fertilizers required to attain optimal crop quality and production volume. However, the QoS requirements, the routing techniques, architectural requirements, and the operational dynamics differ from one use case to another. This tutorial focused on the critical and unique design requirements of WSN-based Agri-IoT, which is the backbone of the smart agricultural initiative [35]. The resulting use-cases in Figure 7 can be explained as follows:


ers, and pesticides needed by the crops to minimize resources' costs and produce healthier crops. Additionally, the BS controls the event actuation system via accurate data-driven real-time decisions on the crops using climate data, crop growth data, and disease infection data.


**Figure 7.** The roles of Agri-IoT in smart farming with specific use cases.
