Matlab MLSEE equalizer works fine with the QPSK modulated signal when the signal is propagated over the multipath channel. However, if there are IFFT and FFT blocks used at TX and RX sides, respectively, the receiver in the modified code has worse BER results than the original code as shown in the following MATLAB codes.
I would like to ask for your help to investigate the failure in the modified code below.
% Original Code: Works fine and gives perfect BER results.
% Equalize a QPSK signal transmitted through a dispersive channel
% using MLSE
qpskMod = comm.QPSKModulator(0,'SymbolMapping','Binary');
qpskDemod = comm.QPSKDemodulator(0,'SymbolMapping','Binary');
% Channel coefficients
chCoeffs = [.986; .845; .237; .12345+.31i];
N=512; % Modulated signal length
mleq = comm.MLSEEqualizer('TracebackDepth',10,...
'Channel',chCoeffs, 'Constellation',[1 1i -1 -1i]);
% Create an error rate calculator
ber = comm.ErrorRate;
for n = 1:10
data= randi([0 3],N,1);
modSignal = qpskMod(data);
% Introduce channel distortion.
chanOutput = filter(chCoeffs,1,modSignal);
% Equalize the channel output and demodulate
eqSignal = mleq(chanOutput);
demodData = qpskDemod(eqSignal);
% Compute BER
a = ber(data, demodData);
b=a(1)
end
% Modified Code: IFFT and FFT blocks are used but the system shows worse BER results.
% Equalize a QPSK signal transmitted through a dispersive channel using MLSE
qpskMod = comm.QPSKModulator(0,'SymbolMapping','Binary');
qpskDemod = comm.QPSKDemodulator(0,'SymbolMapping','Binary');
% Channel coefficients
chCoeffs = [.986; .845; .237; .12345+.31i];
N=512; % Modulated signal length
mleq = comm.MLSEEqualizer('TracebackDepth',10,...
'Channel',chCoeffs, 'Constellation',[1 1i -1 -1i]);
% Create an error rate calculator
ber = comm.ErrorRate;
for n = 1:10
data= randi([0 3],N,1);
% Modulate the data and convert it to time domain.
modSignalx = qpskMod(data);
modSignal=sqrt(N)*ifft(modSignalx);
% Introduce channel distortion
chanOutput = filter(chCoeffs,1,modSignal);
% Equalize the channel output and demodulate
eqSignalx = mleq(chanOutput);
eqSignal=(1/sqrt(N))*fft(eqSignalx);
demodData = qpskDemod(eqSignal);
% Compute BER
a = ber(data, demodData);
b(n)=a(1);
end
Many thanks in advance!
@Zeyad_Zeyad I have included the whole code here. It gives high error rate even the SNR is set to 30.
clear all;
close all;
qpskMod = comm.QPSKModulator(0,'SymbolMapping','Binary');
qpskDemod = comm.QPSKDemodulator(0,'SymbolMapping','Binary');
% Channel coefficients
chCoeffs = [.986; .845; .237; .12345+.31i];
N=512; % Modulated signal length
mleq = comm.MLSEEqualizer('TracebackDepth',10,...
'Channel',chCoeffs, 'Constellation',[1 1i -1 -1i]);
snr=30;
numiteration=10;
for n = 1:numiteration
data= randi([0 3],N,1);
dataIn(:,n)=data;
% Modulate the data and convert it to time domain.
modSignalx = step(qpskMod, data);
modSignal=sqrt(N)*ifft(modSignalx);
% Introduce channel distortion
chanOutputx = filter(chCoeffs,1,modSignal);
% Add awgn noise
chanOutput=awgn(chanOutputx,snr,'measured');
% Equalize the channel output and demodulate
eqSignalx = step(mleq, chanOutput);
eqSignal=(1/sqrt(N))*fft(eqSignalx);
demodData = step(qpskDemod, eqSignal);
demodDataOut(:,n)=demodData;
% Compute BER
end
a = biterr(dataIn(:), demodDataOut(:));
b=a/(N*numiteration)`