mimomld.m

来自「是一个四发四收的球型译码程序」· M 代码 · 共 46 行

M
46
字号
function  [DetBit]=MIMOMLD(RxSig,ChM,M,NFactor) 
%function  [DetBit,ML_Matrix]=MIMOMLD(RxSig,ChM,M,NFactor)   

% =================================================================================
% Program Description:
%
%         Implement maximum likelihood detection for MIMO systems using
%         MPSK or MQAM modulation
%
% --------------------------------------------------------------------------------            
% CopyRight               Jim, NCL, UESTC
% Last Modified Date:     2005-11-28
% --------------------------------------------------------------------------------
% Parameters Description
% M:        modulation constalletion number
% ChM:      channel matrix
% RxSig:    receive signal
% NFactor:  the normalized factor
% ModFlag:  modulation flag
% DetBit:   detection bit
% ==================================================================================


Factor=NFactor;
h=modem.qammod(M);


[Rx,Tx]=size(ChM);
Num_order=2^(Tx*log2(M));

ML_Matrix=zeros(1,Num_order);
for i=1:Num_order
    Search_bit=de2bi(i-1,Tx*log2(M));
    S_bit_map=reshape(Search_bit,Tx,log2(M));
    S_sym_temp=bi2de(S_bit_map);
    
    S_Mod_sym=sqrt(Factor)*modulate(h,S_sym_temp)/Factor;

    Tx_sym=reshape(S_Mod_sym,Tx,1);
    ML_Matrix(1,i)=norm(RxSig-ChM*Tx_sym,'fro')^2;         
 end
 [MinValue,Index]=min(ML_Matrix);                 
 dd_bit=de2bi(Index-1,Tx*log2(M));
 
 % output the resluts
 DetBit=dd_bit.';

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?