• 大小: 3KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-18
  • 语言: 其他
  • 标签: sphere  decod  

资源简介

针对初学者的球形解码仿真,有部分不完善的地方,请多多指教

资源截图

代码片段和文件信息

function  xHat=auto_SD(yHm)
%apt to 4-by-4 complex channel matrix H;
% for integer min square problems;
% y denotes  the receive signals‘ vectors;
%H dentes the channel matrix which constrains to idd Gaussian distribution;
%m denotes transmit antennas‘ number as well as that of recieve‘s
% xHat denotes the output signals‘ vectors; 
% the function isfirst developed by Karen SU.then revised and modified by
% YU Wang from DUTadapted to 16 QAM with alphabet[-3-1+1+3].
global w;
global z;
global cn;
global zp;
global alphabet;

%initial procedure
xHat=[ ];
wHat=inf;
m=2*m;
 y = [real(y);imag(y)];
  H = [[real(H)-imag(H)];[imag(H)real(H)]];
  alphabet=[-3-113];
[HqHr] = qr(H);
wRoot   = 0;
yR      = Hq‘*y;
%main tracing back procedure
w=zeros(1m+1);
py=zeros(mm);
z=zeros(1m);
dim=m;
cn=zeros(1m);
zp=zeros(1m);
lb=ones(18);
ub=4*ones(18);
%lb&ub denotes the min & max limit of alphabet respectively;

dimp=dim+1;
w(dimp)=wRoot;

% the algrithom searches nodes by deep-first;
% Compute first child of root node
py(1:dimdim)=yR;
%.........调用首孩子比较节点函数!!!!function
compFirstChild(dimdimplb(dim)ub(dim)Hr(dimdim)py(dimdim));
backtrack=0;
while dim<=m
    if w(dim)        if dim==1
            wHat=w(dim);
            xHat=z;
            backtrack=1;
            dim=dimp;
            dimp=dimp+1;
            if cn(dim)<=ub(dim)-lb(dim)
                backtrack=0;
                %%调用比较兄弟节点的函数!!!!function
                 compNextSibling(dimdimplb(dim)ub(dim)Hr(dimdim)py(dimdim));
            end
        elseif backtrack&&cn(dim)>ub(dim)-lb(dim)
            dim=dimp;
            if dim<=m
                dimp=dimp+1;
                if cn(dim)<=ub(dim)-lb(dim)
                    backtrack=0;
                    %%调用比较兄弟节点的函数!!!function
                     compNextSibling(dimdimplb(dim)ub(dim)Hr(dimdim)py(dimdim));
                end
            end
        else
            dimp=dim;
            dim=dim-1;
            py(1:dimdim)=py(1:dimdimp)-Hr(1:dimdimp)*z(dimp);
            %% 调用比较首孩子节点的函数!!!function
            compFirstChild(dimdimplb(dim)ub(dim)Hr(dimdim)py(dimdim));
        end
        
    else
        dim=dimp;
        backtrack=1;
        if dim<=m
            dimp=dimp+1;
            if cn(dim)<=ub(dim)-lb(dim)
                backtrack=0;
                %%调用比较兄弟节点的函数!!!function
                compNextSibling(dimdimplb(dim)ub(dim)Hr(dimdim)py(dimdim));
            end
        end
    end
end
    m1=m/2;
    xHat=xHat(1:m1)+i*xHat(m1+1:2*m1);
   
    
   % internal recall functiom :1.compFirstChild();2.compNextSibling().
    function compFirstChild(dimdimplbdubdHrddpydd)
        global w;
        global z;
        global cn;
        global zp;
        global alphabet;
        z0=pydd/Hrdd;
        z1=decasd(z0);
        z1=min([z1alphabet(ubd)]);
        z1=max([z1alphabet(lbd)]

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4295  2010-06-18 21:52  SD\auto_SD.m

     文件       1062  2010-05-04 20:39  SD\jakes.m

     文件       3720  2014-06-10 14:37  SD\MAIN.m

     目录          0  2014-06-10 14:32  SD

----------- ---------  ---------- -----  ----

                 9077                    4


评论

共有 条评论