dvbsPLHeaderRecover
Description
recovers the physical layer (PL) signaling information from the PL header
phyparams
= dvbsPLHeaderRecover(rxplheader
,Mode
=mode)rxplheader
of the Digital Video Broadcasting Satellite Second
Generation (DVB-S2) or Digital Video Broadcasting Satellite Second Generation extended
(DVB-S2X) frame. The function uses the specified mode of operation Mode
for PL header recovery and outputs the decoded parameters
phyparams
.
Examples
Recover Physical Layer Information for DVB-S2 Frame
Recover physical layer (PL) signaling information for a given DVB-S2 frame.
Load a MAT file containing DVB-S2 LDPC parity matrices. If the MAT file is not available on the MATLAB® path, use these commands to download and unzip the MAT file.
if ~exist('dvbs2xLDPCParityMatrices.mat','file') if ~exist('s2xLDPCParityMatrices.zip','file') url = 'https://ssd.mathworks.com/supportfiles/spc/satcom/DVB/s2xLDPCParityMatrices.zip'; websave('s2xLDPCParityMatrices.zip',url); unzip('s2xLDPCParityMatrices.zip'); end addpath('s2xLDPCParityMatrices'); end
Specify the number of PL frames per stream.
nFrames = 2;
Create bit vector of information bits, data
, of concatenated TS UPs.
s2WaveGen = dvbs2WaveformGenerator; syncBits = [0 1 0 0 0 1 1 1]'; % Sync byte for TS packet is 47 Hex pktLen = 1496; % UP length without sync bits is 1496 numPkts = s2WaveGen.MinNumPackets*nFrames; txRawPkts = randi([0 1],pktLen,numPkts); txPkts = [repmat(syncBits,1,numPkts); txRawPkts]; data = txPkts(:);
Generate the DVB-S2 time-domain waveform using the input information bits. Flush the transmit filter to handle the filter delay and recover the complete last frame.
txWaveform = [s2WaveGen(data); flushFilter(s2WaveGen)];
Add additive white Gaussian noise (AWGN) to the generated waveform.
sps = s2WaveGen.SamplesPerSymbol;
EsNodB = 1;
snrdB = EsNodB - 10*log10(sps);
rxIn = awgn(txWaveform,snrdB,"measured");
Create a raised cosine receiver filter.
rxFilter = comm.RaisedCosineReceiveFilter( ... RolloffFactor=s2WaveGen.RolloffFactor, ... InputSamplesPerSymbol=sps, ... DecimationFactor=sps); s = coeffs(rxFilter); rxFilter.Gain = sum(s.Numerator);
Apply matched filtering and remove the filter delay.
filtOut = rxFilter(rxIn); rxFrame = filtOut(rxFilter.FilterSpanInSymbols+1:end);
Recover the PL information using the PL header of length 90 symbols.
headerStartIndex = 1; headerEndIndex = 90; rxPLHeader = rxFrame(headerStartIndex:headerEndIndex); phyParams = dvbsPLHeaderRecover(rxPLHeader(:), ... Mode="DVB-S2/S2X regular")
phyParams = struct with fields:
ModulationOrder: 4
FECFrameLength: 64800
LDPCCodeIdentifier: "1/4"
PLSDecimalCode: 4
TimeSlicingNumber: -1
CanonicalMODCODName: ""
HasPilots: 0
IsDummyFrame: 0
Recover Physical Layer Information for DVB-S2X Wideband Frame
Recover PL signaling information for a given DVB-S2X wideband frame.
Load a MAT file containing DVB-S2X LDPC parity matrices. If the MAT file is not available on the MATLAB path, use these commands to download and unzip the MAT file.
if ~exist('dvbs2xLDPCParityMatrices.mat','file') if ~exist('s2xLDPCParityMatrices.zip','file') url = 'https://ssd.mathworks.com/supportfiles/spc/satcom/DVB/s2xLDPCParityMatrices.zip'; websave('s2xLDPCParityMatrices.zip',url); unzip('s2xLDPCParityMatrices.zip'); end addpath('s2xLDPCParityMatrices'); end
Specify the number of PL frames per stream. Create a DVB-S2X System object™ and set its properties.
nFramesPerStream = 1; s2xWaveGen = dvbs2xWaveformGenerator(NumInputStreams=5, ... PLSDecimalCode=[140 132 133 141 132], ... DFL=[37168 18448 18448 37168 18448], ... StreamFormat="GS",HasTimeSlicing=true);
Create a bit vector of information bits for each stream.
data = cell(s2xWaveGen.NumInputStreams,1); for i = 1:s2xWaveGen.NumInputStreams data{i} = randi([0 1],s2xWaveGen.DFL(i)*nFramesPerStream,1); end
Generate DVB-S2X waveform. Flush the transmit filter to handle the filter delay and recover the complete last frame.
txWaveform = [s2xWaveGen(data); flushFilter(s2xWaveGen)];
Add AWGN noise to the generated waveform.
sps = 4; % Samples per symbol EsNodB = 4; snrdB = EsNodB - 10*log10(sps); rxWaveform = awgn(txWaveform,snrdB,"measured");
Create a raised cosine receiver filter. Apply matched filtering and remove the filter delay.
rxFilter = comm.RaisedCosineReceiveFilter( ... RolloffFactor=s2xWaveGen.RolloffFactor, ... InputSamplesPerSymbol=sps,DecimationFactor=sps); s = coeffs(rxFilter); rxFilter.Gain = sum(s.Numerator); % Matched filtering and filter delay removal filtOut = rxFilter(rxWaveform); rxSymb = filtOut(rxFilter.FilterSpanInSymbols+1:end);
Recover the MODCOD and other PL signaling information for the first DVB-S2X wideband stream. Length of PL header is 180 symbols.
headerStartIndex = 1; headerEndIndex = 180; rxPLHeader = rxSymb(headerStartIndex:headerEndIndex); phyParams = dvbsPLHeaderRecover(rxPLHeader(:), ... Mode="DVB-S2X wideband")
phyParams = struct with fields:
ModulationOrder: 8
FECFrameLength: 64800
LDPCCodeIdentifier: "104/180"
PLSDecimalCode: 140
TimeSlicingNumber: 1
CanonicalMODCODName: ""
HasPilots: 0
IsDummyFrame: 0
Recover Physical Layer Information for DVB-S2X VL-SNR Frame
Recover PL signaling information for a given DVB-S2X VL-SNR frame.
Load a MAT file containing DVB-S2X LDPC parity matrices. If the MAT file is not available on the MATLAB path, use these commands to download and unzip the MAT file.
if ~exist('dvbs2xLDPCParityMatrices.mat','file') if ~exist('s2xLDPCParityMatrices.zip','file') url = 'https://ssd.mathworks.com/supportfiles/spc/satcom/DVB/s2xLDPCParityMatrices.zip'; websave('s2xLDPCParityMatrices.zip',url); unzip('s2xLDPCParityMatrices.zip'); end addpath('s2xLDPCParityMatrices'); end
Specify the number of PL frames per stream. Create DVB-S2X System object™ and set its properties.
nFrames = 1; s2xWaveGen = dvbs2xWaveformGenerator(PLSDecimalCode=129, ... CanonicalMODCODName="QPSK 2/9",DFL=14128, ... PLScramblingIndex=4);
Create a bit vector with concatenated transport streams user packets.
syncBits = [0 1 0 0 0 1 1 1]'; % Sync byte for TS packet is 47 Hex pktLen = 1496; % UP length without sync bits is 1496 numPkts = s2xWaveGen.MinNumPackets*nFrames; txRawPkts = randi([0 1],pktLen,numPkts(1)); txPkts = [repmat(syncBits,1,numPkts(1)); txRawPkts]; data = txPkts(:);
Generate a DVB-S2X VL-SNR transmit waveform. Flush the transmit filter to handle the filter delay and recover the complete last frame.
txWaveform = [s2xWaveGen(data); flushFilter(s2xWaveGen)];
Add AWGN noise to the generated waveform.
sps = 4; % Samples per symbol EsNodB = -6; snrdB = EsNodB - 10*log10(sps); rxWaveform = awgn(txWaveform,snrdB,"measured");
Create a raised cosine receiver filter. Apply matched filtering and remove the filter delay.
rxFilter = comm.RaisedCosineReceiveFilter( ... RolloffFactor=s2xWaveGen.RolloffFactor, ... InputSamplesPerSymbol=sps,DecimationFactor=sps); s = coeffs(rxFilter); rxFilter.Gain = sum(s.Numerator); % Matched filtering and filter delay removal filtOut = rxFilter(rxWaveform); rxSymb = filtOut(rxFilter.FilterSpanInSymbols+1:end);
Recover the MODCOD and other PL signaling information for the first DVB-S2X VL-SNR stream. The length of the PL header is 990 symbols.
headerStartIndex = 1; headerEndIndex = 990; rxPLHeader = rxSymb(headerStartIndex:headerEndIndex); phyParams = dvbsPLHeaderRecover(rxPLHeader(:), ... Mode="DVB-S2X vl-snr")
phyParams = struct with fields:
ModulationOrder: 4
FECFrameLength: 64800
LDPCCodeIdentifier: "2/9"
PLSDecimalCode: 129
TimeSlicingNumber: -1
CanonicalMODCODName: "QPSK 2/9"
HasPilots: 1
IsDummyFrame: 0
Input Arguments
rxplheader
— PL header to decode
column vector
PL header to decode, specified as a column vector. The specified PL header must come from a DVB-S2 or DVB-S2X frame.
When you set
rxplheader
to a length of 90 symbols andMode
to"DVB-S2/S2X regular"
,dvbsPLHeaderRecover
function assesses the header as a DVB-S2 or DVB-S2X regular mode header, or as a PL header of a noise-affected very low signal-to-noise ratio (VL-SNR) frame.When you set
rxplheader
to a length of 900 or 990 symbols andMode
to"DVB-S2X vl-snr"
,dvbsPLHeaderRecover
function assesses the header as a DVB-S2X VL-SNR frame header.When you set
rxplheader
to a length of 180 symbols andMode
to"DVB-S2X wideband"
,dvbsPLHeaderRecover
function assesses the header as a DVB-S2X wideband frame header.
Data Types: double
Mode
— Mode of operation for PL header decoding
"DVB-S2/S2X regular"
| "DVB-S2X vl-snr"
| "DVB-S2X wideband"
Mode of operation for PL header decoding, specified as "DVB-S2/S2X
regular"
, "DVB-S2X vl-snr"
, or "DVB-S2X
wideband"
.
Data Types: char
| string
Output Arguments
phyparams
— PL signaling information
structure
PL signaling information, returned as a structure with these fields.
Structure Field | Description |
---|---|
ModulationOrder | Modulation order of the forward error correction (FEC) symbols, returned as a value from the set {2, 4, 8, 16, 32, 64, 128, 256}. A value of |
FECFrameLength | Output length of the FEC encoder and input length to the low density parity-check (LDPC) decoder, in bits, returned as a value from the set {16200, 32400, 64800}. A value of |
LDPCCodeIdentifier | Output code rate of the LDPC encoder, returned as a string scalar or character array. |
PLSDecimalCode | Physical layer signaling decimal code encapsulated in the header, returned as an integer in the range [0, 255]. |
TimeSlicingNumber | Time slicing number of the wideband PL frame, returned as an integer in the range [0, 255]. This value denotes the service that the current PL frame belongs to, and identifies whether to further process the current PL frame. This field applies when you set |
CanonicalMODCODName | Canonical modulation scheme and code rate name, returned as a string scalar or character array. Valid
If the frame is not a VL-SNR frame, the output of this field is empty. This field applies when you set |
HasPilots | Pilot block indication, returned as
|
IsDummyFrame | Dummy frame indicator, returned as |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2024a
See Also
Functions
Objects
Topics
- End-to-End DVB-S2 Simulation with RF Impairments and Corrections
- End-to-End DVB-S2X Simulation with RF Impairments and Corrections for Regular Frames
- End-to-End DVB-S2X Simulation with RF Impairments and Corrections for VL-SNR Frames
- End-to-End DVB-S2X Simulation with RF Impairments and Corrections in Wideband Mode
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)