I'm trying to replicate the viterbi decoding operation in this example:
openExample('comm/DigitalVideoBroadcastingTerrestrialExample','supportingFile','commdvbt.slx')
It's doing okay, but I noticed that the Inner Decoder (Conv Encode) seems to be performing poorly compared to other blocks.
Example (comparing bits of input to output ):
OFDM Error rate: 1.000000
Mapping Error rate: 0.107143
Inner Int Error rate: 0.019761
Inner Dec Error rate: 0.029412
Iteration: 1
...
OFDM Error rate: 1.000000
Mapping Error rate: 0.074625
Inner Int Error rate: 0.003676
Inner Dec Error rate: 0.371936
Iteration: 28288
...
OFDM Error rate: 1.000000 (makes sense because no two input and output symbols will be exactly the same after noise)
Mapping Error rate: 0.058128
Inner Int Error rate: 0.012408
Inner Dec Error rate: 0.035539
Iteration: [last]
Resultant Error rate [all iterations]: 0.98776
If I use 'trunc' and 'hard' I get better results, but the viterbi decoder still sees consistent error rates between 0.01 - 0.50.
I believe the reason is because I'm somehow not achieving continuity between my iterations. What can I do?
trellis = poly2trellis(7,[171 133]);
puncpat = [1 0 1 0 1 1]';
for i = 1: packets*ofdm_symbols + (2244/204)
msg_encoded(startidx_out:endidx_out) = convenc(bin_interleaved(startidx_in:endidx_in), trellis,puncpat);
msg_decoded(startidx3_out:endidx3_out) = vitdec(Deinterleaved_packet(end-2175:end)', ...
trellis,length(msg),'cont','unquant',puncpat);