# Efficient Cluster Tree Topology Operation and Routing for IEEE 802.15.4-Based Smart Grid Networks
## 4 Proposed Scheme
### Proposed Addressing Scheme and Routing Scheme  
The tree routing algorithm is a method of transmitting data using distributed address allocation techniques and simple calculations, without the need for separate routing tables. However, it has the drawback of only allowing data transmission between parent and child nodes. Figure 15 illustrates an example of address allocation when each node can have a maximum of four child nodes, a maximum of two routers as children, and the maximum depth of the network is three. Figure 14: Proposed multi-channel operation scheme. In Figure 15, assuming data is transmitted from Node 2 to Node 26, the routing path follows the sequence \(2\to 1\to 0\to 14\to 24\to 14\to 25\to 26\). The router with address 14 only remembers the address values of 24 and 25, so it cannot find the sensor node with address 26 that is held by Router 25. As a result, unnecessary hop counts occur due to the drawback of having to descend to the lowest-level nodes. This approach has the disadvantage of frequent collisions as the network size increases. Figure 16 shows an example of an address assigned to a device in the network by applying the proposed protocol. Figure 16: An example of the allocated addresses of devices in the proposed network. Figure 15: An example for the cluster tree topology in the IEEE 802.15.4 standard. The proposed address system consists of [channel number, tree level, SD number, and subnet ID]. In this case, it is assumed that the gateway uses channel 1. The tree level of the gateway is set to zero, and the SD number is set to one. The subnet ID of the gateway and all cluster heads are set to zero. The cluster members connected to the cluster head use the channel number, tree level, and SD number of their parent node, as they are, and are assigned a separate subnet ID. As shown in Figure 16, the tree level of the cluster header is determined to be equal to the number of hops based on the gateway. The cluster head CH A, which first requests the gateway to join the network, selects radio channel 1. The tree level is set to one, which is increased by one in the gateway. The SD is set to two after the SD of the gateway. The subnet ID of the CHA is set to zero because it is a cluster head. When CH B requests network access to the gateway, it selects channel 2 and sets the tree level to 1, similar to the CHA. The standard deviation (SD) is three. CM E and CM F are cluster members of CH A. These are assigned an equal channel number, tree level, and SD number as the parent node CH A and different subnet IDs. CH C uses an equal number of channels as the parent node CH A. However, the tree level is set to two, which is increased by one, and the SD number is set to three, which does not overlap. The proposed scheme modifies the address allocation method. This enables new nodes to be addressed by more intuitive and simple calculations and routing in a simple manner. Figure 17 shows an example of routing using the proposed address allocation technique. In Figure 17, it is assumed that the address of the origin node is [1; 2; 3] and that of the destination node is [2; 2; 4; 1]. As shown in Figure 17, if a packet is to be transmitted from node [1; 2; 3] to node [2; 2; 4; 1], node [1; 2; 3] transmits data to its cluster head [1; 2; 3]. Upon receiving the data, the [1; 2; 3, 0] router examines the destination address, shifts to the SD of the channel, and scans the beacon frame because it is at an equal tree level. When a beacon frame is received, data are transmitted to the cluster head [2; 2; 4, 0]. When the cluster head receives the data, it transmits the data to the node [2; 2; 4, 1], which is its cluster member. If beacon reception is infeasible in the [2; 2; 4] section, the data are transmitted to the cluster head with a section address as close as feasible to Channel 2. The proposed routing technique can more conveniently determine whether the current cluster head is related to the cluster head to which the target node belongs. This reduces the complexity of the routing path calculation.