Papr M
Papr M
windowed_time_wave_matrix(i,:) = real(time_wave_matrix(i,:));
end
% Serialize the modulating waveform
ofdm_modulation = reshape(windowed_time_wave_matrix', 1,
IFFT_bin_length*(symbols_per_carrier+1));
%PLOT OFDM SIGNAL (time)
temp_time = IFFT_bin_length*(symbols_per_carrier+1);
figure (4)
plot(0:temp_time-1,ofdm_modulation)
grid on
ylabel('Amplitude (volts)')
xlabel('Time (samples)')
title('OFDM Time Signal')
%PLOT OFDM SIGNAL (spectrum)
symbols_per_average = ceil(symbols_per_carrier/5);
avg_temp_time = IFFT_bin_length*symbols_per_average;
averages = floor(temp_time/avg_temp_time);
average_fft(1:avg_temp_time) = 0;
for a = 0:(averages-1)
subset_ofdm = ofdm_modulation(((a*avg_temp_time)+1):((a+1)*avg_temp_time));
subset_ofdm_f = abs(fft(subset_ofdm));
average_fft = average_fft + (subset_ofdm_f/averages);
end
display(average_fft)
average_fft_log = 20*log10(average_fft);
figure (5)
plot((0:(avg_temp_time-1))/avg_temp_time, average_fft_log)
hold on
plot(0:1/IFFT_bin_length:1, -35, 'rd')
grid on
axis([0 0.5 -40 max(average_fft_log)])
ylabel('Magnitude (dB)')
xlabel('Normalized Frequency (0.5 = fs/2)')
title('OFDM Signal Spectrum')
% Upconversion to RF
Tx_data = ofdm_modulation;
% CHANNEL
%close all
%clear
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% All permutations of phase factor B
p=[1 -1 i -i]; % phase factor possible values
B=[];
for b1=1:4
for b2=1:4
for b3=1:4
for b4=1:4
for b5=1:4
B=[B; [p(b1) p(b2) p(b3) p(b4)]]; % all possible combinations
end
end
end
end
end
NN=symbols_per_carrier; % the test is achieved on 10000 OFDM symbols only. It is
% possible to use all of the 100000 symbols, but it will
% take more time.
N=IFFT_bin_length; % number of subbands
L=4; % oversampling factor
for i=1:NN
end
subplot(2,2,1);
title('ORIGINAL signal');
[N,X] = hist(papro,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'-ro', 'LineWidth',2, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
grid;
xlabel('paprO...original signal, x dB')
ylabel('ccdf')
subplot(2,2,2);
title('PTS');
[N,X] = hist(papr2,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'-.green', 'LineWidth',2, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
grid;
xlabel('papr2....PARTIAL TRANSMIT, x dB')
ylabel('ccdf')
% find papr_min
papr_min(i)=min(papr);
end
subplot(2,2,4);
[N,X] = hist(papr_min,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'-.b', 'LineWidth',2, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
grid;
xlabel('papr3....SELECTIVE MAPPING, x dB')
ylabel('ccdf=pr(papr>papr0')
%
% plot all the papr reduction technique
%
figure(11)
[N,X] = hist(papro,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'-ro', 'LineWidth',3, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
axis([4 27 -0.025 0.8]);
hold all
[N,X] = hist(papr_min,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'blue', 'LineWidth',3, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
hold all
[N,X] = hist(papr2,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'green', 'LineWidth',3, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
hold all;
[N,X] = hist(papr1,100);
plot(X,1-cumsum(N)/max(cumsum(N)),'black', 'LineWidth',3, 'MarkerEdgeColor', 'r',
'MarkerSize',8);
grid;
hold all;
grid on;
hleg=legend('ORIGINAL','SLM','PTS','CLIPPING');