简体   繁体   English

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

[英]Parity check matrix of LDPC encoder and decoder in Matlab

MATLAB provides powerful LDPC encoder and decoder objects in the latest versions. MATLAB 在最新版本中提供了强大的 LDPC 编码器和解码器对象。 However the parity check matrix H , with dimension (NK) by N , needs to satisfy the following condition:然而,维数(NK)N的奇偶校验矩阵H需要满足以下条件:

"The last N−K columns in the parity check matrix H must be an invertible matrix in GF(2) " “奇偶校验矩阵H的最后N−K列必须是GF(2)的可逆矩阵”

Indeed, this condition is not easy to be satisfied for most LDPC codes, although we know that there is at least one (NM) by (NM) invertible sub-block in the parity check matrix H , if H is with a full rank.事实上,对于大多数 LDPC 码来说,这个条件并不容易满足,尽管我们知道奇偶校验矩阵H中至少有一个(NM) × (NM)逆子块,如果H是满秩的。

I want to know that, if there exists a fast algorithm or a MATLAB function, which can find out an invertible sub-block in H provided H is with a full rank.我想知道,如果存在快速算法或MATLAB函数,可以在H找到一个可逆子块,前提是H是满秩的。 So that we can use the MATLAB objects and Simulink blocks conveniently.以便我们可以方便地使用 MATLAB 对象和 Simulink 模块。

I tried repermuting the columns of H matrix until it matches the Malab我尝试重新排列 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM