# Time and Energy Efficient Relay Transmission for Multi-Hop Wireless Sensor Networks
## 3 Proposed Scheme
### Initial PAN Construction  
At the initial phase, a PAN coordinator performs an active scan to select a PAN identifier before starting a new PAN, as depicted in Figure 4. Then, the PAN coordinator performs an ED scan to select a clear channel. The PAN coordinator can detect the interference of other networks through the ED scan and save the set of available channels that are not affected by other wireless devices. Then, the PAN coordinator selects a PAN ID and logical channel. The PAN coordinator starts its PAN and commences transmitting periodic beacon frames. A coordinator or devices that receive the beacon frame from the PAN coordinator transmit an association request frame. When the PAN coordinator receives the association request frame, it transmits the association response frame to coordinators or devices. When the devices or the coordinators receive the association response frame from the PAN coordinator, the initial PAN construction process is complete. Figure 5 shows the superframe configuration process for the proposed relay scheme after the PAN coordinator constructs its own PPAN. In Figure 5, when the PAN coordinator configures its own WPAN, it decides the BI and SD of the superframe and broadcasts the beacon frame including the information of the BI and SD. Devices which receive the beacon frame communicate with the PAN coordinator in the SD. Also, the PAN coordinator monitors whether devices transmit a proposed RP (relay period) request frame or not. When it receives the RP request frame, it allocates a resource for the relay communication in the CFP and broadcasts a proposed RP response frame. If necessary, in the proposed scheme, the PAN coordinator can adjust the length of CAP and CFP. Figure 4: Initial PAN construction flow. Figures 6 and 7 show the format of the proposed RP request frame and RP response frame. In Figure 6, the MAC header (MHR) field contains the frame control field, the sequence number field, the addressing field, and the auxiliary security header field. The destination addressing mode field in frame control field is set to indicate the short addressing of destination device, and the source addressing mode field in frame control field is set to indicate the short addressing of source device. The frame pending field in frame control field is set to zero and ignored upon reception, and the acknowledgment request (AR) field in the frame control field is set to one. The source PAN identifier field in the addressing field contains the value of macPANId, and the source address field in addressing field contains the value of the short address of source device. The destination address field in addressing field contains the values of the short address of destination device. The RP length field contains the number of superframe slots being requested for the RP. The characteristics type field is set to one if the characteristics refer to the RP allocation or zero if the characteristics refer to the RP deallocation. Figure 5: The superframe configuration process for the proposed relay scheme. Figure 6: The structure of the proposed RP request command frame. In Figure 7, the RP length field contains the number of time slots being requested for the RP. The characteristics type field is set to one if the characteristics refer to the RP allocation or zero if the characteristics refer to the RP deallocation. The RP offset field indicates the time slot at the beginning of RP in the SD of the PAN coordinator. Figure 8 shows the superframe configuration process by a coordinator using the proposed relay scheme. As shown in Figure 8, when a coordinator powers on, it performs the ED scan and joins the existing WPAN. And then, it activates the relay function and transmits the RP request command frame to the PAN coordinator or the higher level coordinator. When it receives the RP response command frame, it constructs its superframe. After that, the coordinator broadcasts a beacon frame including the information of the BI and SD and monitors whether other coordinators transmit the RP request command frame.