繁体   English   中英

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

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

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

“奇偶校验矩阵H的最后N−K列必须是GF(2)的可逆矩阵”

事实上,对于大多数 LDPC 码来说,这个条件并不容易满足,尽管我们知道奇偶校验矩阵H中至少有一个(NM) × (NM)逆子块,如果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

暂无
暂无

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

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