Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is this LMS algorithm correct to equalize 2x2 MIMO system?

Status
Not open for further replies.

mai_fouad

Newbie level 1
Joined
Jul 27, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
8
I want to equalize 2x2 MIMO system, the system uses two optical fiber as a communication channel, the fiber length divided into segments and at the end of each segment coupling between two fibers occurs that needed to be equalized using LMS algorithm

I use this code and want to check is it the correct 2x2 LMS equalizer or not as it couldn't compensate the effect of the channel:
Code:
function    [outputVector,...
             errorVector,...
             coefficientVector1,coefficientVector2] =   LMS(desired,input1,input2,step,filter_length1,filter_length2,initial_coeff1,initial_coeff2)

%   Some Variables and Definitions:
%       . prefixedInput         :   Input is prefixed by nCoefficients -1 zeros.
%                                   (The prefix led to a more regular source code)
%
%       . regressor             :   Auxiliar variable. Store the piece of the
%                                   prefixedInput that will be multiplied by the
%                                   current set of coefficients.
%                                   (regressor is a COLUMN vector)
%
%       . nCoefficients         :   FIR filter number of coefficients.
%
%       . nIterations           :   Number of iterations.


%   Initialization Procedure
nCoefficients1       =   filter_length1;
nCoefficients2       =   filter_length2;

nIterations         =   length(desired);

%   Pre Allocations
errorVector             =   zeros(nIterations   ,1);
outputVector            =   zeros(nIterations   ,1);
outputVector1            =   zeros(nIterations   ,1);
outputVector2           =   zeros(nIterations   ,1);
coefficientVector1       =   zeros(nCoefficients1 ,(nIterations+1));
coefficientVector2       =   zeros(nCoefficients2 ,(nIterations+1));

%   Initial State Weight Vector
coefficientVector1(:,1)  =   initial_coeff1;
coefficientVector2(:,1)  =   initial_coeff2;
%   Improve source code regularity
prefixedInput1           =   [zeros(nCoefficients1-1,1)
                             transpose(input1)];
prefixedInput2           =   [zeros(nCoefficients2-1,1)
                             transpose(input2)];
%   Body
for it = 1:nIterations,
it;
    regressor1                   =   prefixedInput1(it+(nCoefficients1-1):-1:it,1);
    regressor2                   =   prefixedInput2(it+(nCoefficients2-1):-1:it,1);

    outputVector1(it,1)          =   (coefficientVector1(:,it)')*regressor1;
    outputVector2(it,1)          =   (coefficientVector2(:,it)')*regressor2;
    outputVector(it,1)           =   outputVector1(it,1)+outputVector2(it,1);
    errorVector(it,1)           =   desired(it)-outputVector(it,1);

    coefficientVector1(:,it+1)   =   coefficientVector1(:,it)+...
                                    (step*conj(errorVector(it,1))*...
                                    regressor1);
    coefficientVector2(:,it+1)   =   coefficientVector2(:,it)+...
                                    (step*conj(errorVector(it,1))*...
                                    regressor2);

end
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top