Matlab中LDPC编解码器的奇偶校验矩阵

Parity check matrix of LDPC encoder and decoder in Matlab

MATLAB 在最新版本中提供了强大的 LDPC 编码器和解码器对象。然而奇偶校验矩阵H,维度(N-K)乘以N,需要满足以下条件:

"The last N−K columns in the parity check matrix H must be an invertible matrix in GF(2)"

的确,对于大多数LDPC码来说,这个条件是不容易满足的,虽然我们知道奇偶校验矩阵中至少有一个(N-M) by (N-M)可逆子块H,如果H满级。

我想知道,如果存在快速算法或MATLAB函数,可以在H中找到一个可逆子块,前提是H是满秩的。方便我们使用MATLAB对象和Simulink模块。

我尝试重新排列 H 矩阵的列,直到它匹配 Malab

% Programmer: Taha Valizadeh
% Date: September 2016

%% Column Permutation
% Permute columns of a binary Matrix until the rightmost square matrix is
% invertible over GF(2)

% matrix dimensions:
[~, n] = size(H);

% Initialization
HInvertible = H;
PermutorIndex = 1:n;
flag = true;
counter = 0;

% Initial Report
disp('Creating a ParityCheck matrix which is suitable for MATLAB COMM Tollbox')

% Permute columns
while flag

    % Check if the rightmost square matrix is invertible over GF(2)
    try

        EncoderObject = comm.LDPCEncoder(sparse(HInvertible));  
                                % Check if new matrix works
        fprintf(['ParityCheck Matrix become suitable for Matlab LDPC Encoder ',...
            'after ',num2str(counter),' permutations!\n'])
        flag = false;           % Break the loop

    catch

        % Choose different columns for the rightmost part of matrix
        counter = counter+1;    %Permutation Counter
        PermutorIndex = randperm(n);
        HInvertible = H(:,PermutorIndex);

    end

end