Wireless Energy Harvesting Two-Way Relay Networks with Hardware Impairments

This paper considers a wireless energy harvesting two-way relay (TWR) network where the relay has energy-harvesting abilities and the effects of practical hardware impairments are taken into consideration. In particular, power splitting (PS) receiver is adopted at relay to harvests the power it needs for relaying the information between the source nodes from the signals transmitted by the source nodes, and hardware impairments is assumed suffered by each node. We analyze the effect of hardware impairments on both decode-and-forward (DF) relaying and amplify-and-forward (AF) relaying networks. By utilizing the obtained new expressions of signal-to-noise-plus-distortion ratios, the exact analytical expressions of the achievable sum rate and ergodic capacities for both DF and AF relaying protocols are derived. Additionally, the optimal power splitting (OPS) ratio that maximizes the instantaneous achievable sum rate is formulated and solved for both protocols. The performances of DF and AF protocols are evaluated via numerical results, which also show the effects of various network parameters on the system performance and on the OPS ratio design.


Introduction
Energy harvesting (EH) has recently attracted enormous attention from researchers as a promising supplemental technology in prolonging the lifetime of a wireless network, especially in wireless sensor networks [1], cognitive radio networks [2], etc. With energy harvesting technique, the energy can be captured through solar power [3], strongly coupled magnetic resonances [4] or radio-frequency (RF) signals in ambient environments [5]. Since RF signals carry energy as well as information, the integration of RF energy harvesting capabilities into wireless communication systems provides a possibility of simultaneous wireless information and power transfer (SWIPT) [6]. The pioneer work of initial work on SWIPT is discussed in [7], which considers an ideal receiver design that is able to simultaneously observe and extract power from the same received signal. However, as discussed in [8], this such an ideal receiver does not hold exist in practice. For practical implementation, the study in [8] also introduces two realizable receiver architectures design: time switching (TS) and power splitting (PS).
Cooperative relay network [9,10] is a common application scenario of SWIPT. In relay networks, the relay expenditures additional resources for relaying, which might result a decreased lifetime for energy-constrained relay networks. A handful of research efforts have explored SWIPT for one-way relay (OWR) and two-way relay (TWR) networks. In [11], Nasir et al. analyze TS and PS protocols for one-way amplify-and-forward (AF) relay networks, and derive analytical expressions for the outage probability and the ergodic capacity. Yin et al. [12] study the optimal power splitting design to • We have presented a self-powered TWR energy harvesting and signal transmission models for both DF and AF protocols suffered by hardware impairments considered at all nodes. • We obtained the new signal-to-noise-plus-distortion ratio (SNDR) expressions, and derived the exact analytical expressions of the achievable sum rate and ergodic capacities in integral closed-form for both DF and AF protocols respectively. • In order to obtain more engineering insights, we formulate and solve the optimal power splitting (OPS) ratio that maximizes the instantaneous achievable sum rate for both DF and AF protocols. • Simulation and numerical results are presented to verify our derivation and to assess the effects of various parameter settings on system performance. The achieved sum rate with the OPS design are compared that with the equal power splitting (EPS) design, and the performance of DF and AF protocols are also compared and discussed.
The rest of this paper is organized as follows. In Section 2, we describes the system and signal models, and presents the new expressions of SNDRs and the instantaneous achievable sum rate expressions. The derivation of ergodic capacities of both DF and AF protocols are presented in Section 3. Section 4 formulates and develops solutions of OPS ratio for DF and AF protocols. Section 5 validates the analytical results and assesses the effects of various network parameter settings on the performance and optimal solutions via numerical results, followed by concluding remarks in Section 6.

System and Signal Model
Consider a typical half-duplex two-way relay network that consists of three nodes: two source nodes S 1 and S 2 with continuously their power sources, and an energy harvesting relay node R, which harvests the energy it needs from the RF signals transmitted by the two source nodes. It is assumed that there are no direct links between the two source nodes due to deep shadowing or blockage; thus information exchange between them only relies on the relay. A PS receiver architecture is employed at the relay as an energy harvester, and hardware impairments that result in distortion noises suffered by all nodes are modeled as shown in Figure 1a.

TWR EH and Hardware-Impairment-Distortion Model
The network employs a two-step multiple access broadcast transmission and assumes two common relaying protocols, decode-and-forward (DF) protocol and amplify-and-forward (AF). In this configuration, each round of transmission stage consist of two phases: multiple access (MA) phase and broadcast (BC) phase. In the MA phase, the relay R harvests energy and collects receives data from the wireless signals transmitted by both source nodes simultaneously; in the BC phase, the relay processing the collected data it received through the DF protocol or the AF protocol, and then broadcasts the processed information x R with the harvested energy to both source nodes. Note that the power needed for information processing and for powering the relay hardware is ignored in the model. This kind of assumption has been applied in a lot of references, such as [11]).
The power splitting energy harvesting protocol is considered in this paper, in which the receiver architecture of the relay consists of a power splitter and an information decoder (ID) for the DF protocol is adopted, or an information amplifier (IA) for the AF protocol is adopted. The power splitter divides the received signal (transmitted by the source nodes) into two portions: one portion ρ (0 ≤ ρ ≤ 1) is used for EH and the other portion (1−ρ) for information processing.
Hardware impairments are considered both the transmitter and receiver of each node. Similar to [19,23], we model the received signal in the presence of hardware impairments for an end-to-end transmission as where τ tx ∼ CN (0, κ 2 tx ) and τ rx ∼ CN (0, κ 2 rx P rec ) are the aggregate distortiona affecting noise caused by HI at the transmitter and receiver, respectively, κ tx and κ rx characterize the levels of impairments of the transmitter and receiver hardware, respectively, CN (·) stands for complex circularly symmetric Gaussian distributions, P rec = |h| 2 P is power of the received signal expressed in (1), h is the channel coefficient and n is the additive white Gaussian noise. For simplicity of analysis, in the following discussion, we assume all nodes have the same structure so that the level of HI are the same, i.e., κ tx,i = κ tx,j = κ 1 , κ rx,i = κ rx,j = κ 2 , (i, j = 1, 2, r represent source S 1 , source S 2 and relay R respectively).

Information Transmission in TWR
Information transmission in this paper consist of two phase, MA phase and BC phase. Let T indicate the duration of one round of transmission, from which half of the time, T/2, is used for MA phase, and the remaining half, T/2, is used for BC phase, which is shown in Figure 1b. In the MA phase, source nodes S 1 and S 2 transmit the information simultaneously.
With hardware impairments distortion mingled, the received signal at the relay can be written as where τ tx,i ∼ CN (0, κ 2 1 ), i = 1, 2, is the HI caused by the transmitter of S i , τ rx,r ∼ CN (0, κ 2 2 (|h 1 | 2 P 1 + |h 2 | 2 P 2 )) is the HI caused by the receiver of R, h i denotes the channel coefficient between S i and R, n r = n a,r + n b,r , n r ∼ CN 0, σ 2 r is the additive white noise generated at the relay. And n a,r ∼ CN 0, σ 2 a is the noise generated at the receiver antenna, and n b,r ∼ CN 0, σ 2 b is the noise generated in the down-conversion process of the received signal to baseband [11]. Since in practice the power of the noise generated at the antenna (σ 2 a ) is generally much smaller than the noise power introduced by the receiver chain (σ 2 b ), for simplicity, we neglect the noise term n a,r and adopt n r = n b,r in the following analysis.
Next, the relay then splits the received signal into two portions: √ ρy R is direct to the energy harvester for EH, 1 − ρy R is direct to the information processing (IP) circuit for information decoding (ID), if the relay works in DF protocol or information amplify (IA) if the relay works in AF protocol. Note that the distortion noises generated at the transmitter could contribute as a source of energy harvesting, while the distortion noises generated at the receiver and the noise n b,r does not contribute to energy harvesting, since the power splitting process is done before the down-conversion process (the majority of the HI distortion noises of receiver is assumed to be caused after the down-conversion process).
Thus, we can parameterize the acquired energy at the relay node as where 0 ≤ η ≤ 1 is the energy-conversion coefficient. The level of hardware impairments in the transmitter and receiver, i.e., κ 1 and κ 2 , are required within the region κ i , i = {1, 2} ∈ [0.08, 0.175] in 3GPP LTE [25]. Thus, (3) can be approximated as And the signal delivered to the IP circuit can be expressed as Assume that perfect channel state information is available for all nodes. With different relaying protocol, the received information y IP will undergo different process which is described in the following and simply depict in Figure 1a. We describe the different process in the next.
Decode-and-Forward Protocol: When applying the DF protocol, the relay first decodes y IP to generate the messages x 1 and x 2 , then applies a network coding function to construct the transmitted signal as x R = x 1 ⊕ x 2 , and finally broadcasts it to both source nodes with the harvested energy.
Amplify-and-Forward Protocol: When applying the AF protocol, the relay utilize an amplifier factor G to directly amplify y IP as x R = G · y IP without any decoding and then transfer the amplified signal to both source nodes with the harvested energy.
After information processing, the relay exhausts the harvested energy to forward the processed information to both source nodes. With the consideration of channel reciprocal, the received signals at the source node S i , i = 1, 2, is given by where P R is the relay's transmit power, which is calculated as P R = 2E/T, τ tx,r ∼ CN (0, κ 2 1 ), i = 1, 2 is the HI caused by the transmitter of R, and τ rx,i ∼ CN (0, κ 2 2 |h i | 2 P R ) are the HI caused by the receiver of S i , n i ∼ CN 0, σ 2 i , i = 1, 2, is the noise generated at source S i . And where Since the signal power is usually much greater than the noise power, σ 2 r in (4) and (8) will be omitted in the following analysis.

Instantaneous Achievable Sum Rate: DF Relaying
Referring to [26,27], we obtain the capacity region of the MA phase based on (5) as where C(x) = 1 2 log 2 (1 + x), Υ iR , i = {1, 2}, are the end-to-end SNDRs from source node S i to relay R, Υ MA is the multiple access signal-to-noise-plus-distortion ratio (SNDR), which are presented as follows With substituting (4) and (7) into (6), we can derive the capacity region of the BC phase as follows referring to [26,27].
where Υ Ri , i = {1, 2}, are the end-to-end SNDRs from relay R to source node S i written as . For the noise components in the source and relay nodes, it is reasonable to assume σ 2 1 = σ 2 2 = σ 2 r = σ 2 , which will be adopted in the following derivation. The capacity region of a two-way relay network is constrained by both MA and BC transmissions, therefore, the capacity region of this network exploiting the DF protocol can be presented by where The total achievable sum rate of the network with the DF protocol is expressed as From (10) and (12), note that under the impact of hardware impairments, a continuous increase of the transmit power does not lead to a continuous increase of SNDR and achievable rate performance for DF-TWR scheme.

Instantaneous Achievable Sum Rate: AF Relaying
Since with the AF protocol directly amplify the received original data, its achievable sum rate is dependent on the end-to-end SNDR. By substituting Equations (5) and (8) into Equation (6), the received signal at S i is rewritten as where i,ī ∈ {1, 2} and i =ī, τ tx ∼ CN (0, κ 2 1 ), τ ∼ CN (0, κ 2 ), and κ 2 = κ 2 1 + κ 2 2 . With the perfect knowledge of channel gains and assuming channel reciprocity, S i can remove the self-interference signal from y S i through self-cancellation process. Therefore, we can compute some mathematic manipulations, the SNDR at each node is expressed as follows.
for S 1 (i.e., SNR received at S 1 transmitted by S 2 ) and for S 2 (i.e., SNR received at S 2 transmitted by S 1 ), where 2 1 . Accordingly, the data rate at S i , i = 1, 2, is given by . Furthermore, the total achievable sum rate of the network with the AF protocol can be expressed as From Equations (16) and (17), note that under the impact of hardware impairments, a continuous increase of the transmit power does not lead to a continuous increase of SNDR and achievable rate performance for AF-TWR scheme as well.

Ergodic Capacities Analysis
This section provides the derivation of both DF and AF protocols. The capacity expressions will reveal the effects of hardware impairments on EH-TWR. The channel gain are set to be h i = g i /d m i , where the magnitude of g i is modeled as independent but non-identically distribute Rayleigh random variables with variance λ i , d i is the distance between S i and R, and m is pass loss exponent.
Two lemmas are presented to help the following derivations of ergodic capacities.
also obeys Rayleigh distribute as well. The probability distribution function (PDF) of γ i is presented as Proof. The proof is straightforward, which is omitted here.

Lemma 2.
Let Υ be an arbitrary variable. Then , Then utilizing partial integration, which leads to (20) by using the integration by parts.

Ergodic Capacity of DF Relaying
In order to determine the ergodic capacity of the DF protocol for such an EH-TWR networks, we need to evaluate the ergodic capacity of the source-to-relay link C ir , the relay-to-destination link C ri , and the multiple-access constraint capacity C mac . Based on Lemma 2, it is non-trivial to obtain the CDFs of each SNDRs: F Υ iR , F Υ Ri , and F Υ MA first.
For F Υ MA (t), there are two cases based on the relative values of A 1 and A 2 . where Proof. The proof is given in Appendix A.
With the derived CDFs: F Υ iR , F Υ Ri , and F Υ MA , we can further derive their ergodic capacities as shown in the following Theorem 2 based on Lemma 2.

Theorem 2. The ergodic capacities
For C MA , it has are two cases determined by the size of A 1 , A 2 . And for A 1 = A 2 , C MA is expressed as and for A 1 = A 2 , C MA is expressed as Proof. The proof is given in Appendix B.
Using the obtained ergodic capacities of each link, the total ergodic capacity can be obtained by

Capacity of AF Relaying
For the AF protocol, the total ergodic capacity can be given by The CDFs of Υ 1 and Υ 2 is presented as following Theorem 3.
and K 1 (·) is the first-order modified Bessel function of the second kind [28].
Proof. The CDF of Υ 1 for the AF protocol is derived as follows.
). The CDF of Υ 2 can be derived using the same derivation which is omit here due to page limitation.
Substituting the obtained F Υ i (t) into (20) , which gives in Lemma 2, the ergodic capacities C Υ i can be calculated as Then, substitute (38) into (33) will result in the total ergodic of AF protocol.

Optimal Power Splitting Design
Note that if more received signal is allocated to harvest energy, a higher available transmission power can be obtained, which may lead to a higher transmission rate, but less signal is left for transmission, which may lead to the decrease of transmission rate, and vise versa. Therefore, optimizing ρ is proposed as a way of improving.
With the obtained ergodic capacity expressions of DF and AF protocols derived in Section 3, the OPS value that maximize the ergodic capacity can be obtained by solving the optimization problem: where Q = DF for DF protocol, and Q = AF for AF protocol.
However, due to the complicated integral and Bessel function in each ergodic capacity expression, a closed-form solution of the OPS ratio can hardly be obtained. Instead, we are interested in finding the OPS ratio that aims at maximizing the instantaneous achievable sum rate. This optimization is formulated as where R Q sum denotes the achievable sum rate of using the DF (i.e., Q = DF) or AF (i.e., Q = AF) protocol. Next we design the OPS ratios for DF and AF protocols, respectively.

The Optimum PS Design for the DF Protocol
From (40), we first analyze the analytical expression R DF sum to determine the OPS ratio. Equation (14) shows that the achievable sum rate R DF sum is determined by I 1 + I 2 and R MA . Since log 2 (x) is a monotonically increasing function of x, we note that R MA (ρ) = C(Υ MA ) is a decreasing function of ρ because Υ MA is a decreasing function of ρ. The analytical expression of I(ρ) = I 1 (ρ) + I 2 (ρ) is expressed in the following proposition. Proposition 1. I(ρ) is a three-segment continuous function, segmented by ρ DF min = min(ρ 1 , ρ 2 ) and ρ DF max = max(ρ 1 , ρ 2 ). The optimum I(ρ) exists in the range of [ρ DF min , ρ DF max ], where and I(ρ) is given by where γ Σ = γ 1 + γ 2 , and n = 1 when γ 1 < γ 2 , n = 2 when γ 1 ≥ γ 2 .
Proof. The proof is given in Appendix C.
By analyzing the second-order derivation of I(ρ), it is easy to determine that in the region of ρ ∈ [0, 1], the three sections of I(ρ) are, respectively, an increasing function, a concave function and a decreasing function. Since I(ρ) is continuous, the overall function I(ρ) is a concave function. It is straightforward that I(ρ = 0) = I(ρ = 1) = 0, R MA (ρ = 0) = 0 and R MA (ρ = 1) = 0. Thus, I(ρ) and R MA (ρ) have one and only one intersection within the region of ρ ∈ [0, 1]. The achievable sum rate R DF sum (ρ) = min(I(ρ), R MA (ρ)), whose analytical expression can be determined by using the following Proposition 2, is achieved by combining I(ρ) and R MA (ρ).

Proposition 2. Denote the second-segment of I(ρ) as I sg
it can get conclude that I sg (ρ) and R MA (ρ) have one and only one intersection point in the range of ρ ∈ [0, ρ DF max ]. Let ρ + be the intersection of I sg (ρ) and R MA (ρ), there will be two cases for R DF sum (ρ): where ρ + is the intersection of I sg (ρ) and R MA (ρ), which can be obtained by solving the following Kubischen Polynoms and ρ * is the intersection of the first segment of I(ρ) and R MA (ρ), which can be obtained by solving Kubischen Polynoms as follows Proof. The proof is given in the Appendix D.
From the two cases of the achievable sum rates expressed in (43) and (44) (43), we can calculate that the first segment is an increasing function of ρ and the second segment is a decreasing function of ρ. Since R DF sum (ρ) in a continuous piecewise function, it is easy to get that the optimal achievable sum rate is obtained at ρ * . Thus, in this case the optimum power splitting ratio is ρ o = ρ * . 4.1.2. Case II: ρ + ≥ ρ DF min From Proposition 1 and the monotonic of R MA (ρ), we get that the maximum achievable sum rate exists in the second segment of (44), i.e., ρ o ∈ [ρ DF min , ρ + ]. Thus, the OPS value is determined by I sg , ρ ∈ [ρ DF min , ρ + ]. Because I sg (ρ), ρ ∈ [0, 1] is a concave function, there should have three subcases to determine the optimal value by analyzing the location of the extrema of of I sg (ρ). Denote ρ ex as the extrema of of I sg (ρ), it can be obtained by solving the following quadratic equation Through analysis of the locations of the extreme value ρ ex of I sg (ρ), we can get three subcases for Case II.
• Subcase 1: ρ ex < ρ DF min Since I sg (ρ) is a decreasing function in the range of [ρ ex , 1], it is easy to obtain that I sg , ρ ∈ [ρ DF min , ρ + ] is also a decreasing function. Thus in this case, the optimum power splitting ratio is ρ o = ρ DF min . • Subcase 2: ρ ex ∈ [ρ DF min , ρ + ] In this case, I sg (ρ) is an increasing function in the range of ρ ∈ [ρ min , ρ ex ] and is a decreasing function in the range of ρ ∈ [ρ ex , ρ + ]. Thus, I sg , ρ ∈ [ρ DF min , ρ + ] is a concave function and obtain its maximum at ρ o = ρ ex . • Subcase 3: ρ ex > ρ + I sg (ρ) is an increasing function in the range of [0, ρ ex ]. So in this case I sg , ρ ∈ [ρ DF min , ρ + ] is an increasing function of ρ. Its optimum is laid on the border ρ o = ρ + .

The Optimum PS Design of AF Protocol
Based on (16) and (17), we analyze the OPS ratio for the AF protocol starting from (16) and (17). With the notice of that Υ 1 and Υ 2 are both concave functions of ρ, it is easy to find that R AF sum is a concave function. The OPS of AF protocol can be obtained by equating ∂R AF sum ∂ρ = 0. However, it is difficult to directly calculate a closed form solution of the OPS ratio by solving ∂R AF sum ∂ρ = 0 because of complex high-order polynomial function of ρ in the numerator and denominator of ∂R AF sum ∂ρ . Therefore, we turn to utilize an approximate optimal solution for AF protocol with the consideration of high SNR regimes.
Using the fact that log 2 (1 + x) ≈ log 2 (x) when x 1, the instantaneous achievable rate of S i can be simply approximated in high SNR regimes as Since the convexity of log 2 (x) is the same with that of x, by analyzing the convexity of , it is easy to get that R i is concave function. And, thus, R AF sum (ρ) = R 1 + R 2 is concave function.
The first derivatives of R AF sum can be obtained as The obtained ∂R i ∂ρ is expressed on the top of next page.
By equating ∂R 1 ∂ρ + ∂R 2 ∂ρ to zero, we obtain that the OPS ratio that maximizes R AF sum (ρ) must satisfy the following equation: where Q n = L n,1 − L n,2 , n ∈ {1, 2, · · · , 5}. And L n,i , i ∈ {1, 2}, is expressed as follows and The above function is a quartic polynomial on ρ and has at most four real roots. Since R AF sum (ρ) is a concave function, at most one of these roots of ∂R AF sum ∂ρ = 0 is real and positive.

Effects of Various Parameters on Ergodic Capacity
The purpose of this set of simulations is to validate the correctness of the ergodic capacity expression derived and investigate the effect of various parameter settings on the ergodic capacities for that uses the DF protocol or AF protocols. Parameters chosen are: κ 1 = κ 2 = κ ave , σ 2 = 10 −6 . The channel gains are considered as Rayleign fading with pass loss, where the variances of the channel coefficients satisfy λ 1 = λ 2 = 1, and the pass loss exponent is set as m = 2.7. The transmit power P 1 = P 2 = P t , which is within the region P t = [0, 30] dBm. Figure 2 shows the effect of κ ave on ergodic capacities. The utilized parameter settings are: ρ = 0.5, d 1 = d 2 = 5 m, and η = 0.8. The ideal hardware impairment situation (κ ave = 0; i.e., no hardware impairments) are presented as benchmark performance. This figure shows that the ergodic capacities obtained by using the closed-form integral expressions are identical with Monte Carlo simulations. When the effects of hardware impairments are considered, the ergodic capacities tend to saturation with the increase of P t . And the higher the value of κ ave , the more quickly the ergodic capacities saturate. This is because the distortion noises introduced by hardware impairments also increase when P t increases, which will set a bound on the SNDR of each transmission link. Meanwhile, we also find that the effect of κ ave on the DF protocol is more obvious than that on AF protocol. This is because in AF protocol, the amplification of useful signal is more effective than distortion noise with the increase of P t , which will slow down the effect degree of the distortion noise, thus do not contribute severe distortion noises than in the DF protocol in the high SNR region. The effects of relay deployment on ergodic capacities are presented in Figure 3 for the DF protocol (left) and the AF protocol (right). The distance between S 1 and S 2 is fixed as d 1 + d 2 = 10 m, where d i , i ∈ {1, 2} is the distance between S i and R. The utilized parameter settings are: κ ave = 0.1, ρ = 0.5, η = 0.8 and destination pair (d 1 , d 2 ) = {(1, 9), (3, 7), (5, 5), (7, 3), (9, 1)} m. It is observed that the ergodic capacity obtained by the closed-form expressions coincide with that obtained by Monte Carlo simulations (Simu). It is evident that the ergodic capacities when (d 1 , d 2 ) = {(1, 9), (3, 7)} m are identical with that when (d 1 , d 2 ) = {(9, 1), (7, 3)} m for both protocols, which infers that the ergodic capacities of both protocols are symmetric with the increase of d 1 . This is because when set P 1 = P 2 and fix the distance between S 1 and S 2 , the system is symmetric, and thus contribute to a symmetric performance. We also find that the DF protocol have the minimum ergodic capacities when the distance pair are set as (d 1 , d 2 ) = (5, 5) m, the minimum ergodic capacities of AF protocol is obtained when (d 1 , d 2 ) = (5, 5) m in the low SNR region, and varies to different destination pairs when setting the transmit power P t to some certain values. This abnormal phenomenon of AF is due to the amplification process.  The effect of energy efficient conversion ratio η on ergodic capacities are presented in Figure 4 for the DF protocol (left) and the AF protocol (right) with parameters κ ave = 0.1, η = 0.5, (d 1 , d 2 ) = (5, 5) m, η = [0.2, 0.4, 0.6, 0.8]. It can be noticed that the ergodic capacities of both protocols obtained by the closed-form expressions are in accordance with that obtained via Monte Carlo simulations (Simu). With the increase of η , it is observed that the ergodic capacity of both protocol increase. This is because P R increases with the increase of η, which will enhance the transmit capabilities of the BC phase. And since P R is provided by energy harvesting, the value of P R is usually not very large. Thus the BC transmission ability dominates the value of ergodic capacity. Thus, with the increase of η, the ergodic capacities increase. The value of η also effects the saturation rate of the DF protocol and the gap between the curves of AF protocol. This phenomenon is due to the value of η effects the value of distortion noises. . It can be noticed that the maximum ergodic capacities of both DF and AF protocols with ρ = 0.9 has best performance in low P t region; while with the increase of P t , the maximum ergodic capacity change to the value with parameter setting ρ = 0.5 and further change to that with ρ = 0.1. This configuration verifies that the ergodic capacities can be enhanced through the design of ρ, which validates the meaning of OPS design analyzed in Section 4.

Effects of Various Parameters on OPS design
The purpose of this set of simulations is to validate the validness of the OPS design and investigate the effect of parameters setting on OPS design for that uses the DF protocol or AF protocol. Since in a practical scenario, the energy conversion efficiency can be known in advance, we mainly focus on the effect of tranmitted power P t , impairments distortion level κ ave and relay deployment d 1 on OPS design in this section. Parameters chosen are: κ 1 = κ 2 = κ ave , σ 2 = 10 −6 , η = 0.8, d 1 + d 2 = 10 m, λ 1 = λ 2 = 1, m = 2.7 and P 1 = P 2 = P t .
To better understand the importance and the effect of OPS design, we use ρ as x-axis to see the ergodic capacities (EC) and average achievable sum rate (ASR) changes with the increase of ρ. In Figure 6, we present the effect of PS ratio on EC and on average ASR for DF protocol, where the EC is obtained by using the derived closed-form expressions in Section 3.1 and the average ASR is obtained by doing Monte Carlo simulation using (14). It can be notice that, there exists a maximum value for both ergodic capacity and average ASR with the increase of ρ, and the value of ρ that maximize EC and average ASR varies with different transmit power P t sets and different distortion level κ ave sets. The curves of EC and average ASR are not exactly the same, and with the increase of P t and κ ave , the gaps becomes smaller. Though simulation inspect, we find that this is because due to different calculating of EC and average ASR, the correlative influence introduced by multiple-access restraint differs. In addition, with the increase of P t and κ ave , the correlative influence comparatively decreases. In Figure 7, the EC and average ASR with the increase of ρ for AF protocol are presented. The EC is obtained by using the derived closed-form expressions in Section 3.2 and the average ASR is obtained by doing Monte Carlo simulation using (18). It can be noted that the curves of EC coincide with the curves of average ASR. This is because without the multiple-access constraint influence in AF protocol, the calculation of EC is equal to the calculation of average ASR. In addition, we also find that the transmit power P t sets and the distortion level κ ave effect the OPS value. In the following configuration, we analyze the effect of parameters setting on OPS design, and the OPS ratio is obtained aiming at maximizing the instantaneous achievable sum rate which is derived in Section 4. Figure 8 shows the average achievable sum rate as a function of the transmit power P t for DF and AF protocols. The setting of distortion level κ ave = {0.08, 0.175} is adopted. Both the numerical search (NS) and the OPS closed-form derived in Section 4 are used to find the OPS ratio and calculate the corresponding achievable sum rate. The achievable sum rate with EPS is presented as benchmark performance. It can be noted that the curves obtained by numerical search coincide with that obtained by using closed-form OPS. It also shows that the OPS design outperforms EPS in each κ ave setting, and the gap grows with the increase of κ ave . The effect of OPS design with DF protocol is more obvious than that with AF protocol.  Figure 9 presents the value of OPS ratio versus the transmit power P t for DF and AF protocols. The setting of distortion level κ ave = {0.08, 0.175} is adopted. Seen from this figure, we find that the OPS ratio obtained by closed-form coincides with that obtained by doing NS for DF protocol, and the OPS ratio obtained by closed-form is quite similar with that obtained by doing NS for AF protocol. It is easy to noted that the OPS ratio is a monotonic decreasing function with the increase of P t for both protocols. The reason for this phenomenon is because when the source provide high transmit power, the recruit of harvested energy is more prone to satisfy the relay to destination transmission, and the enhancement of system performance is relies on the source to relay transmission which means that more information needed to be split to information decoder circuit, i.e., (1 − ρ) enhances. We also find that the OPS ratio with κ ave = 0.175 setting is higher than that with κ ave = 0.08 setting for both protocols. The reason for this phenomenon will be discussed below Figure 11.  Figure 10 plots the achievable sum rate versus hardware impairments distortion level κ ave for both DF and AF protocols with different transmit power P t = {15, 30} dBm. The curves with black solid line were generated by utilizing the OPS through numerical search (NS), and the curves with mark were generated by utilizing the OPS derived in Section 4. EPS design is adopted as benchmark performance. As shown in this figure, the achievable sum rate is decreasing and will tend to flatten out as κ ave increases, and the lower the transmit power, the faster the rate approaching to flat. This figure also verifies that OPS design outperforms EPS scheme, and the gaps of DF protocol between OPS and EPS design is bigger than that of AF protocol. The effect of κ ave on OPS design for DF and AF protocols are presented in Figure 11. This figure presents that the OPS ratio obtained by closed-form is identical with that obtained by doing NS for DF protocol, and for AF protocol, the OPS ratio obtained by closed-form is very close to that obtained by doing NS. It is observed that the OPS ratio is a decreasing function of κ ave , and the decreasing slope increases with the increase of P t . This is because the higher κ ave makes worse decoding ability.
To enhance system performance, more energy need to be diverted to the ID circuit to satisfy the decoding process, thus, OPS value decreases. We also find when κ ave is the same, the OPS value with the higher P t is lower than that with the lower P t . This is because in higher P t region, the harvested energy is more prone to satisfy the BC transmission with small ρ. With fixed κ ave = 0.1, we analyze the effect of relay deployment on average ASR with the set of P t = {15, 30} dBm for DF and AF protocols (d 1 is chosen as the x-axis) in Figure 12. This figure verifies that the average ASR with OPS obtained in Section 4 and that obtained by using NS are the same, and the OPS scheme outperform the EPS scheme. For DF protocol, the average ASR is a convex function with the increase of d 1 for P t = {15, 30} dBm. While for AF protocol, the average ASR is convex function when P t = 15 dBm, while when P t = 30 dBm, the average ASR is a concave function. This phenomenon echoes the conclusion in Figure 3 (right) that when P t increase to high enough, the relay is better to deploy close to any one of the source nodes.  Figure 13 plots the value of OPS ratio versus d 1 for DF and AF protocols. It shows that the OPS ratio obtained by closed-form is identical with that obtained by doing NS for DF protocol, and for AF protocol, the OPS ratio obtained by closed-form is very close to that obtained by doing NS. With the increase of d 1 , the OPS values of both DF and AF protocols are concave function. This is because when P 1 = P 2 and d 1 + d 2 = 10 m, the system has symmetric nature. In addition, when the relay is deployed in the middle of S 1 and S 2 , the harvested energy is the smallest with the fixed ρ, and the harvested energy increase when the relay getting closer to any of the source node. Thus, to enhance the performance, more energy is needed to be allocated to energy harvester when (d 1 , d 2 ) = (5, 5), and when d i , i = 1 or 2 decrease, less energy is needed to be allocate to energy harvester. We also find that the curves with P t = 30 dBm are lower than that with P t = 15 dBm. This is because with higher P t , the harvested energy is more prone to satisfy the transmission with lower ρ.

Conclusions
This paper analyzed the a rigorous analysis of a two-way energy harvesting relay network assuming a realistic scenario that the transceiver and receiver hardware is imperfect and will cause distortions. After analyzing two different transmission protocol (DF protocol and AF protocol), we derive the new expression of sum rate with impairment distortions considered. Then, we derive the exact analytical expression of ergodic capacity for both DF and AF relaying protocols. Furthermore, the OPS ratio that maximize the instantaneous achievable sum rate is formulated and solved for both protocols. Through numerical results we find that a continuous increase of the transmit power does not lead to a continuous increase of the ergodic capacity or the achievable sum rate when HI is considered. Also, the effect of HI is more obvious for DF protocol than for AF protocol with the increase of the transmit power. It can be also noticed that the achievable sum-rate with the OPS design outperforms that with EPS design. These results and observations provide very useful insights to guide the system optimization.
Next, we derive the CDF of Υ R1 , which is express as follows It is straightforward that F Υ R1 (t) = 1 when t > 1 κ 2 . In addition, when t < 1 κ 2 , F Υ R1 (t) can be derived as follows Similar to the derivation of F Υ R1 , we can obtain F Υ R2 (t). Denote ζ i = · 1 x dx, The CDF of Υ MA is derived in the following.
In addition, when t < F Υ MA (t) can be derived as follows The above derivations proof the Theorem 1.