Skip to content

Stanford University

Rate-Adaptive LDPC Accumulate Codes for Distributed Source Coding


Overview

Source code for rate-adaptive distributed source coding using low-density parity-check (LDPC) accumulate codes is now available for download. These codes are described in detail in our Signal Processing Journal paper (see publications). The encoding and decoding modules are written in C with Matlab wrapper functions, so that they can be compiled and called within Matlab. The code has been tested in Matlab 7 (Release 14) running on Windows XP.

Download

ldpca.zip (includes source and sample LDPC accumulate codes)

Usage

To compile in Matlab, type:
>> mex encodeBits.c
>> mex decodeBits.c

To run a sample trial, type:
>> example

Sample LDPC accumulate codes

Included in this archive are four data files of LDPC accumulate code sequences. The code parameters for each file are specified below. Note that the source rate of a particular code is the number of bits of the accumulated syndrome transmitted for that code divided by the total blocklength of the source.

396_regDeg3.lad

396_irregDeg2to8.lad

Degree
Fraction of nodes
2
0.321
3
0.456
6
0.010
7
0.174
8
0.039

6336_regDeg3.lad

6336_irregDeg2to21.lad

Degree
Fraction of nodes
2
0.316
3
0.415
7
0.128
8
0.069
19
0.020
21
0.052

The .lad file format

A .lad file describes a sequence of rate-adaptive LDPC accumulate codes of increasing source rate. Each code is specified by a sparse representation of its parity-check matrix H (in terms of arrays ir and jc). For more information on ir and jc, refer to the Matlab External Interfaces Reference for mxSetIr() and mxSetJc().

With the following parameters,

Parameter
Type
Description
numCodesintnumber of codes in sequence
nintblocklength of code in bits
(fixed across codes)
numEdgesintnumber of ones in H
(fixed across codes)
periodintlength of transmission pattern
jcint[n+1]cumulative sum of column sum of H
(fixed across codes)
numTxBitsintnumber of bits sent per period
(varies across codes)
txSubseqint[numTxBits]indices of bits sent in each period
(varies across codes)
irint[numEdges]row indices of ones in H
(varies across codes)

the .lad file format is described as

     numCodes n numEdges period
     jc
     for each code
        numTxBits
        txSubseq
        ir
     end

Custom LDPC accumulate codes

Building a .lad file for a custom LDPC accumulate code sequence is a two step process.

  1. Create the lowest source rate code with desired blocklength, source rate and source node degree distribution, using Progressive Edge Growth (PEG) software (by Xiao-Yu Hu) available at http://www.inference.phy.cam.ac.uk/mackay/PEG_ECC.html
  2. Generate the sequence of LDPC accumulate codes in .lad format using the peg2lad.m Matlab script supplied in this archive.

As written, peg2lad.m will generate a sequence of LDPC accumulate codes of source rates 2/66, 3/66, 4/66, ... , 66/66. This requires the lowest source rate code to have blocklength equal to a multiple of 66 and source rate 2/66.