Keywords

1 Introduction

Wireless sensor networks (WSNs) are envisioned as consisting of a large number of tiny, battery-limited, multifunctional sensor nodes that are deployed nearly every area, such as building automation, environmental monitoring, target tracking, and industrial process controlling. Because of the constrained energy resources, the sensor nodes need to guarantee the lifetime of the battery for a few months or more than a year to overcome the difficulty of recharging or replacing a discharged battery. Effective management of energy consumption and design of a low-power network have been the important issues, which have led to repeated research in media access control (MAC) protocols.

Cooperative communication is considered to be a good technique for energy consumption. The conception of cooperative communication is originated in Multiple-Input Multiple-Output (MIMO) technology. To reduce the multi-path fading and obtain spatial diversity gain, it exploits the distributed antennas to form a virtual MIMO system, which overcomes the difficulties such as implementing more than one antenna to a small signal node. Most of the earlier cooperative communication works mainly focus on the physical layer aspects [1, 2] while recent works examine the cooperative technology considering the MAC layer [311] and network layer [1214]. In recent years, interest in cross-layer cooperation has increased because of its significant influence in both the theory and the practice of networks.

The MAC layer plays an essential role in data transmissions with complex constraints, which controls multi-user access through common wireless channels and provides relative transparent data transmission services to upper layer. CoopMAC [3] is the early cooperative MAC proposed by Pei Liu. Every node in CoopMAC needs to maintain a cooperative node list recording the neighbors’ rate and time of the last packet. When the source node needs to transmit a packet, it chooses a best relay node according to the end-to-end minimal transmission time. CoopMAC improves the reliability and throughput but costs more memory. The opportunistic cooperative MAC protocol proposed in [4] is based on cross-layer technology and is designed to improve the throughput by selecting the relay node which has the best channel. References [5, 6] select the best relay by inter-group and intra-group competitions. The grouping and competing method improves the throughput, but also costs additional energy in corresponding control packets overhead. To maintain the fairness and reduce the loss rate of control frame, [7] proposed RCMAC. RCMAC transmits clear to send (CTS) packets and acknowledge (ACK) packets through by the relay, which has the fastest transmit rate. Based on 802.11, ECCMAC [8] improves the throughput by choosing the relay which has the shortest transmit time and uses network coding. To improve the throughput, STiCMAC [9] employs multiple relays and combines with the distributed space-time coding.

As mentioned above, most of the proposed cooperative MACs are designed to improve the throughput while relatively little works focus on reducing energy consumption. But for energy constrained wireless networks, such as WSN, energy conservation is particular important. Motivated by this, we propose the total power control MAC (TPC-MAC) protocol. The major contributions of this paper can be summarized as follows:

  • A distributed cooperative MAC protocol is proposed, which can introduce space diversity to mitigate the multi-path fading.

  • A relay selection strategy is discussed, which can lead to the minimal network total transmit power and prolong the lifetime of the network.

The rest of this paper is structured as follows. In Sect. 2, System models for a cooperative network and a non-cooperative network are presented. The theoretical total transmission power for these two network models is analyzed. Section 3 shows the details of the proposed protocol. Section 4 shows the numerical results. Finally, Sect. 5 concludes the paper.

2 System Models and Power Analysis

Consider a WSN with N nodes randomly distributed in a circular area as shown in Fig. 1. The destiny node locates in the center of the circle. Let S, D, R denote the source node, the destiny node and the relay node. Then, a typical three-node cooperative communication model is presented. \( h_{sd} \), \( h_{sr} \) and \( h_{rd} \) are the channel gains of S-D, S-R and R-D, which are circularly symmetric complex Gaussian random variable with zero mean and the variance \( \sigma^{2} \), i.e. (0, \( \sigma^{2} \)).

Fig. 1.
figure 1

WSN with N nodes randomly distributed

The follow paragraph analyzes the total transmit power of non-cooperative model and cooperative model in decode and forward (DF).

2.1 Non-cooperative Model

Each sensor node in a non-cooperative model only transmits its own data packet to the destiny node. When a packet is transmitting, other nodes in the sensing range keep silence. Let x(n) denote the signal to be transmitted from S to D. The signal x(n) can be the data of other nodes that S routes through the destiny node, or it can be the data of S itself. The data received at D can be expressed as:

$$ y_{sd} = \sqrt {P_{{s_{Non - coop} }}} h_{sd} x(n) + n_{sd} $$
(1)

where \( P_{{s_{Non - coop} }} \) is the transmit power of S, n sd is the AWGN with zero mean and the variance N 0, i.e. CN(0, N 0). The channel variance \( \sigma_{sd}^{2} \) of \( h_{sd} \) is modeled as:

$$ \sigma_{sd}^{2} = \eta D_{sd}^{ - \alpha } $$
(2)

where \( \eta \) is a constant determined by the propagation environment, \( D_{sd} \) denotes the distance between S and D, and α is the path loss factor (\( \alpha = 2 \) for free space and \( 3 < \alpha < 4 \) for urban environment). Considering M-PSK modulation and using a BER formulation in [15], the average BER upper bound can be expressed as:

$$ BER \le \frac{{AN_{0} }}{{bP_{{s_{Non - coop} }} \sigma_{sd}^{2} log_{2}^{M} }} $$
(3)

where \( b = sin^{2} \left( {{\pi \mathord{\left/ {\vphantom {\pi M}} \right. \kern-0pt} M}} \right) \), \( A = (M - {{1)} \mathord{\left/ {\vphantom {{1)} {2M + }}} \right. \kern-0pt} {2M + }}{{sin({{2\pi } \mathord{\left/ {\vphantom {{2\pi } M}} \right. \kern-0pt} M})} \mathord{\left/ {\vphantom {{sin({{2\pi } \mathord{\left/ {\vphantom {{2\pi } M}} \right. \kern-0pt} M})} {4\pi }}} \right. \kern-0pt} {4\pi }} \). Take (2) into (3) and consider the constraint of performance requirement BER ≤ ε, where ε denotes the maximum allowable BER, the minimal total transmit power of S is given by:

$$ P_{{s_{Non - coop} }} = \frac{{AN_{0} D_{sd}^{\alpha } }}{{b\varepsilon \eta log_{2}^{M} }} $$
(4)

Under the constraint of ε, when S is nearer to D, the transmit power requirement \( P_{{s_{Non - coop} }} \) is lower.

2.2 Cooperative Model

Each sensor node in a cooperative wireless sensor network can act as a source node or a relay node. DF protocol is used as the cooperative strategy, which includes two transmission phases. Let’s consider a typical three node cooperative model shown in Fig. 1. During transmission phase 1, the source node S transmits signal \( x(n) \) using power \( P_{{S_{coop} }} \). The signal is appended with redundancy check (CRC) before transmission. The signal received at the relay node R and destiny node D can be expressed as (5) and (6), respectively.

$$ y_{sr} = \sqrt {P_{{S_{coop} }}} h_{sr} x(n) + n_{sr} $$
(5)
$$ y_{sd} = \sqrt {P_{{S_{coop} }}} h_{sd} x(n) + n_{sd} $$
(6)

where \( P_{{S_{coop} }} \) is the transmit power of S in a cooperative model, \( h_{sd} \), \( h_{sr} \), \( n_{sr} \) and \( n_{sd} \) are modeled as CN(0, \( \sigma_{sd}^{2} \)), CN(0, \( \sigma_{sr}^{2} \)), CN(0, N 0) and CN(0, N 0), respectively. During transmission phase 2, if the relay node R correctly decodes the signal received from the source node S, it helps forward the signal. If R decodes the signal incorrectly, it discards the signal. The signal received at the destiny node D can be expressed as:

$$ y_{rd} = \sqrt {P_{R}} h_{rd} x(n) + n_{rd} $$
(7)

where \( P_{R} \) denotes the transmit power at the relay node R, \( h_{rd} \) is modeled as CN(0, \( \sigma_{rd}^{2} \)) and \( n_{rd} \) is modeled as CN(0, N 0). After transmission phase 1 and phase 2, the destiny node D combines the signals \( y_{sd} \) and \( y_{rd} \) using maximum ratio combing (MRC).

So, when the relay node participates in the communication between the source node and the destiny node, the total transmit power can be expressed as:

$$ P_{Sum} = P_{{S_{coop} }} + P_{R} $$
(8)

If all channel links are available, considering the results of incorrectly decoding and correctly decoding at the relay node R, averaging the conditional BER over the Rayleigh distributed random variables, the upper bound of average BER with M-PSK modulation can be expressed as [15]:

$$ BER \le \frac{{A^{2} N_{0}^{2} }}{{b^{2} P_{{_{{S_{coop} }} }}^{2} \sigma_{sd}^{2} \sigma_{sr}^{2} log_{2} M}} + \frac{{B^{2} N_{0}^{2} }}{{b^{2} P_{{S_{coop} }} P_{R} \sigma_{sd}^{2} \sigma_{rd}^{2} log_{2} M}} $$
(9)

where \( B = 3(M - 1)/8M + sin(2\pi /M)/4\pi - sin(4\pi /M)32\pi \). To obtain the minimum of total transmit power, considering the constraint of performance requirement \( BER \le \varepsilon \), where \( \varepsilon \) denotes the maximum allowable BER, (8) can be expressed as:

$$ \varepsilon = \frac{{A^{2} N_{0}^{2} }}{{b^{2} P_{{_{{S_{coop} }} }}^{2} \sigma_{sd}^{2} \sigma_{sr}^{2} log_{2} M}} + \frac{{B^{2} N_{0}^{2} }}{{b^{2} P_{{S_{coop} }} P_{R} \sigma_{sd}^{2} \sigma_{rd}^{2} log_{2} M}} $$
(10)

By expressing power \( P_{R} \) in term of \( P_{{S_{coop} }} \), the total transmit power minimization problem can be expressed as:

$$ \begin{aligned} min\quad P_{sum} & = P_{{S_{coop} }} + P_{R} \\ s.t.\quad P_{R} & = f\left( {P_{{S_{coop} }} } \right) \\ P_{{S_{coop} }} & > 0 , { }P_{R} > 0\\ \end{aligned} $$
(11)

By setting the derivative to be zero, the values of \( P_{{S_{coop} }} \) and \( P_{R} \) leading to the minimum \( P_{Sum} \) can be expressed as:

$$ P_{{S_{coop} }} = \sqrt {{E \mathord{\left/ {\vphantom {E {2C}}} \right. \kern-0pt} {2C}}} $$
(12)
$$ P_{R} = {{\sqrt {{{2E} \mathord{\left/ {\vphantom {{2E} C}} \right. \kern-0pt} C}} } \mathord{\left/ {\vphantom {{\sqrt {{{2E} \mathord{\left/ {\vphantom {{2E} C}} \right. \kern-0pt} C}} } {(E - 2D)}}} \right. \kern-0pt} {(E - 2D)}} $$
(13)

where, \( C = {{\left( {b^{2} \varepsilon \sigma_{sd}^{2} \sigma_{sr}^{2} log_{2} M} \right)} \mathord{\left/ {\vphantom {{\left( {b^{2} \varepsilon \sigma_{sd}^{2} \sigma_{sr}^{2} log_{2} M} \right)} {BN_{0}^{2} }}} \right. \kern-0pt} {BN_{0}^{2} }} \), \( D = {{A^{2} \sigma_{rd}^{2} } \mathord{\left/ {\vphantom {{A^{2} \sigma_{rd}^{2} } B}} \right. \kern-0pt} B}\sigma_{sr}^{2} \), \( E = {{(2D + 1 + \sqrt {8D + 1} )} \mathord{\left/ {\vphantom {{(2D + 1 + \sqrt {8D + 1} )} 2}} \right. \kern-0pt} 2} \). When BPSK is applied, \( A = 1/4,B = 3/16,b = 1 \).

So, if we select a relay which can lead to \( P_{Sum} < \;P_{{s_{Non - coop} }} \), the transmit power can be reduced. But an unsuitable relay results in more energy consumption than direct transmission. To show this, we make a simulation comparing the values of \( P_{Sum} \) and \( P_{{s_{Non - coop} }} \), because the formula comparison is very complicated. Figure 2 is the results. The distance between S and D is 30 m. The parameters are shown in Table 1. In the figure, the bigger two circles define the transmission range of S and D according the max transmit power constraint \( P_{\hbox{max} } \). All nodes in the intersection of the two circles can hear either S or D and have the capacity to act as a relay. But only those nodes located in the dotted circle, such as R1, can lead to \( P_{Sum} < P_{{s_{Non - coop} }} \). Nodes outside the dotted circle, such as R2, lead to \( P_{Sum} > P_{{s_{Non - coop} }} \). When the control packets are considered, the suitable relay range becomes smaller.

Fig. 2.
figure 2

Suitable relay range

Table 1. Parameter setting

3 Proposed Cooperative MAC Protocol: TPC-MAC

This section presents an overview of 802.11, discusses the basic idea of TPC-MAC protocol, and introduces the details of the protocol.

3.1 Overview of IEEE 802.11 MAC

Most of the works on cooperative MAC are based on the RTS/CTS/ACK mechanism of 802.11 DCF. The source node which needs to transmit a packet detects the channel by sensing. If the channel is detected idle for distributed inter-frame space (DIFS) duration, it backs off for a random time period and then transmits a request-to-send (RTS) packet. If the destiny node correctly received the RTS packet, it transmits a CTS packet after a short inter-frame space (SIFS) time to acknowledge the channel reservation and ready to receive the data packet. During the packets exchange of RTS and CTS, communication between the source node and the destiny node is established and parameters are initialized. The neighbor nodes in the communication range of the source node and the destiny node update their NAV durations by extracting the duration fields in RTS and CTS packets. Once the reservation of channel is completed, the data packet is transmitted by the source node after SIFS duration. Then, the source node waits for an ACK packet from the destiny node. Figure 3 shows the handshake mechanism timing of 802.11 RTS/CTS/ACK.

Fig. 3.
figure 3

Handshake mechanism timing of RTS/CTS/ACK

3.2 Basic Idea of TPC-MAC

Although the mechanism of 802.11 RTS/CTS/ACK showed in Fig. 3 solves the problem of hide node, it is not suitable for cooperative communication because of the absence of a relay node. The modifications can be cataloged into two kinds: (1) extending the packet format of RTS and adding a filed for a selected relay node address. Thus, the selected relay can be invited to help the source transmitting packets. (2) Adding a helper ready to send (HTS) packet, which is transmitted by an opportunistic relay developed in some competition with some parameter constraints. The relay transmits the HTS packet to declare to participate in cooperative communication. Nodes in (1) need additional storage overhead to maintain a table containing some parameters, such as relay ID, relay rate and last transmission time. And for a scenario where wireless nodes move fast, the table should be updated frequently, or the selected relay node may be out of the communication range. We propose the TPC-MAC using the second kind of modifications.

TPC-MAC focuses on reducing the total transmit power of a network. A good relay selection strategy is the key point of a cooperative MAC design. Most of the proposed relay selection strategies are based on the instantaneous or average channel state information, transmission rate, throughput, interrupt probability, bit error rate, energy constraint, etc. Based on the perspective of energy balance, reference [11] selects the maximum residual energy node as the relay node. But from the aspects of the node location, the channel state and the network’s total energy consumption, this selected relay node may not be the best relay node. A relay node far away from the source node and destination node needs more transmit power than that of a near one under the same parameter constraints. So energy waste cannot be avoided in [11].

To minimize the total energy consumption of the network, we select the best relay under the constraint of destination node’s BER. Different relay leads to different total transmit power because of the different values of \( P_{{S_{coop} }} \) and \( P_{R} \). The best relay node will leads to the minimal total transmit power, which can be expressed as:

$$ P_{sum}^{k} = min\left\{ {P_{sum}^{i} ,i = 1,2,3, \ldots N} \right\} $$
(14)

Where k is the best relay, i denotes the candidate relay node, \( P_{sum}^{k} \), \( P_{sum}^{i} \) denote the total transmit power of the network with the respectively relay node k, i. N is the number of candidate relay nodes.

3.3 TPC-MAC Protocol Details

TPC-MAC protocol is based on the RTS/CTS/ACK mechanism. We extend the packet format of CTS by adding a power field, which indicates the minimal transmit power for the source node in non-cooperative model. A HTS packet piggybacked \( P_{{S_{coop} }} \) is used to complete the relay competition. All control packets are transmitted with the max power and all data packets are transmitted with the optimal calculated power. In this section, the detail TPC-MAC protocol is explained as follow.

Source Node.

When a source node has to transmit a packet, it detects whether the channel is idle. If the channel keeps idling for a DIFS duration, the source node starts a random back off duration. When the back off counter counts down to zero, the source node transmits a RTS packet(at 1 Mb/s) to the destiny node. Then, the source node waits for the CTS packet and the HTS packet respectively from the destiny node and the best relay node. If both the CTS packet and the HTS packet are received in sequence, the source node extracts \( P_{{S_{coop} }} \) from the HTS packet and transmits the data packet after a SIFS duration of receiving the HTS packet. If the source node does not receive any HTS packet in 2 SIFS duration after receiving a CTS packet, it extracts \( P_{{s_{Non - coop} }} \) from the CTS packet and then transmits the data packet. After that, the source waits for the ACK packet from the destiny node. Once the ACK packet is received, the source node will handle the next data packet in its queue; otherwise, it will perform random back off and restart the handshake mechanism.

Destiny Node.

If the destiny node receives a RTS packet from the source node, it measures the channel state information (CSI) between the source node and itself, then calculates the transmit power \( P_{{s_{Non - coop} }} \) and attaches the \( P_{{s_{Non - coop} }} \) to the CTS packet. After a SIFS time, the destiny node transmits the CTS packet and waits for the HTS packet from the neighbor nodes. If any HTS packet is not received in 2SIFS duration after it transmits the CTS packet, the destiny node prepares to receive the unique data packet transmitted by the source node. That means the communication between the source node and the destiny node will be in the non-cooperative model, because there is no suitable relay node. If a HTS packet is received, the destiny node waits for two data packets respectively from the source node and the best relay node. MRC is used to process these two data packets. Whether it is in a non-cooperative model or in a cooperative model, the destiny node transmits an ACK packet to the source node after the data packet is correctly received and processed.

Candidate Relay Node.

Each relay candidate node that has heard both the RTS packet and the CTS packet estimates the CSI between the source node and itself, the destiny node and itself, and calculates \( \sigma_{sr}^{2} \) and \( \sigma_{rd}^{2} \) according the strength of the RTS packet and the CTS packet. \( \sigma_{sd}^{2} \) can be calculated out according to the non-cooperative model transmit power of the source node \( P_{{s_{Non - coop} }} \) extracted in the CTS packet. Then, using formulas (12) and (13), the relay candidate node calculates the cooperative transmit power \( P_{{S_{coop} }} \), P R and \( P_{Sum} \). If \( P_{{s_{Non - coop} }} \) is larger than \( P_{Sum} \), the relay candidate node set its countdown timer according the value of \( P_{Sum} \). When the timer reaches zero and the channel is idle, it transmits a HTS packet attached by \( P_{{S_{coop} }} \). If \( P_{{s_{Non - coop} }} \) isn’t larger than \( P_{Sum} \) or a HTS packet is already overheard transmitting, the relay candidate node keeps silence. Thus, the best relay node, which leads to the minimum total transmit power of the network is selected.

Relay Node.

After successfully transmitting the HTS packet, the relay node waits for the data packet transmitted by the source node. If the received data packet can be decoded correctly, the relay forwards it to the destiny node using the calculated transmit power P R .

The exchange of control packets in TPC-MAC and the corresponding NAV setting are shown in Fig. 4. To notify the transmit power, we extend the CTS packet format and add a 2bytes power field for \( P_{{s_{Non - coop} }} \). The HTS packet format is designed as the same of the CTS packet, and the 2bytes power field is used for \( P_{{S_{coop} }} \). Figure 5 shows the formats of a CTS packet and a HTS packet.

Fig. 4.
figure 4

TPC-MAC timing

Fig. 5.
figure 5

Packet format

4 Simulation Results

In this section, we demonstrate the performance advantages of the proposed TPC-MAC protocol via some numerical simulations. The WSN we considered is shown in Fig. 1. The range radius is set equal to the transmission range, which is calculated as 89 m. Assuming there are 100 sensor nodes randomly distributed in the circular area. The destiny node is located in the center of the area. The wireless channels are assumed as the Rayleigh flat fading with variance incorporating the position information and not to change during one packet transmission period. Table 1 defines the related parameters, where the energy consumption and some MAC parameters are quoted from [11]. We compare TPC-MAC protocol with MMRE [16] and WcoopMAC [11] in the same environment. MMRE is a direct transmission scheme using energy balance algorithm. WcoopMAC is a cooperative transmission scheme picking the largest residual energy node as the best relay node. MMRE and WcoopMAC are both for the purpose of reducing the energy consumption and extending the network life. Three kinds of lifetime definition are used in most of the proposed cooperative MAC. One is defined as the time when the first sensor node dies. The second is defined as the time when a certain ratio sensor nodes die. The third kind network lifetime is defined as the total data packets received at the destiny node when the network cannot transmit any data packet to the destiny node. For simplicity, neglecting the energy consumption of every node in the sensing or sleeping state, we define the network lifetime as the third kind definition.

Performances with BER constraint under BPSK modulation over different sensor numbers are compared in Fig. 6. We note that, the lifetime performance is improved as the sensor node number increases, because the total network energy is increased. MMRE performs the worst, even if it uses both the residual energy information (REI) and CSI. This is because of the absence of cooperation communication mechanism. WcoopMAC employing a cooperative communication scheme and picking the maximum residual energy node as the relay node performs much better than MMRE. TPC-MAC performs the best performance. This is because the relay selection strategy presented in Sect. 3.2 can reduce more energy consumption of the total network.

Fig. 6.
figure 6

Network lifetime comparison under different sensor numbers

Figure 7 considers the network lifetime under the different BER constraints. The number of sensor node is 100. In order to see the performance with high BER requirement, the max transmission power limit is not considered. According to formula (4) or (10), when the BER requirement becomes higher, the transmit power becomes larger because of the smaller BER value. So, we can see in Fig. 7, the network lifetimes of the compared three kinds MAC increase all when the BER value increases. The lifetime of TPC-MAC can remain at about twice as the lifetime of WcoopMAC when the BER value is smaller than \( 10^{ - 5} \). When the BER requirement is low, the transmission energy saved by power optimization in WcoopMAC can’t make up the extra energy consumption of the control packets. Thus, the performance of MMRE is better than WcoopMAC when the BER requirement is low. In TPC-MAC, the candidate relay node compares the total transmission power of cooperative and non-cooperative scheme. If the total transmission power of cooperative scheme is larger than the non-cooperative scheme, the candidate relay keeps silence. So the lifetime of TPC-MAC in Fig. 7 is longer than WcoopMAC and MMRE.

Fig. 7.
figure 7

Lifetime under different BER constraints

We compared the average wasted energy under different BER value with 100 sensor nodes in the network. Figure 8 shows the total network residual energy when the network is dead. When the BER value is smaller than \( 10^{ - 4} \), TPC-MAC is much more efficient than WcoopMAC and MMRE in terms of energy savings.

Fig. 8.
figure 8

Average wasted energy comparison under different average BER

Figure 9 considers the network average wasted energy with different sensor node numbers under the constraint of BER value \( 10^{ - 3} \). The average wasted energy in WcoopMAC and MMRE almost present the linear growth as the number of sensor node increases. The change of sensor node number does not have much impact on TPC-MAC. This is because the TPC-MAC adaptively chooses the cooperative or non-cooperative communication scheme and picks the best relay node which leads to the minimal total transmit power.

Fig. 9.
figure 9

Average wasted energy comparison under different sensor numbers

5 Conclusion

In this paper, a distributed cooperative MAC protocol named TPC-MAC is proposed to extern the lifetime of distributed WSNs. In this protocol, both total transmission power of the network and CSI are considered to select the best relay node. Under the constraint of average BER value at the destiny node, the transmit power of the source node and the relay node are optimized to achieve the minimal total transmit power. Simulation results demonstrate that TPC-MAC can effectively reduce the energy consumption and improve the network lifetime compared with MMRE and WcoopMAC, especially in a high BER requirement network.