## 4 A Routing Protocol for LLNs (RPL)
### RPL Objective Functions for Non-Malicious LLNs
#### 4.2.3 Fuzzy Logic Method
These terms refer to (i) the ability to capture the real behaviour of a link, (ii) the ability to tolerate transient (short-term) degradation in link quality mainly due to environmental factors, e.g., noise or obstacles, and (iii) the ability to react quickly to persistent changes in link quality, respectively. The combined metrics are (i) smoothened packet reception ratio (SPRR), (ii) smoothened required number of packet retransmissions (SRNPs), (iii) average signal-to-noise ratio (ASNR), and (iv) link asymmetry level (ASL). These metrics measure packet delivery, packet retransmission, channel quality, and link asymmetry, respectively. The fuzzy rule that expresses the goodness of a link in Opt-FLQE is as follows: IF a link has high packet delivery AND low asymmetry AND low packet retransmissions AND high channel quality, THEN it has high quality. The obtained  
Figure 7: Fuzzy logic components. results show that Opt-FLQE is more reliable, stable, and reactive than MRHOF [85]. Thus, improving performance in terms of PLS and delay, specifically in smart grid environments. The main drawback of these objective functions [108; 109; 110; 111] is the absence of energy metrics, such as remaining energy among the combined metrics, as most of the routing metrics used in [108; 109; 111] are link metrics. Link quality metrics only capture routing reliability issues as caused by channel errors and do not address other routing reliability issues, such as nodes remaining energy and energy consumption. [PERSON] et al. [112] proposed OF-Fuzzy, which takes into account both link and node metrics. OF-Fuzzy combines the following routing metrics: (i) ETX for link quality, (ii) delay to minimise the time a packet spends to reach the destination, and (iii) node's remaining energy to prolong the network lifetime. OF-Fuzzy performs the fuzzification process over two phases to avoid the complexity of combining the three routing metrics directly. In the first phase, ETX and delay are combined to compute link quality where the following fuzzy rule gives the best link quality: IF ETX value is small AND delay is short, THEN the link quality is very fast. In the second phase, the quality value is combined with the remaining energy, and the fuzzy rule that expresses the goodness of a link is as follows: IF the quality value is very fast AND the remaining energy is full, THEN the link is excellent. Experimental results show that OF-Fuzzy has lower PLR, delay, and energy consumption compared to MRHOF [85]. Therefore, it improves the routing reliability and prolongs the network lifetime. [PERSON] et al. [113] proposed OF-FL that takes into consideration four routing metrics, namely ETX, end-to-end delay, hop count, and node's remaining energy for path selection. The fuzzy rule expresses the goodness of a link in OF-FL can be defined as follows: IF the number of hop count is low AND end-to-end delay is low AND nodes remaining energy is high AND ETX value is small, THEN the link has an excellent quality. The OF-FL performance shows improvement in terms of end-to-end delay, network lifetime, and packet loss ratio compared with the performance of MRHOF [85] and OF0 [81]. A similar idea as in [112; 113] is also proposed by [PERSON] and [PERSON] [114], who introduced the OF-EC. OF-EC considers both link and node metrics, i.e., ETX and energy consumption, for path selection. The energy consumption metric is adopted from EN-TOT [90] and combined with ETX using the fuzzy logic method. Moreover, the hop count metric has been used in OF-EC to redirect packet transmission toward the root. The following fuzzy rule gives the quality of a link: IF ETX value is short AND energy consumption is low, THEN the link quality is very good. The obtained results show that OF-EC improves the network performance in terms of PDR, network lifetime, and energy consumption. [PERSON] et al. [115] proposed FLEOF that uses a Fuzzy Inference System (FIS) to combine three routing metrics: ETX, energy consumption, and hop count.