- 40
- 0
- 约6.69千字
- 约 12页
- 2017-08-04 发布于河南
- 举报
卷积码的维特比译码函数(Viterbi decoding function of convolutional codes)
[ decoder_output功能,survivor_state,cumulated_metric ] =维特比(G,K,channel_output)
%卷积码的维特比译码函数
Viterbi卷积码的维特比解码器%
[ decoder_ouput %,survivor_state,cumulated_metric ] =维特比(G,K,channel_output)
% G是一个n路矩阵,该矩阵的每一行确
定了从移位记错器到第N个输出间的连接%,
%是码速率。
survivor_state是表示通过网络的最佳路径的矩阵%。
%量度在另一个函数度量(x,y)中给出,而且可根据
%硬判决和软判决来指定。
%该算法最小化了量度而不是最大化似然
N =大小(G,1);%取出矩阵G的一维大小,即得出输出端口
%检查大小
如果REM(大小(G,2),k)~ = 0%当G列数不是K的整数倍时
误差(G和K size不同意)%发出出错信息
结束
如果REM(尺寸(channel_output,2),N = 0%)~当输出量元素个数不是输出端口的整数倍时
错误(channel输出不正确的大小发出出错信息)%
结束
L =大小(G,2)/ K;%得出移位数,即寄存器的个数
由于L-1个寄存器的状态即可表示出输出状态%,
%所以总的状态数number_of_states可由前L-1个
%寄存器的状态组合来确定
number_of_states = 2 ^((L-1)×K);
%产生状态转移矩阵、输出矩阵和输入矩阵
J = 0:number_of_states-1 % J表示当前寄存器组的状态因为状态是从零
%开始的,所以循环从0到number_of_states-1
L = 0:2 ^ K-1 % L为从K个输入端的信号组成的状态,总的状
%态数为2 ^ K,所以循环从0到2 ^ K-11
nxt_stat完成从当前的状态和输入的矢量得出下寄存器组的一个状态%
[ next_state,memory_contents ] = nxt_stat(J,L,L,K);
输入数组值是用于记录当前状态到下一个状态所要的输入信号矢量%
%输入数组的维数:一维坐标x = j + 1指当前状态的值
%二维坐标y = next_state + 1指下一个状态的值
%由于MATLAB中数组的下标是从1开始的,而状态值
%是从0开始的,所以以上坐标值为:状态值+ 1
输入(j + 1,next_state + 1)= L;
% branch_output用于记录在状态下输入L时的输出[J].
branch_output = REM(memory_contents * G,2);
% nextstate array records the current state of the j input L the next state
Nextstate (j+1, l+1) =next_state;
% output array records the current state of the j input and output at L (decimal)
Output (j+1, l+1) =bin2deci (branch_output);
End
End
% state_metric array is used to record the decoding process in each state of the Hamming distance
The size of number_of_states% state_metric (2: 1) current
% state position Hamming distance, to determine the value, and (:, 2) for the current state and input
% get the next state for the temporary value of Hamming distance.
State_metric=zeros (number_of_states, 2);
% depth_of_trellis for recording grid graph depth
Depth_of_trellis=length (channel_output) /n;
% of the output matrix, each column as an output state
Channel_output_matrix=reshape (channe
您可能关注的文档
- 博士农夫打造都市绿洲(Dr. farmer creates urban oasis).doc
- 博士蛙童装代工企业变形记(Dr. Frog Metamorphosis in children's wear foundry).doc
- 曾经风雨飘摇的年代(Once a time).doc
- 博斯盾数(Bosch shield number).doc
- 暴笑 笑话(The funniest joke).doc
- 博学者--东部王国(Erudite - Eastern Kingdoms).doc
- 博弈论简介——博弈论的经典案例囚徒困境 热(A brief introduction to game theory -- a classic case of game theory Prisoner's dilemma fever).doc
- 常挂在美国人嘴边的最酷口语 - uc英语角mandy - 新浪blog(The coolest spoken language often on the lips of Americans - UC English corner Mandy - Sina blog).doc
- 参数配置(Parameter configuration).doc
- 常见服装面料性能(Properties of common clothing fabrics).doc
最近下载
- 《将进酒》说课课件(12张PPT)_20211215205119.pdf VIP
- 山西省教师晋升副高职称考试题库.pdf VIP
- 接触网设计规范(综合版).docx
- 统编版语文六年级下册第三单元教材解读+课件.pptx VIP
- 英语六级高频核心词汇速记.pdf VIP
- 中医护理的整体观念和辨证施护.pptx VIP
- 2025年中外历史纲要下 第二单元 第 4 课中古时期的亚洲(共38张PPT).ppt VIP
- 2026年江西旅游商贸职业学院单招综合素质考试题库及答案解析.docx VIP
- 2025年广东省广州市中考物理试卷及答案.docx VIP
- 2026年内蒙古化工职业学院单招(计算机)测试模拟题库附答案解析.docx VIP
原创力文档

文档评论(0)