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

📄 vblast_decoder_qr.m

📁 VBLAST的QR实现
💻 M
字号:
function decoder_output_demodu = vblast_decoder_QR(H,decoder_input,index)
% H : the channel matrix 
% the receiver know the channel perfectly
% decoder_input :signal passed channel with noise
% index : the modulation index 1,2,4,6
%-----------------------------------------------------
[Rx_n,Tx_n] = size(H);
if Rx_n < Tx_n
	disp_str = ['error!!!---the Rx antenna number must no less than Tx antenna number'];
	disp(disp_str);
end
[U,R] = qr(H);
y = U'*decoder_input;
frame_length = length(decoder_input);
decoder_output = zeros(Tx_n,frame_length);

decoder_output(Tx_n,:) = y(Tx_n,:)/(R(Tx_n,Tx_n)+eps);
%demodulation???no,hard estimation whthin the constellation
 decoder_output_exp(Tx_n,:) = modulation(demodulation(decoder_output(Tx_n,:), index),index);
if Tx_n > 1
	for t = Tx_n-1 : -1 : 1
		interf = zeros(1,frame_length);
		for f = (t+1):Tx_n
			interf = R(t,f)*decoder_output(f,:) + interf;
		end
		decoder_output(t,:) = (y(t,:) - interf)/(R(t,t)+eps);
 		decoder_output_exp(t,:) = modulation(demodulation(decoder_output(t,:), index),index);
 							
		%decoder_output(t,:) = demodulation(decoder_output(t,:), index);
	end
end
for t = 1:Tx_n
	decoder_output_demodu(t,:) = demodulation(decoder_output_exp(t,:), index);
end
%for test below
% for i = 1:Tx_n
% 	for j = 1: frame_length
% 		if (decoder_output(i,j)>0)
% 			decoder_output(i,j) = 1;
% 		else
% 			decoder_output(i,j) = -1;
% 		end
% 	end
% end

⌨️ 快捷键说明

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