MPSK,误码率性能仿真源码程序 - matlab通信信号 - 谷速源码
下载频道> 资源分类> matlab源码> 通信信号> MPSK,误码率性能仿真源码程序

标题:MPSK,误码率性能仿真源码程序
分享到:

所属分类: 通信信号 资源类型:程序源码 文件大小: 439.28 KB 上传时间: 2016-01-24 21:53:57 下载次数: 8 资源积分:1分 提 供 者: matlab源码 点击下载
内容:
MPSK,误码率性能仿真源码程序,程序员在编程的过程中可以参考学习使用,希望对IT程序员有用,此源码程序简单易懂、方便阅读,有很好的学习价值!
部分代码如下:
% Differential Dual-Hop, using MSD
%% clear and close 
clc
close all
clear all
%%
addpath('functions');
sp_R=1e6; % sphere radios
M=2; % MPSK symbols
N=10; % multiple symbol window size
Ns=(N-1)*round(5E5/(N-1));% number of symbols
 
% Total power in the network
Ptot_dB=10:5:40;
N0=1;
Ptot=10.^(Ptot_dB/10)*N0;
 
% channel variances
vsig_1=[1,10,1];
vsig_2=[1,1,10];
ch_scn=3;
sig_1=vsig_1(ch_scn);
sig_2=vsig_2(ch_scn);
 
% power allocation
vpw_alc=[.26,.1,.5];
pw_alc=vpw_alc(ch_scn);
P0=pw_alc*Ptot;
P1=(1-pw_alc)*Ptot;
 
% amplification factor
A2=P1./(N0+P0*sig_1);
 
% distance between two channel uses
ch_dis=1;
 
% normalized doppler frequency
fsr1=[.001,.01,.05];
frd1=[.001,.001,.05];
 
 
% choose scenario
scn=3;
fsr=fsr1(scn);
frd=frd1(scn);
 
% this loop scans the SNR range
for ind=1:length(P0)
 
Nbits=0;%bit counter
nerr_msd=0;% error counter 
 
clc
Ptot_dB(ind)
 
% error threshold
ERR_TH=100;
 
% this loop keeps going to get a certain amount of errors
while nerr_msd<ERR_TH 
 
% binary data    
xb=bits(log2(M)*Ns);
 
% MPSK
v=bin2mpsk(xb,M);
 
% DPSK modulation
s=dpsk(v);
Nd=length(s);
 
% source-relay channel
h1=sqrt(sig_1)*flat_cos(Nd,fsr,ch_dis);
 
% AWGN noise CN(0,N0)
w1=cxn(Nd,N0);
 
% S-R received signal
x=sqrt(P0(ind))*h1.*s+w1;
 
% relay-destination channel
h2=sqrt(sig_2)*flat_cos(Nd,frd,ch_dis);
 
% AWGN noise CN(0,N0)
w2=cxn(Nd,N0);
 
% S-R-D rx signal
y=sqrt(A2(ind))*h2.*x+w2;
 
if scn>1
Lh=computeL(P0(ind),A2(ind),N0,N,fsr,frd,ch_dis,sig_1,sig_2);
% multiple symbol sphere detection
for k=1:N-1:Nd-N+1
    yN=y(k:k+N-1).';
    U=conj(Lh*diag(yN));
    shat=MSDSD(U,M,sp_R);
    vh_ms(k:k+N-2)=diff_detector(shat);
end
% MS binary detection
bh_ms=mpsk2bin(vh_ms,M);
 
% errors
nerr_msd=nerr_msd+length(find(xb-bh_ms));
Nbits=log2(M)*Ns+Nbits;
 
end
 
% practical BER
BER_msd(ind)=nerr_msd/Nbits;
 
end
end
 
% theoretical BER of MSD
for k=1:length(P0)
    %c=.12;
    c=.16;
 %   min_Phi(P0(k),A2(k),N0,M,N,fsr,frd,ch_dis,sig_1,sig_2)
    Pb_msd(k)=ber_msd(P0(k),A2(k),N0,M,N,fsr,frd,ch_dis,sig_1,sig_2,c);
end
 
%%
lcm1=['r-+';'m-s';'b-+';'b->';];
lcm2=['--r';'--b';'--r';'--r'];
 
figure
semilogy(Ptot_dB,BER_msd,lcm1(1,:),'LineWidth',2,'MarkerSize',12);
hold on
semilogy(Ptot_dB,Pb_msd,lcm2(2,:),'LineWidth',2,'MarkerSize',12);
 
grid on
legend('Simulation, MSD N=10','Analysis, MSD, N=10')
xlabel('P(dB)');
ylabel('BER');
set(gca,'XTick',Ptot_dB(1):5:Ptot_dB(end),'FontSize',16,...
   'FontName','Times New Roman');
axis([10 40 7e-4 1e0])
 

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

MPSK,误码率性能仿真源码程序/
MPSK,误码率性能仿真源码程序/IET_MATLAB/
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/
MPSK,误码率性能仿真源码程序/IET_MATLAB/DH_Gen_MSD.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/DH_General.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/ber_m2_scs_sig_1_1.jpg
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ber_m2_scs_sig_10_1.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ber_m2_scs_sig_1_1.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ber_m2_scs_sig_1_1.jpg
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ber_m2_scs_sig_1_10.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ber_m4_scs_sig_10_1.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ber_m4_scs_sig_1_1.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/ef_fd_m2.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/figs/pw_m4_all.fig
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/MSDSD.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/Pb_floor.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/Pb_unified.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/Poutage.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/ber_msd.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/bin2mpsk.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/bits.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/computeL.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/cxn.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/diff_detector.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/dpsk.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/flat_cos.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/int_num.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/min_Phi.m
MPSK,误码率性能仿真源码程序/IET_MATLAB/functions/mpsk2bin.m

关键词: 误码率 源码 性能

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved