On Secure Communication using RF Energy Harvesting TwoWay Untrusted Relay
Abstract
We focus on a scenario where two wireless source nodes wish to exchange confidential information via an RF energy harvesting untrusted twoway relay. Despite its cooperation in forwarding the information, the relay is considered untrusted out of the concern that it might attempt to decode the confidential information that is being relayed. To discourage the eavesdropping intention of the relay, we use a friendly jammer. Under the total power constraint, to maximize the sumsecrecy rate, we allocate the power among the sources and the jammer optimally and calculate the optimal power splitting ratio to balance between the energy harvesting and the information processing at the relay. We further examine the effect of imperfect channel state information at both sources on the sumsecrecy rate. Numerical results highlight the role of the jammer in achieving the secure communication under channel estimation errors. We have shown that, as the channel estimation error on any of the channels increases, the power allocated to the jammer decreases to abate the interference caused to the confidential information reception due to the imperfect cancellation of jammer’s signal.
I Introduction
The demand for higher data rates has led to a shift towards higher frequency bands, resulting in higher path loss. Thus relays have become important for reliable long distance wireless transmissions. The twoway relay has received attention in the past few years due to its ability to make communications more spectral efficient [1, 2]. In a twoway relayassisted communication, the relay receives the information from two nodes simultaneously, which it broadcasts in the next slot.
Ia Motivation
To improve the energy efficiency, harvesting energy from the surrounding environment has become a promising approach, which can prolong the lifetime of energyconstrained nodes and avoid frequent recharging and replacement of batteries. In [3] and [4], authors have proposed the concept of energy harvesting using radiofrequency (RF) signals that carry information as a viable source of energy. Simultaneous wireless information and power transfer has applications in cooperative relaying. The works in [5, 6, 7, 8, 9] study throughput maximization problems when the cooperative relays harvest energy from incoming RF signals to forward the information, where references [8, 9] have focused on twoway relaying.
Though the open wireless medium has facilitated cooperative relaying, it has also allowed unintended nodes to eavesdrop the communication between two legitimate nodes. Traditional ways to achieve secure communication rely on upperlayer cryptographic methods that involve intensive key distribution. Unlike this technique, the physical layer security aims to achieve secure communication by exploiting the random nature of the wireless channel. In this regard, Wyner introduced the idea of secrecy rate for the wiretap channel, where the secure communication between two nodes was obtained without private keys [10].
For cooperative relaying with energy harvesting, [11, 12, 13] investigate relayassisted secure communication in the presence of an external eavesdropper. The security of the confidential message may still be a concern when the source and the destination wish to keep the message secret from the relay, despite its help in forwarding the information [14, 15, 16, 17, 18]. Hence the relay is trusted in forwarding the information, but untrusted out of the concern that the relay might attempt to decode the confidential information that is being relayed.^{1}^{1}1In this case, the decodeandforward relay is no longer suitable to forward the confidential information. In practice, such a scenario may occur in heterogeneous networks, where all nodes do not possess the same right to access the confidential information. For example, if two nodes having the access to confidential information wish to exchange that information but do not have the direct link due to severe fading and shadowing, they might require to take the help from an intermediate node that does not have the privilege to access the confidential information.
IB Related Work
In [14], authors show that the cooperation by an untrusted relay can be beneficial and can achieve higher secrecy rate than just treating the untrusted relay as a pure eavesdropper. In [19], authors investigate the secure communication in untrusted twoway relay systems with the help of external friendly jammers and show that, though it is possible to achieve a nonzero secrecy rate without the friendly jammers, the secrecy rate at both sources can effectively be improved with the help from an external friendly jammer. In [20], authors have focused on improving the energy efficiency while achieving the minimum secrecy rate for the untrusted twoway relay. The works in [14, 15, 16, 17, 18, 19, 20] assume that the relay is a conventional node and has a stable power supply. As to energy harvesting untrusted relaying, the works in [21, 22, 23] analyze the effect of untrusted energy harvesting oneway relay on the secure communication between two legitimate nodes. To the best of our knowledge, for energy harvesting twoway untrusted relay, the problem of achieving the secure communication has not been yet studied in the literature.
IC Contributions
The contributions and main results of this paper are as follows:

First, assuming the perfect channel state information (CSI) at source nodes, we extend the notion of secure communication via an untrusted relay for the twoway wirelesspowered relay, as shown in Fig. 1. To discourage the eavesdropping intentions of the relay, a friendly jammer sends a jamming signal during relay’s reception of signals from source nodes.

To harvest energy, the relay uses a part of the received RF signals which consist of two sources’ transmissions and the jamming signal. Hence we utilize the jamming signal effectively as a source of extra energy in addition to its original purpose of degrading relay’s eavesdropping channel.

Under the total power constraint, we exploit the structure of the original optimization problem and make use of the signomial geometric programming technique [24] to jointly find the optimal power splitting ratio for energy harvesting and the optimal power allocation among sources and the jammer that maximize the sumsecrecy rate for two source nodes.

Finally, with the imperfect CSI at source nodes, we study the joint effects of the energy harvesting nature of an untrusted relay and channel estimation errors on the sumsecrecy rate and the power allocated to the jammer. We particularly focus on the role of jammer in achieving the secure communication, where we show that the power allocated to the jammer decreases as the estimation error on any of the channels increases, in order to subside the detrimental effects of the imperfect cancellation of the jamming signal at source nodes.
Ii Secure Communication with Perfect CSI
Iia System Model
Fig. 1 shows the communication protocol between two legitimate source nodes and —lacking the direct link between them—via an untrusted twoway relay . All nodes are halfduplex and have a single antenna [19]. To discourage eavesdropping by the relay, a friendly jammer sends the jamming signal during relay’s reception of sources’ signals. The communication of a secret message between and happens over two slots of equal duration . In the first slot, the nodes and jointly send their information to the relay with powers and , respectively, and the jammer sends the jamming signal with power . The powers , , and are restricted by the power budget such that . This constraint may arise, for instance, when the sources and the jammer belong to the same network, and the network has a limited power budget to cater transmission requirements of sources and the jammer. The relay uses a part of the received power to harvest energy. In the second slot, using the harvested energy, the relay broadcasts the received signal in an amplifyandforward manner.
Let , , and denote the channel coefficients of the reciprocal channels from the relay to , , and jammer , respectively. In this section, we assume that both sources have the perfect CSI for all channels, which can be obtained from the classical channel training, estimation, and feedback from the relay. But if there are errors in the estimation and/or feedback, the sources will have imperfect CSI, which is the focus of Section III. Hence the relay is basically trusted when it comes to providing the services like feeding CSI back to transmitters and forwarding the information but untrusted in the sense that it is not supposed to decode the confidential information that is being relayed [20]. Both sources have the perfect knowledge of the jamming signal [19].^{2}^{2}2Jammer can use pseudorandom codes as the jamming signals that are known to both sources beforehand but not to the untrusted relay.
IiB RF Energy Harvesting at Relay
The relay is an energystarved node. It harvests energy from incoming RF signals which include information signals from nodes and and the jamming signal from the jammer. To harvest energy from received RF signals, the relay uses power splitting (PS) policy [4]. In PS policy, the relay uses a fraction of the total received power for energy harvesting. Under PS policy, the energy harvested by the relay is^{3}^{3}3For the exposition, we assume that the incident power on the energy harvesting circuitry of the relay is sufficient to activate it.
(1) 
where is the energy conversion efficiency factor with . The transmit power of the relay in the second slot is
(2) 
IiC Information Processing and Relaying Protocol
In the first slot, the relay receives the signal
(3) 
where and are the messages of and , respectively, with . Also is the artificial noise by the jammer with , and is the additive white Gaussian noise (AWGN) at relay with mean zero and variance . Using the received signal , the relay may attempt to decode the confidential messages and . To shield the confidential messages and from relay’s eavesdropping, we assume that the physical layer security coding like stochastic encoding and nested code structure can be used (see [20] and [25]). The relay can decode one of the sources’ confidential messages, i.e., either or , if its rate is such that it can be decoded by considering other source’s message as noise [26]. In this case, at relay, the signaltonoise ratio (SNR) corresponding to , i.e., the message intended for , is given by
(4) 
where . Accordingly the achievable throughput of link is . In (4), the term , corresponding to ’s message for indirectly serves as an artificial noise for the relay in addition to the signal from the jammer. Similarly, the SNR corresponding to , i.e., the message intended for , is given by
(5) 
where serves as an artificial noise for the relay. Thus the achievable throughput of link is . Let , where . It follows that
(6) 
The relay amplifies the received signal given by (3) by a factor based on its harvested power . Accordingly,
(7) 
The received signal at in the second slot is given by
(8) 
where is AWGN with power . We assume that and know beforehand. Hence after cancelling the terms that are known to , i.e., the terms corresponding to and , the resultant received signal at is
(9) 
The perfect CSI allows to cancel unwanted components of the signal. Substituting from (IIC) in (9), we can express the SNR at node as
(10) 
and the corresponding achievable throughput of link is . Similarly the received signal at is
(11) 
The SNR at node is
(12) 
and the corresponding achievable throughput of link is .
IiD Secrecy Rate and Problem Formulation
For the communication via twoway untrusted relay, the sumsecrecy rate is given by
(13) 
where Given the total power budget , we have a constraint on transmit powers, i.e., . To maximize the sumsecrecy rate, we optimally allocate powers , , and to , , and , respectively, and find the optimal power splitting ratio . We can formulate the optimization problem as
(14) 
Based on the nonnegativeness of two terms in the secrecy rate expression given by (IID), we need to investigate four cases. We calculate the sumsecrecy rate in all four cases, with the best case being the one that gives the maximum sumsecrecy rate.
Case I: and
Substituting and simplifying the problem in (14), it follows that
(15a)  
(15b)  
(15c)  
(15d)  
(15e) 
where
and
We can drop the logarithm from the objective (15a) as it retains the monotonicity and yields the same optimal solution. We introduce an auxiliary variable and do the following transformation.
(16a)  
(16b)  
(16c)  
(16d)  
(16e)  
(16f) 
The above transformation is valid for because, to minimize the objective , we need to maximize , and it happens when . Hence under the optimal condition, we have , and the problems (14) and (16) are equivalent. Further we can replace the constraint (15c) by
(17) 
The substitution of (15c) by (17) in problem (16) yields an equivalent problem because under the optimal condition, i.e., if , we can always increase the value of so that . The increase in leads to more harvested energy, which in turn increases the transmit power of the relay and the sumsecrecy rate.
The objective (16a) is a posynomial function and (16c), (16d), and (16e) are posynomial constraints [24]. When the objective and constraints are of posynomial form, the problem can be transformed into a Geometric Programming (GP) form and converted into a convex problem [24]. Also, as the domain of GP problem includes only real positive variables, the constraint (16f) is implicit. But the constraint (16b) is not posynomial as it contains a posynomial function which is bounded from below and GP cannot handle such constraints. We can solve this problem if the righthand side of (16b), i.e., , can be approximated by a monomial. Then the problem (16) reduces to a class of problems that can be solved by Signomial Geometric Programming (SGP) [24].
To find a monomial approximation of the form of a function where is the vector containing all variables, it would suffice if we find an affine approximation of with th element of given by [24]. Let the affine approximation of be . Using Taylor’s approximation of around the point in the feasible region and equating it with , it follows that
(18) 
for . From (18), we have , i.e.,
and
where is an th element of . We substitute the monomial approximation of in (16b) and use GP technique to solve (16). The aforementioned affine approximation is, however, imprecise if the optimal solution lies far from the initial guess as the Taylor’s approximation would be inaccurate. To overcome this problem, we take an iterative approach, where, if the current guess is , we obtain the Taylor’s approximation about and solve a GP again. Let the current solution of GP be . In the next iteration, we take Taylor’s approximation around and solve a GP again. We keep iterating in this fashion until the convergence. Since the problem (16) is close to GP (as we have only one constraint in (16) that is not a posynomial), the aforementioned iterative approach works well in our case and yields the optimal solution [24]. If the obtained optimal solution contradicts with our initial assumption that and , we move to other three cases discussed below.
Case II: and
In this case, the secrecy rate is given by , and we need to solve the problem (16) with the following expressions for and :
We again check if the assumption and is valid; if not, we move to the remaining two cases.
Case III: and
This case is similar to Case II, and only the subscripts 1 and 2 need to be interchanged in the expressions of and . If the solution obtained does not satisfy the initial assumptions, we move to Case IV.
Case IV: and
In this case, the sumsecrecy rate is zero.
Iii Secure Communication with Imperfect CSI
We now investigate the effect of imperfect CSI on sumsecrecy rate. We model the imperfection in channel knowledge as in [27], where the channel coefficients are given as
(19) 
for . Here is the estimated channel coefficient and is the error in estimation which is bounded as . is the maximum possible error in estimating with respect to and . We consider the worst case scenario where the relay knows all channel coefficients perfectly, while legitimate nodes and concede estimation errors according to (19). In this case, SNRs at the relay corresponding to the messages and remain the same as in (6). The signal received at in the second slot is
(20) 
where , , and are the channel coefficients estimated by node . Using these imperfect channel estimates, the node tries to cancel the selfinterference and the known jammer’s signal in the following manner:
(21) 
It follows that
As (21) shows, due to the imperfect CSI, cannot cancel the jamming signal and the selfinterference completely. Here we ignore the smaller terms of the form as they will be negligible compared to other terms. The received SNR at is thus given by (22) at the top of the next page.
(22) 
Using the triangle inequality, it follows that
The worst case secrecy rate will occur when
and this will happen when the phase of and are the same and concedes maximum error, i.e., . Then the worst case SNR (denoted by SNR) at node is given by (23) at the top of the next page.
(23) 
Similarly the worst case SNR (denoted by SNR) at is given by (24) at the top of the next page. In (24), we again denote estimated channels by , , and for brevity, but these values may be different from those estimated by .
(24) 
Using these worst case SNRs, we maximize the worst case sumsecrecy rate and solve for the corresponding optimal power allocation and using SGP as done for problem in (16), i.e., for the case of perfect CSI.
Iv Numerical Results and Discussions
Iva Effect of Power Splitting Ratio
Fig. 2 shows the sumsecrecy rate (left yaxis) and the harvested energy (right yaxis) versus the total power budget for a random channel realization: , and . We set and . Higher (= 0.85) than the optimal (the solution of the problem (16)) results in higher harvested energy, which increases relay’s transmit power, but the reduced strength of the received information signal at the relay (thus at nodes and ) due to higher dominates the secrecy performance of the system. A lower (= 0.15) ensures more power for the information processing at relay, but this reduces the harvested energy (reducing its transmit power to forward the information) and increases the chances of relay eavesdropping the secret message. As a result, the sumsecrecy rate reduces.
IvB Effect of Power Allocation
For different values of maximum channel estimation errors, Fig. 3 compares the sumsecrecy rate when the total power is allocated optimally (obtained by solving the problem (16)) and equally among nodes , , and jammer for the same system parameters used to obtain Fig. 2. For exposition, we consider in numerical results. The case corresponds to the perfect CSI at and . Since the equal power allocation does not use channel conditions optimally, it suffers a loss in sumsecrecy rate as expected. Due to the error in channel estimation, the nodes and cannot cancel the selfinterference (information signals sent to the relay in the first slot) and the jamming signal perfectly from the received signal in the second slot. This reduces the SNR at legitimate nodes and , which further reduces the sumsecrecy rate.
IvC Effect of Imperfect CSI
Fig. 4 shows three cases based on the knowledge of channel conditions at and .^{4}^{4}4These three cases in Fig. 4 should not be confused with four cases considered in Section IID. The sumsecrecy rate in Case II is slightly better than that in Case I, because in Case II, a higher fraction of the total power is allocated to the jammer (see the right yaxis of Fig. 4) to use the perfect channel knowledge about . But this has a sideeffect: the imperfect CSI about and leads to higher interference from the jammer to and . As a result, Case II does not gain much compared to Case I in terms of the sumsecrecy rate. Under Case III, the sumsecrecy rate is the highest, because and can cancel the jamming signal more effectively as they have imperfect CSI about only one channel. When is small enough (less than 0.06 in this case), the power allocated to the jammer in Case III is higher than that in Cases I and II. This is because when is small, if we allocate the power to and instead of jammer, it increases relay’s chances of eavesdropping the information due to the increased received power, which dominates the detrimental effect incurred due to imperfect cancellation of jammer’s signal at and . But if goes beyond a threshold, the loss in the secrecy rate due to the imperfect cancellation of jammer’s interference dominates, and the system is better off by allocating more power to and and using each other’s signals to confuse the relay. Hence the power allocated to jammer in Case III is smaller than that in Cases I and II at higher . In Case III, the redistribution of the power from jammer to and with the increase in keeps the sumsecrecy rate almost the same.
V Concluding Remarks and Future Directions
In a twoway untrusted relay scenario, though the signal from one source can indirectly serve as an artificial noise to the relay while processing other source’s signal, the nonzero power allocated to the jammer implies that the assistance from an external jammer can still be useful to achieve a better secrecy rate. But the knowledge of two sources about channel conditions decides the contribution of the jammer in achieving the secure communication. For example, as the channel estimation error on any of the channel increases, the power allocated to the jammer decreases to subside the interference caused at the sources due to the imperfect cancellation of the jamming signal. The optimal power splitting factor balances between the energy harvesting and the information processing at relay. Hence the joint allocation of the total power and the selection of the power splitting factor are necessary to maximize the sumsecrecy rate.
Future directions: There are several interesting future directions that are worth investigating. First the proposed model can be extended to general setups such as multiple antennas at nodes and multiple relays. Another interesting future direction is to investigate the effect of the placement of the jammer and the relay, which also incorporates the effect of path loss. Third we have considered the bounded uncertainty model to characterize the imperfect CSI. Extension to other models of imperfect CSI such as the model where only channel statistics are known is also possible.
References
 [1] B. Rankov and A. Wittneben, “Achievable rate regions for the twoway relay channel,” in Proc. 2006 IEEE ISIT, pp. 1668–1672.
 [2] M. Chen and A. Yener, “Multiuser twoway relaying: detection and interference management strategies,” IEEE Trans. Wireless Commun., vol. 8, no. 8, pp. 4296–4305, Aug. 2009.
 [3] L. Varshney, “Transporting information and energy simultaneously,” in Proc. 2008 IEEE ISIT, pp. 1612–1616.
 [4] X. Zhou, R. Zhang, and C. K. Ho, “Wireless information and power transfer: Architecture design and rateenergy tradeoff,” IEEE Trans. Commun., vol. 61, no. 11, pp. 4754–4767, Nov. 2013.
 [5] A. A. Nasir, X. Zhou, S. Durrani, and R. A. Kennedy, “Relaying protocols for wireless energy harvesting and information processing,” IEEE Trans. Wireless Commun., vol. 12, no. 7, pp. 3622–3636, July 2013.
 [6] H. Chen, Y. Jiang, Y. Li, Y. Ma, and B. Vucetic, “A gametheoretical model for wireless information and power transfer in relay interference channels,” in Proc. 2014 IEEE ISIT, pp. 1161–1165.
 [7] S. S. Kalamkar and A. Banerjee, “Interferenceaided energy harvesting: Cognitive relaying with multiple primary transceivers,” IEEE Trans. Cogn. Commun. Netw., accepted for publication.
 [8] Z. Chen, B. Xia, and H. Liu, “Wireless information and power transfer in twoway amplifyandforward relaying channels,” in Proc. 2014 IEEE GLOBALSIP, pp. 168–172.
 [9] Y. Liu, L. Wang, M. Elkashlan, T. Q. Duong, and A. Nallanathan, “Twoway relaying networks with wireless power transfer: Policies design and throughput analysis,” in Proc. 2014 IEEE GLOBECOM, pp. 4030–4035.
 [10] A. D. Wyner, “The wiretap channel,” Bell Syst. Tech. J., vol. 54, no. 8, pp. 1355–1387, Jul. 1975.
 [11] Q. Li, Q. Zhang, and J. Qin, “Secure relay beamforming for simultaneous wireless information and power transfer in nonregenerative relay networks,” IEEE Trans. Veh. Technol., vol. 63, no. 5, pp. 2462–2467, June 2014.
 [12] H. Xing, Z. Chu, Z. Ding, and A. Nallanathan, “Harvestandjam: Improving security for wireless energy harvesting cooperative networks,” in Proc. 2014 IEEE GLOBECOM, pp. 3145–3150.
 [13] X. Chen, J. Chen, H. Zhang, Y. Zhang, and C. Yuen, “On secrecy performance of a multiantenna jammer aided secure communications with imperfect CSI,” IEEE Trans. Veh. Technol., vol. 65, no. 10, pp. 8014–8024, Oct. 2016.
 [14] X. He and A. Yener, “Cooperation with an untrusted relay: A secrecy perspective,” IEEE Trans. Inf. Theory, vol. 56, no. 8, pp. 3807–3827, Aug. 2010.
 [15] J. Huang, A. Mukherjee, and A. L. Swindlehurst, “Secure communication via an untrusted nonregenerative relay in fading channels,” IEEE Trans. Signal Process., vol. 61, no. 10, pp. 2536–2550, May 2013.
 [16] L. Wang, M. Elkashlan, J. Huang, N. H. Tran, and T. Q. Duong, “Secure transmission with optimal power allocation in untrusted relay networks,” IEEE Wireless Commun. Lett., vol. 3, no. 3, pp. 289–292, June 2014.
 [17] L. Sun, P. Ren, Q. Du, Y. Wang, and Z. Gao, “Securityaware relaying scheme for cooperative networks with untrusted relay nodes,” IEEE Commun. Lett., vol. 19, no. 3, pp. 463–466, Mar. 2015.
 [18] K.H. Park and M.S. Alouini, “Secure amplifyandforward untrusted relaying networks using cooperative jamming and zeroforcing cancelation,” in Proc. 2015 IEEE PIMRC, pp. 234–238.
 [19] R. Zhang, L. Song, Z. Han, and B. Jiao, “Physical layer security for twoway untrusted relaying with friendly jammers,” IEEE Trans. Veh. Technol., vol. 61, no. 8, pp. 3693–3704, Oct. 2012.
 [20] D. Wang, B. Bai, W. Chen, and Z. Han, “Secure green communication via untrusted twoway relaying: A physical layer approach,” IEEE Trans. Commun., vol. 64, no. 5, pp. 1861–1874, May 2016.
 [21] S. S. Kalamkar and A. Banerjee, “Secure communication via a wireless energy harvesting untrusted relay,” IEEE Trans. Vech. Technol., vol. 66, no. 3, pp. 2199–2213, Mar. 2017.
 [22] M. Zhao, S. Feng, X. Wang, M. Zhang, Y. Liu, and H. Fu, “Joint power splitting and secure beamforming design in the wirelesspowered untrusted relay networks,” in Proc. 2015 IEEE GLOBECOM, pp. 1–6.
 [23] D. J. Su, S. A. Mousavifar, and C. Leung, “Secrecy capacity and wireless energy harvesting in amplifyandforward relay networks,” in Proc. 2015 IEEE PACRIM, pp. 258–262.
 [24] S. Boyd, S.J. Kim, L. Vandenberghe, and A. Hassibi, “A tutorial on geometric programming,” Optimization and Engineering, vol. 8, no. 1, pp. 67–127, 2007.
 [25] M. Hayashi and R. Matsumoto, “Construction of wiretap codes from ordinary channel codes,” in Proc. 2010 IEEE ISIT, pp. 2538–2542.
 [26] E. Tekin and A. Yener, “The general Gaussian multipleaccess and twoway wiretap channels: Achievable rates and cooperative jamming,” IEEE Trans. Inf. Theory, vol. 54, no. 6, pp. 2735–2751, June 2008.
 [27] Z. Xiang and M. Tao, “Robust beamforming for wireless information and power transmission,” IEEE Wireless Commun. Lett., vol. 1, no. 4, pp. 372–375, Aug. 2012.