通信系统接收分集技术的仿真研究

2026/1/27 2:40:00

附录

附文中所用仿真程序:

图3.1如下

% bpsk.m

% Simulation program to realize BPSK transmission system

%******************** Preparation part ********************** nd = 10000; % Number of symbols that simulates in each loop snr_in_dB=[0:15] ;

ber=zeros(1,length(snr_in_dB));

for snr_num=1:length(snr_in_dB)

SNR=exp(snr_in_dB(snr_num)*log(10)/10);

%******************** START CALCULATION ********************* nloop=100; % Number of simulation loops noe = 0; % Number of error data

nod = 0; % Number of transmitted data

for iii=1:nloop

%******************** Data generation ********************************

data1=rand(1,nd)>0.5; data2=2.*data1-1;

%****************** Attenuation Calculation ***************** %****************** rayleigh channel *****************

code_rate=1; E=1;

sigma=E/sqrt(2*SNR*code_rate); n =[randn(1,nd) + j*randn(1,nd)];

h1 =1/sqrt(2)*[randn(1,nd) + j*randn(1,nd)]; % Rayleigh channel data41=data2.*h1+sigma.*n;

h11=conj(h1)./abs(h1); %注释: data411 = data41.*h11; %注释:

%***************************************** n =[randn(1,nd) + j*randn(1,nd)];

h2 =1/sqrt(2)*[randn(1,nd) + j*randn(1,nd)]; % Rayleigh channel data42=data2.*h2+sigma.*n; h22=conj(h2)./abs(h2); data422 =data42.*h22;

%***************************************** data4=data411+data422; %注释:

%******************** BPSK Demodulation *********************

demodata1=data4 > 0;

%******************** Bit Error Rate (BER) ******************

noe2=sum(abs(data1-demodata1)); nod2=length(data1); noe=noe+noe2; nod=nod+nod2;

end

%********************** Output result ***************************

ber1(snr_num) = noe/nod

end;

%******************** end of file *************************** figure;

semilogy(snr_in_dB,ber1,'O-'); hold on

semilogy(snr_in_dB,0.5*erfc(sqrt(2*10.^(snr_in_dB/10))/sqrt(2)),'+-'); hold on

semilogy(snr_in_dB,0.5.*(1-sqrt((10.^(snr_in_dB/10))./(10.^(snr_in_dB/10)+1))),'-');

ylabel('BER');

xlabel('E_b/N_0 [dB]'); legend('simulation BPSK EGC L=2','theory gngauss BPSK','theory reyleigh' ); grid on;

图3.2如下:

% bpsk.m

% Simulation program to realize BPSK transmission system

%******************** Preparation part ********************** nd = 10000; % Number of symbols that simulates in each loop snr_in_dB=[0:15] ;

ber=zeros(1,length(snr_in_dB));

for snr_num=1:length(snr_in_dB)

SNR=exp(snr_in_dB(snr_num)*log(10)/10);

%******************** START CALCULATION ********************* nloop=100; % Number of simulation loops noe = 0; % Number of error data

nod = 0; % Number of transmitted data

for iii=1:nloop

%******************** Data generation ********************************

data1=rand(1,nd)>0.5; data2=2.*data1-1;

%****************** Attenuation Calculation ***************** %****************** rayleigh channel *****************

code_rate=1; E=1;

sigma=E/sqrt(2*SNR*code_rate); n =[randn(1,nd) + j*randn(1,nd)];

h1 =1/sqrt(2)*[randn(1,nd) + j*randn(1,nd)]; % Rayleigh channel data41=data2.*h1+sigma.*n; h11=conj(h1); %注释:

data411 = data41.*h11; %注释:

%***************************************** n =[randn(1,nd) + j*randn(1,nd)];

h2 =1/sqrt(2)*[randn(1,nd) + j*randn(1,nd)]; % Rayleigh channel data42=data2.*h2+sigma.*n; h22=conj(h2);

data422 =data42.*h22;

%***************************************** data4=data411+data422;% 注释:

%******************** BPSK Demodulation *********************

demodata1=data4 > 0;

%******************** Bit Error Rate (BER) ******************

noe2=sum(abs(data1-demodata1)); nod2=length(data1); noe=noe+noe2;


通信系统接收分集技术的仿真研究.doc 将本文的Word文档下载到电脑
搜索更多关于: 通信系统接收分集技术的仿真研究 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219