Member, IEEE Emil Björnson
email: emil.bjornson@supelec.fr

Michail Matthaiou
email: michail.matthaiou@chalmers.se

Senior Member, IEEE Mérouane Debbah
email: merouane.debbah@supelec.fr

J E Wang

M Björnson

Debbah

A New Look at Dual-Hop Relaying: Performance Limits with Hardware Impairments

Keywords: Amplify-and-forward, decode-and-forward, dual-hop relaying, ergodic capacity, Nakagami-m fading, outage probability, transceiver hardware impairments. I

Physical transceivers have hardware impairments that create distortions which degrade the performance of communication systems. The vast majority of technical contributions in the area of relaying neglect hardware impairments and, thus, assumes ideal hardware. Such approximations make sense in low-rate systems, but can lead to very misleading results when analyzing future high-rate systems. This paper quantifies the impact of hardware impairments on dual-hop relaying, for both amplify-and-forward and decode-and-forward protocols. The outage probability (OP) in these practical scenarios is a function of the effective end-to-end signal-to-noise-and-distortion ratio (SNDR). This paper derives new closed-form expressions for the exact and asymptotic OPs, accounting for hardware impairments at the source, relay, and destination. A similar analysis for the ergodic capacity is also pursued, resulting in new upper bounds. We assume that both hops are subject to independent but non-identically distributed Nakagami-m fading. This paper validates that the performance loss is small at low rates, but otherwise can be very substantial. In particular, it is proved that for high signal-to-noise ratio (SNR), the end-toend SNDR converges to a deterministic constant, coined the SNDR ceiling, which is inversely proportional to the level of impairments. This stands in contrast to the ideal hardware case in which the end-to-end SNDR grows without bound in the high-SNR regime. Finally, we provide fundamental design guidelines for selecting hardware that satisfies the requirements of a practical relaying system.

and in industry [START_REF] Yang | Relay technologies for WiMAX and LTE-advanced mobile systems[END_REF], [START_REF] Hua | Theories and methods for advanced wireless relays-Issue I[END_REF]. This is due to the fact that, unlike macro base stations, relays are low-cost nodes that can be easily deployed and, hence, enhance the network agility. The vast majority of works in the context of relaying systems make the standard assumption of ideal transceiver hardware.

However, in practice, hardware suffers from several types of impairments; for example, phase noise, I/Q imbalance, and high power amplifier (HPA) nonlinearities among others [START_REF] Costa | m-QAM-OFDM system performance in the presence of a nonlinear amplifier and phase noise[END_REF]- [START_REF] Studer | MIMO transmission with residual transmit-RF impairments[END_REF]. The impact of hardware impairments on various types of single-hop systems was analyzed in [START_REF] Costa | m-QAM-OFDM system performance in the presence of a nonlinear amplifier and phase noise[END_REF]- [START_REF] Björnson | Optimal resource allocation in coordinated multi-cell systems[END_REF]. For instance, I/Q imbalance was considered in [START_REF] Schenk | Performance analysis of zero-IF MIMO OFDM transceivers with IQ imbalance[END_REF] and it was shown to attenuate the amplitude and rotate the phase of the desired constellation. Moreover, it creates an additional imagesignal from the mirror subcarrier, which leads to a symbol error rate floor. In addition, [START_REF] Dardari | A theoretical characterization of nonlinear distortion effects in OFDM systems[END_REF] characterized the effect of non-linear HPAs as a distortion of the constellation position plus an additive Gaussian noise. The authors therein showed that, in the presence of HPA non-linearities, the bit-error-rate increases compared to linear HPAs; for severe non-linearities, an irreducible error floor emerges. Hardware impairments are typically mitigated by compensation algorithms, but there are always residual impairments [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF]- [START_REF] Wenk | MIMO-OFDM Testbed: Challenges, Implementations, and Measurement Results[END_REF]. As a general conclusion, hardware impairments have a deleterious impact on the achievable performance [START_REF] Wenk | MIMO-OFDM Testbed: Challenges, Implementations, and Measurement Results[END_REF]- [START_REF] Björnson | Optimal resource allocation in coordinated multi-cell systems[END_REF]. This effect is more pronounced in high-rate systems, especially those employing inexpensive hardware [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF]. Recent works in information theory have demonstrated that non-ideal hardware severely affects multi-antenna systems; more specifically, [START_REF] Björnson | Capacity limits and multiplexing gains of MIMO channels with transceiver impairments[END_REF] proved that there is a finite capacity limit at high signal-to-noise ratio (SNR), while [START_REF] Björnson | Optimal resource allocation in coordinated multi-cell systems[END_REF] provided a general resource allocation framework where existing signal processing algorithms are redesigned to account for impairments.

Despite the importance of transceiver hardware impairments, their impact on one-way relaying 1 has only been partially investigated; bit error rate simulations were conducted in [START_REF] Samuel | Impact of RF impairments in cellular wireless metropolitan area networks[END_REF] for amplify-and-forward (AF) relaying, while [START_REF] Riihonen | BEP analysis of OFDM relay links with nonlinear power amplifiers[END_REF], [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF] derived expressions for the bit/symbol error rates considering only non-linearities or I/Q imbalance, respectively. Most recently, [START_REF] Awadin | OFDM AF relaying under I/Q imbalance: Performance analysis and baseband compensation[END_REF], [START_REF] Ozdemir | I/Q imbalance in multiple beamforming OFDM transceivers: SINR analysis and digital baseband compensation[END_REF] elaborated on the impact of I/Q imbalance on AF relaying and suggested novel digital baseband compensation algorithms. In this paper, we follow a different line of reasoning by providing a detailed performance analysis of dual-hop relaying systems in the presence of aggregate transceiver impairments, both for AF and decode-and-forward (DF) protocols. To the best of our knowledge, this is the first paper presenting an analytical study of relaying with transceiver impairments under the generalized system model of [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF]- [START_REF] Zetterberg | Experimental investigation of TDD reciprocity-based zero-forcing transmit precoding[END_REF]. The paper makes the following specific contributions:

• We introduce a general model to account for transceiver hardware impairments in relaying. Unlike the works of [START_REF] Riihonen | BEP analysis of OFDM relay links with nonlinear power amplifiers[END_REF], [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF], [START_REF] Awadin | OFDM AF relaying under I/Q imbalance: Performance analysis and baseband compensation[END_REF], [START_REF] Ozdemir | I/Q imbalance in multiple beamforming OFDM transceivers: SINR analysis and digital baseband compensation[END_REF], which examined the impact of a single type of impairments, we herein take a macroscopic look and investigate the aggregate impact of hardware impairments.

• After obtaining the instantaneous end-to-end signal-tonoise-plus-distortion ratios (SNDRs) for both AF and DF relaying, we derive new closed-form expressions for the exact outage probability (OP) of the system. This enables us to characterize the impact of impairments for any arbitrary SNR value. New upper bounds on the ergodic capacity are also provided. Note that our analysis considers Nakagami-m fading, which has been extensively used in the performance analysis of communication systems. • In order to obtain more engineering insights, we elaborate on the high-SNR regime and demonstrate the presence of a so-called SNDR ceiling. This fundamental ceiling is explicitly quantified and its value is shown to be inversely proportional to the level of impairments. This observation manifests that both AF and DF relaying systems are intimately limited by hardware impairments-especially at high SNRs and when high rates are desirable. On a similar note, the ergodic capacity exhibits a so-called capacity ceiling. • In the last part of the paper, we provide some design guidelines for optimizing the performance of hardwareconstrained relaying systems. These results are of particular importance when it comes down to finding the lowest hardware quality (i.e., highest level of impairments) that can theoretically meet stipulated requirements.

The remainder of the paper is organized as follows: In Section II, the signal and system models, for both ideal and impaired hardware, are outlined. For the sake of generality, we consider both dual-hop AF and DF relaying and assume that both hops are subject to independent and non-identically distributed fading. In Section III, an OP analysis is pursued that can be applied for any type of fading and is specialized to the cases of Nakagami-m and Rayleigh fading. A similar analysis for the ergodic capacity is performed in Section IV, which results in new upper bounds. The performance limits of hardware-constrained relaying systems in the high-SNR regime are examined in Section V and some fundamental design guidelines are also obtained. Our numerical results are provided in Section VI, while Section VII concludes the paper.

A. Notation

Circularly-symmetric complex Gaussian distributed variables are denoted as x ∼ CN (a, b) where a is the mean value and b > 0 is the variance. Gamma distributed variables are denoted as ρ ∼ Gamma(α, β), where α ≥ 0 is the shape parameter and β > 0 is the scale parameter. The expectation operator is denoted E{•} and Pr{A} is the probability of an

II. SIGNAL AND SYSTEM MODEL

This paper revisits classical dual-hop relaying where a source communicates with a destination through a relay; see Fig. 1(a). There is no direct link between the source and the destination (e.g., due to heavy shadowing), but the results herein can be extended to that scenario as well. Contrary to most prior works, we consider a generalized system model that accounts for transceiver hardware impairments. This model is described in the following subsections and the block model is shown in Fig. 1

(b).

A. Preliminaries on Distortion Noise from Impairments

We first describe a generalized system model for single-hop transmission that originates from [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF]- [START_REF] Zetterberg | Experimental investigation of TDD reciprocity-based zero-forcing transmit precoding[END_REF]. Suppose an information signal s ∈ C is conveyed over a flat-fading wireless channel h ∈ C with additive noise ν ∈ C. This channel can, for example, be one of the subcarriers in a multi-carrier system based on orthogonal frequency-division multiplexing (OFDM) [START_REF] Zhu | Chunk-based resource allocation in OFDMA systems-Part I: Chunk allocation[END_REF]. The received signal is conventionally modeled as

y = hs + ν (1)
where h, s, and ν are statistically independent. However, physical radio-frequency (RF) transceivers suffer from impairments that are not accurately captured in this way. Informally speaking, such impairments 1) create a mismatch between the intended signal s and what is actually generated and emitted; and 2) distort the received signal during the reception processing. This calls for the inclusion of additional distortion noise sources that are statistically dependent on the signal power and channel gain. Detailed distortion models are available for different sources of impairments (e.g., I/Q imbalance, HPA non-linearities, and phase-noise); see [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF] for a detailed description of hardware impairments in OFDM systems and related compensation algorithms. However, the combined influence at a given flatfading subcarrier is often well-modeled by a generalized channel model [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF], where the received signal becomes

y = h(s + η t ) + η r + ν (2)
while η t , η r are distortion noises from impairments in the transmitter and receiver, respectively [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF]. The distortion noises are defined as

η t ∼ CN (0, κ 2 t P ), η r ∼ CN (0, κ 2 r P |h| 2 ) (3)
which is a model that has been supported and validated by many theoretical investigations and measurements (see e.g., [START_REF] Studer | MIMO transmission with residual transmit-RF impairments[END_REF]- [START_REF] Zetterberg | Experimental investigation of TDD reciprocity-based zero-forcing transmit precoding[END_REF], [START_REF] Dardari | A theoretical characterization of nonlinear distortion effects in OFDM systems[END_REF], [START_REF] Priyanto | Assessing and modelling the effect of RF impairments on UTRA LTE uplink performance[END_REF] and references therein). The design parameters κ t , κ r ≥ 0 are described below. The joint Gaussianity in (3) is explained by the aggregate effect of many impairments. 2For a given channel realization h, the aggregate distortion seen at the receiver has power

E ηt,ηr {|hη t + η r | 2 } = P |h| 2 (κ 2 t + κ 2 r ). (4)
Thus, it depends on the average signal power P = E s {|s| 2 } and the instantaneous channel gain |h| 2 . Note that this dependence is not supported by the classical channel model in [START_REF] Björnson | On the impact of transceiver impairments on AF relaying[END_REF], because the effective distortion noise is correlated with the channel and is not Gaussian distributed. 3The design parameters κ t , κ r ≥ 0 characterize the level of impairments in the transmitter and receiver hardware, respectively. These parameters are interpreted as the error vector magnitudes (EVMs). EVM is a common quality measure of RF transceivers and is the ratio of the average distortion magnitude to the average signal magnitude. 4 Since the EVM measures the joint impact of different hardware impairments and compensation algorithms, it can be measured directly in practice (see e.g., [START_REF]8 hints for making and interpreting EVM measurements[END_REF]). As seen from (4) it is sufficient to characterize the aggregate level of impairments κ = κ 2 t + κ 2 r of the channel, without specifying the exact contribution from the transmitter hardware (κ t ) and the receiver hardware (κ r ). This observation is now formalized.

Lemma 1: The generalized channel in (2) is equivalent to

y = h(s + η) + ν (5)
where the independent distortion noise η ∼ CN (0, κ 2 P ) describes contributions from hardware impairments at both the transmitter and the receiver, such that κ κ 2 t + κ 2 r . The single-parameter characterization in Lemma 1 is used henceforth for the sake of brevity and without loss of generality. Note that (5) reduces to the classical model in (1) when κ = 0, which represents ideal transmitter and receiver hardware since it implies that κ t = κ r = 0.

B. System Model: Relaying with Non-Ideal Hardware

Consider the dual-hop relaying scenario in Fig. 1. Let the transmission parameters between the source and the relay have subscript 1 and between relay and destination have subscript 2. Using the generalized system model in Lemma 1, the received signals at the relay and destination are

y i = h i (s i + η i ) + ν i , i = 1, 2 (6)
where s 1 , s 2 ∈ C are the transmitted signals from the source and relay, respectively, with average signal power

P i = E si {|s i | 2 }.
In addition, ν i ∼ CN (0, N i ) represents the complex Gaussian receiver noise and η i ∼ CN (0, κ 2 i P i ) is the distortion noise (introduced in Section II-A), for i = 1, 2. The distortion noise from hardware impairments (after conventional compensation algorithms have been applied) acts as an unknown noise-like interfering signal η i that goes through the same channel h i as the intended signal, thus making [START_REF] Hua | Theories and methods for advanced wireless relays-Issue I[END_REF] fundamentally different from a conventional multiple-access channel, where each user signal experiences independent channel fading.

The channel magnitudes |h i | are modeled as independent but non-identically distributed Nakagami-m variates, such that the channel gains ρ i |h i | 2 ∼ Gamma(α i , β i ). These are Gamma distributed with integer5 shape parameters α i ≥ 1 and arbitrary scale parameters β i > 0. 6 In this case, the cumulative distribution functions (cdfs) and probability distribution functions (pdfs) of the channel gains, ρ i , are

F ρi (x) = 1 - αi-1 j=0 e -x β i j! x β i j , x ≥ 0 (7) f ρi (x) = x αi-1 e -x β i Γ(α i )β αi i , x ≥ 0 (8)
for i = 1, 2. Note that most of the analysis in this paper is generic and applies for any fading distribution. The choice of Nakagami-m fading is only exploited for deriving closed-form expressions for quantities such as the OP and ergodic capacity. For any fading distribution, the quantity

SNR i = P i E ρi {ρ i } N i (9)
is referred to as the average SNR, for i = 1, 2. The average fading power is E ρi {ρ i } = α i β i under Nakagami-m fading. Remark 1 (High SNR): The level of impairment κ i depends on the SNR [START_REF] Zetterberg | Experimental investigation of TDD reciprocity-based zero-forcing transmit precoding[END_REF], [START_REF] Björnson | Optimal resource allocation in coordinated multi-cell systems[END_REF], [START_REF] Studer | System-level implications of residual transmit-RF impairments in MIMO systems[END_REF]. In most of our analysis, we consider an arbitrary fixed SNR i and thus κ i can be taken as a constant. However, some remarks are in order for our high-SNR analysis in Section V. As seen from ( 9), a high SNR can be achieved by having high signal power P i and/or high fading power E ρi {ρ i }. If we increase the signal power to operate outside the dynamic range of the power amplifier, then the level of impairments κ i increases as well due to the HPA nonlinearities [START_REF] Studer | System-level implications of residual transmit-RF impairments in MIMO systems[END_REF]. Advanced dynamic power adaptation is then required to maximize the performance [START_REF] Björnson | Optimal coordinated beamforming in the multicell downlink with transceiver impairments[END_REF]. If we, on the other hand, increase the fading power (e.g., by decreasing the propagation loss) then it has no impact on κ i . For brevity, we keep the analysis clean by assuming that any change in SNR is achieved by a change in the average fading power, while the signal power is fixed. We stress that the upper bounds and necessary conditions derived in Section V are also valid when the signal power is increased, but then they will be optimistic and no longer tight in the high-SNR regime.

In the next subsections, we derive the end-to-end SNDRs for AF and DF relaying, respectively.

C. End-to-End SNDR: Amplify-and-Forward Relaying

The information signal s 1 should be acquired at the destination. In the AF relaying protocol, the transmitted signal s 2 at the relay is simply an amplified version of the signal y 1 received at the relay: s 2 = G y 1 for some amplification factor G > 0. With non-ideal (ni) hardware, as described by [START_REF] Hua | Theories and methods for advanced wireless relays-Issue I[END_REF], the received signal at the destination is now obtained as

y 2 = h 2 G ni h 1 (s 1 + η 1 ) + ν 1 + h 2 η 2 + ν 2 (10) = G ni h 1 h 2 s 1 + G ni h 1 h 2 η 1 + G ni h 2 ν 1 + h 2 η 2 + ν 2
where the amplification factor G ni is selected at the relay to satisfy its power constraint. The source needs no channel knowledge. If the relay has instantaneous knowledge of the fading channel, h 1 , it can apply variable gain relaying with

G v P 2 /E s1,ν1,η1 {|y 1 | 2 } [30]
. Otherwise, fixed gain relaying with G f P 2 /E s1,ν1,η1,h1 {|y 1 | 2 } can be applied using only statistical channel information [START_REF] Hasna | A performance study of dual-hop transmissions with fixed gain relays[END_REF]. 7 For fixed and variable gain relaying, G ni reads respectively as

G f ni P 2 P 1 E ρ1 {ρ 1 }(1 + κ 2 1 ) + N 1 (11)
G v ni P 2 P 1 ρ 1 (1 + κ 2 1 ) + N 1 (12)
where E ρ1 {ρ 1 } = α 1 β 1 for Nakagami-m fading. Note that variable gain relaying has always an output power of P 2 at the relay, whilst for fixed gain relaying this varies with the channel gain of the first hop. This, in turn, affects the variance of the distortion noise η 2 for the second hop, which by definition is

E{|η 2 | 2 } = κ 2 2 G 2 ni E s1,ν1 {|y 1 | 2 }
for AF relaying. This reduces to the simple expression κ 2 2 P 2 for variable gain relaying, while it becomes

G f ni 2 κ 2 2 (P 1 ρ 1 (1 + κ 2 1 ) + N 1 )
for fixed gain relaying.

After some algebraic manipulations (e.g., using the expressions for G v ni ), the end-to-end SNDRs for fixed and variable gain relaying are obtained as

γ AF-f ni = ρ 1 ρ 2 ρ 1 ρ 2 d + ρ 2 (1 + κ 2 2 ) N1 P1 + N2 P1(G f ni ) 2 (13)
γ AF-v ni = ρ 1 ρ 2 ρ 1 ρ 2 d+ρ 1 (1+κ 2 1 ) N2 P2 +ρ 2 (1+κ 2 2 ) N1 P1 + N1N2 P1P2 (14)
7

The relay then has a long-term power constraint

P 2 = E{|G f y 1 | 2 }
where expectation is taken over signal, noise, and channel fading realizations.

respectively, assuming that the destination knows the two channels and the statistics of the receiver and distortion noises. Note that the parameter d κ 2 1 + κ 2 2 + κ 2 1 κ 2 2 that appears in ( 13)-( 14) plays a key role in this paper.

Remark 2 (Ideal Hardware): The end-to-end SNRs for AF relaying with ideal (id) hardware were derived in [START_REF] Hasna | A performance study of dual-hop transmissions with fixed gain relays[END_REF], [START_REF] Emamian | Multi-user spatial diversity in a shadow-fading environment[END_REF]. The results of this section reduce to that special case when setting κ 1 = κ 2 = 0. The amplification factors then become

G f id = P 2 P 1 E ρ1 {ρ 1 } + N 1 , G v id = P 2 P 1 ρ 1 + N 1 ( 15
)
and the end-to-end SNRs become

γ AF-f id = ρ 1 ρ 2 ρ 2 N1 P1 + N2 P1(G f id ) 2 , γ AF-v id = ρ 1 ρ 2 ρ 1 N2 P2 +ρ 2 N1 P1 + N1N2 P1P2 (16)
for fixed and variable gain relaying, respectively. Comparing the SNDRs in ( 13)-( 14) with the ideal hardware case in ( 16), the mathematical form of the former is more complicated, since the product ρ 1 ρ 2 appears in the denominator. It is, therefore, non-trivial to generalize prior works on AF relaying with Nakagami-m fading (e.g., [START_REF] Hasna | Harmonic mean and end-to-end performance of transmission systems with relays[END_REF], [START_REF] Karagiannidis | Bounds for multihop relayed communications in Nakagami-m fading[END_REF], [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF]) to the general case of non-ideal hardware. This generalization is done in Section III and is a main contribution of this paper.

D. End-to-End SNDR: Decode-and-Forward Relaying

In the DF relaying protocol, the transmitted signal s 2 at the relay should equal the original intended signal s 1 . This is only possible if the relay is able to decode the signal (otherwise the relayed signal is useless); thus, the effective SNDR is the minimum of the SNDRs between 1) the source and relay; and 2) the relay and destination. We assume that the relay knows h 1 and the destination knows h 2 , along with the statistics of the receiver and distortion noises.

With non-ideal hardware as described by ( 6), the effective end-to-end SNDR becomes γ DF ni = min

P 1 ρ 1 P 1 ρ 1 κ 2 1 + N 1 , P 2 ρ 2 P 2 ρ 2 κ 2 2 + N 2 (17)
and does not require any channel knowledge at the source. In the special case of ideal hardware (i.e., κ 1 = κ 2 = 0), [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF] reduces to the classical result from [START_REF] Laneman | Cooperative diversity in wireless networks: Efficient protocols and outage behavior[END_REF]; that is

γ DF id = min P 1 ρ 1 N 1 , P 2 ρ 2 N 2 . ( 18
)
Just as for AF relaying, the SNDR expression with DF relaying is more complicated in the general case with hardware impairments. This is manifested in [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF] by the statistical dependence between numerators and denominators, which is different from the ideal case in [START_REF] Björnson | Capacity limits and multiplexing gains of MIMO channels with transceiver impairments[END_REF].

III. OUTAGE PROBABILITY ANALYSIS

This section derives new closed-form expressions for the exact OPs under the presence of transceiver impairments. These results generalize the well known results in the literature, such as [START_REF] Laneman | Cooperative diversity in wireless networks: Efficient protocols and outage behavior[END_REF]- [START_REF] Hasna | Harmonic mean and end-to-end performance of transmission systems with relays[END_REF], [START_REF] Karagiannidis | Bounds for multihop relayed communications in Nakagami-m fading[END_REF], [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF], which rely on the assumption of ideal hardware. The OP is denoted by P out (x) and is the probability that the channel fading makes the effective end-to-end SNDR fall below a certain threshold, x, of acceptable communication quality. Mathematically speaking, this means that

P out (x) Pr{γ ≤ x} ( 19
)
where γ is the effective end-to-end SNDR.

A. Arbitrary Channel Fading Distributions

This subsection derives general expressions for the OP that hold true for any distributions of the channel gains ρ 1 , ρ 2 . These offer useful tools, which later will allow us to derive closed-form expressions for the cases of Nakagami-m and Rayleigh fading. Note that ρ 1 , ρ 2 appear in both numerators and denominators of the SNDRs in ( 13)-( 14) and [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF]. The following lemma enable us to characterize this structure.

Lemma 2: Let c 1 , c 2 , c 3 be strictly positive constants and let ρ be a non-negative random variable with cdf F ρ (•). Then,

Pr c 1 ρ c 2 ρ + c 3 ≤ x = F ρ c3x c1-c2x , 0 ≤ x < c1 c2 , 1, x ≥ c1 c2 . (20)
Suppose c 2 = 0 instead, then (20) simplifies to

Pr c 1 ρ c 3 ≤ x = F ρ c 3 x c 1 . ( 21
)
Proof: The left-hand side of ( 20) is equal to

Pr c 1 ρ ≤ (c 2 ρ + c 3 )x = Pr ρ ≤ c 3 x (c 1 -c 2 x) (22)
after some basic algebra. The last expression is exactly

F ρ c3x c1-c2x . If (c 1 -c 2 x
) ≤ 0, then the inequality is satisfied for any realization of the non-negative variable ρ.

Based on Lemma 2, we can derive integral expressions for the OPs with AF relaying.

Proposition 1: Suppose ρ i is an independent non-negative random variable with cdf F ρi (•) and pdf f ρi (•) for i = 1, 2. The OP with AF relaying and non-ideal hardware is

P AF,ni out (x) = 1 - ∞ 0 1-F ρ1 b 2 x (1-dx) + b1b2x 2 1-dx +cx z(1-dx) f ρ2 z+ b 1 x 1-dx dz (23) for x < 1 d and P AF,ni out (x) = 1 for x ≥ 1 d . Recall that d κ 2 1 +κ 2 2 +κ 2 1 κ 2 2 . The choice of AF protocol determines b 1 , b 2 , c: b 1 = 0, b 2 = N1(1+κ 2 2 ) P1 , c = N2 P1(G f ni ) 2 if fixed gain, b 1 = N2(1+κ 2 1 ) P2 , b 2 = N1(1+κ 2 2 ) P1 , c = N1N2 P1P2 if variable gain.
In the special case of ideal hardware, (23) reduces to

P AF,id out (x) = 1 - ∞ 0 1-F ρ1 b 2 x+ b 1 b 2 x 2 +cx z f ρ2 z+b 1 x dz (24)
where the parameters b 1 , b 2 , c, d depend on the AF protocol:

b 1 = 0, b 2 = N1 P1 , c = N2 P1(G f id ) 2 , d = 0 if fixed gain, b 1 = N2 P2 , b 2 = N1 P1 , c = N1N2 P1P2 , d = 0 if variable gain.
Proof: The proof follows from Lemma 2 and Lemma 3 in Appendix A, by noting that the end-to-end SNDRs for nonideal hardware in ( 13)-( 14) and ideal hardware in [START_REF] Riihonen | BEP analysis of OFDM relay links with nonlinear power amplifiers[END_REF], are of the form in (46

) for different values of a, b 1 , b 2 , c, d.
The result in Lemma 2 also allows explicit expressions for the OPs with DF relaying. Proposition 2: Suppose ρ i is an independent non-negative random variable with cdf F ρi (•) for i = 1, 2. The OP with DF relaying and non-ideal hardware is

P DF,ni out (x) =    1- 2 i=1 1 -F ρi Nix Pi(1-κ 2 i x) , x < 1 δ , 1, x ≥ 1 δ , ( 25
) with δ max(κ 2 1 , κ 2
2 ). In the special case of ideal hardware, (25) reduces to

P DF,id out (x) = 1 - 2 i=1 1 -F ρi N i x P i . ( 26
)
Proof: For a set of independent random variables ξ i with marginal cdfs F ξi (x), the random variable min i (ξ i ) has cdf

1 -i (1 -F ξi (x)).
The proof follows by combining this standard property with Lemma 2 and ( 17)- [START_REF] Björnson | Capacity limits and multiplexing gains of MIMO channels with transceiver impairments[END_REF].

Note that the OP expressions in Propositions 1 and 2 allow the straightforward computation of the OP for any channel fading distribution, either directly (for DF) or by a simple numerical integration (for AF). In Section III-B, we particularize these expressions to the cases of Nakagami-m and Rayleigh fading to obtain closed-form results.

Interestingly, Propositions 1 and 2 show that the OP, P out (x), is always 1 for x ≥ 1 d when using AF and 1 for x ≥ 1 δ when using DF. Note that these results hold for any channel fading distribution and SNR; hence, there are certain SNDR thresholds that can never be crossed. This has an intuitive explanation since the SNDRs derived in Section II are upper bounded as γ AF ni ≤ 1 d and γ DF ni ≤ 1 δ . We elaborate further on this fundamental property in Section V.

B. Nakagami-m and Rayleigh Fading Channels

Under ideal hardware, the OPs with fixed and variable gain AF relaying were obtained in [3, Eq. ( 9)] and [30, Eq. ( 14)], respectively. These prior works considered Rayleigh fading, while closed-form expression for the case of Nakagami-m fading were obtained in [START_REF] Hasna | Harmonic mean and end-to-end performance of transmission systems with relays[END_REF], [START_REF] Karagiannidis | Bounds for multihop relayed communications in Nakagami-m fading[END_REF], [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF] under ideal hardware. Unfortunately, the OP in the general AF relaying case with non-ideal hardware cannot be deduced from these prior results; for example, the general analysis in [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF] does not handle cases when ρ 1 ρ 2 appears in the denominator of the SNDR expression, which is the case in ( 13)- [START_REF] Björnson | Optimal coordinated beamforming in the multicell downlink with transceiver impairments[END_REF].

The following key theorem provides new and tractable closed-form OP expressions in the presence of transceiver hardware impairments.

Theorem 1: Suppose ρ 1 , ρ 2 are independent and ρ i ∼ Gamma(α i , β i ) where α i ≥ 1 is an integer and β i > 0 for i = 1, 2. The OP with AF relaying and non-ideal hardware is

P AF,ni out (x) = 1-2e -x 1-dx b 1 β 2 + b 2 β 1 α1-1 j=0 α2-1 n=0 j k=0 C(j, n, k) × x 1 -dx α2+j b 1 b 2 + c(1 -dx) x n+k+1 2 × K n-k+1 2 b 1 b 2 x 2 β 1 β 2 (1 -dx) 2 + cx β 1 β 2 (1 -dx) (27) for x < 1 d and P AF,ni out (x) = 1 for x ≥ 1 d .
The νth-order modified Bessel function of the second kind is denoted by

K ν (•), while C(j, n, k) b α2-n-1 1 b j-k 2 β k-n-1-2j 2 1 β n-k+1-2α 2 2 2 k! (j -k)! n! (α 2 -n -1)! . (28)
The parameters a, b 1 , b 2 depend on the choice of the AF protocol and are given in Proposition 1, while

d κ 2 1 + κ 2 2 + κ 2 1 κ 2 2 .
In the special case of Rayleigh fading (α i = 1, β i = Ω i ), the OP becomes

P AF,ni out (x) = 1 - 2e -x 1-dx b 1 Ω 2 + b 2 Ω 1 √ Ω 1 Ω 2 b 1 b 2 x 2 (1 -dx) 2 + cx (1 -dx) × K 1 2 √ Ω 1 Ω 2 b 1 b 2 x 2 (1 -dx) 2 + cx (1 -dx) (29)
for x < 1 d and P AF,ni out (x) = 1 for x ≥ 1 d . Proof: This results follows by combining Proposition 1 with Lemma 3 in Appendix A.

Theorem 1 generalizes the prior works mentioned above, which all assume ideal hardware. Note that OP expressions equivalent to those in prior works, can be obtained by setting κ 1 = κ 2 = 0 in Theorem 1, which effectively removes the possibility of x ≥ 1 d since 1 d = ∞. Next, closed-form OP expressions for DF relaying are obtained in the general case of non-ideal hardware.

Theorem 2: Suppose ρ 1 , ρ 2 are independent and ρ i ∼ Gamma(α i , β i ) where α i ≥ 1 is an integer and β i > 0 for i = 1, 2. The OP with DF relaying and non-ideal hardware is

P DF,ni out (x) = 1- 2 i=1 αi-1 j=0 e - N i x P i β i (1-κ 2 i x) j! N i x P i β i (1 -κ 2 i x) j (30) for x < 1 δ where δ max(κ 2 1 , κ 2
2 ) and P DF,ni out (x) = 1 for x ≥ 1 δ . In the special case of Rayleigh fading (α i = 1, β i = Ω i ), the OP becomes

P DF,ni out (x) =    1 -e - 2 i=1 N i x P i Ω i (1-κ 2 i x) , 0 ≤ x < 1 d , 1, x ≥ 1 d . (31)
Proof: By plugging the respective cdfs of Nakagami-m and Rayleigh fading into Proposition 2, we obtain the desired results.

We stress that Theorem 2 generalizes the classical results of [33, Eq. ( 21)] and [START_REF] Laneman | Cooperative diversity in wireless networks: Efficient protocols and outage behavior[END_REF], [START_REF] Zhao | Outage probability at arbitrary SNR with cooperative diversity[END_REF], which were reported for the case of DF relaying with ideal hardware. We also note that Theorem 2 can be straightforwardly extended to multi-hop relaying scenarios with M > 2 hops. The only difference would be to let the index i ∈ {1, . . . , M } account for all M hops.

IV. ERGODIC CAPACITY ANALYSIS

In the case of ergodic channels, the ultimate performance measure is the ergodic channel capacity, expressed in bits/channel use. Similar to [START_REF] Farhadi | On the ergodic capacity of wireless relaying systems over Rayleigh fading channels[END_REF]- [START_REF] Zhong | Generic ergodic capacity bounds for fixed-gain AF dual-hop relaying systems[END_REF], the term channel refers to the end-to-end channel with a fixed relaying protocol (e.g., AF or DF). When compared to the ergodic capacity with arbitrary relaying protocols, as in [START_REF] Høst-Madsen | Capacity bounds and power allocation for wireless relay channels[END_REF], the results for the AF and DF relaying channels should be interpreted as ergodic achievable rates. This section provides tractable bounds and approximations for the ergodic capacities of AF and DF relaying.

A. Capacity of AF Relaying

While the capacity of the AF relaying channel with ideal hardware has been well investigated in prior works (see e.g., [START_REF] Farhadi | On the ergodic capacity of wireless relaying systems over Rayleigh fading channels[END_REF]- [START_REF] Zhong | Generic ergodic capacity bounds for fixed-gain AF dual-hop relaying systems[END_REF] and references therein), the case of AF relaying with hardware impairments has been scarcely addressed. In the latter case, the channel capacity can be expressed as

C AF ni 1 2 E log 2 1 + γ AF ni ( 32
)
where the factor 1/2 accounts for the fact that the entire communication occupies two time slots. The ergodic capacity can be computed by numerical integration, using the fact that the pdf of γ AF ni can be deduced by differentiating the cdf in Theorem 1. However, an exact evaluation of (32) is tedious, if not impossible, to obtain in closed-form.

To characterize the ergodic capacity of the AF relaying channel with fixed or variable gain, an upper bound is derived by the following theorem.

Theorem 3: For Nakagami-m fading channels, the ergodic capacity C AF ni (in bits/channel use) with AF relaying and nonideal hardware is upper bounded as

C AF ni ≤ 1 2 log 2 1 + J J d + 1 (33)
with Proof: For brevity, the proof is given in Appendix B. Although the expression in [START_REF] Zhao | Outage probability at arbitrary SNR with cooperative diversity[END_REF] is complicated, we note that analytical expressions for the derivatives of arbitrary order are known for the Whittaker W function [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF]; thus, the upper bound in Theorem 3 can be analytically evaluated in an efficient way. For the purpose of numerical illustrations in Section VI, we implemented the upper bound in Theorem 3 using the Symbolic Math Toolbox in MATLAB [START_REF] Weiss | Optimization using symbolic derivatives[END_REF].

J α1-1 n=0 α2-1 k=0 k m=0 n+m+2 q=0 (n + 1)β n-m+2-2α 1 2 1 β m-n-2k 2 2 (k -m)!(α 1 -n -1)! × b1 b2 n-m+2+2k 2 c b1 q c(-1) α1+k-q+1 n + m + 2 q d α1+k-q+1 dt α1+k-q+1 e ct 2b 1 × W -n+m+2 2 , n-m+1 2 c 2b 1 t -t 2 - 4b 1 b 2 β 1 β 2 × W -n+m+2 2 , n-m+1 2 c 2b 1 t + t 2 - 4b 1 b 2 β 1 β 2 t= 1 β 1 + b 1 b 2 β 2
Nevertheless, a simpler closed-form expression for the ergodic capacity is achieved by applying the approximation

E log 2 1 + x y ≈ log 2 1 + E{x} E{y} (35)
to [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF]. For Nakagami-m fading channels, we obtain

C AF ni ≈ 1 2 log 2 1+ α 1 α 2 β 1 β 2 α 1 α 2 β 1 β 2 d + α 1 β 1 b 1 + α 2 β 2 b 2 + c ( 36
)
where the parameters b 1 , b 2 , c were defined in Proposition 1 for fixed and variable gain relaying. Despite the approximative nature of this result, we show numerically in Section VI that ( 36) is an upper bound that is almost as tight as the one in Theorem 3. In addition, both expressions are asymptotically exact in the high-SNR regime.

B. Capacity of DF Relaying

Next, we consider the ergodic capacity of the DF relaying channel which is more complicated to analyze than the AF relaying channel; the decoding and re-encoding at the relay gives additional constraints and degrees-of-freedom to take into account [START_REF] Høst-Madsen | Capacity bounds and power allocation for wireless relay channels[END_REF]. For example, an information symbol must be correctly decoded at the relay before re-encoding, and different symbol lengths and transmit powers can then be allocated to the two hops to account for asymmetric fading/hardware conditions.

For brevity, we consider a strict DF protocol with fixed power and equal time allocation. Based on [38, Eq. ( 45)], [35, Eq. (11a)], and the effective SNDR expression in [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF], the ergodic channel capacity under hardware impairments can be upper bounded as

C DF ni ≤ min i=1,2 1 2 E log 2 1 + P i ρ i P i ρ i κ 2 i + N i . ( 37
)
The intuition behind this expression is that the information that can be sent from the source to the destination is upper bounded by the minimum of the capacities of the individual channels. A closed-form upper bound, which holds for any channel fading distributions, is derived in the new theorem. Theorem 4: The ergodic capacity C DF ni (in bits/channel use) with DF relaying and non-ideal hardware is upper bounded as

C DF ni ≤ min i=1,2 1 2 log 2 1 + SNR i SNR i κ 2 i + 1 . ( 38
)
Proof: For brevity, the proof is given in Appendix B. This theorem shows clearly the impact of hardware impairments on the channel capacity: the distortion noise shows up as an interference term that is proportional to the SNR. The upper bound will therefore not grow unboundedly with the SNR, as would be the case for ideal hardware [START_REF] Farhadi | On the ergodic capacity of wireless relaying systems over Rayleigh fading channels[END_REF], [START_REF] Høst-Madsen | Capacity bounds and power allocation for wireless relay channels[END_REF]. The next section elaborates further on the high-SNR regime.

V. FUNDAMENTAL LIMITS: ASYMPTOTIC SNR ANALYSIS

To obtain some insights on the fundamental impact of impairments, we now elaborate on the high-SNR regime. Recall the SNR definition, SNR i = PiEρ i {ρi} Ni for i = 1, 2, in (9) and the corresponding Remark 1 on the SNR scaling.

For the ease of presentation, we assume that SNR 1 , SNR 2 grow large with SNR 1 = µSNR 2 for some fixed ratio 0 < µ < ∞, such that the relay gain remains finite and strictly positive.

Corollary 1: Suppose SNR 1 , SNR 2 grow large with a finite non-zero ratio and consider any independent fading distributions on ρ 1 , ρ 2 that are strictly positive (with probability one).

The OP with AF relaying and non-ideal hardware satisfies lim SNR1,SNR2→∞

P out (x) = 0, x ≤ 1 κ 2 1 +κ 2 2 +κ 2 1 κ 2 2 , 1, x > 1 κ 2 1 +κ 2 2 +κ 2 1 κ 2 2 , (39)
while the OP with DF relaying and non-ideal hardware satisfies lim SNR1,SNR2→∞

P out (x) = 0, x ≤ 1 max(κ 2 1 ,κ 2 2 ) , 1, x > 1 max(κ 2 1 ,κ 2 2 ) . (40)
Proof: Referring back to [START_REF] Björnson | Optimal coordinated beamforming in the multicell downlink with transceiver impairments[END_REF], observe that we can rewrite the SNDR in terms of SNR 1 , SNR 2 by extracting out the average fading power as ρ i = E ρi {ρ i }ρ i (where ρi represents a normalized channel gain). By taking the limit SNR 1 , SNR 2 → ∞ (with SNR 1 = µSNR 2 ), we can easily see that the end-to-end SNDR, for variable gain AF relaying, converges to

lim SNR1,SNR2→∞ γ AF-v ni = 1 d = 1 κ 2 1 + κ 2 2 + κ 2 1 κ 2 2 ( 41
)
for any non-zero realization of ρ1 , ρ2 . Since this happens with probability one, the OP in [START_REF] Gradshteyn | Table of Integrals, Series, and Products[END_REF] is obtained in this case. The proofs for the cases of fixed gain AF relaying and DF relaying follow a similar line of reasoning.

A number of conclusions can be drawn from Corollary 1. First, an SNDR ceiling effect appears in the high-SNR regime, which significantly limits the performance of both AF and DF relaying systems. This means that for x smaller than the ceiling, P out (x) goes to zero with increasing SNR (at the same rate as with ideal hardware; see Section VI) while the OP always equals one for x larger than the ceiling. This phenomenon is fundamentally different from the ideal hardware case, in which an increasing SNR makes the endto-end SNDR grow without bound and P out (x) → 0 for any x. Note that this ceiling effect is independent of the fading distributions of the two hops. Similar behaviors have been observed for two-way relaying in [START_REF] Matthaiou | Twoway relaying under the presence of relay transceiver hardware impairments[END_REF], although the exact characterization is different in that configuration.

The SNDR ceiling for dual-hop relaying is

γ * 1 κ 2 1 +κ 2 2 +κ 2 1 κ 2 2
for AF protocol,

1 max(κ 2 1 ,κ 2 2 )
for DF protocol, (42) which is inversely proportional to the squares of κ 1 , κ 2 . This validates that transceiver hardware impairments dramatically affect the performance of relaying channels and should be taken into account when evaluating relaying systems. The ceiling is, roughly speaking, twice as large for DF relaying as for AF relaying;8 this implies that the DF protocol can handle practical applications with twice as large SNDR constraints without running into a definitive outage state. Apart from this, the impact of κ 1 and κ 2 on the SNDR ceiling is similar for both relaying protocols, since γ * is a symmetric function of κ 1 , κ 2 . We now turn our attention to the ergodic capacity in the high-SNR regime. In this case, the following result is of particular importance.

Corollary 2: Suppose SNR 1 , SNR 2 grow large with a finite non-zero ratio and consider any independent fading distributions on ρ 1 , ρ 2 that are strictly positive (with probability one).

The ergodic capacity with AF relaying and non-ideal hardware satisfies

lim SNR1,SNR2→∞ C AF ni = log 2 1 + 1 κ 2 1 + κ 2 2 + κ 2 1 κ 2 2 . ( 43
)
The ergodic capacity with DF relaying and non-ideal hardware satisfies

lim SNR1,SNR2→∞ C DF ni ≤ log 2 1 + 1 max(κ 2 1 , κ 2 2 ) . ( 44
)
Proof: For AF relaying, the instantaneous SNDR is upper bounded as γ AF ni ≤ 1 d for any realizations of ρ 1 , ρ 2 . The dominated convergence theorem therefore allows us to move the limit in (43) inside the expectation operator of the ergodic capacity expression in [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF]. The right-hand side of (43) now follows directly from [START_REF] Jorswieck | Majorization and matrix-monotone functions in wireless communications[END_REF]. For DF relaying, we see directly from Theorem 4 that C DF ni ≤ min i log 2 (1 + 1/κ 2 i ), as SNR i → ∞, which gives (44).

Similar to the asymptotic OP analysis, Corollary 2 demonstrates the presence of a capacity ceiling in the high-SNR regime. This implies that transceiver hardware impairments make the ergodic capacity saturate, thereby limiting the performance of high-rate systems. Similar capacity ceilings have previously been observed for single-hop multi-antenna systems in [START_REF] Studer | MIMO transmission with residual transmit-RF impairments[END_REF], [START_REF] Wenk | MIMO-OFDM Testbed: Challenges, Implementations, and Measurement Results[END_REF], [START_REF] Björnson | Capacity limits and multiplexing gains of MIMO channels with transceiver impairments[END_REF]. We finally point out that the approximate capacity expression in [START_REF] Waqar | Tight bounds for ergodic capacity of dual-hop fixed-gain relay networks under Rayleigh fading[END_REF] becomes asymptotically exact and equal to (43), for the case of Nakagami-m fading.

A. Design Guidelines for Relaying Systems

Recall from Lemma 1 that κ i is the aggregate level of impairments of the ith hop, for i = 1, 2. The parameter can be decomposed as

κ i = κ 2 i,t + κ 2 i,r (45)
where κ i,t , κ i,r are the levels of impairments (in terms of EVM) in the transmitter and receiver hardware, respectively. The hardware cost is a decreasing function of the EVMs, because low-cost hardware has lower quality and thus higher EVMs. Hence, it is of practical interest to find the EVM combination that maximizes the performance for a fixed cost.

To provide explicit guidelines, we define the hardware cost as

2 i=1 ζ(κ i,t ) + ζ(κ i,
= κ 2 1 + κ 2 2 , γ * in (42) is maximized by κ 2 1 = κ 2 2 = A 2 , which is easily seen from the structure of γ * = 1 A+Aκ 2 1 -κ 4 1
for AF and γ * =

1 max(κ 2 1 ,A-κ 2
1 ) for DF. The alternative solution decreases cost and increases (42), thus the EVMs must be equal at the optimum.

Corollary 3 shows that it is better to have the same level of impairments at every9 transceiver chain, than mixing highquality and low-quality transceiver chains. In particular, this tells us that the relay hardware should ideally be of the same quality as the source and destination hardware.

As a consequence, we provide the following design guidelines on the highest level of impairments that can theoretically meet stipulated requirements.

Corollary 4: Consider a relaying system optimized according to Corollary 3. To support a given SNDR threshold, x, it is necessary to have κ 2 i ≤ 1

x + 1 -1 for AF relaying and κ 2 i ≤ 1 x for DF relaying for i = 1, 2. Proof: Corollary 3 prescribes that κ 1 = κ 2 . Plugging this fact into (42), we obtain equations that give the expressions stated in this corollary.

This corollary shows that hardware requirements are looser for DF than for AF, which is also illustrated in Section VI. If the SNDR threshold is substituted as x = 2 2R -1, then we achieve the corresponding necessary conditions for achieving an ergodic capacity of R bits/channel use.

Observe that the guidelines in Corollary 4 are necessary, while the sufficiency only holds asymptotically in the high-SNR regime. Thus, practical systems should be more conservatively designed to cope with finite SNRs and different channel fading conditions.

VI. NUMERICAL ILLUSTRATIONS

In this section, the theoretical results are validated by a set of Monte-Carlo simulations. Furthermore, the concepts of SNDR and capacity ceilings and the practical design guidelines of Section V are numerically illustrated.

A. Different Channel Fading Conditions

First, we consider the impact of hardware impairments on the OP, P out (x), for two different thresholds: x = 2 2 -1 = 3 and x = 2 5 -1 = 31. Keeping in mind that the relay communication occupies two time slots, these correspond to rates of 1 and 2.5 bits/channel use, respectively. We consider a symmetric scenario with fixed levels of impairments of κ 1 = κ 2 = 0.1, independent Nakagami-m fading channels with α 1 = α 2 = 2, and the same average SNR at both channels. Recall that the average SNRs are defined in [START_REF] Studer | MIMO transmission with residual transmit-RF impairments[END_REF] and note that we will not specify β 1 , β 2 , P 1 , P 2 in this section since these parameters are implicitly determined by the average SNR. 10 Increasing the SNR is interpreted as decreasing the propagation distance; see Remark 1.

Fig. 2 and Fig. 3 show the OP as a function of the average SNR for AF and DF relaying, respectively. The curves in Fig. 2 and Fig. 3 were generated by the analytical expressions in Theorems 1 and 2 and show perfect agreement with the marker symbols which are the results of Monte-Carlo simulations. As 10 Observe that while the shape parameters α 1 , α 2 affect the SNR distributions of SNR 1 and SNR 2 , respectively, any selection of the scaling parameter β i and the transmit power P i that gives the same value of the product P i β i will give exactly the same performance and SNR distribution. shown in these figures, there is only a minor performance loss caused by transceiver hardware impairments in the low threshold case of x = 3. However, there is a substantial performance loss when the threshold is increased to x = 31. More precisely, AF relaying (with either variable or fixed gain) and DF relaying experience losses of around 5 dB and 2 dB in SNR, respectively, for x = 31. The DF protocol is thus more resilient to hardware impairments, which was expected since the distortion noise of the first hop does not carry on to the second hop in this protocol. Nevertheless, the OP curves for AF and DF relaying with non-ideal hardware have the same slope as with ideal hardware; hence, hardware impairments cause merely an SNR offset that is manifested as a curve shifting to the right in Figs. 2 and3. We also note that variable gain relaying outperforms the fixed one in most scenarios of interest, which is in line with the observations in [START_REF] Hasna | A performance study of dual-hop transmissions with fixed gain relays[END_REF].

Next, we illustrate the impact of the shape parameters α 1 , α 2 of the Nakagami-m fading distributions. We also consider different asymmetric setups where SNR 1 = µSNR 2 , for µ ∈ { 1 5 , 1, 5}, while the largest of the SNRs is fixed as max(SNR 1 , SNR 2 ) = 20 dB. Fig. 4 shows the OP for x = 3 with ideal hardware and with hardware impairments characterized by κ 1 = κ 2 = 0.1. We only show the result for fixed gain AF relaying for brevity. Observe that increasing the shape parameters will monotonically decrease the OP and thus improve the system performance. This is because the variance of the channel gain ρ i decreases when increasing α i , while we keep the average SNR fixed. Moreover, we note that it is far better to have the same SNR at both hops than asymmetries. In asymmetric cases, we note from Fig. 4 that it is better to have a strong first hop and a weak second hop than vice versa. This is explained by the amplification of noise in the AF protocol; however, this effect disappears for variable gain AF relaying and DF relaying, which is easily seen from the symmetric SNDR expressions in ( 14) and [START_REF] Qi | Analysis and compensation of I/Q imbalance in amplify-and-forward cooperative systems[END_REF].

B. SNDR and Capacity Ceilings

Next, we illustrate the existence of SNDR ceilings. To this end, we consider a fixed average SNR of 30 dB at both channels and independent Nakagami-m fading channels with α 1 = α 2 = 2. Fig. 5 shows the OP, P out (x), as a function of the threshold x (in dB) using either ideal hardware or hardware with impairments of level κ 1 = κ 2 = 0.15. For low thresholds, the OPs for AF (with fixed or variable gain) and DF are only slightly degraded by hardware impairments. The behavior is, however, very different as x increases; the ideal hardware case gives a smooth convergence towards 1, while the practical case of hardware impairments experiences a quick convergence to the respective SNDR ceilings. The value of these ceilings were derived in Corollary 1. As noted earlier, DF relaying is more resilient to hardware impairments and its SNDR ceiling is roughly twice as large as that of AF relaying.

The similar concept of an ergodic capacity ceiling is illustrated in Fig. 6, which shows the capacity of variable gain AF relaying as a function of the average SNR. Both channels are modeled as independent Nakagami-m fading with α 1 = α 2 = 2. The capacity is shown for ideal hardware and for hardware with impairments characterized by κ 1 = κ 2 ∈ {0.05, 0.15}. Fig. 6 confirms that hardware impairments have small impact at low SNRs, but are very influential at high SNRs. More precisely, the ergodic capacity saturates and approaches log 2 (1 +

1 κ 2 1 +κ 2 2 +κ 2 1 κ 2 2
), as proved by Corollary 2. As the capacity ceiling is determined by the level of impairments, it increases when κ 1 , κ 2 are decreased. Fig. 6 also shows the upper capacity bound from Theorem 3 and the simplified capacity approximation from [START_REF] Waqar | Tight bounds for ergodic capacity of dual-hop fixed-gain relay networks under Rayleigh fading[END_REF]. The former gives a somewhat tighter result, but both are asymptotically exact in the high-SNR regime. Although the expression [START_REF] Waqar | Tight bounds for ergodic capacity of dual-hop fixed-gain relay networks under Rayleigh fading[END_REF] was derived in an approximative manner, we observe that it can indeed be considered as an upper bound on the ergodic capacity and, more importantly, is far easier to evaluate.

C. Design Guidelines

We conclude this section by illustrating some of the guidelines for designing practical relaying systems that were ob- tained in Section V-A. For simplicity, we set ζ(κ) = κ and thus limit the hardware cost by having a total EVM constraint of 2 i=1 κ i,t +κ i,r = T max . Corollary 3 proved that the SNDR ceilings are maximized by setting all κ-parameters equal to Tmax 4 . It is intuitively clear that we should have κ 1,t = κ 1,r and κ 2,t = κ 2,r (see Lemma 1), but it is less obvious that the aggregate κ-parameters κ 1 and κ 2 should take the same value. To validate this property we consider an asymmetric setup where the first hop is twice as strong: SNR 1 = 2SNR 2 . The channels are modeled as independent Nakagami-m fading with α 1 = α 2 = 2. Fig. 7 shows the OP P out [START_REF] Samuel | Impact of RF impairments in cellular wireless metropolitan area networks[END_REF] for two different average SNRs on the first hop: SNR 1 ∈ {20, 30} dB. The horizontal axis shows the level of impairments of the first hop, κ 1 , while the parameter of the second hop is selected to yield κ 1 + κ 2 = 0.3. Despite the asymmetric SNRs, we observe that the OP with AF relaying (with either fixed or variable gain) is minimized by setting κ 1 = κ 2 = 0.3 2 . This shows that the design guideline in Corollary 3, which was obtained by high-SNR analysis, can be applied successfully at finite SNRs. We also observe that the OP with DF relaying is minimized by having a slightly higher hardware quality on the weakest hop than on the strongest hop. This indicates that our general guideline should not be seen as the true optimum, but as a starting point for further adjustments. Furthermore, in the extreme cases when one of the hops is ideal (κ 1 = 0 or κ 2 = 0) the system is in full outage; thus, having one ideal hop does not help if the other hop has poor hardware quality.

Based on these insights, we now elaborate on the case with symmetric levels of impairments: κ 1 = κ 2 . Suppose our system should operate using x = 2 4 -1 = 15 (i.e., 2 bits/channel use) and we want to achieve a certain value on the outage probability P out [START_REF] Samuel | Impact of RF impairments in cellular wireless metropolitan area networks[END_REF]. Fig. 8 shows the OPs for AF and DF relaying at two different average SNRs: SNR 1 = SNR 2 ∈ {20, 30} dB. Focusing on the 30 dB case and requiring that P out (15) ≤ 10 -2 , we can identify three possible hardware operating regimes from Fig. 8: 1) Fixed gain AF relaying with κ 1 = κ 2 ≤ 0.091; 2) Variable gain AF relaying with κ 1 = κ 2 ≤ 0.149;

3) DF relaying with κ 1 = κ 2 ≤ 0.218. The different acceptable levels of impairments show that sophisticated protocols (AF with variable gain relaying or, preferably, DF relaying) are more robust to hardware impairments and, thus, can operate with hardware of lower quality. Fig. 8 also shows the necessary conditions of Corollary 4, which act as upper bounds on the level of impairments that can possibly achieve an OP below 1. Although not sufficient, these necessary conditions provide a rough estimate of where the level of impairments must lie.

VII. CONCLUSIONS

Physical transceiver hardware introduces impairments that distort the emitted and received signals in any communication system. While the impact of individual hardware impairments (e.g., phase noise, I/Q imbalance, and HPA non-linearities) have been well investigated in the literature, it is the aggregate impact of all hardware impairments and the respective compensation algorithms determine the practical system performance. Motivated by this, we considered a generalized impairment model that has been validated in prior works for single-hop communications and applied it on flat-fading dual-hop relaying, considering both AF and DF protocols. Our analytical and numerical results manifested that the performance of dual-hop relaying is notably affected by these hardware impairments, particularly when high achievable rates are required. Closed-form expressions for the exact and asymptotic OPs were derived under Nakagami-m fading, along with tractable upper bounds and approximations for the ergodic capacities. These expressions effectively characterize the impact of impairments and demonstrate the existence of fundamental SNDR and capacity ceilings that cannot be crossed by increasing the signal powers or changing the fading conditions. Note that even very small hardware impairments will ultimately limit the performance. These observations also hold true for every individual subcarrier in dual-hop OFDM systems.

We finally derived some useful design guidelines for optimizing the performance of hardware-constrained relaying systems: 1) Use the same hardware quality on all transceivers; 2) Follow the necessary conditions in Corollary 4 to find hardware qualities that can achieve the required system performance; and 3) More sophisticated relaying protocols (e.g., DF) are also more robust to hardware impairments.

APPENDIX A USEFUL LEMMAS

This appendix contains some useful lemmas. The first lemma derives the cdf of SNDR-like expressions and is used to obtain the OPs under Nakagami-m fading. Proof: The cdf of Λ is defined as F Λ (x) = Pr{Λ ≤ x}. Since Λ in (46) is a function of both ρ 1 and ρ 2 , we apply the law of total probability to condition on ρ 2 . This gives

Pr{Λ ≤ x} = ∞ 0 Pr{Λ ≤ x|ρ 2 }f ρ2 (ρ 2 )dρ 2 (50) = 1 - ∞ 0 1 -Pr{Λ ≤ x|ρ 2 } f ρ2 (ρ 2 )dρ 2 = 1- ∞ b 1 x 1-dx 1 -F ρ1 (b2ρ2+c)x ρ2(1-dx)-b1x f ρ2 (ρ 2 )dρ 2 , x < 1 d , ∞ 0 (1 -1)f ρ2 (ρ 2 )dρ 2 = 0, x ≥ 1 d ,
where the third equality follows from evaluating the conditional probability Pr{γ ≤ x|ρ 2 } using Lemma 2. This proves that F Λ (x) = 1 for x ≥ 1 d . For x < 1 d , we further note that and gives (47). Furthermore, (b) follows by plugging in the cdf and pdf from ( 7)- [START_REF] Schenk | RF Imperfections in High-Rate Wireless Systems: Impact and Digital Compensation[END_REF]. The remaining integral is of the form in Lemma 4. The final expression in (48) follows from that lemma and some algebraic simplifications.

∞ b 1 x 1-dx 1 -F ρ1 (b 2 ρ 2 + c)x ρ 2 (1-dx) -b 1 x f ρ2 (ρ 2 )dρ 2 (a) = ∞ 0 1-F ρ1 b 2 x (1-dx) +
The following lemma summarizes an approach from [START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF]. The end-to-end SNDRs for non-ideal hardware in ( 13)-( 14) are of the form

ρ 1 ρ 2 ρ 1 ρ 2 d + ρ 1 b 1 + ρ 2 b 2 + c = ρ1ρ2 ρ1b1+ρ2b2+c ρ1ρ2 ρ1b1+ρ2b2+c d + 1 . ( 57
)
By defining ψ ρ1ρ2 ρ1b1+ρ2b2+c , it means that the ergodic capacity in ( 32) is of the form 1 2 E log 2 1 + ψ ψd+1 . We note that the function log 2 1 + ψ ψd+1 is concave of ψ for ψ ≥ 0, since its second derivative is -(2d 2 ψ + 2d(ψ + 1) + 1) (log e (2)(dψ + 1) 2 (dψ + ψ + 1) 2 ) < 0.

We can therefore apply Jensen's inequality to obtain

C AF ni = 1 2 E log 2 1 + ψ ψd + 1 ≤ 1 2 log 2 1+ E{ψ} E{ψ}d + 1 .
(59) Finally, the expectation = SNR i . By applying this on each expectation in [START_REF] Zhong | Generic ergodic capacity bounds for fixed-gain AF dual-hop relaying systems[END_REF], we obtain [START_REF] Høst-Madsen | Capacity bounds and power allocation for wireless relay channels[END_REF].

Fig. 1 .

 1 Fig. 1. Block diagram of AF/DF relaying with (a) ideal hardware or (b) non-ideal hardware with transceiver impairments modeled by the aggregate distortion noises η 1 , η 2 .

( 34 )

 34 where W •,• (•) denotes the Whittaker W function [39, Ch. 9.22]. The parameters b 1 , b 2 , c take different values for fixed and variable gain relaying and are given in Proposition 1.

3 x = 2 5 - 1 = 31 Fig. 2 .

 351312 Fig. 2. Outage probability Pout(x) for AF relaying with ideal hardware and with hardware impairments of κ 1 = κ 2 = 0.1.

5 - 1 = 31 Fig. 3 .

 51313 Fig. 3. Outage probability Pout(x) for DF relaying with ideal hardware and with hardware impairments of κ 1 = κ 2 = 0.1.

Fig. 4 .

 4 Fig. 4. Outage probability Pout(3) for fixed gain AF relaying with ideal hardware and with hardware impairments of κ 1 = κ 2 = 0.1. Different shape parameters α 1 , α 2 are considered in the fading distributions and different asymmetric SNRs: SNR 1 = µSNR 2 . The strongest channel has an SNR of 20 dB.

Fig. 5 .

 5 Fig. 5. Outage probability Pout(x) for AF and DF relaying for different thresholds x. As proved in Corollary 1, there exist SNDR ceilings under transceiver hardware impairments.

Fig. 6 .

 6 Fig.6. Exact and approximate ergodic capacity for variable gain AF relaying. As proved in Corollary 2, there exist capacity ceilings under transceiver hardware impairments.

Fig. 7 .

 7 Fig. 7. Outage probability Pout(15) AF and DF relaying for different levels of impairments κ 1 , κ 2 for which κ 1 + κ 2 = 0.3. The minimal value at each curve is marked with a ring.

SNR 1 =Fig. 8 .

 18 Fig. 8. Outage probability Pout(15) for AF and DF relaying for different symmetric levels of impairments κ 1 = κ 2 .

Lemma 3 : 2 × K n-k+1 2 b 1 b 2 x 2 β 1 β 2 ( 1 - 1 b j-k 2 β 2 k

 3221122 Suppose ρ 1 , ρ 2 are independent non-negative random variables with cdfs F ρi (•) and pdfs f ρi (•) for i = 1, 2. Let b 1 , b 2 , c, d be some positive scalars. The random variableΛ ρ 1 ρ 2 ρ 1 ρ 2 d + ρ 1 b 1 + ρ 2 b 2 + c (46)has a cdf F Λ (x) = 0 for x < 0, F Λ (x) = 1 for x ≥ 1 d , andF Λ (xx < 1 d . Next, let ρ 1 ∼ Gamma(α 1 , β 1 ) and ρ 2 ∼ Gamma(α 2 , β 2 ), where α 1 , α 2 are strictly positive integers. Then, (47) becomesF Λ (x) = 1-2e dx) 2 + cx β 1 β 2 (1 -dx) (48)where K ν (•) denotes the νth-order modified Bessel function of the second kind and C(j, n, k) b α2-n-1 ! (jk)! n! (α 2 -n -1)! . (49)

  follows from a change of variables z = ρ 2 -b1x 1-dx

Lemma 4 : 0 x + c 1 p1 1 x + c 2 p2 2 K n-k+1 ( 2 √ c 3 c 4 1 c p2-k 2 ∞ 0 xc 3 c 4 n-k+1 2 K n-k+1 ( 2 √ c 3 c 4 )

 4022241204224 For any constants c 1 , c 2 , c 3 , c 4 with (c 3 ) > 0, (c 4 ) > 0 and some positive integers p 1 , p 2 , we have ∞ ) .(52) Note that (•) denotes the real part of a complex number.Proof: The binomial formula gives the expansionsx transform the left-hand side of (52) into n-k e -( c 3 z +zc4) dx.(55)Finally, (55) is transformed into the right-hand side of (52) by using the integral identity ∞ 0x n-k e -( c 3 z +zc4) dx = 2

E log 2 1

 1 ) by using the moment generating function derived in[START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF] Theorem 3].11 Proof of Theorem 4It was shown in the proof of Theorem 3 above that 's inequality and the fact that log 2 (1 + ψ ψd+1 ) is a concave function of ψ for ψ ≥ 0. In our case, we set ψ = Piρi Ni , for i = 1, 2, thus E{ψ} = PiEρ i {ρi} Ni

  r ), where ζ(•) is a continuously decreasing, twice differentiable, and convex function. The convexity is motivated by diminishing returns; that is, highquality hardware is more expensive to improve than lowquality hardware. The following corollary provides insights for hardware design.Corollary 3: Suppose 2 i=1 ζ(κ i,t ) + ζ(κ i,r ) = T max for some given cost T max ≥ 0. The SNDR ceilings in (42) are both maximized by κ 1,t = κ 1,r = κ 2,t = κ 2,r = ζ -1 Tmax it is maximized by κ i,t = κ i,r for any fixed value on κ i,t + κ i,r[START_REF] Jorswieck | Majorization and matrix-monotone functions in wireless communications[END_REF] Theorem 2.21]. In addition, for any fixed value A

	4	.
	Proof: The proof goes by contradiction. Assume
	κ * 1,t , κ * 1,r , κ * 2,t , κ * 2,r is the optimal solution and that these
	EVMs are not all equal. The hardware cost is a Schur-convex
	function (since it is convex and symmetric [41, Proposition
	2.7]), thus the alternative solution κ 1,t = κ 1,r = κ 2,t = κ 2,r = 2 i=1 κ * i,t +κ * i,r 4 reduces the cost [41, Theorem 2.21].
	To show that the alternative solution also improves the SNDR
	ceilings, we first note that κ 2 i = κ 2 i,t + κ 2 i,r is a Schur-convex
	function, thus

Note that the Gaussian assumption holds particularly well for the residual distortion when compensation algorithms are applied to mitigate hardware impairments[START_REF] Studer | MIMO transmission with residual transmit-RF impairments[END_REF].

The effective distortion noise can be seen as two independent jointly Gaussian variables ηt and ηr/h that are multiplied with the fading channel h. The effective distortion noise is thus only complex Gaussian distributed when conditioning on a channel realization, while the true distribution is the product of the complex Gaussian distribution of the distortion noise and the channel fading distribution. This becomes a complex double Gaussian distribution under Rayleigh fading[START_REF] O'donoughue | On the product of independent complex Gaussians[END_REF], while the distribution under Nakagami-m fading does not admit any known statistical characterization.

The EVM at the transmitter is defined as Eη t {|ηt| 2 }/Es{|s| 2 } [26]. 3GPP LTE has EVM requirements in the range κt ∈ [0.08, 0.175], where smaller values are needed to support the highest spectral efficiencies [27, Sec. 14.3.4].

The assumption of integer shape parameters is made to facilitate the, otherwise tedious, algebraic manipulations for the Nakagami-m fading case.

We recall that Nakagami-m fading reduces to the classical Rayleigh fading with variance Ω i when α i = 1 and β i = Ω i ; thus, Nakagami-m fading brings more degrees-of-freedom for describing practical propagation environments and has been shown to provide better fit with real measurement results in various multipath channels[START_REF] Sheikh | Indoor mobile radio channel at 946 MHz: Measurements and modeling[END_REF].

This is easy to see when κ 1 , κ 2 have the same value κ > 0, which gives γ * = 1 κ 2 for DF relaying and γ * = 1 2κ 2 +κ 4 < 1 2κ 2 for AF relaying.

There are four transceiver chains: transmitter hardware at the source, receiver and transmitter hardware at the relay, and receiver hardware at the destination.

We found a typo in[32, Eq. (7)]: the first minus sign in M Λ (s) should be a plus sign. This mistake is also seen in[START_REF] Senaratne | Unified exact performance analysis of two-hop amplify-and-forward relaying in Nakagami fading[END_REF] Fig. 3] where the first derivative of M Λ (s) appears to be negative, although it must be positive at s = 0 since this represents the mean of a non-negative random variable.

ACKNOWLEDGMENTS

The authors would like to thank Dr. Agisilaos Papadogiannis for the indispensable discussions and collaboration that led to our joint prior works on this topic.

E. Björnson is funded by the International Postdoc Grant 2012-228 from The Swedish Research Council. This research has been supported by the ERC Starting Grant 305123 MORE (Advanced Mathematical Tools for Complex Network Engineering). The work of M. Matthaiou has been supported in part by the Swedish Governmental Agency for Innovation Systems (VINNOVA) within the VINN Excellence Center Chase. Digital Object Identifier 10.1109/TCOMM.2013.100913.conducted in our recent paper [20].