资源简介
采用matlab仿真了卷积编码在BPSK调制下通过AWGN信道是的性能分析。包含不同参数下卷积码的误码率曲线比较,包括'未使用编码'与'使用卷积编码'的比较,不同回溯长度、不同码率、不同约束长度的误码率曲线
代码片段和文件信息
clear all;
clc;
cycl = 100;
snr_db = 0:1:10;
% 输入信息
msg = randint(11024);
ber0 = zeros(cycllength(snr_db));
ber1 = zeros(cycllength(snr_db));
% Trellises
trel = poly2trellis(3[6 7]); %Define trellis for rate 1/2 code.
for n = 1:cycl
for x = 1:length(snr_db)
% Code words
code = convenc(msgtrel); % Encode.
% Interleaver
state = 20;
inter = randintrlv(codestate);
% BPSK 调制
s0 = sign(msg - 0.5);
s1 = sign(inter-0.5);
s2 = sign(code-0.5);
% AWGN Channel
add_noise0=awgn(s0snr_db(x)‘measured‘);
add_noise1=awgn(s1snr_db(x)‘measured‘);
add_noise2=awgn(s2snr_db(x)‘measured‘);
% 解调
r_0 = 0.5*sign(add_noise0) + 0.5;
r_1 = 0.5*sign(add_noise1) + 0.5;
r_2 = 0.5*sign(add_noise2) + 0.5;
% Deinterleaver
deinter_1 = randdeintrlv(r_1state);
% Traceback length
tblen = 5;
% vitdec
decoded1 = vitdec(deinter_1treltblen‘cont‘‘hard‘);
% 比较误码率
[num0rat0] = biterr(r_0msg);
[num1rat1] = biterr(double(decoded1(tblen+1:end))msg(1:end-tblen));
ber0(nx) = rat0;
ber1(nx) = rat1;
end
end
ber0 = mean(ber0);
ber1 = mean(ber1);
figure;
semilogy(snr_dbber0‘b-o‘snr_dbber1‘r-s‘);
xlabel(‘SNR (dB)‘);
ylabel(‘BER‘);
legend(‘未使用编码‘‘使用卷积编码‘);
title(‘码率为1/2时的卷积码性能分析‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1499 2016-04-25 14:32 main432.m
文件 2696 2016-04-25 14:35 main433.m
文件 2622 2016-04-25 14:34 main434.m
文件 2119 2016-04-25 14:39 main435.m
文件 1498 2016-04-06 17:54 main444.m
文件 2697 2016-04-06 17:55 main445.m
文件 2623 2016-04-06 16:24 main446.m
文件 2120 2016-04-06 16:58 main447.m
文件 1919 2016-04-06 17:48 main448.m
相关资源
- 天线阵的波束形成在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实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
- 神经网络分类matlab程序
- matlab正弦信号发生器的设计
- matlab程序用Hopfield网络解决TSP
- 实例matlab 编程100个常用程序
- 用MATLAB(BPSK仿真 直接扩频)
评论
共有 条评论