Main Content

comm.GMSKDemodulator

Demodulate GMSK-modulated signal using Viterbi algorithm

Description

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?

Creation

Description

example

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, 'PulseLength',6 specifies the length of the Gaussian pulse shape as 6 symbol intervals.

Properties

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. Form 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. If the value is a vector, then its length must be one less than the value of the PulseLength property. The symbol prehistory indicates the data symbols that the modulator uses prior to the first call of the System object in reverse chronological order.

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 trackback 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.

Usage

Description

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:

release(obj)

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

Examples

collapse all

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.

  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);
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

Algorithms

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.

g(t)=12T{Q[2πBbtT2ln(2)]Q[2πBbt+T2ln(2)]}Q(t)=t12πeτ2/2dτ

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.

References

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

Extended Capabilities

Introduced in R2012a