Main Content

dvbrcs2BitRecover

Recover bits for DVB-RCS2 waveform

Since R2021b

    Description

    [bits,framePDUErr] = dvbrcs2BitRecover(rxdata,cfgrx,nvar) recovers frame protocol data unit (PDU), bits, and the frame PDU cyclic redundancy check (CRC) status, framePDUErr. Input rxdata is the received complex in-phase quadrature (IQ) symbols in the form of bursts of a Digital Video Broadcasting Second Generation Return Channel over Satellite (DVB-RCS2) transmission. cfgrx is the recovery configuration object, dvbrcs2RecoveryConfig. nvar is the noise variance estimate that the function uses to calculate soft bits.

    The function supports demodulation and decoding of the turbo codes with linear modulation (TC-LM), and spread spectrum and turbo codes with linear modulation (SS-TC-LM) transmission formats, with all three PDU types (logon, control, and traffic), for reference and custom waveforms.

    example

    Examples

    collapse all

    Recover the frame PDU for a DVB-RCS2 reference waveform.

    Set the properties of a DVB-RCS2 waveform generator System object™.

    wg = dvbrcs2WaveformGenerator;
    wg.TransmissionFormat = "SS-TC-LM";
    wg.WaveformID = 7;
    wg.SamplesPerSymbol = 2;

    Generate a frame PDU.

    framePDU = randi([0 1],wg.FramePDULength,1);

    Generate the DVB-RCS2-based burst symbols.

    txWaveform = wg(framePDU);

    Add additive white Gaussian noise (AWGN) to the generated waveform.

    sps = wg.SamplesPerSymbol; 
    EsNodB = 1;
    snrdB = EsNodB - 10*log10(sps);
    rxIn = awgn(txWaveform,snrdB,"measured");

    Create and then configure the DVB-RCS2 recovery configuration object.

    cfg = dvbrcs2RecoveryConfig;
    cfg.TransmissionFormat = wg.TransmissionFormat;
    cfg.WaveformID = wg.WaveformID;

    Create a raised cosine receiver filter.

    rxFilter = comm.RaisedCosineReceiveFilter( ...
                     'RolloffFactor',0.2, ...
                     'InputSamplesPerSymbol',sps, ...
                     'DecimationFactor',sps);
    span = rxFilter.FilterSpanInSymbols;

    Apply matched filtering and remove the filter delay.

    filtOut = rxFilter([rxIn; ...
                   complex(zeros(span/2*sps,1))]);
    rxSymb = filtOut(span+1:end);

    Recover user packets. Display the frame PDU cyclic redundancy check (CRC) status and the numbers of bit errors.

    [rxOut,pduErr] = dvbrcs2BitRecover(rxSymb,cfg,10^(-EsNodB/10));
    fprintf("Erroneous frame PDU = %d\n", pduErr)
    Erroneous frame PDU = 0
    
    fprintf("Number of bit errors = %d\n", sum(framePDU~=rxOut))
    Number of bit errors = 0
    

    Recover the frame PDU for a DVB-RCS2 custom waveform.

    Set the properties of the DVB-RCS2 waveform generator System object™.

    wg = dvbrcs2WaveformGenerator;
    wg.IsCustomWaveform = true;
    wg.PayloadLengthInBytes = 115;
    wg.MappingScheme = "8PSK";
    wg.CodeRate = "2/3";
    wg.PermutationParameters = [29 6 5 0 0];
    wg.UniqueWord = "3ACF08B13076";

    Get the characteristic information about the DVB-RCS2 waveform generator.

    info(wg)
    ans = struct with fields:
                  BurstLength: 476
         PayloadLengthInBytes: 115
                MappingScheme: "8PSK"
                     CodeRate: "2/3"
               PreambleLength: 8
              PostambleLength: 8
                  PilotPeriod: 0
             PilotBlockLength: 1
        PermutationParameters: [29 6 5 0 0]
                   UniqueWord: "3ACF08B13076"
                     PilotSum: 0
    
    

    Generate a frame PDU.

    framePDU = randi([0 1],wg.FramePDULength,1);

    Generate the DVB-RCS2-based burst symbols.

    txWaveform = wg(framePDU);

    Add additive white Gaussian noise (AWGN) to the generated waveform.

    sps = wg.SamplesPerSymbol; 
    EsNodB = 9;
    snrdB = EsNodB - 10*log10(sps);
    rxIn = awgn(txWaveform,snrdB,'measured');

    Configure the DVB-RCS2 recovery configuration object.

    cfg = dvbrcs2RecoveryConfig;
    cfg.IsCustomWaveform = true;
    cfg.MappingScheme = wg.MappingScheme;
    cfg.CodeRate = wg.CodeRate;
    cfg.PermutationParameters = wg.PermutationParameters;

    Get burst parameters from waveform generator info method.

    burstParams = info(wg);
    cfg.BurstLength = burstParams.BurstLength;

    Create a raised cosine receiver filter.

    rxFilter = comm.RaisedCosineReceiveFilter( ...
        'RolloffFactor',0.2, ...
        'InputSamplesPerSymbol',sps,...
        'DecimationFactor',sps);
    span = rxFilter.FilterSpanInSymbols;

    Apply matched filtering and remove the filter delay.

    filtOut = rxFilter([rxIn; ...
        complex(zeros(span/2*sps,1))]);
    rxSymb = filtOut(span+1:end);

    Recover user packets. Display the frame PDU cyclic redundancy check (CRC) status and the numbers of bit errors.

    [rxOut,pduErr] = dvbrcs2BitRecover(rxSymb,cfg,10^(-EsNodB/10));
    fprintf('Erroneous frame PDU = %d\n', pduErr)
    Erroneous frame PDU = 0
    
    fprintf('Number of bit errors = %d\n', sum(framePDU~=rxOut))
    Number of bit errors = 0
    

    Recover the frame PDU for a DVB-RCS2 waveform with specified burst configuration parameters.

    Set the burst configuration parameters.

    Rsym = 1e6;                   % Symbol rate (1 Msps)
    tSlot = 2.11e-3;              % Burst time slot duration (2.11 ms)
    preBurstGuardOffset = 20e-6;  % 20 microsecond
    waveId = 39;                  % Waveform ID

    Set the properties of the DVB-RCS2 waveform generator System object™.

    wg = dvbrcs2WaveformGenerator;
    wg.WaveformID = waveId;        % QPSK 6/7

    Compute the burst parameters in terms of symbols.

    wg.PreBurstGuardLength = ceil(preBurstGuardOffset*Rsym);
    params = info(wg);
    burstPayLoadDuration = params.BurstLength/Rsym;
    burstPostGuard = ceil((tSlot-preBurstGuardOffset-burstPayLoadDuration)*Rsym);
    wg.PostBurstGuardLength = burstPostGuard;

    Generate the frame PDU.

    framePDU = randi([0 1],wg.FramePDULength,1);

    Generate the DVB-RCS2-based burst symbols

    txWaveform = wg(framePDU);

    Add additive white Gaussian noise (AWGN) to the generated waveform.

    sps = wg.SamplesPerSymbol;
    EsNodB = 7;
    snrdB = EsNodB - 10*log10(sps);
    rxIn = awgn(txWaveform,snrdB,'measured');

    Configure the DVB-RCS2 recovery configuration object.

    cfg = dvbrcs2RecoveryConfig;
    cfg.WaveformID = wg.WaveformID;

    Initialize a raised cosine receiver filter.

    rxFilter = comm.RaisedCosineReceiveFilter( ...
        'RolloffFactor', 0.20, ...
        'InputSamplesPerSymbol', sps, 'DecimationFactor', sps);
    span = rxFilter.FilterSpanInSymbols;

    Apply matched filtering and remove the filter delay

    rxBurst = rxIn(wg.PreBurstGuardLength*sps+1:end-wg.PostBurstGuardLength*sps);
    filtOut = rxFilter([rxBurst; ...
        complex(zeros(span/2*sps,1))]);
    rxSymb = filtOut(span+1:end);

    Recover user packets. Display the frame PDU cyclic redundancy check (CRC) status and the numbers of bit errors.

    [rxOut, pduErr] = dvbrcs2BitRecover(rxSymb, cfg, 10^(-EsNodB/10));
    fprintf('Erroneous frame PDU = %d\n', pduErr)
    Erroneous frame PDU = 0
    
    fprintf('Number of bit errors = %d\n', sum(rxOut~=framePDU))
    Number of bit errors = 0
    

    Input Arguments

    collapse all

    Received complex IQ symbols, specified as a column vector. rxdata must contain only one burst.

    The type of waveform determines the length of rxdata.

    • Reference waveform — For set values of the TransmissionFormat and WaveformID properties of the dvbrcs2WaveformGenerator System object™, the length of input rxdata must be equal to the burst length parameter specified in ETSI EN 301 545-2 V1.2.1 (2014-11) Table A-1 and A-2 [1].

    • Custom waveform — The length must be equal to the value of BurstLength property of the dvbrcs2RecoveryConfig object.

    Data Types: double
    Complex Number Support: Yes

    DVB-RCS2 recovery configuration object, specified as a dvbrcs2RecoveryConfig object. The properties of this object specify the transmission parameters of the received waveform and the decoding parameters for the recovery of the data.

    Noise variance estimate, specified as a nonnegative scalar. The function uses nvar as a scaling factor to calculate the soft bits from the IQ symbols.

    When you specify nvar as 0, the function uses a value of 1e-5, which corresponds to a signal-to-noise ratio (SNR) of 50 dB.

    Data Types: double

    Output Arguments

    collapse all

    Recovered frame PDU data bits, returned as a column vector.

    Data Types: int8

    Frame PDU CRC status, returned as a numeric or logical 1 (true) or 0 (false). A value of true indicates the frame is erroneous.

    Data Types: logical

    References

    [1] ETSI Standard EN 301 545-2 V1.2.1(2014-11). Digital Video Broadcasting (DVB); Second Generation Interactive Satellite Systems (DVB-RCS2); Part 2: Lower Layers for Satellite Standard.

    Extended Capabilities

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

    Version History

    Introduced in R2021b