# Efficient Cluster Tree Topology Operation and Routing for IEEE 802.15.4-Based Smart Grid Networks
## 4 Proposed Scheme
### The Proposed Superframe Structure  
Figure 4 shows the structure of the proposed beacon frame.  
In the proposed scheme, the beacon frame is generated and broadcast by the gateway or cluster head. Moreover, a user-defined payload field contains the superframe schedule information of the current channel as well as the superframe schedule information of the other channels. Therefore, when traffic is congested in the current channel, the data frames can be transmitted using the superframe schedule information of another channel (the secondary channel).  
Figure 4: The proposed beacon frame format.  
Figure 3: An example of the proposed cluster tree structure.  
In Figure 4, the Channel Number field refers to the number of wireless channels currently used by the network, and the Tree Level field refers to the number of hops from the gateway where the cluster head that sends the beacon frame is located. The SD ID field represents the SD number used by the current cluster head. The Number of Cluster Member (NCM) field represents the number of devices that can participate in the current cluster. This field contains the information used for permit control to ensure load balance and cluster performance while configuring a cluster. In addition, the Current SD Info field stores the superframe schedule information of the cluster head that sends the beacon frame and includes the channel information of the current superframe, beacon interval (BI), and end time (stop time). The CH Info N fields include a bit string that stores information on the SD numbers occupied by the cluster heads in each radio channel. The number of CH Info N fields is determined by the value of the Channel Number field.  
In the proposed scheme, it is assumed that all the clusters use identical BO and SO values. The BI and SD satisfy Equations (1) and (2). Figure 5 shows the structure of the superframe when BO = 6 and SO = 3.  
As shown in Figure 5, the divided rectangle becomes a logical channel. The proposed protocol can secure the required number of logical channels regardless of the limited number of physical channels by physically dividing the channels and dividing the SD within the superframe. In the proposed protocol, the channel to which each cluster head is allocated is that to which the concept of logical channel division is applied simultaneously with the physical channel division. As shown in Figure 5, in the case of BO = 6 and SO = 3, it could be divided into eight SDs in the BI. In this case, the length of the bit string of the CH Info N field is 8 bits. In the environment shown in Figure 5, the bit string of each CH Info N field can be expressed as in Table 1.  
Each bit constituting the CH Info N field was set to one for the bit pointing to the SD of the channel used by each cluster head. The other bits corresponding to the SD were set to zero. When forming clusters, the gateway selects the SD for each channel, as shown in Figure 5, and records its own bit sequence. The reason for the gateway to select SD for each channel is to communicate with the child cluster heads operating on different channels. The cluster heads joining as child nodes of the gateway choose different channels and select SD that does not overlap with the SD chosen by the gateway. For simplicity of the algorithm, the next SD number of the pre-allocated SD is generally chosen. Information about the pre-allocated SD can be obtained through the CH Info N field included in the received beacon frames. Using the Table 1 as an example, if a cluster head joining the gateway selects channel 4, it checks the CH Info N field received from the gateway. If the next bit of the chosen SD number by the gateway is 0, it selects that SD. In this case, the CH Info N  
Figure 5: Superframe structure with BO = 6 and SO = 3.  
field of the cluster head changes only the 4 th bit sequence of the gateway's CH Info N field, from (00010000) to (00011000).