niRFSG Fractional Resampling VI
- Updated2024-05-08
- 7 minute(s) read
niRFSG Fractional Resampling VI
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.
niRFSG Fractional Resampling (I-Q)
Accepts 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.
![]() |
I specifies the in-phase (I) component of the complex baseband signal. |
![]() |
Q specifies the quadrature-phase (Q) component of the complex baseband signal. |
![]() |
input sample rate specifies the sample rate of the input data. This value is expressed in hertz. |
![]() |
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. |
![]() |
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 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. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
I out returns the resampled complex baseband in-phase (I) data. |
![]() |
Q out returns the resampled complex baseband quadrature-phase (Q) data. |
![]() |
error out contains error information. This output provides standard error out functionality. |
niRFSG Fractional Resampling (CWDT)
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 backwards in time, respectively, relative to input complex waveform.
![]() |
input complex waveform specifies the complex baseband waveform data. |
![]() |
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. |
![]() |
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 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. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
output complex waveform returns the resampled complex baseband waveform data. |
![]() |
error out contains error information. This output provides standard error out functionality. |
niRFSG Fractional Resampling (Complex Input)
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.
![]() |
input complex waveform specifies the complex baseband waveform data.
|
||||||
![]() |
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. |
||||||
![]() |
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 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. |
||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
||||||
![]() |
output complex waveform returns the resampled complex baseband waveform data.
|
||||||
![]() |
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.
![]() |
Note The sample rate of your waveform corresponds to the IQ Rate (S/s) property in NI-RFSG. |
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.
![]() |
Note You can use the rfsg_Resample and Write VI to ensure that the signal's phase continuity is maintained while resampling. |