I have following problem with the it++ RS encoder/decoder:
if you add (t+1) errors on a generated code word with RS encoder and then feed this codeword to the RS decoder, it will return all zero code word.(this statement is correct for any random generated codeword).
Hope to hearing any comments.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
what would you expect the decoded to do else? The RS-Code can only (at least) correct t errors. If you add t+1 the decoding will usually fail or - if you accidentially changed a matching pattern - correct to another valid code word (resulting in a decoding error). You cannot detect the latter case unless you know the message sent, but decoding failures are detectable, which is good for you since they are usually much more probable. Have a look at line 218ff of itpp/comm/reedsolomon.cpp on how the decoding failure is handled:
Do you use systematic encoding? You should, because the RS decoding process will do the best it can on a decoding failure and extract the systematic bis undecoded. This is by far better than tossing dices, which is the only thing you can possibly do in case of unsystematic coding.
Actually, this is not implemented in the current version of IT++, but you can easily do it by yourself. Instead of my suggestion, the decoder currently outputs all-zeros on decoding failure, which is like tossing dices on every bit if one assumes equally likely distributed code words.
regards
donludovico
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply. I couldn't find the line you referred to (128FF). However, I think this is the part of the code that handles the correctable errors:
if (decoderfailure == false) {
if (cx.get_true_degree() >= 1) {// A nonzero codeword was transmitted
if (systematic) {
for (j = 0; j < k; j++) {
mx[j] = cx[j];
}
}
else {
mx = divgfx(cx, g);
}
for (j = 0; j <= mx.get_true_degree(); j++) {
mbit.replace_mid(j*m, mx[j].get_vectorspace());
}
}
}
This implies that if decoderfailure is true, the initial (all zero) assignment is returned. Am I correct?
So, currently, the decoder returns all zero in the case of decoding failure which is also a valid code word. Therefore, the decoding failure can not be resolved from the cases of successful decoding of all zero code word. Wouldn't it be better if the output is not a valid codeword in the case if decoder failure? For instance, if it returns erasure in the case of decoding failure, it can be used to handle the error using other methods, e.g. ARQ.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
that are exactly the lines, and you are completely correct. Handling of erasures are not that easy as it seems since the calculations are done in the binary field; and there is no space for a third number ;-)
A work around might be returning decoderfailure from the decoding method. And citing ediap: Please feel free to provide a patch implementing this feature and open a feature request.
regards
/Stephan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have following problem with the it++ RS encoder/decoder:
if you add (t+1) errors on a generated code word with RS encoder and then feed this codeword to the RS decoder, it will return all zero code word.(this statement is correct for any random generated codeword).
Hope to hearing any comments.
Hi Beygil,
what would you expect the decoded to do else? The RS-Code can only (at least) correct t errors. If you add t+1 the decoding will usually fail or - if you accidentially changed a matching pattern - correct to another valid code word (resulting in a decoding error). You cannot detect the latter case unless you know the message sent, but decoding failures are detectable, which is good for you since they are usually much more probable. Have a look at line 218ff of itpp/comm/reedsolomon.cpp on how the decoding failure is handled:
Do you use systematic encoding? You should, because the RS decoding process will do the best it can on a decoding failure and extract the systematic bis undecoded. This is by far better than tossing dices, which is the only thing you can possibly do in case of unsystematic coding.
Actually, this is not implemented in the current version of IT++, but you can easily do it by yourself. Instead of my suggestion, the decoder currently outputs all-zeros on decoding failure, which is like tossing dices on every bit if one assumes equally likely distributed code words.
regards
donludovico
Hi,
Thanks for your reply. I couldn't find the line you referred to (128FF). However, I think this is the part of the code that handles the correctable errors:
if (decoderfailure == false) {
if (cx.get_true_degree() >= 1) {// A nonzero codeword was transmitted
if (systematic) {
for (j = 0; j < k; j++) {
mx[j] = cx[j];
}
}
else {
mx = divgfx(cx, g);
}
for (j = 0; j <= mx.get_true_degree(); j++) {
mbit.replace_mid(j*m, mx[j].get_vectorspace());
}
}
}
This implies that if decoderfailure is true, the initial (all zero) assignment is returned. Am I correct?
So, currently, the decoder returns all zero in the case of decoding failure which is also a valid code word. Therefore, the decoding failure can not be resolved from the cases of successful decoding of all zero code word. Wouldn't it be better if the output is not a valid codeword in the case if decoder failure? For instance, if it returns erasure in the case of decoding failure, it can be used to handle the error using other methods, e.g. ARQ.
Hi,
that are exactly the lines, and you are completely correct. Handling of erasures are not that easy as it seems since the calculations are done in the binary field; and there is no space for a third number ;-)
A work around might be returning decoderfailure from the decoding method. And citing ediap: Please feel free to provide a patch implementing this feature and open a feature request.
regards
/Stephan