function [x] = precoding(u)
% 4 by 4 QPSK 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),2); %% 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
THP_QR.rar_THP_THP precoding_THP预编码_precoding matlab_预编码
版权申诉
5星 · 超过95%的资源 86 浏览量
2022-07-14
21:05:31
上传
评论
收藏 23KB RAR 举报
Kinonoyomeo
- 粉丝: 76
- 资源: 1万+
评论2