Power amplifier nonlinearity impairment in MATLAB
This section of MATLAB source code covers power amplifier nonlinearity impairment and its effect on constellation diagram using matlab code. PA nonlinearity incorporates AM-AM conversion and AM-PM conversion.
Part A and PART C of the matlab code is same as mentioned on AWGN page.
Source code-PART B
PA_backoff_dB = 2; % Power Amplifier Back off w.r.t. 1dB compression point
% < 0 --> average power above P1dB
% > 0 --> average power below P1dB
in=mapper_out_ori;
in=in';
out=TX_PA(in,PA_backoff_dB);
figure;plot(real(out),imag(out),'r+');title('constellation with PA nonlinearities');
TX_PA.m
function out = TX_PA(in, Backoff_dB);
[M N] = size(in);
for k=1:N
% Parameters of nonlinear model
alpha1 = 1;
alpha3 = -(1-10^(-1/20))*4/3; % This is an inversion of the formula
% giving the input 1 dB compression point
% RMS amplitude of signal
Arms = sqrt(var(in(:,k)));
% Brings signal to back-off dB below 1dB compression point
in(:,k) = in(:,k)*10^(-Backoff_dB/20)/Arms;
% Computes saturation values
IAsat = 2/3*sqrt(alpha1/abs(alpha3));
OAsat = 4/9*alpha1*sqrt(alpha1/abs(alpha3));
% For the lowpass equivalent, multiply alpha3 by 3/4 !
out(:,k) = alpha1*in(:,k) + 0.75*alpha3*in(:,k).*abs(in(:,k)).^2;
% Clipping to ensure monotonicity
ind = find(abs(in(:,k))>IAsat);
out(ind,k) = OAsat*sign(in(ind,k));
% Brings signal energy back to its original value
YRMS = sqrt(var(out(:,k)));
out(:,k) = out(:,k)/YRMS*Arms;
end
Input and output constellation diagram
Reference
The code is taken from book by name digital front end compensation for emerging wireless systems
By authors Francois Horlin and Andre Bourdoux
Useful Links to MATLAB codes
Refer following as well as links mentioned on left side panel for useful MATLAB codes.
OFDM Preamble generation
Time off estimation corr
Freq off estimation corr
channel estimation
11a WLAN channel
PN sequence generation
OFDMA Tx Rx
AES DES
carrier aggregation
CCDF
FIR Filter
IIR Filter
Low Pass FIR
Viterbi decoder
CRC8 CRC32
RF and Wireless tutorials
WLAN 802.11ac 802.11ad wimax Zigbee z-wave GSM LTE UMTS Bluetooth UWB IoT satellite Antenna RADAR