Abstract
Introduction
Wireless sensor networks (WSNs) are employed over a wide range of applications, such as smart grid, intelligent agriculture, and health care.1–3 The computation and energy limits of sensors bring some challenges for improving the spectrum efficiency in WSN. Relay is a widely adopted technology in Long-Term Evolution (LTE) which could significantly improve spectrum efficiency. Various types of relay have been investigated, including one-way relay and two-way relay. Two-way relay, which is based on physical layer network coding, enables two nodes exchanging signals via two time slots. 4
However, full-duplex technology is another promising method in the next generation wireless system (5G) to enrich spectrum efficiency.5–7 By alleviating self-interference efficiently, a full-duplex node can receive and transmit signals at the same time over the same frequency band. Various kinds of interference cancellation techniques include antenna separation, analog and digital cancellation, spatial domain cancellation, and time-domain cancelation. 6
Combining full-duplex technology and two-way relaying, full-duplex two-way relaying is a kind of relaying which can accomplish information exchange between two nodes within only one time slots, while one-way half-duplex relaying, two-way half relaying, one-way full-duplex relaying requires four time slots, two time slots, and two time slots, respectively. 7
Efficient wireless resource allocation can provide significant benefit for various kinds of relay system, including power allocation8–9 and spectrum allocation.10–11 Optimal power allocation (OPA) is investigated for full-duplex one-way amplify-and-forward (AF) relay 8 and full-duplex two-way AF relay 9 , respectively, consisting of single user pair and single relay node. Resource allocation in full-duplex relaying system is investigated in Rodriguez et al. 10 to optimize network level energy-efficiency, considering residual self-interference. Joint subcarriers and power allocation under individual power constraints is investigated in Yang et al. 11 to maximize throughput of full-duplex two-way relay networks.
In a relay network with multiple relays, efficient relay selection can effectively enhance the system performance.12–14 In Liu et al., 12 a relay selection for full-duplex relaying was proposed under Nakagami-m fading channels, considering direct link between source and destination. And, the outage performance was analyzed. In Li et al., 13 relay selection method in full-duplex two-way relay system based on best-worst-channel was proposed, and the close-form expressions of bit error ration, outage probability, and ergodic capacity were analyzed under the proposed relay selection method.
For a multi-user relay network with multiple relays, efficient relay assignment among users should be implemented to avoid different users selecting same relay, meanwhile to improve the system performance. In Cui et al., 15 OPA and relay assignment for multi-user full-duplex one-way relay network with multiple relays were discussed to maximize the weighted sum rate.
Based on the analysis above, although the full-duplex relay system has been investigated by many researchers, the distributed resource allocation of full-duplex two-way relaying in WSNs has rarely been addressed. Moreover, most of the methods presented above assume that global channel state information (CSI) can be derived and a centralized algorithm can be implemented in one central controller. In this article, we consider a distributed relay assignment and power allocation (DRAPA) in a WSN with multiple full-duplex two-way relays to maximize the weighted sum rate of the WSN under total power and relay assignment constraints. The main contributions of this article are summarized as follows:
We focus on relay assignment and power allocation for full-duplex two-way relaying in WSN, aiming to maximize weighted sum rate under total power constraint, considering the impact of the residual self-interference (RSI).
We propose a DRAPA, by solving relay assignment and power allocation separately. The relay assignment is transferred into a bipartite matching problem and solved by a distributed algorithm based on Gale–Shapley algorithm, which is easily carried out in a distributed manner. The power allocation is solved by sequential convex approximation method.
The rest of this article is organized as follows. Section “System model and problem formulation” describes the system model and problem formulation. In section “Solution of optimization problem,” the scheme of power allocation and relay assignment is described in detail. The performance analysis of the proposed scheme is described in section “Performance analysis.” Simulation results are shown in section “Simulation results.” Finally, we conclude this article in section “Conclusion.”
System model and problem formulation
System model
We consider a WSN, including

Wireless sensor network with multiple full-duplex two-way relays.
The channel coefficient between
Assume sensors
where
Meanwhile, relay
where
Then, the signal received by node
and
where
and
where
Thus, the achievable rate of the
Problem formulation
In this article, we aim to maximize the weighted sum rate in the WSN by relay assignment on each sensor pair and the transmit power optimization on each node. We define
In the total power constraint scenario, each cooperative link has its power limit. Thus, the power constraint should be
where
Assume each sensor pair can only select one relay for data exchange and each relay can be assigned at most one sensor pair in order to avoid conflict of relay assignment. Therefore, the optimization problem of the power allocation and relay assignment to maximize the weighted sum rate can be formulated as
where
Solution of optimization problem
Optimization problem
Relay assignment
We first consider the relay assignment problem with fixed transmit power on each node. Considering the relay assignment constraints in equation (11), the relay assignment problem can be formulated as a 0–1 integer programming problem as follows
The constraints of problem
For relay assignment in WSN, we construct a weighted bipartite graph

Weighted bipartite graph of sensor pairs and relays.
Denote
In the weighted bipartite graph, our goal is to match all vertices in the sensor pairs set and those in the relays set to maximize the sum of the weights of the matching. Each vertex in the sensor pairs set
In this section, we proposed a distributed relay assignment method based on one-to-one stable matching approach. A stable matching is defined as a matching in which there are no blocking pairs. A blocking pair denotes a partnership formed by a sensor pair and a relay that are not matched with each other but prefer each other to be its partner. In the assignment, each sensor pair and each relay maintain a preference list. A preference list is defined as a list of partners ranged in descending order.
Inspired by Gale–Shapley algorithm,22,23 we propose a distributed relay assignment method as follows:
Each sensor pair establishes its preference list based on the edge weight between itself and each relay. Also, each relay establishes its preference list based on the edge weight between itself and each sensor pair.
Each unmatched sensor pair proposes to its most preferred relay in its preference list.
Relays which receive one or more proposals accept its most preferred sensor pair as its candidate and reject other sensor pair.
Any sensor pair that has been previously rejected removes the relay that has rejected it from its preference list and proposes to its most preferred relays that have not rejected it yet.
The matching process would end when every sensor pair has already been matched with a relay or has been rejected by all relays in its preference list. When the sensor pair
Power allocation
After channel assignment, we optimize the power allocation on each cooperative link in this section. Supposing relay
The problem
Lemma 1
A very tight lower bound of
where
where
In order to solve the optimization problem
where
Optimization problem
DRAPA scheme
After proposing solution for relay assignment and power allocation separately, we propose a DRAPA scheme, in which relay assignment under fixed power allocation is solved based on Gale–Shapley algorithm, then power optimization for each cooperative link is conducted among matched sensor pairs and relay nodes.
The main step of DRAPA scheme is described as follows: first, the sensors and relay nodes are pre-allocated with equal power under total power constraints. Let
Then, the transmit power for sensors and relay nodes of
Performance analysis
Complexity analysis
The computational complexity of the proposed DRAPA scheme will be analyzed in this subsection. For the Gale–Shapley algorithm used to solve the relay assignment problem, the complexity of the algorithm is
Distributed implementation
Before relay assignment and power allocation, the channel gains need to be acquired at each node first. Since the self-interference channel on each node relies on the self-interference technology the node employs, we assume that each node knows the channel gain of its self-interference channel. In order to acquire the channel gains between sensors and relays, all sensors (
After all relays broadcast their achievable rates, the preference list of sensor pair (
In power allocation step, since relay
The effect of weight
In the WSN, we assume that sensors are with different priorities and assign each sensor pair a weight according to its priority. The result of matching in relay assignment will be affected by the weight of each sensor pair. Sensor pair with larger weight will be more preferred by each relay and is more likely to match a better relay. For example, suppose the
Simulation results
In this section, the simulation results are provided to evaluate the DRAPA schemes proposed. During all simulations, the variances of all noise are assumed to be 1,
Figure 3 illustrates the weighted sum rate performance of different schemes versus total power

Weighted sum rate versus total transmit power.
Figure 4 shows the weighted sum rate performance of different schemes versus number of relays with

Weighted sum rate versus number of relays.
Figure 5 presents the weighted sum rate performance of different schemes versus number of sensor pairs with

Weighted sum rate versus number of sensor pairs.
Figure 6 illustrates the effect of residual self-interference on the weighted sum rate under different schemes, in which the x-axis denotes the variance of RSI. The figure reveals that the weighted sum rates of all schemes are gradually decreased with the increase in the RSI variance. The performance of the DRAPA scheme is rapidly decreased when the variance of RSI is larger than 1 dB.

Weight sum rate versus residual self-interference.
The sensor pairs’ achievable rate versus total power

Sensor pairs’ achievable rate with different weights.
Conclusion
In this article, the joint relay assignment and power allocation problem for full-duplex two-way relay in WSNs is investigated, aiming to maximize the weighted sum rate of the system with the total power constraint. The problem is formulated as a mixed integer nonlinear optimization problem. We propose a distribute solution DRAPA by optimizing transmit power for each node and assigning optimal relay to sensor pairs for cooperative communication separately. Simulation results show that DRAPA scheme can achieve great performance gains comparing with other algorithms.
