Secrecy in Wireless Information and Power Transfer for One-Way and Two-Way Untrusted Relaying with Friendly Jamming

An untrusted relay system combined with a simultaneous wireless information and power transfer (SWIPT) scheme is considered in one-way and two-way relaying transmission strategies. In the system, two source nodes can only communicate with each other via an untrusted energy harvesting relay node, which sends the message by using its harvested energy from the source nodes. Specifically, we classify the intermediate relay as an eavesdropper into twomodes: active eavesdropper and nonactive eavesdropper, depending on whether it has sufficient energy of its own to transmit the message or not. Under a simplified three-node fading wiretap channel setup, the transmit power allocation and power splitting ratio are jointly optimized to minimize the outage probability in the delay-sensitive case and to maximize the average rate in the delay-insensitive case, subject to the average and peak total power constraints. Applying the dual-decomposition method, the optimization problem can be efficiently solved in the delay-sensitive scenario. Moreover, an iterative algorithm is proposed to derive the solution to maximize the average rate in the delay-insensitive scenario. Numerical results demonstrate the performance of system outage probability in the two modes versus different rates and how efficiently the secrecy rate is improved compared with traditional schemes.


Introduction
Cooperative relaying is an effective approach for energy saving in wireless network, and two-way relay cooperation with network coding can enhance the capacity, coverage, and diversity.However, it does sacrifice the relay node's energy to cooperate with the source node to achieve optimal system throughput.The relay node may lack the proper incentives to cooperate, since the energy consumption would severely degrade the donor's experience, especially when the relay node is a battery constrained user.Recently, energy harvesting communication networks have emerged as alternative solutions with two different lines of research: the SWIPT scheme [1] and the wireless powered communication networks (WPCN) [2].SWIPT has attracted many researchers' interest since it is a promising technology to overcome the bottleneck of energy constrained wireless networks.Combining SWIPT with two-way relay communications, the relay node consumes the harvested energy instead of its own energy to cooperate with two source nodes to communicate with each other.From the perspective of the physical-layer security, the relay node can be friendly and protect the message from being eavesdropped by others.In heterogeneous networks, the relay node and source node are served by different network operators, so the message transmitted by the source node has different security levels.Moreover, the relay node should generally not be trusted in real life since the source nodes are likely to choose an untrusted relay to forward information.The untrusted relay can act as an essential relay that would strictly execute the forward behavior with specified power, as well as a malicious eavesdropper that has the incentive to eavesdrop on the information.When considering SWIPT with an untrusted relay, it is important to investigate the performance on the outage probability and the system secrecy rate.
For the security communication, if the fading wiretap channel has a better channel gain than the main channel, the secrecy capacity of the system will be zero.Untrusted relay channels with confidential messages were first studied in [3], where the intermediate relay acted as both an eavesdropper and a helper.The papers [4][5][6][7] studied the security of the untrusted relay in different scenarios.The paper [4] considered the relay channel with a relay that was an eavesdropper and whether the untrusted relay may help the source and the destination.The work [5] investigated the problem of secure communication for amplify-and-forward (AF) systems with untrustworthy relay nodes and revealed the system performance worsened as the number of relays increased.In [6], a successive relaying scheme was proposed to secure the AF relaying network with multiple untrusted nodes and it was shown that the scheme could improve the security performance.In addition, secure beamforming with untrusted relay was considered in [7,8].
The idea of the SWIPT scheme was first proposed in [9], and since then, it has been extended to wireless relay networks [10][11][12][13][14][15][16][17][18].For the one-way single-antenna relay channel, time switching (TS) was proposed for AF relay networks in [10] and power splitting (PS) was proposed for DF relaying networks in [11].More complex but efficient twoway relay systems were analyzed in [12][13][14][15].The authors in [16][17][18] studied SWIPT in relay channels with the goal of minimizing the outage probability by jointly optimizing time assignment ratio and power splitting ratio.The papers [19,20] considered the multirelay cooperative networks where the system throughput and SWIPT with rateless code were studied, respectively.
These previous works presented the minimized outage probability in SWIPT-aware two-way relay systems.However, the authors did not consider that the relay could act as an eavesdropper with the SWIPT scheme.Besides, Liu et al. first analyzed the secrecy issue in multiple-input and singleoutput (MISO) systems combined with SWIPT in [21] where the joint information and energy beamforming design at the transmitter were investigated.In [22][23][24], the authors considered the application of the multiple-input multipleoutput (MIMO) technique with SWIPT, which improved the energy efficiency and also the spectral efficiency in the relay systems.Furthermore, for a fading wiretap channel, Xing et al. considered the optimal AN-aided secrecy design for SWIPT systems [25].From the literature review above, it is noted that there have been limited studies of the untrusted relay combined with the SWIPT scheme.
In this paper, we focus on the SWIPT scheme with the untrusted relay and the goal is to minimize the outage probability and maximize the secrecy rate in an untrusted relay network with SWIPT.There are two important issues to address in this paper: (i) The first one is how to reduce the outage probability in the delay-sensitive scenario, subject to the average and peak total power constraints.We formulate the optimization problem, which is a nonconvex problem.However, due to the strong duality of this problem, the Lagrange duality method can be used to address this issue.We propose a dual-decomposition method to optimize the power allocation and the splitting ratio can be obtained by the simple 1D search.
(ii) The second issue is how to optimize the secrecy capacity for the source node in the delay nonsensitive scenario.Using the Lagrange duality method, the optimization problem can be decoupled into parallel subproblems.Then an iterative algorithm is proposed to find the local optimal power allocation.Furthermore, different scenarios are studied to show the performance for the source node that is acting as the information transmitter or friendly jammer.
The remainder of this paper is organized as follows.In Section 2, the untrusted relay system with SWIPT is described and the corresponding secrecy rate is formulated.Section 3 introduces the formulation of the problem including the outage probability minimization problem and ergodic secrecy capacity maximization problem with power constraints.Section 4 gives the numerical simulations to prove the efficiency of the proposed method.Finally, conclusions are drawn in Section 5.

System Model
This paper considers a typical untrusted relay network with SWIPT scheme in a fading channel; the model consists of one untrusted relay node with energy harvesting capability and two source nodes  1 and  2 as shown in Figure 1.It is assumed that all users are wireless powered and all nodes are assumed to be equipped with a single antenna and operate in the time division mode with the same frequency band.The two source nodes exchange their information via the untrusted relay node, where there is no direct link between them.The source nodes would act as friendly jammer to enhance the security rate with each other.The complex channel coefficients from source nodes to the relay node for one particular transmission fading state are denoted as ℎ 1 (]), ℎ 2 (]), where ] denotes the joint fading state in each block.Furthermore, it is assumed that the channel fading state ] remains constant during one round-back block transmission of two time slots but can vary from block to block as ] changes.The channel reciprocity is also assumed for the uplink and downlink transmission between source nodes and the relay node.The complete round trip transmission of the untrusted relay with SWIPT can be divided into two phases as discussed below.
During the first phase, two source nodes transmit their information to the intermediate relay simultaneously. 1 ,  2 ∼ CN(0, 1) are the transmit signals which are circularly symmetric complex Gaussian (CSCG) random variables with zero mean and unit variance.The received signal at the untrusted relay can be presented as where  1 ,  2 are the transmit power of source nodes.  ∼ CN(0,  2  ) denotes the thermal noise at the antenna of the relay node.As shown in Figure 2, the relay node is equipped with a power splitter to divide the received signal into two power streams with the power splitting ratio .One is used for energy harvesting, and the other one is used for the information transceiver.For the energy harvesting part, the harvested energy can be expressed as where  is the energy conversion efficiency factor in converting the RF signal into electrical power.For the information receiver part, the received signal is sent to an information transceiver, which can be represented as where   ∼ CN(0,  2  ) is the circuit noise.It is proposed to classify the intermediate untrusted relay into two modes: nonactive eavesdrop mode and proactive eavesdrop mode.
For the nonactive eavesdrop mode, the relay node would only attempt to decode the message at the information receiver after the power splitting process.The untrusted relay amplifies and forwards the message by using the harvested energy.As shown in Figure 2, the blue diagram describes the nonactive eavesdrop flow chart.Then, the untrusted relay has the capacity with respect to  1 and  2 at the fading state ] as ) , where , and  denotes the channel bandwidth.
For the proactive eavesdrop mode that is described in red diagram in Figure 2, the relay node would attempt to decode the message directly via the antenna receiver without the power splitting process.The untrusted relay would duplicate the information and forward it using its own energy from the battery.Moreover, the untrusted relay would obey the optimal forwarding strategy with the assumption that it does not eavesdrop on the message as a regular relay.Then, the untrusted relay has the capacity with respect to  1 and  2 at the fading state ] as ) , ) . (5)

Mobile Information Systems
During the second phase, the information transceiver forwards the information receiver signal   by an amplification factor  and then broadcasts the signal to both source nodes with the energy harvested power   .The transmit signal at the intermediate relay can be expressed as Then, the corresponding signal received at the source nodes can be written as Since each source node knows its own transmit information in the first phase, the perfect self-interference (selffriendly jamming) can be cancelled.Then, the received signal can be rewritten as where  1 ,  2 ∼ CN(0,  2  ) are the AWGN at the source nodes.By applying the Shannon formula, the system rate of the relay system between two source nodes at the fading state ] can be expressed as Then, the secrecy rate for source nodes  1 and  2 in the twoway untrusted relay at fading state ] can be written as follows.
Nonactive Eavesdrop Mode Proactive Eavesdrop Mode where () + indicates that max (, 0).Until now, we have obtained the secrecy rate expressions of the two-hop secrecy communication in the untrusted relay with SWIPT in nonactive and proactive eavesdrop mode.
For the two-way relay system, the system rate of the two eavesdrop modes can be concluded as (10a) and (10b) and (11a) and (11b).For the one-way relay system, the destination node acts as a friendly jammer to help the source node to transmit the secrecy information.The link from the destination node to the source node is not used to decode the information just for friendly jamming.
Note the antenna noise power  2  can be neglected compared to the circuit power  2  at the untrusted relay in practice.Without loss of generality, we assume  2  = 0 and  2  =  2  = 1.

Problem Formulation and Optimal Solution in Different Scenarios
In this section, we consider the system outage probability performance in the delay-sensitive scenario and the average system secrecy rate performance in the delay nonsensitive scenario.The optimization problems are formulated as follows.

Secrecy Information Transmission in Delay-Sensitive Scenario.
Firstly, it is assumed that two source nodes have the instantaneous rate constraints with the two-way relaying scheme, and we consider the optimization problem of minimizing the system outage probability performance.Given the target rates  1 ,  2 at the specific fading state ], the secrecy outage probability can be presented as It is supposed that the channel coefficients are all known at the source node sides, and the minimized secrecy outage probability problem can be converted into the power allocation strategy to maximize the instantaneous rate.For convenience, it is proposed to adopt the indicator function for the event of successful link to present the outage probability function as follows: where C  1 (]) and C  2 (]) denote the secrecy rates in both eavesdrop modes.Then the outage probability function can be rewritten as Considering the total instantaneous peak transmit power constraints  ,peak and average transmit power constraints  avg , we aim to minimize the system secrecy outage probability by jointly optimizing power allocation at each source node and power splitting ratio at the relay node.The optimization problem can be formulated as follows.
(P1) is Generally, the optimization problem is nonconvex since the objective function is nonconvex.Adopting a similar analysis drawn in [26], the optimization problem can be verified to obey the "time sharing" condition proposed in [27] under the assumption that the channel fading is a continuous distribution.Moreover, if the investigated time is enough long, strong duality would hold for this optimization problem [28].Therefore, we can apply the Lagrange duality method to obtain the optimal solution of (P1), and it can be shown as follows.
The Lagrangian of (P1) can be written as where  is the dual variable with the average power constraint.
The partial Lagrange dual function of (P1) is expressed as Apparently, the minimization problem can be decoupled into parallel subproblems for each fading state.Then, for one particular fading state ], the subproblem with the determined  can be presented as follows.
(P1)-sub is where L 1 ( 1 ,  2 , ) =  + ( 1 +  2 ).Apparently, the secrecy rate of each link is a monotonically increasing function for ( 1 ,  2 ).Given any fixed , in order to maintain the target secrecy rates  1 ,  2 , the minimum required power can be obtained by solving the following equations: where and  2 = 2 2 2 / .It is a binary quadratic equation.The solution can be easily obtained as where Then, the following problem is formulated to find the optimal solution for .
The optimal power splitting ratio  * can be obtained by a simple 1D search.Therefore, the optimal power allocation and power splitting ratio can be expressed as It is noted that if the optimal power allocation exceeds the maximum transmit peak power, and the outage event is inevitable.There is no need to allocate the power in this transmission block.With the given , the (P1)-sub problem can be efficiently solved by using (18).For the original optimization problem 1, it can be solved by iteratively updating  via the gradient method mentioned in [29].
Considering the proactive eavesdropper mode, the optimal solution can be obtained by instituting   1 =  1 and   2 =  2 into (20).
Secondly, for the one-way relaying scheme, the outage probability of the link  1 →  2 can be represented as For the of link from  2 →  1 , it is omitted due to the space limitation.Using the same method as in the twoway relaying scenario, the optimal power allocation in each transmission block is given by the following equations: where   is the total transmit power of two source nodes in this block.Then the optimal power allocation for the one-way relaying scenario can be expressed as where It is noted that if (25) has no positive real solution, it means that the total transmit power is lower than the required energy power.It is proposed to adopt the gradient method to update the Lagrange variable  until the optimal solution is obtained.

Secrecy Information Transmission in Delay Nonsensitive
Scenario.Considering the delay nonsensitive scenario, we aim to maximize the ergodic secrecy capacity for the source node, which is subject to the same constraints as mentioned in optimization problem 1 of the delay-sensitive scenario.
The optimization problem of maximizing the ergodic secrecy capacity can be represented as follows.
where [C(])] can be expressed as C , 1 or C , 2 for the oneway relaying scheme and as C , 1 +C , 2 for the two-way relaying scheme.Similar to the case in delay-sensitive scenario, adopting the Lagrange duality method, the optimization problem 2 can be decoupled into parallel subproblems with the same structure for each fading state.Therefore, the subproblem can be expressed as follows.
Fading state index V is omitted for brevity.Firstly, considering the one-way relaying scenario, the C , 1 or C , 2 in the (P2)sub is nonconvex.It is difficult to be solved by applying convex optimization techniques.Thus, we adopt the temp total transmit power    to find the optimal relationship between  1 and  2 .Then, (P2)-sub for one-way relaying scheme can be represented as follows.
Fixing the power splitting ratio , then, using the KKT conditions for the (P2)-sub-ONE, the optimal power of source node   1 can be represented by the temp variable    as follows: where It is noted that the optimal power allocation between two nodes in each transmission block can be substituted by the temp variable    .Then the optimal transmission rate can be obtained by 1D-search for the optimal power splitting ratio .Since the water-filling level cannot be figured out.It is proposed to adopt the iterative method to obtain the local optimal solution.Firstly, we set  ,0 as the initial value  ,0 =    of iteration for the number of  channel fading blocks.Secondly, we suppose the initial power step Δ and then the secrecy rate for this iteration can be updated as where    and    are secrecy rates calculated with transmit power of (  + Δ) and (  − Δ), respectively.Then, the maximum value of     and the minimum value of     are selected to calculate the secrecy rate increment Δ.

Δ𝐶 = [(𝐶
If   =   , the maximum increment and the minimum increment are in the same channel states.This means that power allocation for this channel block is completed.Then the iteration will continue in other remaining channel blocks.It is noted that the selected channel would expend the same energy to obtain a larger secrecy rate compared with other channel blocks.The concept behind this algorithm is that the power step Δ would be allocated to the specific channel block that can obtain the largest rate increment.And    is updated as follows: Until now, a whole complete iteration process has been introduced.The iteration process will converge when the condition Δ <  is satisfied, where  is a small value.
This means that the average secrecy rate would not increase anymore.Moreover, the rate fluctuation is small enough.
Therefore it has converged to a local optimal point.The iteration process can be summarized in Algorithm 1.
For the two-way relaying scenario, the optimization problem can be expressed as follows.
Firstly, we find the optimal relationship between  1 ,  2 , and    by solving the following equation: We denote the optimal expression as P *  1 = (   ) and omit the complex expression for the sake of simplicity.Secondly, we adopt the iteratively updating method by firstly fixing the power splitting ratio to find the optimal    for each transmission block, then fixing    to get the optimal splitting ratio until the local optimal point is obtained.Similar to the one-way relay scenario, the proposed iteration scheme is used to solve the optimal power allocation for the two-way relay case.

Simulation Results
In this section, we provide the numerical results to evaluate the performance of the SWIPT scheme with one-way and two-way relaying transmission strategies for the proactive mode and the nonactive mode.It is supposed that the untrusted relay is in the middle of two source nodes.The simulation parameters are set up as follows: the transmission bandwidth  = 100 KHz and the number of channel blocks  = 100; antenna noise power  2  = 0 and circuit power   = 1; the energy conversion efficiency factor  is set to 0.6;  ,peak is 70 dBm; the convergence coefficient is 10 −5 and the initial step value Δ is 10 dBm.
For the two-way relay case, we firstly study the minimum outage probability for the proactive eavesdrop mode and the nonactive eavesdrop mode.Figure 3 depicts the outage probability versus the average transmit power with different secrecy rates.It is noted that, for any given secrecy rate, the outage probability for the two-way scheme decreases sharply as the average transmit power increases.For different secrecy rates, the curve tends to decline slowly when the secrecy rate is higher.This is due to the fact that when the target secrecy rate increases, it needs more transmit power and a better channel state to satisfy the condition, which leads to a lower outage probability.Moreover, it can be seen that even if the transmit power is large enough, the outage probability can be less than 0.01%.Figure 3 also shows that the outage probability in the nonactive mode is lower than that in the proactive mode for a fixed secrecy rate.This indicates that the power splitting process after the information decoding has a more positive effect on the signal-to-interference-plusnoise ratio (SINR) than decoding information directly via the antenna receiver.Actually, the relay mode selection depends on the practical scenario.
Figure 4 plots the outage probability performance of oneway relay versus the transmit power.It can be observed that when the secrecy rate is larger, the outage probability is higher, which is similar to the outage probability of the two-way relaying.However, the difference is that the outage probability of one-way relay decreases faster than the twoway scheme.This is because of the effect of friendly jamming which would bring benefits and the impacts of two-way channel conditions are more complex than one-way relay scheme.It is also noticed that the curves of the nonactive scheme and the proactive scheme are very close to each other.This indicates that the power splitting at the information receiver and the antenna receiver have a very similar effect on the system outage performance.Moreover, the gap between curves with different secrecy rates is quite clear.The reason is that the higher secrecy rate demands more power to transmit  the information, which is less likely to satisfy the constraints and leads to a higher outage probability.
For the secrecy information transmission in the delay nonsensitive scenario, we show the performance of maximum secrecy rate versus different values of  avg in Figure 5.For a better comparison, we use the average transmit power allocation scheme as a benchmark.It is shown that the proposed iteration scheme increases faster than the average transmit power allocation scheme, which indicates that the proposed scheme outperforms the average transmit power allocation scheme.Besides, we can note that the secrecy rate cannot always increase with the increase of the average transmit power because of the limitation of channels.We also notice that there is a gap between the curves of the nonactive scheme and the proactive scheme.For instance, when the average transmit power  avg = 40dBm, the secrecy rate achieved by the nonactive mode is more than 0.25 bits/s/Hz compared with the proactive mode.As mentioned above, this is due to the fact that the SINR is higher in the nonactive mode, which contributes to a larger secrecy rate in the nonactive mode.It also indicates that decoding messages at the information receiver can enhance the system performance.
Figure 6 shows the maximum secrecy rate of the twoway relay versus different average transmit power.It can be seen that the secrecy rate of four scenarios increases with the increment of the average transmit power.It can also be observed that the secrecy rate of the proposed scheme is nearly twice the secrecy rate of the average power allocation scheme.For example, in nonactive mode, when the average transmit power is 40 dBm, the secrecy rate for the Average power allocation (nonactive) Average power allocation (proactive) Proposed scheme (nonactive) Proposed scheme (proactive)  proposed scheme is about 4.3 bits/s/Hz nearly twice the value of 2.4 bits/s/Hz for the average power allocation scheme.Moreover, the rate for the two-way relay scenario is lower than the rate in the one-way relay scenario.This is not only because of the friendly jamming in the one-way relay case but also because of more complex channel conditions in the twoway relay case.

Conclusion
This paper investigates a relay system with SWIPT in a fading channel, which includes one untrusted relay node with energy harvesting capability in the one-way and the two-way relaying scenarios.The source nodes exchange their information via the untrusted relay since there is no other link between them.The intermediate relay is divided into two modes: active eavesdropper and nonactive eavesdropper depending on whether the harvested energy can support the transmission cost.We jointly optimize the transmit power allocation and power splitting ratio with the objective of minimizing the outage probability in the delay nonsensitive scenario and maximizing the average rate in the delaysensitive scenario, subject to the average and peak total power constraints.The outage probability optimization can be solved by dual decomposition efficiently and an iteration algorithm is proposed to optimize the secrecy rate.Numerical results demonstrate the performance of the nonactive mode is better than the proactive mode and the proposed scheme also has significant improvement in terms of system outage probability and the secrecy rate.

Figure 2 :
Figure 2: The SWIPT scheme for untrusted relay flow diagram.

Figure 3 :
Figure 3: The outage probability for different  avg in the two-way relay case.

Figure 4 :
Figure 4: The outage probability for different  avg in the one-way relay case.

Figure 5 :
Figure 5: The secrecy rate for different  avg in the two-way relay case.

Figure 6 :
Figure 6: The secrecy rate for different  avg in the one-way relay case.