trellis_encoder.m

来自「MIMO-OFDM技术」· M 代码 · 共 27 行

M
27
字号
function enc_data = trellis_encoder(data,dlt,slt)

%**************************************************************************
%   Space-time trellis channel encoder
%   Q = TRELLIS_ENCODER(D,DLT,SLT) performs the data (D) encoding based on 
%   the DLT and SLT look-up tables. The tables for AT&T space-time codes 
%   these tables may be easily obtained from the LTABLE function. In fact 
%   the structure of look-up tables is as general as possible. 
%   The encoder doesn't care about the content of the look-up tables. 
%   This feature allows you to force the encoder's operation mode into 
%   the arbitrary scheme. Even an encoding based on block codes may be
%   performed using the space function. This is when the slt table is
%   filled with equal entries. 
%**************************************************************************

[fr_length,l,frames] = size(data);

s = 1; % setting up initial state

for k = 1:frames
	for i = 1:fr_length  
		d = data(i,1,k) + 1; % data_dim=1       % stc encoder                      
    enc_data(i,:,k) = dlt(s,d,:) ;              % stc encoder
    s = slt(s,d,:)  ;                           % stc encoder
    end                                         % stc encoder

end

⌨️ 快捷键说明

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