# Is it possible the difference between OFDM-CP and OFDM-ZP about 10dB

I'm building basic matlab code for ofdm, but when I change the CP OFDM into ZP-OFDM with sme parameters, I get the performance is worse by up to 10 dB!! Is that right ? or there is some thing wrong in the code !!

clear all; clc; clear;

N_sub = 64;   %Num of subcarriers
N_sym = 20;    %Number of symbols
Mod = 4;         %Modulation order
bi = log2(Mod);  %Number of bits
N_bits = N_sub*N_sym*log2(Mod);
CP = N_sub/4;  %CP length

%set channel parameters
h = randn(1,16);
h = [h zeros(1,N_sub-length(h))];
h = repmat(h,N_sym,1)';
ntap = size(h,1) - 1;

SNR_dB = 0:2:20;
errors = zeros(length(SNR_dB),1);

N_fram = 10^3;        %Number of frame
for snr = 1:length(SNR_dB)
for i = 1 : N_fram
bits = randi([0 1], 1 , N_bits);
data_temp = bi2de(reshape(bits,N_bits/bi,bi));
% Set modulation of data
data_mod = (1/sqrt(2))*qammod(data_temp , Mod);

data_fram = reshape(data_mod,N_sub,[]);    %% Serial to parallel conversion

%FFt operation
data_freq_total = sqrt(N_sub)*ifft(data_fram);

data_cp = [data_freq_total(end-CP+1:end,:); data_freq_total];  %Adding CP
%         data_cp = [zeros(CP,N_sym); data_freq_total];                  %Adding ZP

%channel convolution
for j_c = 1 : N_sym
y(:,j_c) = conv(h(:,j_c),data_cp(:,j_c));                          % Linear convolution
end
y = awgn(y,SNR_dB(snr),'measured');                          % add noise

%serial to parallel conversion
y_s2p = reshape(y,N_sub+CP+ntap,[]);

%remove cp
y_cp2 = y_s2p(CP+1:end-ntap,:);

%FFT operation
data_freq_total_r = (1/sqrt(N_sub))*fft(y_cp2,N_sub);

%Channel recovery
y_fft_total = [];
for j_r = 1 : N_sym
y_fft_c = data_freq_total_r(:,j_r);
y_fft_l = y_fft_c ./ fft(h(:,1),N_sub);
y_fft_total = [y_fft_total y_fft_l];
end

%set demodulation
data_rec = reshape(y_fft_total, N_sub*N_sym,1);
data_demod = qamdemod(data_rec, Mod);
bits_r = reshape(de2bi(data_demod,bi),1,[]);

%calculate the errors
errors_ofdm = sum(xor(bits,bits_r));
errors(snr) = errors_ofdm + errors(snr);
end
snr
end
err_ber_fram_ofdm = errors/N_bits./N_fram;
figure (1)
semilogy(SNR_dB,err_ber_fram_ofdm)
grid on
legend('OFDM');


The difference I perform when modifying the CP-OFDM into ZP-OFDM is as below:

%adding CP
data_cp = [data_freq_total(end-CP+1:end,:); data_freq_total];  %Adding CP
%         data_cp = [zeros(CP,N_sym); data_freq_total];                  %Adding ZP


What's the issue of that degradation of performance ?

thank you

## bumped to the homepage by Community♦8 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

• Marcus is right. When you change CP to ZP, you destroy the orthogonality between the subcarriers, and this introduces ICI. In this case (ZP), single-tap equalizers are not optimum as it was with CP. – BlackMath Oct 13 at 4:17
• @BlackMath I added the Figure. – Gze Oct 14 at 2:58
• I think he is not right! which orthogonality you are talking about? He said destroyed by 10 dB !! basically the main advantage of OFDM is represented the conversion of channel from selective into flat, and then difference between CP and ZP that CP offer advantage of circular convolution while ZP offer an advantage of power by transmitting zeros instead of bits. But, performance of ZP and CP must be almost same !! – Zeyad_Zeyad Oct 14 at 3:09
• @Zeyad_Zeyad Circular convolution means that the channel matrix in the frequency domain is diagonal (the subcarriers are orthogonal), while in ZP the channel matrix in the frequency domain is not diagonal (ZP destroys orthogonality). CP-OFDM and ZP-OFDM DON'T provide the same performance for the SAME single-tap equalization. That's why the OP observes performance deterioration in ZP. If he needs a better performance, you need more complex receivers. So, ZP saves power, but at the expense of more complex receivers. – BlackMath Oct 14 at 4:19
• @Gze As you can see, this is an error floor (not just performance deterioration), which confirms that you are not treating the residual ICI resulting from using ZP. You need to use frequency-domain MMS equalizer that equalizes all symbols jointly before making symbol-by-symbol detection. BTW, I think the legend in the figure is not correct. Check that out. – BlackMath Oct 14 at 4:22

I tried using MMSE equalizer, it worked well. single tap equalizer is not always working with ZP as well as CP OFDM.

That depends on the length of the cyclic prefix compared to the FFT, and of course on the multipath propagation.

10 dB sounds harsh, (so, probably an implementation error) but yeah, CP-OFDM is quite obviously cleverer than Zero-padding, and every OFDM introduction explains why (I'm a bit surprised this question comes now – you've been working with OFDM for about a year now!):

Under the DFT, time-domain circular convolution is equivalent to point-wise multiplication in frequency domain. And that's why one would want to do OFDM: because it allows to equalize (i.e. revert a convolution) via point-wise multiplication.

Sadly, signals don't convolve with channels circularly, but linearly. So, one needs to "fake" the circular convolution, and that can easily be done by copying the end of an OFDM symbol before its beginning – the cyclic prefix.

In the last couple of years, a number of papers have surfaced saying that ZP-OFDM performs better than CP-OFDM, but under using a complex equalizer that, as far as I can see, is in the same complexity league than simply doing time-domain equalization, only that if you did time-domain equalization, you would not have the loss of rate due to the zero padding or cyclic prefix. Haven't read many of these papers, but honestly, all seemed to be from the category "and the conclusion should have been: don't do ZP, do CP".

If you just use the same equalization (i.e. point-wise division by the subcarrier channel coefficient), then you're basically getting a lot of inter-carrier interference, since the point-wise multiplication property breaks down. The amount of this self-interference that you get would be strictly monotonous with the number of used subcarriers, and about proportional to the delay spread of your channel. 10 dB might be realistic for a system with 64 subcarriers, but again, if you're trying to use the same equalizer as under "normal" CP-OFDM, that's a design error.

• hey, there's been a downvote, and that's democratically very fine, but I'd love to hear the reasoning – maybe it's something I can improve! – Marcus Müller Oct 12 at 13:26