Resamples the input signal X by interpolating X, passing the interpolated signal through an FIR filter, and decimating the filtered signal. Wire data to the X input to determine the polymorphic instance to use or manually select the instance.


icon

Inputs/Outputs

  • cbool.png anti-aliasing?

    anti-aliasing? specifies whether the input signal undergoes lowpass filtering when LabVIEW downsamples the signal.

    If anti-aliasing? is TRUE (default), this VI protects the resampled signal from aliasing. However, the computation requirements increase during resampling.

  • cbool.png reset

    reset controls the initialization of resampling. The default is FALSE.

    The first time this VI runs or when reset is TRUE, LabVIEW initializes the internal states of the VI to zero and uses start index to determine when the resampling starts. The next time this VI runs and reset is FALSE, LabVIEW initializes the internal states to the final states from the previous call to this VI.

    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.

  • c1ddbl.png X

    X is the input real signal for resampling. The sampling interval of X is 1.

  • ci32.png start index

    start index determines where the resampling starts for the first call to the VI or if reset is TRUE. Set the start index according to the signal after X is interpolated. start index must be greater than or equal to 0. The default is 0.

  • cnclst.png resample factor

    resample factor contains the interpolation factor and the decimation factor for resampling.

  • ci32.png interpolation

    interpolation is the interpolation factor for resampling. The default is 1.

  • ci32.png decimation

    decimation is the decimation factor for resampling. The default is 1.

  • cerrcodeclst.png error in (no error)

    error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

  • cnclst.png FIR filter specifications

    FIR filter specifications specifies the minimum values this VI needs to specify the FIR filter.

  • cdbl.png alias rejection (dB)

    alias rejection (dB) specifies the minimum attenuation level of signal components aliased after any resampling operation. The default is 120.

  • cdbl.png normalized bandwidth

    normalized bandwidth specifies the fraction of the new sampling rate that is not attenuated. The default is 0.4536.

  • i1ddbl.png Y

    Y returns the resampled signal. The sampling interval of Y is decimation/interpolation.

  • idbl.png t0

    t0 returns the time instance for the first sample of each signal in Y.

  • ierrcodeclst.png error out

    error out contains error information. This output provides standard error out functionality.

  • The following steps describe the rational resampling process. Each step corresponds to a numbered section of the following image.

    1. Input signal X for resampling. The time interval between two adjacent samples is 1.
    2. Insert zeros between every two adjacent samples to upsample X by the interpolation factor. Let X1 represent the interpolated signal.
    3. Using a FIR filter, filter X1at the start index to obtain the first output sample. The elements outside the range of the interpolated signal equal zero.
    4. Move the filter to the position start index + decimation and filter again to obtain the second output sample.
    5. Repeat step 4, adding each new decimation value until there are not enough samples in X1 for filtering. Store 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 / interpolation. t0 specifies the time of the first output sample.

    Examples

    Refer to the following example files included with LabVIEW.

    • labview\examples\Signal Processing\Signal Operation\Rational Resampling.vi