I am working on a realisation the convolutional encoder/decoder with constraint length K=7. Encoder and decoder were implemented and currently I am testing these functions
My test file looks like:
snr = 0.2;
len = 1000;
Din = GenData(len); % generate a random data
% Encoder
EncOut = VitEnc(Din, len);
% create a channel
noise = 10^(-snr/20);
for i = 1: len,
for j = 1: 2
ChannelOut(j,i) = (EncOut(j,i) + (noise * randn));
ChannelOut(j,i) = ChannelOut(j,i) * 2;
if ChannelOut(j,i) > 7 ChannelOut(j,i) = +7; end;
if ChannelOut(j,i) < -8 ChannelOut(j,i) = -8; end;
end;
end;
% Decoder
DecOut = vitdec(len, ChannelOut);
The last my step is computation bit error. It was suggest to use the following equation:
BitError = sum(abs( Din - DecOut));
If i add this equation in my simulation, I will get a number. For example, ´BitError = 27´. Could someone explain what the result of ´BitError ´ means? Is a bigger or a smaller number better?
EDIT 1:
- I have thougth to compute bit error as a difference between input data and decoded data, but it was suggested to take a sum of the differences...I dont understand why?