# MT Modulate CPM (G Dataflow)

Version:

Receives a sequence of data bits, performs CPM modulation, and returns the modulated complex baseband waveform in the output complex waveform parameter.

Note

If you use the finite impulse response pulse-shaping filters in modulation nodes, it may lead to the apparent loss of bits caused by filter delay. Refer to Filter Delay in the Details for more information about this effect. Set the flush buffers? parameter to TRUE to offset the effects of filter delay in single-shot operations or in the last iteration of continuous operations.

## input bit stream

The sequence of information bits to be modulated.

Note

For CPM systems with more than 1 bit per symbol, such as 4-CPM, the symbols are converted to bits in least significant bit (LSB) first order. For example, if the detected symbols are 2,1,... the generated bits are 0,1,1,0...

## CPM system parameters

Parameter values defining the CPM system. Wire the CPM system parameters cluster of MT Generate CPM System Parameters (M) or MT Generate CPM System Parameters (map) to this cluster. Do not alter the values.

### samples per symbol

An even number of samples dedicated to each symbol. Multiply this value by the symbol rate to determine the sample rate.

Note

The demodulation and detector nodes use timing recovery, which is optimized for four or more samples per symbol.

Default: 16

### symbol map

A two-dimensional array of desired frequency deviations. Each column corresponds to a symbol, with the binary representation of the column index being the mapped bit-representation of the symbol. Each row corresponds to a modulation index in the order in which it appears in the modulation index, h(i) parameter of MT Generate CPM System Parameters (M) or MT Generate CPM System Parameters (map).

Default: Empty array

## symbol rate

The desired symbol rate, in hertz (Hz). This value must be positive.

Default: 1.00

## pulse shaping filter coefficients

An ordered array containing the desired pulse-shaping filter coefficients. Wire the pulse shaping filter coefficients parameter of MT Generate Filter Coefficients to this parameter. When generating the filter coefficients, ensure that the value of the pulse shaping samples per symbol parameter of MT Generate Filter Coefficients is equal to the value of the samples per symbol element of the CPM system parameters cluster, which is passed to this node.

Note

When you configure reset? to TRUE, there is a transient response of half the filter length at the start of the modulated signal, and the output data is shortened by approximately half the filter length. When you configure reset? to FALSE, the node uses data from the previous iteration to prime the filter, hence eliminating the transient.

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## reset?

A Boolean that determines whether the node continues modulating using the previous iteration states. The node resets on the first call and when you configure reset? to TRUE. You must configure reset? to TRUE the first time this node is called and whenever you want to restart the modulator.

Default: TRUE

## flush buffers?

A Boolean that determines whether samples are forced out from the modulated waveform that are affected by the FIR pulse-shaping filter delay. Set this parameter to TRUE during single-shot operations and during the last iteration of continuous operations.

 TRUE Destroys the internal states of the algorithms such that you cannot perform continuous processing on the signal during subsequent iterations. If flush buffers? is set to TRUE, you must set reset? to TRUE on the subsequent iteration. FALSE Stores the internal states of the algorithms so that you can perform continuous processing on the signal during subsequent iterations.

Default: FALSE

## output complex waveform

The modulated complex baseband waveform data.

### t0

Time of the first value in the Y array.

### dt

Time interval between data values in the Y array.

Default: 1.0

### Y

The complex-valued signal-only baseband modulated waveform. The real and imaginary parts of this complex data array correspond to the in-phase (I) and quadrature-phase (Q) data, respectively.

## symbols out

The array of mapped symbols before pulse shaping is applied. The real portion corresponds to the carrier frequency offset of the mapped symbol, and the imaginary portion is zero.

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

## Signal Bandwidth

The signal bandwidth, using Carson’s Rule, is calculated using the following formula:

BW = 2(Fm + Fd)

where,

Fm is symbol bandwidth and is given by $\left(1+\alpha \right)×R$, where R is the symbol rate and $\alpha$is the filter parameter.

Fd is the maximum frequency deviation and is given by $\frac{\mathrm{max}\left({h}_{i}\right)×M×R}{2}$, where h i is the modulation index for the ith baud.

## Aliasing

The sample rate of the signal is given by fs = samples per symbol * R.

A value of fs that is less than BW causes aliasing. The signal can be checked for aliasing by observing its spectrum and noting whether the observed bandwidth of the signal is higher than the calculated bandwidth.

You can prevent your signal from aliasing by using one of the following strategies:

• Increasing the sample rate by increasing the samples per symbol.
• Decreasing the bandwidth of the message signal by decreasing the filter parameter $\alpha$.
• Decreasing the maximum modulation index (h i ).

## Full Response Versus Partial Response Signals

If the length of the pulse-shaping filter is less than or equal to one symbol, the CPM signal is a full-response CPM signal. If the length of the pulse-shaping filter is greater than one symbol, the CPM signal is a partial-response CPM signal.

## Symbol History

For partial response CPM signals, the node assumes a history of symbols before the start of the output modulated signal. The number of symbols in history is equal to L-1, where L is the length of symbols of the pulse-shaping filter. The symbols in history correspond to an all-zero bit sequence modulated with the appropriate parameters.

## Filter Delay

Finite impulse response (FIR) filters are used for different operations such as pulse-shaping, matched filtering, and downconversion filtering. For such filters, the output signal is related to the input signal as shown by the following equation:
$y\left[n\right]={b}_{0}x\left[n\right]+{b}_{1}x\left[n-1\right]+...+{b}_{P}x\left[n-P\right]$

where

P is the filter order

x[n] is the input signal

y[n] is the output signal

bi are the filter coefficients

The initial state for all samples in an FIR filter is 0. The filter output until the first input sample reaches the middle tap (the first causal sample) is called the transient response, or filter delay. For an FIR filter that has N taps, the delay is (N-1)/2 samples. This relationship is illustrated in the following figure, where a sine wave is filtered by an FIR filter with 50 taps.

## Recovering Samples in Single-Shot Operations

In single-shot operations for modulators and demodulators, the filter delay is truncated before the signal is generated because these samples are not valid. Some samples at the end of the block do not appear at the modulator or demodulator output, and hence appear to have been lost.

You can recover these samples by sending extra samples to the modulator or demodulator. To determine how many extra samples you must add, use the following guidelines:
• For modulation: Let L be the pulse-shaping filter length, m be the number of samples per symbol, and M be the modulation order. The number of bits to be added to the input bit stream is given by the following formula:
$N=\left(L-1\right)\frac{{\mathrm{log}}_{2}M}{m}$
• For demodulation: Demodulation use filters during matched filtering. Let L be the length of the matched filter. The number of samples to be added to the input signal prior to filtering is given by the following formula:
$N=\frac{L-1}{2}$
The N extra samples are obtained by repeating the last sample value of the input signal N times to ensure signal continuity.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application