Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Sponsor

NEW! TMS320C6474: 3x the performance. 1/3 the cost. Three 1 GHz cores on 1 chip.

Discussion Groups

Discussion Groups | Matlab DSP | Adaptive Equalization

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Adaptive Equalization - cool...@yahoo.co.uk - Aug 20 21:08:40 2008



Hi,
I am looking the code for an adaptive channel equalizer. I have to do system identification in
which i will pass a predefined signal or a recorded .wav file and white Gaussain noise will be
added to the signal and using MMSE techtnique and LMS. I want to find the inverse of the
channel so that the resulting output should be the same as input. i.e                          
      H(z)=1/W(Z)

and                                
                                     W(Z)H(Z)=1
I will be thankful to you if you kindly help me with this issue. 

Regards

Zohaib



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: Adaptive Equalization - el01...@mail.ntua.gr - Aug 22 8:56:33 2008


Hi,
>I am looking the code for an adaptive channel equalizer. I have to do system identification
in which i will pass a predefined signal or a recorded .wav file and white Gaussain noise will
be added to the signal and using MMSE techtnique and LMS. I want to find the inverse of the
channel so that the resulting output should be the same as input. i.e                          
      H(z)=1/W(Z)
>
>and                                
>                                     W(Z)H(Z)=1
>I will be thankful to you if you kindly help me with this issue. 
>
>Regards
>
>Zohaib
Hi Zohaib,

this is a sample code for adaptive system identification using the NLMS algorithm:

%%%%%%%%%%%%adaptive system identification%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%Manolis Tsakiris%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all

%simulation length
N = 1000;

%channel to be identified
M = 9;
wo = randn(M,1);
wo = wo / norm(wo);

%excitation signal
u = randn(1,N);

%channel output
y = filter(wo,1,u);

%additive noise to the channel output
SNR = 30;
var_v = var(y) * 10^(-SNR/10);
v = var_v^0.5 * randn(1,N);

%desired signal
d = y + v;

%NLMS adaptive system identification
w = zeros(M,1);
u_regressor = zeros(1,M);
step = 0.5;
epsilon = 10^(-6);
msd = zeros(1,N);
for k = 1 : N
    u_regressor = [u(k) u_regressor(1:M-1)];
    e = d(k) - u_regressor * w;
    w = w + step * u_regressor' * e / (u_regressor * u_regressor' + epsilon);
    msd(k) = (w-wo)' * (w-wo);
end

figure;
plot(10*log10(msd));
ylabel('MSD(dB)');
xlabel('iterations');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

And this is a sample code for adaptive channel equalization:

%%%%%%%%%adaptive channel equalization%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%Manolis Tsakiris%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all

%simulation length
N = 1000;

%channel length
M = 5;

%number of independent trials
T = 100;

cascade_impulse_response = zeros(1,2*M-1);
for j = 1 : T    
    %training signal
    u = randn(1,N);

    %channel to be equalized    
    c = randn(M,1);
    c = c / norm(c);

    %channel output
    z = filter(c,1,u);

    %additive noise to the channel output
    SNR = 30;
    var_v = var(z) * 10^(-SNR/10);
    v = var_v^0.5 * randn(1,N);

    %input to the equalizer
    x = z + v;

    %NLMS channel equalization
    w = zeros(M,1);
    x_regressor = zeros(1,M);
    step = 0.1;
    epsilon = 10^(-6);
    for k = 4 : N
        x_regressor = [x(k) x_regressor(1:M-1)];
        e = u(k-3) - x_regressor * w;
        w = w + step * x_regressor' * e / (x_regressor * x_regressor' + epsilon);
    end
    cascade_impulse_response = cascade_impulse_response + conv(w,c)';
    display(j);
end
figure;
stem(cascade_impulse_response/T);
title('cascade channel-equalizer impulse response');
xlabel('taps');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

you can load both codes at two different .m files in your MATLAB engine and run them. 

Manolis



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )