資源簡介
還不錯的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;
- 上一篇:小波基構造函數 Matlab函數
- 下一篇:14節點潮流 牛頓法
評論
共有 條評論