Communication primitives

Primitives that are specific to digital communications functions, such as pulse shapers, speech coders, and QAM encoders.

The limited set of communication primitives that have been developed are summarized below. Many of these are modules, and should be viewed as examples of systems that a user can create.

Sources and pulse shapers

Bits
Produce "0" with probability ProbOfZero, else produce "1".
cosine
Produce a cosine waveform whose energy is normalized with respect to Amplitude. It is used in simulations for binary frequency shift keying (BFSK) demonstrations. This module differs from the cosine primitive which computes the cosine of the input signal (see Nonlinear primitives for more information on the cosine primitive).
RaisedCosineCx
This module uses the RaisedCosine primitive to implement an FIR filter for complex inputs with a raised cosine or square-root raised cosine transfer function.

Transmitter functions

NR2Zero
Binary to non-return-to-zero signaling converter
QAM4
Encode an input bit stream into a 4-QAM (or 4-PSK) complex symbol sequence.
QAM16
Encode an input bit stream into a 16-QAM complex symbol sequence.
Scrambler
Scramble the input bit sequence using a feedback shift register. The taps of the feedback shift register are given by the polynomial parameter, which should be a positive integer. The n-th bit of this integer indicates whether the n-th tap of the delay line is fed back. The low-order bit is called the 0-th bit, and should always be set. The next low-order bit indicates whether the output of the first delay should be fed back, etc. The default polynomial is an octal number defining the V.22bis scrambler.
Spread
Frame synchronized direct-sequence spreader.
xmit2fsk
Binary frequency shift keying (BFSK) transmitter.
xmit2pam
Simple 2-level pulse amplitude modulation (PAM) transmitter.
xmit4pam
Simple 4-level pulse amplitude modulation (PAM) transmitter.
xmit2psk
Binary 2-level phase shift keying (BPSK) Modulator.
xmitspread
Direct-sequence spreader (that is, spread-spectrum transmitter).

Receiver functions

DeScrambler
Descramble the input bit sequence using a feedback shift register. The taps of the feedback shift register are given by the polynomial parameter. This is a self-synchronizing descrambler that will exactly reverse the operation of the Scrambler primitive if the polynomials are the same. The low-order bit of the polynomial should always be set.
hilbertSplit
This module implements a phase splitter, in which the real-valued input signal is converted to an (approximate) analytic signal. The signal is filtered by the HilbertTransform primitive to generate the imaginary part of the output, while the real part is obtained by creating a matching delay.
qam4Slicer
This module implements a slicer (decision device) for a 4-QAM (or equivalently, 4-PSK) signal. The output decision is a complex number with +1 or -1 for each of the real or imaginary parts.
qam16Slicer
This module implements a slicer (decision device) for a 16-QAM complex signal. The output decision is a complex number with +1, -1, +3, or -3 for each of the real or imaginary parts.
phaseShift
Shifts the phase of the input signal on the in input by the shift value on the shift input. The phase shifting is implemented by filtering the input signal with a complex FIR filter to convert it into an analytic signal and the complex result is modulated by a complex exponential. If the shift value is time varying, then its slope determines the instantaneous frequency shift.
rec2fsk
Binary frequency shift keying (BFSK) Receiver.
rec2pam
Simple 2-level pulse amplitude modulation (PAM) receiver.
rec4pam
Simple 4-level pulse amplitude modulation (PAM) receiver.
rec2psk
Binary pulse shift keying (BPSK) demodulator.
recspread
Direct sequence receiver.

Channel models

AWGNChannel
Model an additive Gaussian white noise channel with optional linear distortion.
BasebandEquivChannel

Baseband equivalent channel.
freqPhase
Impose frequency offset and/or phase jitter on a signal in order to model channels, such as telephone channels, that suffer these impairments.
NoiseChannel
A simple channel model with additive Gaussian white noise.
nonLinearDistortion

Generate second and third harmonic distortion by squaring and cubing the signal, and adding the results in controlled proportion to the original signal.
TelephoneChannel
Simulate impairments commonly found on a telephone channel, including additive Gaussian noise, linear and nonlinear distortion, frequency offset, and phase jitter.