Generating QPSK symbols for adaptive filtering
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello for an assignment i am supposed to investigate the performance of an adaptive equalizer for data transmission. I am supposed to first start by designing a generator module used to create a sequence of complex valued information symbols which we called s[n]. For this assignment we will assume QPSK symbols or in other words that s[n] must be drawn from the set {a+ja, a-ja,-a+ja, -a-ja} where a represents the signal amplitude. Can anyone help me in designing this filter im pretty stuck thanks
3 Kommentare
Antworten (2)
Abraham Boayue
am 2 Mär. 2018
function [e,w,y,W] = LMS(x,d,mu,M)
% lms algotherm
N = length(x);
w = zeros(M,1);
e = zeros(1,N);
y = zeros(1,N);
u = zeros(1,M);
W = zeros(M,N);
for k =1:N
u = [x(k),u(1:M-1)]; % Vector containg the input signal for which the
% weights are non zero
y(k) = u*w;
e(k)= d(k)-y(k);
w = w+mu*u'*e(k);
W(:,k) = w;
end
end
%%This is the m-file
close all
clear
n =1:3;
D =[2.9 3.1 3.3 3.5];
% h =0.5*(1+cos(2*pi*(n-2)/D(4)));
% stem(n,h,'filled'); grid
% xlim([0 5]);
M = 11;
N = 1000;
L = 800;
J_ave = zeros(1,N);
delay = 7;
mu = 0.075;
J_vec = zeros(length(D),N); % vector for storing values of MSE
V_w = zeros(M,length(D)); % vector for storing the estimated coefficients
for k =1:length(D)
h = 0.5*(1+cos(2*pi*(n-2)/D(k))); % channel response
xn = sign(randn(1,N)-0.5);% This is a bernoulli sequence; generate your
% QPSK here
for i = 1:L
%d = [zeros(1,delay) xn(1,1:N-delay)];
d = zeros(1,N);
d(delay:N) = xn(1:N-delay+1);
x1 = filter(h,1,xn);
v = sqrt(0.001)*randn(1,N);
x = x1(1:N) +v;
[e,w,y,W] = LMS(x,d,mu,M);% perform the equalization
J_ave = J_ave +abs(e.^2);
end
J_vec(k,:) = J_ave;
V_w(:,k) = w;
end
J_vec =J_vec/L;
% J_vec =10*log10(J_vec);
ind =0:N-1;
% %Make a smoother curve
window = 1;
for i = 1:N-window
J_vec(i) = mean(J_vec(i:i+window));
end
figure
semilogy(ind,J_vec(1,:),'linewidth',1.5, 'color','k');hold on
semilogy(ind,J_vec(2,:),'linewidth',1.5, 'color','m')
semilogy(ind,J_vec(3,:),'linewidth',1.5, 'color','r')
semilogy(ind,J_vec(4,:),'linewidth',1.5, 'color','b')
grid
a =title('Ensamble-average of |e(i)|^2');
set(a,'fontsize',14);
a = xlabel('NO. OF ITERATIONS');
set(a,'fontsize',14);
a = ylabel('MSE dB');
set(a,'fontsize',14);
ylim([10^-3 10^1])
xlim([0 500])
figure
stem(V_w(:,1),'filled','m'); grid
Abraham Boayue
am 2 Mär. 2018
Here is an example paper on how to generate the QPSK signal.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Equalization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!