Implementing viterbi decoder in matlab with k=7 , r=1/2
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi guys, I've a message in binary that's an output of convolutional encoder that its parameters is k=7 , r=1/2.
So Im trying to implement a viterbi decoder which I've seen that matlab provide already built viterbi decoder and Im trying to use it but apprently Im getting wrong decoded message. my code of viterbi decoder in matlab is: (the input is encoded message which it's the output of convolutional encoder that its parameters is k=7 , r=1/2).
function ViterbiDecoderMsg= ViterbiDecoder(encodedmsg)
constlen = 7;
codegen = [171, 133]; % G1=171 , G2=133.
trellis = poly2trellis(constlen, codegen);
tblen = length(encodedmsg) /2 ; %divided by two because the output of encoder is two bits so the opposite I need to devide by 2 in the decoder.
ViterbiDecoderMsg=vitdec(coded,trellis,tblen,'trunc','hard')
end
Im getting wrong decoded message , could anyone pelase help me if my viterbi decoder with k=7 and r=1/2 that I use is correct? I mean the parameters of using poly2trellis and vitdec functions.
Second question, how can I use Viterbi Decoder with soft decision in my case? I tried to write instead of 'hard' -> 'soft'
it didn't work, a pleasure if anyone could help me how can I use soft decision with Viterbi decoder of matlab.
thanks alot for any help guys!
Appreciated.
2 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Error Detection and Correction en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!