**3. Design and Implementation of Agri-IoT Networks**

Despite the technical challenges associated with the WSN-based Agri-IoT, its potential contributions in the agricultural sector largely surpass the least complex, capital-intensive, pure IoT-based solutions, as illustrated in Figures 3b and 7. Due to the broader applicability and higher significance of the WSN-based Agri-IoT networks relative to the classic IoT networks, this study focuses on the former technology whose design and implementation involve four crucial phases, namely:


These call for a systematic application-specific assessment of the hardware components selected for every use case.

#### *3.1. Sensor Nodes Design Considerations*

As illustrated at the bottom of Figure 3, a node for the WSN-based Agri-IoT network consists of four main units, which include the following:


the support of the routing architecture of the resulting WSN, but the selection must be justified from the technology requirement metrics via a decision matrix.

4. Power Unit: Since the SNs are mostly battery-powered, the appropriate battery size and probable energy-harvesting techniques must be determined during the SNs' design according to the intended network lifespan and stability requirements. Modern trends in battery power banks with integrated solar-based energy-harvesting systems and power ratings above 30,000 Ah are available.

When selecting hardware components, adequate caution should be taken to avoid unit incompatibility, high operational complexities, unsuitable operational thresholds, and high energy consumption, among others. This implies that high component survivability and operational stability under different environmental conditions and the application specificities are vital to monitor.

#### *3.2. Wireless Spectrum and Core Communication Platforms of WSN-Based Agri-IoT*

The wireless electromagnetic (EM) spectrum, which has invisible, finite radio frequencies for wireless communication, can be licensed and sold exclusively by specific providers or unlicensed for free usage. For instance, the Industrial, Scientific, and Medical (ISM) frequency band (e.g., Bluetooth classic, BLE, Wi-Fi, ZigBee, and LoRaWAN) is an unlicensed microwave frequency band clustered around 2.4 GHz and globally reserved for applications such as Agri-IoT. Table 3 presents the various bands and their applications. A suitable candidate for a given Agri-IoT application is based on several factors, such as communication and the route architectural requirements, power consumption, cost, and environmental adaptability impacts.


**Table 3.** Wireless spectrum with the core communication platforms/applications.

*3.3. Factors to Consider When Deploying SNs and Designing the Supervisory Sampling/Routing Protocol*

After custom-building or selecting off-the-shelf SNs, the next activity is to deploy the SNs on the field and design a contextualized supervisory protocol to coordinate the aforementioned network's activities. The SNs' deployment in the field can be either random or deterministic. Both options require different methods to optimize the resulting network's performance. For instance, under the deterministic approach, the optimal parameters such as node uniformity and density must be predefined based on the distance thresholds of the associated communication technology (i.e., connectivity/distance range), the SNs' resource optimization mechanisms, the type of routing architecture, and the sensing range of the physical parameter to be measured. Since communication is the principal power consumer, the best ways to conserve power are to minimize communication distance and data sizes as well as operate the SNs in the appropriate sleep–active duty cycles using a cluster-based routing architecture [9,24,26].

Beyond the physical installation of the SNs at their most suitable in-range locations, the remaining activities, such as network construction, event sensing, data management, FM, network maintenance, sleep–active duty-cycle scheduling of SNs for sampling, network adaptability to turbulent and scalable conditions, power-optimization mechanisms, and network reconfiguration, among others, are controlled by the associated routing protocol [12,16,17,26,36]. This places crucial merits on the physical locations of the SNs in the field, thorough synthesis of network design factors, and assessment of available routing architectures/techniques, since this protocol manages all post-deployment tasks. This can be summarized into the core objectives of the routing protocol and its architecture, which include power optimization, self-healing of any faults without the obstruction of its normal operation, and self-adaptability to all turbulent and scalable conditions. From the analysis above, we can derive the critical primary factors to consider when designing a routing protocol for Agri-IoT networks, which are presented in Figure 9 and grouped into the following categories: SNs specifications, security issues, application-specific factors, communication standard compatibility and capacities, and other auxiliary factors. At the PHY layer level, which is the focus of this tutorial, these critical factors can translate into the stipulated core design objectives, which can be addressed via phase-based multi-objective optimization (MOO) formulation frameworks [12,23,24,37].

**Figure 9.** Principal design factors for Agri-IoT networks.

**Hardware Specifications of SNs and BS Agri-IoT Device:** The functional and resource capacities of participants' hardware units must be considered before their respective tasks in the protocol are assigned. For instance, the selected sensors' quality must suit the type of event information and its accuracy, the available communication platforms, and the general purpose of the Agri-IoT solution. Also, the communication standard must support the routing architecture and SNs' resource- and deployment-induced limitations. The crucial communication-based parameters of the SNs are illustrated in Table 4.


**Cost or Affordability of the Resulting Agri-IoT System:** In addition to being infrastructure-less, flexible, self-healing, adaptive, and energy-efficient, a WSN-based Agri-IoT must consist of cost-effective hardware and software components so that the system is affordable for farmers, since existing real-world solutions are too expensive and complicated [1,14]. Additionally, the installation, operational, and maintenance costs of the resulting WSN-based Agri-IoT network must be kept to a minimum so that it can be easily acquired.

**Security Issues in Agri-IoT:** Security is still a challenge in classic IoT systems that handle sensitive information, especially during cloud communications. Although Agri-IoT networks lack the requisite resource capacities in most large-scale, broadcast-based, distributed, and infrastructure-less WSN systems to achieve adequate data confidentiality, authenticity, integrity, and other security requirements, the security of the agricultural data is rarely a priority [2,4]. Nevertheless, the associated routing architecture, such as the clustering architecture, has an embedded capacity to resolve on-site security issues. In addition, both on-site and remote information access types (e.g., via a smartphone or desktop computer) must be selected based on solid internal infrastructure and security precautions to secure unwanted access to sensitive information.

**The Application-Specific Factors:** As indicated in Figure 9, the application-defined factors vary based on the Agri-IoT application, the field settings, network maintenance practices, intended event routing architecture, and network participants' mobility, among other factors. However, the routing protocol must incorporate all relevant operational efficiency factors of the routing software design objectives. Since the collected field data itself cannot make sense without using analytic data engines and predictive algorithms in machine learning, the BS or the application layer in the cloud should define appropriate data-processing frameworks to obtain accurate, actionable decisions from the collected data.

**Communication Standards of Agri-IoT Devices:** The power-constrained WSN sublayer of Agri-IoT network places hard restrictions on operational states of SNs' radio transceivers, code space, and processing cycles as well as memory capacities of SNs to enhance power savings [9,12,23]. The type of communication technology selected for a typical Agri-IoT is the principal predictor of its routing architecture, affordability, simplicity, adaptability, power-saving capacity, location independence, self-healing capacity, and event data quality [12,16]. Consequently, power and routing architectural limitations constrain the network design requirements. Despite the aforementioned technical challenges on the network's operational efficiency, interconnected SNs that form the WSN are expected to withstand extra operational disruptions caused by unfavorable weather conditions in the field [2,4]. Consequently, the de facto PHY-layer communication standards for this low-power, low bandwidth, and distance-limited communication Agri-IoT devices/SNs have been the energy-efficient platforms such as BLE, LoRa, Sigfox, and NB-IoT. Also, a suitable MAC technique is imperative in the routing architecture to curb all channel access challenges. For instance, the ZigBee/IEEE 802.15.4 standard focuses on the physical and the MAC layer specifications for WSNs, and it also supports the sleep–active or duty-cycle scheduled operation modes of SNs to enhance energy savings in centralized or mesh-based architectures. BLE does likewise in the highly endowed cluster-based routing architecture. Consequently, Agri-IoT network designers must make the most appropriate and critical decisions regarding the network's communication requirements when designing the routing protocol. Using Table 4, WSN-based Agri-IoT designers can make realistic design decisions regarding energy-efficient multihop routing, architectural requirements of routing protocol, bandwidth, routing table capacities, total communication cost, and the desired MAC technique. Additionally, the physical conditions within the agricultural environment such as atmospheric dust concentration, physical obstruction to wireless signal transmissions, and the terrain need to be considered.

**Auxiliary Factors and Available Software Tool:** Finally, the auxiliary factors can be non-exhaustive depending on the designer's financial capacity, user interface, information requisition model, cloud activities, operational expectations, and the available software tools. Additionally, an assortment of PHY-Layer design software tools for Agri-IoT experiments (thus, in both simulations and real-world testbed deployments) that can be used include NS-3 [9,38], OMNeT++, MATLAB/Simulink [9,12,39], Python [16], PAWiS [39], GloMoSim/QualNet [39,40], OPNET [12,39], SENSE [37,39], J-Sim [39], Ptolemy II [39], Shawn [9,39], and PiccSIM [12,39,41], among others. The key features that are frequently considered when selecting any of these software platforms include Python or MAT-LAB/Simulink compatibility for software model and hardware prototype integration during real-world operation, compatibility with low-power communication standards (e.g., BLE, LoRa, ZigBee, and SIGFOX), operating system support, programming language implementation, the density of simultaneously simulated or field-deployed SNs, co-simulation with other hardware, documentation, easy access to upgraded versions, and installation challenges [39]. MATLAB/Simulink and Python are the most commonly used experimental tools, since these software tools are well-equipped with the stipulated features.

#### **4. Unique Characteristics and Challenges of WSN Sublayer of Agri-IoT**

Unlike the traditional IoT, which generally relies on fixed hardware to route network traffic, a WSN sublayer of Agri-IoT combines automated sensing, computation, actuation, and wireless communication tasks into the SNs that are spatially distributed across the farm to autonomously form an infrastructure-less WSN [31]. A node may perform additional tasks such as local data processing (data aggregation), network construction, data redundancy, error control, data routing (e.g., in multihop networks), and network maintenance practices based on the network size, application specificity, and associated routing techniques. Also, the WSN can be equipped to observe heterogeneous conditions such as temperature, humidity, sound, color, location, light, vibration, and motion, using a wide variety of sensors contained within a task-scalable SN. Therefore, assuming that the accuracy and precision of event data in upper layers are preserved, the Agri-IoT's lifespan and its operational efficiency are rooted in the WSN's robustness. Thus, a deeper contextual exegesis into the design and maintenance of this sublayer is imperative. As opposed to conventional IoT and wireless ad hoc communication networks, the operational efficiency of the WSN sublayer, as well as Agri-IoT, hinge upon some application-specific characteristics and resource-constrained factors such as:


### *Proposed Design Objectives of WSN-Based Routing Protocols for Agri-IoT and Realization Mechanisms*

From the systematic evaluation of the unique characteristics and challenges of the WSN sublayer, a three-tier cluster-based framework that constitutes the condensed expected core design objectives and their corresponding remedial strategies of WSN-based routing protocols for Agri-IoT applications is demonstrated in Figure 10. Suppose the corresponding remedies in Figure 10 are implemented in the associated routing protocol. In that case, the desired power optimization, self-healing, and auto-adaptability expectations can transitively yield the desired event data quality and operational stability requirements or the global performance expectations of the resulting network.

**Figure 10.** Proposed design objectives and strategies of WSN-based Agri-IoT routing protocols.

The importance of this three-tier framework can be expanded on as follows:

• An adaptive and scalable WSN-based routing protocol, as proposed in Figure 10, normally constructs a routing architecture that supports multihop routing, self-reconfiguration, self-healing, and local network administration at a minimal routing table size, communication cost, and and control message complexity requirement. Since communication

is the principal power consumer, the operation of the routing protocol must invlove fewer control messages. Also, it must adapt to network turbulence due to SN failures. The cluster-based architecture exhibits the highest potential compared to related architectures [9,16,17,26]. The cluster heads (CHs) efficiently coordinate these activities by registering and tolerating all dynamism resulting from SN-out-of-service faults, increasing the network size and SN density.


To achieve the expectations in Figure 10, there is a need for an architecture-specific multi-objective assessment of the WSN's design cycle; from this, the associated parameters and theoretical models can be derived and then theoretically optimized and validated experimentally. A novel holistic MOO framework can help realize these expected goals in both simulation and real-world Agri-IoT implementations. Consequently, there exists the need to carry out a systematic survey and assessment on existing routing architectures, FM schemes, and routing protocols, and how these evolved in existing real-world realization testbeds of Agri-IoT. Such an in-depth literature synthesis can help assess these qualitative performance indicators constituting the root QoS metrics in Figure 10 as well as deduce application-specific guidelines for improving CA-IoT networks using a precision irrigation system as a case study.

#### **5. State of the Art on Routing Protocols for WSN-Based Agri-IoT Applications**

In Agri-IoT, it is not simply a matter of applying IoT to a farm; contextual due diligence on architecture, communication standard, cost, actuator, performance stability, control, and environmental impacts augment the routing protocol requirements. This section presents a systematic synthesis of WSN-applicable routing protocols under network architecture, the route discovery process, and protocol operation as illustrated in Figure 11. To help Agri-IoT designers make well-informed decisions concerning architectural selection, we classified the canon protocols based on routing architecture, route-discovery process, and operations in order to uncover their strengths, weaknesses, and contextual reasons why they can be adopted for Agri-IoT applications. Generally, event routing in every protocol can either be source-initiated or destination-initiated, and the optimal path selection from the constructed routing architecture can also be broadcast-based, probabilistic, clusterbased, or parameter-determined using location-related, weight-based, and content-based metrics [13]. Also, routing protocols must commonly resist link failures using mechanisms that ensure balanced network-wide power depletion rates, energy-efficient multihop routing, and effective implementation of the indispensable QoS metrics presented in Figure 10. The related routing protocols can be classified as illustrated in Figure 11.

**Figure 11.** Taxonomy of WSN-based routing protocols of Agri-IoT.
