niRFSG Fractional Resampling (Complex Input) VI
- Updated2025-10-14
- 5 minute(s) read
Inputs a complex-valued waveform and resamples and/or realigns it based on the input parameters that you specify. To realign the input waveform in time, enter a nonzero value in initial sample offset. Positive or negative offset values push the output complex waveform forward or backward in time, respectively, relative to the input complex waveform.

Inputs/Outputs
initial sample offset (sec)
—
initial sample offset specifies the initial sample offset, in seconds. This positive value specifies the location in time of the first output point relative to the first input point. The default is 0.00.
desired sample rate (Hz)
—
desired sample rate specifies the desired sample rate, in hertz, of the output complex waveform data. This value can be an integer or a non-integer multiple of the input data sample rate. The default value is 100 MHz.
input complex waveform
—
input complex waveform specifies the complex baseband waveform data.
error in
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
reset? (T)
—
reset? specifies whether this VI continues resampling using the previous iteration states. reset? must be set to TRUE (default) whenever you want to restart fractional resampling.
output complex waveform
—
output complex waveform returns the resampled complex baseband waveform data.
error out
—
error out contains error information. This output provides standard error out functionality. |
Details
To resample a waveform, enter a desired sample rate that differs from the existing sample rate of input complex waveform. To realign a waveform without changing the sample rate, specify a desired sample rate equal to the existing sample rate. To resample a waveform without changing the relative timing offset between the input and output complex waveforms, specify an initial sample offset of 0.
Resampling and Phase Continuity
Resampling can disturb phase continuity. For example, if a sine wave sampled at four samples per cycle in a four-sample long phase-continuous array, is resampled at a rate of 4.5 samples per cycle, the resulting five samples are no longer phase-continuous. Phase continuity is preserved only if an integer number of samples in the original array becomes an integer number of samples in the resampled array. The following figure shows a four-sample waveform resampled to 4.5 samples. The rate change should produce 4.5 samples, but the resampler can return only an integer number of samples.
Address this issue by repeating the original array. If you copy and concatenate the original array, the new phase-continuous array contains eight samples. The frequency content of the new array is exactly the same as the frequency content of the original array. If you perform resampling from 4 samples per cycle to 4.5 samples per cycle, the eight samples become nine samples. Because nine is an integer, phase continuity is preserved. The Resample and Write example for NI-RFSG shows this strategy. The following figure shows both sample rates phase-continuous on two waveform cycles.
initial sample offset (sec)
—
input complex waveform
—
Y
—
error in
—
reset? (T)
—
output complex waveform
—
t0
—
Y
—
error out
—