Main Content

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 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 dsp.SpectrumAnalyzer System object to display the signal spectrum of the generated CCSDS TC waveform.

scope = dsp.SpectrumAnalyzer;
scope.SampleRate = cfg.SamplesPerSymbol*cfg.SymbolRate;
scope(waveform)

Figure Spectrum Analyzer contains an axes and other objects of type uiflowcontainer, uimenu, uitoolbar. The axes contains an object of type line. This object represents Channel 1.

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 defualt properties
tmWaveGen = 
  ccsdsTMWaveformGenerator with properties:

          WaveformSource: "synchronization and channel coding"
           HasRandomizer: true
                  HasASM: true
               PCMFormat: "NRZ-L"

   Channel coding properties:
           ChannelCoding: "RS"
         RSMessageLength: 223
     RSInterleavingDepth: 1
    IsRSMessageShortened: false

   Digital modulation and filter properties:
              Modulation: "QPSK"
      PulseShapingFilter: "root raised cosine"
           RolloffFactor: 0.3500
     FilterSpanInSymbols: 10
        SamplesPerSymbol: 10

  Show all properties

bits = randi([0 1], tmWaveGen.NumInputBits,1); % Input information bits
waveform = tmWaveGen(bits);

Create a dsp.SpectrumAnalyzer 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 = dsp.SpectrumAnalyzer('SampleRate',Fsamp,'AveragingMethod','Exponential');
scope(waveform)

Figure Spectrum Analyzer contains an axes and other objects of type uiflowcontainer, uimenu, uitoolbar. The axes contains an object of type line. This object represents Channel 1.

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 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('s2xLDPCParityMatrices.zip','file')
    url = 'https://ssd.mathworks.com/supportfiles/spc/satcom/DVB/s2xLDPCParityMatrices.zip';
    websave('s2xLDPCParityMatrices.zip',url);
    unzip('s2xLDPCParityMatrices.zip');
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 dsp.SpectrumAnalyzer 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 = dsp.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('s2xLDPCParityMatrices.zip', 'file')
    url = 'https://ssd.mathworks.com/supportfiles/spc/satcom/DVB/s2xLDPCParityMatrices.zip';
    websave('s2xLDPCParityMatrices.zip',url);
    unzip('s2xLDPCParityMatrices.zip');
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 defualt 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);

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

| | | |

Related Topics