This model shows how to implement fixed-point signal processing with blocks that contain MATLAB code. Unlike the example described in Adaptive Equalization, which uses blocks in the Equalizers library, this example uses the MATLAB Function block in Simulink to construct equalizers. This example is also different from the example described in Adaptive Equalization Using MATLAB Coder, where the focus here is the fixed-point data type process. Fixed-Point Designer™ is needed to run the model.
The communications link in this model includes these components:
A Transmitter and Dispersive Channel subsystem which generates symbols and transmits them through a dispersive channel with AGWN.
A Floating Point Adaptive Linear Equalizer which implements an equalizer by using floating point MATLAB.
A Fixed-point Adaptive Linear Equalizer which implements an equalizer by using fixed-point MATLAB.
Initial Settings, Display and Scopes
The transmitter and dispersive channel subsystem consists of:
A random data source which contains the training sequence at the start of each frame
A modulator that modulates the data and the training sequence. Each frame contains 100 data symbols and 20 training symbols
The Floating Point MATLAB equalizer performs floating point equalization and compensates for the ISI distortion. The API of the MATLAB equalizer is similar to that of the corresponding equalizer block in the Equalizer library. You can control the behavior of the LMS equalizer by setting the following parameters:
Number of taps
To program the MATLAB Function block, edit the code from the MATLAB Editor directly:
The parameter settings, input port settings and output port settings can be defined in the Ports and Data Manager. You can open the Ports and Data Manager by clicking on the Edit Data/Port button.
The Fixed-point MATLAB equalizer performs fixed-point equalization and compensates for the ISI distortion. You can set the input signal and the training signal to be fixed-point data type. The parameters can be set to fixed-point data type from the mask dialog.
Similar to the floating point case, you can edit the code from the MATLAB Editor directly. The parameter settings, input port settings and output port settings can be defined from the Ports and Data Manager.
One advantage of using the MATLAB Function block to implement a mathematically complicated algorithm as equalizers is that users have full control of the code and algorithm implementation. For fixed-point data type, the word length and fraction length of each variable can be adjusted to obtain optimized performance.
When you run the simulation, the Symbol Error Rate (SER) Display shows the SER results. You can use the SER results from the floating point equalizer as a reference and compare against the fixed-point equalizer results to verify the fixed-point settings. For example, if the fixed-point settings are properly chosen (word length, fraction length, rounding mode, overflow mode, etc. as the default in this model), the SER result from the fixed-point equalizer should be very close to that of the floating point equalizer:
Otherwise, if the fixed-point settings are not chosen properly, overflow or underflow may occur and the fixed-point processing will lose precision. For example, if the fraction length of Step size is set to 5, underflow occurs. In this case, the SER result from the fixed-point equalizer will be worse.
The scope windows display scatter plots of the signal before equalization, after floating point equalization, and after fixed-point equalization. You can double-click the Open Scopes or the Close Scopes blocks to open or close the scatter plots.
 Simon Haykin, Adaptive Filter Theory, Third Ed., New Jersey, PRENTICE HALL, 1996.