Distribution Matching Webdemo

Constant Composition Distribution Matching At Play.

On this site we provide an early beta version of online constant composition distribution matching (CCDM) demo that can be included into your existing Matlab simulation environment. It is intended to serve three purposes:
  • Get familiar with the benefits of probabilistic shaping for power efficient and rate-matched coding and modulation.
  • Reproduce existing results from published research work.
  • Start-off your own research on this exciting new topic.

The Matlab Package can be downloaded here:

Download WebDM

How it works

The employed algorithm is detailed in:

P. Schulte and G. Böcherer, “Constant Composition Distribution Matching,” IEEE Trans. Inform. Theory, vol. 62, no. 1, pp. 430–434, Jan. 2016.

Installation Instructions and Usage Example

Download the Shapecomm webdm package and unzip the corresponding zip file. After unpacking, the folder +shapecomm will be created. At this point, you are ready to start. If you want to access the package from any directory, the current directory has to be added to your MATLAB path permanently. This can be done by:

        >>> addpath(pwd);
        >>> savepath;

Here, >>> denotes your MATLAB prompt.

For the first run, we specify the properties of our DM object. In the following, we aim at having a 4-ary output alphabet and output length of 150 symbols, while ensuring a rate of 1.5 bits per output symbol:

        >>> M = 4;
        >>> n = 100;
        >>> rate = 1.5;
        >>> dm = shapecomm.webdm(M, n, rate);

The dm object now has the following properties:

  webdm with properties:

              k: 150
              n: 100
              M: 4
             pA: [4×1 double]
       type_seq: [4×1 double]
           host: 'http://dm.shapecomm.de'
    num_retries: 10

The properties have the following meaning:

  • k: number of input bits
  • n: number of output symbols
  • M: size of output alphabet (four amplitudes)
  • pA: empirical distribution on the output symbols
  • type_seq: number of occurances of each output symbol
  • host: server address
  • num_retries: retries for encode or decode queries (in case of interupted connections)

We then create uniform input bits and pass them to the encode function:

        >>> bits = randi([0 1], [dm.k 1]);
        >>> symbols = dm.encode(bits);
        >>> symbols

We can obtain the original bit-stream by passing the symbols to the DM decoder method:

        >>> bits_out = dm.decode(symbols);
        >>> sum(bits_out ~= bits)


The full documentation can be downloaded here:

Download WebDM Documentation