网站大量收购独家精品文档,联系QQ:2885784924

卷积码的维特比译码函数(Viterbi decoding function of convolutional codes).doc

卷积码的维特比译码函数(Viterbi decoding function of convolutional codes).doc

  1. 1、本文档共12页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
卷积码的维特比译码函数(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

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档