Reply by ajitdada99999 February 26, 20092009-02-26
i done the following program for adaptive equalization using lms
algorithm. but the BER is about 0.5. how to minimize the BER?
please help me........

M = 16; % Size of signal constellation
k = log2(M); % Number of bits per symbol
n = 3e3; % Number of bits to process
nsamp = 1; % Oversampling rate

%% Signal Source
% Create a binary data stream as a column vector.
x = randint(n,1); % Random binary data stream

% Plot first 40 bits in a stem plot.
stem(x(1:40),'filled');
title('Random Bits');
xlabel('Bit Index'); ylabel('Binary Value');
%% Bit-to-Symbol Mapping
% Convert the bits in x into k-bit symbols.
xsym = bi2de(reshape(x,k,length(x)/k).','left-msb');

%% Stem Plot of Symbols
% Plot first 10 symbols in a stem plot.
figure; % Create new figure window.
stem(xsym(1:100));
title('Random Symbols');
xlabel('Symbol Index'); ylabel('Integer Value');
y = qammod(xsym,M);
%% Channel
% Send signal over an AWGN channel.
EbNo = 10; % In dB
snr = EbNo;
ynoisy = awgn(y,snr,'measured');

%% Received Signal
yrx = ynoisy;
% Create scatter plot of noisy signal and transmitted
% signal on the same axes.
h = scatterplot(yrx(1:nsamp*5e2),nsamp,0,'g.');
hold on;
scatterplot(y(1:5e2),1,0,'k*',h);
title('Received Signal');
legend('Received Signal','Signal Constellation');
axis([-5 5 -5 5]); % Set axis ranges.
hold off;
%%equalisation
P = xsym(1:1);
T = P;
net = newlin([0,100],1,[0 1],0.01);
net.trainParam.epochs 0;
net.trainParam.goal = 0.001;
net = train(net,P,T);
y3 = sim(net,P);
eqlms = lineareq(36,lms(0.01));
% Apply the equalizer object to a signal.
y2 = equalize(eqlms,yrx,y3);
figure;
stem(y2), grid on;
title('equalized signal');
% Demodulate signal using 16-QAM.
zsym = qamdemod(y2,M);
% Undo the bit-to-symbol mapping performed earlier.
z = de2bi(zsym,'left-msb'); % Convert integers to bits.
% Convert z from a matrix to a vector.
z = reshape(z.',prod(size(z)),1);
% the bit error rate.
[number_of_errors,bit_error_rate] = biterr(x,z);
[number_of_errors1,bit_error_rate1] = biterr(xsym,zsym);

% signal on the same axes.
L = scatterplot(z(1:nsamp*5e2),nsamp,0,'g.');
hold on;
scatterplot(z(1:5e2),1,0,'k^',L);
title('equalized Signal');
legend('equalized Signal','Signal Constellation');
axis([-5 5 -5 5]); % Set axis ranges.
hold off;