当前位置:网站首页>【均衡器】LS均衡器,DEF均衡器以及LMMSE均衡器的误码率性能对比仿真
【均衡器】LS均衡器,DEF均衡器以及LMMSE均衡器的误码率性能对比仿真
2022-06-24 06:41:00 【fpga和matlab】
1.软件版本
matlab2017b
2.系统概述
clc;
clear all;
close all;
warning off;
addpath 'func\'
rng(1)
N = 300000;%指定信号序列长度?
info = func_random_binary(N);%产生二进制信号序列
SNR_in_dB=[7:1:14];%AWGN信道信噪比
% SNR_in_dB=[12];%AWGN信道信噪比
for j=1:length(SNR_in_dB)
j
%通过既有码间干扰又有白噪声信道
[y,len,h] = func_channel(info,SNR_in_dB(j));
%初始误码统计数
numoferr1=0;
%从第len个码元开始为真实信号码元
for i=len+1:N+len
decis = 2*[y(i)>=0]-1;
%判断是否误码,统计误码码元个数
if decis~=info(i-5)
numoferr1=numoferr1+1;
end;
end;
%未经均衡器均衡,得到的误码率
Pe1(j)=numoferr1/N;
%LS均衡,参考文献
%https://wenku.baidu.com/view/3fb6f52f195f312b3069a5a6.html
Order = 5;
z = func_LS(y,info,Order);
%初始误码统计数
numoferr2=0;
%从第len个码元开始为真实信号码元
for i=1:N
decis(i) = 2*[z(i+Order)>=0]-1;
%判断是否误码,统计误码码元个数
if decis(i)~=info(i)
numoferr2=numoferr2+1;
end;
end;
Pe2(j)=numoferr2/N;
%DEF均衡
z = func_DEF(y(6:length(info)+5),info,h);
decis = [2*[z>=0]-1];
%初始误码统计数
numoferr3=0;
%从第len个码元开始为真实信号码元
for i=1:N
if decis(i)~=info(i)
numoferr3=numoferr3+1;
end;
end;
Pe3(j)=numoferr3/N;
%LMMSE均衡
z = func_LMMSE(y,h,SNR_in_dB(j));
decis = [2*[z>=0]-1]';
%初始误码统计数
numoferr4=0;
%从第len个码元开始为真实信号码元
for i=1:N-5
if decis(i+5)~=info(i)
numoferr4=numoferr4+1;
end;
end;
Pe4(j)=numoferr4/N;
end;
figure;
semilogy(SNR_in_dB,Pe1,'red*-');
hold on;
semilogy(SNR_in_dB,Pe2,'b-s');
hold on;
semilogy(SNR_in_dB,Pe3,'k--','linewidth',2);
hold on;
semilogy(SNR_in_dB,Pe4,'m->','linewidth',2);
grid on
legend('无均衡器','LS均衡器','DEF均衡器','LMMSE均衡器');
xlabel('SNR(dB)');
ylabel('error');
function y=func_LS(x,I,Order);
%LS均衡,参考文献
%https://wenku.baidu.com/view/3fb6f52f195f312b3069a5a6.html
%根据LS方法计算权值w
r = x; % output of channel
n = Order; % rank of equalizer 均衡器的长度
delta = Order; % delay 信道延迟
p = length(r)-delta;
A = toeplitz(r(n+1:p),r(n+1:-1:1));
b = I(n+1-delta:p-delta)';
w = inv(A'*A)*A'*b; %均衡器系数
y = conv(w,r);
function s = func_DEF(x,info,H);
M = length(x);
L = 27;
a = 0.00005;
d = 5;
M2= M;
xf= x(1:M2);
for Iter=1:20;
s = zeros(1,length(xf));
y = xf;
W1 = zeros(1,L);
W2 = zeros(1,d);
for m= d+L:1:M2
sum = 0;
sum1 = 0;
sum2 = 0;
for n=m-1:-1:m-L
sum1=sum1+y(n)*W1(m-n);
end
for n=1:d
sum2=sum2+s(m-d-n)*W2(n);
end
e=info(m-d)-sum1+sum2;
for n=m-1:-1:m-L
W1(m-n)=W1(m-n)+2*a*e*y(n);
end
for n=1:d
W2(n)=W2(n)-2*a*e*s(m-d-n);
end
sum = sum1-sum2;
if sum >= 0
sum = 1;
else
sum =-1;
end
s(m-d)=sum;
end
end
for m= d+L:1:M2
sum = 0;
sum1 = 0;
sum2 = 0;
for n=m-1:-1:m-L
sum1=sum1+y(n)*W1(m-n);
end
for n=1:d
sum2=sum2+s(m-d-n)*W2(n);
end
e=info(m-d)-sum1+sum2;
for n=m-1:-1:m-L
W1(m-n)=W1(m-n)+2*a*e*y(n);
end
for n=1:d
W2(n)=W2(n)-2*a*e*s(m-d-n);
end
sum = sum1-sum2;
if sum >= 0
sum = 1;
else
sum =-1;
end
s(m-d)=sum;
end
function y = func_LMMSE(x,h,SNR);
N0 = 10^(-SNR/10);
sigma = sqrt(N0);
Len = 2500;
Lens = floor(length(x)/Len);
Order = length(h);
y = [];
for j = 1:Lens
Xtmp = x((j-1)*Len+1:j*Len);
H1 = zeros(Len,Len+Order-1);
for k=1: Len
H1(k,k:k+Order-1) = fliplr(h);
end
H=H1(:,round(Order/2):Len+round(Order/2)-1);
Xor = xcorr(Xtmp,Xtmp)/Len;
Xor = fliplr(Xor);
L_Xtmp = round(length(Xor)/2);
C_yy = zeros(L_Xtmp,L_Xtmp);
for i=1:L_Xtmp;
C_yy(i,:) = Xor(L_Xtmp+1-i:length(Xor)+1-i);
end
C_v = sigma^2*eye(Len);
C_xy = H\(C_yy-C_v);
E_yk = sum(x)/Len*ones(1,Len);
E_y = H\E_yk';
y_LMMSE = E_y + C_xy/C_yy*(Xtmp-E_yk)';
y = [y;y_LMMSE];
end3.仿真结论

4.参考文献
[1]聂晓鸿, 王建. 最小二乘法自适应均衡滤波研究[J]. 信息技术, 2013, 37(12):3.A01-139
边栏推荐
- Le système de surveillance du nuage hertzbeat v1.1.0 a été publié, une commande pour démarrer le voyage de surveillance!
- Overview of cloud computing advantages of using cloud computing
- You have a chance, here is a stage
- 你有一个机会,这里有一个舞台
- Vmware tools still exist after normal uninstallation for many times. How to solve it
- JVM调试工具-jmap
- Leetcode概率题面试突击系列11~15
- How to build an app at low cost
- JVM debugging tool -jstack
- C language student management system - can check the legitimacy of user input, two-way leading circular linked list
猜你喜欢

Arduino raised $32million to enter the enterprise market

Localized operation on cloud, the sea going experience of kilimall, the largest e-commerce platform in East Africa

Mysql开启BINLOG

JVM debugging tool -jvisualvm

Outils de débogage JVM - Arthas

Decryption of the original divine square stone mechanism

Oracle SQL comprehensive application exercises

Record -- about the problem of garbled code when JSP foreground passes parameters to the background

About Stacked Generalization
![[JUC series] completionfuture of executor framework](/img/d0/c26c9b85d1c1b0da4f1a6acc6d33e3.png)
[JUC series] completionfuture of executor framework
随机推荐
RealNetworks vs. 微软:早期流媒体行业之争
About Stacked Generalization
File system notes
.NET7之MiniAPI(特别篇) :Preview5优化了JWT验证(上)
浅谈如何运营好小红书账号:利用好长尾词理论
typescript vscode /bin/sh: ts-node: command not found
Stop looking! The most complete data analysis strategy of the whole network is here
The third session of freshman engineering education seminar is under registration
Arduino融资3200万美元,进军企业市场
Arduino raised $32million to enter the enterprise market
C language student management system - can check the legitimacy of user input, two-way leading circular linked list
sql join的使用
Challenges brought by maker education to teacher development
You have a chance, here is a stage
在js中正则表达式验证小时分钟,将输入的字符串转换为对应的小时和分钟
Leetcode: Sword finger offer 26: judge whether T1 contains all topologies of T2
[JUC series] completionfuture of executor framework
How do I check the IP address? What is an IP address
How to register the cloud service platform and what are the advantages of cloud server
Page Jump and database connection of student management system