As I understand, the viterbi decoding of the convolutional coding class, needs as input the soft decoded bits. I would like to know the possibility of feeding the viterbi with hard decission bits instead of soft, that is, would be very difficult to modify the decode function?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since the Hamming distance is equivalent to
Euclidean distance for binary sequence
(for example, the hamming distance and Euclidean distance of [0,0,0] and [1,1,1] are both equal to 3 ), so if you feed
the hard bits ( you write several simple lines to do the hard decision,
and remember the hard decision result should stored as vec not bvec ),
then feed them into the soft viterbi decoder, then you get the hard decoding result.
I'm not sure whether this works, because I dont know how viterbi is implemented in it++,
but it should work.
Good luck
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But you can always calculate log-likelihood ratios from hard-decided symbols (obtained with the use of demodulate() function), and feed such LLRs to the standard soft Viterbi algorithm.
BR,
/ediap
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I understand, the viterbi decoding of the convolutional coding class, needs as input the soft decoded bits. I would like to know the possibility of feeding the viterbi with hard decission bits instead of soft, that is, would be very difficult to modify the decode function?
Since the Hamming distance is equivalent to
Euclidean distance for binary sequence
(for example, the hamming distance and Euclidean distance of
[0,0,0] and [1,1,1] are both equal to 3 ), so if you feed
the hard bits ( you write several simple lines to do the hard decision,
and remember the hard decision result should stored as vec not bvec ),
then feed them into the soft viterbi decoder, then you get the hard decoding result.
I'm not sure whether this works, because I dont know how viterbi is implemented in it++,
but it should work.
Good luck
You can use one of the following methods for hard decoding:
virtual void decode (const bvec &coded_bits, bvec &decoded_bits)
virtual bvec decode (const bvec &coded_bits)
Enjoy!
//Pål Frenger
I'm afraid that you can not use the functions Pål suggested, because they are not implemented for Convolutional Codes:
00731 // --------------- Hard-decision decoding is not implemented -----------------
00732
00733 void Convolutional_Code::decode(const bvec &coded_bits, bvec &output)
00734 {
00735 it_error("Convolutional_Code::decode(): Hard-decision decoding not implemented");
00736 }
00737
00738 bvec Convolutional_Code::decode(const bvec &coded_bits)
00739 {
00740 it_error("Convolutional_Code::decode(): Hard-decision decoding not implemented");
00741 return bvec();
00742 }
But you can always calculate log-likelihood ratios from hard-decided symbols (obtained with the use of demodulate() function), and feed such LLRs to the standard soft Viterbi algorithm.
BR,
/ediap