-1
$\begingroup$

I've been learning about the (Fast) Fourier Transform and it's uses.

Using the formula:

$$FFT(concatenate(IFFT(signal), 0^\text{increase}))$$

I was able to go from this signal:

enter image description here

to this:

enter image description here

by settings $increase = 10000$ - introducing 10,000 samples.

Is this a good, general way to do upscaling? Is this how it's done in practice.

Could a similar method be used for downsampling?

$\endgroup$
4
  • 1
    $\begingroup$ Get yourself some popcorn, get ready for some slogging, and follow the discussion in this question and the referenced question thereof dsp.stackexchange.com/questions/59068/… and you should find the answers you seek. $\endgroup$ Jul 11, 2020 at 23:08
  • $\begingroup$ I'm chuckling. Old fart here. If you can't find one, perhaps you can make one. At the very least, try to understand the point being made with the "fluffy cloud" drawings in my answer there (the upper half of the DFT represents negative frequencies). The main point of contention in the discussion is the need to split the Nyquist bin when zero padding the DFT before taking its inverse. Yes, Downsampling can be done in a similar manner, taking care to construct a proper new Nyquist in order to keep your signal real. Using odd Ns avoids the issue. The fftshift is something to look into also. $\endgroup$ Jul 11, 2020 at 23:44
  • $\begingroup$ Padding in time domain does interpolation in frequency domain and padding in frequency domain does interpolation in time domain. if you change window different function is used and not sinc. $\endgroup$ Jul 16, 2020 at 15:45
  • $\begingroup$ @BlackYasmin Good to know, thanks $\endgroup$ Jul 16, 2020 at 16:55

1 Answer 1

2
$\begingroup$

Depends on who's practicing and what they are doing. You should know that it is mathematically equivalent to doing interpolation using the discrete sinc function (aka Dirichlet kernel, or alias sinc). As your N gets large, this approaches the normalized sinc function. Personally, I'm likely to use cubic interpolation, see Multi-channel audio upsampling interpolation for a comparison. Others here have different experiences and might chime in.

Here are some more answers that are related to this. Load up on more popcorn, lots of reading and math.

Frequency Domain Interpolation: Convolution with Sinc Function

What's the theoretical bandwidth?

Totally looking forward to your video, please post a link here.

$\endgroup$
5
  • $\begingroup$ Great answer. I’d add that the method as proposed by the OP would generally be considered correct, but you have gone above and beyond with your sources and pointing out the nuance. $\endgroup$
    – Dan Szabo
    Jul 12, 2020 at 1:25
  • $\begingroup$ Totally looking forward to your video, please post a link here which video? $\endgroup$ Jul 12, 2020 at 12:22
  • $\begingroup$ 'Morning Tobi, from the comment above: " If you can't find one, perhaps you can make one." Call it a challenge. Nothing makes you understand a concept better than having to explain it other than having figured it out yourself. $\endgroup$ Jul 12, 2020 at 12:25
  • $\begingroup$ @DanSzabo Thanks for the kind words. I wasn't quite able to answer the main thrust of how often it is actually used. I did sort of leave out that a sinc interpolation can be more efficiently approximated by zero padding the signal properly and applying this technique. I've read about that here, never done it myself, don't know how prevalent it is. $\endgroup$ Jul 12, 2020 at 12:29
  • $\begingroup$ Is there a reason you prefer cubic interpolation to sinc interprolation? $\endgroup$ Jul 16, 2020 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.