Main Content


Demodulate GMSK-modulated signal using Viterbi algorithm


The comm.GMSKDemodulator System object™ uses a Viterbi algorithm to demodulate a signal that was modulated using the Gaussian minimum shift keying (GMSK) method. The input is a baseband representation of the modulated signal.

To demodulate a GMSK-modulated signal using the Viterbi algorithm:

  1. Create the comm.GMSKDemodulator object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?




gmskdemodulator = comm.GMSKDemodulator creates a demodulator System object that demodulates the input GMSK-modulated data by using the Viterbi algorithm.

gmskdemodulator = comm.GMSKDemodulator(Name,Value) sets properties using one or more name-value pairs. For example, gmskdemodulator = comm.GMSKDemodulator('PulseLength',6) specifies the length of the Gaussian pulse shape as 6 symbol intervals.


expand all

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.

Option to output data as bits, specified as a numeric or logical 0 (false) or 1 (true).

  • When you set this property to false, the output of the System object call is a column vector of elements -1 or 1.

  • When you set this property to true, the output of the System object call is a binary column vector of elements 0 or 1.

Data Types: logical

Product of the bandwidth and symbol time for the Gaussian pulse shape, specified as a positive scalar value. For more details, see Algorithms.

Data Types: double

Pulse length, specified as a positive integer. The pulse length value represents the length of the Gaussian pulse shape in symbol intervals.

Data Types: double

Symbol prehistory, specified as -1, 1, or a vector with elements equal those values. The symbol prehistory indicates the data symbols that the modulator uses prior to the first call of the object, in reverse chronological order.

  • A scalar value expands to a vector of length PulseLength – 1.

  • For a vector, the length must be PulseLength – 1.

Data Types: double

Initial phase offset of the modulated waveform in radians, specified as a numeric scalar.

Data Types: double

Number of samples per symbol, specified as a positive integer. The number of samples per symbol represents the upsampling factor from input samples to output samples.

Data Types: double

Traceback depth for the Viterbi algorithm, specified as a positive integer.

The traceback depth is the number of trellis branches that the Viterbi algorithm uses to construct each traceback path. The number of zero symbols that precede the first decoded symbol in the output represent a decoding delay.

Data Types: double

Output data type, specified as one of these values.

  • int8, int16, int32, or double — Use one of these values when you set the BitOutput property to false.

  • logical or double — Use one of these values when you set the BitOutput property to true.



Y = gmskdemodulator(X) applies GMSK demodulation to the GMSK-modulated waveform and returns the demodulated input signal.

Input Arguments

expand all

GMSK-modulated input signal, specified as a column vector.

The length of the input signal must be an integer multiple of the SamplesPerSymbol property.

Data Types: double | single
Complex Number Support: Yes

Output Arguments

expand all

Demodulated signal, returned as a column vector with length equal to N / SamplesPerSymbol. N is the length of the input signal, X. For more information about the output datatype, see the OutputDataType property.

  • When you set the BitOutput property to false, Y is returned as a column vector of elements -1 or 1.

  • When you set the BitOutput property to true, Y is returned as a binary column vector of elements 0 or 1.

Data Types: double | logical

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:


expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object


collapse all

Create a GMSK modulator and demodulator pair. Create an AWGN channel object.

gmskmodulator = comm.GMSKModulator('BitInput',true, ...
channel = comm.AWGNChannel('NoiseMethod', ...
                           'Signal to noise ratio (SNR)', ...
gmskdemodulator = comm.GMSKDemodulator('BitOutput',true, ...

Create an error rate calculator and account for the delay between the modulator and demodulator, caused by the Viterbi algorithm.

errorRate = comm.ErrorRate('ReceiveDelay', ...

Process 100 frames of data looping through these steps.

  1. Generate vectors with 300 elements of random binary data.

  2. GMSK-modulate the data.

  3. Pass the modulated data through the AWGN channel.

  4. GMSK-demodulate the data.

  5. Collect error statistics on the frames of data.

for counter = 1:100
   % Transmit 100 3-bit words
   data = randi([0 1],300,1);
   modSignal = gmskmodulator(data);
   noisySignal = channel(modSignal);
   receivedData = gmskdemodulator(noisySignal);
   errorStats = errorRate(data, receivedData);

Display the error statistics.

fprintf('Error rate = %f\nNumber of errors = %d\n', ...
         errorStats(1), errorStats(2))
Error rate = 0.000133
Number of errors = 4


The BandwidthTimeProduct property represents bandwidth multiplied by time. Use this property to reduce the bandwidth at the expense of increased intersymbol interference. The PulseLength property measures the length of the Gaussian pulse shape in symbol intervals. These equations define the frequency pulse shape. Bb represents the bandwidth of the pulse and T is the symbol durations. Q(t) is the complementary cumulative distribution function.


For this System object, an input symbol of 1 causes a phase shift of π/2 radians, which corresponds to a modulation index of 0.5.


[1] Anderson, John B., Tor Aulin, and Carl-Erik Sundberg. Digital Phase Modulation. New York: Plenum Press, 1986.

Extended Capabilities

Version History

Introduced in R2012a