資源簡介
matlab BPSK 2PSK QPSK 4PSK,誤碼率,星座圖

代碼片段和文件信息
clear
N=10^6
m=rand(1N)>0.5;
s=2*m-1;
Eb_N0=[-2:30];
for?ii=1:length(Eb_N0)
????
????
??n=1/sqrt(2)*[randn(1N)+j*randn(1N)];
??h=1/sqrt(2)*[randn(1N)+j*randn(1N)];
???
???li1=h.*s+10^(-Eb_N0(ii)/20)*n;
???li2=s+10^(-Eb_N0(ii)/20)*n;
???liu=li1./h;
???
???liu1=real(liu)>0;
???liu2=real(li2)>0;
???
???liuyu1(ii)=size(find([m-liu1])2);
???liuyu2(ii)=size(find([m-liu2])2);
???
end
RayleighsimBer=liuyu1/N;
AWGNsimBer=liuyu2/N;
theoryBerAWGN=0.5*erfc(sqrt(10.^(Eb_N0/10)));
EbN0Lin=10.^(Eb_N0/10);
theoryBerRayleigh=0.5.*(1-sqrt(EbN0Lin./(EbN0Lin+1)));
close?all
figure
semilogy(Eb_N0theoryBerAWGN‘bp-‘‘LineWidth‘2);
hold?on
semilogy(Eb_N0AWGNsimBer‘mx-‘‘LineWidth‘2);
hold?on
semilogy(Eb_N0theoryBerRayleigh‘bp-‘‘LineWidth‘2);
semilogy(Eb_N0RayleighsimBer‘mx-‘‘LineWidth‘2);
axis([-1?30?10^-5?1])
grid?on
legend(‘AWGN-Theory‘‘AWGN-Simulation‘‘Rayleigh-Theory‘‘Rayleigh-Simulation‘);
xlabel(‘Eb/N0dB‘);
ylabel(‘BER‘);
title(‘BPSK的誤碼性能‘)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????172032??2012-04-26?10:57??BPSK和QPSK調制解調原理及MATLAB程序.doc
?????文件???????1020??2012-04-26?14:02??BPSK在AWGN和Rayleigh信道下的誤碼特性曲線.m
-----------?---------??----------?-----??----
???????????????173052????????????????????2
- 上一篇:MOEA/D的MATLAB代碼
- 下一篇:MATLAB程序——單擺擺動的動畫
評論
共有 條評論