clc;
close all;
clear all;
N=1000;
BPSK=randsrc(1,N);
for Eb_No_dB=0:1:12
sig_info=sqrt(2*10.^(Eb_No_dB/10)).*BPSK;
for m=1:1:1
%----channel impulse response---------
X=randn(1,N);
Y=randn(1,N);
unit_X=X/sqrt(var(X));
unit_Y=Y/sqrt(var(Y));
alpha=sqrt((unit_X.^2)+(unit_Y.^2));
alpha_norm=alpha/sqrt((mean(alpha.^2)));
phase=rand(1,N);
uni_phase=2*pi*phase;
uni_phase_norm=uni_phase/sqrt(var(uni_phase));
e_ph=complex(cos(uni_phase_norm),-sin(uni_phase_norm));
h=alpha_norm.*e_ph;
%----AWGN--------------------------
noise1=randn(1,N);
noise2=randn(1,N);
uni_var_noise1=noise1/sqrt(var(noise1));
uni_var_noise2=noise2/sqrt(var(noise2));
cmplex_noise=complex(uni_var_noise1,uni_var_noise2);
%-----Recieved signal---------------
rxsig=h.*sig_info+cmplex_noise;%equalising for channel charaecteristics
Rx_eq=rxsig.*conj(h);
for i=1:1:N
if(real(Rx_eq(i))>0)
decision(i)=1;
else
decision(i)=-1;
end
end
error=0;
for i=1:1:N
if decision(i)~=BPSK(i)
error=error+1;
end
end
ber(m)=error/N;
end
Pb_SISO(Eb_No_dB+1)=mean(ber);
end
Eb_No_dB=0:1:12;
semilogy(Eb_No_dB,Pb_SISO,'r--');
grid on;
hold on;
axis([0 12 10^-4 0.5]);
legend('SISO');
xlabel('SNR(dB)');
ylabel('BER');
title('SISO (MT=1,MR=1) in Rayleigh fading channel');
SISO.zip_siso_zip
版权申诉
120 浏览量
2022-09-23
17:59:32
上传
评论
收藏 735B ZIP 举报
weixin_42651887
- 粉丝: 79
- 资源: 1万+
最新资源
- 基于matlab实现电磁优化计算功能,进行线型规划优化电磁设计.rar
- 基于matlab实现带精英策略的非支配排序遗传算法matlab 源码.rar
- 基于matlab实现差分进化算法,最新的用于替代遗传算法,是以后的主要发展方法.rar
- VSCode配置c/c++环境教程.md
- 基于matlab实现标准合作型协同进化遗传算法matlab源程序
- 七下人教.zip
- 基于matlab实现本份代码能对图像进行gabor滤波处理,结合指纹方向图以及指纹沟壑频率特性,对指纹图像进行增强.rar
- 基于matlab实现RBM神经网络实现了手写数字体识别的GUI程序.rar
- 基于matlab实现蝙蝠算法优化相关向量机建模对数据进行建模和预测.rar
- 基于matlab实现编写的禁忌搜索算法,解决了TSP问题,对初学者有重要的参考价值.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈