Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Matlab Exercise #3
In this exercise, you are required to create a runnable m-file during the exercise. Always use correct figure
numbers, e.g., figure(3) for figure number 3, so the overall m-file will produces nice figures.
Be prepared to discuss with the teacher about the questions given in red text. Teacher might approach
you and start discussion, so think about them and try them beforehand with your freshly generated
Matlab m-file.
You should now see a pure 16-QAM constellation. Try to understand how the random data is
mapped to constellation points. The above way to create 16-QAM alphabets is short. Can you think
of other ways to create the alphabet?
This is just an example channel. It is a single realization of truncated version of actual channel used,
e.g., in 3GPP LTE radio link evaluations.
Then we define L1 and L2 based on the above channel model. See lecture material p.317 how to
define these for any channel:
L1=1; L2=3; % Channel maximum tap is the second one, see p.317. we start with a pretty short
equalizer… later we increase the length also
We then plot absolute values of the channel impulse response. Notice that the channel is
complex valued, so absolute value tells the relative strength of each of the channel taps. We use
subplot command here, because later we will plot additional subplots to this same figure(2):
figure(2); subplot(311); stem(-L1:L2,abs(p),'r');legend('ISI Channel');
title('Absolute values of impulse responses'); % Absolute values of channel impulse response
Now we plot the amplitude response of the channel. Notice again the subplot command, we
will come back to figure(4) again, and plot some friends for the channel’s response:
%Plotting amplitude response of the channel:
figure(4); [H,f]=freqz(p,1,-Rs/2:Rs/200:Rs/2,Rs); plot(f/1e6,20*log10(abs(H)),'b'); grid on;
xlabel('Frequency [MHz]');ylabel('Amplitude response [dB]'); legend('ISI Channel');
title('Frequency Responses');
Notice that we computed the amplitude response of the channel with freqz function. How can you
do it with fft-function?
Now, we plot the constellation of the signal after the channel. ISI is now present in the
constellation
figure(6);plot(real(Rk),imag(Rk),'o'); grid on; xlabel('RE');ylabel('IM'); % Constellation
with ISI
2 CHANNEL EQUALIZATION WITH LEAST SQUARES BASED AND
INVERSION BASED ZF-FIR EQUALIZERS
Here we are cancelling the effect of the channel by using a filter that has approximately the
opposite effect to the signal as the channel. We are therefore trying to design a filter (equalizer)
that based on some design criterion minimizes the ISI. Here, we study least squares (LS) based
equalizer (see p.318-319) and channel inversing base equalizer (see p.320-321).
You can see that we use so-called pseudo-inverse to solve the LS solution for the equalizer. Our
goal is to have Pc = uZF (we use zero forcing, i.e., try to force ICI to zero). With LS criterion we
- 1
can solve c = (PH P ) PH uZF . Notice that P is not square matrix, so we cannot solve traditional
inverse.
You can see that now instead of pseudo-inverse, we use actual inverse. We only pick up limited
amount of rows of P to get a square matrix (see p.320), so we can have solution Palt c = uZF ,alt .
Now since Palt is square matrix, we can solve c = Palt- 1uZF ,alt .
%% Plotting absolute values of the total impulse response of channel + LS/INV equalizers
figure(3);subplot(211);stem(-N1-L1:N2+L2,abs(conv(p,c_LS)));
legend('ISI Channel + LS equalizer'); axis([-N1-L1 N2+L2 0 Inf]);
figure(3);subplot(212);stem(-N1-L1:N2+L2,abs(conv(p,c_INV)));
legend('ISI Channel + INV equalizer'); axis([-N1-L1 N2+L2 0 Inf]);
Does the equalizers work well? Are there any differences in performance of LS and INV
equalizers?
What happens if you change the equalizer tail lengths N1 and N2? Please evaluate the different
length equalizers.
Can you get it still work, if you change the channel? You can try, e.g., very simple lowpass
channel fir1(4,0.5). Try to set the parameters so that the equalizer work without using overly
high values of N1 and N2.