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. – Cedron Dawg Jul 11 '20 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. – Cedron Dawg Jul 11 '20 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. – Black Yasmin Jul 16 '20 at 15:45
• @BlackYasmin Good to know, thanks – Tobi Akinyemi Jul 16 '20 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 which video? – Tobi Akinyemi Jul 12 '20 at 12:22
• Is there a reason you prefer cubic interpolation to sinc interprolation? – Tobi Akinyemi Jul 16 '20 at 16:13