why unquantized comm.ViterbiDecoder gives bits with errors when the modulation is 1-2*encodedBits with 100dB say; the code is as follow:

% clear All clc
% initial data for encoding & decoding % codeRate = 1/2;
% constlen = 7;
% codegenpoly = [171 133];
% tblen = 32;
% trellis = poly2trellis ( constlen, codegenpoly );
% the three comm members: % ( 1 ) comm.ConvolutionalEncoder % ( 2 ) comm.AWGNChannel % ( 3 ) comm.ViterbiDecoder % hConEnc = comm.ConvolutionalEncoder ( trellis );
% hAWGN = comm.AWGNChannel ( 'NoiseMethod', 'Variance', 'Variance', 1 );
% EbNo = 40.0;
% noiseVar = 1. / ( 2 * codeRate * 10. ^ ( EbNo / 10 ) );
% hAWGN.Variance = noiseVar;
% hDec = comm.ViterbiDecoder ( trellis, ... 'InputFormat', 'Unquantized', 'TracebackDepth', tblen );
% the simulation loop % for counter = 1 : 5 % data = randi ( [0 1], 30, 1 );
%
encodedData = step ( hConEnc, data );
% compatible unquantized received signal
%
receivedSignal = step ( hAWGN, (1 - 2 * encodedData) );
%
receivedBits = step ( hDec, receivedSignal );
if counter == 3
%
display ( counter );
%
display ( data );
%
display ( encodedData );
%
display ( receivedSignal );
%
display ( receivedBits );
end
end
%some of the outbut: % data 1 0 0 1 1 0 1 1 1 0 0 1 0 1 % 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 % 0
% encodedData = 0 0 0 1 0 1 1 0 1 1 1 1 0 % 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 % 1 0 0 0 1 1 0 1 1 1 0 0 0 0 1 % 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 1 1 % receivedSignal 1 1 1 -1 1 -1 -1 1 -1 -1 -1 -1 % 1 1 -1 1 -1 -1 1 1 -1 -1 1 -1 1 1 -1 % 1 -1 1 1 1 -1 -1 1 -1 -1 -1 1 1 1 1 % -1 1 1 1 1 -1 1 1 1 -1 -1 1 -1 -1 -1 % 1 -1 -1

Answers (1)

sorry; I forgot the wrong output: resceivedBits = 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 0 1 1 0 1 0 1
errors is about 50%

Asked:

on 20 Jul 2016

Answered:

on 20 Jul 2016

Community Treasure Hunt

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

Start Hunting!