Converting 4 QAM to 16 QAM - 16 QAM produces error when generating signal
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
clear all close all clc T=10000; dB=40; % SNR value(dB)
N=12; Lh=5; M=2; % fractional (Ts/M)
h=randn(M,Lh+1)+sqrt(-1)*randn(M,Lh+1); for i=1:M, h(i,:)=h(i,:)/norm(h(i,:)); end
s=round(rand(1,T))*2-1; % QPSK or 4 QAM symbol sequence
s=s+sqrt(-1)*(round(rand(1,T))*2-1);
% Produce a noisy signal x=zeros(M,T); SNR=zeros(1,M); for i=1:M x(i,:)=filter(h(i,:),1,s); vn=randn(1,T)+sqrt(-1)*randn(1,T); vn=vn/norm(vn)*10^(-dB/20)*norm(x(i,:)); SNR(i)=20*log10(norm(x(i,:))/norm(vn)); x(i,:)=x(i,:)+vn; end SNR=SNR;
Lp=T-N; X=zeros((N+1)*M,Lp); for i=1:Lp for j=1:M X((j-1)*(N+1)+1:j*(N+1),i)=x(j, i+N:-1:i).'; end end
e=zeros(1,Lp); f=zeros((N+1)*M,1); f(N*M/2)=1; R2=2.0; mu=0.0012; for i=1:Lp e(i)=abs(f'*X(:,i))^2-R2; % Momentary error f=f-mu*2*e(i)*X(:,i)*X(:,i)'*f; % Equalizer update equation end
sb=f'*X;
figure
plot(s,'s');
grid,title('Gonderilen semboller'); xlabel('Reel'),ylabel('Sanal')
axis([-2 2 -2 2])
figure
plot(x,'o'); % kanal ve gürültü ile bozulmuþ alýnan sembollerin çizimi
grid, title('Alinan ornekler'); xlabel('Reel'), ylabel('Sanal')
figure
plot(sb,'o'); % denkleþtirilen sembollerin çizimi
grid, title('Denklestirilen Semboller'), xlabel('Reel'), ylabel('Sanal')
figure
plot(abs(e)/100); % show the convergence
%semilogy(abs(e)/100,'b-p');
grid, title('Kor Ogrenme Egrisi'), xlabel('Ogrenme Adimi'), ylabel('MSE')
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur QAM dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!