matlabtelecommunicationviterbi

soft viterbi decoder not working properly


I have been working on viterbi decoder in matlab2009 on simple 1/2 rate convolutional encoder. Here is my code

trel = poly2trellis(3,[7 5]);
msg = [ 0 1 0 1 1 1 0 0 1 0 1 0 0 0 1 ];
code = convenc(msg,trel);
% Traceback Length 
tblen = 5;
ucode = real(awgn(1-2*code,tblen,'measured'));

dcd = vitdec(ucode,trel,tblen,'cont','unquant');

According to this input code i am getting the code = 00 11 10 00 01 10 01 11 11 10 00 10 11 00 11 which is correct but talking about the dcd which is output after viterbi decoder is coming incorrect i.e 000000101110010. which is far different from my msg input.

guide me where i am going incorrect


Solution

  • The decoded output depends on the type of opmode Input you selected.

    In case of cont, there is a delay in the output equal to tblen number of symbols whereas there are 'term' and trunc modes as well.

    You can compare the initial msg(1,end-tblen) symbols with dcd(1,tblen+1:end). They are same!

    You may check vitdec at Matlab help.