# Basic upsampling of a signal

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:

to this:

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?

• 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. Jul 11, 2020 at 23:08
• 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. Jul 11, 2020 at 23:44
• 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. Jul 16, 2020 at 15:45
• @BlackYasmin Good to know, thanks Jul 16, 2020 at 16:55

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.

• 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. Jul 12, 2020 at 1:25
• Totally looking forward to your video, please post a link here which video? Jul 12, 2020 at 12:22
• '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. Jul 12, 2020 at 12:25
• @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. Jul 12, 2020 at 12:29
• Is there a reason you prefer cubic interpolation to sinc interprolation? Jul 16, 2020 at 16:13