Generate Waveforms
After you create the necessary objects described in Create Configuration or System Objects, you can use these objects to generate the desired waveform. Vary the object parameters and plot the waveforms.
In each section of these examples, you:
Create a format-specific configuration object or a System object™.
Create a column vector or cell array of column vectors of the information bits for the waveform generation.
Generate the format-specific waveform and plot it.
Generate DVB-S2 Waveform
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 Digital Video Broadcasting Satellite Second Generation (DVB-S2) System Object and the waveform. Use Name,Value
pairs to specify the transmission parameters.
s2WaveGen = dvbs2WaveformGenerator("NumInputStreams",2,"MODCOD",[6 19],"RolloffFactor",0.25 ); disp(s2WaveGen)
dvbs2WaveformGenerator with properties: StreamFormat: "TS" NumInputStreams: 2 FECFrame: "normal" MODCOD: [6 19] DFL: 15928 ScalingMethod: "outer radius as 1" HasPilots: 0 RolloffFactor: 0.2500 FilterSpanInSymbols: 10 SamplesPerSymbol: 4 ISSYI: false Show all properties
Initialize the simulation parameters.
numFramesPerStream = 1; % Number of PL frames generated per stream syncBits = [0 1 0 0 0 1 1 1]'; % Sync byte of TS packet (47 HEX) pktLen = 1496; % User packet (UP) length without sync bits is 1496 numPktsPerStream = s2WaveGen.MinNumPackets*numFramesPerStream; % Number of packets required to fill data field per stream
Generate transport stream (TS) packets per stream.
data = cell(s2WaveGen.NumInputStreams,1); for i = 1:s2WaveGen.NumInputStreams txRawPkts = randi([0 1],pktLen,numPktsPerStream(i)); txPkts = [repmat(syncBits,1,numPktsPerStream(i)); txRawPkts]; data{i} = txPkts(:); end
Generate the DVB-S2 time-domain waveform using the information bits, data
.
txWaveform = s2WaveGen(data);
Create a spectrum analyzer System object to display the signal spectrum of the generated DVB-S2 time-domain waveform.
BW = 36e6; % Typical satellite channel bandwidth Fsym = BW/(1+s2WaveGen.RolloffFactor); Fsamp = Fsym*s2WaveGen.SamplesPerSymbol; spectrum = spectrumAnalyzer('SampleRate',Fsamp); spectrum(txWaveform); release(spectrum);
Generate DVB-S2X Waveform
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 Digital Video Broadcasting Satellite Second Generation extended (DVB-S2X) System object and the waveform.
s2xWaveGen = dvbs2xWaveformGenerator % DVB-S2X object with default properties
s2xWaveGen = dvbs2xWaveformGenerator with properties: StreamFormat: "TS" HasTimeSlicing: false NumInputStreams: 1 PLSDecimalCode: 132 DFL: 18448 PLScramblingIndex: 0 RolloffFactor: 0.3500 FilterSpanInSymbols: 10 SamplesPerSymbol: 4 Show all properties
Initialize the simulation parameters.
numFrames = 3; % Number of PL frames generated per stream syncBits = [0 1 0 0 0 1 1 1]'; % Sync byte of TS packet (47 HEX) pktLen = 1496; % User packet (UP) length without sync bits is 1496 numPkts = s2xWaveGen.MinNumPackets*numFrames; % Number of packets required to fill data field per stream
Generate transport stream (TS) packets per stream.
txRawPkts = randi([0 1], pktLen, numPkts); txPkts = [repmat(syncBits, 1, numPkts);txRawPkts]; data = txPkts(:);
Generate the DVB-S2X time-domain waveform using the information bits, data
.
txWaveform = s2xWaveGen(data);
Generate DVB-RCS2 Waveform
Create a Digital Video Broadcasting Second Generation Return Channel over Satellite (DVB-RCS2) System object and the waveform. Use Name,Value
pairs to specify the transmission parameters.
wg = dvbrcs2WaveformGenerator("WaveformID",2,"PreBurstGuardLength",6,"SamplesPerSymbol",6); disp(wg)
dvbrcs2WaveformGenerator with properties: TransmissionFormat: "TC-LM" ContentType: "traffic" IsCustomWaveform: false WaveformID: 2 PreBurstGuardLength: 6 PostBurstGuardLength: 0 FilterSpanInSymbols: 10 SamplesPerSymbol: 6 Read-only: FramePDULength: 80
Generate a frame protocol data unit (PDU).
framePDU = randi([0 1],wg.FramePDULength,1);
Generate the DVB-RCS2 burst samples.
txWaveform = wg(framePDU);
Generate CCSDS HPE TM Waveform
Generate a CCSDS HPE TM waveform for 10 transfer frames, each 1024 bytes in length.
rng("default")
numTF = 10;
numBytesInTF = 1024;
dataTF = randi([0 1],numBytesInTF*8*numTF,1);
Create a CCSDS HPE waveform generator System object and set its properties.
hpeWaveform = ccsdsHPEWaveformGenerator;
hpeWaveform.TransmissionType = "telemetry";
hpeWaveform.PPMOrder = 4;
hpeWaveform.NumRows = 36;
hpeWaveform.NumBytesInTransferFrame = numBytesInTF;
Generate the TM waveform.
txOut = hpeWaveform(dataTF);
Generate CCSDS TM Waveform
Create a Consultative Committee for Space Data Systems (CCSDS) Telemetry (TM) System object and the waveform.
The object ccsdsTMWaveformGenerator
supports these two CCSDS TM standards, depending on the type of input to WaveformSource
property.
CCSDS TM synchronization and channel coding standard (CCSDS 131.0-B-3)
CCSDS flexible advanced coding and modulation scheme for high rate telemetry standard (CCSDS 131.2-B-1)
The default standard for this object is CCSDS TM synchronization and channel coding.
Create the System object and Generate Waveform for CCSDS TM Synchronization and Channel Coding Scheme
tmWaveGen = ccsdsTMWaveformGenerator % CCSDS TM object with default properties
tmWaveGen = ccsdsTMWaveformGenerator with properties: WaveformSource: "synchronization and channel coding" HasRandomizer: true HasASM: true PCMFormat: "NRZ-L" Channel coding ChannelCoding: "RS" RSMessageLength: 223 RSInterleavingDepth: 1 IsRSMessageShortened: false Digital modulation and filter Modulation: "QPSK" PulseShapingFilter: "root raised cosine" RolloffFactor: 0.3500 FilterSpanInSymbols: 10 SamplesPerSymbol: 10 Use get to show all properties
bits = randi([0 1], tmWaveGen.NumInputBits,1); % Input information bits
waveform = tmWaveGen(bits);
Create a spectrum analyzer System object to display the frequency spectrum of the generated CCSDS TM time-domain waveform.
BW = 36e6; % Typical satellite channel bandwidth Fsamp = tmWaveGen.SamplesPerSymbol*BW; scope = spectrumAnalyzer('SampleRate',Fsamp,'AveragingMethod','Exponential'); scope(waveform)
Create the System object and Generate Waveform for CCSDS TM Flexible Advanced Coding and Modulation Scheme
For this example, use dot notation to specify the transmission parameters.
tmWaveGen = ccsdsTMWaveformGenerator; tmWaveGen.WaveformSource = "flexible advanced coding and modulation"; tmWaveGen.ACMFormat = 14; % 16APSK
Calculate the number of transfer frames in one physical layer frame. Generate the waveform using the information bits, data
.
NumTFInOnePLFrame = tmWaveGen.MinNumTransferFrames*16 % One PL frame consists of 16 codewords, as specified in the standard
NumTFInOnePLFrame = 192
waveform = []; % Initialize waveform as null % Generate waveform for iTF = 1:NumTFInOnePLFrame bits = randi([0 1], tmWaveGen.NumInputBits, 1); waveform = [waveform;tmWaveGen(bits)]; end
Generate CCSDS TC Waveform
Create a Consultative Committee for Space Data Systems (CCSDS) Telecommand (TC) configuration object and the waveform. Use Name,Value
pairs to specify the transmission parameters.
cfg = ccsdsTCConfig ('ChannelCoding', "LDPC", 'LDPCCodewordLength', 512); TFLength = 12; % Transfer frame length bits = randi([0 1],8*TFLength,1); % Bits in TC transfer frame waveform = ccsdsTCWaveform(bits,cfg);
Create a spectrum analyzer System object to display the signal spectrum of the generated CCSDS TC waveform.
scope = spectrumAnalyzer; scope.SampleRate = cfg.SamplesPerSymbol*cfg.SymbolRate; scope(waveform)
References
[1] TM Synchronization and Channel Coding. Recommendation for Space Data System Standards. CCSDS 131.0-B-3. Blue Book. Issue 3. Washington, D.C.: CCSDS, September 2017.
[2] Flexible Advanced Coding and Modulation Scheme for High Rate Telemetry Applications. Recommendation for Space Data System Standards. CCSDS 131.2-B-1. Blue Book. Issue 1. Washington, D.C.: CCSDS, March 2012.
See Also
Objects
dvbs2WaveformGenerator
|dvbs2xWaveformGenerator
|dvbrcs2WaveformGenerator
|ccsdsHPEWaveformGenerator
|ccsdsTMWaveformGenerator
|ccsdsTCConfig