niRFSG Fractional Resampling VI
- Updated2025-10-14
- 3 minute(s) read
Resamples and/or realigns a complex-valued waveform that you specify. This VI has three polymorphic instances, which accept as data input a complex cluster, a complex waveform, or an I/Q array.

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.