So I'm trying to write a frequency-domain interpolator that zero-pads the frequency response of a signal and inverse transforms. There's two cases I have to deal with:
- Even-length response - have to split the Fs/2 bin because it's ambiguous. So I copy the negative part of the spectrum, and add N*(INTERP-1)-1 zeros in between.
- Odd-length response - there is no Fs/2 bin so just split positive/negative frequency and insert N*(INTERP-1) zeros between them.
The code that does the zero-padding can be seen here
The first case is working fine, I'm testing it on a chirp signal and it interpolates just fine, there's a little numeric noise, but it's round tripped through an FFT so what can you do (first 50us or so of the signal show):
The problem is with the odd-length transform, I'm getting a pretty heinous transient response on the real samples only (50us again, real):
The imaginary channel has a small ripple on it, but not nearly as bad:
It's like I've screwed up my Fs/2 bin in the odd case, but there is no Fs/2 bin, so I'm very puzzled. Anyone have any thoughts?


