You are on page 1of 1

% SLM--PAPR Simulation

clc;
clear all;
K = 512;
% SI
ZE OF FFT
N = 8;
% NU
MBER OF SELECTIONS
QAM_Set = [1+j,-1+j,-1-j,3+j,1+3*j,3-j,1-3*j,-1+3*j,-3+j,-3-j,-1-3*j,3+3*j,-3+3
*j,-3-3*j,3-3*j];
Phase_Set = [1 -1];
MAX_SYMBOLS = 1e5;
PAPR_Orignal = zeros(1,MAX_SYMBOLS);
PAPR_SLM
= zeros(1,MAX_SYMBOLS);
X
= zeros(N,K);
Index = zeros(N,K);
for nSymbol=1:MAX_SYMBOLS
Index(1,:) = randint(1,K,length(QAM_Set))+1; % Generate [1,K] matrix whos
e elements are uniformly distributed in the range of [1,4](rand+1)
Index(2:N,:) = randint(N-1,K,length(Phase_Set))+1;
X(1,:) = QAM_Set(Index(1,:));
% Orignal Frequency domain sign
al. generate random symbols.
Phase_Rot = Phase_Set(Index(2:N,:));
X(2:N,:) = repmat(X(1,:),N-1,1).*Phase_Rot;
% Phase roated Frequency
domain signal repmat Replicate and tile array
x = ifft(X,[],2);
% Time domain signal
Signal_Power = abs(x.^2);
Peak_Power = max(Signal_Power,[],2); % C = max(A,[],dim). maximum value f
rom each row.
Mean_Power = mean(Signal_Power,2);
% mean power of each sequence
PAPR_temp = 10*log10(Peak_Power./Mean_Power);
PAPR_Orignal(nSymbol) = PAPR_temp(1);
PAPR_SLM(nSymbol)
= min(PAPR_temp); % find the sequence with best PAPR
end
[cdf1, PAPR1] = ecdf(PAPR_Orignal);
[cdf2, PAPR2] = ecdf(PAPR_SLM);
%-------------------------------------------------------------------------semilogy(PAPR1,1-cdf1,'b-',PAPR2,1-cdf2,'r-')
legend('Orignal','SLM')
title('PAPR Performance of 16QAM OFDM System')
xlabel('PAPR0 [dB]');
ylabel('CCDF (Pr[PAPR>PAPR0])');
grid on

You might also like