Given a signal X which is sampled at a certain frequency. The value we currently compute is given as the integral of the upsampled signal. Thus: Y = X but 100 times upsampled, by means of sinc interpolation or by using an FFT resampler. The integral is simply the sum of all values in Y.

The calculation of this integral is easy, yet I would like to speed it up by avoiding the upsampling step. Is there any possibility to obtain the integral of the upsampled signal, without actually resampling it ?

Preserving integral through downsampling and Do lowpass filters affect the integral over the signal? are similar questions, but deal with cases of downsampling or bandlimiting. In both cases, it is clear that an integral will not exactly be preserved by downscaling.

Yet, in this question, we are talking about upsampling. I suspect this is possibly because X does contain all information necessary to create Y.


1 Answer 1


If you upsample a causal discrete-time signal $x[n]$ by an integer factor $L$ and you use an interpolation filter with a causal impulse response $h[n]$, the upsampled and interpolated signal is given by


(Note that the requirement of causality can be easily removed; I just use it to have the lower summation indices start with the value $0$.)

If you want to compute the sum of $y[n]$, you would need to compute


However, you can interchange the sums in (2), resulting in


The value of the inner sum in (3) is independent of the index $k$, so we can write

$$s_y=s_h\cdot \sum_{k=0}^{\infty}x[k]=s_h\cdot s_x\tag{4}$$



So the sum of the upsampled and interpolated signal is simply the sum of the original signal times a factor which is given by the sum over the impulse response values of the interpolation filter. Note that for the ideal sinc filter, this factor equals the upsampling factor $L$. This is also at least approximately true for all practical interpolation filters, because the sum over the impulse response equals the DC gain of the interpolation filter, which should ideally equal $L$.

So if you want to keep things simple (and why wouldn't you?), you could use

$$s_y\approx L\cdot s_x$$

which is a very good approximation (or even exactly true) for any reasonable interpolation filter.

In the above derivations I've assumed that all the (infinite) sums exist, which in practice is always the case if we deal with finite length signals and with stable interpolation filters.

  • $\begingroup$ I am looking at equation (3) where later it is referred to as that inner sum is independent of index k... ok the dummy index is clearly n but the summand also depends on k as in the form h[n-kL]. Can we still say that in the general case the inner sum in (3) will not depend on k? or is this only true for an ideal sinc based interpolator ? or is it too late and I'm mistaken ? $\endgroup$
    – Fat32
    Commented May 31, 2015 at 19:52
  • $\begingroup$ @Fat32: Since the index of the sum over $n$ goes to infinity (or to the finite length of $y[n]$ if both $x[n]$ and $h[n]$ are of finite length), the shifting of $h[n]$ by $kL$ does not change the value of the sum. I probably should have said 'the value of the inner sum is independent of $k$'. $\endgroup$
    – Matt L.
    Commented May 31, 2015 at 20:03
  • $\begingroup$ ok I see what you mean now. For the sake of perfectness (as you are known to seek after ;) ) can you also briefly clarify why that sum's value is independent of the shifts of kL, as something imposed by a property of specific class of h[n] or just for any h[n]... $\endgroup$
    – Fat32
    Commented May 31, 2015 at 20:11
  • $\begingroup$ @Fat32: Well, I think it's clear that in general $\sum_{n=-\infty}^{\infty}x[n-k]=\sum_{n=-\infty}^{\infty}x[n]$ for any $k$. The fact that the sums in my answer start at index $0$ just reflects the causality of all sequences. This latter assumption is no restriction and could be removed if desired. So there is no restriction as to the class of $h[n]$, just causality, but this was a choice for notational convenience and is actually not necessary. I might actually just remove it to avoid further misunderstandings ... $\endgroup$
    – Matt L.
    Commented May 31, 2015 at 20:21
  • $\begingroup$ ok I got it now... sorry It was my laziness... $\endgroup$
    – Fat32
    Commented May 31, 2015 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.