# Parent and PHY Selection in Slot Bonding IEEE 802.15.4e TSCH Networks
## 3 Parent and PHY Selection Heuristic
### RPL Integration  
While the proposed heuristic is defined from a centralized point of view (and it can be used as a centralized scheduler), it is clearly a step towards a distributed parent and PHY selection mechanism. Here, an explanation is provided of how the different inputs of the heuristic can be obtained and how the heuristic can be integrated into an existing low-power routing protocol, that is, the RPL routing protocol, part of the 6T3 CH stack. More specifically, how the heuristic can be integrated into the RPL OF in a distributed way (i.e., utilizing only information that is locally available at each node) is discussed. Figure 2: Example of node 3 using the heuristic to select its parent and PHY. First, the node selects the PHY per parent (with threshold \(\delta=0.1\)) and afterwards the node calculates the \(x\) score to select parent 2. The inputs of the heuristic are the data rates of the different PHYs, the different link reliability values (or \(ETX=\frac{1}{reliability}\)) and the score values of possible parent nodes. The data rates of the different PHYs and the related number of regular slots that need to be bonded together to transmit a packet, \(s_{m}\), are known by every node beforehand as they are characteristic for each PHY. The different reliability values could be approximated by mapping neighbor Received Signal Strength Indicator (RSSI) values to PDR values, based on PHY measurements carried out in the environment where the network is being deployed. For example, Contiki-NG ([[https://github.com/contiki-ng/contiki-ng/blob/develop/os/net/link-stats.c](https://github.com/contiki-ng/contiki-ng/blob/develop/os/net/link-stats.c)]([https://github.com/contiki-ng/contiki-ng/blob/develop/os/net/link-stats.c](https://github.com/contiki-ng/contiki-ng/blob/develop/os/net/link-stats.c)), accessed on 12 May 2021) has the option called LINK_STATS_INIT_ETX_FROM_RSSI to estimate the ETX from RSSI values [22]. This could be extended to support multiple PHYs. Alternatively, it is also possible to learn the link reliability over time. The link reliability can be defined as the number of ACKs over the number of transmission attempts, which can then be turned into an \(ETX=\frac{num\ tx}{num\_ack}\), as it is done in Contiki-NG (i.e., option LINK_STATS_ETX_FROM_PACKET_COUNT) but also in the 6 TiSCH OpenWSN implementation ([[https://github.com/openwsn-berkeley/openwsn-fw/blob/develop/openstack/02b-MAChigh/neighbors.c](https://github.com/openwsn-berkeley/openwsn-fw/blob/develop/openstack/02b-MAChigh/neighbors.c)]([https://github.com/openwsn-berkeley/openwsn-fw/blob/develop/openstack/02b-MAChigh/neighbors.c](https://github.com/openwsn-berkeley/openwsn-fw/blob/develop/openstack/02b-MAChigh/neighbors.c)), accessed on 12 May 2021). When no transmission attempts are available for a certain possible parent, a default ETX value can be chosen (e.g., representing an average link quality). In this case, where link reliability is learned over time and a node has to find a fast and reliable PHY for the current preferred parent (as proposed in Algorithm 1), a node can apply a Link Quality Estimation (LQE) technique as proposed by [PERSON] et al. to iterate through the different PHYs [4]. The necessary score values \(x_{p}\) of possible parents can be distributed throughout the network using the Metric Container option in RPL DIO messages, similar to the metrics distributed for the MRHOF OF [19; 21]. Using those inputs, the MRHOF OF can be used to further integrate the heuristic, as that OF is designed to minimize the path cost based on additive metrics (that are turned into Rank values), that is, the score values used in the heuristic. Subsequently, using MRHOF, the node will select (with hysteresis) a parent that requires fewer defaults slots to be scheduled along the path towards the root, as this is the goal of the proposed heuristic. Figure 3 illustrates a simplified example of how the heuristic can be integrated in a distributed fashion in the RPL routing layer.