How to implement SOVA algorithm

조회 수: 28 (최근 30일)
MisterTellini
MisterTellini 2015년 4월 13일
Good morning all,
I'm desperate looking up for a proper way to implement SOVA algorithm in my final degree project.
Some time ago I happened to find this solution:
But I still don't know how to implement it (I'm a bit dumb using Matlab)...
Please, could you be so kind to help me? I'd really appreciate it, since I have two months remaining to finish it.
Thank you in advance!

답변 (1개)

vansh gandhi
vansh gandhi 2023년 6월 23일
The Soft Output Viterbi Algorithm (SOVA) is an extension of the Viterbi algorithm used in digital communications and signal processing. It is primarily employed in decoding convolutional codes, which are error-correcting codes widely used in various communication systems.
The Viterbi algorithm is a maximum likelihood decoding algorithm that allows for the recovery of the most likely transmitted data sequence by examining received noisy data. However, the Viterbi algorithm typically provides hard decisions, meaning it outputs a binary sequence (0s and 1s) as the decoded result.
Here's an example MATLAB code implementation of the Soft Output Viterbi Algorithm (SOVA) for decoding a convolutional code. This implementation assumes that the input data is a sequence of binary values and the convolutional code has a rate of 1/2.
% Convolutional Code Parameters
constraintLength = 3; % Constraint length of the code
generatingPolynomials = [7 5]; % Generator polynomials of the code
% SOVA Decoding Parameters
numStates = 2^(constraintLength-1); % Number of states in the trellis
numInputSymbols = 2; % Number of possible input symbols (binary code)
numOutputSymbols = 2; % Number of possible output symbols (binary code)
pathMetrics = zeros(numStates, 1); % Initialize path metrics
softOutputs = zeros(numStates, numOutputSymbols); % Initialize soft outputs
% Initialize the trellis diagram
trellis = poly2trellis(constraintLength, generatingPolynomials);
% Generate the branch metric table
branchMetrics = zeros(numStates, numInputSymbols, numOutputSymbols);
for currentState = 0:numStates-1
for inputSymbol = 0:numInputSymbols-1
nextState = mod(currentState * 2 + inputSymbol, numStates);
outputSymbols = mod(convenc(de2bi(inputSymbol, log2(numInputSymbols)), trellis), 2);
for outputSymbol = 0:numOutputSymbols-1
branchMetrics(currentState+1, inputSymbol+1, outputSymbol+1) = ...
sum(outputSymbols ~= de2bi(outputSymbol, log2(numOutputSymbols)));
end
end
end
% Received data sequence (example)
receivedData = [0 0 1 1 1 0 1 1 0 1];
% Initialization
currentState = 0;
decodedBits = zeros(1, length(receivedData) / log2(numInputSymbols));
decodedSoftOutputs = zeros(1, length(receivedData) / log2(numInputSymbols));
% SOVA Decoding
for idx = 1:length(receivedData)
receivedSymbol = receivedData(idx) + 1;
% Update path metrics
updatedMetrics = pathMetrics + branchMetrics(:, :, receivedSymbol);
% Select the survivor path with minimum metric
[minMetric, survivorState] = min(updatedMetrics);
% Update the path metrics and soft outputs
pathMetrics = minMetric;
softOutputs = softOutputs(:, :, survivorState);
% Update decoded bits and soft outputs
if mod(idx, log2(numInputSymbols)) == 0
decodedBits(idx / log2(numInputSymbols)) = mod(survivorState, 2);
decodedSoftOutputs(idx / log2(numInputSymbols)) = softOutputs(survivorState+1);
end
% Update the survivor state for the next iteration
currentState = mod(survivorState * 2 + receivedSymbol - 1, numStates);
end
% Display the decoded bits and soft outputs
disp("Decoded Bits:");
disp(decodedBits);
disp("Decoded Soft Outputs:");
disp(decodedSoftOutputs);

카테고리

Help CenterFile Exchange에서 Error Detection and Correction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by