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
% --------------------> Receiver
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)
X_est > 0
, which will give you a sequence of zeros and ones: zeros when X_est < 0, and 1 otherwise. $\endgroup$