## 4 The Principle of the Balanced Cross-Layer Fuzzy Logic Routing Algorithm
### The Calculation of the Utility of Each Node
### The Performance of BCFL Compared with the Traditional Routing Algorithm

In this part, we compare the performance of the BCFL with the traditional fuzzy logic routing algorithm (used in [19,20]) and the optimization-based routing algorithm (used in [9]), respectively. In view of that the traditional fuzzy logic routing algorithm, the optimization-based routing algorithm has limited capability to handle multiple constraints, so in the simulation of this part, we only consider three constraints in the algorithm. As discussed in Section 4, we use the function _rand()_ in MATLAB to generate the cross-layer parameters. The parameters are shown in Table 5.

Figure 5a,b demonstrate that the new routing algorithm can come to the similar conclusion with the traditional fuzzy logic-based routing algorithm: the best next hop relay node is node 1; the performance of node 3, node 4, and node 5 are alike; and node 2 has the worst performance of these five nodes. The result also proves that the BCFL is effective and balanced. As shown in Figure 5a, the line graph of dispersion illustrates that the parameters in node 1 have the smallest dispersion; the dispersion of node 3 and node 5 are similar and all larger than node 1; node 2 and node 4 have the largest parameter dispersion. This line graph is consistent with the line graph of utility in Figure 5a (the node whose parameter dispersion is small will have large utility). For the utility in Figure 5a, node 1 is the largest, node 3 and node 5 are alike and they are the medium. Note that even node 2 and node 4 have the similar parameter dispersion, but since the parameters in node 2 are too small, then the utility of node 4 is greater than node 2. Therefore, the new routing algorithm can not only consider the balance but also the effectiveness of the network performance. Note that the dispersion shown in Figure 5a is different with the dispersion that is expressed in _Definition 3_. The dispersion in _Definition 3_ means the difference between the same cross-layer parameters from different nodes, e.g., the parameters \(\beta_{1}^{i},\beta_{1}^{2},\beta_{1}^{3},\cdots,\beta_{l}^{i}\) (the parameter 1 from node 1, \begin{table}
\begin{tabular}{c c c c c c} \hline  & **Node 1** & **Node 2** & **Node 3** & **Node 4** & **Node 5** \\ \hline \(\beta_{1}\) & 0.4505 & 0.0838 & 0.229 & 0.9133 & 0.1524 \\ \(\beta_{2}\) & 0.602 & 0.263 & 0.6541 & 0.6892 & 0.7482 \\ \(\beta_{3}\) & 0.8258 & 0.5383 & 0.9961 & 0.0782 & 0.4427 \\ \hline \end{tabular}
\end{table} 
Table 5: The cross-layer parameters. node 2, \(\cdots\), node \(i\)). The dispersion shown in Figure 5a means the difference of different cross-layer parameters of the same node, e.g., the parameters \(\beta_{1}^{1},\beta_{2}^{1},\beta_{3}^{1},\cdots,\beta_{n}^{1}\) (the parameter 1, parameter 2, \(\cdots\), parameter \(n\) from node 1). Thus, the parameter dispersion shown in Figure 5a can represent the balance of nodes. In Figure 5b, the utility of node 4 is larger than node 5; however, as shown in Figure 5a, the parameter dispersion of node 5 is smaller than node 4. Considering the parameter's value and the parameter dispersion of these two nodes, we can conclude that node 5 is more appropriate as the next hop relay node than node 4. On this point, the Figure 5a,b prove that the BCFL can get a more balanced performance than the traditional fuzzy logic routing algorithm. Figure 5: **(a)** The result of the BCFL; **(b)** The result of the traditional fuzzy logic-based routing algorithm (the algorithm used in [19,20]); **(c)** The result of the optimization-based routing algorithm (the algorithm used in [9]). The Figure 5c shows the result of optimization-based routing algorithm. In Figure 5c, the node 3 has higher possibility to be the next hop relay node than node 1. However, as shown in Figure 5a,b, node 1 has a more balanced performance than node 3, thus node 1 is more suitable to be the next hop relay node than node 3.