实例介绍
【实例简介】使用常模算法实现通信信号的盲均衡,具体算法有CMA算法、RLS-CMA算法,以及改进软法MRLS-CMA算法
【实例截图】
【核心代码】
clc
clear all;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 实现了信号的盲均衡算法
% CMA、RLS-CMA和MRLS-CMA算法
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%% 仿真条件 %%%%%%%%
i = sqrt(-1);
L = 2000;
SNR = 20;
h = [0.26, 0.93, 0.26];
h = h/norm(h);
Nh = length(h);
ISI_cma = 0;
ISI_rlscma = 0;
ISI_mrlscma = 0;
Nf = 17;
times = 20;
for loop = 1:times
M = 8;
iniphase = 0;
sa = randint(L,1,M);
sn = (pskmod(sa,M,iniphase))';
rn = filter(h,1,sn);
xn = awgn(rn,SNR,'measured');
%%%%%% CMA 算法 %%%%%%
W_cma = zeros(Nf,1);
W_cma((Nf 1)/2) = 1;
muCMA = 0.01;
for k = 1:L-Nf
X_cma(:,k) = fliplr(xn(k:k Nf-1));
Y_cma(k) = W_cma'*X_cma(:,k);
E_cma(k) = Y_cma(k)*(abs(Y_cma(k))^2-1);
W_cma = W_cma - muCMA*conj(E_cma(k))*X_cma(:,k);
tmpx = conv(W_cma',h);
ISIx(k) = sum(abs(tmpx).^2)/max(abs(tmpx))^2-1;
ISIlgx(k) = 10*log10(ISIx(k));
end
ISI_cma = ISI_cma ISIlgx;
%%%%%% RLS-CMA算法 %%%%%%%%%%
W_rlscma = zeros(1,Nf).';
W_rlscma((Nf 1)/2) = 1;
lmda = 0.99;
delta = 0.1;
Cn = delta*eye(Nf);
for k = 1:(L-Nf)
X_rlscma(:,k) = fliplr(xn(k:k Nf-1));
Y_rlscma(k) = W_rlscma'*X_rlscma(:,k);
Zn = X_rlscma(:,k)*X_rlscma(:,k)'*W_rlscma*(abs(X_rlscma(:,k)'*W_rlscma)^(2-2));
Hn = Zn'*Cn;
Gn = Cn*Zn/(lmda Hn*Zn);
Cn = (Cn-Gn*Hn)/lmda;
E_rlscma(k) = W_rlscma'*Zn -1;
W_rlscma = W_rlscma-Gn*conj(E_rlscma(k));
tmpy = conv(W_rlscma',h);
ISIy(k) = sum(abs(tmpy).^2)/max(abs(tmpy))^2-1;
ISIlgy(k) = 10*log10(ISIy(k));
end
ISI_rlscma = ISI_rlscma ISIlgy;
%%%%%% MRLS-CMA算法 %%%%%%%
lmda = 0.99;
delta = 0.1;
Cm = delta*eye(Nf);
W_mrlscma = zeros(1,Nf).';
W_mrlscma((Nf 1)/2)=1;
for k = 1:L-Nf
X_mrlscma(:,k) = fliplr(xn(k:k Nf-1));
Y_mrlscma(k) = W_mrlscma'*X_mrlscma(:,k);
Zm = X_mrlscma(:,k)*X_mrlscma(:,k)'*W_mrlscma*abs(X_mrlscma(:,k)'*W_mrlscma)^(2-2);
Hm = Zm'*Cm;
Gm = (Cm*Zm)/(lmda Hm*Zm);
Cm = (Cm-Gm*Hm)/lmda;
E_mrlscma(k) = W_mrlscma'*Zm-1;
W_mrlscma = W_mrlscma-Gm*conj(E_mrlscma(k));
tmpz = conv(W_mrlscma',h);
ISIz(k) = sum(abs(tmpz).^2)/max(abs(tmpz))^2-1;
ISIlgz(k) = 10*log10(ISIz(k));
end
ISI_mrlscma = ISI_mrlscma ISIlgz;
end
ISI_cma = ISI_cma/times;
ISI_rlscma = ISI_rlscma/times;
ISI_mrlscma = ISI_mrlscma/times;
figure
k = 1:length(ISI_cma)
plot(k,ISI_cma,k,ISI_rlscma,'r',k,ISI_mrlscma,'g');
xlabel('迭代次数');ylabel('码间干扰ISI(dB)');
figure
subplot(2,2,1)
plot(xn,'.');title('均衡前');
subplot(2,2,2)
plot(Y_cma(500:end),'.');title('CMA算法');
subplot(2,2,3)
plot(Y_rlscma(500:end),'.');title('RLS-CMA算法');
subplot(2,2,4)
plot(Y_mrlscma(500:end),'.');title('MRLS-CMA算法')
好例子网口号:伸出你的我的手 — 分享!
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明


网友评论
我要评论