Resource Allocation in HS-OFDM-based PLC Systems : A Tutorial

This work organizes and discusses important information on resource allocation in power line communication (PLC) systems based on the Hermitian symmetric orthogonal frequency-division multiplexing scheme. In the context of this work, the term resource refers to bits and transmission power, which can be optimally or sub-optimally allocated to subcarriers on the basis of the knowledge of the normalized signal-tonoise ratio (nSNR) of power line subchannels. In this sense, we thoroughly discuss the formulation of the resource allocation for PLC systems and accordingly derive expressions for the nSNR as well as bit and transmission power allocation in all subchannels. Additionally, we precisely detail greedy algorithms to assist practitioners and researchers in the implementation of the resource allocation procedure. Considering a frequency-selective PLC channel corrupted by additive colored Gaussian noise as well as M-ary pulse amplitude modulation and quadrature amplitude modulation as modulation schemes, the influence of the gap from the Shannon capacity curve on symbol error rate probability is discussed. On top of the carried out discussion, numerical results are presented in order to emphasize the usefulness of a proper comprehension of this subject.


I. INTRODUCTION
Digital communication technologies have been growing rapidly in the last decades due to factors such as the adoption of multicarrier schemes [1], [2], which optimize data transmission over frequency-selective channels.Among these schemes prevails the orthogonal frequency-division multiplexing (OFDM), which divides the total frequency band available for data transmission into orthogonal subchannels.The main advantage of OFDM is its greater robustness, which comprises its capacity to deal with narrowband interference (NBI) and handle intersymbol interference (ISI) due to the frequencyselective nature of data communication channels, the avoidance of interference among primary users, and the possibility of sharing channel resources in a feasible and efficient manner.
Wired digital communication systems such as power line communication (PLC) [3]- [5] and digital subscriber line (DSL) systems are the ones that benefit from the so-called Hermitian symmetric OFDM (HS-OFDM) scheme [1] or discrete multitone modulation (DMT), which is the baseband version of the OFDM scheme.In contrast to the OFDM system, the symbol transmitted in the HS-OFDM scheme undergoes a hermitian symmetric mapping, resulting in a real signal for transmission over a baseband data communication channel.The frequency selectivity of such channel and the power spectral density (PSD) of the additive noise can by optimally handled by the HS-OFDM scheme via a resource allocation procedure, which consists of efficiently allocating the available transmission power and bits among the available subcarriers.
The resource allocation procedure for OFDM-based schemes relies on the full or partial availability of the channel state information (CSI), which comprises channel frequency response (CFR) and additive noise PSD.This, however, does not rule out the possibility of performing such procedure under complete lack of CSI.Differently from wireless systems, the coherence time of PLC channels allows us to synthesize the CSI into a parameter called normalized signal-to-noise ratio (nSNR) [6]- [8], which can also be named channel-to-noise ratio [9]- [11], based on which the number of bits and the transmission power allocated to the subcarriers are defined.If imperfect CSI is available, most resource allocation techniques will provide suboptimal performance, except for more robust ones [12].Normally, resource allocation problems can be formulated based on one of the following criteria: • Rate-adaptive (RA): maximizes the data rate given a maximum transmission power constraint [7], [13].
The solution of the resource allocation problem is conventionally accomplished by the so-called bit loading algorithm.The latter has as inputs, among other parameters, the available transmission power, the nSNR at all subcarriers, and the gap from the Shannon capacity curve, which can be used for imposing a symbol error rate (SER) upper bound.Such algorithm is then responsible for allocating bits and transmission power to the subcarriers given an optimal or suboptimal criterion, satisfying the constraints of the MA or RA problem.Among the most adopted bit loading algorithms in the literature are the water filling (WF) algorithm [16]- [19], Chow's algorithm [20], [21] and the Levin-Campello algorithm [22]- [27].The WF algorithm provides an optimal allocation in the sense of nonquantized number of bits, whereas the Chow's algorithm and the greedy Levin-Campello algorithm offer allocations in the sense of quantized number of bits [28].Between the two latter cited algorithms, the former provides suboptimal results that are an approximation of what is obtained by the WF algorithm, while the latter is based on the so-called greedy algorithms and, therefore, provides an optimal solution for a discrete bit allocation problem.Besides performing an optimization in the sense of transmission power or data rate, the solution of a resource allocation problem can also aim to guarantee quality of service (QoS) and communication reliability, which can be accomplished by imposing an SER upper bound, among other constraints such as bit error rate (BER) upper bounds.In this context, several works in the literature carried out discussions on resource allocation in OFDM-based digital communication systems [2], [6], [13], [29]- [43].
Focusing on PLC, recent research indicates that resource allocation plays an important role in trending topics in the field.As an example, in physical layer security applications [44]- [46], a resource allocation procedure where the power received by the eavesdropper is minimized can be performed.Also, a distribution of subcarriers among multiple sensors that constitute a fault sensing system in a wired network has been under study [47], [48].Energy harvesting techniques [49], [50] aim to exploit information that is also of interest in resource allocation techniques, which are energy of noise components and transmission power, in order to improve energy efficiency and creating self-sustainable data networks.Further examples are studies on cooperative communication [51], [52] and data communication through hybrid PLC-wireless channels [53], [54], which use optimal allocation via WF algorithm in order to evaluate system performance bounds.
Regarding computational complexity reduction, resource allocation techniques that perform compression of temporal or spectral information that are fed to the bit loading algorithm have also been given attention [6], [7], [31].Among the cited works, it is worth highlighting [7], which proposes solutions for the resource allocation problem in a scenario constituted by a PLC channel with linear periodically time-variant (LPTV) behavior and cyclostationary additive noise.One of these solutions, which is the combination of the spectral compressive resource allocation (SCRA) and temporal compressive resource allocation (TCRA) techniques, is sensible to both spectral and temporal characteristics of the communication channel and can provide optimal or suboptimal allocations with remarkably reduced computational complexity.The results presented in [7] also illustrate the importance of resource allocation with reduced complexity in OFDM-based systems that work in rough environments, such as high-voltage, medium-voltage and low-voltage power lines.
Although resource allocation in OFDM-based PLC systems has been widely investigated and applied to other research subjects, a single work that gathers and discusses its basic concepts is not present in the literature.In fact, several works address only specific aspects of the resource allocation problem.Among these, [42] sketches an RA resource allocation procedure for PLC systems impaired by additive impulsive Gaussian noise, deriving equations for bit and energy allocation, taking into consideration an SER constraint and data rate maximization.However, a detailed formulation, as well as a discussion on a formulation for the MA case and on recurrent issues in the implementation of the procedure are missing in the paper.As further examples, we have [6], [7], [31], [32], which despite addressing procedures for optimizing the resource allocation and providing results in terms of data rate, error rate, among others, do not discuss the application of the obtained allocation (bits and power or energy to be applied to each subcarrier) to the modulation of the data to be transmitted.Although rather simple at first sight, such discussion is essential, since some works in the literature present improper use of concepts such as power and energy definitions, which can result in the incorrect application of the obtained allocation and performance that differs from the expected in terms of data rate.The most common issues are the misuse of power and energy concepts and the inconsistency of nomenclatures.
In this sense, this work presents a complete and comprehensive discussion on the resource allocation procedure for PLC systems, addressing the most common issues related to it and dealing with the aspects of SER constraint, as well as data rate maximization for RA problems and total transmission power minimization for MA problems.Additionally, this work carries out a case study on the solution of an RA problem for a given OFDM-based baseband digital communication system in order to consolidate and illustrate the carried out discussion.The contributions of this work can be summarized as follows: • Comprehensive contextualization of the resource allocation problem for PLC systems based on HS-OFDM scheme, with definition of parameters and reinforcement of necessary concepts for its solution.
• Guidance for practitioners and researchers who are not familiar with the theme, facilitating the understanding of important concepts.• Addressing of recurrent issues in the literature associated with the implementation of the resource allocation procedure.The rest of this paper is organized as follows.Section II contextualizes the resource allocation problem, describing the digital communication system in question.Section III describes the resource allocation problem thoroughly, presenting its entire mathematical formulation and addressing it in different aspects.Section IV carries out a case study, in which the resource allocation problem is solved for a scenario constituted by a measured PLC channel and a modeled colored additive noise.Finally, concluding remarks are placed in Section V.

II. PROBLEM FORMULATION
In order to start our discussion, let us consider a PLC system based on the HS-OFDM scheme.Assuming a duration of T symb seconds for an HS-OFDM symbol with cyclic prefix so that T symb ≪ T c , where T c denotes the coherence time of the LPTV PLC channel, we can consider that the communication channel is linear time-invariant (LTI) for HS-OFDM symbols transmitted within an interval of T c seconds.In this sense, the vectorial representation of the channel impulse response (CIR) in the discrete-time domain is in which L h is the length of the CIR and (•) T denotes the transpose operator.The vectorial representation of the zero-padded version of the vector h in the discrete-frequency domain , where W 2N ∈ C 2N×2N is the 2N × 2N discrete Fourier transform (DFT) matrix and 0 2N−L h is a column vector constituted by 2N − L h zeros.
The adoption of an HS-OFDM scheme is due to the fact that data transmission takes place in the baseband, i.e. the frequency band ranges from 0 up to B Hertz.In this scheme, the sampling frequency is F s = 2B, the cyclic prefix length is L cp ≥ L h − 1 and the number of subcarriers is equal to N. Thus, the i th HS-OFDM symbol carries the information vector is associated with b C,l bits with mean constellation energy , where C l is a random variable that models C i,l and E{•} is the expectation operator.In this scheme, the vector C i is mapped into the i th HS-OFDM symbol, expressed in the discrete-frequency domain by unlike the OFDM scheme, the symbol length in the HS-OFDM scheme is 2N if cyclic prefix is disregarded.Such mapping, called Hermitian symmetric mapping, is performed so that the k th element of X i is given by [55] where ℜ{•} and ℑ{•} denote the real and imaginary parts of a complex number, respectively, and (•) * denotes the complex conjugate operator.Figure 1 illustrates the Hermitian symmetric mapping.In this figure, C i is represented with its element l = N − 1 highlighted.The remaining elements of this vector are represented by diagonal stripes.The vector X i , which results from the application of the Hermitian symmetric mapping on C i , is also represented in this figure.Note that the elements k = 0 and k = N of X i receive the real and imaginary parts of C i, N−1 , respectively, whereas the elments k = 1 to k = N − 1 of X i receive the elements l = 0 to l = N − 2 of C i and the elements In this context, the vectorial representation of the i th HS-OFDM symbol in the discrete-time domain can be written as Fig. 1: Hermitian symmetric mapping.
power associated with x i is expressed as In this work, the additive noise that impairs the i th HS-OFDM symbol is modeled as a wide-sense stationary (WSS) colored Gaussian random process, which is vectorially represented in the discrete-frequency domain by Assuming that the two-sided PSD of the additive noise is flat within each subband, we can represent it as the vector is the PSD of the noise at the k th subchannel and B s = F s /2N is the subchannel frequncy bandwidth.
Based on the characteristics of the channel and the additive noise of the described baseband digital communication system and assuming that complete CSI (i.e., CFR of the PLC channel and PSD of the additive noise) is available at the transmitter side, the resource allocation can be performed.In this work, the term resource refers to the transmission power and the number of bits b C,l that are allocated based on the subchannel nSNR.In this context, Section III carries out a discussion on both MA and RA problems and their solutions.

III. RESOURCE ALLOCATION
As data transmission takes place in the baseband, the resource allocation is performed for the N elements of C i , with distinct allocations for the real and imaginary parts of the element l = N − 1, due to their transmission over distinct subchannels as seen in (1).Therefore, the information vector associated with the i th HS-OFDM symbol, C i , is rearranged into the resource allocation vector D i , expressed as in which the q th element of D i is given by This mapping is represented in Figure 2, where the vectors C i , highlighting its element l = N − 1, and D i , obtained from C i via the mapping in (4), are shown.Note that the elements q = 0 and q = N of D i receive the real and imaginary parts of C i, N−1 , respectively, while the elements q = 1 to q In this sense, the resource allocation procedure operates on an N + 1-length vector, performing distinct allocations for D i,0 and D i, N , which correspond to the real and imaginary parts of the complex element C i, N−1 .For these elements of D i , it is recommended to adopt unidimensional digital modulation schemes.On the other hand, bidimensional digital modulation schemes are applied to the remaining elements of the vector D i .For the sake of simplicity, this work adopts the unidimensional M-ary pulse amplitude modulation (M-PAM) and bidimensional M-ary quadrature amplitude modulation (M-QAM), in which M denotes the constellation size.
Since the transmission power associated with each element of D i is only defined after the resource allocation, the definition of its value cannot be based on the signal-to-noise ratio (SNR).In fact, the SNR depends on the transmission power associated with the q th element of D i , being expressed as where P D,q is the transmission power associated with the q-th element of the vector D i .An SNR vector can be thus denoted by . Therefore, the resource allocation must be based on the nSNR, which is the SNR obtained when the transmitter allocates unit power to all D i elements.The nSNR associated with the q th element of D i is denoted by [7] with the nSNR vector being expressed as . For the sake of simplicity, this vector can be represented by the diagonal matrix ) , in which diag{•} inserts a vector into the main diagonal of a square matrix whose remaining elements are equal to zero.Note that, in PSfrag replacements Fig. 2: Mapping from (4).
(5), as well as in ( 6), the additive noise PSD is multiplied by This is done in order to make an one-sided equivalent from the two-sided S V,q and therefore compensate the effect of the mapping performed by ( 1).An evidence of the need of this factor is the fact that the elements being therefore doubly affected by the additive noise.
The concepts which we name SNR and nSNR in this paper are presented in a fuzzy way throughout the literature.As an example, [43] states that transmitters define the number of bits to be transmitted as function of the channel state, which would be quantified by what it calls SNR.Next, it is said that the effective SNR is given by the product of the so-called SNR and the power allocated to the respective subcarrier.As the definition of SNR is the ratio between the received power and the additive noise power, the resource allocation cannot be based on it.In fact, it must be performed based on the nSNR, as previously discussed.As the nomenclature, such as in [43], may be misleading, definitions and nomenclatures can be harmonized by replacing the terms SNR and effective SNR by nSNR (or channel-to-noise ratio, as in [9]- [11]) and SNR, respectively.
The data rate maximization under maximum total transmission power constraint is obtained with the solution of a resource allocation problem that satisfies the RA criterion, which allocates part of the total transmission power and bits to each element of D i .For the sake of simplicity, this problem can be represented by [7] [Λ b D , in which f R A (•) is a bit loading algorithm that adopts the RA criterion for performing the resource allocation and returns the number of bits and the fraction of transmission power that is allocated to each element of }, with b D,q ≥ 0 being the number of bits associated with the q th element of D i , whose transmission requires power P D,q ≥ 0; P t,max > 0 is the maximum transmission power to be distributed among the N + 1 elements of D i , so that P t,max ≥ P t = Tr(Λ P D ), where Tr(•) is the trace operator; Γ refers to a gap factor from the Shannon capacity curve (see discussion in Subsection III-B) that accounts for the deployment of practical modulation and coding schemes [37], [40], [56] and T is the bit granularity vector of the resource allocation problem, whose element β q ∈ R is the number of bits that can be allocated to the q th element of D i at each iteration of the bit loading algorithm.In the specific case of uncoded schemes, we have β q ∈ Z.As the elements q = 0 and q = N of D i are associated with an unidimensional digital modulation scheme, we assign granularity β 1D to both of them.Additionally, we assign granularity β 2D to the remaining elements, i.e., q = 1 to q = N − 1, as they are associated with a bidimensional digital modulation scheme.Therefore, the elements β 0 to β N of the vector β can be expressed as The data rate obtained after the solution of the resource allocation problem is given by [7] in which the HS-OFDM symbol time duration is expressed by Finally, the diagonal matrix containing the necessary energy to transmit information through the channel is expressed as in which E D,q = 2N P D,q is the mean constellation energy of the constellation used for the q th element of D i .The minimization of the total transmission power under minimum data rate constraint, in its turn, is obtained with the solution of a resource allocation problem that satisfies the MA criterion, which allocates bits to each element of D i so that the total transmission power is the minimum possible.This problem can be modeled by [7] in which f M A (•) denotes a bit loading algorithm that performs resource allocation adopting the MA criterion for returning the number of bits and the fraction of transmission power allocated to each element of D i , and R min > 0 is the minimum data rate to be achieved.
In order for the resource allocation obtained from either (7) or (10) to be applied to the information to be transmitted, i.e., C i , the Hermitian symmetric mapping described in (1) must be taken into account.An analysis of this mapping shows that the elements k = 1 to k = N −1 and k = N +1 to k = 2N −1 of X i are, together, the double-sided equivalent from the elements l = 0 to l = N − 2 of C i , which, according to (4), correspond to the elements q = 1 to q = N − 1 of D i , respectively.Therefore, in order to apply the allocation obtained for the one-sided vector D i , these elements of C i must be modulated with half the energy obtained from the solution of the resource allocation problem, i.e., On the other hand, the allocations obtained for the elements q = 0 and q = N of D i are directly applied to the real and imaginary parts, respectively, of the element Such assignment of energy values obtained from the solution of the resource allocation problem to the elements of C i can be represented by On the other hand, the number of bits obtained from the solution of the resource allocation problem can be directly applied to define the constellation size for the corresponding elements of C i , since the Hermitian symmetric mapping does not alter the transmitted information.Thus, we have It is important to emphasize that the energy associated with the element l = N −1 of C i is shared between two unidimensional constellations, with the real part of this element being modulated with mean energy equal to E D,0 and b D,0 bits, whereas the imaginary part of this element is modulated with mean energy equal to E D, N and b D, N bits.The resource allocation problems described in ( 7) and ( 10) were formulated based on the transmission power, with its solution resulting in the obtaining of the Λ P D matrix, on which the calculation of the Λ E D matrix is based.Although this solution seems to be straightforward, some works make improper use of power and energy definitions, which may be misleading when implementing the resource allocation procedure.As an example, an analysis of [33] reveals that it constantly switches between the terms power and energy when referring to the same quantity.In order to clarify this issue and show a different interpretation of the resource allocation procedure, we reformulate the aforementioned problems so that they are based on energy instead of transmission power, as discussed in [56].For such kind of resource allocation problem, the nSNR must also be written in terms of energy, i.e., Thus, the resource allocation problem based on the RA criterion can be described by whereas the resource allocation problem based on the MA criterion can be described by in which , with E t = 2N P t being the total energy of an HS-OFDM symbol.
Note that the resource allocation problems described in ( 14) and ( 15) are equivalent to the ones from ( 7) and (10), respectively, with the relationship among Λ E D , Λ γ E D and E t,max and their equivalents in terms of power as previously described.On the other hand, Λ b D , Γ and β are identical to the ones from ( 7) and (10).These considerations added to the fact that the obtained allocation is equally applied, as seen in ( 11) and (12), result in the same data rate and the same total transmission power regardless of the adopted criterion.
Focusing on practical applications, this work adopts the approach based on transmission power.It is important to highlight that, due to the time-varying behavior of the PLC channel, the obtained allocation may only be valid during an interval shorter than the coherence time T c and, therefore, must be performed once every T c seconds.The solution of the resource allocation problem requires a careful analysis of particularities of the f R A (•) and f M A (•) functions as well as their input parameters, which is discussed in Subsections III-A and III-B.

A. Bit loading algorithm
The procedure performed by the resource allocation functions f R A (•) and f M A (•) can be described by the so-called bit loading algorithm.In this work, we discuss greedy bit loading algorithms whose executions consist of optimally allocating quantized number of bits and fraction of the total transmission power to the respective elements of D i , aiming to (i) satisfy a maximum total transmission power constraint P t,max and maximize the number of allocated bits (for the RA criterion) or (ii) satisfy a minimum data rate constraint R min and minimize the total transmission power (for the MA criterion).Based on these considerations and knowing that Λ b D and Λ P D depend upon one another, the optimization problem for the resource allocation based on the RA criterion can be written as in which Λ β = diag{β}.On the other hand, the optimization problem for the resource allocation based on the MA criterion can be represented by It is worth highlighting that, for both RA and MA problems from Eqs. ( 16) and ( 17), the constraint + means that the allocated bits Λ b D are quantized with granularities Λ β and is not necessarily integer.It is also important to mention that additional constraints related to hardware limitations, QoS, as well as goals of a specific application can be added to the optimization problems described by ( 16) and (17).We, however, focus on the aforementioned basic constraints in order to provide understanding of a generic resource allocation procedure for PLC systems.The solution of resource allocation problems based on the RA and MA criteria can be achieved by adopting the algorithms mentioned in Section I.Among them, the WF algorithm yields the optimal solution for the transmission of Λ b D ∈ R (N+1)×(N+1) + bits, with the absence of the granularity vector β, i.e., any real number of bits can be allocated.
Although it is the optimal solution, the number of bits allocated to each subcarrier is non-quantized and, therefore, its transmission may require the use of complex coding schemes.To circumvent this inconvenience, the resource allocation problem can be solved by a greedy algorithm, which obtains an optimal solution in terms of quantized number of bits, i.e., Λ b D Λ −1 β ∈ Z (N+1)×(N+1)

+
. Therefore, the solution of resource allocation problems based on RA and MA criteria via greedy algorithm allows practical implementations and is widely adopted for resource allocation in PLC systems [6], [7], [32].In this sense, we adopt the Levin-Campello algorithm [22]- [27], which is carefully described as follows.
First, remind that the elements q = 0 and q = N of D i are associated with symbols belonging to an M-PAM constellation, whereas the elements q = 1, 2, • • • , N − 1 are associated with symbols belonging to an M-QAM constellation.In both cases, the constellation size is equal to M q = 2 b D,q .Therefore, the number of bits associated with the transmission power P D,q and, therefore, with the energy E D,q , is expressed as [56] b Rearranging ( 18), we have that the transmission power P D,q is expressed as Note that P D,q is a function of b D,q .Thus, this relationship can be made clear by defining P D,q = P q b D,q , in which P q (•) is a function that calculates the transmission power necessary for allocating the number of bits given as input parameter to the q th element of D i .Therefore, if β q additional bits are transmitted, an additional amount of power will be required.This complementary power is called incremental transmission power and it is defined as in which p q (b D,q , β q ) is a function that calculates the incremental transmission power for the q th element of D i given b D,q already allocated bits.For the sake of simplicity, the subscript q will be omitted from p q (•, •) and P q (•) henceforth.
Based on ( 19), ( 20) can be rewritten as In order to simplify the implementation of the greedy algorithm, we define the incremental power vector P inc = P inc,0 , P inc,1 , • • • , P inc, N T , in which P inc,q = p(b D,q , β q ).
It is worth mentioning that for given channel and noise conditions, which define P inc at each iteration of the bit loading algorithm, and a given bit granularity matrix Λ β , using the obtained rate with the RA criterion for solving the MA problem yields the same power and bit distribution among the elements of D i as using the total allocated power with the MA criterion for solving the RA problem.In other words, the RA and MA resource allocation problems are equivalent.
Based on those concepts, we next describe the execution of the Levin-Campelo algorithm for both RA and MA problems.
1) Levin-Campello algorithm based on the RA criterion: Based on this formulation, the execution of the adopted greedy algorithm begins with the initialization of the number of bits and the transmission power associated with the q th element of D i as zero, i.e., b D,q = 0 and P D,q = 0 for q = 0, 1, • • • , N. Therefore, all elements of P inc are initialized as P inc,q = p(0, β q ).
Next, the vector P inc is analyzed and β q bits are added to b D,q such that q = arg min 0≤i ≤ N {P inc,i }.The power associated with the transmission of those bits is added to the total allocated power P t .In sequel, the incremental transmission power is recalculated for this element of D i and P inc is updated.This procedure goes on until the minimum incremental transmission power is larger than the remaining power to be distributed among the elements of D i , i.e. min 0≤i ≤ N {P inc,i } > P t,max − P t .Once that happens, the greedy algorithm interrupts its execution and the number of bits b D,q , as well as the transmission power P D,q are obtained for the N + 1 elements of D i .The procedure performed by this algorithm, i.e., the implementation of the f R A (•) function and therefore the solution for the optimization problem from ( 16), is represented in Algorithm # 1.
2) Levin-Campello algorithm based on the MA criterion: The formulation for this case is similar to the one for the RA criterion, except for the constraint to be safistied, which in this case is the minimum data rate R min .In this sense, the execution of the adopted greedy algorithm with MA criterion begins exactly as in the greedy algorithm with RA criterion, i.e., initializing the number of bits and the transmission power associated with the q th element of D i as zero, i.e., b D,q = 0 and P D,q = 0 for q = 0, 1, • • • , N. Again, all elements of P inc are initialized as P inc,q = p(0, β q ).
Next, the vector P inc is analyzed and β q bits are added to b D,q such that q = arg min 0≤i ≤ N {P inc,i }.Following, the incremental power is recalculated for this element of D i and P inc is updated.This procedure goes on until the number of allocated bits, denoted by B t , is greater than or equal to R min T symb , i.e., the data rate is greater than or equal to R min .Once that happens, the greedy algorithm interrupts its execution and the number of bits b D,q , as well as the transmission power P D,q are obtained for the N + 1 elements of D i .The procedure performed by this algorithm, i.e., the implementation of the f M A (•) and, therefore, the solution for the optimization problem portrayed in (17), is represented in Algorithm # 2.

B. Considerations on the gap
According to (18), the gap Γ from the Shannon capacity curve and the nSNR associated with the q th element of D i , Algorithm # 1: Levin-Campello algorithm based on the RA criterion.input : is the nSNR matrix for resource allocation P t,max is the maximum transmission power to be distributed Γ is the gap from the Shannon capacity curve is the bit granularity vector of the resource allocation problem output: } is a diagonal matrix containing the number of bits allocated to each element of D i } is a diagonal matrix containing the power allocated to each element of D i begin for q = 0 a N do b D,q = 0; P D,q = 0; b D,q = b D,q + β q ; P D,q = P D,q + P inc,q ; P t = P t + P inc,q ; P inc,q = p(b D,q , β q ); end end which can also be interpreted as a power loss factor, determines how many bits will be transmitted by an HS-OFDM symbol.Given the importance of this parameter, this subsection discusses the effects of Γ on the performance in terms of SER of the PLC system based on the HS-OFDM scheme.
Let us consider that the HS-OFDM-based system in question is uncoded and transmits data over a channel impaired by colored Gaussian noise.Additionally, let us consider that the subchannel frequency bandwidth is sufficiently small, so that it is valid to assume that each subchannel is impaired by additive white Gaussian noise (AWGN) and the channel attenuation is flat.Under such conditions, the gap factor from the Shannon capacity curve is a measure of proximity to the theoretical maximum achievable data rate.This upper bound for the data rate is called channel capacity and is defined for Algorithm # 2: Levin-Campello algorithm based on the MA criterion.input : is the nSNR matrix for resource allocation R min is the minimum data rate to be achieved Γ is the gap from the Shannon capacity curve is the bit granularity vector of the resource allocation problem output: } is a diagonal matrix containing the number of bits allocated to each element of D i } is a diagonal matrix containing the power allocated to each element of D i begin for q = 0 a N do b D,q = 0; P D,q = 0; B t = B t + β q ; P D,q = P D,q + P inc,q ; P inc,q = p(b D,q , β q ); end end the q th element of D i as [56] Note that ( 22) is equal to (18) when Γ = 1 (that is, 0 dB), i.e., there is no gap from the Shannon capacity curve.As Γ increases, the maximum achievable data rate is reduced.On the other hand, a decreasing SER upper bound is imposed, as discussed in sequel.
Besides having influence on the data rate, Γ defines an upper bound for the SER.In order to investigate it, let us still consider that the elements q = 0 and q = N of D i are associated with M-PAM constellation, whereas the elements q = 1, 2, • • • , N − 1 are associated with M-QAM constellations.Thus, SER associated with the q th element of D i is expressed by [56] in which [56] and d q is the minimum distance between neighbor points of the constellation associated with the q th element of D i , given by [56] Based on (23), we can define an upper bound for the SER associated with the q th element of D i as Note that, the higher M q , the more the exact SER ξ q approaches this upper bound.Applying (25) to (26), we have We also know that γ D,q = P D,q γ D,q = E D,q γ E D,q , since the SNR can be described in terms of power or energy.Thus, according to (13), the SNR can be expressed by (5), as well as by In this sense, based on (28), the SER upper bound from ( 27) can be rewritten as Rearranging the expression for the number of bits from (18), we have that the gap from the Shannon capacity curve is given by in which γ D,q = P D,q γ D,q .Based on (30), Γ can be also named SNR gap, as in [56], and normalized SNR, as in [57].The name SNR gap is due to the fact that Γ can be expressed as a quantity that results from the division of the SNR γ D,q by 2 b D,q − 1, which corresponds to the SNR minus a gap if the values are analyzed in dB.On the other hand, the name normalized SNR can be interpreted as the SNR normalized by the constellation size M q = 2 b D,q .Finally, based on (30), we can rewrite the SER upper bound from (29) as Based on a conservative point of view, we assume that the SER upper bound is given by the worst case, i.e., [56] for q = 0, • • • , N. Note that this limit can be used for all subchannels and depends only on Γ.Therefore, it can also be used for adding an SER constraint to the resource allocation problem.In other words, considering that a peak SER smaller than ξ c is desired, Γ must be chosen such that ξ c = 4Q( √ 3Γ).It is important to mention that a more exact approach must consider the effects of error-correcting codes [58] and a margin, which takes into account, among other impairments, real-systems losses caused by procedures such as equalization, symbol and clock synchronization and quantization on the performance in terms of SER of the HS-OFDM scheme.Considering such effects, a given SER constraint ξ c , which would be satisfied by adopting Γ = Γ uncod , will be satisfied only if in which Γ uncod is the gap from the Shannon capacity curve for a uncoded HS-OFDM scheme, disregarding the margin, while Γ cod and Γ mar are fixed parameters that denote the coding gain and the margin, respectively.As the BER is usually preferred as a metric for evaluating the overall performance of digital communication systems over the SER, it is sometimes interesting to consider it in the resource allocation problem.Considering small SER and Gray coding, we can write where ζ q denotes the BER associated with the q th element of D i .Therefore, (32) can be written in terms of BER as Note that Γ also imposes a BER upper bound.However, unlike the SER upper bound, which is valid for all elements of D i , the obtained BER upper bound is only valid for the elements of D i individually, as the BER depends on the number of bits allocated to each element of D i .Therefore, the BER upper bound from (35) can only be used after performing the resource allocation procedure, as it depends on results from the latter.Alternatively, approximations for the BER at a subchannel given noise power and number of allocated bits, which is not known a priori, are used in the formulation of [59]- [61] in an extra step of a resource allocation technique, and validated in a practical demonstration in [62].In this work, we adopt SER-based approach for dealing with a simplified resource allocation problem and focusing on a clear presentation of important aspects of the resource allocation procedure.For dealing with practical scenarios, where BER-based resource allocation techniques would be preferred, we invite the reader to consult the aforementioned papers.

IV. CASE STUDY
In order to illustrate the carried out discussion and perform a detailed interpretation of results obtained from the solution of a resource allocation problem, this section carries out a case study adopting the RA criterion for a scenario constituted by an in-home PLC channel corrupted by additive colored Gaussian noise with one-sided exponential-decaying PSD given by S V ( f ) = 250| f | −0.9 µW/Hz.The channel measurement used in this work was obtained from a campaign carried out in seven residences, covering houses and apartments in the city of Juiz de Fora, state of Minas Gerais, Brazil.This campaign followed the measurement setup and the methodology discussed in [63] and [64], respectively, adopting a sampling frequency of 200 MHz, i.e.F s = 200 MHz, for obtaining PLC channel measurements at the frequency band from 1.7 MHz to 100 MHz, i.e.B = 100 MHz.In addition, the measurement campaign considered an uncoded digital communication system based on the HS-OFDM scheme, adopting HS-OFDM symbol duration T symb = 23.04 µs, HS-OFDM symbol length of 2N = 4096 and cyclic prefix length of L cp = 512, as well as a subchannel bandwidth of B s = 48.80kHz.Despite not complying with regulations for PLC systems, such as the European and Brazilian ones [65], [66], the considered frequency band may be explored by future regulations [67].The following results were obtained based on the same conditions of the aforementioned measurement campaign, except for the modeled colored additive noise.Although a PLC channel is considered, we adopted the methodology discussed throughout the paper and not the simplification presented in the Appendix.
The samples k = 0, • • • , N of the magnitude of the CFR and the colored noise PSD are shown in Figs.3(a) and 3(b), respectively.The nSNR vector γ D obtained with basis on these data is shown in Fig. 3(c).Note that, as the noise PSD becomes flat, the nSNR curve begins to have similar shape to the one of the CFR.
Fig. 4 shows the SNR and nSNR obtained with the solution of the resource allocation problem with β 1D = 1 and β 2D = 2β 1D = 2, P t,max = 20 dBm and Γ = 6.1 dB, which according to (32) corresponds to ξ c = 9.4489 × 10 −4 .In this figure, we can see that the SNR presents different shape from the nSNR, with the allocated power P D,q being the difference between these two quantities.This occurs because the number of bits allocated to the elements of D i is quantized, which, according to (18), causes the SNR to assume quantized values.Fig. 5 shows the allocated power P D,q to the q th element of D i that was obtained with the solution of the resource allocation problem.Note that no transmission power was allocated to some elements, as they are associated with very low nSNR values, which makes the bit loading algorithm give priority to the allocation of bits and transmission power to other elements of D i .Additionally, an analysis of this figure reveals that the sum of the allocated power P D,q related to all elements of D i is equal to P t = 19.9962dBm, which is less than the maximum transmission power P t,max = 20 dBm.
The number of bits b D,q associated with the q th element of D i is shown in Fig. 6.As bits are allocated one by one for q = 0, N (β 1D = 1, due to the adoption of M-PAM constellations) and two by two for q = 1, • • • , N − 1 (β 2D = 2, due to the adoption of M-QAM constellations), the curve presented in this figure assumes quantized values.Note that the elements of b D,q to which zero bits were allocated have no associated transmission power, which can be seen analyzing Figs. 5 and 6 jointly.Fig. 7, in its turn, shows the calculated and simulated SERs, denoted by ξ q , associated with the q th element of D i , as well PSfrag replacements q P D,q (dBm) Fig. 5: P D,q associated with the q th element of D i for ξ c = 9.4489 × 10 −4 .
as the SER constraint ξ c of the resource allocation problem.
In this figure, we note that the simulated SER approaches the calculated SER, with the difference between them being due to computational resources limitations when the SER tends to zero.We also note that both the calculated and simulated SER curves are below the SER constraint curve, which indicates that the resource allocation problem was correctly handled and successfully solved in terms of SER.Finally, the resource allocation problem described by ( 7) is solved with the SER constraints and corresponding Γ values for the cases listed in Table I, always assuming β 1D = 1, β 2D = 2, and P t,max = 10 dBm.Such cases include the absence of gap (Γ = 0 dB), which results in ξ c = 0.1665 and P t = 19.9993dBm, as well as Γ values that results in the SER constraints and total allocated power pairs ξ c = 9.86 × 10 −2 and P t = 19.9985dBm, ξ c = 9.90×10 −3 and P t = 19.9979dB, ξ c = 9.45 × 10 −4 and P t = 19.9962dBm, and, finally, ξ c = 9.80 × 10 −5 and P t = 19.9939dBm.Note that P t tend to decrease along with Γ, as the incremental transmission power from ( 20) is directly proportional to Γ.
Fig. 8 shows the results in terms of the maximum SER among the subcarriers, ξ max = max 0≤ q ≤ N ξ q , for all five analyzed cases, comparing them with the SER constraint curve, ξ c , as a function of Γ, described by (32).Such results are also listed in Table I, together with the mean SER values ξ mean = 1 N+1 N q=0 ξ q and the attained data rates.Note that, in all cases, ξ max and ξ mean assumed smaller values than ξ c , which was already expected.Additionally, we note that increasing Γ causes data rate reduction, as the latter is directly proportional to the number of allocated bits, which according to (18) is inversely proportional to Γ.
In summary, it is possible to note that the bit loading   algorithm allocates transmission power and bits preferentially to subchannels associated with higher nSNR values.Such characteristic results in smaller constellations with less energy for subchannels associated with intermediate nSNR values and can even result in the avoidance of allocation to subchannels associated with very low nSNR values.This effect becomes more clear as Γ increases, since according to ( 18) and ( 21), the number of bits and the incremental transmission power are, respectively, inversely and directly proportional to Γ. Therefore, we can conclude that the resource allocation to subchannels associated with low nSNR values is not prioritized and may even not occur.A consequence of this is that transmission power and bits are only allocated to a limited set of subcarriers, which are associated with larger constellations.This, in its turn, results in a vector P inc with larger incremental transmission power values, i.e., greater steps towards the maximum transmission power P t ,max , as the number of iterations of the bit loading algorithm increases, which can be seen in Fig. 9.

V. CONCLUSION
This work has presented a detailed discussion on the general resource allocation problem in PLC systems based on the HS-OFDM scheme.Such discussion included the contextualization of the resource allocation problem, which covers the data communication system description and the motivation behind performing such procedure.
In sequel, the main particularities of the solution of the resource allocation problem have been addressed.These include a comprehensive and formal mathematical formulation of the problem, the execution of the bit loading algorithm that allocates bits and transmission power, as well as the effect of the gap from the Shannon capacity curve on the resource allocation and, consequently, on the performance of the digital communication system.Also, recurrent issues and relevant concepts that are misunderstood in the literature have been carefully raised and discussed.
Finally, we have carried out a case study for a scenario constituted by a mesured in-home PLC channel and a modeled colored additive noise with exponential-decaying PSD.The frequency-selective behavior of this channel provides a depiction of the particularities of the results in terms of SNR, SER, transmission power and allocated bits obtained with the solution of the resource allocation problem.With the carried out discussion and the case study that proved the correctness of the resource allocation procedure as presented in this paper, concepts and definitions have been addressed in a way such that one can easily understand and implement resource allocation techniques in multicarrier-based communication systems operating in the baseband, which can be easily extended to passband systems.For results on specific resource allocation techniques and discussions on individual aspects of resource allocation in PLC systems, we encourage the reader to consult works such as [6]- [8], [31], [32], [59], [60], [62].

APPENDIX
The problem formulation described in Section II can be significantly simplified if further particularities of PLC systems are considered.Standards such as the IEEE 1901.2 for narrowband [68] and the IEEE 1901 for broadband PLC systems [69] suggest that data transmission does not take place in the entire frequency band.Therefore, unlike the data communication system described in Section II that operates in the whole frequency band from 0 to B Hertz, a PLC system should transmit data between the frequencies f min and f max , such that 0 < f min < f max ≤ B. In this sense, we define the discrete time-domain equivalent of the pre-and post-guard bands, in which data transmission does not take place as and respectively, in which ⌈a⌉ = min{n ∈ Z|n ≥ a}.
In this context, an HS-OFDM-based PLC system has an information vector containing N − N pre − N post complex information given by in which C i ∈ C (N−N pre −N post )×1 .Next, C i is mapped into the i th HS-OFDM symbol of length 2N, expressed in the frequency domain by , where In order to ensure that the transmit signal is real in the time domain, i.e., , the Hermitian symmetric mapping in PLC systems is performed according to the following rule: ) Note that, unlike the mapping from (1), no element C i has its real and imaginary parts separated by the mapping from (38).Therefore, the entire C i vector can undergo bidimensional modulations, such as M-QAM.If all elements of C i belong to M-QAM constellations, the resource allocation problem can be directly solved for the information vector C i , i.e., The rest of the formulation for HS-OFDM-based PLC systems is similar to the one carried out throughout Sections II and III, with the only difference being the sole use of bidimensional constellations.

Fig. 3 :
Fig. 3: Samples k = 0, • • • , N of the magnitude response of H (a), the additive noise PSD S V (b) and the nSNR γ D (c) associated with D i .

Fig. 9 :
Fig.9: Total allocated power P t versus bit loading algorithm iterations.
and (•) † denotes Hermitian operator.Based on the characteristic of the Hermitian symmetric mapping from (1), the total transmission

TABLE I :
Obtained results for the analyzed Γ and ξ c pairs.