Equalization in the Light of MATLAB Simulink

Equalization

Equalization is, the technique, used to keep the balance between frequency components within an electronic signal, i.e. to minimizes ISI.

For many physical channels, such as telephone lines, not only are they band limited, but they also introduce distortions in their passbands. These distortions are generally InterSymbol Interferences (ISI).

Nyquist Condition:

The condition at which there is no InterSymbol interferences (ISI).

Equalizer:

A device which is used to mitigate ISI, which are incurred by the signal when it is transmitted through some channel. It’s also used to improve the performance of the receiver.

Different Types of Equalizers:

There are different types of equalizers which are used on the basis of their functionality. Some of them are listed below:

  • Linear Equalizers
  • Adaptive Equalizers
  • Blind Equalizers
  • Decision Feedback Equalizers
  • Turbo Equalizers
  • Viterbi Equalizers

What is Signal Constellations?

A signal constellation is the physical diagram used to describe all the possible symbols used by a signaling system to transmit data and is an aid to designing better communications systems.

Equalizing a Signal Using MATLAB:

Equalizing a signal using Communications System Toolbox in MATLAB software involves these steps:

  • Create an equalizer object that describes the equalizer class and the adaptive algorithm that you want to use. An equalizer object is a type of MATLAB variable that contains information about the equalizer, such as the name of the equalizer class, the name of the adaptive algorithm, and the values of the weights.
  • Adjust properties of the equalizer object, if necessary, to tailor it to your needs. For example, you can change the number of weights or the values of the weights.
  • Apply the equalizer object to the signal you want to equalize, using the equalize method of the equalizer object.

Example-“equ.m”:


% Set up parameters.
M = 16; % Alphabet size for modulation
sigconst = step(comm.RectangularQAMModulator(M),(0:M-1)’);
% Signal constellation for 16-QAM
chan = [1 0.45 0.3+0.2i]; % Channel coefficients
hMod = comm.RectangularQAMModulator(M); % QAMModulator System object

% Set up equalizers.
eqrls = lineareq(6, rls(0.99,0.1)); % Create an RLS equalizer object.
eqrls.SigConst = sigconst’; % Set signal constellation.
eqrls.ResetBeforeFiltering = 0; % Maintain continuity between iterations.
eqlms = lineareq(6, lms(0.003)); % Create an LMS equalizer object.
eqlms.SigConst = sigconst’; % Set signal constellation.
eqlms.ResetBeforeFiltering = 0; % Maintain continuity between iterations.
eq_current = eqrls; % Point to RLS for first iteration.
% Main loop
for jj = 1:4
msg = randi([0 M-1],500,1); % Random message
modmsg = step(hMod,msg); % Modulate using 16-QAM.

% Set up training sequence for first iteration.
if jj == 1
ltr = 200; trainsig = modmsg(1:ltr);
else
% Use decision-directed mode after first iteration.
ltr = 0; trainsig = [];
end

% Introduce channel distortion.
filtmsg = filter(chan,1,modmsg);

% Equalize the received signal.
s = equalize(eq_current,filtmsg,trainsig);

% Plot signals.
h = scatterplot(filtmsg(ltr+1:end),1,0,’bx’); hold on;
scatterplot(s(ltr+1:end),1,0,’g.’,h);
scatterplot(sigconst,1,0,’k*’,h);
legend(‘Received signal’,’Equalized signal’,’Signal constellation’);
title([‘Iteration #’ num2str(jj) ‘ (‘ eq_current.AlgType ‘)’]);
hold off;

% Switch from RLS to LMS after second iteration.
if jj == 2
eqlms.WeightInputs = eq_current.WeightInputs; % Copy final inputs.
eqlms.Weights = eq_current.Weights; % Copy final weights.
eq_current = eqlms; % Make eq_current point to eqlms.
end
end

The example above illustrates how to use equalize within a loop, varying the equalizer between iterations.

Explanation:

As stated above, the first step in equalization of a signal is “creating an equalizer object that describes the equalizer class and the adaptive algorithm that you want to use.”

Setting up parameters:

First of all, we’ll define the size for modulation, which in this case is:

  1. M = 16; % Alphabet size for modulation

Now we’ll use System object, comm.RectangularQAMModulator, which modulates the signal using M-ary quadrature amplitude modulation with a constellation on a rectangular lattice.

Modulating a signal using quadrature amplitude modulation has two steps:

Calling step to modulate the signal according to the properties of comm.RectangularQAMModulator.

2. sigconst = step(comm.RectangularQAMModulator(M),(0:M-1)’); % Signal constellation for 16-QAM·         Define and set up your rectangular QAM modulator object.

4. hMod = comm.RectangularQAMModulator(M);                                                         % QAMModulator System object

Set up equalizers:

Now we’ll create three equalizer objects:

An RLS equalizer object.

5. eqrls = lineareq(6, rls(0.99,0.1)); % Create an RLS . equalizer object.6. eqrls.SigConst = sigconst’; % Set signal constellation.7. eqrls.ResetBeforeFiltering = 0; % Maintain continuity between iterations.

An LMS equalizer object.

8. eqlms = lineareq(6, lms(0.003)); % Create an LMS equalizer object.9. eqlms.SigConst = sigconst’; % Set signal constellation.10. eqlms.ResetBeforeFiltering = 0; % Maintain continuity between iterations.

Here eqlms is an equalizer object that describes a linear LMS equalizer having six weights and a step size of 0.003.

A variable, eq_current, which points to the equalizer object to use in the current iteration of the loop. Initially, this points to the RLS equalizer object. After the second iteration of the loop, eq_current is redefined to point to the LMS equalizer object.

11. eq_current = eqrls; % Point to RLS for first iteration.

Simulating the System Using a Loop:

The next portion of the example is a loop that Generates a signal to transmit and selects a portion to use as a training sequence in the first iteration of the loop:

% Main loop

  1. for jj = 1:4

13   msg = randi([0 M-1],500,1); % Random message

14   modmsg = step(hMod,msg); % Modulate using 16-QAM.

% Set up training sequence for first iteration.

15   if jj == 1

ltr = 200; trainsig = modmsg(1:ltr);

16   else

% Use decision-directed mode after first iteration.

17      ltr = 0; trainsig = [];

18   end

Introduces channel distortion

% Introduce channel distortion.

  1. filtmsg = filter(chan,1,modmsg)

Equalizes the distorted signal using the chosen equalizer for this iteration, retaining the final state and weights for later use

% Equalize the received signal.

  1. s = equalize(eq_current,filtmsg,trainsig);

Plots the distorted and equalized signals, for comparison

% Plot signals.

  1. h = scatterplot(filtmsg(ltr+1:end),1,0,’bx’); hold on;
  2. scatterplot(s(ltr+1:end),1,0,’g.’,h);
  3. scatterplot(sigconst,1,0,’k*’,h);
  4. legend(‘Received signal’,’Equalized signal’,’Signal constellation’);
  5. title([‘Iteration #’ num2str(jj) ‘ (‘ eq_current.AlgType ‘)’]);
  6. hold off;

Switches to an LMS equalizer between the second and third iterations

% Switch from RLS to LMS after second iteration.

  1. if jj == 2
  2. eqlms.WeightInputs = eq_current.WeightInputs; % Copy final inputs.
  3. eqlms.Weights = eq_current.Weights; % Copy final weights.
  4. eq_current = eqlms; % Make eq_current point to eqlms.

end

end % Main Loop Ended

Results:

The example produces one scatter plot for each iteration, indicating the iteration number and the adaptive algorithm in the title. The plot is below:

result

Leave a comment