dvbs2WaveformGenerator
Description
The dvbs2WaveformGenerator
System object™ generates a Digital Video Broadcasting Satellite Second Generation (DVB-S2)
time-domain waveform consisting of a single or multiple physical layer frames. The object
implements the waveform generation aspects of ETSI EN 302 307-1 V1.4.1 (2014-11) [1].
To generate a DVB-S2 waveform:
Create the
dvbs2WaveformGenerator
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
creates a
default DVB-S2 waveform generator System object.s2waveGen
= dvbs2WaveformGenerator
sets properties using one or more name-value pairs. Enclose each property name in quotes.
For example, s2waveGen
= dvbs2WaveformGenerator(Name,Value
)dvbs2WaveformGenerator('NumInputStreams',4,'UPL',100)
specifies four input streams, each with a user packet length of 100 bits.
Properties
Unless otherwise indicated, properties are nontunable, which means you cannot change their
values after calling the object. Objects lock when you call them, and the
release
function unlocks them.
If a property is tunable, you can change its value at any time.
For more information on changing property values, see System Design in MATLAB Using System Objects.
StreamFormat
— Input stream format
"TS"
(default) | "GS"
Input stream format, specified as one of these values.
"TS"
— For transport stream format"GS"
— For generic stream format
Data Types: char
| string
NumInputStreams
— Number of input streams
1
(default) | integer in the range [1, 256]
Number of input streams, specified as an integer in the range [1, 256].
Data Types: double
UPL
— User packet length
0
(default) | nonnegative integer | vector of nonnegative integers
User packet (UP) length in bits, specified as one of these options.
Nonnegative integer — Use this option with single-input and multi-input streams. If you set the
NumInputStreams
property to a value greater than 1, the UP in each stream must be equal to the integer value of theUPL
property.Vector of nonnegative integers — Use this option with multi-input streams only. If you set the
NumInputStreams
property to a value greater than 1, the UP in each stream must be the size of the corresponding element in this vector. The length of this vector must be equal toNumInputStreams
.Note
When you specify
UPL
as a multi-input stream, all UPs must be either packetized or in a continuous stream. Mixing stream types is not supported.
The maximum value of UPL
as an integer scalar or an integer element in the row vector must be less than or equal to the corresponding DFL
property value.
For a generic continuous stream, set UPL
to 0
.
Dependencies
To enable this property, set the StreamFormat
property to "GS"
. If you set the StreamFormat
property to "TS"
, the UPL is fixed to 1504 bits.
Data Types: double
FECFrame
— FEC frame format
"normal"
(default) | "short"
Forward error correction (FEC) frame format, specified as one of these two options.
"normal"
— Sets the low density parity-check (LDPC) codeword length to 64,800 bits"short"
— Sets the LDPC codeword length to 16,200 bits
Tunable: Yes
Data Types: char
| string
MODCOD
— Modulation scheme and FEC rate
1
(default) | integer in the range [1, 28] | vector of integers in the range [1, 28]
Modulation scheme and FEC rate for input transmission, specified as one of these options, as defined in ETSI EN 302 307-1 Section 5.5.2.2 Table 12 [1].
Integer in the range [1, 28] — Use this option with single-input and multi-input streams. If you set the
NumInputStreams
property to a value greater than 1, each stream has the same modulation scheme and coding rate.Vector of integers in the range [1, 28] — Use this option with multi-input streams only. If you set the
NumInputStreams
property to a value greater than 1, each input stream has a modulation scheme and coding rate equal to the corresponding element in this vector. The length of this vector must be equal toNumInputStreams
.
Note
MODCOD
values 11
, 17
,
23
, and 28
are not valid when you set the
FECFrame
property to "short"
(as specified
in ETSI EN 302 307-1 Section 5.3 Table 5b [1]).
Tunable: Yes
Data Types: double
DFL
— Data field length
15,928
(default) | integer in the range [1,
(KBCH−80)] | vector of integers in the range [1,
(KBCH−80)]
Data field (DF) length in bits, specified as one of these options. KBCH is the uncoded BCH block length, as specified in ETSI EN 302 307-1 Section 5.3 Table 5a and 5b [1].
Integer in the range [1, (KBCH−80)] — Use this option with single-input and multi-input streams. If you set the
NumInputStreams
property to a value greater than 1, the length of the DF in baseband frame of each stream is the same value.Vector of integers in the range [1, (KBCH−80)] — Use this option with multi-input streams only. If you set the
NumInputStreams
property to a value greater than 1, the length of the data field in the baseband frame of each stream must be the size of the corresponding element in this vector. The length of this vector must be equal toNumInputStreams
.
Tunable: Yes
Data Types: double
ScalingMethod
— Constellation amplitude scaling method
"outer radius as 1"
(default) | "unit average power"
Constellation amplitude scaling method, specified as "outer radius as
1"
or "unit average power"
.
Dependencies
To enable this property, set the MODCOD
property to a value
in the range [18, 28], which indicates only 16APSK and 32APSK modulation
schemes.
Data Types: char
| string
HasPilots
— Pilot block indication
0
or false
(default) | 1
or true
| vector of logical
values
Pilot block indication, specified as a logical value of 0
(false
), 1
(true
), or a
vector of logical
values. Set this value to 1
(true
) to indicate pilots are inserted in the physical layer
frame.
If you set the NumInputStreams
property to a value greater than
1, you can configure pilots for each stream by specifying this property as a vector. The
length of this vector must be equal to NumInputStreams
.
Tunable: Yes
Data Types: logical
RolloffFactor
— Transmit filter roll-off factor
0.35
(default) | 0.25
| 0.2
Transmit filter roll-off factor for baseband pulse shaping, specified as
0.35
, 0.25
, or 0.2
.
Data Types: double
FilterSpanInSymbols
— Filter span in symbols
10
(default) | positive integer
Filter span in symbols, specified as a positive integer.
The ideal impulse response of the raised cosine filter is truncated to a length that spans the number of symbols specified in this property.
Data Types: double
SamplesPerSymbol
— Number of samples per symbol
4
(default) | positive integer
Number of samples per symbol, specified as a positive integer.
Data Types: double
ISSYI
— Input stream synchronization indicator
0
or false
(default) | 1
or true
Input stream synchronization (ISSY) indicator, specified as a logical value of 0
(false
) or 1
(true
). To indicate that input stream synchronization is used, set this value to 1
(true
).
Dependencies
To enable this property, set the NumInputStreams
property to a value greater than 1 and set the UPL
property to a nonzero value.
Data Types: logical
ISCRFormat
— Input stream clock reference format
"short"
(default) | "long"
Input stream clock reference format, specified as one of these options.
"short"
— Indicates the length of ISSY as 2 bytes"long"
— Indicates the length of ISSY as 3 bytes
When you set the StreamFormat
property to "GS"
, NumInputStreams
property to a value greater than 1, UPL
property to a nonzero value, and ISSYI
to 1
(true
), only the "short"
option of this ISCRFormat
property is applicable.
Dependencies
To enable this property, set the StreamFormat
property to "TS"
, the NumInputStreams
property to a value greater than 1, and the ISSYI
property to 1
(true
).
Data Types: char
| string
MinNumPackets
— Minimum number of packets required to create DF
integer in the range [1, 58,112] | row vector of integers
This property is read-only.
Minimum number of packets required to create a DF, returned as one of these options.
Integer in the range [1, 58,112] — This option applies with single-input streams only.
Row vector of integers in the range [1, 58,112] — This option applies with multi-input streams only. If you set the
NumInputStreams
property to a value greater than 1, the minimum number of packets required for each stream is equal to the corresponding element in this vector. The length of this vector must be equal toNumInputStreams
.
The value of MinNumPackets
is computed based of values of DFL
and UPL
properties.
Dependencies
To enable this property, set the UPL
property to a nonzero value.
Data Types: double
Usage
Description
generates a DVB-S2 time-domain waveform from the input information bits.txWaveform
= s2waveGen(data
)
Input Arguments
data
— Input information bits
[ ]
| binary-valued column vector | cell array of binary-valued column vectors
Input information bits, specified as one of these options. Each element of the
column vector or cell array can be of data type double
,
int8
, or logical
.
Binary-valued column vector — Use this option with single-input streams.
To generate a dummy physical layer (PL) frame, specify
data
as an empty column vector.Cell array of binary-valued column vectors — Use this option with multi-input streams. Each element of the array represents the corresponding input stream. The length of the cell array must be equal to the value of the
NumInputStreams
property.To generate a dummy frame for a particular input stream, specify the corresponding element of the
data
cell array as an empty column vector.
Input data
, either as a single-input or multi-input stream,
must be input in one of these forms.
Packetized stream — The number of packets in each stream must be an integer multiple of the
MinNumPackets
property.For a packetized stream, an 8-bit sync field must be included at the beginning of each packet. The combined length of a packet and its sync bits must be equal to the corresponding value of the
UPL
property.Continuous stream — The number of bits for each stream must be an integer multiple of the
DFL
property.
Note
When you set the StreamFormat
property to
"TS"
, the sync byte is fixed as 47 hex.
Data Types: double
| int8
| logical
| cell
Output Arguments
txWaveform
— Generated time-domain DVB-S2 waveform
column vector
Generated time-domain DVB-S2 waveform, returned as a column vector. The waveform is generated in the form of complex in-phase quadrature (IQ) samples and can consist of a single physical layer frame or multiple physical layer frames.
When you set the NumInputStreams
property to a value greater
than 1, the data fields generated from different input streams are merged using the
round-robin technique.
Data Types: double
Complex Number Support: Yes
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Specific to dvbs2WaveformGenerator
info | Characteristic information about object |
flushFilter | Flush transmit filter |
Examples
Generate DVB-S2 Waveform for Single-Input Stream
Generate a Digital Video Broadcasting Satellite Second Generation (DVB-S2) time-domain waveform for a single-input transport stream (TS) with a single physical layer (PL) frame per stream. Visualize the waveform using constellation plots and signal spectrum.
This example uses MAT-files with LDPC parity matrices. If the MAT-files are not available on the path, download and unzip the MAT-files by entering this code at the MATLAB command prompt.
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.
numFrames = 1;
Create a DVB-S2 System object. Specify the modulation scheme and FEC rate (MODCOD) and data field length (DFL).
s2WaveGen = dvbs2WaveformGenerator; s2WaveGen.MODCOD = 21; % 16APSK 5/6 s2WaveGen.DFL = 39690; s2WaveGen.HasPilots = true; % Pilot insertion indication disp(s2WaveGen)
dvbs2WaveformGenerator with properties: StreamFormat: "TS" NumInputStreams: 1 FECFrame: "normal" MODCOD: 21 DFL: 39690 ScalingMethod: "outer radius as 1" HasPilots: 1 RolloffFactor: 0.3500 FilterSpanInSymbols: 10 SamplesPerSymbol: 4 Show all properties
Create a bit vector of information bits, data
, of concatenated TS 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 = s2WaveGen.MinNumPackets*numFrames; txRawPkts = randi([0 1],pktLen,numPkts); txPkts = [repmat(syncBits,1,numPkts); txRawPkts]; data = txPkts(:);
Generate a DVB-S2 time-domain waveform using the information bits, data
.
txWaveform = s2WaveGen(data);
Visualize the constellation plot for the generated DVB-S2 time-domain waveform by creating a constellation diagram System object.
sps = s2WaveGen.SamplesPerSymbol; constel = comm.ConstellationDiagram('ColorFading',true, ... 'ShowTrajectory',0, ... 'SamplesPerSymbol',sps, ... 'ShowReferenceConstellation',false, ... 'XLimits',[-0.5 0.5], 'YLimits',[-0.5 0.5]); plHeaderLen = 90*sps; % PL header length constel(txWaveform(plHeaderLen+1:end)); release(constel);
Display the frequency spectrum of the generated DVB-S2 time-domain waveform by creating a spectrum analyzer System object.
BW = 36e6; % Typical satellite channel bandwidth Fsym = BW/(1+s2WaveGen.RolloffFactor); Fsamp = Fsym*sps; scope = spectrumAnalyzer('SampleRate',Fsamp); scope(txWaveform)
Generate DVB-S2 Waveform for Multi-Input Stream
Generate a Digital Video Broadcasting Satellite Second Generation (DVB-S2) time-domain waveform for a multi-input generic stream (GS) with multiple physical layer (PL) frames per stream.
This example requires MAT-files with LDPC parity matrices. If they are not available on the path, execute the following commands to download and unzip the MAT-files.
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.
numFrames = 3;
Create a DVB-S2 System object with variable coding and modulation configuration for a multi-input GS. Specify the modulation scheme and FEC rate (MODCOD) and data field length (DFL).
s2WaveGen = dvbs2WaveformGenerator; s2WaveGen.StreamFormat = "GS"; s2WaveGen.NumInputStreams = 2; s2WaveGen.MODCOD = [6 24]; % QPSK 2/3 and 32APSK 3/4 s2WaveGen.DFL = [42960 48328]; s2WaveGen.HasPilots = true; s2WaveGen.SamplesPerSymbol = 10; disp(s2WaveGen)
dvbs2WaveformGenerator with properties: StreamFormat: "GS" NumInputStreams: 2 UPL: 0 FECFrame: "normal" MODCOD: [6 24] DFL: [42960 48328] ScalingMethod: "outer radius as 1" HasPilots: 1 RolloffFactor: 0.3500 FilterSpanInSymbols: 10 SamplesPerSymbol: 10
Create a bit vector of input information bits for each GS user packet.
data = cell(s2WaveGen.NumInputStreams,1); for i = 1:s2WaveGen.NumInputStreams data{i} = randi([0 1],s2WaveGen.DFL(i)*numFrames,1,'int8'); end
Generate the DVB-S2 time-domain waveform with the input information bits.
txWaveform = s2WaveGen(data);
Generate DVB-S2 Dummy PL Frame
Generate a DVB-S2 dummy PL frame for a single-input transport stream.
This example uses MAT-files with LDPC parity matrices. If the MAT-files are not available on the path, download and unzip the MAT-files by entering this code at the MATLAB command prompt.
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
Create a default DVB-S2 System object.
s2WaveGen = dvbs2WaveformGenerator;
Generate a PL dummy frame.
data = zeros(0,1);
Generate a DVB-S2 waveform.
txWaveform = s2WaveGen(data);
References
[1] ETSI Standard EN 302 307-1 V1.4.1(2014-11). Digital Video Broadcasting (DVB); Second Generation Framing Structure, Channel Coding and Modulation Systems for Broadcasting, Interactive Services, News Gathering and other Broadband Satellite Applications (DVB-S2).
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
For all properties that support string and cell array input, code generation is only supported with cell array input.
See System Objects in MATLAB Code Generation (MATLAB Coder).
Version History
Introduced in R2021a
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 (한국어)