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

📄 getq_inverse.m

📁 两发两收的空时分组编码OFDM系统 采用SUI5信道模型
💻 M
字号:
function getQ_inverse(chantype,fftsize,sampletime)

% Preamble of Tx 1 and Tx 2
load preamble_cm.mat;
t1=zeros(1,2048);
t2=zeros(1,2048);
t1=2*(0.5-preamble_cm);
t2(1:2:end)=-t1(1:2:end);
t2(2:2:end)=t1(2:2:end);
t1=t1;
t2=t2;


switch chantype,
    case 1,
        tau = [0 0.4 0.9];      % tap delay in us
    case 2,
        tau = [0 0.4 1.1];
    case 3,
        tau = [0.0 0.4 0.9];
    case 4,
        tau = [0 1.5 4];
    case 5,
        tau = [0 4 10];
    case 6,
        tau = [0 14 20];
    otherwise,
        error('Unknown SUI channel type!');
end

L = max(round(tau/(sampletime)))+1;       % max multipath delay spread sample points

% ------------- Q11,Q21,Q12,Q22 -------------
T11=t1.*conj(t1);
T21=t2.*conj(t1);
T12=t1.*conj(t2);
T22=t2.*conj(t2);
q11_row=zeros(1,L);
q11_column=zeros(1,L);
q21_row=zeros(1,L);
q21_column=zeros(1,L);
q12_row=zeros(1,L);
q12_column=zeros(1,L);
q22_row=zeros(1,L);
q22_column=zeros(1,L);
for loop=1:L
    WN_row=exp(-j*2*pi/fftsize*(loop-1)*[0:1:fftsize-1]);
    q11_row(loop)=sum(T11.*WN_row);
    q21_row(loop)=sum(T21.*WN_row);
    q12_row(loop)=sum(T12.*WN_row);
    q22_row(loop)=sum(T22.*WN_row);
    
    WN_column=conj(WN_row);
    q11_column(loop)=sum(T11.*WN_column);
    q21_column(loop)=sum(T21.*WN_column);
    q12_column(loop)=sum(T12.*WN_column);
    q22_column(loop)=sum(T22.*WN_column);
end

Q11=toeplitz(q11_column,q11_row);
Q21=toeplitz(q21_column,q21_row);
Q12=toeplitz(q12_column,q12_row);
Q22=toeplitz(q22_column,q22_row);

Q=[Q11,Q21;Q12,Q22];

Q_inv=inv(Q);

switch chantype,
    case 1,
        save Q_inv_sui1.mat Q_inv;
    case 2,
        save Q_inv_sui2.mat Q_inv;
    case 3,
        save Q_inv_sui3.mat Q_inv;
    case 4,
        save Q_inv_sui4.mat Q_inv;
    case 5,
        save Q_inv_sui5.mat Q_inv;
    case 6,
        save Q_inv_sui6.mat Q_inv;
    otherwise,
        error('Unknown SUI channel type!');
end

⌨️ 快捷键说明

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