Table Of Contents

Resample (Rational Resample) (G Dataflow)

Last Modified: January 9, 2017

Resamples a signal by a rational resampling factor.

connector_pane_image
datatype_icon

reset

A Boolean that specifies the initialization of the internal state of the node.

True Initializes the internal state to zero.
False Initializes the internal state to the final state from the previous call of this node.

The first time this node runs or when reset is True, this node uses start index to determine when the resampling starts. The next time this node runs and reset is False, the internal state of this node initializes to the final state from the previous call to this node.

Processing a Large Data Sequence Consisting of Smaller Blocks

To process a large data sequence that consists of smaller blocks, set reset to True for the first block and to False for all the remaining blocks in continuous resampling.

Default: False

datatype_icon

signal

Input real signal for resampling.

The sampling interval of signal is 1.

This input supports the following data types:
  • 1D array of double-precision, floating-point numbers
  • 2D array of double-precision, floating-point numbers
  • 1D array of complex double-precision, floating-point numbers
  • 2D array of complex double-precision, floating-point numbers
datatype_icon

resampling factor

The interpolation factor and the decimation factor for resampling.

datatype_icon

interpolation

The interpolation factor for resampling.

Default: 1

datatype_icon

decimation

The decimation factor for resampling.

Default: 1

datatype_icon

start index

Determines where the resampling starts for the first call to the node or if reset is True.

Set start index according to the signal after signal is interpolated. start index must be greater than or equal to 0.

Default: 0

datatype_icon

error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error

datatype_icon

FIR filter specifications

Minimum values this node needs to specify the FIR filter.

datatype_icon

alias rejection (dB)

Minimum attenuation level of signal components aliased after any resampling operation.

Default: 120

datatype_icon

normalized bandwidth

Fraction of the new sampling rate that is not attenuated.

Default: 0.4536

datatype_icon

anti-aliasing

A Boolean that determines whether the input signal undergoes lowpass filtering when this node downsamples the signal.

True Applies lowpass filtering to the input signal when downsampling the signal.
False Does not apply lowpass filtering to the input signal when downsampling the signal.

If anti-aliasing is True, this node protects the resampled signal from aliasing. However, the computation requirements increase during resampling.

Default: True

datatype_icon

resampled signal

Resampled signal.

The sampling interval of resampled signal is decimation/interpolation.

datatype_icon

t0

Time instance for the first sample of each signal in the output resampled signal.

datatype_icon

error out

Error information. The node produces this output according to standard error behavior.

Algorithm for Rational Resampling

The following steps describe how this node completes the rational resampling process. Each step corresponds to a numbered section of the following image.

  1. X is the input array for resampling. The time interval between two adjacent samples is 1.
  2. This node inserts zeros between every two adjacent samples to upsample X by the Interpolation factor. Let X1 represent the interpolated signal.
  3. Using a FIR filter, this node filters X1 at the Start Index to obtain the first output sample. The elements outside the range of the interpolated signal equal zero.
  4. This node moves the filter to the position Start Index + Decimation Factor and filters again to obtain the second output sample.
  5. This node repeats step 4 by adding each new Decimation Factor value until there are not enough samples in X1 for filtering. This node stores the final samples to internal states and wait for the next signal block. The time interval between two adjacent samples in an output signal is equal to Decimation Factor/Interpolation. t0 specifies the time of the first output sample.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported


Recently Viewed Topics