{'fraction_non_alphanumeric': 0.03934029353911333, 'fraction_numerical': 0.013365612548544913, 'mean_word_length': 4.831764705882353, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Learning to Compensate: A Deep Neural Network Framework for 5G Power Amplifier Compensation

Owing to the complicated characteristics of 5G communication system, designing RF components through mathematical modeling becomes a challenging obstacle. Moreover, such mathematical models need numerous manual adjustments for various specification requirements. In this paper, we present a learning-based framework to model and compensate Power Amplifiers (PAs) in 5G communication. In the proposed framework, Deep Neural Networks (DNNs) are used to learn the characteristics of the PAs, while, correspondent Digital Pre-Distortions (DPDs) are also learned to compensate for the nonlinear and memory effects of PAs. On top of the framework, we further propose two frequency domain losses to guide the learning process to better optimize the target, compared to naive time domain Mean Square Error (MSE). The proposed framework serves as a drop-in replacement for the conventional approach. The proposed approach achieves an average of 56.7% reduction of nonlinear and memory effects, which converts to an average of 16.3% improvement over a carefully-designed mathematical model, and even reaches 34% enhancement in severe distortion scenarios.


I. INTRODUCTION
In most communication systems, Power Amplifiers (PAs) are the major source of nonlinear and memory effects [1], which cause severe spectral regrowth as shown in Figure 1. Spectral regrowth significantly degrades the signal quality due to high out-of-band power. Memory effects make the transmitted signal asymmetrically. These problems become critical issues of the next-generation 5G technologies. Moreover, in an edge device of 5G communication systems, both the high transmission power and the limited supply voltage make the non-linearity of PA even worse.
To overcome the aforementioned imperfections of PAs, Digital Pre-Distortion (DPD) has become a common and practical mechanism considering both integration complexity and effectiveness [2]- [4]. As illustrated in Figure 2, DPD generates additional signal distortions to compensate for the imperfections introduced by the PA. During the past decades, there has been an extensive study in none-learning based DPD, including Memory Polynomial (MP) [5]- [7], Envelope-Memory Polynomial (EMP) [8], Generalized Memory Polynomial (GMP) [9], Dynamic Deviation Reduction (DDR) and Volterra Series (VS) [10]. Among these works, a mathematical PA model is firstly derived and the corresponding reverse function is then used to generate the pre-distortion signals.
Meanwhile, instead of deriving a mathematical model, learning-based approaches adopt neural networks to solve the problem. Learning-based approaches [11]- [18] demonstrate convincing results in which neural networks are trained to learn the pre-distortion signals for compensation. To the best of our knowledge, the existing learning-based compensations apply a straightforward training setup, in which Mean Square Error (MSE) loss or its variants are applied directly to the time domain signals. However, such time-domain MSE loss does not well characterize the severity of spectral regrowth in the frequency domain. Furthermore, in a real communication system, e.g. 3GPP's 5G specifications, there are explicit definitions and constraints on the characteristics of the frequency spectrum of transmitted signals [19]. Overall, the time domain MSE loss might not only leads to sub-optimal results but also potentially breaks the communication specification.
To address the aforementioned shortages in the existing learning-based methods, we propose a learning-based framework for 5G PAs compensation. The framework differs from the existing works by introducing Deep Neural Networks (DNNs) to learn the 5G PAs' behaviors and characteristics. With the trained neural networks which represent the nondifferentiable real PAs, the corresponding pre-distortion compensation is then learned in an end-to-end training paradigm.
In summary, our contributions are three-fold: 1) We propose a end-to-end learning-based framework to jointly learn the behaviors, characteristics, and compensation of PAs. 2) On top of the framework, we propose two frequency domain losses to simultaneously minimize spectral regrowth and optimize toward communication specifications. 3) According to the experiments on real 5G PAs, the proposed approach outperforms both the existing nonlearning-based and learning-based methods by a significant margin. When compared to a widely used nonlearning-based approach, our approach achieves 34%, 11%, and 4% reductions of spectral regrowth at the corresponding supply voltages, 4.0V , 4.2V , and 4.6V , respectively.
The rest of this paper is organized as follows. First, the problem is formulated in Section II. The proposed framework and detailed working mechanism of PA modeling and DPD compensation are elaborated in Section III. The proposed frequency domain loss functions for model optimization are discussed in Section IV. Section V discusses the detail of dataset acquisition, experiment setup, comprehensive results, and analyses. Finally, the conclusion and future directions of this work are described in Section VI.

II. PROBLEM FORMULATION
This paper addresses the DPD problem as represented in Figure 2. Consider a PA system defined by y(n) = f P A (x(n)), where x(n) and y(n) indicate input and output signal, respectively, and f P A represents the PA function with certain nonlinearity. The problem can be formulated as min θ loss y expect (n), y DP D (n) where y DP D (n) is given by In Eq. (1) and Eq. (2), the objective is to find a compensation function f DP D to minimize the difference between the cascaded output y DP D (n) and an expected response y expect (n). Note that the difference is measured by using a distance-based loss function, e.g., L1 norm. According to Eq. (1) and Eq. (2), we present a learning-based framework in which DNNs are used to learn the compensator f DP D (·, θ) in which θ represents the weights for a neural network. The detail of the proposed learning-based framework will be introduced in Section III. On the other hand, loss function also plays an important role in guiding the learning process toward a better trajectory. The detail of the proposed loss functions will be elaborated in Section IV.

III. PROPOSED FRAMEWORK
In this section, we introduce the proposed pre-distortion compensation framework, which is trained end-to-end with the loss functions presented in Section IV. The overall framework consists of two training stages. In the first stage, the Power Amplifier Network (PAN) is trained to characterize nonlinear behaviors and memory effects of the non-differentiable real PAs ( Figure 3). Note that PA's behaviors heavily depend on the system parameters, such as voltage and frequency. Once the PAN training is finished, its weights are then fixed for being used in the next training stage. In the second training stage, the Pre-Distortion Network (PDN) is end-to-end trained to obtain a compensation function with the differentiable PAN to mimic the behavior of a real PA ( Figure 4). When all the training is finished, only the PDN is needed to be deployed in the system for inference.

A. Power Amplifier Network
The training data for PAN are obtained from multiple real PAs and processed as time sequence data with two channels which are noted as in-phase (I) and quadrature (Q) components (i.e., x = {I t , Q t }, t = 0, 1, . . . T ). The generation of PA distortions under different conditions (i.e., voltage, frequency, or manufacturer) is formulated as learning a conditional distribution over the sequence data. We perform the conditioning by feeding Conditional PA Type into PAN. The Conditional PA Type is used as extra information and is concatenated along with the input sequence data x. With this training setting, a single PAN learns to generate any of the learned PA distortions under the given conditions. Similar conditional learning concepts can also be found in recent works, including Generative Adversarial Network (GAN) which learns disentangled salient information [20], and a shared generator with conditional input vectors [21].

B. Pre-Distortion Network
Given the trained PAN with fixed weights, PDN is then trained to learn the compensation signals for the distorted signals generated by the PAN. Instead of feeding the conditions into PDN, PDN is used to learn to extract the condition information directly from the signal pair of previous distorted and transmitted signals (dotted signals in Figure 4). In this way, PDN does not depend on the conditions (i.e., voltage, frequency, or manufacturer) and thus reduces the deployment complexity since no monitors are needed to obtain the system conditions. During training, we randomly select a condition input for PAN and train the PDN to generate the compensation signal. Be aware that amplitude normalization is applied to the ground truth and the compensated signal before the loss is calculated. To simplify the illustration, such amplitude normalization is omitted in Figure 4.

IV. MULTI-OBJECTIVE LOSS FUNCTION
In addition to the time domain MSE loss, this section introduces two proposed losses on the frequency domain. To address the complex requirements of 5G specification, this paper applies all the three loss functions to guide the optimization toward multiple objectives on both the time and frequency domains.

A. Time Domain -MSE Loss (tM SE).
Fundamentally, measuring the difference between ground truth signal x and predicted signalx is to compute the MSE (Eq. (3)) in time domain directly.
Minimizing the MSE can assess signal mismatch in the time domain. However, MSE is not sufficient to capture the mismatch in the frequency domain since a small signal distortion may induce tremendous deformation in the frequency domain. Therefore, it is critical to consider both time and frequency domain metrics. More details will be discussed in Section V. To obtain the frequency spectrum for this loss, we apply the Short Time Fourier Transform (STFT) on both x andx and compute their absolute value in log scale. The detailed parameters are summarized in Section V. In the transformed spectrum, each complex number in an interval represents a specific frequency range. The absolute value describes power magnitude in the specific frequency point. Because the power magnitude of the transmitted signal is generally larger than the out-of-band signal, we take Mean Absolute Error (MAE) (Eq. (4)) instead of MSE to avoid over biasing on the in-band signals.

C. Frequency Domain -Specification Loss (f SP EC).
In communication systems, it requires both in-band and out-of-band spectrum characteristics to fulfill certain specifications. In this paper, we consider 3GPP's Adjacent Channel Leakage power Ratio (ACLR) requirement [19] and propose a specification loss for this requirement. According to the 3GPP's specification, "ACLR is the ratio of the filtered mean power centred on the assigned channel frequency to the filtered mean power centred on an adjacent channel frequency" [19]. The corresponding ACLR equation is as in Eq. (5). We then define a specification loss (Eq. (6)) to minimize the ACLR difference between ground truth and predicted signals.

V. EXPERIMENTS
This section details the experiment setups, including RF system setting and measurement setup for real PAs. The dataset, neural network structure, and training hyperparameters are also presented. We then discuss the experiment results of the proposed framework.

A. System Details, Data Collection and Measurement
This paper targets on a 5G communication system supporting New Radio (NR) with channel bandwidth 100MHz for mobile devices. In detail, the PAs operate at N41 band (2.496-2.690GHz) with sub-carrier spacing 30kHz and use QPSK modulation. Transmission Scheme is DFT-s-OFDM and transmission bandwidth is 98.28MHz and the high/low regions of leakage power (ACLR E-UTRA) are integrated over 98.28MHz centering at +/-100MHz offset respectively. We take 36 dB of ACLR E-UTRA which is higher than the requirement in 3GPP specification [19].
The measurement and collection bench is built on NI PXIe-5840, consisted of a Vector Signal Generator (VSG) and a Vector Signal Analyzer (VSA). The VSG generates the modulated signal with up-conversion to RF and then feeds to the real PA for sample collection. The VSA down-converts RF signal to analog baseband and records the data. Signal timing and power normalization are further processed by MATLAB. To validate the PDN results, the output of PDN is firstly transferred from digital to analog signal by VSG and then fed to real PAs.
With the collection bench, we use Pseudo Random Number Generator to generate the sequence for both training and testing. We collect a complete transmission frame for each sequence, around 1.8M I (In-phase) and Q (Quadrature) with 368.68 MHz/sec sampling rate. The training data are collected with supply voltages, 4.0V , 4.2V and 4.6V , and frequency at 2.593GHz with a transmission power of 24 dBm. For testing data, samples with both 2.593GHz and 2.643GHz frequencies are further collected.

B. Neural Network Structure and Training
We take an identical network structure for both PAN and PDN. The network is composed of 6 convolution layers with an input sequence of 128 sample points (input length). In each sample, two input channels are used for I/Q. Each layer is a 1-D convolution with a kernel size of 3 and a stride of 1, and the output channel number for each layer is 16-32-64-64-128-2. Except for the last output layer, each convolution layer is followed by a batch normalization layer and PReLU activation function. Both PAN and PDN are trained on one Nvidia GTX980Ti. Adam optimizer is used with batch size 512 and 256 for PAN and PDN respectively. All models are trained for 4000 epochs with an initial learning rate of 0.01, and divided by 10 at every 1000 epochs.

C. Results
In this section, the proposed method is compared to two baselines. One is a learning-based baseline (implemented as the proposed method with only tMSE loss) [11]- [18] and the other one is Memory Polynomial based baseline (MP-DPD, non-learning-based) [5]- [7]. At the same time, ablation studies are also presented to support our contributions.
1) Learning PAs with Multi-Objective Optimization: Figure 5(a) shows the resultant frequency spectrum of the three loss configurations for PAN. As depicted, in the region of transmission bandwidth, all configurations perform similarly well to characterize the real PA's spectrum. However, in the regions of ACLR E-UTRA (both Low and High), since real PA's non-linearity causes severe spectral regrowth, both the two proposed losses (f M AE and f SP EC) carry out closer characteristics compared to real PA. As shown in Table I, although applying the time domain loss tM SE achieves the lowest MSE error, it does not well represent the corresponding ACLR E-UTRA characteristics for real PAs (30.9 dB and 36.7 dB). On the other hand, applying the frequency domain losses, f M AE, and f SP EC, has a better match of the ACLR E-UTRA characteristics for real PAs. When combining all the three losses, the result perfectly matches the real PA's characteristics (30.9 dB and 36.7 dB) with only a slight increment in MSE.
2) Learning DPD Functionality: In Figure 5(b), PDN is applied to compensate for power spectrum reduced by the PA. As shown in the figure, the frequency domain losses, f M AE and f SP EC, lead to a larger error in MSE. However, such frequency domain and communication specification consideration make the PDN better perform on the compensation functionality. As listed in Table II, when combining all the three losses, the resultant PDN network achieves 97% out-ofband spectrum reduction compared to the one without DPD functionality. Note that such compensated signal is very close to the perfect reference signals as illustrated in Figure 5(b).
3) Evaluation on Real PAs: Although PDN can provide impressive performance on a system with PAN (mimics real PAs), the mismatch between PANs and real PAs may degrade the performance of compensation. Therefore, we further feed the pre-distorted signal from PDN into real PAs to estimate the compensation performance. As shown in Figure 5(c), the proposed PDN effectively reduces spectral regrowth in both in-band and out-of-band regions. As listed in Table III, a conventional and widely adopted DPD method, Memory Polynomial (MP-DPD), is implemented as a baseline [9]. The memory depth and polynomial order used for comparison are respectively 3 and 5 in MP-DPD. According to Table III, PDN achieves 73%, 53%, and 44% reduction of out-of-band spectrum regrowth at supply voltage 4.0V , 4.2V , and 4.6V , respectively. The proposed PDN steadily outperforms the MP-DPD baseline, especially in the lower supply voltage which introduces severe nonlinear problems and memory effects.

4) Extend to Unseen Cases:
We further evaluate the PDN on two unseen data (U nseen1 and U nseen2) as shown in Table IV. In U nseen1, the PA operates at 2.593GHz with larger transmission power, 25 dBm, which introduces even severe nonlinear problems and memory effects. In U nseen2, the PA operates at 2.643GHz with similar transmission power, 24 dBm, which introduces a different PA behavior and characteristic. In both unseen cases, PDN still effectively achieves positive reductions of out-of-band spectrum regrowth as shown in Table IV. 5) Discussion on Network Architecture: Comparing to the existing learning-based approaches, most of the works adopt parameter-intensive neural network architectures, such as Multi-Layer Perceptron (MLP) [3], [4], [11]- [14], Recurrent Neural Networks (RNN) [16], and Time-Delay Neural Networks (TDNN) [15]. Comparing to these architectures, Convolutional Neural Network (CNN) is much computation and parameter efficient for being embedded in practical systems. CNNs have also been widely studied in computer vision tasks, including classification, detection, segmentation, etc.
Recently, CNNs have also demonstrated the capability to cope with sequence analyses. For example, the long-term dependency of a sequence is captured by stacking multiple convolutions with large receptive fields in WaveNet [22], [23].

VI. CONCLUSIONS AND FUTURE WORK
This paper presents a framework to learn the characteristics of 5G PAs with different characteristics (voltage, frequency, and transmission power). Moreover, correspondent DPD signals are also learned to compensate for the nonlinear and memory effects of 5G PAs. On top of the framework, we further propose two frequency domain losses, f M AE and f SP EC, to minimize spectral regrowth and optimize toward communication specifications at the same time. According to the experiments on real 5G PAs, the proposed approach outperforms both the non-learning-and learning-based existing works by a large margin. Without losing the generality, the two proposed frequency domain losses (f M AE and f SP EC) can also be applied to other applications, especially in the domain of high-frequency complex signals. In these domains, it is common to consider (and/or measure if applicable) both time and frequency domain co-optimization. Such applications include style transfer in text-to-speech [24] and voice cloning [25] in which the frequency characteristic is very important (to capture the style of voice). In addition to the speech/audio domain, the same idea can also be applied to medical signal processing (e.g. ECG/EKG, EEG, EMG signals). In addition, frequency domain losses can also be used in communication systems, such as Wi-Fi channel state information (CSI), which has applications like indoor localization [26] and human activity recognition [27].