Main Content

dvbrcs2TurboEncode

Encode DVB-RCS2-compliant turbo codes

Since R2021b

    Description

    example

    code = dvbrcs2TurboEncode(msg,r,permparams) encodes the message msg by using a Digital Video Broadcasting Second Generation Return Channel over Satellite (DVB-RCS2) standard-compliant duo-binary turbo encoder, as defined in ETSI EN 301 545-2 V1.2.1 Section 7.3.5.1 [1]. r is the code rate, and permparams specifies the permutation control parameters that the function uses to interleave the input message. Output code contains the DVB-RCS2-encoded message.

    Examples

    collapse all

    Encode a message using a Digital Video Broadcasting Second Generation Return Channel over Satellite (DVB-RCS2) duo-binary turbo encoder, with constant code rate and frame length.

    Specify the frame length, code rate, and permutation control parameters.

    frameLen = 40*8;           % Payload length in bits
    r = "3/4";
    permParams = [17 9 5 14 1];

    Generate a column vector of random binary data.

    msg = randi([0 1],frameLen,1);

    Encode the message by using DVB-RCS2 turbo encoder.

    code = dvbrcs2TurboEncode(msg,r,permParams);

    Encode a message using a Digital Video Broadcasting Second Generation Return Channel over Satellite (DVB-RCS2) duo-binary turbo encoder, with variable code rates and frame lengths.

    Specify the frame lengths, code rates, and permutation control parameters.

    frameLen = [10*8 100*8 49*8];     % Payload length in bits
    r = {'1/3','1/2','2/3'};
    permParams = [31 1 3 4 2];

    Generate the column vectors of binary data and encode the message using DVB-RCS2 turbo encoder.

    % Initialize output as a 3-by-1 cell array
    code = cell(length(r),1);
    for frmIdx = 1:length(frameLen)
        msg = randi([0 1],frameLen(frmIdx),1);
        code{frmIdx} = dvbrcs2TurboEncode(msg,r{frmIdx},permParams);
    end

    Input Arguments

    collapse all

    Input message, specified as a binary-valued column vector. The length of this column vector must be in the range [1, 65,535] bytes.

    Data Types: double | int8 | logical

    Code rate, specified as one of these values.

    • "1/3"

    • "1/2"

    • "2/3"

    • "3/4"

    • "4/5"

    • "5/6"

    • "6/7"

    • "7/8"

    Data Types: char | string

    Permutation control parameters that the function uses to interleave the input message, specified as a vector of these five elements in order: P, Q0, Q1, Q2, and Q3. P must be in the range [9, 255], and Q0, Q1, Q2, and Q3 must be in the range [0, 15].

    To generate unique interleaver indices, the value of P must be coprime to half of the length of the input msg.

    Data Types: double | uint8

    Output Arguments

    collapse all

    DVB-RCS2-encoded message, returned as a binary-valued column vector. The data type of the code is same as that of the input msg.

    Data Types: double | int8 | logical

    References

    [1] EN 301 545-2 - V1.2.1. Digital Video Broadcasting (DVB); Second Generation DVB Interactive Satellite System (DVB-RCS2); Part 2: Lower Layers for Satellite standard (etsi.org).

    Extended Capabilities

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

    Version History

    Introduced in R2021b