Digital Communications
(UESTC 4004)
Lab 2: Channel Equalization
A. Introduction
Intersymbol interference (ISI) refers to interference caused by the time response of the channel spilling over from one symbol into adjacent symbols. ISI has the effect of introducing errors between the data sequence at the receiver output and the original data sequence applied to the transmitter. Hence, unless corrective measures are taken, intersymbol interference could impose a limit on the attainable communication rate. To compensate the channel induced ISI we use the technique known as Equalization. The objective of this lab is to design and investigate the performance of a type of equalizer known as Zero Forcing Equalizer.
B. Create Output Pulse
The effect of a filter on a waveform. can be viewed in the time domain. The output y(t) resulting from convolving an ideal input pulse x(t) shown in Figure 1 (having amplitude Vm and pulse width T) with the impulse response of a first-order low-pass filter can be written as
where and is the time constant of the channel.
The amplitude of the impulse response Vm = 1, the pulse period T = 1, and the time constant of the channel T = 1. Given that the sampling time in simulation dt = 0.01, plot the output response y(t) for 0 ≤ t ≤ T + 5T by using the following MATLAB code. Note that T = tau in the MATLAB code
Fig. 1. Ideal pulse.
c = [Vm*(1 - exp(-[dt : dt : T]'/tau)); Vm*(1 - exp(-T/tau))
*exp(-([T + dt : dt : T+5*tau]' -T)/tau)];
figure()
plot(dt:dt: T+5*tau, c);
ylim([0 1]);
Next, for fixed pulse period T = 1, also plot the output response for T = 0.2, 10
Comment on the resulting figures.
Hint: Compare the output response with the input pulse x(t) in Fig. 1. Ensure that plots have
the same limit on the y-axis.
Note that T = 1 for the rest of the lab unless otherwise stated.
C. Generate the Received Signal with Intersymbol Interference
In the previous section, we have shown the output response y(t) of an ideal input pulse. The channel impulse response c(t) is equivalent to the received impulse y(t) of an ideal pulse, i.e., c(t) = y(t) In this section, you will create the received signal with intersymbol interference.
First generate N = 1000 BPSK bits/symbols.
Hint 1: Use the rand function in MATLAB. Note that v rand(1,N) > 0.5 will generate 0, 1 with equal probability, where N is the number of bits
Hint 2: For BPSK modulation, the N symbols/bits can be obtained as b = 2 * v - 1 such that 0 → -1, 1 → 1
Let T = 1 be the BPSK symbol/bit period. To create the received signal with ISI, you should consider the following
· The number of simulation samples over one BPSK symbol nT can be obtained as nT = dt/T, where dt is the time in the simulation. Here we set dt = 0: 01
· nc denote the length of the vector with the channel impulse response, i.e., nc = length(c)
· x is an nx x 1 matrix of the received signal with ISI where nx = N * nT
The received signal with ISI can be obtained using the following MATLAB code
x = zeros(nx, 1);
for n=1:N
i1 = (n-1)*nT;
y = [zeros(i1,1); b(n)*c; zeros(N*nT-i1-nc,1)];
x = x + y(1:nx);
end
Note that due to the effects of system filtering, the tail of a pulse can smear into adjacent symbol interval, thereby interfering with the detection process and degrading the error performance; such interference is termed intersymbol interference (ISI). Even in the absence of noise, the effect of filtering and channel-induced distortion lead to ISI.
Next plot the eye diagram with no equalization.
Hint: you can use the following MATLAB code
figure()
hold on
for n=1:2:N
plot(dt : dt : 2, x((n-1)*nT+1:(n+1)*nT));
end
Compute the number of received bit in error by comparing the transmitted bit and the sampled received bit (with ISI) at intervals such that xT = x(nT:nT:nx);
Hint: Use the following MATLAB code
xT = x(nT:nT:nx);
dz0 = find(xT < 0);
dz1 = find(xT >= 0);
db = b;
db(dz0) = -1*ones(size(dz0));
db(dz1) = +1*ones(size(dz1));
err = find(db ~= b);
fprintf('No equalizer: %d bits out of %d in error\n', length(err), N);
Now consider the case with T = 0.2, 10. Compute the number of bits in error for each case
Plot the eye diagram for T = 0.2, 10 and comment on the performance.
Use a flowchart to describe key steps in the MATLAB code you have implemented
D. Implement Zero Forcing Equalizer
In this section, you will implement the zero-forcing equalizer and show its effect by plotting the Eye diagram. You should follow the following process
· Define the length of the zero-forcing equalizer Ne. Note that Ne should be sufficiently large so that equalizer spans length of the ISI. You can select Ne = 5*tau/T;
· Get samples of the channel response ct to solve for the zero forcing (ZF) equalizer weight. Hint the samples cT = c(nT:nT:nc);
· Using the sample of the channel c(t) and the toeplitz function in matlab, construct the matrix on the right side of the ZF equalizer equation C.
Hint: C = toeplitz([cT(1:end)' zeros(1,2*Ne+1-L)],[cT(1) zeros(1,2*Ne)]);
L is the length of the matrix cT , i.e., L = length(cT);
· Construct the matrix on the left side of the ZF equalizer weight equation.
Hint: z = [zeros(Ne,1); 1; zeros(Ne,1)];
· Solve for the ZF equalizer weight w. Note that z = Cw and w = inv(C)*z
Next you should process the received signal with the ZF equalizer through the following steps.
· Obtain the impulse response of the equalizer hzf which can be generated as hzf = kron(w, z0);where z0 = [1; zeros(nT-1,1)];
· Perform. the equalization using the convolution function, i.e., yall = conv(x, hzf);
· Select the output y = yall((Ne*nT+1):(length(yall)-(Ne+1)*nT)+1);
Next plot the eye diagram for the equalized signal and compare the result with the case without an equalizer.
Hint: Use the following MATLAB code
figure()
hold on
for n=1:2:N
plot(dt : dt : 2, y((n-1)*nT+1:(n+1)*nT));
end
Compute number of received equalized signal in error by comparing the transmitted bit b and the sampled equalized signal yT at intervals such that yT = y(nT : nT : nx).
Hint: Use the following MATLAB code
yT = y(nT:nT:nx);
dz0 = find(yT < 0);
dz1 = find(yT >= 0);
db = b;
db(dz0) = -1*ones(size(dz0));
db(dz1) = +1*ones(size(dz1));
err = find(db ~= b);
fprintf('ZF equalizer: %d bits out of %d in error\n', length(err), N);
Use a flowchart to describe key steps in the MATLAB code you have implemented.