arXiv:1708.07989v1 [] 26 Aug 2017

On Secure Communication using RF Energy
Harvesting Two-Way Untrusted Relay
Vipul Gupta

Sanket S. Kalamkar

Adrish Banerjee

Dept. of EECS
University of California, Berkeley, CA, USA
E-mail: vipul gupta@berkeley.edu

Dept. of EE
University of Notre Dame, IN, USA
E-mail: skalamka@nd.edu

Dept. of EE
IIT Kanpur, India
E-mail: adrish@iitk.ac.in

Abstract—We focus on a scenario where two wireless source
nodes wish to exchange confidential information via an RF energy
harvesting untrusted two-way 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 sum-secrecy 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 sum-secrecy 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.
Index Terms—Energy harvesting, imperfect channel state information, physical layer security, two-way relay, untrusted relay

I. I NTRODUCTION
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 two-way relay has received attention in
the past few years due to its ability to make communications
more spectral efficient [1], [2]. In a two-way relay-assisted
communication, the relay receives the information from two
nodes simultaneously, which it broadcasts in the next slot.
A. Motivation
To improve the energy efficiency, harvesting energy from
the surrounding environment has become a promising approach, which can prolong the lifetime of energy-constrained
nodes and avoid frequent recharging and replacement of
batteries. In [3] and [4], authors have proposed the concept
of energy harvesting using radio-frequency (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]–[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 two-way 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
upper-layer 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]–
[13] investigate relay-assisted 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]–[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
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.
B. 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
two-way 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
1 In this case, the decode-and-forward relay is no longer suitable to forward
the confidential information.

II. S ECURE C OMMUNICATION

Jammer J
Source S 2

Source S1

h2
Relay R
First Slot

Second Slot

Fig. 1. Secure communication via an untrusted energy harvesting two-way
relay. hi with i ∈ {1, 2, J} denotes a channel coefficient.

the minimum secrecy rate for the untrusted two-way relay.
The works in [14]–[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]–[23] analyze the effect
of untrusted energy harvesting one-way relay on the secure
communication between two legitimate nodes. To the best of
our knowledge, for energy harvesting two-way untrusted relay,
the problem of achieving the secure communication has not
been yet studied in the literature.
C. Contributions
The contributions and main results of this paper are as
follows:
•

•

•

•

P ERFECT CSI

A. System Model

hJ
h1

WITH

First, assuming the perfect channel state information
(CSI) at source nodes, we extend the notion of secure
communication via an untrusted relay for the two-way
wireless-powered 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 sum-secrecy
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.

Fig. 1 shows the communication protocol between two
legitimate source nodes S1 and S2 —lacking the direct link
between them—via an untrusted two-way relay R. All nodes
are half-duplex and have a single antenna [19]. To discourage
eavesdropping by the relay, a friendly jammer J sends the
jamming signal during relay’s reception of sources’ signals.
The communication of a secret message between S1 and S2
happens over two slots of equal duration T /2. In the first
slot, the nodes S1 and S2 jointly send their information to the
relay with powers P1 and P2 , respectively, and the jammer
J sends the jamming signal with power PJ . The powers
P1 , P2 , and PJ are restricted by the power budget P such
that P1 + P2 + PJ ≤ P . 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 amplify-and-forward manner.
Let h1 , h2 , and hJ denote the channel coefficients of the
reciprocal channels from the relay to S1 , S2 , and jammer
J, 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
B. RF Energy Harvesting at Relay
The relay is an energy-starved node. It harvests energy from
incoming RF signals which include information signals from
nodes S1 and S2 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 is3

EH = βη P1 |h1 |2 + P2 |h2 |2 + PJ |hJ |2 (T /2), (1)

where η is the energy conversion efficiency factor with 0 <
η < 1. The transmit power of the relay in the second slot is
PH =


EH
= βη P1 |h1 |2 + P2 |h2 |2 + PJ |hJ |2 .
T /2

(2)

2 Jammer can use pseudo-random codes as the jamming signals that are
known to both sources beforehand but not to the untrusted relay.
3 For the exposition, we assume that the incident power on the energy
harvesting circuitry of the relay is sufficient to activate it.

C. Information Processing and Relaying Protocol
In the first slot, the relay receives the signal
p
p
p
p
yR = (1 − β)( P1 h1 x1 + P2 h2 x2 + PJ hJ xJ ) + nR ,
(3)
where x1 and x2 are the messages of S1 and S2 , respectively,
with E[|x1 |2 ] = E[|x1 |2 ] = 1. Also xJ is the artificial
noise by the jammer with E[|xJ |2 ] = 1, and nR is the
additive white Gaussian noise (AWGN) at relay with mean
zero and variance N0 . Using the received signal yR , the relay
may attempt to decode the confidential messages x1 and x2 .
To shield the confidential messages x1 and x2 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 x1 or x2 , 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 signal-to-noise
ratio (SNR) corresponding to x1 , i.e., the message intended for
S2 , is given by
SNRR2

e 1 |h1 |2
βP
,
=
e 2 |h2 |2 + βP
e J |hJ |2 + N0
βP

(4)

where βe = 1 − β. Accordingly the achievable throughput
of S1 − R link is C2R = (1/2) log(1 + SNRR2 ). In (4),
e 2 |h2 |2 , corresponding to S2 ’s message for S1
the term βP
indirectly serves as an artificial noise for the relay in addition
e J |hJ |2 from the jammer. Similarly, the SNR
to the signal βP
corresponding to x2 , i.e., the message intended for S1 , is given
by
e 2 |h2 |2
βP
SNRR1 =
,
(5)
e 1 |h1 |2 + βP
e J |hJ |2 + N0
βP
e 1 |h1 |2 serves as an artificial noise for the relay.
where βP
Thus the achievable throughput of S2 − R link is C1R =
(1/2) log(1 + SNRR1 ). Let γi = Pi |hi |2 /N0 , where i ∈
{1, 2, J}. It follows that
SNRR2 =

e 2
e 1
βγ
βγ
, SNRR1 =
. (6)
e
e
e
e J +1
βγ2 + βγJ + 1
βγ1 + βγ

The relay amplifies the received signal yR given by (3) by a
factor α based on its harvested power PH . Accordingly,
s
PH
α=
2
e
e
e J |hJ |2 + N0
βP1 |h1 | + βP2 |h2 |2 + βP
s
βη(γ1 + γ2 + γJ )
=
.
(7)
e 1 + βγ
e 2 + βγ
e J +1
βγ

The received signal at S2 in the second slot is given by
y2 = h2 (αyR ) + n2 ,

(8)

where n2 is AWGN with power N0 . We assume that S1 and
S2 know xJ beforehand. Hence after cancelling the terms that

are known to S2 , i.e., the terms corresponding to x2 and xJ ,
the resultant received signal at S2 is
q
e 1 h1 x1 + h2 αnR + n2 .
(9)
y2 = h2 α βP
{z
}
|
{z
} |
desired signal

noise

The perfect CSI allows S2 to cancel unwanted components of
the signal. Substituting α from (7) in (9), we can express the
SNR at node S2 as
SNRS2 =

e 1 + γ2 + γJ )
γ1 |h2 |2 β βη(γ
,
e 1 + γ2 + γJ ) + 1
(|h2 |2 βη + β)(γ

(10)

and the corresponding achievable throughput of link R − S2
is C2S = (1/2) log(1 + SNRS2 ). Similarly the received signal
at S1 is
q
e 2 h2 x2 + h1 αnR + n1 .
(11)
y1 = h1 α βP
{z
}
|
{z
} |
desired signal

noise

The SNR at node S1 is
SNRS1 =

e 1 + γ2 + γJ )
γ2 |h1 |2 β βη(γ
,
e 1 + γ2 + γJ ) + 1
(|h1 |2 βη + β)(γ

(12)

and the corresponding achievable throughput of link R − S1
is C1S = (1/2) log(1 + SNRS1 ).
D. Secrecy Rate and Problem Formulation
For the communication via two-way untrusted relay, the
sum-secrecy rate is given by
+
+ 

CS = C1S − C1R + C2S − C2R

+
1
1
=
log2 (1 + SNRS1 ) − log2 (1 + SNRR1 )
2
2
+

1
1
log2 (1 + SNRS2 ) − log2 (1 + SNRR2 ) , (13)
+
2
2
where [x]+ , max(x, 0). Given the total power budget P , we
have a constraint on transmit powers, i.e., P1 + P2 + PJ ≤
P . To maximize the sum-secrecy rate, we optimally allocate
powers P1 , P2 , and PJ to S1 , S2 , and J, respectively, and
find the optimal power splitting ratio β. We can formulate the
optimization problem as
maximize

CS

subject to

P1 + P2 + PJ ≤ P,
β + βe = 1,

e 1 ,P2 ,PJ
β,β,P

β, βe ≤ 1,
e P1 , P2 , PJ ≥ 0.
β, β,

(14)

Based on the non-negativeness of two terms in the secrecy rate
expression given by (13), we need to investigate four cases.
We calculate the sum-secrecy rate in all four cases, with the
best case being the one that gives the maximum sum-secrecy
rate.

Case I: C1S − C1R ≥ 0 and C2S − C2R ≥ 0
2

Substituting γi = Pi |hi | /N0 and simplifying the problem
in (14), it follows that
minimize

e 1 ,P2 ,PJ
β,β,P

subject to

where

e γ1 , γ2 , γJ )
f (β, β,
1
log2
e γ1 , γ2 , γJ )
2
g(β, β,
γ1 N 0
γ2 N 0
γJ N 0
+
+
≤ P,
|h1 |2
|h2 |2
|hJ |2
β + βe = 1,
β, βe ≤ 1,
e P1 , P2 , PJ ≥ 0,
β, β,

(15a)
(15b)
(15c)
(15d)
(15e)

e γ1 , γ2 , γJ ) = [β(γ
e 1 + γ2 + γJ ) + 1]2
f (β, β,
and

e
× [1 + (γ1 + γ2 + γJ )(|h2 |2 βη + β)]
e
× [1 + (γ1 + γ2 + γJ )(|h1 |2 βη + β)],

e γ1 , γ2 , γJ ) = (β(γ
e 2 + γJ ) + 1)(β(γ
e 1 + γJ ) + 1)
g(β, β,
e 1 + 1)) + 1]
×[(γ1 + γ2 + γJ )(βe + |h2 |2 βη(βγ
e 2 + 1)) + 1].
×[(γ1 + γ2 + γJ )(βe + |h1 |2 βη(βγ

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 t and do the following
transformation.
e γ1 , γ2 , γJ )
f (β, β,
minimize
(16a)
e 1 ,P2 ,PJ
t
β,β,P
e γ1 , γ2 , γJ ),
subject to t ≤ g(β, β,
(16b)
γ1 N 0
γ2 N 0
γJ N 0
+
+
≤ P,
|h1 |2
|h2 |2
|hJ |2
β + βe ≤ 1,

β, βe ≤ 1,
e P1 , P2 , PJ ≥ 0.
t, β, β,

(16c)

(16d)
(16e)
(16f)

The above transformation is valid for t > 0 because, to minie γ1 , γ2 , γJ )/t, we need to maximize
mize the objective f (β, β,
t, and it happens when t = g(β, γ1 , γ2 , γJ ). Hence under
the optimal condition, we have t = g(β, γ1 , γ2 , γJ ), and the
problems (14) and (16) are equivalent. Further we can replace
the constraint (15c) by
β + βe ≤ 1.

(17)

The substitution of (15c) by (17) in problem (16) yields an
equivalent problem because β + βe = 1 under the optimal
condition, i.e., if β + βe < 1, we can always increase the value
of β so that β + βe = 1. The increase in β leads to more
harvested energy, which in turn increases the transmit power
of the relay and the sum-secrecy 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 g which is
bounded from below and GP cannot handle such constraints.
We can solve this problem if the right-hand side of (16b), i.e.,
e γ1 , γ2 , γJ ), can be approximated by a monomial. Then
g(β, β,
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 b
g (x) =
Q
5
e γ1 , γ2 , γJ ]T is
c i=1 xai i of a function g(x) where x = [β, β,
the vector containing all variables, it would suffice if we find
an affine approximation of h(y) = log g(y) with ith element
of y given by yi = log xi [24]. Let the affine approximation
of h(y) be b
h(y) = log b
g(x) = log c + aT y. Using Taylor’s
approximation of h(y) around the point y0 in the feasible
region and equating it with b
h(y), it follows that
h(y) ≈ h(y0 ) + ∇h(y0 )T (y − y0 ) = log c + aT y,

(18)

for y ≈ y0 . From (18), we have a = ∇h(y0 ), i.e.,
ai =

xi ∂g
g(x) ∂xi

,
x=x0

and
c = exp(h(y0 ) − ∇h(y0 )T y0 ) = g(x0 )

5
Y

xa0,ii ,

i=1

where x0,i is an ith element of x0 . We substitute the monomial
approximation gb(x) of g(x) 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 x0 as the Taylor’s approximation would be
inaccurate. To overcome this problem, we take an iterative
approach, where, if the current guess is xk , we obtain the
Taylor’s approximation about xk and solve a GP again. Let the
current solution of GP be xk+1 . In the next iteration, we take
Taylor’s approximation around xk+1 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 C1S − C1R ≥ 0 and C2S − C2R ≥ 0,
we move to other three cases discussed below.
Case II: C1S − C1R ≥ 0 and C2S − C2R < 0
In this case, the secrecy rate is given by CS = (C1S −C1R )+ ,
and we need to solve the problem (16) with the following
e γ1 , γ2 , γJ ) and g(β, β,
e γ1 , γ2 , γJ ):
expressions for f (β, β,
e γ1 , γ2 , γJ ) = [β(γ
e 1 + γ2 + γJ ) + 1]
f (β, β,

e
× [1 + (γ1 + γ2 + γJ )(|h2 |2 βη + β)],
e γ1 , γ2 , γJ ) = (β(γ
e 2 + γJ ) + 1)
g(β, β,

e 1 + 1))].
×[1+(γ1 + γ2 + γJ )(βe + |h2 |2 βη(βγ

We again check if the assumption C1S − C1R ≥ 0 and C2S −
C2R < 0 is valid; if not, we move to the remaining two cases.

the messages x1 and x2 remain the same as in (6). The signal
received at S2 in the second slot is

Case III: C1S − C1R < 0 and C2S − C2R ≥ 0

y2 = h2 α

This case is similar to Case II, and only the subscripts
1 and 2 need to be interchanged in the expressions of
e γ1 , γ2 , γJ ) and g(β, β,
e γ1 , γ2 , γJ ). If the solution obf (β, β,
tained does not satisfy the initial assumptions, we move to
Case IV.
Case IV:

C1S

−

C1R

< 0 and

C2S

−

C2R

<0

In this case, the sum-secrecy rate is zero.
Algorithm 1 summarizes the aforementioned process of
obtaining the optimal sum-secrecy rate and power allocation
by solving (16).
Algorithm 1 Solution of (16)
Input Total power P , Channel coefficients h1 , h2 , and hJ ,
Energy conversion efficiency η, Noise power N0 , Tolerance δ
Output Power splitting ratio β, power P1 , P2 , and PJ , sumsecrecy rate CS
Initialize 0 ≤ P1,k , P2,k , PJ,k ≤ P , 0 < βk < 1 (Random
initialization) with k = 0
1) While |CS,k − CS,k−1 | > δCS,k−1
2) Find the monomial expression b
g for g using the Taylor’s
approximation around xk = [βk , γ1,k , γ2,k , γJ,k ]
3) k = k + 1
4) Solve (16) with the monomial approximation gb to find
[βk , γ1,k , γ2,k , γJ,k ]
5) Assign C1S , C1R , C2S and C2R using above solution
6) If C1S − C1R ≥ 0 and C2S − C2R ≥ 0
Go to step 1
Else
Proceed to Case II
7) Check for Cases II, III, and IV in a similar fashion
8) Find the optimal [βk , γ1,k , γ2,k , γJ,k ] for the current
iteration after going through all cases
g(β ,γ ,γ2,k ,γJ,k )
9) Assign CS,k = 12 log f (βkk ,γ1,k
1,k ,γ2,k ,γJ,k )
10) End While

III. S ECURE C OMMUNICATION

WITH I MPERFECT

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
hi = ĥi + ∆hi ,

(19)

for i ∈ {1, 2, J}. Here ĥi is the estimated channel coefficient
and ∆hi is the error in estimation which is bounded as
|∆hi | ≤ ǫi . ǫi is the maximum possible error in estimating hi
with respect to S1 and S2 . We consider the worst case scenario
where the relay knows all channel coefficients perfectly, while
legitimate nodes S1 and S2 concede estimation errors according to (19). In this case, SNRs at the relay corresponding to


q
q
e 1 h1 x1 + βP
e 2 h2 x2 + βP
e J hJ xJ + nR + n2
βP
q
q
e 1 (ĥ1 + ∆h1 )x1 + βP
e 2 (ĥ2 + ∆h2 )x2
βP
= (ĥ2 + ∆h2 )α

q
e J (ĥJ + ∆hJ )xJ ) + nR + n2 ,
(20)
+ βP
q

where ĥ1 , ĥ2 , and ĥJ are the channel coefficients estimated by
node S2 . Using these imperfect channel estimates, the node S2
tries to cancel the self-interference and the known jammer’s
signal in the following manner:
q
e 1 (ĥ1 + ∆h1 )x1
y2 = (ĥ2 + ∆h2 )α( βP
q
q
e 2 (ĥ2 + ∆h2 )x2 + βP
e J (ĥJ + ∆hJ )xJ ) + nR )
+ βP
q
q
e 2 ĥ2 x2 + βP
e J ĥJ xJ ) .
(21)
+ n2 − ĥ2 α( βP
|
{z
}
imperfect interference cancellation

It follows that
q
e 1 ĥ1 x1 + (ĥ2 + ∆h2 )αnR + n2
y2 = ĥ2 α βP
q
q
q
e 1 ĥ1 x1 + βP
e 2 ĥ2 x2 + βP
e J ĥJ xJ )
+ ∆h2 α( βP
q
q
q
e 1 ∆h1 x1 + βP
e 2 ∆h2 x2 + βP
e J ∆hJ xJ ).
+ ĥ2 α( βP

As (21) shows, due to the imperfect CSI, S2 cannot cancel the
jamming signal and the self-interference completely. Here we
ignore the smaller terms of the form ∆hi ∆hj as they will be
negligible compared to other terms. The received SNR at S2
is thus given by (22) at the top of the next page. Using the
triangle inequality, it follows that
|ĥi | − |∆hi | ≤ hi ≤ |ĥi | + |∆hi |, ∀ i ∈ {1, 2, J}.
The worst case secrecy rate will occur when
hi = |ĥi | + |∆hi | = |ĥi | + ǫi , ∀ i ∈ {1, 2, J},
and this will happen when the phase of hi and ∆hi are the
same and ∆hi concedes maximum error, i.e., |∆hi | = ǫi . Then
the worst case SNR (denoted by SNRwc
S2 ) at node S2 is given
by (23) at the top of the next page. Similarly the worst case
SNR (denoted by SNRwc
S1 ) at S1 is given by (24) at the top of
the next page. In (24), we again denote estimated channels by
ĥ1 , ĥ2 , and ĥJ for brevity, but these values may be different
from those estimated by S2 .
Using these worst case SNRs, we maximize the worst case
sum-secrecy 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. N UMERICAL R ESULTS AND D ISCUSSIONS
A. Effect of Power Splitting Ratio β
Fig. 2 shows the sum-secrecy rate (left y-axis) and the
harvested energy (right y-axis) versus the total power budget

SNRS2 =

e 1 |ĥ1 |2
|ĥ2 |2 α2 βP

2
2
2
2
2
2
2
2
e
N0 (|ĥ2 + ∆h2 |2 α2 + 1) + α2 β(|∆h
2 | (P1 |ĥ1 | + P2 |ĥ2 | + PJ |ĥJ | ) + |ĥ2 | (P1 |∆h1 | + P2 |∆h2 | + PJ |∆hJ | ))
(22)

SNRwc
S2 =

SNRwc
S1 =

e 1 |ĥ1 |2
|ĥ2 |2 α2 βP

.

(23)

e 2 |ĥ2 |2
|ĥ1 |2 α2 βP

.

(24)

e ĥ2 |2 (P1 ǫ2 + P2 ǫ2 + PJ ǫ2 )
e 2 (P1 |ĥ1 |2 + P2 |ĥ2 |2 + PJ |ĥJ |2 ) + α2 β|
N0 ((|ĥ2 | + ǫ2 )2 α2 + 1) + α2 βǫ
1
2
2
J
e ĥ1 |2 (P1 ǫ2 + P2 ǫ2 + PJ ǫ2 )
e 2 (P1 |ĥ1 |2 + P2 |ĥ2 |2 + PJ |ĥJ |2 ) + α2 β|
N0 ((|ĥ1 | + ǫ1 )2 α2 + 1) + α2 βǫ
2
1
1
J

Sum secrecy rate
400
5

300

Harvested energy

200
100

Sum secrecy rate (bits/s/Hz)

500

Power allocated to jammer

Harvested energy (J)

Sum secrecy rate (bits/s/Hz)

600

Optimal β
β = 0.15
β = 0.85

22

20
5

Sum secrecy rate
18
Case I: Imperfect h1, h2 and hJ
Case II: Imperfect h1 and h2

16

Case III: Imperfect h

Power allocated to jammer (dB)

10

10

J

0

5

10

15

20

0
30

25

0

0

0.02

0.04

Fig. 2. Effect of β on harvested energy at relay and the sum-secrecy rate.

Sum secrecy rate (bits/s/Hz)

0.08

0.1

Fig. 4. Effect of ǫ on sum-secrecy rate and and power PJ allocated to the
jammer, |h21 | = 1.2479, |h2 |2 = 1.4484, and |hJ |2 = 6.0162, P = 30 dB.

B. Effect of Power Allocation

8
Optimal Power Allocation
Equal Power Allocation

7
6

ε=0

5
4
3

2.5

2

2

1

1.5

0
10

0.06

ε

Total power (dB)

ε = 0.05

ε = 0.1
14

15
15

16
20

25

30

Total power (dB)

Fig. 3. Effect of power allocation on sum-secrecy rate.

for a random channel realization: |h1 |2 = 0.6647, |h2|2 =
2.9152, and |hJ |2 = 1.3289. We set η = 0.5 and N0 = 1.
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 S1
and S2 ) 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 sum-secrecy rate reduces.

For different values of maximum channel estimation errors,
Fig. 3 compares the sum-secrecy rate when the total power
is allocated optimally (obtained by solving the problem (16))
and equally among nodes S1 , S2 , and jammer J for the same
system parameters used to obtain Fig. 2. For exposition, we
consider ǫ1 = ǫ2 = ǫJ = ǫ in numerical results. The case
ǫ = 0 corresponds to the perfect CSI at S1 and S2 . Since
the equal power allocation does not use channel conditions
optimally, it suffers a loss in sum-secrecy rate as expected.
Due to the error in channel estimation, the nodes S1 and S2
cannot cancel the self-interference (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 S1 and S2 , which further reduces the
sum-secrecy rate.
C. Effect of Imperfect CSI
Fig. 4 shows three cases based on the knowledge of channel
conditions at S1 and S2 .4 The sum-secrecy 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 y-axis of Fig. 4) to use the perfect channel
knowledge about hJ . But this has a side-effect: the imperfect
CSI about h1 and h2 leads to higher interference from the
4 These three cases in Fig. 4 should not be confused with four cases
considered in Section II-D.

.

jammer to S1 and S2 . As a result, Case II does not gain much
compared to Case I in terms of the sum-secrecy rate. Under
Case III, the sum-secrecy rate is the highest, because S1 and
S2 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
S1 and S2 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 S1 and S2 . 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 S1 and
S2 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 S1 and S2 with the increase in ǫ
keeps the sum-secrecy rate almost the same.
V. C ONCLUDING R EMARKS

AND

F UTURE D IRECTIONS

In a two-way 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
sum-secrecy 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.
R EFERENCES
[1] B. Rankov and A. Wittneben, “Achievable rate regions for the two-way
relay channel,” in Proc. 2006 IEEE ISIT, pp. 1668–1672.
[2] M. Chen and A. Yener, “Multiuser two-way 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 rate-energy 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 game-theoretical
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, “Interference-aided 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 two-way amplify-and-forward 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 wire-tap 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, “Harvest-and-jam:
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 multi-antenna 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 non-regenerative 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, “Security-aware 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 amplify-and-forward untrusted
relaying networks using cooperative jamming and zero-forcing cancelation,” in Proc. 2015 IEEE PIMRC, pp. 234–238.
[19] R. Zhang, L. Song, Z. Han, and B. Jiao, “Physical layer security for
two-way 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 two-way 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 wireless-powered
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 amplify-and-forward 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 multiple-access 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.

