# Optimizing Routing Protocol Design for Long-Range Distributed Multi-Hop Networks
## 4 Load-Balancing Routing Optimization Scheme Design
### Load-Balancing Optimization Model
\[P_{l}=P_{l}(d_{0})+10\mu\log\frac{d}{d_{0}}+X_{\sigma} \tag{7}\]  
\[X_{\sigma}=\frac{1}{\sqrt{2\pi}}e^{-\frac{\sigma^{2}}{2\sigma^{2}}} \tag{8}\]  
The condition for successful data reception at a node is shown in Equations (9)-(11), where \(P_{l}\) denotes transmission power, \(P_{l}\) represents path loss, sensitive is the receiving sensitivity of the node, \(NF\) represents the noise figure of the receiving node, and \(SNR_{SF}\) represents the signal-to-noise ratio at \(SF\)[28]. \[P_{r}=P_{l}-P_{l} \tag{9}\]  
\[T_{\text{delay}}=T_{td}+T_{qd} \tag{2}\]0  
\[T_{\text{delay}}=T_{td}+T_{qd} \tag{2}\]1  
Link redundancy is defined in Equation (12), with higher link redundancy indicating greater reliability between nodes. \[T_{\text{delay}}=T_{td}+T_{qd} \tag{2}\]2This study considers using link redundancy between nodes to measure link reliability. Different SFs result in different link redundancies, thus offering varying levels of link reliability. To meet the constraints of different business types, the link reliability \(R_{l}\) is defined, where \(Q_{\text{max}}\) is the maximum link redundancy between nodes; higher link redundancy between nodes indicates better link reliability. \[R_{l}=\left\{ \begin{array}{l}\frac{Q_{\text{max}}}{Q_{\text{max}}},Q_{\text{ rel}}<Q_{\text{max}}\\ 0,\text{others}\end{array} \right. \tag{13}\]  
The link reliability \(R_{M_{i}}\) for the path taken by business data from node \(M_{i}\) to the gateway is shown in Equation (14), where \(N_{i}\) denotes the number of links. \[R_{M_{i}}=1-\prod_{j=1}^{N_{i}}(1-R_{j}) \tag{14}\]  
Different business types need to satisfy different link reliability requirements, as shown in Equation (15), where \(\text{Success}_{M_{i}}\) represents the required success rate for a specific business type. \[R_{M_{i}}\geq\text{Success}_{M_{i}} \tag{15}\]  
3. SF  
When planning transmission paths for LoRa end nodes, it is necessary to allocate an appropriate \(SF\) based on the business type to meet the requirements for communication delay and link reliability. By calculating the communication delay \(T_{\text{delay}}\) and link reliability \(R_{l}\), different business types can obtain the minimum and maximum \(SF\)\(SF_{\text{min}}\) and \(SF_{\text{max}}\) that satisfy the constraints. The \(SF\) is thus determined as shown in Equation (16). \[SF=\left\lfloor\frac{SF_{\text{min}}+SF_{\text{max}}}{2}\right\rfloor \tag{16}\]  
4. Node Occupancy Rate  
The node occupancy rate measures the proportion of time that a node is occupied within a specific timeframe. The node occupancy rate \(R_{S_{i}}\) for node \(S_{i}\) is computed as shown in Equation (17), where \(N_{s}\) represents the number of business nodes, and \(M_{S_{i}}\) represents the maximum number of business data that can be handled by node \(S_{i}\)[29]. \[R_{S_{i}}=\frac{\sum_{j=1}^{N_{s}}\alpha_{i}^{M_{j}}}{M_{S_{i}}} \tag{17}\]  
The node occupancy rate \(R_{S_{i}}\) should satisfy Equation (18). \[R_{S_{i}}\leq 1 \tag{18}\]  
5. Node Load Rate  
The node load rate measures the degree of business and resource utilization of a node. The node load rate \(C_{s_{i}}\) for node \(S_{i}\) is calculated as shown in Equation (19), where \(N_{s}\) represents the number of business nodes, \(B_{M_{j}}\) denotes the volume of business data from node \(M_{j}\) whose transmission path passes through node \(S_{i}\), and \(B_{S_{i}}\) is the maximum volume of business data that can be handled by node \(S_{i}\). \[C_{s_{i}}=\frac{\sum_{j=1}^{N_{s}}\left(\alpha_{i}^{M_{j}}\times B_{M_{j}} \right)}{B_{S_{i}}} \tag{19}\]The node load rate \(C_{S_{i}}\) should satisfy Equation (20). \[C_{S_{i}}\leq 1 \tag{20}\]  
The average node load rate reflects the overall busyness of the network, as shown in Equation (21), where \(N_{t}\) denotes the number of nodes in the network. \[\overline{C_{S_{i}}}=\frac{\sum_{i=1}^{N_{t}}\left(C_{S_{i}}\times B_{S_{i}} \right)}{N_{t}} \tag{21}\]  
6. Node Load Balance  
Node load balance \(C_{b}^{\varphi}\) assesses the distribution of load among nodes in the network.