# On the signal recovery in OFDM after estimation

Given a modulated signal X which is transmitted based on OFDM with N = 256 sub-carriers through channel h = [0.7 0.3 0 0 0 0.4] of length L = 6; following the steps : [X --> ifft(X,N) --> adding CP --> ... ext] and then we have Y representing the received signal representing the output of FFT at receiver as below :

X = The modulated signal of length 256;

h = The channel of length 6;

Y = the received signal after taking the FFT of length 256 too.

Assuming the channel is estimated at receiver perfectly and h_est' = [0.7 0.3 0 0 0 0.4];

I's asking how can we get the sign X_est back ? Is it by X_est = Y. / fft(h_est, 256); however when I try that way in Matlab, it doesn't give the estimated transmitted signal !

her is the code as reference:

clear; close all; clc

n_subc = 2^8;                          % # of subcarriers
n_ofdm_sym = 1;                        % # of OFDM symbols
n_data_sym = n_subc*n_ofdm_sym;         % # of data symbols to transmit
CP = n_subc/4;                          % CP length

M = 4;                                  %Modulation order setting

%Set channel
h = [0.7 0.5 0 0 0 0.2];

iter = 10^2;    %% Iteration
FFT = dftmtx(n_subc);           %% FFT matrix

SNR = [0:2:40];

for i = 1:length(SNR)
i
for j = 1:iter                                % Monte Carlo iterations

d_symb = randi([0 3],1,n_data_sym);            %generate the data to transmit
x_mod=qammod(d_symb,M) / sqrt(2);           %modulate

x_mod_s2p = reshape(x_mod,n_subc,[]);        % serial to parallel

x_ifft = FFT'*x_mod_s2p;             %Ifft conversion

x_cp = [x_ifft(end-CP+1:end,:); x_ifft];     % add CP

x_ifft_p2s = reshape(x_cp,1,[]);             % parallel to serial

% --------------------> Channel mixing and adding noise
y = conv(x_ifft_p2s,h,'same');                          % Linear convolution
% y = awgn(y,SNR(i),'measured');                          % add noise

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

y_cp = y_s2p(CP+1:end,:);                    % Removing CP

y_fft = FFT*y_cp;                            % FFT

y_p2s = reshape(y_fft,1,[]);                 % Parallel to serial

X_est = y_p2s ./ fft(h,n_subc);
y_demod= qamdemod(X_est,M);

[~,ber(j)] = biterr(d_symb,y_demod);
end
BER(i)=mean(ber);
end

figure
semilogy(SNR,BER)

• This gives you the soft information estimates. You need to de-map them to the modulation scheme you used at the transmitter. For example, if you used BPSK, you can de-map the received samples as X_est > 0, which will give you a sequence of zeros and ones: zeros when X_est < 0, and 1 otherwise. – BlackMath Sep 7 at 16:34
• Thank you for you feedback Could you please re check it ? I get completely different signal !! – Gze Sep 7 at 16:40
• Try first with BPSK and see if it works. If it does, then all you need to do is to read more how to de-map your signals. There are plenty of resources on the Internet about this. It should be straightforward if you understand it theoretically and conceptually. – BlackMath Sep 7 at 16:44
• sorry I modified the comments at same time you replied, I get completely different signal !! maybe there is something I need to modify !! – Gze Sep 7 at 16:45
• Can you paste your code? – BlackMath Sep 7 at 17:11

There is a mistake int the conv function which you are using in your code. In ofdm, the channel must be convoluted with every symbol. the link provided in the above comments are ok, but you need to modify them according to your parameters. so replace the command of y = conv(x_ifft_p2s,h,'same'); by below command:

for jj = 1 : n_ofdm_sym
y(jj,:) = conv(h(jj,:),x_cp(jj,:));
end


then add the noise into y.

NP: be careful if the n_ofdm_sym is more than one, you need to build your channel $$h$$ as a matrix of size $$nofdmsym$$ x $$nsubc$$ .

Good luck

• Thank you, That worked well !! – Gze Sep 10 at 7:38