# How does the number of frequency-domain sampling points influence the outcome of an inverse FFT?

Given some frequency-domain representation of an impulse response.

How does the number of frequency-domain sampling points influence the outcome of an inverse FFT, if I keep the sampling frequency constant?

Example 1 Take x(t) = e^(-t)*sin(t) for t in (0,10). Sample the signal, take its fft. Omit every second point of the fft and on the result do an inverse fft. Here is the result:

So it looks as if the frequency-domain downsampling had removed the second portion of my signal, while dividing the first part by two. (Indeed multiplying the result by two results in a curve lying exactly above the first part of the original signal.)

• Why did it remove the second part and not some arbitrary other part? I guess this is related to the second part being nearly zero everywhere, but I can't seem to find the exact reason.
• Why is the result divided by two?
• How does this generalize to other time signals?

Example 2 (pathological) Same as above, this time with a signal that is linearly decreasing from 1 to 0.1.

Now what is that?

Edit There was a mistake here: I accidentally used an uneven number of sampling points, which resulted in a complex signal after the ifft. Here is the fixed plot.

I'm interested in mathematical/theoretical as well as intuitive explanations of what's going on, as well as pointers on where to read on. I even had trouble finding a correct term for what I am doing.

Here's the R code that produced the above plots.

# First plot
t <- seq(0.01, 10, 0.01)
z <- exp(-t)*sin(t)
Z <- fft(z)/length(z)
Z2 <- Z[seq(1,length(Z),2)]
z2 <- fft(Z2, inverse=T)
plot(z)
points(Re(z2), col="red")
legend("topright", legend=c("original", "half-sampled"), fill=c("black", "red", "blue"))

# Second plot
x <- seq(1,0.101, -0.001)
X <- fft(x)/length(x)
X2 <- X[seq(1,length(X),2)]
x2 <- fft(X2, inverse=T)
plot(x)
points(Re(x2), col="red")
legend("topright", legend=c("original", "half-sampled"), fill=c("black", "red", "blue"))

• By throwing away every other FFT coefficient, you introduce aliasing in the time domain. This is what you see in the first example. Here the shape of the signal remains virtually unchanged, because the second half of the original signal is almost zero. What you see in the second example is an artefact because X2 is not a valid FFT of a real-valued signal. If you check you'll see that the imaginary part of ifft(X2) is much greater than what you'd expect due to numerical effects. This has to do with the fact that the signal length is odd. I'll write a more detailed answer later. – Matt L. Aug 14 '14 at 16:58
• Thanks for the comment! I had already fixed that problem with the uneven number of sampling points before, must have somehow slipped through my fingers again... Apart of that, the time domain aliasing really answers the question! This also perfectly explains what I got in the second example. – jhin Aug 14 '14 at 17:22
• What I'm actually trying to do is to obtain a good estimate of my impulse response with as few evaluations of my frequency domain expressions as possible (since evaluating it is very costly). So a valid strategy would be to choose the number of sampling points in the frequency domain such that I obtain an impulse response that's essentially zero for at least several samples towards one end, right? Does anyone have a better suggestion on how to do this effectively? – jhin Aug 14 '14 at 17:38
• I think it would make a lot of sense if you formulated another question about this. It would be helpful if you explained how exactly (and based on what data) you want to estimate the impulse response. – Matt L. Aug 14 '14 at 19:40

first of all, either the fft or the ifft needs to be normalised by the number of sampling points as you have done (actually you can normalise each by a factor of the square root of the number of points, it is just a meter of definition). However, in your case the ifft is half the length of the fft you performed. Hence your signal is divided by 2. If you would perform the normalisation when calling the ifft (using half the original number of samples) you should get the correct height.