Demodulate GMSK-modulated signal using Viterbi algorithm
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
To demodulate a GMSK-modulated signal using the Viterbi algorithm:
comm.GMSKDemodulatorobject 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?
creates a demodulator System object that demodulates the input GMSK-modulated data by using the Viterbi
gmskdemodulator = comm.GMSKDemodulator
sets properties using one or more name-value pairs. For example,
gmskdemodulator = comm.GMSKDemodulator(
gmskdemodulator = comm.GMSKDemodulator('PulseLength',6) specifies the
length of the Gaussian pulse shape as 6 symbol intervals.
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.
BitOutput — Option to output data as bits
0 (default) |
Option to output data as bits, specified as a numeric or logical
When you set this property to
false, the output of the System object call is a column vector of elements
When you set this property to
true, the output of the System object call is a binary column vector of elements
BandwidthTimeProduct — Product of bandwidth and symbol time
0.3 (default) | positive scalar
Product of the bandwidth and symbol time for the Gaussian pulse shape, specified as a positive scalar value. For more details, see Algorithms.
PulseLength — Pulse length
4 (default) | positive integer
Pulse length, specified as a positive integer. The pulse length value represents the length of the Gaussian pulse shape in symbol intervals.
SymbolPrehistory — Symbol prehistory
1 (default) |
-1 | vector
Symbol prehistory, specified as
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
A scalar value expands to a vector of length
For a vector, the length must be
InitialPhaseOffset — Initial phase offset
0 (default) | numeric scalar
Initial phase offset of the modulated waveform in radians, specified as a numeric scalar.
SamplesPerSymbol — Number of samples per output symbol
8 (default) | positive integer
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.
TracebackDepth — Traceback depth
16 (default) | positive integer
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.
OutputDataType — Output data type
double (default) |
Output data type, specified as one of these values.
double— Use one of these values when you set the BitOutput property to
double— Use one of these values when you set the
Y — Demodulated signal
Demodulated signal, returned as a column vector with length equal to
is the length of the input signal,
X. For more information about
the output datatype, see the OutputDataType property.
When you set the
Yis returned as a column vector of elements
When you set the
Yis returned as a binary column vector of elements
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
GMSK Signal in AWGN
Create a GMSK modulator and demodulator pair. Create an AWGN channel object.
gmskmodulator = comm.GMSKModulator('BitInput',true, ... 'InitialPhaseOffset',pi/4); channel = comm.AWGNChannel('NoiseMethod', ... 'Signal to noise ratio (SNR)', ... 'SNR',0); gmskdemodulator = comm.GMSKDemodulator('BitOutput',true, ... 'InitialPhaseOffset',pi/4);
Create an error rate calculator and account for the delay between the modulator and demodulator, caused by the Viterbi algorithm.
errorRate = comm.ErrorRate('ReceiveDelay', ... gmskdemodulator.TracebackDepth);
Process 100 frames of data looping through these steps.
Generate vectors with 300 elements of random binary data.
GMSK-modulate the data.
Pass the modulated data through the AWGN channel.
GMSK-demodulate the data.
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); end
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
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.
 Anderson, John B., Tor Aulin, and Carl-Erik Sundberg. Digital Phase Modulation. New York: Plenum Press, 1986.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).
Introduced in R2012a