Optimal Power Allocation by Imperfect Hardware Analysis in Untrusted Relaying Networks

By taking a variety of realistic hardware imperfections into consideration, we propose an optimal power allocation (OPA) strategy to maximize the instantaneous secrecy rate of a cooperative wireless network comprised of a source, a destination, and an untrusted amplify-and-forward relay. We assume that either the source or the destination is equipped with a large-scale multiple antennas’ system, while the rest are equipped with a single antenna. To prevent the untrusted relay from intercepting the source message, the destination sends an intended jamming noise to the relay, which is referred to as destination-based cooperative jamming. Given this system model, novel closed-form expressions are presented in the high signal-to-noise ratio regime for the ergodic secrecy rate and the secrecy outage probability. We further improve the secrecy performance of the system by optimizing the associated hardware design. The results reveal that by beneficially distributing the tolerable hardware imperfections across the transmission and reception radio-frequency front ends of each node, the system’s secrecy rate may be improved. The engineering insight is that equally sharing the total imperfections at the relay between the transmitter and the receiver provides the best secrecy performance. Numerical results illustrate that the proposed OPA together with the most appropriate hardware design significantly increases the secrecy rate.


Index Terms
Physical layer security, Untrusted relay, Hardware imperfections, Optimal power allocation, Hardware design

I. INTRODUCTION
Security in wireless communication networks is conventionally implemented above the physical layer using key based cryptography [1].To complement these highly complex schemes, wireless transmitters can also be validated at the physical layer by exploiting the dynamic characteristics of the associated communication links [2], [3].Physical layer security (PLS) is a promising paradigm for safeguarding fifth-generation (5G) wireless communication networks without incurring additional security overhead [3].
Massive multiple-input multiple-output (MIMO) systems as a key enabling technology of 5G wireless communication networks provide significant performance gains in terms of spectral efficiency and energy efficiency [4], [5].This new technology employs coherent processing across arrays of hundreds or even thousands of base station (BS) antennas and supports tens or hundreds of mobile terminals [4]- [6].As an additional advantage, massive MIMO is inherently more secure than traditional MIMO systems, as the large-scale antenna array exploited at the transmitter can precisely aim a narrow and directional information beam towards the intended receiver, such that the received signal-to-noise ratio (SNR) is several orders of magnitude higher than that at any incoherent passive eavesdropper [7].However, these security benefits are severely hampered in cooperative networks where the intended receivers may also be potential eavesdroppers [8]- [10].
In the context of PLS, cooperative jamming which involves the transmission of additional jamming signals to degrade the received SNR at the potential eavesdropper can be applied by source [9], [10], the intended receiver node [8] or a set of nodes, i.e., source and destination or source and relay to beamform the jamming noise orthogonal to the spatial dimension of the desired signal [11], [12].Recently, several works have considered the more interesting scenario of untrusted relaying [13]- [21] where the cooperative jamming is performed by the intended receiver, which is referred to as destination-based cooperative jamming (DBCJ).
In real life, an untrusted, i.e., honest-but-curious, relay may collaborate to provide a reliable communication.Several practical scenarios may include untrusted relay nodes, e.g., in ultra-dense heterogenous wireless networks where low-cost intermediate nodes may be used to assist the source-destination transmission.In these networks, it is important to protect the confidentiality of information from the untrustworthy relay, while concurrently relying on it to increase the reliability of communication.Thanks to the DBCJ strategy [8], positive secrecy rate can still be attained in untrusted relay networks.In recent years, several works have focused on the performance analysis [13]- [16], power allocation [17]- [20] and security enhancement [18], [21] of untrusted relaying networks.To be specific, the authors in [17] proposed an optimal power allocation (OPA) strategy to maximize the instantaneous secrecy rate of one-way relaying network while two-way relaying scenario was considered in [18].By exploiting the direct link, a sourcebased artificial noise injection scheme was proposed in [19] to hinder the untrusted relay from intercepting the confidential message.A power allocation strategy was also proposed in [19] to optimally determine the information and jamming signal powers transmitted by the source.In [20], the OPA problem with imperfect channel state information was investigated.Notably, all the aforementioned works considered perfect hardware in the communication network.
In practice, hardware equipments experience detrimental impacts of phase noise, I/Q imbalance, amplifier non-linearities, quantization errors, converters, mixers, filters and oscillators [22], [23].Each of the imperfections distorts the signals in its own way.While hardware imperfections are unavoidable, the severity of the imperfections depends on the quality of the hardware used in the radio-frequency (RF) transceivers.The non-ideal behavior of each component can be modeled in detail for the purpose of designing compensation algorithms, but even after compensation there remain residual transceiver imperfections [23].This problem is more challenging especially in high rate systems such as LTE-Advanced and 5G networks exploiting inexpensive equipments [22].Although most contributions in security based wireless networks have assumed perfect transceiver hardware [8]- [21], or only investigated the impact of particular imperfections such as I/Q imbalance [25] or phase noise [26] in the presence of an external eavesdropper, this paper goes beyond these investigations by considering residual hardware imperfections in physical layer security design [22]- [24].
In this paper, we take into account the OPA in a two-hop amplify-and-forward (AF) untrusted relay network where all the nodes suffer from hardware imperfections and either the source or the destination is equipped with large-scale multiple antennas (LSMA) [27], [28] while the other nodes are equipped with a single antenna.The DBCJ protocol is operated in the first phase and then the destination perfectly removes the jamming signal via self interference cancelation in the second phase.For this system model, the main contributions of the paper are summarized as follows: • Inspired by [22]- [24], we first present the generalized system model for transceiver hardware imperfections in our secure transmission network.Based on this, we calculate the received instantaneous signal-to-noise-plus-distortion-ratio (SNDR) at the relay and destination.
• We formulate the OPA between the source and destination that maximizes the instantaneous secrecy rate of untrusted relaying.Accordingly, novel closed-form solutions are derived for the exact OPA.In addition, new simple solutions are derived for the OPA in the high SNR regime.
• According to our OPA solutions, novel compact expressions are derived for the ergodic secrecy rate (ESR) and secrecy outage probability (SOP) in the high signal-to-noise-ratio (SNR) regime that can be applied to arbitrary channel fading distributions.To gain further insights, new closed-form expressions are presented over Rayleigh fading channels.The asymptotic results highlight the presence of a secrecy rate ceiling which is basically different from the prefect hardware case.We highlight that this ceiling phenomenon is independent of the fading characteristic of the two hops.
• We provide new insights for hardware design in DBCJ-based secure communications.To this end, under the cost constraint of transceiver hardware at each node, we formulate the hardware design problem for the aforementioned network to maximize the secrecy rate.The results reveal that the secrecy rate can be improved by optimally distributing the level of hardware imperfections between the transmit and receive RF front ends of each node.
Notation: We use bold lower case letters to denote vectors.I N and 0 N ×1 denote the Identity matrix and the zeros matrix, respectively. ., (.) H and (.) T denote the Euclidean norm, conjugate transpose and transpose operators, respectively; E x {•} stands for the expectation over the random variable (r.v.) x; Pr(•) denotes the probability; f X (•) and F X (•) denote the probability density function (pdf) and cumulative distribution function (cdf) of the r.v.X, respectively; the CN (µ, σ 2 ) denotes a circularly symmetric complex Gaussian RV with mean µ and variance σ 2 ; diag(A) stands for the main diagonal elements of matrix A; Ei(x) is the exponential integral [34,Eq. (8.211)].[•] + = max{0, x} and max stands for the maximum value.

A. System Model
As shown in Fig. 1, the system model under consideration is a wireless network with one source (S), one destination (D) and one untrusted AF relay (R).While R is equipped with one antenna, S or D is equipped with LSMA denoted by N s or N d , respectively [29], [30].This corresponds to the downlink (DL) and uplink (UL) scenarios in a cellular system where the base station is equipped with a LSMA and the mobile user and relay are equipped with a single antenna [29].In the DL scenario, S has many antennas, whereas D has a single antenna.The opposite applies to the UL scenario.
All the nodes operate in a half-duplex mode.Accordingly, D cannot receive the transmitted signal from S while transmitting the jamming signal and hence, the direct link between S and D is unavailable.We also assume that the channels satisfy the reciprocity theorem [8].In DL transmission, the complex Gaussian channel from S to R and R to D are denoted by h sr ∼ CN (0 Ns×1 , µ sr I Ns ) and h rd ∼ CN (0, µ rd ), respectively, and for UL transmission, they are denoted by h sr ∼ CN (0, µ sr ) and h rd ∼ CN (0 N d ×1 , µ rd I N d ), respectively.We consider slow fading such that the channel coefficients vary independently from one frame to another frame and, they do not change within one frame.The additive white noise n i (i ∈ {R, D}) at each receiver is represented by a zero-mean complex Gaussian variable with variance N 0 .We define the SNRs per link as γ sr ∆ =ρ h sr 2 and γ rd ∆ =ρ h rd 2 and hence, the average SNRs per branch is given by γ sr = ρµ sr and γ rd = ρµ rd , where ρ = P N 0 represents the transmit SNR of the network.The maximum ratio transmission (MRT) beamforming and maximal ratio combining (MRC) processing are applied at the multi-antenna node to improve the overall system performance [29].Let ν = γsr γ rd represent the ratio between the source-to-relay and relay-to-destination SNRs.With LSMA, we consider ν ≫ 1 in the DL scenario while ν ≪ 1 in the UL scenario.These two special cases are taken into account in this paper.As observed in the numerical results, the analysis are satisfactory even for moderate values of ν.
The DBCJ technique is applied to degrade the received signal at the untrusted relay such that it cannot decipher the desired information.The whole transmission is performed based on a time-division multiple-access (TDMA) based protocol such that the message transmission is divided into two phases, i.e. the broadcast phase and the relaying phase.We consider a total transmit power budget for S and D of P with power allocation factor λ ∈ (0, 1) such that the transmit powers at S and D are λP and (1 − λ)P , respectively [14], [18].As such, during the first phase, while S transmits the intended signal with power λP , concurrently D jams with a Gaussian noise to confuse the untrusted relay with power (1 − λ)P .For simplicity, the transmit power at R is set to P and accordingly, in the second phase of transmission, R simply broadcasts the amplified version of the received signal with power of P .
In order to consider the residual transceiver imperfections (after conventional compensation algorithms have been applied) at node i, i ∈ {S, R, D}, the generalized system model from [22] is taken into account.The imperfection at transmission and reception segments denoted by η t i and η r i respectively, are introduced as distortion noises.The experimental results in [23] and many theoretical investigations in [23], [31] have verified that these distortion noises are well-modeled as Gaussian distributions due to the central limit theorem.A key property is that the variance of distortion noise at an antenna is proportional to the signal power at that antenna [23].Accordingly, for the DL scenario, we have [23] η t S ∼ CN 0, Furthermore, we have for the UL scenario.The imperfections at R of both cases are also given by where the design parameters k t i , k r i > 0 for i ∈ {S, R, D} characterize the level of imperfections in the transmitter and receiver hardware, respectively.These parameters can be interpreted as the error vector magnitudes (EVMs).EVM determines the quality of RF transceivers and is defined as the ratio of the average distortion magnitude to the average signal magnitude.Since the EVM measures the joint effect of different hardware imperfections and compensation algorithms, it can be measured directly in practice [22].3GPP LTE has EVM requirements in the range of where smaller values are needed to achieve higher spectral efficiencies [24].

Remark 1 (Co-channel Interference):
The analysis in this paper supports the scenario of large enough number of interfering signals, which is typical in wireless environments where the Gaussian assumption for the interference is valid by applying the central limit theorem [32].

B. Signal Representation
Let us denote x S and x D as the unit power information signal and the jamming signal, respectively.According to the combined impact of hardware imperfections which is well-addressed by a generalized channel model [22], the received signal at R for DL and UL scenarios can be expressed, respectively as and where w S = hsr H hsr and w D = h rd H h rd represent the MRT transmit weight vectors at S and D, respectively.Observe from ( 4) and ( 5) that the propagated distortion noises by S and D, and the self-distortion noise at R are treated as interference at the untusted relay which is a potential eavesdropper.As a result, the engineering insight is to beneficially forward these hardware imperfections to make the system secure instead of injecting more artificial noise by S [9], [10], [19], D [13]- [17], [20] or a friendly jammer [18].
Then the relay amplifies its received signal in the first phase by an amplification factor of1 where Then, the received signal at D for DL and UL scenarios after self-interference (or jamming signal) cancelation are respectively, given by and According to ( 4) and ( 5) and after some algebraic manipulations, the SNDR at R is given by where Based on ( 7) and ( 8) and after some manipulations, the SNDR at D can be calculated as where as the total imperfection level at R and D, respectively.

Remark 2 (Perfect Hardware):
The received SNRs at R and D with perfect hardware were derived in [13], [14], [17].When setting the level of imperfections at the nodes to zero, the derived SNDRs in this section reduce to the special case as follows [14] As can be seen, the mathematical structure of the derived SNDRs in ( 9), ( 10) are more complicated compared to the perfect hardware case in (11), since the terms γu γ rd and γu γ rd manifest in the denominator.As such, it is non-trivial to propose an OPA solution for the general scenario of imperfect hardware.This generalization is done in Section III and is a main contribution of this work.
For DL scenario, ( 9) and ( 10) are simplified to where and, Moreover, for UL scenario, we obtain where and Based on ( 12) and ( 14), we can conclude that although the intercept probability is reduced by increasing the imperfection at R, the secrecy rate is also degraded.
It is, therefore, of great interest to intelligently distribute the tolerable hardware imperfections across the transmission and reception radio frequency (RF) front ends of R (and other nodes) to improve the secrecy rate of the network.This hardware design approach is analyzed in Section VI and is a main contribution of this paper.

III. OPTIMAL POWER ALLOCATION
This section proceeds to analyze the optimal power allocation problem with the aim of maximizing the instantaneous secrecy rate.Extending the results in [17], [19], [20] where the OPA was solved for perfect hardware, we investigate the power allocation factor λ under the presence of hardware imperfections.To do so, the instantaneous secrecy rate is evaluated by [8] By substituting λ = 0 into ( 9), (10) and then (16), we find R s = 0. Since our goal is to distribute the power optimally between S and D, a non-negative secrecy rate is achievable.As such, the instantaneous secrecy rate can be reformulated as Given that log(•) is monotonically increasing, the maximization of R s is equivalent to the maximization of φ(λ) Therefore, the OPA factor λ ⋆ can be obtained by solving the following constrained optimization problem Based on lemma 1, we have the following corollary.
∂x | x=x 2 < 0 and there is only one maximum over [x 1 , x 2 ] (despite constant functions).
Proposition 1: φ(λ) is a quasiconcave function of λ in the feasible set 0 < λ ≤ 1 and the optimal point is given by Proof: The first-order derivative of φ(λ) on λ is given by where As can be seen from ( 22), ∂φ(λ) ∂λ = 0 leads to two solutions on λ.It is easy to examine that the feasible solution for practical values of k t i and k r i [22] are derived as (21).According to Corollary 1, we find that φ(λ) is a quasiconcave function in the feasible set.
To make the further analysis tractable, we provide new compact expressions for the OPA in the high SNR regime.In the case of DL, the expressions in (13) are simplified to and in the case of UL scenario, the expressions in (15) are changed to By substituting ( 23) and ( 24) into ( 21), the OPA solutions in the high SNR regime can be expressed in the following tractable forms where

IV. ERGODIC SECRECY RATE
In this section, we derive the ESR of the proposed secure transmission scheme in each case of DL and UL scenarios.Since it is not straightforward to obtain a closed-form expression for the exact ESR of DL and UL scenarios (the exact ESR includes double integral expressions due to the complicated structures of ( 21)), we therefore proceed by first deriving new analytical expressions for the ESR in the high SNR regime that can be applied to arbitrary channel fading distributions.Based on these, new closed-form expressions are derived for the ESR in Rayleigh fading channels.Despite prior works in the literature [14], [16]- [21] that investigated the ESR based on perfect hardware assumption in various untrusted relaying networks, we take into account hardware imperfections.The new results in this section generalize the recent results in [14], [17].
The ESR as a useful secrecy metric representing the rate below which any average secure transmission rate is achievable [2].As such, the ESR is given by In the following, we proceed to evaluate the parts T 1 and T 2 and then R s for each case of DL and UL scenarios.Towards this goal, we present the following useful lemma.
Lemma 2: For positive constants α 1 , α 2 and α 3 , and non-negative r.v.Γ, the cdf of the new r.v.Γ = α 1 Γ α 2 Γ+α 3 is derived as Proof: We start from the definition of the cdf as follows where the last probability equals to one for α 1 − α 2 x < 0. Otherwise, it equals to 1) Downlink Scenario: By plugging (25) into (12), we obtain We find that all the terms in ( 29) and ( 30) are deterministic constants which leads to the secrecy rate ceiling in the high SNR regime.
Based on lemma 2 and (30), the part T 1 in ( 26) is given by where the last equation follows from the integration by parts.The expression in ( 31) is straightforwardly evaluated for any channel fading distribution, either directly or by a simple numerical integration.
Furthermore, based on (30) the part T 2 is a constant value as We conclude from (32) that the amount of information leakage is independent of the transmit SNR and the position of the relay, and only depends on the EVMs at network nodes.By replacing (31) and ( 32) into (26), the compact ESR expression is achieved for any channel distribution.
For the case of Rayleigh fading, due to the fact that γ rd is an exponential r.v. and applying [34, Eq. (4.337.2)], the part T 1 can be expressed in a closed-form solution.By substituting this and ( 32) into ( 26), the closed-form ESR expression becomes where and r 2 = τ 2 θ L +τ 3 ξ 1 θ L +τ 4 .We conclude from (33) that the ESR is exclusively characterized by the level of imperfections over nodes and γ rd which is a function of the transmit SNR and the distance-dependent channel gain µ rd .
2) Uplink Scenario: Substituting (25) into ( 14) yields Observe from ( 34) and ( 35) that only the first hop SNR, γ sr contributes to the secrecy rate performance.Following the similar procedure as the DL scenario, the ESR performance of the UL case for arbitrary fading distribution can be expressed as ) . (36) For the case of Rayleigh fading, the closed-form ESR expression is given by where ) ) . It is observed from (37) that the ESR is entirely determined by the average channel gain of the first hop, the transmit SNR and the level of imperfections of all the network nodes.We also find that increasing the number of antennas at D has no impact on the ESR when N d is large.

V. SECRECY OUTAGE PROBABILITY
In this section, similar to our ESR results, general expressions are first presented for the SOP that can be applied to any channel distribution, under the presence of transceiver imperfections and in the high SNR regime.Based on these, we derive novel closed-form expressions for the SOP in Rayleigh fading channels.
The SOP denoted by P so is a criterion that determines the fraction of fading realizations where a secrecy rate R t cannot be supported [13].Accordingly, the overall SOP is defined as the probability that a system with the instantaneous secrecy rate R s is not able to support the target transmission rate R t ; P so = Pr R s < R t .
In the following, we focus on each case of DL and UL, respectively.
1) Downlink Scenario: Substituting (30) into (17) and then based on the SOP definition we obtain where R t = 2 2Rt (1+γ R )−1 and γ R is in (29), and the last equation follows from using lemma 2.
It is worth pointing out that the SOP expressions in (38) allows the straightforward evaluation of the SOP for any channel fading distribution by a simple numerical integration.We can conclude from (38) that the SOP is always 1 for target transmission rates more than a threshold (which only depends on the EVMs of the nodes).Interestingly, this event holds for any channel fading distribution, any network topology and any transmit SNR.Therefore as explained in Section IV, some secrecy rates can never be achieved due to secrecy rate ceiling.Furthermore, we conclude that for target transmission rates smaller than the threshold, P so approaches zero with increasing SNR (similar to perfect hardware) whereas the SOP always equals one for target transmission rates larger than the threshold.This result is fundamentally different to the perfect hardware case where the SOP goes to zero with increasing SNR and for any target transmission rate [13], [15], [17].
For Rayleigh fading channels, γ rd is an exponential r.v. and therefore, our new and simple closed-form SOP expression in the presence of transceiver hardware imperfection is given by We note that the results of this section generalize the results of [17] which were derived for the case of untrusted relaying with perfect hardware.
2) Uplink Scenario: Similar to the DL case, the SOP can be obtained by substituting γ D in (35) into ( 17) and using the SOP definition.This yields where R t = 2 2Rt (1 + γ R ) − 1 and γ R is in (34).For the special case of Rayleigh fading channels, the closed-form SOP is derived as As observed in the numerical results, the closed-form expressions (39) and ( 41) are sufficiently tight at medium and high transmit SNRs.

VI. HARDWARE DESIGN
In this section, we aim to gain some insights into the design of RF hardware to maximize the secrecy rate in untrusted relaying networks.Depending on the fixed cost of each network node, we show how the RF segments at the transmission and reception front ends can be designed.
Specially, given the maximum tolerable hardware imperfection of each node, we derive new analytical results characterizing how the hardware imperfections should be distributed between the transmission RF segment and the reception RF segment of each node to maximize the secrecy rate.Therefore, we should find k t i and k r i , i ∈ {S, R, D} to maximize the secrecy rate such that Mathematically speaking, our goal is to solve the following optimization problem Based on (30), ( 35) and ( 17), the instantaneous secrecy rate is an increasing function of the transmit SNR.Since it is our aim to achieve high transmission rates, we consider the asymptotic SNR regime ρ → ∞ [22] to solve the hardware design problem (42).As observed in numerical studies, the results of the high SNR analysis can be applied successfully at finite SNRs.
In the asymptotic SNR regime and for any random distributions on γ sr and γ rd , the asymptotic received SNDRs at R and D are respectively, given by and By substituting ( 43) and ( 44) into ( 18), the secrecy rate ceiling is given by Some conclusions and insights can be concluded from (45).First, the secrecy rate ceiling event appears in the asymptotic SNR regime, which significantly limits the performance of the system.This event is different from the perfect hardware case, in which the ESR increases with increasing SNR.Note that this ceiling effect is independent of the fading distribution.
In the following, we focus on the of DL and UL scenarios separately and then conclude about the hardware design of the overall network.

A. Downlink Scenario:
In the following, we proceed to solve the optimization problem (42) by independently discussing on the hardware design at R and D as follows.
Proof: Please see Appendix B.

B. Uplink Scenario:
Similar to DL scenario, two propositions are provided as follows.
Proposition 4: Proof: In this case, we have where Based on Propositions 2-5, we provide the following corollary as a conclusion of the analysis which provides new insights into the system design.
Corollary 2: Consider a cooperative network in which one multiple antennas node communicates with a single antenna node via a single antenna untrusted relay.Let us assume a predefined cost can be assigned to each node.To maximize the secrecy rate of this network the following considerations should be taken into account: • According to Propositions 2 and 4, the total cost for the relay node should be divided by half between the transmission and reception RF front ends, i,e., it is better to apply the same level of imperfections at every transceiver chain, instead of utilizing a mix of high-quality and low-quality transceiver chains.
• According to Proposition 5, to design the multiple antennas node, the designers are persuaded to use higher-quality hardware in reception RF front end and lower-quality hardware simulations where the OPA is numerically evaluated for finite numbers of antennas using the bisection method.In addition, the equal power allocation (EPA) between S and D (i.e., λ = 0.5) is plotted as a benchmark.Furthermore, the concepts of secrecy rate ceiling and the practical hardware insights from Section VI are numerically presented.In our numerical evaluations, the ) and imperfect (k = 0.1) cases.The number of antennas at S and D are set to N s = N d = 16.It is observed from the figure that the Monte-Carlo simulation of the exact OPA evaluated using the bisection method is in good agreement with the derived high SNR closed-form solutions in (33) and (37) for both perfect and imperfect hardwares.In contrast to perfect hardware, the figure shows that the ESR ceiling phenomenon occurs for imperfect hardware which reveals the performance limits of hardware-constrained realistic networks in the high SNR regime.This figure also reveals that hardware imperfections have low impact at low SNRs, but are significant in the high SNR regime.Furthermore, it is observed that the proposed OPA increases the secrecy rate floor by approximately 1 bits/s/Hz and 0.9 bits/s/Hz for DL and UL scenarios, respectively compared to the EPA (λ = 0.5).
In Fig. 3, we examine the accuracy of the derived closed-form solutions for MA-S and MA-D by considering N s = N d = 4.As can be seen, the numerical and the theoretical curves are in   good agreement across all SNR regimes.Moreover, it is observed that by increasing the level of hardware imperfections from k = 0.05 to k = 0.1, the achievable secrecy rate is degraded approximately 1 bits/s/Hz in the high SNR regime.bits/s/Hz or R t = 2 bits/s/Hz, substantial performance loss is revealed.Interestingly, for R t = 2 bits/s/Hz, the network with imperfect hardware is always in outage and secure communications is unattainable-irrespective of the transmit SNR.This is exactly predicted by our analytical results in section V.The reason is that this target secrecy rate is more than the derived thresholds in (39) and (41), and as mentioned, the SOP of the system always equals one for R t more the thresholds.It can also be seen from the figures that despite the OPA technique that the SOP curves with imperfect hardware and with perfect hardware have the same slope (and thus, hardware imperfections lead to only an SNR offset which is unveiled as a curve shifting to the right), the SOP performance of the EPA technique approaches a non-zero saturation value in the high SNR regime for imperfect hardware.This observation reveals the secrecy performance advantage of the proposed OPA scheme compared with EPA.
Finally, we provide Figs. 6 and 7 to illustrate the insights for designing practical systems that were presented in Section VI.In the simulation, we assume that the total hardware imperfection over each node equals to 0.2, i.e., k tot R = k tot D = 0.2.Based on Propositions 2 and 4, to maximize the secrecy rate, we should design the transmission and reception RF front ends at R such that • Design 3: R is designed randomly while D is designed optimally; For LSMA at S, IV= of hardware imperfections on security based transmissions and little is understood regarding this impact on untrusted relaying networks.In this paper, by taking hardware imperfections into consideration, we proposed an optimal power allocation (OPA) strategy to maximize the instantaneous secrecy rate of a cooperative wireless network comprised of a source, a destination and an untrusted amplify-and-forward (AF) relay.Based on our OPA solutions, new closed-form expressions were derived for the ergodic secrecy rate (ESR) and secrecy outage probability (SOP) with Rayleigh fading channels.The expressions effectively characterize the impact of hardware imperfections and manifest the existence of a secrecy rate ceiling that cannot be enhanced by increasing SNR or improving fading conditions.They also illustrate that hardware imperfections have low impact at low SNRs, but are significant in the high SNR regime.This issue reveals that hardware imperfections should be taken into account when developing high rate systems such as LTE-Advanced and 5G networks.To improve the secrecy performance of the network, we finally presented the hardware design approach.Numerical results depict that optimally distributing the hardware imperfections between the transmission and reception RF segments can further improve the secrecy performance.

Fig. 1 .
Fig. 1.Secure transmission under the presence of transceiver imperfections.The first and the second figures show the downlink and the uplink transmissions, respectively.The relay acts as both helper and eavesdropper.The solid lines represent the first phase of transmission while the dashed line represents the second phase of transmission.

Proposition 3 :
Suppose k t D + k r D = k tot D, thus the secrecy rate ceiling is maximized if

Proposition 5 :
Suppose k t D + k r D = k tot D, hence the secrecy rate ceiling is a monotonically decreasing function of k r D .

Fig. 2 .
Fig.2.Ergodic secrecy rate versus transmit SNR for exact and the derived closed-form expressions under perfect and imperfect transceiver hardwares.Number of antennas at source or destination is set to 16.For imperfect case with k = 0.1, the secrecy rate ceiling is observed.

Fig. 3 .
Fig. 3. Ergodic secrecy rate versus transmit SNR for exact and the derived closed-form expressions under different levels of hardware imperfections; k ∈ {0.05, 0.1}.Number of antennas at source or destination is set to 4.

Fig. 2
Fig. 2 depicts the ESR versus transmit SNR ρ in dB for both cases of DL and UL and forperfect (k = k t R = k r R = k t S = k t D = k r D =0) and imperfect (k = 0.1) cases.The number of antennas at S and D are set to N s = N d = 16.It is observed from the figure that the Monte-Carlo

Fig. 4 .
Fig. 4. Secrecy outage probability versus transmit SNR for DL transmission, with different target transmission rates and under perfect (k = 0) and imperfect hardware (k = 0.1).

Figs. 4
Figs.4 and 5show the SOP as a function of the transmit SNR for LSMA based DL and UL scenarios, respectively, and for different target secrecy rates.The theoretical curves were plotted by the derived analytical expressions in (39) and (41) which are well-tight with the marker symbols generated by the Monte-Carlo simulations.As observed from these figures, there is only a negligible performance loss caused by transceiver hardware imperfections in the low target secrecy rate of R t = 0.25 bits/s/Hz, but by increasing the target secrecy rate to R t = 1

Fig. 5 .
Fig. 5. Secrecy outage probability versus transmit SNR for UL transmission, with different target transmission rates and under perfect (k = 0) and imperfect hardware (k = 0.1).
For LSMA at S, based on Proposition 3, we obtain k t D = 0.13 and k r D = 0.07 while for LSMA at D and based on Proposition 5, we should design the hardwares such that k t D = 0.2 and k r D = 0.By defining the hardware imperfection vector as IV = [k t R , k r R , k t D , k r D ], we consider the following four different hardware design schemes: • Design 1: R and D are designed randomly, for example IV= [0.15, 0.05, 0.1, 0.1], • Design 2: R is designed optimally based on Propositions 2 and 4 while D is designed randomly; IV= [0.1, 0.1, 0.1, 0.1],

Fig. 6 .Fig. 7 .
Fig. 6.Ergodic secrecy rate versus transmit SNR for LSMA at S. Various imperfection distributions over RF transmission and reception ends are considered for k tot R = k tot D = 0.2.