资源简介
matlab的QPSK系统仿真报告及源代码

代码片段和文件信息
function [pbps]=cm_sm32(snr_in_dB)
% [pbps]=cm_sm32(snr_in_dB)
% CM_SM3 finds the probability of bit error and symbol error for
% the given value of snr_in_dB signal to noise ratio in dB.
N=100;
E=1; % energy per symbol
numofsymbolerror=0;
numofbiterror=0;
counter=0;
snr=10^(snr_in_dB/10); % signal to noise ratio
sgma=sqrt(E/snr)/2; % noise variance
s00=[1 0]; s01=[0 1]; s11=[-1 0]; s10=[0 -1]; % signal mapping
% generation of the data source
while(numofbiterror<100)
for i=1:N
temp=rand; % a uniform random variable between 0 and 1
if (temp<0.25) % with probability 1/4 source output is “00“
dsource1(i)=0; dsource2(i)=0;
elseif (temp<0.5) % with probability 1/4 source output is “01“
dsource1(i)=0; dsource2(i)=1;
elseif (temp<0.75) % with probability 1/4 source output is “10“
dsource1(i)=1; dsource2(i)=0;
else % with probability 1/4 source output is “11“
dsource1(i)=1; dsource2(i)=1;
end;
end;
% detection and the probability of error calculation
for i=1:N
ray=raylrnd(0.8);
n=sgma*randn(12); % 2 normal distributed r.v with 0 variance sgma
if ((dsource1(i)==0) & (dsource2(i)==0))
r=ray*s00+n;
elseif ((dsource1(i)==0) & (dsource2(i)==1))
r=ray*s01+n;
elseif ((dsource1(i)==1) & (dsource2(i)==0))
r=s10*ray+n;
else
r=s11*ray+n;
end;
% The correlation metrics are computed below
c00=dot(rs00); c01=dot(rs01); c10=dot(rs10); c11=dot(rs11);
% The decision on the ith symbol is made next
c_max=max([c00c01c10c11]);
if (c00==c_max) decis1=0; decis2=0;
elseif (c01==c_max) decis1=0; decis2=1;
elseif (c10==c_max) decis1=1; decis2=0;
else decis1=1; decis2=1;
end;
% Increment the error counter if the decision is not correct
symbolerror=0;
if (decis1~=dsource1(i)) numofbiterror=numofbiterror+1; symbolerror=1;
end;
if (decis2~=dsource2(i)) numofbiterror=numofbiterror+1; symbolerror=1;
end;
if (symbolerror==1) numofsymbolerror=numofsymbolerror+1;
end;
end
counter=counter+1;
end
ps=numofsymbolerror/(N*counter); % since there are totally N symbols
pb=numofbiterror/(2*N*counter); % since 2N bits are transmitted
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2666 2013-06-17 08:58 基于matlab的QPSK系统仿真\cm_sm32.m
文件 2695 2013-06-17 09:10 基于matlab的QPSK系统仿真\cm_sm33.m
文件 9282 2013-06-17 08:56 基于matlab的QPSK系统仿真\qpsk.m
文件 211770 2013-09-25 23:22 基于matlab的QPSK系统仿真\基于matlab的QPSK系统仿真.doc
目录 0 2013-09-25 23:22 基于matlab的QPSK系统仿真
----------- --------- ---------- ----- ----
226413 5
相关资源
- 串行级联cpm系统MATLAB仿真
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
评论
共有 条评论