I am working on an audio upsampling/oversampling project where I am testing different interpolating schemes in hardware and comparing measurements to my expected results. In one of my interpolating strategies, linear (first-order-hold), I am measuring unexpected FFT peaks centered around the Nyquist frequency.

My setup is: between every two digital samples of recorded audio (44.1kHz), 15 intermediate samples are computed along a line (fixed point, in an FPGA). The 16x oversampled data is sent to a D/A (which zero-order-holds, obviously) and measured on a scope.

The results: if for example I am playing a tone signal of 2kHz, in FFT on oscilloscope I see main fundamental, small peak at (22.1-2)kHz, and a small peak at (22.1+2)kHz - unexpectedly! I also see as expected images centered around 44.1kHZ, 88.2kHZ, etc (these are also small, on account of linear interp./ZOH of DAC). I don't have any explicit analog processing.

Theories: I honeslty don't know...but possibilities are:

  • scaling I do in FPGA to convert from 16 bit input to 20 bits for DAC

  • using fixed point arithmetic in FPGA (I don't ever overflow or anything, but it rounds everything so it's not exact to be sure)

  • technically non-uniform sampling (I space the samples I created pretty evenly in time, but not perfectly...the last interpolated sample (i.e., #15 is held a little longer than the rest)

Any ideas on what gives?

  • $\begingroup$ Have you tried the experiment without any oversampling? $\endgroup$
    – MBaz
    Jan 27, 2016 at 22:28
  • $\begingroup$ can you provide an input and ouput signal sample ? so that we can also see those behaviour around Nyquist frequency? $\endgroup$
    – Fat32
    May 27, 2016 at 11:52

1 Answer 1


You're doing interpolation "wrong", at least in the sense I assume you want it to happen.

So what you'd normally do is just take every input sample, and insert 15 zeros in between each of them. Spectrally, the resulting signal would be your input signal, plus 14 images of it, spaced 1/15 of the output bandwidth.

Now, your approach of sample and hold interpolation is the same signal, i.e. the zero padded one, unshifted, plus shifted by one sample, plus shifted by two..., plus shifted by 14 samples. So let $x$ be the input $y$ be the zero-padded and $w$ be your repetition-interpolated signal:

$$\begin{align*} x[n]&:=\text{input}\\ y[n] &= \begin{cases} x[\frac{n}{15}]& \text{for}\, n\, \mathrm{mod}\, 15 = 0\\ 0& \text{else} \end{cases}\\ w[n] &= x\left[\left\lfloor \frac{n}{15}\right\rfloor\right]\\ &= x[n] + x[n-1] + \dots + x[n-14]\\ &= \sum_{l=0}^{14}x[n-l] \end{align*}$$

Hence, the spectrum of $w$ is just that of $y$, superimposed with 14 phase-rotated versions of itself.

$$\begin{align*} W[z] &= \sum_{l=0}^{14}\mathcal{Z}\left\{x[n-l]\right\} \end{align*}$$

In fact, you've built a signal whose 15 polyphase decomposition components are identical!

Now, that will lead to interesting effects. In contrast, if you did the usual interpolation, i.e. took my $y[n]$ and low-pass filtering it to its original Nyquist bandwidth (i.e. $\frac{1}{15}$ of the output rate) it, none of the polyphase components of the resulting signal wouldn't be identical to the previous one -- they'd incorporate a phase shift that ensures continuity.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.