资源简介
仿真2×1瑞利信道,分别考虑三种接收分集技术:最大比合并、等增益合并、选择性合并,并给出误码率比较。
代码片段和文件信息
%%=====================================================================%%
%In a one transmitting antenna and two receiving antenna collocate
%calculate the bits error rates of the maximum ratio combiningequal gain
%combining selective combining and SISO system
%%=====================================================================%%
clear all
clc
close all
tic;tstart=tic; %计时开始
%================Initialize variables==================================%%
nRxs=2;%发送天线
nTxs=1;%接收天线
InfoBitLength = 10000;%the length of the transimitted bits
N0=1;%the unilateral power spectral density of white noise
Var=N0;%the variance of white noise
sigma=sqrt(Var/2);
iEbN0=1;
Ber_MRC=zeros(171);%最大比合并
Ber_SISO=zeros(171);
Ber_EGC=zeros(171);%等增益合并
Ber_SLC=zeros(171);%选择合并
for EbN0_dB=-8:8
EbN0=10^(EbN0_dB/10);
Eb=EbN0*N0; %信号功率
A=sqrt(Eb);
nError_MRC=0;
nError_SISO=0;
nError_EGC=0;
nError_SLC=0;
for iInfoBit=1:InfoBitLength %一个符号
TxBits=randi([01]).*2-1; %the transimitted signals 产生-1或1
channel = sqrt(0.5) * (randn(nRxsnTxs)+1i*randn(nRxsnTxs)); %瑞利信道
noise = sigma * (randn(nRxs1)+1i*randn(nRxs1)); %高斯白噪声
RxBits = channel*A*TxBits + noise; %模拟发送接收
%%==========the estimate by SISO=====%%
RxBits_SISO=(channel(1)/abs(channel(1)))‘*RxBits(1);
% RxBits_SISO=channel(1)‘*RxBits(1);
if real(RxBits_SISO)>0
Estimator_SISO=1;
else
Estimator_SISO=-1;
end
if Estimator_SISO~=TxBits
nError_SISO=nError_SISO+1;
end
%%==========the estimate by using MRC====%%
RxBits_MRC=channel‘*RxBits/nRxs;
if real(RxBits_MRC)>0
Estimator_MRC=1;
else
Estimator_MRC=-1;
end
if Estimator_MRC~=TxBits
nError_MRC=nError_MRC+1;
end
%%==========the estimate by using EGC====%%
RxBits_EGC=(channel./abs(channel))‘*RxBits/nRxs;
if real(RxBits_EGC)>0
Estimator_EGC=1;
else
Estimator_EGC=-1;
end
if Estimator_EGC~=TxBits
nError_EGC=nError_EGC+1;
end
%%==========the estimate by using SLC====%%
[ampliRxBitsnumMax]=max(abs(channel));
RxBits_SLC=(channel(numMax)/abs(channel(numMax)))‘*RxBits(numMax);
% RxBits_SLC=(channel(numMax))‘*RxBits(numMax);
if real(RxBits_SLC)>0
Estimator_SLC=1;
else
Estimator_SLC=-1;
end
if Estimator_SLC~=TxBits
nError_SLC=nError_SLC+1;
end
end
Ber_SISO(iEbN0)=nError_SISO/InfoBitLength;
Ber_MRC(iEbN0)=nError_MRC/InfoBitLength;
Ber_EGC(iEbN0)=nError_EGC/InfoBitLength;
Ber_SLC(iEbN0)=nError_SLC/InfoBitL
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3577 2014-04-26 09:41 MIMO中不同分集技术对误比特率的影响\diversitycombing.m
目录 0 2014-04-27 17:16 MIMO中不同分集技术对误比特率的影响\
评论
共有 条评论