Tuesday, August 23, 2011

Channel Equalizer using Simulink Model

Introduction to Simulink

 Simulink® software models, simulates, and analyzes dynamic systems. It enables us to pose a question about a system, model the system, and see what happens.

With Simulink, we can easily build models from scratch, or modify existing models to meet needs. Simulink supports linear and nonlinear systems, modelled in continuous time, sampled time, or a hybrid of the two. Systems can also be multi rate—having different parts that are sampled or updated at different rates.

Here, in the case of channel equalization we developed a model for frequency selective dispersive channel as shown in Fig 5.1. In which user can specify the dispersion index of channel. At the transmitter end we have used 64-QAM modulation scheme which generates the message symbols and feed it to the channel.

Dispersive channel is frequency selective hence it would not pass all the symbols in similar manner. So before demodulation of message signal, channel equalization is done as mentioned in previous chapter.

Description of various blocks of model

Ø  Random Integer Generator

The Random Integer Generator block generates uniformly distributed random integers in the range [0, M-1], where M is the M-ary number defined in the dialog box.

Ø  Rectangular QAM Modulator Baseband

The Rectangular QAM Modulator Baseband block modulates using M-ary quadrature amplitude modulation with a constellation on a rectangular lattice. The output is a baseband representation of the modulated signal.

The Rectangular QAM Modulator Baseband block provides the capability to visualize a signal constellation from the block mask. This Constellation Visualization feature allows you to visualize a signal constellation for specific block parameters.

Here Input type is set to Integer, the block accepts integers. The input can be either a scalar or a frame-based column vector, and the block can accept the data type int8, uint8, int16, uint16, int32, uint32, single, and double.

Ø  Band-Limited White Noise

The Band-Limited White Noise block generates normally distributed random numbers that are suitable for use in continuous or hybrid systems.

The primary difference between this block and the Random Number block is that the Band-Limited White Noise block produces output at a specific sample rate, which is related to the correlation time of the noise.

In Simulink software, you can simulate the effect of white noise by using a random sequence with a correlation time much smaller than the shortest time constant of the system. The Band-Limited White Noise block produces such a sequence. The correlation time of the noise is the sample rate of the block.

Ø  LMS Filter

The LMS Filter block can implement an adaptive FIR filter using five different algorithms. The block estimates the filter weights, or coefficients, needed to minimize the error, e(n), between the output signal y(n) and the desired signal, d(n).
Connect the signal you want to filter to the Input port. This input signal can be a sample-based scalar or a single-channel frame-based signal. Connect the desired signal to the desired port. The desired signal must have the same data type, frame status, complexity, and dimensions as the input signal. The Output port outputs the filtered input signal, which is the estimate of the desired signal. The output of the Output port has the same frame status as the input signal. The Error port outputs the result of subtracting the output signal from the desired signal.

Ø  Frame Conversion

The Frame Conversion block passes the input through to the output and sets the output sampling mode to the value of the Sampling mode of output signal parameter, which can be either Frame-based or Sample-based. The output sampling mode can also be inherited from the signal at the Ref (reference) input port, which you make visible by selecting the Inherit output sampling mode from <Ref> input port check box.

Ø  Rectangular QAM Demodulator Baseband

The Rectangular QAM Demodulator Baseband block demodulates a signal that was modulated using quadrature amplitude modulation with a constellation on a rectangular lattice.

The signal constellation has M points, where M is the M-ary number parameter. M must have the form 2K for some positive integer K.

The demodulator algorithm maps received input signal constellation values to M-ary integer I and Q symbol indices between 0 and  and then maps these demodulated symbol indices to formatted output values.

Ø  Discrete-Time Scatter Plot Scope

The Discrete-Time Scatter Plot Scope block displays scatter plots of a modulated signal, to reveal the modulation characteristics, such as pulse shaping or channel distortions of the signal.

The Discrete-Time Scatter Plot Scope block has one input port. The input signal must be complex. The block accepts signal of type double, single, base integer, and fixed-point for input, but will cast it as double. In sample-based mode, the input signal must be a scalar value. In frame-based mode, the input signal must be a column vector or a scalar value.

Ø  Spectrum Scope

The Spectrum Scope block computes and displays the periodogram of the input. The input can be a sample-based or frame-based vector or a frame-based matrix.

The Buffer input check box must be selected for sample-based inputs. Buffering is optional for frame-based inputs. When the block input is buffered, you specify the number of input samples that the block buffers before computing and displaying the magnitude FFT in the Buffer size parameter. You also use the Buffer overlap parameter to specify the number of samples from the previous buffer to include in the current buffer. The number of new input samples the block acquires before computing and displaying the magnitude FFT is the difference between the buffer size and the buffer overlap.

Ø  Complex to Real-Imag

The Complex to Real-Imag block accepts a complex-valued signal of any data type supported by Simulink software, including fixed-point data types. It outputs the real and/or imaginary part of the input signal, depending on the setting of the Output parameter. The real outputs are of the same data type as the complex input. The input can be an array (vector or matrix) of complex signals, in which case the output signals are arrays of the same dimensions. The real array contains the real parts of the corresponding complex input elements. The imaginary output similarly contains the imaginary parts of the input elements.

Ø  Vector Scope

The Vector Scope block is a comprehensive display tool similar to a digital oscilloscope. The block can display time-domain, frequency-domain, or user-defined signals. We can use the Vector Scope block to plot consecutive time samples from a frame-based vector, or to plot vectors containing data such as filter coefficients or spectral magnitudes. To compute and plot the periodogram of a signal with a single block, use the Spectrum Scope block.

The input to the Vector Scope block can be any real-valued M-by-N matrix, column or row vector, or 1-D (unoriented) vector, where 1-D vectors are treated as column vectors. Regardless of the input frame status, the block treats each column of an M-by-N input as an independent channel of data with M consecutive samples.

Ø  Abs

Abs block outputs the absolute value of the input

Ø  Scope and Floating Scope

The Scope block displays its input with respect to simulation time.

The Scope block can have multiple axes (one per port) and all axes have a common time range with independent y-axes. The Scope block allows us to adjust the amount of time and the range of input values displayed. We can move and resize the Scope window and we can modify the Scope's parameter values during the simulation.

Simulation Result

Ø   generating random symbols and modulating with 64-QAM modulation scheme

Channel Type:

Ø  Dispersive-frequency selective channel with dispersion index of 3.5 with additive random noise. We can change it by feeding value in dialog box.

Adaptive Filter Specifications:
Ø  NLMS(normalised-LMS) Algorithm
Ø  Step Size µ = 0.1
Ø  Filter length = 9
Ø  Leakage factor =1 (ideal)
v  We can change the parameters of adaptive filter like type of algorithm, step size µ, filter length and leakage factor by dialog box of block as shown in Fig.

Adaptive Filter (equalizer) properties dialog box

 error in message symbol

absolute value of error