?? precoding.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 + -