循环神经网络
matlab信道均衡,使用lms算法做信道均衡时,更换信道传递函数效果很差 -凯发ag旗舰厅登录网址下载
clear;
clc;
% 1.产生长度为2000的0/1随机序列,进行bpsk调制,通过冲激响应为h[1,0.8,0.3]的信道传送,信道的高斯噪声为20db。
%用lms算法进行均衡输出,均衡抽头数为8,步长为0.03,训练序列长度为200。
% 2.绘制出星座图显示理想信号、均衡器输入信号、均衡器输出信号。
% 绘制出重复20次实验的瞬时误差平方的统计平均收敛曲线。更改lms算法步长和抽头个数,观察瞬时均方收敛曲线有什么变化。
% 分析步长因子和抽头个数变化对lms算法性能的影响。
n = 2000;m = 2;weight = 8;stepsize = 0.03;trainlen = 200;
g = randi(2,n,1) - 1;
cp = [];mod1 = [];f = 0.1 * 3 * pi;t = 0.19;
for n = 1 : length(g)
if g(n) == 0
a = zeros(1,20);
else
a = ones(1,20);
end
cp = [cp a];
c = cos(f*t);
mod1 = [mod1 c];
end
figure(1);
subplot(3,1,1);
plot(cp);
axis([0 200 -1 2]);
subplot(3,1,2);
plot(mod1);
axis([0 200 -2 2]);
cm = [];mod = [];
for n = 1 : length(g)
if g(n) == 0
c = cos(f*t pi / 2);
else
c = -cos(f*t pi / 2);
end
mod = [mod c];
end
subplot(3,1,3);
plot(mod);
axis([0 200 -2 2]);
figure(2);
subplot(4,1,1);
plot(mod);
axis([0 200 -2 2]);
mod = awgn(mod, 20);
subplot(4,1,2);
plot(mod);
axis([0 200 -2 2]);
%h = [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.599971];
%h = [0.734189,0,0,0,0,0,0,0,0,0,0,0,0,1,-0.406511,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.295130];
h = [1,0.8,0.3]; %冲激响应为h[1,0.8,0.3]的信道传送
rxsig = conv(mod.',h);
subplot(4,1,3);
plot(rxsig);
axis([0 200 -2 2]);
eqlms = lineareq(weight,lms(stepsize));
eqlms.reftap = 1;
y = equalize(eqlms,rxsig,mod(1:trainlen));
subplot(4,1,4);
plot(y);
axis([0 200 -2 2]);
hold on;
modmsg = pskmod(g,m);
filtmsg = conv(h,modmsg);
eq1.sigconst = pskmod([0,m - 1],m);
[symbolest,yd] = equalize(eqlms,filtmsg,modmsg(1:trainlen));
h = scatterplot(filtmsg,1,trainlen,'rx');
hold on;
scatterplot(symbolest,1,trainlen,'g.',h);
scatterplot(eq1.sigconst,1,0,'k*',h);
legend('filtered signal','equalized signal','ideal sinal constellation');
hold off;
总结
以上是凯发ag旗舰厅登录网址下载为你收集整理的matlab信道均衡,使用lms算法做信道均衡时,更换信道传递函数效果很差的全部内容,希望文章能够帮你解决所遇到的问题。
如果觉得凯发ag旗舰厅登录网址下载网站内容还不错,欢迎将凯发ag旗舰厅登录网址下载推荐给好友。
- 上一篇: php汽车配件管理系统,汽配仓库管理系统
- 下一篇: