メインコンテンツ

ldpcDecoderConfig

LDPC 復号化器の構成の作成

R2021b 以降

説明

ldpcDecoderConfig オブジェクトは、関数 ldpcDecode の構成オブジェクトです。このオブジェクトは、低密度パリティチェック (LDPC) 行列と、構成された行列に関する情報を提供する読み取り専用プロパティを指定します。

作成

説明

decodercfg = ldpcDecoderConfig は、WLAN 802.11™ 規格[1]で規定されている符号化率 5/6 の LDPC 符号を使用する LDPC 復号化器の構成オブジェクトを作成します。

decodercfg = ldpcDecoderConfig(H) は、ParityCheckMatrix プロパティ H を設定する出力オブジェクトを構成します。

decodercfg = ldpcDecoderConfig(H,alg) は、ParityCheckMatrix プロパティを H に、Algorithm プロパティを alg に設定する出力オブジェクトを構成します。

decodercfg = ldpcDecoderConfig(encodercfg) は、入力の ldpcEncoderConfig 構成オブジェクト encodercfg に基づいてプロパティを設定します。

decodercfg = ldpcDecoderConfig(encodercfg,alg) は、入力の ldpcEncoderConfig 構成オブジェクト encodercfg に基づいてプロパティを設定し、Algorithm プロパティを alg に設定します。

オブジェクト設定の検証は、オブジェクトを入力として関数 ldpcDecode が呼び出されたときに実行されます。

プロパティ

すべて展開する

パリティチェック行列。(N - K) 行 N 列のスパース logical 行列として指定します。ここで、N > K > 0 です。N は LDPC コードワード ブロックの長さです。K は LDPC コードワードの情報ビット数です。既定値は、WLAN 802.11 規格[1]で規定されている、ブロック長 648、符号化率 5/6 の LDPC 符号のパリティチェック行列です。具体的には、次のコードの関数 ldpcQuasiCyclicMatrix によって出力される 108 行 648 列のスパース logical 行列 H が既定値になります。

P = [
 17 13  8 21  9  3 18 12 10  0  4 15 19  2  5 10 26 19 13 13  1  0 -1 -1
  3 12 11 14 11 25  5 18  0  9  2 26 26 10 24  7 14 20  4  2 -1  0  0 -1
 22 16  4  3 10 21 12  5 21 14 19  5 -1  8  5 18 11  5  5 15  0 -1  0  0
  7  7 14 14  4 16 16 24 24 10  1  7 15  6 10 26  8 18 21 14  1 -1 -1  0
 ];
blockSize = 27;
H = ldpcQuasiCyclicMatrix(blockSize,P);

データ型: logical

LDPC 復号化アルゴリズム。次のいずれかの値として指定します。

データ型: char | string

この プロパティ は読み取り専用です。

LDPC コードワードのブロックの長さ (N)。正のスカラーとして指定します。N は、パリティチェック行列の列数と等しくなります。

データ型: double

この プロパティ は読み取り専用です。

LDPC コードワードの情報ビット数 (K)。正のスカラーとして指定します。K は、パリティチェック行列の列数からパリティチェック行列の行数を引いたものに等しくなります。

データ型: double

この プロパティ は読み取り専用です。

LDPC コードワードのパリティチェック ビットの数 (N - K)。正のスカラーとして指定します。N - K は、パリティチェック行列の行数と等しくなります。

データ型: double

この プロパティ は読み取り専用です。

LDPC 符号の符号化率。NumInformationBits/BlockLength と等しい正のスカラーとして指定します。

データ型: double

この プロパティ は読み取り専用です。

レイヤーごとの行数。正のスカラーとして指定します。このプロパティは、レイヤー復号化アルゴリズムを使用する場合のレイヤーごとの行数を示します。具体的には、ParityCheckMatrix を連続する部分行列に均等に分割し、その各部分行列のどの列にも 1 が最大 1 つ存在するような最大の整数がこのプロパティになります。

ParityCheckMatrix(1:NumRowsPerLayer,:)

ParityCheckMatrix((NumRowsPerLayer + 1):2*NumRowsPerLayer,:)

ParityCheckMatrix((2*NumRowsPerLayer + 1):3*NumRowsPerLayer,:)

...

ParityCheckMatrix((end - NumRowsPerLayer + 1):end, :)

依存関係

このプロパティは、Algorithm プロパティを 'layered-bp''norm-min-sum'、または 'offset-min-sum' に設定した場合に表示されます。

データ型: double

出力引数

すべて展開する

LDPC 復号化器構成オブジェクト。構造体として返されます。

データ型: struct

すべて折りたたむ

IEEE® 802.11 で指定された符号化率 3/4 の LDPC 符号を構成するために、プロトタイプ行列とブロック サイズのパラメーターを初期化します。関数 ldpcQuasiCyclicMatrix を使用して、パリティチェック行列を作成します。

P = [
    16 17 22 24  9  3 14 -1  4  2  7 -1 26 -1  2 -1 21 -1  1  0 -1 -1 -1 -1
    25 12 12  3  3 26  6 21 -1 15 22 -1 15 -1  4 -1 -1 16 -1  0  0 -1 -1 -1
    25 18 26 16 22 23  9 -1  0 -1  4 -1  4 -1  8 23 11 -1 -1 -1  0  0 -1 -1
     9  7  0  1 17 -1 -1  7  3 -1  3 23 -1 16 -1 -1 21 -1  0 -1 -1  0  0 -1
    24  5 26  7  1 -1 -1 15 24 15 -1  8 -1 13 -1 13 -1 11 -1 -1 -1 -1  0  0
     2  2 19 14 24  1 15 19 -1 21 -1  2 -1 24 -1  3 -1  2  1 -1 -1 -1 -1  0
    ];
blockSize = 27;
pcmatrix = ldpcQuasiCyclicMatrix(blockSize,P);

LDPC 符号化器と LDPC 復号化器の構成オブジェクトを作成し、それらのプロパティを表示します。

cfgLDPCEnc = ldpcEncoderConfig(pcmatrix)
cfgLDPCEnc = 
  ldpcEncoderConfig with properties:

     ParityCheckMatrix: [162×648 logical]

   Read-only properties:
           BlockLength: 648
    NumInformationBits: 486
    NumParityCheckBits: 162
              CodeRate: 0.7500

cfgLDPCDec = ldpcDecoderConfig(pcmatrix)
cfgLDPCDec = 
  ldpcDecoderConfig with properties:

     ParityCheckMatrix: [162×648 logical]
             Algorithm: 'bp'

   Read-only properties:
           BlockLength: 648
    NumInformationBits: 486
    NumParityCheckBits: 162
              CodeRate: 0.7500

LDPC 符号化され、M-QAM 変調されたビット ストリームを AWGN チャネル経由で送信します。信号を復調し、受信コードワードを復号化してから、ビット エラーをカウントします。for ループを使用し、送信データの LDPC 前方誤り訂正 (FEC) 符号化がある場合とない場合について、複数の SNR 設定を処理します。

M = 64;
maxnumiter = 10;
snr = [0.5 1 1.5 2];
numframes = 20000;

for ii = 1:length(snr)
    data = randi([0 1],cfgLDPCEnc.NumInformationBits,numframes,'int8');

    % Transmit and receive with LDPC coding
    encodedData = ldpcEncode(data,cfgLDPCEnc);
    modSignal = qammod(encodedData,M,InputType='bit');
    [rxsig, noisevar] = awgn(modSignal,snr(ii));
    llrOut = qamdemod(rxsig,M, ...
        OutputType='approxllr', ... % Or use 'llr' for exact but slower LLR calculation
        NoiseVariance=noisevar);
    rxbits = ldpcDecode(llrOut,cfgLDPCDec,maxnumiter);
    fprintf(['SNR = %2.1f\n   Coded: Error rate = %1.6f, ' ...
        'Number of errors = %d\n'], ...
        snr(ii),nnz(data~=rxbits)/numel(data),nnz(data~=rxbits));

    % Transmit and receive with no LDPC coding
    noCoding = qammod(data,M,InputType='bit');
    rxNoCoding = awgn(noCoding,snr(ii));
    rxBitsNoCoding = qamdemod(rxNoCoding,M,OutputType='bit');

    fprintf(['Noncoded: Error rate = %1.6f, ' ...
        'Number of errors = %d\n\n'], ...
        nnz(data~=rxBitsNoCoding)/numel(data),nnz(data~=rxBitsNoCoding))
end
SNR = 0.5
   Coded: Error rate = 0.000441, Number of errors = 4282
Noncoded: Error rate = 0.039045, Number of errors = 379515
SNR = 1.0
   Coded: Error rate = 0.000062, Number of errors = 604
Noncoded: Error rate = 0.032813, Number of errors = 318941
SNR = 1.5
   Coded: Error rate = 0.000003, Number of errors = 27
Noncoded: Error rate = 0.027001, Number of errors = 262450
SNR = 2.0
   Coded: Error rate = 0.000000, Number of errors = 0
Noncoded: Error rate = 0.021778, Number of errors = 211686

アルゴリズム

すべて展開する

以下のメッセージ伝達アルゴリズムのいずれかを使用する LDPC 復号化。

参照

[1] IEEE® Std 802.11-2020 (Revision of IEEE Std 802.11-2016). "Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications." IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.

[2] Gallager, Robert G. Low-Density Parity-Check Codes. Cambridge, MA: MIT Press, 1963.

[3] Hocevar, D.E. "A reduced complexity decoder architecture via layered decoding of LDPC codes." In IEEE Workshop on Signal Processing Systems, 2004. SIPS 2004, 107-112. https://doi.org/10.1109/SIPS.2004.1363033.

[4] Chen, Jinghu, R.M. Tanner, C. Jones, and Yan Li. "Improved min-sum decoding algorithms for irregular LDPC codes." In Proceedings. International Symposium on Information Theory, 2005. ISIT 2005. https://doi.org/10.1109/ISIT.2005.1523374.

拡張機能

すべて展開する

C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。

バージョン履歴

R2021b で導入