Main Content

ccsdsSCPPMDecode

Decode CCSDS-compliant SCPPM codes

Since R2022b

    Description

    example

    [decoded,crcErr] = ccsdsSCPPMDecode(code,r,m) decodes the soft bits in code using a Consultative Committee for Space Data Systems (CCSDS)-compliant serially concatenated pulse position modulation (SCPPM) decoder, as defined in the Coded Modulation for the Deep-Space Optical Channel, volume 42-161 section III.A [1]. r is the outer convolutional encoder code rate and m is the modulation order. The function returns the decoded data decoded which includes the cyclic redundancy check (CRC) and termination bits. The function also returns the CRC error status crcErr.

    [decoded,crcErr] = ccsdsSCPPMDecode(code,r,m,maxIter) also specifies the maximum number of decoding iterations.

    Examples

    collapse all

    Transmit CCSDS SCPPM encoded data over a noiseless channel, and then decode this data using a CCSDS SCPPM decoder with a maximum of eight decoding iterations.

    Encode a message using a CCSDS SCPPM encoder for a single frame. Use a comm.CRCGenerator System object™ to generate CRC code bits and append these bits to the input data.

    Note: As specified in CCSDS 142.0-B-1 section 3.6:

    • Fix the generator polynomial for the CRC algorithm to "x^32+x^29+x^18+x^14+x^3+1".

    • Set the initial states of the internal shift register to 1.

    infoSize = 7526;                       % Information block size without CRC
    crc32Generator = comm.CRCGenerator(...
             Polynomial = "x^32+x^29+x^18+x^14+x^3+1", ...
             InitialConditions = 1, ...
             DirectMethod = true);
    crcIn = randi([0 1],infoSize,1);
    crcOut = crc32Generator(crcIn);        % Codeword frame with CRC bits appended

    Add termination bits to terminate the outer convolutional encoder.

    msg = [crcOut; 0; 0];

    Specify the modulation order, and then encode the message using the CCSDS SCPPM encoder.

    mod = 6;
    [sym,info] = ccsdsSCPPMEncode(msg,mod);

    Display the outer convolutional encoder information info.

    info
    info = struct with fields:
               OuterEncoderCodeRate: "1/2"
        OuterEncoderPuncturePattern: [1 1 0 1 1 0]
    
    

    Modulate the data using the M-ary pulse position modulation (PPM) technique, and pass the modulated data through a noiseless channel.

    M = 2^mod;                               % M-ary PPM
    modData = zeros(length(sym)*M,1);
    mapIdx = (0:length(sym)-1)'*M + sym + 1; % Modulate data
    modData(mapIdx) = 1;
    code = 2*modData - 1;                    % Pass through noiseless channel

    Set the maximum number of decoding iterations to eight. Decode the encoded SCPPM data.

    maxIter = 8;
    r = info.OuterEncoderCodeRate;
    decoded = ccsdsSCPPMDecode(code,r,mod,maxIter);

    Display the total number of bit errors in the decoded data.

    fprintf("Number of bit errors = %f\n",sum(msg~=decoded));
    Number of bit errors = 0.000000
    

    Input Arguments

    collapse all

    Encoded soft bits, specified as a column vector.

    The function considers negative soft input bits to be 0s and positive soft input bits to be 1s.

    Data Types: double

    Outer convolutional encoder code rate, specified as "1/3", "1/2", or "2/3".

    Data Types: char | string

    Modulation order, specified as an integer in the range [2, 8]. This value specifies the number of bits mapped to one constellation symbol.

    Data Types: double | uint8

    Maximum number of decoding iterations, specified as a positive integer.

    Data Types: double | uint8

    Output Arguments

    collapse all

    Decoded information bits, returned as a binary column vector. This data includes CRC and termination bits.

    Data Types: int8

    CRC error status, returned as one of these numeric or logical values.

    • 0 (false) — Returned when early termination using CRC passes.

    • 1 (true) — Returned when CRC fails after completing the maximum number of decoding iterations.

    Data Types: logical

    References

    [1] Moision, B., and J. Hamkins. "Coded Modulation for the Deep-Space Optical Channel: Serially Concatenated Pulse-Position Modulation." The Interplanetary Network Progress Report, vol. 42-161 (May 15, 2005): 1–25. https://ipnpr.jpl.nasa.gov/progress_report/42-161/161T.pdf.

    [2] The Consultative Committee for Space Data Systems. Optical Communications Coding and Synchronization, Recommended Standard, Issue 1. CCSDS 142.0-B-1. Washington, D.C.: CCSDS, August 2019. https://public.ccsds.org/Pubs/142x0b1.pdf.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2022b