function [X_hat]=SD_detector(y,H,nT)
% Input parameters
% y : received signal, nRx1
% H : Channel matrix, nRxnT
% nT : number of Tx antennas
% Output parameter
% X_hat : estimated signal, nTx1
global x_list; % candidate symbols in real constellations
global x_now; % temporary x_vector elements
global x_hat; % inv(H)*y
global x_sliced; % sliced x_hat
global x_pre; % x vectors obtained in the previous stage
global real_constellation; % real constellation
global R; % R in the QR decomposition
global radius_squared; % radius^2
global x_metric; % ML metrics of previous stage candidates
global len; % nT*2
QAM_table2 = [-3-3j, -3-j, -3+3j, -3+j, -1-3j, -1-j, -1+3j, -1+j,3-3j, ...
3-j, 3+3j, 3+j, 1-3j, 1-j, 1+3j, 1+j]/sqrt(10); % 16-QAM
real_constellation = [-3 -1 1 3]/sqrt(10);
y =[real(y); imag(y)]; % y : complex vector -> real vector
H =[real(H) -(imag(H)) ; imag(H) real(H)];
% H : complex vector -> real vector
len = nT*2; % complex -> real
x_list = zeros(len,4); % 4 : real constellation length, 16-QAM
x_now = zeros(len,1); x_hat = zeros(len,1); x_pre = zeros(len,1); x_metric = 0;
[Q,R] = qr(H); % nR x nT QR decomposition
x_hat = inv(H)*y; % zero forcing equalization
x_sliced = QAM16_real_slicer(x_hat,len)'; % slicing
radius_squared = norm(R*(x_sliced-x_hat))^2; % Radious^2
transition = 1;
% meaning of transition
% 0 : radius*2, 1~len : stage number
% len+1 : compare two vectors in terms of norm values
% len+2 : finish
flag = 1;
% transition tracing 0 : stage index increases by +1
%1 : stage index decreases by -1
%2 : 1->len+2 or len+1->1
while (transition<len+2)
if transition==0 % radius_squared*2
[flag,transition,radius_squared,x_list]= radius_control(radius_squared,transition);
elseif transition <= len
[flag,transition] = stage_processing(flag,transition);
elseif transition == len+1 %
[flag,transition] = compare_vector_norm(transition);
end
end
ML = x_pre;
for i=1:len/2
X_hat(i) = ML(i)+j*ML(i+len/2);
end
end
function [flag,transition] = stage_processing(flag,transition)
% Input parameters
% flag : previous stage index
% flag = 0 : stage index decreased -> x_now empty -> new x_now
% flag = 1 : stage index decreased -> new x_now
% flag = 2 : previous stage index =len+1 -> If R>R'? start from the first stage
% transition : stage number
% Output parameters
% flag : stage number is calculated from flag
% transition : next stage number, 0 : R*2, 1: next stage, len+2: finish
global x_list x_metric x_now x_hat real_constellation R radius_squared x_sliced;
global x_list;
global x_metric;
global x_now;
global x_hat;
global real_constellation;
global R;
global radius_squared;
global x_sliced;
stage_index = length(R(1,:))-(transition-1);
if flag == 2 % previous stage=len+1 : recalculate radius R'
radius_squared = norm(R*(x_sliced-x_hat))^2;
end
if flag ~= 0 % previous stage=len+1 or 0
-> upper and lower bound calculation, x_list(stage_index,:)
[bound_lower bound_upper] = bound(transition);
for i =1:4 % search for a candidate in x_now(stage_index),
% 4=size(real_constellation), 16-QAM assumed
if bound_lower <= real_constellation(i) && real_constellation(i) <= bound_upper
list_len = list_length(x_list(stage_index,:));
x_list(stage_index,list_len+1) = real_constellation(i);
end
end
end
list_len = list_length(x_list(stage_index,:));
if list_len == 0 % no candidate in x_now
if x_metric == 0 || transition ~= 1
% transition >=2 ? if no candidate ? decrease stage index
flag = 0;
transition = transition-1;
elseif x_metric ~= 0 && transition == 1
% above two conditions are met? ML solution found
transition = length(R(1,:))+2; % finish stage
end
else % candidate exist in x_now ? increase stage index
flag = 1;
transition = transition+1;
x_now(stage_index) = x_list(stage_index,1);
x_list(stage_index,:) = [x_list(stage_index,[2:4]) 0];
end
function [bound_lower bound_upper]=bound(transition)
% Input parameters
% R : [Q R] = qr(H)
% radius_squared : R^2
% transition : stage number
% x_hat : inv(H)*y
% x_now : slicing x_hat
% Output parameters
% bound_lower : bound lower
% bound_upper : bound upper
global R radius_squared x_now x_hat;
len = length(x_hat);
temp_sqrt = radius_squared;
temp_k=0;
for i=1:1:transition-1
temp_abs=0;
for k=1:1:i
index_1 = len-(i-1);
index_2 = index_1+ (k-1);
temp_k = R(index_1,index_2)*(x_now(index_2)-x_hat(index_2));
temp_abs=temp_abs+temp_k;
end
temp_sqrt = temp_sqrt - abs(temp_abs)^2;
end
temp_sqrt = sqrt(temp_sqrt);
temp_no_sqrt = 0;
index_1 = len-(transition-1);
index_2 = index_1;
for i=1:1:transition-1
index_2 = index_2+1;
temp_i = R(index_1,index_2)*(x_now(index_2)-x_hat(index_2));
temp_no_sqrt = temp_no_sqrt - temp_i;
end
temp_lower = -temp_sqrt + temp_no_sqrt;
temp_upper = temp_sqrt + temp_no_sqrt;
index = len-(transition-1);
bound_lower = temp_lower/R(index,index) + x_hat(index);
bound_upper = temp_upper/R(index,index) + x_hat(index);
bound_upper = fix(bound_upper*sqrt(10))/sqrt(10);
bound_lower = ceil(bound_lower*sqrt(10))/sqrt(10);
end
function [len]=list_length(list)
% Input parameter
% list : vector type
% Output parameter
% len : index number
len = 0;
for i=1:4
if list(i)==0, break; else len = len+1; end
end
end
function [flag,transition,radius_squared,x_list] =radius_control(radius_squared,transition)
% Input parameters
% radius_squared : current radius
% transition : current stage number
% Output parameters
% radius_squared : doubled radius
% transition : next stage number
% flag : next stage number is calculated from flag
global len;
radius_squared = radius_squared*2;
transition = transition+1;
flag = 1;
x_list(len,:)=zeros(1,4);
end
function [check]=vector_comparison(vector_1,vector_2)
% check if the two vectors are the same
% Input parameters
% pre_x : vector 1
% now_x : vector 2
% Output parameters
% check : 1-> same vectors, 0-> different vectors
check = 0;
len1 = length(vector_1); len2 = length(vector_2);
if len1 ~= len2
error('vector size is different');
end
for column_num = 1:len1
if vector_1(column_num,1) == vector_2(column_num,1)
check = check + 1;
end
end
if check == len1, check = 1;
else check = 0;
end
end
function [flag,transition]=compare_vector_norm(transition)
% stage index increased(flag = 1) : recalculate x_list(index,:)
% stage index decreased(flag = 0) : in the previous stage, no candidate x_now in x_list
% Input parameters
% flag : previous stage
% transition : stage number
% Output parameters
% flag : next stage number is calculated from flag
% transition : next stage number
global x_list x_pre x_metric x_now x_hat R radius_squared x_sliced len;
vector_identity = vector_comparison(x_pre,x_now);
% check if the new candidate is among the ones we found before
if vector_identity == 1
% if 1 ? ML solution found
len_total = 0;
for i=1:len % if the vector is unique ? len_total = 0
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
MIMO-OFDM无线通信技术及MATLAB实现》随书源码。本人将其调试、分类、整理并附上运行结果,以供读者在翻阅书籍时更好的理解知识,并运行相关章节的代码。 第1章 无线信道:传播和衰落 第2章 SISO信道模型 第4章 OFDM概述 第5章 CFO估计技术 第6章 信道估计 第7章 PAPR 第9章 MIMO信道容量 第10章 天线分集与空时编码技术第 11章 空间复用的MIMO系统的信号检测 第12章 在发射端利用信道状态信息 第13章多用户MIMO
资源推荐
资源详情
资源评论
收起资源包目录
《MIMO-OFDM无线通信技术及MATLAB实现》随书源码-第11章 空间复用的MIMO系统的信号检测.rar (36个子文件)
第11章 空间复用的MIMO系统的信号检测
萝莉酱.jpeg 120KB
MIMO系统的QRM-MLD检测器的软判决
QRM_MLD_detector.m 4KB
Viterbi_decode.m 1KB
Viterbi_init.m 1002B
QRM_MLD_simulation.m 3KB
QAM16_mod.m 599B
QAM16_slicer_soft.m 428B
Viterbi_decode_soft.m 1KB
QRM_MLD_soft.m 3KB
convolution_encoder.m 333B
SISO系统的软硬判决性能
硬判决.jpg 52KB
soft_hard_SISO.m 2KB
Viterbi_decode.m 1KB
QAM16_slicer.m 592B
Viterbi_init.m 1002B
QAM16_mod.m 599B
QAM16_slicer_soft.m 428B
soft_decision_sigma.m 328B
Viterbi_decode_soft.m 1KB
QAM16_demapper.m 553B
convolution_encoder.m 333B
格基规约的MMSE检测
SQRD_.m 1KB
original_LLL_.m 1KB
LRAD_MMSE.m 3KB
MIMO系统的MMSE检测
soft_output2x2.m 327B
MMSE_detection_2x2.m 4KB
QAM16_mod.m 599B
OSIC检测方法
QAM16_slicer.m 592B
OSIC_detector.m 3KB
球形译码
compare_vector_norm.m 2KB
SD_detector.m 9KB
stage_processing.m 2KB
bound.m 1KB
vector_comparison.m 668B
radius_control.m 600B
list_length.m 348B
共 36 条
- 1
资源评论
泡芙萝莉酱
- 粉丝: 2398
- 资源: 958
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 动手学深度学习,沐神版配套代码,所有代码均可在jupyter中运行,内附有极为详尽的代码注释
- qaxbrowser-1.1.32574.52.exe (奇安信浏览器windows安装包)
- C#编写modbus tcp客户端读取modbus tcp服务器数据
- 某房地产瑞六补环境部分代码
- 基于Matlab实现无刷直流电机仿真(模型+说明文档).rar
- AllSort(直接插入排序,希尔排序,选择排序,堆排序,冒泡排序,快速排序,归并排序)
- 模拟qsort,改造冒泡排序使其能排序任意数据类型,即日常练习
- carsim+simulink联合仿真实现变道 包含路径规划算法+mpc轨迹跟踪算法 可选simulink版本和c++版本算法 可以适用于弯道道路,弯道车道保持,弯道变道 carsim内规划轨迹可视化
- 数组经典习题之顺序排序和二分查找和冒泡排序
- 永磁同步电机神经网络自抗扰控制,附带编程涉及到的公式文档,方便理解,模型顺利运行,效果好,位置电流双闭环采用二阶自抗扰控制,永磁同步电机三闭环控制,神经网络控制,自抗扰中状态扩张观测器与神经网络结合
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功