Sie sind auf Seite 1von 19

EDC 310: Practical 2

BPSK Equalization using DFE and MLSE


Gavin Jaime Fouche
13004019
September 30, 2015

DECLARATION OF ORIGINALITY
UNIVERSITY OF PRETORIA
The University of Pretoria places great emphasis upon integrity and ethical conduct in the preparation of all written work submitted
for academic evaluation.
While academic staff teach you about referencing techniques and how to avoid plagiarism, you too have a responsibility in this
regard. If you are at any stage uncertain as to what is required, you should speak to your lecturer before any written work is submitted.
You are guilty of plagiarism if you copy something from another authors work (e.g. a book, an article or a website) without
acknowledging the source and pass it off as your own. In effect you are stealing something that belongs to someone else. This is not
only the case when you copy work word-for-word (verbatim), but also when you submit someone elses work in a slightly altered form
(paraphrase) or use a line of argument without acknowledging it. You are not allowed to use work previously produced by another
student. You are also not allowed to let anybody copy your work with the intention of passing if off as his/her work.
Students who commit plagiarism will not be given any credit for plagiarised work. The matter may also be referred to the
Disciplinary Committee (Students) for a ruling. Plagiarism is regarded as a serious contravention of the Universitys rules and can
lead to expulsion from the University.
The declaration which follows must accompany all written work submitted while you are a student of the University of Pretoria.
No written work will be accepted unless the declaration has been completed and attached.

Full names of student:


Student number:
Topic of work:

Declaration
1. I understand what plagiarism is and am aware of the Universitys policy in this regard.
2. I declare that this assignment report is my own original work. Where other peoples work has been used (either from a printed
source, Internet or any other source), this has been properly acknowledged and referenced in accordance with departmental
requirements.
3. I have not used work previously produced by another student or any other person to hand in as my own.
4. I have not allowed, and will not allow, anyone to copy my work with the intention of passing it off as his or her own work.

SIGNATURE:

DATE:

Contents
1.1
1.2

1.3

1.4

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Problem Definition and Methodology . . . . . . . . . . . . . . . . . . . . . . .
1.2.1 Decision Feedback Equalisation . . . . . . . . . . . . . . . . . . . . . .
1.2.2 Maximum Likelihood Sequence Estimation (using Viterbi Algorithm)
1.2.3 Effects of channel impulse response . . . . . . . . . . . . . . . . . . . .
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3.1 Decision Feedback Equalisation . . . . . . . . . . . . . . . . . . . . . .
1.3.2 Maximum Likelihood Sequence Estimation (using Viterbi Algorithm)
Discussion and Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

3
4
4
5
6
7
7
8
9

1.1

Introduction

The role of digital communications


As the amount of information at our fingertips increases and the demand for increasingly rapid transfer
rates grows greater - The common denominator of all interaction in the digital sphere is encompassed by the
concept of digital communication. Digital communication is defined as the physical transfer of data over a
communication channel. We are surrounded by digital communications every minute of every day, from the
mouse you use on your computer to the mobile telephone in your pocket right now.

Figure 1.1: Example communication network showing Rx and Tx effected by a multipath reflected disturbance waves

Multipath Signal Propagation


Multipath signal propagation is a phenomenon that is a result of wireless radio signals taking multiple paths
to the receiving antenna, these paths are results of reflections and refractions of waves through buildings,
mountains or even the atmosphere. Effects of the multipath include interference in the form of ghosting
brought on by constructive and destructive interference as well as in some instances by phase shifts. To
quantify the effects of this phenomena a channel impulse response or CIR is used to estimate the effect
each path has on the signal. [1]

Equalisation of Multipath interferance channels


Multipath presents a unique problem that differs from conventional AWGN channel transmission, the effect
of the multipath creates ghost signals of previous sent bits in each received bit. This can be seen in the
general expression for a multipath bit (received at time k):
rk = sk c0 + sk1 c1 + sk2 c2 + noise
The solution to this problem comes in the form of equalisation techniques that employ methods that take
into account the presence of these extra interference bits. The two equalisation methods explored in
this report are:
Decision Feedback Equalisation
Maximum Likelihood Sequence Estimation (using Viterbi Algorithm)

Furthermore, the effect of different forms of CIR will also be explored.

1.2
1.2.1

Problem Definition and Methodology


Decision Feedback Equalisation

The DFE adaptive equalisation method uses the feedback from already known or assumed symbols in combination with regular methods to predict the future symbols. An important characteristic to consider is the
presence of header symbols.

Figure 1.2: A simplified illustration of a typical data block from a trasmitted sequence with header or tail
symbols to accomodate DFE or MLSE algorithms
The DFE algorithm uses delta values (inversely proportional to the probability of the future symbol) to
estimate the value of the future symbol at k for layer n for a channel impulse length of L = 3:
snk = |rk (sk c0 + sk1 c1 + sk2 c2 )|2
Note how noise is ignored in the calculation because of the uncertainty in its estimation.

1.2.2

Maximum Likelihood Sequence Estimation (using Viterbi Algorithm)

MLSE is an extension of DFE where a trellis structure is used to denote possible combinations of the
sequence. The maximum likelihood sequence is then estimated by comparing the path costs (delta values
as calculated in DFE) , the most likely sequence is then the path of shortest cost. The Viterbi algorithm is
used to find the path of shortest cost for the state space associated with the sequence. A common way of
expressing this state space is with a trellis diagram.

Figure 1.3: Example of a trellis diagram for only 2 states. [2]

Figure 1.4: Flow chart depicting the methodology behind simulating the multipath channel

1.2.3

Effects of channel impulse response

The effect of non-decreasing and non-monotonic channel impulse response vectors will also be tested on both
equalisers to assess their viability in real world applications and the effects that these inconsistencies have.
Both equalisers will be tested with the given response,
C = [0.89, 0.42, 0.12]
as well as random response generation (using Marsaglia-Bray algorithm):
C=[

Gauss() Gauss() Gauss()

,
,
]
3
3
3
=1

1.3
1.3.1

Results
Decision Feedback Equalisation

The BER plot for DFE proved to be consistent with the theoretical plots provided by theoretical approximations. Some jaggedness is apparent for the plot due to insufficient run averages.

Figure 1.5: Plot of the BER plots generated running an average of 50 iterations through the SNR range
-4dB to 8dB for the DFE equaliser

1.3.2

Maximum Likelihood Sequence Estimation (using Viterbi Algorithm)

The results for the MLSE equaliser yielded a curve similar to the one from the DFE results, however the
MLSE is noticeably better with non-decreasing channel impulse responses.

Figure 1.6: BER plot for the MLSE equaliser through SNR range from -4dB to 8dB

1.4

Discussion and Conclusion

Overall, both equalisers performed as expected for the most part. Both equalisers seem to perform almost
identically for the same linearly decreasing channel response. The two equalisers are however not equally
matched when it comes to decoding information with an irregular (or non-decreasing) channel impulse
response.

Figure 1.7: Plot of comparison between DFE and MLSE


As is visible in Figure 1.5 the DFE suffers when introduced to the random channel impulse response. It
seems that DFE is unable to cope well with non-linear channel impulse response multipath channels. In
Figure 1.7 we can clearly see the main differentiating characteristic that sets MLSE apart from DFE its ability to adapt to different channel impulse responses. In response to the randomly generated channel
responses the MLSE equaliser seems totally unperturbed, the DFE equaliser suffers.
In assuming the channel impulse responses are sequential in time, a non-decreasing channel impulse response
vector indicates that the shortest (and what should be the most direct) paths are hindered by some other
obstacle or medium that is less permeable than that of the longer paths. The result of this is that the most
prominent bit streams are those that are indirectly routed to the receiver and received as convolutions on
the future bits - this is the reason for the drastically reduced accuracy of the equalisers under unnatural
channel impulse conditions.
The very nature of DFE works to compound the mistakes made in assuming the correct bits - this is its
fundamental flaw. MLSE does not suffer from this flaw because it considers the bit stream sequence as a
larger sequential order of state spaces, with many combinations and possibilities it only makes a concrete
decision at the end of validating the entire state space - this is its strength. DFE only assumes the probability
of the current section it is evaluating where as MLSE finds a complete maximum probability solution.

Bibliography
[1] J. G. Proakis, M. Salehi, N. Zhou, and X. Li, Communication systems engineering, vol. 1. Prentice-hall
Englewood Cliffs, 1994.
[2] Z. Jia, Y. Cai, H.-C. Chien, and J. Yu, Performance comparison of spectrum-narrowing equalizations
with maximum likelihood sequence estimation and soft-decision output, Optics express, vol. 22, no. 5,
pp. 60476059, 2014.

10

Appendix A: MATLAB code


DFE.m
clear all;
close all;
clc;
SNRdB = -4:0.1:10 ; % run from -4 to 8 dB.
BERvalues = zeros(1,length(SNRdB));
BERvaluesRand = zeros(1,length(SNRdB));
noRunsEach = 10;
% seeds:
a = clock;
s1 = sum(a(1:6));
s2 = floor(prod(a(4:6)));
s3 = floor(prod(a(1:2)));
N = 300; % size of the data received.
CIR = [0.89, 0.42, 0.12]; % this is the channel impulse response.
L = size(CIR,2); % channel impulse length L. should be 3.
noHeaders = L - 1;
% allocate the transmitted symbol vector:
% ( including the headers and tails. )
% no headers = L - 1, so: 2 headers.
for iSNR = 1:length(SNRdB)
nErrorsAvg = 0;
for n=1:noRunsEach
% allocate space:
eqSymbols = zeros(1, N + (noHeaders)); % incl. headers
transmittedSymbols = zeros(1, N + (noHeaders)); % incl. headers
r = zeros(1,N); % only data, no headers.
nErrors = 0;
% generate received symbol vector (using the generators from first
% practical)
% UNIFORM - WICHMANN HILL
% GAUSSIAN - MARSAGLIA BRAY
transmittedSymbols(1:2) = 1; % assign headers as s1.
eqSymbols(1:2) = 1; % assign headers as s1.

for i=1+noHeaders:N+(noHeaders)
[ randWich , s1, s2, s3 ] = WichmannHill(s1,s2,s3);
transmittedSymbols(i) = ((randWich > 0.5) * 2) - 1 ; % generate the symbols
r(i-noHeaders) = transmittedSymbols(i)*CIR(1) + transmittedSymbols(i-1)*CIR(2) + transmittedSymbols(i% add noise: TODO getSigma(SNRdB(i), 1)
r(i-noHeaders) = r(i-noHeaders)+ (getSigma(SNRdB(iSNR), 1) * MarsagliaBray());
end
% at this point we have generated a received data vector r with noise and
% multipath element interfearance.
for i=1 : N % N
% loop through each of the received vectors and equalize.
% using DFE we use the previously known symbols.
tempS1 = eqSymbols(i:i+noHeaders-1);
tempS1(L) = 1;

11

tempS2 = eqSymbols(i:i+noHeaders-1);
tempS2(L) = -1;
delta s1 = DeltaDFE(CIR, r(i), tempS1, L);
delta s2 = DeltaDFE(CIR, r(i), tempS2, L);
if (DeltaDFE(CIR, r(i), tempS1, L) < DeltaDFE(CIR, r(i), tempS2, L))
% if delta(s1) is < delta(s2) then we know its s1.
eqSymbols(noHeaders+i) = 1;
else
eqSymbols(noHeaders+i) = -1;
end
if (eqSymbols(noHeaders+i) ~= transmittedSymbols(noHeaders+i))
nErrors = nErrors + 1;
end
% now we have decided and assumed the value of the data bit at r(i).
end
nErrorsAvg = nErrorsAvg + nErrors;
end
BERvalues(iSNR) = (nErrorsAvg / noRunsEach) / N;
disp('Finished an SNR level');
end
semilogy(SNRdB, BERvalues, 'b');
hold on;
% NOW do it for randomly generated CIR:
% same process but now the CIR changes each iteration:
% CIR = [0.89, 0.42, 0.12]; % this is the channel impulse response.

for iSNR = 1:length(SNRdB)


nErrorsAvg = 0;
for n=1:noRunsEach
% GENERATE THE RANDOM CIR:
CIR = [ MarsagliaBray() / sqrt(3) , MarsagliaBray() / sqrt(3), MarsagliaBray() / sqrt(3) ];

% allocate space:
eqSymbols = zeros(1, N + (noHeaders)); % incl. headers
transmittedSymbols = zeros(1, N + (noHeaders)); % incl. headers
r = zeros(1,N); % only data, no headers.
nErrors = 0;
% generate received symbol vector (using the generators from first
% practical)
% UNIFORM - WICHMANN HILL
% GAUSSIAN - MARSAGLIA BRAY
transmittedSymbols(1:2) = 1; % assign headers as s1.
eqSymbols(1:2) = 1; % assign headers as s1.

for i=1+noHeaders:N+(noHeaders)
[ randWich , s1, s2, s3 ] = WichmannHill(s1,s2,s3);
transmittedSymbols(i) = ((randWich > 0.5) * 2) - 1 ; % generate the symbols
r(i-noHeaders) = transmittedSymbols(i)*CIR(1) + transmittedSymbols(i-1)*CIR(2) + transmittedSymbols(i% add noise: TODO getSigma(SNRdB(i), 1)
r(i-noHeaders) = r(i-noHeaders)+ (getSigma(SNRdB(iSNR), 1) * MarsagliaBray());
end

12

% at this point we have generated a received data vector r with noise and
% multipath element interfearance.
for i=1 : N % N
% loop through each of the received vectors and equalize.
% using DFE we use the previously known symbols.
tempS1 = eqSymbols(i:i+noHeaders-1);
tempS1(L) = 1;

tempS2 = eqSymbols(i:i+noHeaders-1);
tempS2(L) = -1;
delta s1 = DeltaDFE(CIR, r(i), tempS1, L);
delta s2 = DeltaDFE(CIR, r(i), tempS2, L);
if (DeltaDFE(CIR, r(i), tempS1, L) < DeltaDFE(CIR, r(i), tempS2, L))
% if delta(s1) is < delta(s2) then we know its s1.
eqSymbols(noHeaders+i) = 1;
else
eqSymbols(noHeaders+i) = -1;
end
if (eqSymbols(noHeaders+i) ~= transmittedSymbols(noHeaders+i))
nErrors = nErrors + 1;
end
% now we have decided and assumed the value of the data bit at r(i).
end
nErrorsAvg = nErrorsAvg + nErrors;
end
BERvaluesRand(iSNR) = (nErrorsAvg / noRunsEach) / N;
disp('Finished an SNR level');
end
semilogy(SNRdB, BERvaluesRand, 'r');
hold on;
title('A bit-error rate curve for BPSK sequence with a DFE equaliser');
legend('Given CIR', 'Random CIR');
xlabel('SNR (in dB)');
ylabel('BER');

13

MLSE.m
clear all;
close all;
clc;
SNRdB = -4:0.1:10 ; % run from -4 to 8 dB.
BERvalues = zeros(1,length(SNRdB));
BERvaluesRand = zeros(1,length(SNRdB));
noRunsEach = 100;
% seeds:
a = clock;
s1 = sum(a(1:6));
s2 = floor(prod(a(4:6)));
s3 = floor(prod(a(1:2)));
N = 300; % size of the data received.
CIR = [0.89, 0.42, 0.12]; % this is the channel impulse response.
L = size(CIR,2); % channel impulse length L. should be 3.
noHeaders = L - 1;
% allocate the transmitted symbol vector:
% ( including the headers and tails. )
% no headers = L - 1, so: 2 headers.
for iSNR = 1:length(SNRdB)
nErrorsAvg = 0;
for n=1:noRunsEach
% allocate space:
eqSymbols = zeros(1, N + (noHeaders)); % incl. headers
transmittedSymbols = zeros(1, N + (noHeaders)); % incl. headers
r = zeros(1,N); % only data, no headers.
nErrors = 0;
% generate received symbol vector (using the generators from first
% practical)
% UNIFORM - WICHMANN HILL
% GAUSSIAN - MARSAGLIA BRAY
transmittedSymbols(1:2) = 1; % assign headers as s1.
eqSymbols(1:2) = 1; % assign headers as s1.

for i=1+noHeaders:N+(noHeaders)
[ randWich , s1, s2, s3 ] = WichmannHill(s1,s2,s3);
transmittedSymbols(i) = ((randWich > 0.5) * 2) - 1 ; % generate the symbols
r(i-noHeaders) = transmittedSymbols(i)*CIR(1) + transmittedSymbols(i-1)*CIR(2) + transmittedSymbols(i% add noise: TODO getSigma(SNRdB(i), 1)
r(i-noHeaders) = r(i-noHeaders)+ (getSigma(SNRdB(iSNR), 1) * MarsagliaBray());
end
% at this point we have generated a received data vector r with noise and
% multipath element interfearance.
eqSymbols(3:N+noHeaders) = doViterbi(r, CIR);
for i=1 : N
if (eqSymbols(noHeaders+i) ~= transmittedSymbols(noHeaders+i))
nErrors = nErrors + 1;
end
end
nErrorsAvg = nErrorsAvg + nErrors;
end

14

BERvalues(iSNR) = (nErrorsAvg / noRunsEach) / N;


disp('Finished an SNR level');
end
semilogy(SNRdB, BERvalues, 'b');
hold on;
% NOW do it for randomly generated CIR:
% same process but now the CIR changes each iteration:
% CIR = [0.89, 0.42, 0.12]; % this is the channel impulse response.

for iSNR = 1:length(SNRdB)


nErrorsAvg = 0;
for n=1:noRunsEach
% GENERATE THE RANDOM CIR:
CIR = [ MarsagliaBray() / sqrt(3) , MarsagliaBray() / sqrt(3), MarsagliaBray() / sqrt(3) ];

% allocate space:
eqSymbols = zeros(1, N + (noHeaders)); % incl. headers
transmittedSymbols = zeros(1, N + (noHeaders)); % incl. headers
r = zeros(1,N); % only data, no headers.
nErrors = 0;
% generate received symbol vector (using the generators from first
% practical)
% UNIFORM - WICHMANN HILL
% GAUSSIAN - MARSAGLIA BRAY
transmittedSymbols(1:2) = 1; % assign headers as s1.
eqSymbols(1:2) = 1; % assign headers as s1.

for i=1+noHeaders:N+(noHeaders)
[ randWich , s1, s2, s3 ] = WichmannHill(s1,s2,s3);
transmittedSymbols(i) = ((randWich > 0.5) * 2) - 1 ; % generate the symbols
r(i-noHeaders) = transmittedSymbols(i)*CIR(1) + transmittedSymbols(i-1)*CIR(2) + transmittedSymbols(i% add noise: TODO getSigma(SNRdB(i), 1)
r(i-noHeaders) = r(i-noHeaders)+ (getSigma(SNRdB(iSNR), 1) * MarsagliaBray());
end
% at this point we have generated a received data vector r with noise and
% multipath element interfearance.
eqSymbols(3:N+noHeaders) = doViterbi(r, CIR);
for i=1 : N
if (eqSymbols(noHeaders+i) ~= transmittedSymbols(noHeaders+i))
nErrors = nErrors + 1;
end
end
% now we have decided and assumed the value of the data bit at r(i).
nErrorsAvg = nErrorsAvg + nErrors;
end
BERvaluesRand(iSNR) = (nErrorsAvg / noRunsEach) / N;
disp('Finished an SNR level');
end
semilogy(SNRdB, BERvaluesRand, 'r');
hold on;
title('A bit-error rate curve for BPSK sequence with a DFE equaliser');

15

legend('Given CIR', 'Random CIR');


xlabel('SNR (in dB)');
ylabel('BER');

Delta.m
function RESULT = Delta(cir, r, s)
RESULT = abs( r - (cir(1))*s(1) - (cir(2))*s(2) - (cir(3))*s(3)).2;
end

DeltaDFE.m
function RESULT = DeltaDFE(cir, r, s, Lsize)
if (size(s,2) ~= Lsize)
disp('delta s size mismatch');
RESULT = 0;
else
%RESULT = abs( r - (cir(1))*s(3) - (cir(2))*s(2) - (cir(3))*s(1)).2;
tempResult = r;
for i=1:Lsize
tempResult = tempResult - cir(i)*s(Lsize - (i-1));
end
RESULT = abs(tempResult).2;
end
end

16

doViterbi.m
% function that equalizes a given received vector using MLSE - Viterbi.
function RESULT = doViterbi( r, CIR )
% given r, the sequence (preamble ommitted)
L = size(CIR,2);
N = size(r, 2);
%allocate the shifted symbols vector (could do dynamically but meh)
%represents the transitions of the 4 states.
symb = [ 1 1 1 ; -1 1 1;
1 1 -1 ; -1 1 -1;
1 -1 1 ; -1 -1 1;
1 -1 -1 ; -1 -1 -1 ];

delta values = zeros(8, N); % metrics


for i=1:N % layers
for k=1:size(symb,1) % for each transition get the delta.
delta values(k, i) = Delta(CIR, r(i), symb(k,1:3));
end
end
% now we have a set of delta values.
distance=zeros(4,N+1);
distance(1,1)=0; % we cannot possibly come from anywhere but 11 (preamble)
distance(2,1)=Inf;
distance(3,1)=Inf;
distance(4,1)=Inf;
eqResult = zeros(1, N+(L-1));
eqResult(1:2) = 1; % preambles.

for i=1:N
% for all layers:
distance(1,i+1)=
distance(2,i+1)=
distance(3,i+1)=
distance(4,i+1)=
end

min(distance(1,i)+delta
min(distance(1,i)+delta
min(distance(2,i)+delta
min(distance(2,i)+delta

values(1,i),distance(3,i)+delta
values(2,i),distance(3,i)+delta
values(3,i),distance(4,i)+delta
values(4,i),distance(4,i)+delta

values(5,i));
values(6,i));
values(7,i));
values(8,i));

[~, state] = min(distance(:,N+1));


for iBack=N:-1:1
[state,decoded bit]=getPrev(state,distance(:,iBack),delta values(:,iBack));
decoded bit final(iBack) = decoded bit;
end

RESULT = decoded bit final;


end

17

getPrev.m
function [prevState,resultBit] = getPrev(curr,distance prev,weight)
if(curr==1)
if(distance prev(1)+weight(1) <= distance prev(3)+weight(5))
prevState=1;resultBit=1;
else
prevState=3;resultBit=1;
end
end
if(curr==2)
if(distance prev(1)+weight(2) <= distance prev(3)+weight(6))
prevState=1;resultBit=-1;
else
prevState=3;resultBit=-1;
end
end
if(curr==3)
if(distance prev(2)+weight(3) <= distance prev(4)+weight(7))
prevState=2;resultBit=1;
else
prevState=4;resultBit=1;
end
end
if(curr==4)
if(distance prev(2)+weight(4) <= distance prev(4)+weight(8))
prevState=2;resultBit=-1;
else
prevState=4;resultBit=-1;
end
end
end

getSigma.m
function [ outputS ] = getSigma( SNR , fbit )
% SNR in dB
% fbit for BPSK (=1) or QPSK (=2)
outputS = 1 ./ sqrt(power(10, SNR./10) * 2 * fbit);

end

18

Das könnte Ihnen auch gefallen