4.1. Basic Idea
To overcome the weak points of GTS scheme defined by IEEE 802.15.4 standard, the following new design considerations should be applied:
- -
Compatible
- -
Low Complexity
- -
Reliable
- -
Low Power Consumption
Based on the above considerations, we propose the cooperative MAC scheme for the real-time data transmission. The proposed scheme allows one to avoid incurring in a high additional delay by storing real-time data frames in a coordinator during the inactive period. Also, the proposed scheme minimizes the energy consumption since it allows end devices to communicate directly. Our proposed scheme adds a new device-to-device (D2D) period in inactive period for real-time data transmission.
In this paper, we assume the scenario in which the proposed scheme is applied to a local area network such as a home or an office. In WSNs, sink nodes or coordinators mainly request data from end devices or end devices periodically transmit data to sink nodes or coordinators. However, in the IoT, end devices generate data and request data from other devices. Especially, in a home network or office network, each device autonomously needs to communicate with other devices. Also, home or office networks do not require a large-scale network due to the spatial constraints. Therefore, in this paper, we assume that the proposed scheme is applied to a small-scale network such as a home network or office network. Also, in this paper, we assume that the PAN coordinator introduces an inactive period by choosing beacon order (BO) > superframe order (SO) in order to reduce energy consumption. If SO is equal to BO, we cannot use the inactive period, and the proposed scheme cannot allocate D2D slots to end devices. However, if the inactive period is removed in the superframe, the energy consumption of the devices which use IEEE 802.15.4 protocol increases greatly. Therefore, in this paper, we focus on the case that SO is smaller than BO. If SO is smaller than BO and the superframe of the IEEE 802.15.4 protocol maintains a low duty cycle, a sufficient inactive period always exists in the superframe, and the PAN coordinator can allocate D2D slots to end devices with real-time data. Thus, the proposed scheme can guarantee any QoS for D2D transmission.
The proposed scheme can reduce the end-to-end delays caused by the very low duty cycle of the IEEE 802.15.4 standard since it can transmit the real-time data to the destination device in the same superframe duration. It can also reduce the additional energy consumption caused by the transmission via the PAN coordinator since the proposed scheme can transmit the real-time data without the relay of the PAN coordinator.
The proposed scheme has the same superframe structure defined by the IEEE 802.15.4 standard. The PAN coordinator broadcasts the beacon frame at the beginning of the superframe, and it contains the information about the superframe structure. In the proposed scheme, the only period added to the superframe structure is a D2D period that is allocated for the inactive duration.
Figure 3 shows the proposed superframe structure.
Figure 3.
The proposed superframe structure.
Figure 3.
The proposed superframe structure.
As shown in
Figure 3, the proposed superframe structure is based on the idea of adding a D2D period after the SD period. In the D2D period, all devices that are not related to D2D communication can go into sleep mode to save energy. In other words, devices that are not allocated a D2D slot by the PAN coordinator go into the sleep mode during the inactive period, and only devices that are allocated D2D slots transmit the data frame to the destination device in the allocated D2D period. Because the source and destination devices that are allocated D2D slot by PAN coordinator only communicate in the allocated D2D slot, they do not have to contend with other devices to transmit data frames. The key features of the proposed cooperative MAC structure include the following: firstly, in the proposed scheme, devices with real-time data do not need to contend for the channel access in the CAP since they can transmit all their data frames in the D2D period without contention. Because this feature can decrease the bandwidth and energy waste occurred by unnecessary contentions, the proposed scheme can improve the network performance. Secondly, in the proposed scheme, the source device can directly transmit the real-time data frame to the destination device in the same superframe duration. This feature allows it to avoid the additional delay occurred by storing the data on the coordinator during the inactive period and sending it out in the next superframe duration. Thirdly, our proposed scheme can exchange real-time data frames without relay by the coordinator. In the legacy GTS schemes, the PAN coordinator receives real-time data frames from the source device, transmits the received real-time data frames to the destination device, and stores real-time data frames during the inactive period. Thus, the legacy GTS schemes waste energy in coordinator relays. However, in the proposed scheme, the source device can directly transmit the real-time data frames to the destination device in the same superframe duration. Therefore, our proposed scheme can reduce the energy and resource waste by receiving real-time data frames from the source device, transmitting real-time data frames to the destination device, and storing real-time data frames during the inactive period. Lastly, our proposed superframe structure and the IEEE 802.15.4 standard have the same structure except for the addition of a D2D period. Our proposed scheme is compatible and can be directly applied with small overhead to the current IEEE 802.15.4 standard since the D2D period added in the proposed scheme is allocated to the inactive period.
Figure 4 shows the flow chart of a coordinator using the cooperative MAC structure.
Figure 4.
The flow chart of coordinator using the cooperative MAC structure.
Figure 4.
The flow chart of coordinator using the cooperative MAC structure.
In
Figure 4, the PAN coordinator broadcasts a beacon frame at the beginning of the superframe after it constructs PAN in the initial phase. If the PAN coordinator receives the D2D request command frame from the device with real-time data, it allocates a D2D period for devices with real-time data in the inactive period. A detailed description of each step for the proposed scheme is provided in the next subsections.
4.3. Resource Management Scheme for Device-to-Device Communication
The coordinator that receives the D2D request command frame from an end device allocates a D2D period for direct communication between end devices in the inactive period. The D2D period is allocated only by the coordinator, and it is used only for the direct communications between end devices associated with the PAN. A single time slot in D2D period may extend over one or more superframe slots. The D2D slot is allocated on the basis of the FCFS scheme, and all D2D slots are placed contiguously after the CFP period. Each D2D slot is deallocated when the direct communication between the source and the destination devices is no longer required. Also, at any time, the D2D slot can be deallocated at the discretion of the coordinator or by the device that originally requested the D2D slot. A device that has been allocated a D2D slot may also operate in the CAP. A data frame transmitted in the allocated D2D slot includes only short addressing.
The management of a D2D period is undertaken by the PAN coordinator only. To facilitate the D2D period management, the coordinator can store all the information necessary to manage the D2D period. For each D2D slot, the coordinator can store its starting slot, length, and associated device address.
For each allocated D2D slot, the source and destination devices can store its starting slot and length. If the source device has been allocated a D2D slot, it can transmit the real-time data frame to the destination device for the entirety of the D2D slot. In the same way, the destination device can receive the real-time data from the source device for the entirety of the D2D slot. If a data frame is received during a D2D period and an acknowledgment is requested, the device transmits the acknowledgment frame as usual. If a device loses the synchronization with the coordinator, all its D2D allocations shall be lost.
A device is instructed to request the allocation of a new D2D through the MLME-D2D.request primitive with D2D characteristics set according to the requirements of the intended application. The definition of the D2D request primitive is as follows:
MLME-D2D.request (
DeviceAddrMode,
DevicePANId,
DeviceID,
DestinationDeviceID,
D2DCharacteristics
)
To be allocated a new D2D slot, the device sends the D2D request command, as described in the previous subsection, to the coordinator. The Characteristics Type field of the D2D Characteristics field of the request is set to one (D2D allocation), and the length field is set according to the desired characteristics of the required D2D.
On receipt of the D2D request command indicating a D2D allocation request, the coordinator first checks if there is available capacity in the current superframe, based on the remaining length of the inactive period and the desired length of the requested D2D. If there is the sufficient bandwidth available, the D2D period is allocated on the basis of the FCFS scheme by the coordinator. The coordinator makes this decision within a certain superframe duration.
When the coordinator determines whether capacity is available for the requested D2D slot, it generates a D2D descriptor with the requested specifications and the short address of the requesting device. If the D2D was allocated successfully, the coordinator sets the start slot in the D2D descriptor to the superframe slot at which the D2D begins and the length in the D2D descriptor to the length of the D2D. In addition, the coordinator notifies the next higher layer of the new D2D. This notification is achieved when the MLME of the coordinator issues the MLME-D2D.indication primitive with the characteristics of the allocated D2D. If there was not sufficient capacity to allocate the requested D2D, the start slot is set to zero and the length to the largest D2D length that can currently be supported. The PAN coordinator then includes this D2D descriptor in its beacon.
Figure 6 shows the format of the proposed beacon frame.
Figure 6.
The format of the proposed beacon frame.
Figure 6.
The format of the proposed beacon frame.
In
Figure 6, the Frame Control field contains the information defining the frame type, addressing fields, and other control flags. The Superframe Specification field contains the information of BO, SO, CAP slot and coordinator. The GTS field contains the information of CFP period. The D2D field contains the information of D2D period and is illustrated in
Figure 7.
Figure 7.
The format of the D2D field.
Figure 7.
The format of the D2D field.
In
Figure 7, the D2D Descriptor Count field specifies the number of D2D descriptors contained in the D2D List field of the beacon frame. If the value of this field is zero, the D2D List field of the beacon frame is not present. The D2D Permit field is set to one if the coordinator is accepting D2D requests. Otherwise, the D2D Permit field shall be set to zero. The size of the D2D List field is defined by the values specified in the D2D Specification field of the beacon frame and contains the list of D2D descriptors that represents the D2D period that are being maintained.
Figure 8 shows the format of each D2D Descriptor.
Figure 8.
The format of D2D Descriptor.
Figure 8.
The format of D2D Descriptor.
In
Figure 8, the Source DevAddr and Destination DevAddr fields contain the short addresses of the source device and destination device for which the D2D descriptor is intended. The D2D Starting Slot field contains the superframe slot at which the D2D is to begin. The D2D Length field contains the number of contiguous superframe slots over which the D2D is active.
On receipt of a beacon frame containing a D2D descriptor corresponding to macShortAddress, the source device and destination device process the descriptor. The MLME of devices then notifies the next higher layer of whether the D2D allocation request was successful.
Figure 9 shows the message flow for the case in which the device requests the D2D allocation.
Figure 9.
Message sequence chart for D2D allocation initiated by a device.
Figure 9.
Message sequence chart for D2D allocation initiated by a device.
Also, if device wishes to deallocate, it is instructed to request the deallocation of an existing D2D through the MLME-D2D.request primitive using the characteristics of the D2D. From this point onward, the D2D to be deallocated is not used by the device, and its stored characteristics are reset.
To request the deallocation of an existing D2D, the MLME of device transmits the D2D request command frame to the coordinator. The Characteristics Type field in the D2D request command frame is set to zero (i.e., D2D deallocation), and the D2D length fields is set according to the characteristics of the D2D to deallocate. On receipt of the acknowledgment to the D2D request command, the MLME of device notifies the next higher layer of the deallocation. This notification is achieved when the MLME issues the MLME-D2D.confirm primitive with a status of SUCCESS and a D2DCharacteristics parameter with its Characteristics Type field set to zero. If the D2D request command is not received correctly by the PAN coordinator, it determines that the device has stopped using its D2D.
On receipt of a D2D request command with the Characteristics Type field of the D2D Characteristics field set to zero (D2D deallocation), the PAN coordinator attempts to deallocate the D2D. If the D2D characteristics contained in the D2D request command frame do not match the characteristics of a known D2D, the PAN coordinator ignores the request. If the D2D characteristics contained in the D2D request command frame match the characteristics of a known D2D, the MLME of the PAN coordinator deallocates the specified D2D and notifies the next higher layer of the change. This notification is achieved when the MLME issues the MLME-D2D.indication primitive with a D2DCharacteristics parameter containing the characteristics of the deallocated D2D and a Characteristics Type field set to zero. The PAN coordinator does not add a descriptor to the beacon frame to describe the deallocation.
D2D deallocation may be initiated by the PAN coordinator due to a deallocation request from the next higher layer or the expiration of the D2D period. The next higher layer of the PAN coordinator initiates a D2D deallocation using an MLME-D2D.request primitive with the D2D Characteristics field of the request set to indicate a D2D deallocation and the length field sets according to the characteristics of the D2D to deallocate. The MLME then responds with an MLME-D2D.confirm primitive with a status of SUCCESS and the D2DCharacteristics parameter with a Characteristics Type field set to zero.
When a D2D deallocation is initiated by the PAN coordinator either due to the D2D expiring or due to SD maintenance, the MLME of coordinator notifies the next higher layer of the change using the MLME-D2D.indication primitive with a D2DCharacteristics parameter containing the characteristics of the deallocated D2D and a Characteristics Type field set to zero.
In the case of any deallocation initiated by PAN coordinator, the PAN coordinator deallocates the D2D and add a D2D descriptor into its beacon frame corresponding to the deallocated D2D, but with its starting slot set to zero. The D2D descriptor for the deallocation remains in the beacon frame for the certain superframes duration.
On receipt of a beacon frame containing a D2D descriptor corresponding to Source DevAddr and Destination DevAddr and a start slot equal to zero, source device and destination device immediately stop using the D2D period. The MLME of devices then notifies the next higher layer of the deallocation using the MLME-D2D.indication primitive with a D2DCharacteristics parameter containing the characteristics of the deallocated D2D and a Characteristics Type field set to zero.
Figure 10 shows the message flow for the cases in which a D2D deallocation is initiated by a device.
Figure 10.
Message sequence chart for D2D deallocation initiated by a device.
Figure 10.
Message sequence chart for D2D deallocation initiated by a device.
Figure 11 shows the message flow for the cases in which a D2D deallocation is initiated by a coordinator.
Figure 12 illustrates the flow of data frames and resource allocation in the proposed scheme.
Figure 11.
Message sequence chart for D2D deallocation initiated by a coordinator.
Figure 11.
Message sequence chart for D2D deallocation initiated by a coordinator.
Figure 12.
The flow of data frames and resource allocation in the proposed scheme.
Figure 12.
The flow of data frames and resource allocation in the proposed scheme.
As shown in
Figure 12, the source device with the real-time data transmits the D2D request command frame in the CAP period. On receipt of the D2D request command frame, coordinator allocates a D2D period for direct communication between the source device and destination device in the inactive period. It then broadcasts a beacon frame including the information of the allocated D2D period. On receipt of a beacon frame containing the information of the assigned D2D period, source device and destination device directly exchange the real-time data without relay of coordinator. Also, to prevent unnecessary energy consumption, all devices except source device and destination device, and coordinator enter into sleep mode in all inactive periods, including the D2D period.