# The effect of upsampling on DFT coefficients

I am learning DSP by myself and I encountered a problem that bewilders me. If I have a sequence of length N, and I upsample it by a factor of 3. How would the DFT change or related?

For example:

x = [1 2 3 4 5 6 7];

y = [1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 7];

What is the difference between $$X[k]$$ and $$Y[k]$$?

Note that if you upsample a sequence $$x[n]$$ by a factor $$M$$ you have

$$y[Mn]=x[n]\tag{1}$$

The DFT of $$x[n]$$ is

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j\frac{2\pi}{N}nk}\tag{2}$$

The DFT length of $$y[n]$$ is $$MN$$, so the DFT of $$y[n]$$ is

$$Y[k]=\sum_{n=0}^{MN-1}y[n]e^{-j\frac{2\pi}{MN}nk}\tag{3}$$

Since only every $$M^{th}$$ sample of $$y[n]$$ is non-zero, $$(3)$$ can be written as

$$Y[k]=\sum_{n=0}^{N-1}y[Mn]e^{-j\frac{2\pi}{MN}Mnk}=\sum_{n=0}^{N-1}y[Mn]e^{-j\frac{2\pi}{N}nk}\tag{4}$$

With $$(1)$$ we get

$$Y[k]=X[k]\tag{5}$$

Note that from $$(2)$$ $$X[k]$$ is $$N$$-periodic, so the length $$MN$$ DFT of $$y[n]$$ is just an $$M$$-fold repetition of the DFT coefficients of $$x[n]$$.

A simple example:

x = [1,1];
X = fft(x)
ans =

2   0

y = [1,0,1,0];
fft(y)
ans =

2   0   2   0

y=[1,0,0,1,0,0];
fft(y)
ans =

2   0   2   0   2   0

• Thank you! That was very explanatory! Oct 23 '19 at 18:31