# An Efficient Opportunistic Routing Protocol with Low Latency for Farm Wireless Sensor Networks
## 3 Modeling of Wireless Sensor Networks in Farms  
As shown in Figure 1, assume that \(N\) sensor nodes are deployed in different locations on the farm. The WSN is abstracted as a graph model \(G=(V,E)\), where \(V=\{v_{1},v_{2},\ldots,v_{N}\}\) denotes \(N\) sensors, and \(E=\{e_{11},e_{12},\ldots,e_{ij},\ldots,e_{NN}\}\) indicates connectivity between nodes. Because dense crops in the farm will affect the connectivity of link connectivity, we use probability \(pe_{ij}\) as the probability of successful transmission between node \(i\) and node \(j\), and the probability of fail transmission is expressed as \(1\)-\(pe_{ij}\). Let \(Ee=\{E_{1},E_{2},\ldots,E_{N}\}\) as the set of residual energy. \(Ne(i)\) represents the neighbor node set within the communication range of node \(i\). Based on the agricultural WSN model, this paper explores the opportunistic routing affected by energy consumption. Importance model of nodes  
Frequent changes in farmland environment, diverse agricultural operations, and rapid growth of crops make connectivity changes over time, which affect the overall efficiency of routing transmission. The traditional metrics mainly focus on the importance of a single link by predicting link quality or calculating transmission probability without overall consideration of network performance. The algebraic connectivity reflects the communication possibility. For undirected graph \(G=(V,E)\), Laplacian matrix \(L=D\)-\(A\) can be obtained by adjacency matrix \(A=(a_{ij})\) and node degree matrix \(D=\text{diag}(\{\mid Ne(1)\mid,\mid Ne(2)\mid,\ldots,\mid Ne(i)\mid,\ldots,\mid Ne (N)\mid\})\). If there is a communication link between node \(i\) and node \(j\), \(a_{ij}=1\), otherwise \(a_{ij}=0\). \(1 Ne(i)\mid\) denotes the node degree of node \(i\). \(L\) is a positive semi-definite symmetric matrix, and the second smallest eigenvalue is the algebraic connectivity of \(G\). Algebraic connectivity usually adopts the neighbor node number to measure the connectivity redundancy. However, when the sink position is fixed, node \(i\) selects the candidate nodes whose ETX are less than node \(i\), that is, the nodes closer to the sink as the candidate nodes. The link cost is used as the link weight to represent the Laplacian matrix elements of graph \(G\), and the neighbor nodes with ETX less than node \(i\) are redefined as \(Ne(i)\). This paper establishes the following importance model based on algebraic connectivity [28]:  
\[l_{ij}=\left\{ \begin{array}{ll}\sum_{j=1}^{N}w_{ij},\ if\ \ i=j\text{ and }w_{ij}=\frac{1}{dis(i)}\\ -w_{ij},\ \ \ \ if\ i\
eq j,\in Ne(i)\text{ and }w_{ij}=\frac{1}{dis(i)}\\ 0,\ \ \ \ else\end{array} \right. \tag{1}\]  
The second smallest eigenvalue of the matrix \(L\) represents the connectivity redundancy of graph \(G\). For graph \(G\) (\(V,E\)), if delete several links from \(E\) to obtain graph \(G^{\prime}\) (\(V,E^{\prime}\)), \(\lambda(G^{\prime})\leq\lambda(G)\). Deleting the communication links of node \(i\), and the corresponding algebraic connectivity \(\lambda_{i}\) can be obtained. Therefore, the importance model corresponding to node \(i\) is defined as \(\lambda_{i}\). The larger the \(\lambda_{i}\), the greater the node's contribution to the network connection and the more important this node is in maintaining the stable transmission. Energy consumption model  
Every time a node sends or receives data, there will be energy consumption. Exhausting energy may lead to network partition and affect network connectivity and communica  
Figure 1: Schematic diagram of opportunistic routing in farm WSN. tion quality. This paper uses the first-order energy model to measure energy consumption. The energy consumption of sending \(k\) bit data to distance \(d\) is as follows [29]:  
\[E_{TX}= \begin{cases}k\cdot E_{elec}+k\cdot\varepsilon_{fs}\cdot d^{2},\ d<d_{0}\\ k\cdot E_{elec}+k\cdot\varepsilon_{mp}\cdot d^{4},\ d\geq d_{0}\end{cases}