{'fraction_non_alphanumeric': 0.04484294475666348, 'fraction_numerical': 0.01704638201618357, 'mean_word_length': 4.272190804032457, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 25, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Beamforming for Simultaneous Wireless Information and Power Transfer in Two-Way Relay Channels

This paper studies simultaneous wireless information and power transfer (SWIPT) systems in two-way relaying (TWR) channels. Here, two source nodes receive information and energy simultaneously via power splitting (PS) from the signals sent by a multi-antenna relay node. Our objective is to maximize the weighted sum of the harvested energy at two source nodes subject to quality of service (QoS) constraints and the relay power constraints. Three well-known and practical two-way relay strategies are considered, i.e., amplify-and-forward (AF), bit level XOR based decode-and-forward (DF-XOR) and symbol level superposition coding based DF (DF-SUP). For each relaying strategy, we formulate the joint energy transmit beamforming and PS ratios optimization as a nonconvex quadratically constrained problem. To find a closed-form solution of the formulated problem, we decouple the primal problem into two subproblems. In the first problem, we intend to optimize beamforming vector for a given PS ratio. In the second subproblem, we optimize the PS ratio with a given beamforming vector. It is worth noting that although the corresponding subproblem are nonconvex, the optimal solution of each subproblem can still be found by using certain techniques. We provide numerical results that demonstrate the advantage of adapting the different relaying strategies and weighted factors to harvest energy in two-way relaying channel.


I. INTRODUCTION
Energy harvesting (EH) from surrounding environments is an emerging solution to prolong the operational time of energy-constrained nodes in wireless networks [1], [2]. Compared with conventional energy sources, radio frequency (RF) signals can carry both information and energy simultaneously. Simultaneous wireless information and power transfer (SWIPT) has recently drawn significant attention, where SWIPT has been investigated for various wireless channels [3]- [11]. For example, a point-to-point single-antenna additive white Gaussian noise (AWGN) channel was first studied in [3], where the authors used a capacity-energy function to study the fundamental performance tradeoff for simultaneous information and power transfer. Later on, SWIPT was extended to a frequency selective channels in [4]. The authors in [5] studied SWIPT for fading channels subject to time-varying co-channel interference. In [6], [7], SWIPT schemes for multiple-inputmultiple-output (MIMO) channels were considered. The transmit beamforming design was studied for SWIPT in multipleinput-single-output (MISO) broadcast channels in [8], [9]. Moreover, SWIPT has been investigated in other physical layer setups such as the OFDM, and more. in [10], [11].
Besides the above studies related to one-hop transmission, SWIPT technique has also been extended to wireless relay networks [12]- [20]. For the one-way single-antenna relay channel, two protocols, namely time switching (TS) and power splitting (PS), are proposed for amplify-and-forward (AF) relay networks in [12], [13]. Later on, SWIPT was extended to a full-duplex wireless-powered one-way relay channel in [14], [15], where the data and energy queues of the relay are updated simultaneously in every time slot. Because twoway relaying (TWR) is able to simultaneously enlarge wireless coverage and enhance spectral efficiency, the SWIPT protocols for TWR channel recently have attracted much attention. In [16], the authors provided a SWIPT protocol in two-way AF relaying channels, where two sources exchange information via an energy harvesting relay node. The authors investigated the sum-rate maximization problem in two-way AF relaying channels in [17], where two source nodes harvest energy from multiple relay nodes. In [18], The authors studied the relay beamforming design problem for SWIPT in a non-regenerative two-way multi-antenna relay network. The authors investigated a compute-and-forward (CF) relay networks optimal beamforming design problem in [19], where two source nodes harvest energy by SWIPT from relay nodes. Moreover, for different relaying strategies, the authors in [20] studied the sum-throughput maximization problem in a two-way AWGN relay channel, where all nodes are powered by EH.

A. Motivation
So far, most studies on SWIPT in relay networks focused on energy-constrained relay nodes [12]- [16], [20]. As a matter of fact, the sensor nodes or other low-power devices often have very limited battery storage and require an external charging sources to remain active in wireless cooperative or sensor networks. Although replacing or recharging batteries provides a solution to this problem, it may incur a high cost and sometimes even be unavailable due to some physical or economic limitations. As show in Fig. 1, when the sensor node that is inside the body or embedded in a building structure is depleted of energy, it cannot fulfill its role any longer unless the source of energy is replenished. Therefore, EH in such kind of scenarios, where the relay node serves as the energy source, is particularly important as it can provide a much safer and much more convenient solution. Hence, in this paper, we consider a TWR SWIPT system with batterylimited source nodes and a relay node that acts also as a source of energy (as described with more detail in Section II). Under this setup, the source nodes receive information and energy simultaneously from the signals sent by a relay node. Furthermore, to enhance bandwidth efficiency and power transfer, we consider a scenario, where the relay node is equipped with multiple antennas. This setup applies to lots of practical wireless transmission scenarios. Since TS can be regarded as a special case of PS with only binary split power ratios [5], [6], we focus our study on PS receivers instead of TS receivers.

B. Related Works
To the best of our knowledge, only three papers, e.g., [17], [18] and [19], thus far studied multi-antenna TWR SWIPT systems with the battery-limited source nodes. In [17] and [18], the authors considered TWR SWIPT systems and studied the optimal relay beamforming problem which maximizes the weighted sum rate subject to the transmit power constraint at relay and the EH constraint at source nodes. However, the authors in [17] assumed that the source node is able to decode information and extract power simultaneously, which, as explained in [6], may not hold in practice. In contrast to [17], the authors in [18] considered the case of separated EH and information decoding (ID) receivers. The energy receiver could harvest energy from the signals transmitted by both the source and the relay, and the source node can only receive the information from the signals forwarded by the relay. Furthermore, in their works, only AF relaying strategy was considered. Authors in [19] considered a similar overlay protocol as ours. However, it focused on the relay transmit power minimization problem for a TWR SWIPT network with CF relaying strategy. In this paper, we study a TWR based PS-SWIPT system where TWR consists of a multi-antenna relay node and two single-antenna source nodes. Here, two source nodes receive information and energy simultaneously via PS from the signals sent by the relay node. In particular, we consider three types relaying strategies: AF, bit level XOR based decode-and-forward (DF-XOR) and symbol level superposition coding based DF (DF-SUP). Different from [17]- [19], our objective is to maximize the weighted sum of the harvested energy at two source nodes subject to a given minimum signal-to-interference-and-noise ratio (SINR) constraint at source nodes and a maximum transmit power constraint at the relay node. This scenario is of particular interest in supporting sensor networks that empower the next set of applications such as internet of things and also medical monitoring as outlined in Fig. 1. In these applications, a large number of sensors will be operating in close vicinity. Hence, SINR is a important metric for maintaining a given throughput while maximizing energy transfer of the sensors or source nodes by the relay. The latter maximizes the operational time of the sensors which can be a important metric in the scenarios presented in Fig. 1. To the authors' best knowledge, the joint beamforming and PS optimization for this new setup has not been studied in existing works.

C. Our Contributions
Under the above setup, a TWR based PS-SWIPT system is considered in this paper. Different from existing works, we assume that source nodes can receive information and energy simultaneously via PS from the signals sent by the relay node. Moreover, various two-way relaying strategies may result in different transmit signals at the relay node. The impact of various relaying strategies on the amount of harvest energy has not been considered in existing studies. Besides, for another challenging doubly-near-far problem [2] in the TWR SWIPT system, which refers to a node far away from the relay harvests much lower energy but consumes more to transmit data than a node near the relay, could be mitigated effectively by setting different EH priorities for different source nodes.
The main contributions of this work are summarized as follows. Firstly, this is the first work to investigate joint beamforming and PS optimization for a TWR SWIPT system with battery-limited source nodes. Here, two source nodes receive information and energy simultaneously via PS from the signals sent by a multi-antenna relay node. To achieve this goal, we propose a two-phase PS-based relaying protocol. Secondly, based on the above system setup, we present different transmit signals at the relay node by considering three practical twoway relaying strategies due to their implementation simplicity [21], [22], i.e., AF, DF-XOR and DF-SUP. To explore the performance limit of the system , for each relaying strategy, we formulate the joint energy transmit beamforming and PS ratios optimization as a nonconvex quadratically constrained problem. Thirdly, for each nonconvex relay beamforming optimization problem, we find a solution by decoupling the primal problem into two subproblems. The first subproblem only optimizes the beamforming vectors. We solve this nonconvex problem by applying the technique of semidefinite programming (SDP) [23]. The second subproblem only includes the PS ratios. We propose an novel algorithm to find the optimal closed-form solutions by separating the latter nonconvex subproblem into eight cases. Then, a near optimal solution of the original optimization problem is found based on a two-tie iterative algorithm. Finally, we provide numerical results for each relaying scheme to evaluate the performance of the proposed optimal beamforming designs. It is shown that when the priority and the distance of two source nodes are symmetric, the DF-XOR relaying strategy performs better than the other two strategies. While the distances of two source nodes are asymmetric, for all three considered relaying strategies, the furthest node can harvest more energy when its energy weight factor is set to a larger value, which can provide an effective solution to the doubly-near-far problem [2].

D. Organization
The remainder of this paper is organized as follows. The TWR SWIPT system model is described in Section II. In Section III, the weighted sum-power harvested maximization problems are formulated for different relaying strategies. The solutions for the associated optimization problems by using suitable optimization tools are presented in Section IV. In Section V, numerical simulation results are provided. Finally, the paper is concluded in Section VI.
Notations: Boldface lowercase and uppercase letters denote vectors and matrices, respectively. For a square matrix A, A T , A * , A H , Tr(A), Rank(A) and ||A|| denote its transpose, conjugate, conjugate transpose, trace, rank, and Frobenius norm, respectively. A 0 indicates that A is a positive semidefinite matrix. vec(A) denotes the vectorization operation by stacking the columns of A into a single vector a. E(·) denotes the statistical expectation. ⊗ denotes the Kronecker product. ⊕ denotes the XOR operator. 0 and I denote the zero and identity matrix, respectively. The distribution of a circular symmetric complex Gaussian vector with mean vector x and covariance matrix Σ is denoted by CN (x, Σ). C x×y denotes the x × y domain of complex matrices.

II. SYSTEM MODEL
Consider a half-duplex TWR system where two singleantenna source nodes S 1 and S 2 exchange information with each other through an N -antenna relay node, R, as shown in Fig. 2. The channel matrices from S 1 and S 2 to the relay are denoted by h 1 and h 2 , respectively, and the channel matrices from the relay to S 1 and S 2 are denoted by g 1 and g 2 , respectively. To further improve the spectral efficiency, the two-time slot TWR model is used to realize bidirectional communication. Throughout this paper, the following set of assumptions are made: • The source nodes cannot communication with each other directly. Hence, all messages are sent through the relay. This occurs when the direct link is blocked due to long-distance path loss or obstacles [24], [25].
• The relay is connected to the power grid, which implies that it has access to reliable power at all times. However, the source nodes are powered by the energy limited batteries or capacitors, and need to replenish their energy by wireless power transfer.
• Amongst the different relaying protocols, AF, DF-XOR and DF-SUP schemes are applied at the relay node due to their implementation simplicity [21], [22].
• Quasi-static block fading channels are assumed here, i.e., channels are unchanged in a time-slot of T , but change from time slot to time slot. The use of such channels is motivated by prior research in this field [5]- [9], [15]- [17] and practical consideration.
As shown in Fig. 3, we propose a two-phase PS-based protocol for the TWR system. In the first phase of duration T /2, two source nodes S 1 and S 2 deliver their information to the relay node R simultaneously. In the second phase with the remaining time duration T /2, the received information signal at R is processed by the aforementioned relaying strategies and then forwarded to the source nodes. Note that here, by assuming a PS ratio, ρ, the transmit signal from the relay is used to simultaneously achieve information and power transfer.
Based on the above system setup, the received signal at the relay after the first phase, i.e., the multiple access (MAC) phase, is given by where x i , for i ∈ {1, 2}, represents the transmit signal from node S i , h i ∈ C N ×1 is the channel vector from node S i to the relay node R, and n R denotes the additive complex Gaussian noise vector at the relay following CN (0, σ 2 r I N ). Each transmit signal x i is assumed to satisfy an average power constraint, i.e., E(|x i | 2 ) = P i .
Upon receiving y R , the relay node performs certain processing and then forwards its signal to the source nodes in the second phase, also referred as broadcast (BC) phase. Let the transmit signal from the relay be denoted by where x 12 is the combined signal consisting of the messages from two nodes by using physical-layer network coding (PLNC). Note that, here, besides x 12 , we also include a new signal x, which provides us with more degrees of freedom to optimize power transfer from relay to the source nodes. It is worth noting that various two-way relaying strategies may result in different transmit signal x R . The three relaying strategies we considered, namely, AF, DF-XOR and DF-SUP are all favorable for practical implementation and the precoding designs based on these strategies are mathematically tractable [21], [22]. The primary focus of this work is to maximize the weighted sum of the harvested power based on practical two-way relay strategies, while meeting a minimum SINR for each source node.

III. RELAYING STRATEGIES AND OPTIMIZATION
PROBLEM FORMULATIONS Based on the channel setup described in Section II, in this section we shall present different transmit signals x R for the TWR SWIPT system by considering three practical two-way relay strategies. Moreover, to explore the system performance limit, we also formulate three optimization problems for these approaches in this section.

A. AF Relay Strategy
With the AF relaying strategy, the relay transmit signal x R in (2) can be expressed as where W represents the precoding matrix used at the relay.
In addition, we assume that the relay node has the maximum transmit power P r , i.e., Tr{E(x R x H R )} ≤ P r , which is equivalent to is the covariance matrix of x, and P 1 and P 2 are the transmit powers used at nodes S 1 and S 2 , respectively. Then, the received signals at the two nodes in the second T /2 time interval are given bỹ Note that hereỹ i , x i ,x andñ R denote the signals in the RF band and n i,d is the additive Gaussian noise due to the receiving antenna that follows CN (0, σ 2 i,d ) for i ∈ {1, 2}. Specifically, as shown in Fig. 3, the received signalỹ i at each end node is split into two portions for EH and information processing. Let ρ ∈ (0, 1) be the power splitting ratio, meaning that √ 1 − ρỹ i is used for information processing. As a result, after converting the received signal to baseband and performing self-interference cancelation, the obtained signal is denoted as is the additive Gaussian noise introduced by the signal conversion from RF band to baseband. Accordingly, the SINR at the node S i is given by Moreover, the other portion of the received signal, √ ρỹ i , is used for EH. Since the background noise at the EH receiver is negligible and thus can be ignored [6], the harvested energy, E i during EH time T /2 is given by where η is the energy conversion efficiency with 0 < η < 1 which depends on the rectification process and the EH circuitry [6]. Note that in (8), the self-interference can be used for EH, which is different from information processing.
Our design goal is to maximize the weighted sum power harvested at two EH nodes, which is defined as the harvested energy minus the consumed energy. The corresponding optimization problem can be formulated as In (9), α and β correspond to the given energy weights for the two EH receivers S 1 and S 2 , respectively, where a larger weight value indicates a higher priority of transferring energy to the corresponding EH receiver as compared to other EH receiver. τ i and P max,i are the SINR requirement and the maximum transmit power at node S i , respectively.

B. DF-XOR Relay Strategy
If the relay node adopts the DF relaying strategy, it needs to decode the messages sent from both source nodes in the MAC phase, and then transmit a function of the two messages in the BC phase. The rate region of the MAC channel is characterized by [26], [27] whereR 1 andR 2 are the transmit rates at nodes S 1 and S 2 , respectively.
We assume that the messages sent from the nodes in the MAC phase can be successfully decoded at the relay node. Let b i denote the decoded bit sequence from S i , for i ∈ {1, 2}. With the DF-XOR relaying strategy, the combined bit sequence is yielded as b 12 = b 1 ⊕ b 2 . Then the transmit signal in the second time interval of T /2, denoted by x R in (2), can be expressed as where s 12 is the modulated signal of bit sequence b 12 . The corresponding relay power constraint for signal x R is denoted as where Q s = E(s 12 s H 12 ) is the covariance matrix of s 12 . Then, the received signals at node S i in the RF band is given bỹ Using power splitting, √ 1 − ρỹ i is used for information processing at the end nodes. After baseband conversion and self-interference cancelation, the obtained signal is denoted as Subsequently, the SINR at the node S i can be determined as On the other hand, √ ρỹ i is used for EH at the node S i . The harvested energy, E i is given as [6] Similarly, our aim is to maximize the weighted sum power harvested at the two source nodes subject to a given minimum SINR constraint at each source node and a maximum transmit power constraint at the relay node. The corresponding optimization problem can be formulated as Note that here different from (9), it is not necessary to optimize P 1 and P 2 as they are determined via the constraints presented in (10).

C. DF-SUP Relay Strategy
In this subsection, we consider a case where the relay uses the DF-SUP relaying strategy. Again, we assume that the messages sent from the nodes in the MAC phase can be successfully decoded at the relay node. Then by applying DF-SUP relaying strategy, the transmit signal in the BC phase, denoted by x R , can be expressed as where s i is the modulated signal of bit sequence of node S i . The corresponding relay power constraint for signal x R is denoted as is the covariance matrix of s i . Then, the received signals at node S i in the RF band is given bỹ Let us assume that √ 1 − ρỹ i portion of the received signal is used for information processing at the end nodes. After converting this signal to baseband and performing selfinterference cancelation, the obtained signal is given by Then, the SINR at the node S i can be denoted as On the other hand, √ ρỹ i is used for EH at the node S i . The harvested energy, E i , is given as [6] Also, our design goal is to maximize the weighted sum power harvested at the two EH nodes, which is defined as the harvested energy minus the consumed energy. The corresponding optimization problem can be formulated as max ρ,Qs,1 0,Qs,2 0,Qx 0 Here, similar to (17), we are not necessary to optimize P 1 and P 2 as they are determined by (10). For different relaying strategies, we have formulated three weighted sum-power harvested maximization problems in (9), (17) and (24). In the following sections, we will propose three algorithms to solve these optimization problems.

IV. OPTIMAL DESIGN OF THREE MAXIMIZATION
PROBLEMS For the AF relaying strategy, the optimization problem in (9) is nonconvex due to not only the coupled beamforming vectors {W, Q x } and the remaining parameters {P i , ρ} in both the SINR and transmitted power constraints but also all the quadratic terms involving W. In general, it is difficult or even intractable to obtain the global optimal solution to a nonconvex problem [9], [18]. However, it is well known that a function can be maximized by first maximizing over some of the variables, and then maximizing over the remaining ones [28,Sec 4.1.3]. Thus, when P i and ρ are first fixed, the resulting beamforming optimization problem reduces to that of a conventional nonconvex problem with a rank-one constraint. The latter can be efficiently solved by using some rank relaxation techniques [23]. Moreover, we note that when the beamforming vectors {W, Q x } are fixed, the resulting beamforming optimization problem over {P i , ρ} is still a nonconvex problem. However, as show later the optimal solution can be obtained in closed-form by separating this subproblem into eight cases. In the following, we first decouple problem (9) into two subproblems that can be solved separately, and then propose a two-tie iterative algorithm to obtain the near optimal solution of the original optimization problem. Finally, similarly, we decouple problems (17) and (24) into two subproblems. Note that, here, different from (9), two subproblems from (17) and (24) only involve the beamforming vectors and PS ratios.

A. Joint Beamforming and PS Optimization for AF relaying strategy
Let us solve the two subproblems stemming from (9). In the first subproblem, we try to find the solutions of W and Q x for fixed P 1 , P 2 and ρ values. Then, we update the values of P 1 , P 2 and ρ by fixing the remaining parameters. These subproblems are updated in an alternating manner.
1) Optimize W and Q x for fixed P 1 , P 2 and ρ: Note that when fixing P 1 , P 2 and ρ, the problem of optimizing variables W and Q x is equivalent to Although problem (25) has a simpler form than the original problem in (9), it is still a nonconvex problem. To find the optimal solution of problem (25), we conduct some further transformations on (25). To be specific, we transform |g T 1 Wh 2 | 2 and ||Wh 1 || 2 2 into their equivalent forms as and similarly where w = vec(W). In obtaining (26c) and (27c), we have used the identity Similar to (26) and (27), we apply the above transformations to other terms in (25). LetW ww H , (25) can be rewritten as Due to the rank-one constraint, finding the optimal solution of (29) is difficult. We therefore resort to relaxing it by deleting the rank-one constraint, namely, It is noted that if the problem (30) has a rank-one optimal solution ofW, i.e., the problem (29) has a rank-one optimal solution ofW, the problem (29) is equivalent to the problem (25). Fortunately, we have the following lemma.

Lemma 1:
The rank-one optimal solution of the problem (30) always exists.
Proof: Please refer to Appendix A.
By acquiring the optimal rank-one solution of (30), we can further get the optimal solution of (29) and then the optimal solution of (25).
2) Optimize P 1 , P 2 and ρ for fixed W and Q x : In the second step, we need to optimize the power P 1 , P 2 and the power ratio ρ with the remaining variables fixed. The corresponding optimization problem can be formulated as Similar to (26) and (27), we apply the transformations in (31). The problem of optimizing the variables P 1 , P 2 and ρ is equivalent to max P1,P2,ρ (32) is still nonconvex in its current form since both the SINR and transmit power constraints involve coupled transmit power P i and power ratio ρ. To find the optimal solution of (32), we give the following lemma.
The proposed iterative algorithm to obtain the near optimal solution to problem (9) is summarized in the following Algorithm 1.

Algorithm 1 Finding a near optimal solution to problem (9)
• Initialize P 1 , P 2 and ρ; • Repeat -Update the beamforming matrixes W and Qx for fixed P 1 , P 2 and ρ using the following steps: First, solve problem (30) by CVX, and obtain the optimal solution asW * and Qx. Then, derive the optimal solution W of (25) by eigenvalue decomposition (EVD) ofW * ; -Update P 1 , P 2 and ρ with W and Qx fixed using the following steps: First, check whether there exists some feasible solutions {P * 1 , P * 2 , ρ * } of problem (32). If yes, compute all the objective function values and select one {P * 1 , P * 2 , ρ * } corresponding to the largest value of objective function as the optimal solution to (32). Otherwise, exit the algorithm; • Until The difference between the value of objective function in (9) from one iteration to another is smaller than a pre-fixed predetermined threshold.

B. Joint Beamforming and PS Optimization for DF-XOR relaying strategy
In this subsection, we consider optimization problem (17) where the relay node adopts the DF-XOR two-way relaying strategy. Similar to problem (9), we decouple problem (17) into two subproblems. It is worth noting that here different from (9), two subproblems from (17) only involve the beamforming vectors and PS ratios, where P 1 and P 2 are not necessary to be optimized as they are determined via the constraints presented in (10).
1) Optimize Q s and Q x for fixed ρ: Note that when fixing ρ, the problem of optimizing variables Q s and Q x can be equivalent to max Qs 0,Qx 0 which is rewritten as where It is easy to verify that (42) is a standard SDP problem. Thus, its optimal solution {Q * s , Q * x } can be easily obtained using existing software, e.g., CVX [29].
2) Optimize ρ for fixed Q s and Q x : In the second step, we need to optimize the PS ratio ρ with the remaining variables fixed. The corresponding optimization problem can be formulated as which is equivalent to According to the definition of P 1 and P 2 in (10), the simplified PS design problem yields the following It can be observed that the objective function in (45) achieves a higher value when one of the SINR constraints holds with equality. Hence, the optimal solution ρ * = min{1− To summarize, Algorithm 2 below summarizes the solution to (17). Note that Algorithm 2 differs from Algorithm 1 in two main aspects: First, in step 1), the optimal beamforming matrixes {Q * s , Q * x } can be easily obtained due to the absence of rank-one constraint; and second, step 2) only involves PS ratios ρ, P 1 and P 2 are not necessary to be optimized. Algorithm 2 Finding the near optimal solution to problem (17) • Initialize ρ; • Repeat -solve problem (42) by CVX, and obtain the optimal solution of Qs and Qx in (41) which are denoted by Q * s and Q * x , respectively; -Update PS ratios ρ * using (45) for fixed Qs and Qx; • Until Termination criterion is satisfied.

C. Joint Beamforming and PS Optimization for DF-SUP relaying strategy
In this subsection, we consider that the DF-SUP relaying strategy is adopted at the relay node. To find the optimal solution of the joint optimization problem in (24), We similarly decouple problem (24) into two subproblems, and then propose a two-tie iterative algorithm to obtain a near optimal solution of the original optimization problem.
1) Optimize Q s,1 , Q s,2 and Q x for fixed ρ: In the first step, we need to optimize the beamforming matrices Q s,1 , Q s,2 and Q x with the PS ratio ρ fixed. The corresponding optimization problem can be formulated as max Qs,1 0,Qs,2 0,Qx 0 which is rewritten as max Qs,1 0,Qs,2 0,Qx 0 Note that (47) is a standard SDP problem. Thus, its optimal solution can be easily obtained [29].
2) Optimize ρ for fixed Q s,1 , Q s,2 and Q x : In the second step, we need to optimize the PS ratio ρ with the remaining variables fixed. The corresponding optimization problem can be formulated as which is equivalent to where Since P 1 and P 2 are determined based on the first phase, problem (49) is simplified as Similar to the problem (45), the optimal PS solution ρ * = min{1 − Similar to Algorithm 2, the proposed iterative algorithm to problem (24) is summarized in Algorithm 3.

V. SIMULATION RESULTS
In this section, we numerically evaluate the performance of the proposed energy harvesting schemes. The channel vector h i and g i are set to be Rayleigh fading, i.e., the elements of each channel matrix or vector are complex Gaussian random variables with zero mean and unit variance. The channel gain is modeled by the distance path loss model [27], given as where c is an attenuation constant set as 1, n is the path loss exponent and fixed at 3, and d i,j denotes the distance between nodes i and j. For simplicity, we assume that the noise power at all the destinations are the same, i.e., σ 2 i,c = σ 2 i,d = σ 2 r = σ 2 = 0 dBm, ∀i, and the energy conversion efficiency η = 50%. Moreover, the maximum transmit powers at the two sources, if not specified, are set as P max,1 = P max,2 = P max = 5 dBm. In all simulations, the weighted sum power of the relay network is computed by using 1000 randomly generated channel realizations.
In Figs. 4-6, we present the weighted sum power harvested for different relaying strategies at different distance of two sources when the relay node is equipped with N = 4 transmit antennas. In Figs. 4, we illustrate the harvested power of the two source nodes when the relay node adopts AF relaying strategy. Specifically, the distances of the two source nodes are symmetric, i.e., d R,S1 = d R,S2 = 1 meter. For comparison, two different energy weights with α = β = 1/2 and α = 4/5 and β = 1/5 are simulated for this scenario. From simulation results, in Fig. 4(a), we find that when S 1 and S 2 have the same priority, the two nodes can achieve a fair energy efficiency. However, in Fig. 4(b), when S 1 and S 2 have different priorities, node S 1 can harvest more energy since its energy weight factor is set to a larger value. Moreover, note that when the relay transmit power, P r , is low, the harvested energy at the nodes is negative, which implies that the harvested power at nodes from the relay is smaller than the consumed power for signal transmission.
In Figs. 5 and 6, we illustrate the harvested power at the two source nodes, i.e., P S1 and P S2 , and the shared power ratio at the S 2 node, i.e., . It is noted that in asymmetric scenario, i.e., d R,S1 = 1 meter and d R,S2 = 2 meters, in Fig. 5(a) and with d R,S1 = 1 meter and d R,S2 = 3 meters in Fig. 6(a), although two source nodes S 1 and S 2 have same priority, the node S 2 still harvests much lower energy in different rate requirements. The main reason is that the location of S 2 is far away from the relay node R, which could result in very small channel gain as compared to the near node. This coupled effect is referred to as the doubly-near-far problem [2]. However, when with higher priority, i.e., β = 3/4 and β = 6/7, in Fig. 5(b) and with β = 2/3 and β = 9/10 in Fig. 6(b), we find that node S 2 all can share more power for the harvested total power in different rate requirements. This indicates that under the asymmetric scenario, the far node will be able to harvest more energy when its energy weight factor is set to a larger value, which can provide an effective solution to the doubly-near-far problem. In addition, note that here different the results in Figs. 4(a) and 4(b), the harvested energy at the nodes is positive, which implies that the harvested power at nodes from the relay is greater than the consumed power for signal transmission.
In Fig. 7, we illustrate the weighted sum power harvested for different relay strategies with different number of antennas at relay when changing P r . For fair comparison, the priorities, the rate requirements and the distances of two source nodes are set to be the same, i.e., α = β = 1/2, R 1 = R 2 = 0.1R max and d R,S1 = d R,S2 = 1 meter, and simulated for each scenario. From simulation results, we find that the DF-XOR relaying strategy achieves the best performance, and the DF-SUP relaying strategy outperforms the AF relaying strategy. This indicates that DF relaying strategy has a higher EH efficiency due to the assumption that the relay has enough processing ability to correctly decode the received signals. Moreover, combining the information using XOR is better than using superposition since the power of the relay node can be used more efficiently in the DF-XOR relaying strategy. In addition, it is observed that when the number of transmit antennas increases (N = 4 → 8), the all three considered two-way relaying strategies achieve better performance. This demonstrates the significant benefit by applying large or even massive antenna arrays for efficiently implementing TWR SWIPT systems in practice.
Finally, in Fig. 8, we compare the proposed joint beamforming and PS optimization scheme with the other two schemes, i.e., only precoding without power and PS ratio allocation, and only power and PS ratio allocation without precoding scheme. For fairness, the setting of each node is the same with the one in Fig. 7. From simulation results, for three considered twoway relaying strategies, we find that the joint beamforming and PS optimization scheme all achieves the best performance as it uses the degrees of the freedom of both power, PS ratio allocation and precoding. Moreover, Fig. 8 also shows that the precoding only scheme can improves the system performance and it performs much better than the power and PS ratio allocation only scheme.

VI. CONCLUSIONS
This paper has studied the joint energy transmit beamforming and power splitting design for a multi-antenna TWR system based simultaneous wireless information and power transfer (SWIPT). The weighted sum power harvested at all source nodes was maximized subject to given SINR constraints at different source nodes and transmitted power constraints at relay node. Considering three different relaying strategies, the design problems are formulated as three nonconvex quadratically constrained problem, which are decoupled into two subproblems that can be solved separately by applying suitable optimization tools. The performance of three relay strategies were compared and some practical implementation issues were discussed. Simulation results showed when the priority and the distance of two source nodes are symmetric, the DF-XOR relaying strategy performs better than the other two strategies. While the distances of two source nodes are  asymmetric, for all three considered relaying strategies, the furthest node can harvests more energy when its energy weight factor is set to a larger value. APPENDIX A PROOF OF LEMMA 1 Note that, Problem (30) is a quasi-convex optimization problem, its optimal solution can be easily obtained [29]. Let us denote the optimal solution ofW and Q x in (30) byW * and Q * x , respectively. It is easy to verify thatW * is an optimal solution of the following optimization problem According to Lemma 3.1 in [23], there exists an optimal solutionW * for the problem (51) such that It can be verified thatW * = 0. Thus, from (52), we have Rank(W * ) = 1. The proof of Lemma 1 is thus completed.

APPENDIX B PROOF OF LEMMA 2
Suppose problem (32) is feasible and let {P * 1 , P * 2 , ρ * } and f (·) denote the optimal solution and the objective function, respectively. Next, we show that for problem (32), with the optimal solution {P * 1 , P * 2 , ρ * }, either the SINR constraints or the transmit power constraints must hold with equality. Now we prove this result by contradiction. Namely, if the above conditions are not satisfied, we can find another solution of (32), denoted by {P † 1 , P † 2 , ρ † }, which achieves a higher value for the objective function f (P † 1 , P † 2 , ρ † ) than f (P * 1 , P * 2 , ρ * ). First, suppose that the two SINR constraints do not hold with equality. In this case, note that in problem (32), the two SINR constraints are equivalent to and It can be observed that when PS solution , one of the SINR constraints holds with equality, the objective function f (P † 1 , P † 2 , ρ † ) = (A 2 ρ † − β)P † 2 + (B 2 ρ † − α)P † 1 + C 2 ρ † achieves a higher value as the same transmit power constraints. Hence, this assumption is not true. Next, consider the case that the transmit power constraints do not hold with equality. In this case, if we want the PS solution ρ to increase to achieve a higher value of objective function, the transmit power solution P i increases. Then, for the three transmit power constraints (32d), (32e) and (32f), there exists at least a power constraint that holds with equality. Thus, the assumption that the transmit power constraints do not hold with equality, also cannot be true. To summarize, for the optimal solution {P * 1 , P * 2 , ρ * }, either the SINR or transmit power constraint must hold with equality.
Moreover, given the optimal solution {P * 1 , P * 2 , ρ * }, we can prove that two constraints of problem (32) are achieved with equality. First, suppose that the optimal solution {P * 1 , P * 2 , ρ * } can be obtained if and only if the SINR constraint (32b) holds with equality. In this case, we can easily find another solution of P 1 for (32) while two transmit power constraints (32d) or (32e) hold with equality. We denote this solution of P 1 byP * 1 . We can verify that this solution achieves a higher value for the objective function f (P * 1 , P * 2 , ρ * ) than f (P * 1 , P * 2 , ρ * ). Hence, this assumption cannot be true. Similarly, for all the other assumptions where if and only if a constraint holds with equality, we can easily prove these assumptions cannot be true too. In conclusion, for the optimal solution {P * 1 , P * 2 , ρ * }, there exist at least two constraints of problem (32) holding with equality. Based on the above observations, we can separate the problem (32) into ten cases by setting the two SINR constraints (32b), (32c) and the three transmit power constraints (32d), (32e), (32f) hold with equality. However, in the ten cases, when the constraints (32b) and (32f) hold with equality, if we want the objective function f (·) to increase, the transmit power solution P 1 increases, which leads to the conclusion that the constraints (32d) or (32e) are active. Hence, this combination is included in (32d) and (32f) or (32e) and (32f) so that this case can be removed. Similarly, constraints (32c) and (32e) combination will also be removed since this case was contained in (32d) and (32e) or (32e) and (32f). Therefore, the optimal solution {P * 1 , P * 2 , ρ * } of problem (32) is able to be obtained in closedform by comparing following eight cases.
When the two SINR constraints (32b) and (32c) hold with equality, we obtain the following two equations By substituting (55) into (32a), the objective function f (ρ * ) can be equivalently written as which is further equivalent to where a 1 , a 2 , a 3 are defined as in (33) and a 4 αF 2 /G 2 + βD 2 /E 2 . Hence, problem (32) is simplified as To proceed to solve (58), we have the following lemma.
Proof: Please refer to Appendix C. Then we obtain the optimal solution in (33).
(77) Similar to Lemma 3, due to the fact that e 3 > 0, if e1−e2 G2 < 0, i.e., e 2 > e 1 , the objective function f (ρ * ) must have a maximum value, which can be inferred from −e 3 (1 − ρ * ) = e1−e2 G2(1−ρ * ) . On the other hand, to guarantee the optimal solution ρ * satisfying 0 < ρ * < 1, we must have e 2 < e 1 + G 2 e 3 , which implies that the optimal solution ρ * of problem (77) can be derived as Then we obtain the optimal solution in (37). When the two transmit power constraints (32d) and (32e) hold with equality, we obtain the following two equations Based on (79), the two SINR constraints (32b) and (32c) can be equivalently written as + a 1 + a 2 − a 3 According to the property of the function f (x) = ax + b x , the objective function f (ρ * ) have a maximum value when a1 E2G2 < 0 and a1+a2−a3 E2G2 < 0. Due to the fact that a 1 < 0 and E 2 G 2 > 0, we have a1 E2G2 < 0. Hence, if a 1 + a 2 − a 3 < 0, i.e., a 2 − a 3 < −a 1 , the objective function f (ρ * ) must exist the maximum value, which can be inferred from the fact a1(1−ρ * ) E2G2 = a1+a2−a3 E2G2(1−ρ * ) . Note that, to guarantee the optimal solution ρ * satisfying 0 < ρ * < 1, we also let a 2 − a 3 > 0. As a result, the optimal solution ρ * of problem (58) can be derived as Next, we show that a 1 + a 2 − a 3 > 0 cannot happen at the optimal solution ρ * . We prove this result by contradiction. In this case, if we want the objective function f (ρ * ) to increase in (91), the optimal solution ρ * will be ρ * → 1, which leads to that the transmit power solution P * i → ∞. It is easy to verify that the above case cannot happen due to the transmit power constraints in problem (58). In conclusion, the optimal solution ρ * of (58) can be obtained while 0 < a 2 − a 3 < −a 1 . The proof of Lemma 3 is thus completed.