comm.MSKDemodulator System object

Package: comm

Demodulate using MSK method and the Viterbi algorithm

Description

The MSKDemodulator object demodulates a signal that was modulated using the minimum shift keying method. The input is a baseband representation of the modulated signal. The initial phase offset property sets the initial phase of the modulated waveform.

To demodulate a signal that was modulated using minimum shift keying:

  1. Define and set up your MSK demodulator object. See Construction.

  2. Call step to demodulate the signal according to the properties of comm.MSKDemodulator. The behavior of step is specific to each object in the toolbox.

Construction

H = comm.MSKDemodulator creates a demodulator System object™, H. This object demodulates the input minimum shift keying (MSK) modulated data using the Viterbi algorithm.

H = comm.MSKDemodulator(Name,Value) creates an MSK demodulator object, H, with each specified property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).

Properties

BitOutput

Output data as bits

Specify whether the output consists of groups of bits or integer values. The default is false.

When you set this property to false, the step method outputs a column vector with a length equal to N/SamplesPerSymbol. N represents the length of the input signal, which is the number of input baseband modulated symbols. The elements of the output vector are -1 or 1.

When you set the BitOutput property to true, the step method outputs a binary column vector with a length equal to N/SamplesPerSymbol. The vector elements are bit values of 0 or 1.

InitialPhaseOffset

Initial phase offset

Specify the initial phase offset of the input modulated waveform in radians as a real, numeric scalar value. The default is 0.

SamplesPerSymbol

Number of samples per input symbol

Specify the expected number of samples per input symbol as a positive, integer scalar value. The default is 8.

TracebackDepth

Traceback depth for Viterbi algorithm

Specify the number of trellis branches that the Viterbi algorithm uses to construct each traceback path as a positive, integer scalar value. The default is 16. The value of this property is also the output delay This value indicates number of zero symbols that precede the first meaningful demodulated symbol in the output.

OutputDataType

Data type of output

Specify the output data type as one of int8 | int16 | int32 | double, when you set the BitOutput property to false. The default is double.

When you set the BitOutput property to true, specify the output data type as one of logical | double.

Methods

cloneCreate MSK demodulator object with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and nontunable properties
releaseAllow property value and input characteristics changes
resetReset states of the MSK demodulator object
stepDemodulate using MSK method and the Viterbi algorithm

Examples

expand all

Demodulate an MSK signal with bit inputs and phase offset

% Create an MSK modulator, an AWGN channel, and an MSK demodulator.  Use a
% phase offset of pi/4.
 hMod = comm.MSKModulator('BitInput', true, ...
                    'InitialPhaseOffset', pi/4);
    hAWGN = comm.AWGNChannel('NoiseMethod', ...
                    'Signal to noise ratio (SNR)','SNR',0);
    hDemod = comm.MSKDemodulator('BitOutput', true, ...
                    'InitialPhaseOffset', pi/4);
 % Create an error rate calculator, account for the delay caused by the Viterbi algorithm
    hError = comm.ErrorRate('ReceiveDelay', hDemod.TracebackDepth);
    for counter = 1:100
      % Transmit 100 3-bit words
      data = randi([0 1],300,1);
      modSignal = step(hMod, data);
      noisySignal = step(hAWGN, modSignal);
      receivedData = step(hDemod, noisySignal);
      errorStats = step(hError, data, receivedData);
    end
    fprintf('Error rate = %f\nNumber of errors = %d\n', ...
      errorStats(1), errorStats(2))
Error rate = 0.000000
Number of errors = 0

Algorithms

This object implements the algorithm, inputs, and outputs described on the MSK Demodulator Baseband block reference page. The object properties correspond to the block parameters.

Was this topic helpful?