why unquantized comm.ViterbiDecoder gives bits with errors when the modulation is 1-2*encodedBits with 100dB say; the code is as follow:
Afficher commentaires plus anciens
% 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
Réponses (1)
Babiker Abdallah
le 20 Juil 2016
0 votes
Catégories
En savoir plus sur Error Detection and Correction dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!