Optimal energy-harvesting design for AF and DF two-way relay beamforming in 6G

Energy consumption is an important point which is crucial for green communications in 6G era, especially for those networks with limited life span or affected by dangerous environments where batteries are inconvenient to be changed. Therefore, energy harvesting (EH) has become a very attractive research field in recent years. In this paper, a new type of two-way EH relay beamforming system with two transceivers and many single-antenna relays is designed. All the transmit power of relay nodes is not restricted by the total quota or the personal quota and can be obtained entirely by energy harvesting. We use power splitting (PS) method for EH. We first establish a two-way system model for the amplify-and-forward and decode-and-forward relaying and then analyze the sum rate, and the gradient descent algorithm is used to solve the nonlinear joint PS factor optimization problem. Finally, the results of our analysis are verified by simulation, and they show that our method can not only optimize the PS factor efficiently, but also the model can improve the performance of the system.

and discusses the energy problem on heterogeneous system and gives a research vision on cognitive radio and cooperative relaying system. The EH-based heterogeneous network (HetNet) in 5G is studied in [9], it gives a survey on resource allocation algorithms for different networks, and the EH technology can be used in HetNets considering energy efficiency. Two new resource allocation algorithms are provided for 6G communications. [10] gives the survey on AI-based green communications in 6G, using AI technique to manage networks and improve energy efficiency. Using wireless multi-hop relay architecture can extend the range of wireless communication [11], but the power consumption is an important problem if sufficient power supply is not available [12]. Traditional energy-harvesting media are greatly affected by nature. Now wireless networks are spreading from ground to air, and it is extremely difficult to use traditional medium to harvest energy for these wireless networks.
Considering that wireless signal can carry and transmit energy and information at the same time, energy harvesting can prolong the service life of relay devices. [13] first introduces the concept of simultaneous wireless information and power transfer (SWIPT). [14] introduces two methods for energy harvesting, PS and time switching (TS). Particularly in TS method, the receiver node separates time to process information and harvest energy, and the TS factor is the ratio; in PS method, the receiver node splits the received signal partly for information processing and partly for the energy harvesting, and the PS factor is the ratio. Many traditional wireless technologies have been applied to EH relay networks such as multi-input multi-output (MIMO) relaying. In [15], EH in AF, DF and hybrid relaying networks with PS and TS methods over fading channel is studied, through maximizing throughput to derive the optimal ratios. Now, EH is also used for IRS wireless network [16], an IRS NOMA IoT network is studied which combines reflected energy with reflected information, and the sum throughput maximization is formulated considering phase shifts and time allocation.
Beamforming in EH relay networks can effectively increase capacity and improve the system performance. It has attracted the attention of researchers (See a survey in [17]). However, most researches focus on a relay with multi-antenna network, and the research on a relay with single antenna is relatively small. Considering the limitations of devices, it is inconvenient to work with multiple antennas on a single relay. [18] proposes beamforming networks with and without directly connection from source to destination with the perfect channel state information (CSI), and the power control problem is solved with beamforming weight optimization. In [19], multi-group multicasting SWIPT relay networks are proposed. [20] analyzes the distributed antennas SWIPT system, and beamforming and PS factors are obtained under the max-min SINR constraint, using iterative algorithm by reformulating the non-convex problem into two convex problems. The robust beamforming SWIPT problem is studied using the worst-case deterministic model in [21]. [22] studies the application of distributed beamforming technology for a dual-hop cooperative MIMO DF relay network, which minimizes the probability of pairing errors and keeps the SNR above the threshold of a given relay node. The robust beamforming design in [23] is proposed in an reconfigurable intelligent surfaces-aided HetNet system; using iterative method to maximize energy efficiency, the beamforming vectors and phase shifts are jointly optimized.
A two-way wireless network can improve spectrum efficiency and reduce half-duplex loss and loop interference loss in full duplex [24][25][26][27][28][29][30][31][32]. Two-way communication is also used in backscatter communication [24]. In [25], optimal beamforming vectors are attained in two-way beamforming relay network with reciprocal channels and non-reciprocal channels. [26] designs a MIMO two-way EH AF relay network; in order to minimize total mean-square-error, the optimal problem is divided into sub-problems and the iterative algorithm is used, and the results demonstrate the system performance. In [27], a joint two-way beamforming and EH relay selection network is proposed, changing the relay selection problem with convex algorithm. [28] considers a SWIPT two-way relaying network with DF protocol by PS and TS method, and the PS and TS ratios are investigated through minimizing the outage probability. [29] develops beamforming SWIPT scheme in the two-way relay channel and obtains the optimal transceiver design considering maximal achievable sum rate. [30] designs the SWIPT beamforming system in the two-way relaying channel; considering AF and DF relaying protocol, the nonconvex problem is formulated, decoupling the problem into two sub-problems to solve the problem. A novel harvest-use-store PS relaying strategy is proposed for multi-relay cooperative networks considering energy accumulation problem in [31]. [32] proposes the physical-layer network coding (PNC) based on two-way DF protocol. Compared with the digital coding arithmetic, PNC scheme can improve throughput.
In ambient backscatter communication, the system capacity can be improved by using the joint beamforming weight vector design in MIMO system with multiple antennas. But in many application scenarios, it is not easy to install multiple antennas on the device because of the work environment, volume, and the cost of frequent battery update or maintenance. Many single-antenna relays form a distributed beamforming network, which can improve the spectrum efficiency. Since the joint optimization of beamforming and PS ratio of relays is a non-convex quadratic constrained optimization problem, most researches decouple it into two sub-problems and optimize the beamforming vector and PS ratio, respectively. However, considering the complexity of the problem in real world, these methods are not suitable using multiple single-antenna EH relays in two-way beamforming system, which is still a problem that needs to be studied.
In this paper, an EH relay beamforming in AF and DF two-way mode with singleantenna relays is studied. Different from the one-way EH relaying network, the power of relays is obtained entirely by energy harvesting, and the transmit power is not limited by the total quota or the personal quota. The contributions of this paper are summarized as follows: • We propose a two-way beamforming system with EH relays. It has two transceiver nodes and many relay nodes. The transceivers are not direct linked. All the relays are single antenna. The EH relays use PS method to harvest energy and process information. • Using PS-based EH relays, we derive the formula of sum rate. It is controlled by PS factor, and optimization PS factor becomes an important issue. • A joint optimization problem is established under the sum rate maximization. The problem is non-convex and complex. In order to get the optimal value, the gradient descent algorithm is used in AF mode, and the minimal PS factor is used under the SNR outage threshold constraint in DF mode. Based on our previous work [33] which researches on EH two-way relay network in AF mode, we further in this paper analyze the convergence results of the gradient descent algorithm, and the EH relay beamforming in DF mode is also studied. • We analyze performance by the simulation examples, and two-way beamforming scheme is better than one-way scheme both in AF and DF mode.
The remainder of the paper is organized as follows: In Sect. 2, the system is described in detail. In Sect. 3, the joint optimization PS factor is built. In Sect. 5, the simulation examples and the discussion are presented, and Sect. 6 is the conclusion.

System model
The two-way beamforming system is considered including two transceiver nodes and multiple relay nodes. All transceiver nodes and relay nodes are equipped with a single antenna, as shown in Fig. 1, and two transceiver nodes are not directly connected. The relay works under the AF or DF protocol with half duplex over fading channels. We assume that there are no links between relays. There are also no external interference links to relays. We assume that channel coefficients of all nodes are known, and the channel between the transceiver and the relay nodes is reciprocal. The channel gain is constant over one send-receive block with independent and identically distributed. The mutual interference between relays can be suppressed by interference suppression which increases the system complexity. Thus, we ignore the mutual interference and assume that each relay only receives signal from two transceiver nodes. Let f i and h i be the channel gain between transceiver nodes to relay i. f i and h i is known to the transceiver and relay nodes. All the relays have no their own power supply. Their power is totally coming from energy harvesting. g i denotes the received signal at relay i from two transceivers, and y i is the signal sent to transceivers. R th is the outage threshold. The signal received at relay i from two transceivers can be written as where P 0 and s i are the fixed transmit power and the transmit signal from two transceivers, respectively. We assume that E[|s 1 is the additive noise introduced by relay i. α i is the PS factor which splits the received signal in two parts, information processing part is α i , and energy harvesting is 1 − α i , α i ∈ (0, 1) . The signal d in is for information processing.
where v ip ∼ CN (0, σ 2 P ) is the information processing additive noise, and the signal for energy harvesting is

AF relaying
In AF relaying mode, the relay receives signal from two transceivers; after information processing and energy harvesting, it amplifies and forwards the signal. The relay i amplifies the signal with factor β i , and then sends it to two transceivers as shown in Fig. 2. The relay i sends the signal amplified by the factor β i to two transceivers with phase adjusted by θ i The average transmit power is and according to the PS method, the average power harvesting is Because the relay i has no its own power supply, the harvested energy for relay at least is equal to its transmit power where ξ is the energy conversion efficiency. Therefore, We assume that The signal received at transceivers s1 and s2 from multiple relays by maximal ratio combination (MRC) is: ) are the additive noise introduced by the antenna at transceivers s1 and s2. M is the number of relay nodes. Considering the selfinterference constraint (SIC), by eliminating the self-interference component, s AF 1 and s AF 2 are further transformed as Therefore, the SNR in AF mode at transceivers s1 and s2 is given by (8)  Obviously, when θ i = − arg f i − arg h i , the maximal SNR is obtained. By substituting θ i in (14) and (15), we have Then, the achievable rate from s1 to s2 and from s2 to s1 is given, respectively.
The sum rate for AF relaying protocol is defined as The outage probability at node s1 and s2 is Both links from s1 to relays to s2 and from s2 to relays to s1 should keep communication by the relayed path. To keep the two-way communication well, the outage probability is the sum of outage probability at s1 and s2.

DF relaying
When the relay i works in DF mode, as shown in Fig. 3, after information processing and energy harvesting, the relay forwards information to transceivers. The relay node i receives signal from two transceivers with physical-layer network coding (PNC) scheme [34]. We have (15) is the additive noise introduced by the relay i antenna. Using the power splitting technique, the energy that the relay i harvests from s1 and s2 is given as The relay i uses its power E DF ri to send information. Here, we assume the relay i can successfully decode and encode signal without error. In this way, the SNR at the relay node i from s1 is the SNR at the relay node i from s2 is the SNR at the relay node i from s1 and s2 is because we assume the relay i can successfully decode and encode signal without error, so the signal-to-noise ratio is greater than outage threshold of node s1 and s2. Then, where r th is the SNR outage threshold, and we can get that Obviously, Since α i is known to be smaller than 1, we have Therefore, the signal sent by relay i is given by where P DF r i is the transmit power of relay node i. To let the relay work in normal state, the power harvested should be equal to its transmit power, i.e., Therefore, Then, the relays forward information to destinations using harvested energy. Again, considering SIC, after eliminating the self-interference component, the received signal at destination s 1 and destination s 2 is given by where w z1 ∼ CN (0, N 0 ) and w z2 ∼ CN (0, N 0 ) are the additive noise introduced by the transceiver antenna. Therefore, the SNR at destination node is (32)  the achievable rate of node s1 is the achievable rate of node s2 is and the sum rate at destination nodes is The outage probability at node s1 and s2 is given by The sum outage probability is From (45), we can observe that maximizing R DF d under constraint (35) can be achieved by simply optimizing the variable α i .

Joint PS factor optimization
In this paper, we consider the sum-rate maximization for the PS factor optimization problem.

AF relaying
By substituting R AF 1 and R AF 2 in (18) and (19), we have Our objective is to maximize R AF given by However, we cannot derive the closed form of R AF . Because log 2 () is the monotonic increasing function, the gradient descent algorithm can be used to solve the optimization problem. We need to change the maximal problem to the minimal problem and change the constrained problem to an unconstrained problem. Our objective can be reformulated as where R AF min is the minus of R AF .
where α i ∈ (0, 1) . As well known, gradient descent method is one of the efficient methods to solve unconstrained optimization problem, and we can transform the constrained problem into an unconstrained problem. α i is the only constrained condition. In order to solve the optimization problem easily, we use the following variable substitution to transform constrained problem about α i into an unconstrained problem.
where x ∈ [−∞, ∞] . Gradient descent method is one of the efficient methods to solve unconstrained optimization problem, which always converges to a local minimum point. By multiple random initialization, an optimal value from several local minimum point (48) can be chosen and can be considered as global minimum point. Since it is difficult to get the gradient of R AF min (x) , the secant method is used as the approximate of gradient.
where δ is a vector with a very small norm. We can choose δ = 10 −8 e i to get ∂x i , where e i is a vector whose i-th element is 1 and the others are all 0. For the required step size of each iteration, the initial step size is set as = 100 , which will be adjusted in each iteration.

DF relaying
Different from the AF relaying protocol, transmit signal under the DF relaying protocol will not suffer from the problem of noise propagation. For the DF mode, the sum rate of destination nodes can be evaluated and defined as By substituting R DF d in (45), R DF can be rewritten as Our goal is to find the PS factor to maximize the sum rate, which is obviously equivalent to maximizing R DF . We find that the log 2 () is a monotonic increasing function, the term on the right-hand of (55) is quasi-convex, and when the value of α i is small, we can get the maximum R DF . Based on (35), the optimal PS ratios and the sum rate can be deter-

Results and discussion
We present numerical simulations to verify the performance of our proposed twoway relaying beamforming scheme. The number of relay nodes is 2-8, and the channel coefficients are assumed to be independent and reciprocal variables. The additive noise is assumed to be unit variance and power spectral density to be − 174 dbm/Hz. The bandwidth is assumed as 10 mHz, the energy efficiency is 80%, and the SNR outage threshold is 5 db.

Sum-rate maximization
The results are presented in Fig. 4. We first consider the AF relaying network with 2, 4, 6, 8 relay nodes and compare the sum rate, and the transmit SNR is 5-25 db. It is obvious that the sum rate is higher when more relays are used. As the number of relay nodes increases, two-way beamforming systems harvest more energy and extend the relay lifetime and improve the performance. The convergence results of the gradient descent algorithm for AF mode are depicted in Figs. 5 and 6. With enough iteration steps, even if the initial points are different, the sum rate always converges to the same stationary point, and the norm of gradient always converges to zero. Therefore, the local minimum point obtained by the gradient descent algorithm can almost surely be regarded as the global minimum point.
Then, we consider the DF relaying network also with 2, 4, 6, 8 relay nodes and compare the sum rate at destinations with our proposed PS factor optimization method. The results are shown in Fig. 7. As can be observed, with more transmit power and relay nodes, the sum rate will increase.
Then, we compare the sum rate of different cooperative schemes with varying SNR at sources, while the number of relay nodes is set 6. As shown in Fig. 8, it includes greedy general relay selection (SW-GRS) [33], one-way AF relaying (SW-AF) [33], one-way DF relaying (SW-DF) and our proposed two-way AF relaying (TWB-AF) and two-way DF relaying (TWB-DF). It is seen that our proposed two-way relaying network scheme is better than one-way scheme both in AF and DF mode. Working in two-way DF mode can get higher rate than working in AF mode.
We also compare the sum rate of different cooperative schemes with varying number of relays with the same source transmit SNR 25 db. The results are shown in Fig. 9. With the same transmit SNR, the performance between TWB-AF and TWB-DF is different. The sum rate of TWB-DF scheme is higher than that of TWB-AF scheme. As we assume that the relays can decode the received signal without error in DF mode, we only need to harvest more energy in DF mode, and the sum rate at destinations is just considered.

Outage probability performance
The sum outage probability performance among different transmit SNRs and relays in TWB-AF scheme is presented in Fig. 10. It is obtained by Monte Carlo simulation.
We can see that the outage probability is lower when the number of relays is more and transmit power is higher, and it is consistent with the sum-rate curve. In Fig. 11, the sum outage probability performance among different SNRs with different relays is presented for TWB-DF scheme by Monte Carlo simulation. When the number of relay nodes is more than 6, and SNR is more than 15 db, it is close to 0. We can see that the outage probability is lower when the number of relays and transmit power increase, and it is in accordance with the sum-rate curve of TWB-DF.

Optimal PS factor
According to the results as shown in Table 1, we find that in AF mode the optimal PS factor is about 0.68. It means more of the received signal at relay nodes is used to information processing. In DF mode as shown in Table 2, the optimal PS factor is small. It means that the received signal at relay side is mainly used for energy harvesting. That is because we assume that the relay nodes can decode and encode signal without error and can only maximize the sum rate at destinations.

Conclusions
In this paper, we investigate the AF and DF two-way network beamforming EH relaying networks. For effective network beamforming by the EH relays, we propose to use the gradient descent algorithm in AF mode and use the smallest PS factor at relays under the SNR threshold for DF mode to enable an efficient solution. It is seen that the performance gain is significant with more relays and higher transmit SNR.

Methods
Our system includes two transceiver nodes and multiple relay nodes. All nodes are equipped with a single antenna. Two transceiver nodes are not directly connected. It works under the AF or DF protocol with half duplex over fading channels. The power of all the relays is totally coming from energy harvesting. Two to eight relay nodes are analyzed, and the channel coefficients are independent and reciprocal variables. The bandwidth is assumed as 10 mHz, the energy efficiency is 80%, and the SNR outage threshold is 5 db. The performance analysis is shown in the form of sum-rate maximization and outage probability performance.

Sum-rate maximization
The sum-rate maximization is used for joint PS factor optimization problem. Because we cannot derive the closed form of the sum rate, we use the gradient descent algorithm to solve the problem in AF mode and obtain the optimal PS factor when the PS factor is the smallest at relays under the SNR threshold in DF mode.

Outage probability performance
The sum outage probability performance among different SNRs with different relays is presented for TWB-AF and TWB-DF scheme by Monte Carlo simulation.