Info

此问题已关闭。 请重新打开它进行编辑或回答。

how to level up TURBO decoder performance

1 次查看(过去 30 天)
HI all.
I am working with MATLAB R2011b, and have a problem with turbo decode. It work well with small data block (only less than s 20 characters per input) when length of data increasing it will less accuracy of decoding.
I have try with both system object of Mat lab and external code from CML library but don't have any improvement.
My example is here http://www.mediafire.com/?bib485vw1816doq. Any one can help have any way to correct that.
Thanks.
Any one help me.
My example is
>> data = round( rand( 1, 1000 ) );
>> code = f_turbo_code(data);
>> de_code = f_turbo_deco(code);
>> err_r = sum(xor(data,de_code))
err_r =
178
and my code as following:
function out = f_turbo_code( in )
% The generator polynomials we are using
feedback_polynomial = [1 0 1 1];
feedforward_polynomial = [1 1 0 0];
%interleave matrix
interleave_matrix = [1:1:length(in)];
%Make polynomial
genPoly = [feedback_polynomial; feedforward_polynomial];
% upper out put for original data
upper_output = ConvEncode( in, genPoly, 0);
%lower input data is interleaved version of upper
lower_output = ConvEncode( [in(interleave_matrix)], genPoly, 0);
% put out put with first upper and second one with rate 1/3
out = [upper_output(1:2:end) upper_output(2:2:end) lower_output(2:2:end)];
end
function out = f_turbo_deco( in )
% The generator polynomials we are using
feedback_polynomial = [1 0 1 1];
feedforward_polynomial = [1 1 0 0];
%Make polynomial
genPoly = [feedback_polynomial; feedforward_polynomial];
turbo_iterations = 10;
number_tails = 3;
%interleave matrix
interleave_matrix = [1:1:(length(in)/3-number_tails)];
% split data from input
x1 = [in(1:(length(in)/3))];
x2 = [in((length(in)/3+ 1):(length(in)/3*2))];
x3 = [in((length(in)/3*2+ 1):(length(in)))];
input_upper_c = zeros(1 , 2*length(x1));
input_upper_c(1:2:end) = x1;
input_upper_c(2:2:end) = x2;
input_lower_c = zeros(1 , 2*length(x1));
x1_data = [x1(1:(length(x1)-number_tails))];
x1_tails = [x1((length(x1)-number_tails+1):length(x1))];
input_lower_c(1:2:end) = [x1_data(interleave_matrix) x1_tails];
input_lower_c(2:2:end) = x3;
% estimate of original data
data = [x1(1:(length(x1)-number_tails))];
input_upper_u = zeros(1, length(x1)-number_tails);
%Automatically stop when no more errors
autostop = 1;
% decoding
for turbo_iter=1:turbo_iterations
% Pass through upper decoder
[output_upper_u output_upper_c] = SisoDecode( input_upper_u, input_upper_c, genPoly, 0, 0 );
% Extract Extrinsic information
ext = output_upper_u - input_upper_u;
% Interleave this information, which organizes it in the same manner
% which the lower decoder sees bits
input_lower_u = ext(interleave_matrix);
% Pass through lower decoder
[output_lower_u output_lower_c] = SisoDecode( input_lower_u, input_lower_c, genPoly, 0, 0 );
% Interleave LLR - not part of turbo algorithm, we interleave it so we
% can measure the mutual information, since it needs to match the order
% of bits in data.
interleaved_output_lower_u = output_lower_u(interleave_matrix);
% Interleave and extract Extrinsic information
input_upper_u = output_lower_u - input_lower_u;
input_upper_u = input_upper_u(interleave_matrix);
% Hard decision based on LLR: if < 0 bit is 0, if > 0 bit is 1
detected_data = (sign(interleaved_output_lower_u) + 1) / 2;
error_positions = xor( detected_data, data);
% exit if all the errors are corrected
temp_errors = sum(error_positions);
if (temp_errors==0) && (autostop)
break;
end
end
out = detected_data;
end
and ConvEncode and SiSoDecode is take from CML file.
And as you see the performance is very low, it take about 200 error per 1000 character.
So my question is any way to make a better one. I ready try with system object from R2011b but it don't have any improve
  3 个评论
Ryan G
Ryan G 2012-7-13
Try using the MATLAB Profiler to find out where it is taking the longest, then try to DIY from there. If you have an issue at that point you can come back with a more specific line that is the issue.
Walter Roberson
Walter Roberson 2012-7-13
I don't think efficiency is the issue: it appears to me that the question is about ability to reconstruct the original data stream. That points to a problem in the encoder or a problem in the decoder, but I do not know enough about turbo coding methods to trace the problem in the time I have available.

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by