## 4 The Principle of the Balanced Cross-Layer Fuzzy Logic Routing Algorithm
### The Calculation of the Utility of Each Node
Furthermore, both in Figure 5b,c, the utility of node 4 is larger than node 5; but as discussed in Figure 5a, the node 5 has a more balanced performance than node 4. The reason for this issue is that in the optimization-based routing algorithm and traditional fuzzy logic-based routing algorithm, the large parameters will have a greater effect on the algorithm performance; and the nodes that these parameters belong to are easy to be chosen as the next hop relay node, which is consistent with the performance of node 4 and node 5 in Figure 5b,c, respectively. The Figure 5 indicates that the BCFL and the traditional fuzzy logic-based routing algorithm (used in [19,20]) have the similar performance, and they are all better than the optimization-based routing algorithm (used in [9]). On the other hand, even the traditional fuzzy logic-based routing algorithm has similar performance on selecting the next hop relay node with the BCFL, but considering the number of the fuzzy if-then rules, the BCFL will have greater advantage than the traditional fuzzy-based routing algorithm. As shown in Figure 6, in the traditional fuzzy-based routing algorithm, the number of if-then rules increases sharply with the increasing of the linguistic variables and the number of cross-layer parameters; moreover, this increase is exponential. On the contrary, in the BCFL, the number of fuzzy rules will stay constant when the cross-layer parameters increase (Figure 6a), and even when the linguistic variables increase, the growing of the fuzzy if-then rules is linear (Figure 6b), which is much less compared to the traditional fuzzy logic-based routing algorithm. The Figure 6a,b demonstrate that the traditional fuzzy logic routing algorithm cannot handle multiple constraints. If the number of cross-layer parameters is large, the number of if-then rules will become too large to be acceptable. Moreover, the fuzzy rules have great effect on the fuzzy inference system performance, so an appropriate fuzzy rule is very important to the fuzzy logic system. For this

Figure 6: **(a)** The relationship of the number of if-then rules and the number of cross-layer parameters; **(b)** The relationship of the number of if-then rules and the number of the linguistic variables. point of view, the BCFL can reduce the complexity of the algorithm greatly; more importantly, the rules of the new algorithm are clear and fixed, which makes it easy to design and more accurate. ### An Example Scenario for Multiple Constrains

The performance of the BCFL under multiple constraints will be shown in this section. From this scenario, we can find the greater advantage of the BCFL more directly. In this simulation, we consider five nodes as the candidates of the next hop relay nodes and seven cross-layer parameters for each node. So the cross-layer parameter matrix is a 5 \(\times\) 7 matrix. This matrix is generated by the function _rand()_ in MATLAB. The parameters are shown in Table 6.

The result of this scenario is shown in Figure 7.

From Figure 7, we can find that node 5 has the best performance among all the candidate nodes; as shown in Table 6 and the line graph of dispersion in Figure 7, the cross-layer parameters of node 5 are more balanced than the other nodes. From the line graph of utility in Figure 7, we can conclude that the performance of node 3 is better than node 1, node 1 has the better performance than node 4, and the performance of node 2 is the worst in these nodes. The simulation result is consistent with the