• 大小: 2KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-05
  • 语言: Matlab
  • 标签: STBC  

资源简介

还不错的STBC程序,在瑞利信道下的MIMO系统仿真

资源截图

代码片段和文件信息

%SNR in dB;
function [BERRaw_BER]=stbc_2t1r_bpsk_uncorr_Rayleigh(SNRSimBits)

%Generate source;
 T1_InforSource=randint(1SimBits/2[01]);
 T2_InforSource=randint(1SimBits/2[01]);

%BPSK modulation;
T1_InforSymbol=(T1_InforSource-0.5)*2;
T2_InforSymbol=(T2_InforSource-0.5)*2;

%STBC Tx2Rx2 encoding;
scale=sqrt(2);%total power of all transmitters are normalized to 1;
T1_STBC_Symbol=[T1_InforSymbol;-T2_InforSymbol]/scale;
T1_STBC_Symbol=reshape(T1_STBC_Symbol1SimBits);
T2_STBC_Symbol=[T2_InforSymbol;T1_InforSymbol]/scale;
T2_STBC_Symbol=reshape(T2_STBC_Symbol1SimBits);

%Independent Rayleigh fading channel; h is constant between adacent
%symbols;
h1=sqrt(0.5)*(randn(1SimBits/2)+j*randn(1SimBits/2));
h1=[h1;h1];
h1=reshape(h11SimBits);
h2=sqrt(0.5)*(randn(1SimBits/2)+j*randn(1SimBits/2));
h2=[h2;h2];
h2=reshape(h21SimBits);
h=[h1;h2];

Raw_h=sqrt(0.5)*(randn(1SimBits)+j*randn(1SimBits));

noise=sqrt(10^(-SNR/10.0)/2)*(randn(1SimBits)+j*randn(1SimBits));
Raw_noise=sqrt(10^(-SNR/10.0)/2)*(randn(1SimBits)+j*randn(1SimBits));

%Received signals with STBC;
Received_Symbol=sum([T1_STBC_Symbol;T2_STBC_Symbol].*h1)+noise;%Note: noise power is just added at the receiver;

评论

共有 条评论