
|
  
Interpolation using FFT Summary FFT can be used to increase the sampling rate of a signal, in steps of one extra sample per cycle
| Example Figure 1 shows a continuous-time example signal (blue), sampled at a rather low rate (red).
Figure 1: Original continuous-time and sampled signal | FFT-based interpolation can increase the sample rate for example by factors of 2, 5 and 20 (Fig. 2, 3 and 4). The blue curve shows the continuous-time waveform for clarity. Interpolation uses uses only the samples (red in Fig. 1) as input.
Figure 2: FFT interpolation by 2 | Figure 3: FFT interpolation by 5 | Figure 4: FFT interpolation by 10 | Accuracy Besides numerical roundoff, there is no error.
| For a periodic signal, FFT interpolation is not an approximation, but an exact solution | Correctly used, is orders of magnitude more accurate than other common methods, for example polynomial interpolation or reasonably sized filters.
How does it work?   How it is possible to interpolate a periodic, bandlimited signal without error. Note, evaluating the sin/cos equations also allows interpolation to an arbitrary higher rate, which is not periodic anymore within the cycle length!
|
Where is the catch? Used correctly: there isn't any.
  Some background on using it “correctly”.
|
  Use real(...) on the result, when the expected result is real-valued.
|
Matlab / octave code Download Matlab / Octave function mn_FFT_interpolation.m Usage | data=mn_FFT_interpolation(data, 'factor', 3) | The number of samples in data increases by a factor of 3
| data=mn_FFT_interpolation(data, 'nSamplesAdded', 3) | The length of data increases by 3 samples.
| data=mn_FFT_interpolation(data, 'nSamplesTotal', 300) | The resulting length of data is 300 samples. Parameters leading to less output than input samples will cause an error message.
  
© Markus Nentwig 2007-2008
The content of this page is provided without any warranty and may not be reproduced without permission.
Comments? Questions?
Please send me a mail!
mnentwig@elisanet.fi
|