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.
- X is the input array for resampling. The time interval between two adjacent samples is 1.
- This node inserts zeros between every two adjacent samples to upsample X by the Interpolation factor. Let X1represent the interpolated signal.
- 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.
- This node moves the filter to the position Start Index + Decimation Factor and filters again to obtain the second output sample.
- 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.