⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 precoding.m

📁 采用THP预编码(QR算法)的simulink仿真链路
💻 M
字号:
function  [x] = precoding(u)

%  4 by 4 16QAM THP-ZF using QR decompersition without V-Blast and MMSE

%  algorithm from 
%     "Detection and precoding for multiple input multiple output channels"
%     page 107

%  input:
%       H: MIMO Channel Matrix
%       a: Modulated Signals
% 
%  output:
%       x(1:4):Precoded Signals
%       x(5):1/Beta
% 

% Divide input signals
[N,M] = size(u);
M = M-1;
H = u(:,1:M);
h = H';
a = u(:,M+1);

% QR Decompersition
[F,S] = qr(h);                                                        %% h = F*S
s = S';
f = F';                                                               %% H = s*f
t = diag(diag(1./diag(diag(s))));
B = s*t;                                                              %% make B's diag element to be 1
p = sqrt(4/(1/s(1,1)^2 + 1/s(2,2)^2 + 1/s(3,3)^2 + 1/s(4,4)^2));      %% scale power
x=zeros(4,1);

% Feedback Filter
x(1) = a(1);
for m = 2:4                                                           %% force the inter-channel interference to 0
    g = 0;
    for k = 1:(m-1)
        g = B(m,k)*x(k) + g;
    end
    x(m) = a(m)-g;
    x(m) = THPMod(x(m),4);                                            %% modulo
end

% Forward Filter & Output
x = p*F*t*x;                                                          %% See page 115 to 116
x(5) = 1/p;                                                           %% prepare for the receiver mult 1/p

⌨️ 快捷键说明

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