# Energy-Efficient LoRa Routing for Smart Grids
## 3 Proposed IoT-Based Communication in Smart Grid Environment
### Test Packet Transmission  
The path among the nodes is created on demand in a reactive route discovery mechanism of LOADng, a routing protocol. Only when the data packets need to be transferred is a route among the nodes constructed by the LOADng protocol in the routing process. To find a route to the intended destination, a source (SRC) node that wishes to transmit a data packet must start the route discovery process (RDP) by broadcasting a route request (RREQ) message. Message processing is executed by every node that receives an RREQ, along with considering the message to be forwarded. Until the RREQ arrives at the desired location, this procedure continues. The network efficiency is reduced because the elements affecting the network efficiency are not taken into account while selecting a transmission path. To identify all the possible routes for data transmission, a metaheuristic algorithm that optimises the parameters such as R_HOLD_TIME, RREQ jitter, NET_TRANSVERSAL_TIME,and RREP_ACK_TIMEOUT was incorporated into the proposed protocol. By utilising the quadratic-kernel-exploitation-based African buffalo optimisation (QKE-ABO) algorithm, the parameters were chosen optimally to improve the LOADng protocol's performance. The route discovery process of the QKE-ABO algorithm is shown in Figure 4.  
Parameter Optimisation Using QKE-ABO Algorithm  
ABO is an optimisation technique inspired by African buffaloes' social and herding behaviour. The algorithm represents the three principal characteristics of buffaloes' excellent memory, regular communication, and exceptional intelligence, which are used to ensure secure green areas around South Africa. Buffaloes can keep track of their routes through their extensive memory capacity. Finally, to denote good or bad, the second characteristic of buffaloes is their ability to communicate with one another intelligently by utilising the sounds \"maaa\" and \"waaa\", respectively. Buffaloes rely on the parliamentary characteristics of the herd. Thus, the searching process of buffaloes considering these three features is a set of strategies organised mathematically in the proposed framework for selecting the optimal parameters. However, the min-max normalisation used for the exploitation of buffaloes slows down the convergence process [58]. Hence, in our proposed work, the quadratic kernel function was used in the exploitation phase of the buffaloes. QKE-ABO is an attempt to develop a user-friendly, robust, efficient, effective, simple-to-implement algorithm that demonstrates exceptional capacity in selecting the optimal parameters. The flowchart used to implement it is given Figure 5.  
Figure 4: Route discovery process of the QKE-ABO algorithm. The steps of the Algorithm 1 are as follows:  
Step 1: First, the population of buffaloes (i.e., the parameters that need to be optimised) is randomly initialised in the n-dimensional search space, and each individual's fitness is evaluated and updated. Here, the fitness is evaluated based on the minimum value of parameters such as R_HOLD_TIME, RREQ jitter, NET_TRANSVERSAL_TIME, and RREP_ACK_TIMEOUT with their values initialised as in [59], and the fitness function can be expressed as in Equation (5). \[Fn\{pm_{i=1,2,3,4}\}=\sum_{i=1}^{4}\min(pm_{i}),\quad\min(pm_{i})=\{h_{\min}<pm_ {i}<h_{\max}\} \tag{5}\]  
where the fitness function is denoted as \(Fn(\bullet)\), the number of parameters, such as RREQ jitter, R_HOLD_TIME, NET_TRANSVERSAL_TIME, and RREP_ACK_TIMEOUT, is illustrated by \(pm_{i}\), and the minimum and maximum ranges of a corresponding parameter are expressed as \((h_{\min},h_{\max})\). Step 2: By employing African buffaloes' two basic sounds (maaa and waaa), the exploitation and exploration of each individual are determined in the period of migration movement. The buffaloes were forced to stay in the current location by utilising the \"maaa\" calls. It is safe to exploit and has adequate pasture.