当前位置:网站首页>[equalizer] bit error rate performance comparison simulation of LS equalizer, def equalizer and LMMSE equalizer
[equalizer] bit error rate performance comparison simulation of LS equalizer, def equalizer and LMMSE equalizer
2022-06-24 07:26:00 【FPGA and MATLAB】
1. Software version
matlab2017b
2. System Overview
clc;
clear all;
close all;
warning off;
addpath 'func\'
rng(1)
N = 300000;% Specify the signal sequence length ?
info = func_random_binary(N);% Generate binary signal sequence
SNR_in_dB=[7:1:14];%AWGN Channel SNR
% SNR_in_dB=[12];%AWGN Channel SNR
for j=1:length(SNR_in_dB)
j
% Through the channel with both inter symbol interference and white noise
[y,len,h] = func_channel(info,SNR_in_dB(j));
% Initial bit error statistics
numoferr1=0;
% From len Symbols start as real signal symbols
for i=len+1:N+len
decis = 2*[y(i)>=0]-1;
% Judge whether there is bit error , Count the number of bit error symbols
if decis~=info(i-5)
numoferr1=numoferr1+1;
end;
end;
% Not equalized by equalizer , Resulting bit error rate
Pe1(j)=numoferr1/N;
%LS equilibrium , reference
%https://wenku.baidu.com/view/3fb6f52f195f312b3069a5a6.html
Order = 5;
z = func_LS(y,info,Order);
% Initial bit error statistics
numoferr2=0;
% From len Symbols start as real signal symbols
for i=1:N
decis(i) = 2*[z(i+Order)>=0]-1;
% Judge whether there is bit error , Count the number of bit error symbols
if decis(i)~=info(i)
numoferr2=numoferr2+1;
end;
end;
Pe2(j)=numoferr2/N;
%DEF equilibrium
z = func_DEF(y(6:length(info)+5),info,h);
decis = [2*[z>=0]-1];
% Initial bit error statistics
numoferr3=0;
% From len Symbols start as real signal symbols
for i=1:N
if decis(i)~=info(i)
numoferr3=numoferr3+1;
end;
end;
Pe3(j)=numoferr3/N;
%LMMSE equilibrium
z = func_LMMSE(y,h,SNR_in_dB(j));
decis = [2*[z>=0]-1]';
% Initial bit error statistics
numoferr4=0;
% From len Symbols start as real signal symbols
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(' No equalizer ','LS Equalizer ','DEF Equalizer ','LMMSE Equalizer ');
xlabel('SNR(dB)');
ylabel('error');
function y=func_LS(x,I,Order);
%LS equilibrium , reference
%https://wenku.baidu.com/view/3fb6f52f195f312b3069a5a6.html
% according to LS Method to calculate the weight w
r = x; % output of channel
n = Order; % rank of equalizer Length of equalizer
delta = Order; % delay Channel 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; % Equalizer coefficient
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. Simulation conclusion

4. reference
[1] Niexiaohong , Wang Jian . Research on least square adaptive equalization filter [J]. information technology , 2013, 37(12):3.A01-139
边栏推荐
- [OGeek2019]babyrop
- Huawei Cloud Database Advanced Learning
- 现货黄金有哪些眩人的小技术?
- Accelerate large-scale data analysis based on Apache iceberg through data organization optimization
- [signal recognition] signal modulation classification based on deep learning CNN with matlab code
- How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
- Hyperledger fabric ledger snapshot - fast data synchronization
- 利用微搭低代码实现级联选择
- [GUET-CTF2019]zips
- 电脑如何打开软键盘,教大家Win10如何打开软键盘的方法
猜你喜欢

只显示两行,超出部分省略号显示

Bjdctf 2020 Bar _ Babystack

Ultra wideband pulse positioning scheme, UWB precise positioning technology, wireless indoor positioning application

get_ started_ 3dsctf_ two thousand and sixteen
![[GUET-CTF2019]zips](/img/79/22ff5d4a3cdc3fa9e0957ccc9bad4b.png)
[GUET-CTF2019]zips

jarvisoj_ level2

How can genetic testing help patients fight disease?
![[WordPress website] 5 Set code highlight](/img/01/f669b70f236c334b98527a9320400c.png)
[WordPress website] 5 Set code highlight

MySQL enable binlog

前缀和专题训练
随机推荐
[GUET-CTF2019]zips
Face pincher: a hot meta universe stylist
jarvisoj_ level2
与(&&)逻辑或(||),动态绑定结合三目运算
PCL calculates the area of a polygon
Summary of 2022 blue team HW elementary interview questions
Win11分磁盘怎么分?Win11系统怎么分磁盘?
[image fusion] image fusion based on pseudo Wigner distribution (PWD) with matlab code
[image feature extraction] image feature extraction based on pulse coupled neural network (PCNN) including Matlab source code
get_started_3dsctf_2016
[WUSTCTF2020]alison_likes_jojo
【均衡器】LS均衡器,DEF均衡器以及LMMSE均衡器的误码率性能对比仿真
湖北专升本-湖师计科
How can genetic testing help patients fight disease?
第三方软件测试公司如何选择?2022国内软件测试机构排名
[wustctf2020] climb
2、 What is the principle of layer 3 and 4 switching technology? Recommended collection!
华为云数据库进阶学习
Hyperledger fabric ledger snapshot - fast data synchronization
[OGeek2019]babyrop