Skip to main content

Decision Feedback Equalizer (DFE) in MATLAB

 

MATLAB Code

M = 4; % QPSK
numSymbols = 10000;
numTrainingSymbols = 5000;
chtaps = [1 0.5*exp(1i*pi/6) 0.1*exp(-1i*pi/8)];
% Generate QPSK symbols
data = randi([0 M-1], numSymbols, 1);
tx = pskmod(data, M, pi/4);
% DFE setup
eq = comm.DecisionFeedbackEqualizer;
eq.ReferenceTap = 1;
eq.NumForwardTaps = 5;
eq.NumFeedbackTaps = 3;
% SNR sweep
snrVec = 0:5:25; % 0,5,10,...25 dB
berBefore = zeros(size(snrVec));
berAfter = zeros(size(snrVec));
for k = 1:length(snrVec)
% Apply channel and AWGN
rx = awgn(filter(chtaps,1,tx), snrVec(k), 'measured');
% BER before equalization
rxDataNoEq = pskdemod(rx, M, pi/4);
[~, berBefore(k)] = biterr(data, rxDataNoEq);
% Equalize
[y,~,~] = eq(rx, tx(1:numTrainingSymbols));
% Phase correction
phaseOffset = angle(mean(conj(tx(1:numTrainingSymbols)) .* y(1:numTrainingSymbols)));
yCorrected = y * exp(-1i*phaseOffset);
% BER after equalization
rxDataEq = pskdemod(yCorrected, M, pi/4);
[~, berAfter(k)] = biterr(data(1:length(rxDataEq)), rxDataEq);
end
% Plot BER vs SNR
figure;
semilogy(snrVec, berBefore, 'ro-', 'LineWidth', 2); hold on;
semilogy(snrVec, berAfter, 'bs-', 'LineWidth', 2); grid on;
xlabel('SNR (dB)'); ylabel('BER');
legend('Before Equalization', 'After Equalization');
title('BER vs SNR for QPSK with DFE');

Output

 


Online Simulation for DFE

Adaptive Wireless Communication & ISI Mitigation

1. Signal Generation

Random bits are mapped into QPSK Symbols. These complex values represent the data we want to transmit across the wireless link.

2. The Multipath Channel

We simulate "Echoes" by convolving the signal with a multi-tap impulse response. This creates Inter-Symbol Interference (ISI), making the constellation look like a cloud of noise.

3. DFE Equalization

A dual-filter approach is used: The Feedforward filter cleans the current signal, while the Feedback filter subtracts the interference caused by previously decided symbols.

4. LMS Adaptation

The system uses the LMS algorithm to "learn" the channel. It calculates the error between the result and the target, updating weights by a factor of μ until the MSE converges.

Outcome: By the end of the simulation, the Decision Feedback Equalizer (DFE) successfully opens the "Eye Diagram" and reduces the Bit Error Rate (BER) significantly, even in high-noise environments.

Ready to test the adaptive filters?

Launch Interactive Simulator →


Contact Us

Name

Email *

Message *