当前位置:网站首页>Based on the theoretical principle and simulation results of MATLAB spherical decoding, compare 2norm spherical decoding, infinite norm spherical decoding, ML detection
Based on the theoretical principle and simulation results of MATLAB spherical decoding, compare 2norm spherical decoding, infinite norm spherical decoding, ML detection
2022-07-27 00:27:00 【I love c programming】
Catalog
3. Preview of some simulation drawings
4. Source code acquisition method
1. Algorithm description
The basic idea of sphere decoding is to use a vector x The radius of the center is d Search grid points in the multidimensional sphere , Reduce the number of search points by limiting or reducing the search radius , Thus, the calculation time is reduced . The advantage of sphere decoding algorithm is that it does not need to search all lattice points in the whole lattice like the traditional maximum likelihood decoding algorithm , And you only need to search in a pre-set limited spherical area , If the number of points contained in this area is quite small relative to the total number of points in the whole cell , Search time will be greatly reduced .
The key problems affecting sphere decoding are :(1) How to choose search radius d. If d Too big , Then the ball will contain too many points , The complexity will approach or reach the exponential complexity of maximum likelihood decoding . If d Too small , Then the ball may not contain any grid points , Then the spherical decoding algorithm will not get a reasonable solution .(2) How to judge whether a point is in the ball . If this judgment needs to be judged by the distance between each grid point and the vector , Then this method is not ideal , Because we need to examine all points , The amount of computation generated is also exponential .
Spherical decoding solves the problem of 2 A question , Here, it is considered that the signal is a real number , Because the complex number can be increased by doubling the dimension , Separate the real part from the imaginary part , To judge whether a point is at the radius d Of m It's difficult inside the ball . If the m Turn into 1, Then it degenerates from a ball to a spacing , This point is equivalent to the real part or imaginary part of the signal sent by an antenna , This makes the operation much simpler , You can know whether this point is within this distance . The real and imaginary parts of signals on multiple transmitting antennas are divided into many dimensions , It is possible to take values on each dimension . The spherical decoding algorithm is equivalent to building a tree , The first of the trees k The layer node corresponds to falling on a radius of d, Dimension is k Grid point in the ball of .

If the performance is required to fully meet the performance of maximum likelihood detection , Then the initial radius must be a series of values , The selected initial value is d, If the range is d Can't find the right point , You need to increase d Value , The expansion multiple is 2 times ; If the required performance is close to the performance of maximum likelihood detection , Then the initial radius is compared with the above , Take the larger one , There must be some redundancy .
For the two norm spherical decoding which only requires the performance close to the performance of maximum likelihood detection , The formula for selecting the initial radius is as follows :

![]()
For the two norm spherical decoding whose performance is required to achieve the performance of maximum likelihood detection , The formula for selecting the initial radius is as follows :
![]()

2. Partial procedure
msg=randint(log2(mod_num),Nt*Number/2);
h=modem.qammod('M',mod_num,'InputType','bit','symbolorder','Gray');%qam modulation
s=modulate(h,msg);
constelPoints=[1+j 1-j -1+j -1-j]; %$ for ML detect
% constelPoints=[-3-3*j -3-j -3+3*j -3+j -1-3*j -1-j -1+3*j -1+j 3-3*j 3-j 3+3*j 3+j 1-3*j 1-j 1+3*j 1+j];
s1=[real(s);imag(s)]; %s1 Is the real matrix of the signal
s2=reshape(s,Nt,Number/2); %s2 For signal Nt Complex matrix of rows
if mod_num==4
codebook=[-1 1]; % Indicates that after becoming a real matrix ,4qam There are only two cases 1 and -1
end
if mod_num==16 % Indicates that after becoming a real matrix ,16qam Yes 4 In this case
codebook=[-3 -1 1 3];
end
ss=reshape(s1,2*Nt,Number/2); %ss For signal 2*Nt Real matrix of rows
% H=[real(H1(:,:,round)) -imag(H1(:,:,round));imag(H1(:,:,round)) real(H1(:,:,round))]; % Change the channel complex matrix into the channel real matrix
%/%
r1=H1(:,:,round)*s2;
for ii=1:Nt % Add noise
rr(ii,:)=awgn(r1(ii,:),snr_1(ISNR),'measured');
end %rr To receive complex signals
C1=3*(2*Nt)*2*(2/(10^(snr(ISNR)/10))); % Initial radius 2 norm 4qam
C2=16*2*(2/(10^(snr(ISNR)/10))); % The initial radius is infinite norm
rev1=[real(rr);imag(rr)]; %rr Turn into a real signal
H=[real(H1(:,:,round)) -imag(H1(:,:,round));imag(H1(:,:,round)) real(H1(:,:,round))]; % Channel real matrix
for tmp=1:Number/2 % Two norm spherical decoding
rev=rev1(:,tmp);
tic
y_2norm_temp = spheredecode(rev, C1, H, codebook);
for jj=1:Nt
y_2norm(Nt*tmp+jj-Nt)=y_2norm_temp(jj)+j*y_2norm_temp(jj+Nt); % Store in plural
end
t1(ISNR)=toc+t1(ISNR);
end
H=[real(H1(:,:,round)) -imag(H1(:,:,round));imag(H1(:,:,round)) real(H1(:,:,round))]; % Channel real matrix
for tmp=1:Number/2 % Two norm spherical decoding
rev=rev1(:,tmp);
tic
y_infnorm_temp = spheredecodeinf(rev, C2, H, codebook);
for jj=1:Nt
y_infnorm(Nt*tmp+jj-Nt)= y_infnorm_temp(jj)+j* y_infnorm_temp(jj+Nt); % Store in plural
end
t2(ISNR)=toc+t2(ISNR);
end
for tmp=1:Number/2
min=100000;
tic
for flag1=1:mod_num
for flag2=1:mod_num
for flag3=1:mod_num
for flag4=1:mod_num
stmp=[constelPoints(flag1);constelPoints(flag2);constelPoints(flag3);constelPoints(flag4)];
rtmp=rr(:,tmp);
Maximum=norm(rtmp-H1(:,:,round)*stmp);
if Maximum<min
min=Maximum;
slast=stmp;
end
end
end
end
end
for jj=1:Nt
y_ML(Nt*tmp+jj-Nt)=slast(jj);
end
t3(ISNR)=toc+t3(ISNR);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
h=modem.qamdemod('M',mod_num,'OutputType','bit','symbolorder','Gray'); % The second norm
DM1_msg=demodulate(h,y_2norm);
DM_msg=reshape(DM1_msg,log2(mod_num),Nt*Number/2);
[number,ratio] = biterr(msg,DM_msg);
h=modem.qamdemod('M',mod_num,'OutputType','bit','symbolorder','Gray');
DM3_msg=demodulate(h,y_infnorm);
DM2_msg=reshape(DM3_msg,log2(mod_num),Nt*Number/2);
[number1,ratio1] = biterr(msg,DM2_msg); % The infinite norm
h=modem.qamdemod('M',mod_num,'OutputType','bit','symbolorder','Gray');
DM5_msg=demodulate(h,y_ML);
DM4_msg=reshape(DM5_msg,log2(mod_num),Nt*Number/2);
[number2,ratio2] = biterr(msg,DM4_msg); %ML
sumber=sumber+ratio;
sumber1=sumber1+ratio1;
sumber2=sumber2+ratio2;
end %round=1:SymTime
avrgber(ISNR)=sumber/SymTime;
avrgber1(ISNR)=sumber1/SymTime;
avrgber2(ISNR)=sumber2/SymTime;3. Preview of some simulation drawings


4. Source code acquisition method
Get the way 1:
Click the download link :
Access method 2:
Blog resource item , Search for resources with the same name as blog .
Access method 3:
If the download link fails , Blogger wechat contact .
A34
边栏推荐
猜你喜欢

deeplabcut使用1

今日份20220719折腾deeplabcut

Shang school software testing (1) software testing curriculum system, advantages, learning suggestions, understanding software, software testing and defects, software testing process, debugging and te

Complete review of parsing web pages

画冲击函数

转置卷积相关

2022-07-17:1, 2, 3... N-1, N, n+1, n+2... In this sequence, only one number has repetition (n). This sequence is unordered. Find the repeated number n. This sequence is ordered. Find the repeated numb

Resolve Microsoft 365 and Visio conflicts

卷积神经网络——LeNet(pytorch实现)
![[PCB open source sharing] stc8a8k64d4 development board](/img/df/14f47295dace857c0a32545c3eca39.png)
[PCB open source sharing] stc8a8k64d4 development board
随机推荐
Recent answers - column
AutoCAD的卸载后重新安装,删除注册表的详细过程
Go exceed API source code reading (IV) -- save (), SaveAs (name string)
Anaconda => PyCharm => CUDA => cudnn => PyTorch 环境配置
今日份20220719折腾deeplabcut
Deeplabcut uses 1
放图仓库-2(函数图像)
傅里叶分析(基础介绍)
uni-app学习(二)
Configure deeplobcut2 with your head covered
Error generating yolov5.wts file
放图仓库-3(功能图像)
The crawler parses the object of the web page. Element name method
三层架构 模拟
Codeforces D. Buying Shovels
Ubantu installing Oracle JDK
12_决策树(Decision tree)
Relationship between limit, continuity, partial derivative and total differential of multivariate function (learning notes)
1、 Kubernetes basic concept + environment installation (build cross server public network environment)
Drawing warehouse-3 (functional image)