Ripple in time-domain using lanczos resampling I'm seeing ripple in the time domain when resampling a "unity signal", that is, all ones, with lanczos filters. The ripple/error exactly resembles a cosine with a period of the sampling rate - ie. the error is largest at a fractionate sample offset of 0.5. Using larger $a$ for the lanczos kernel reduces the error, but it never ceases to exist.


Is this supposed to happen, or am I making an implementation error somewhere? Doing the convolution by hand shows that the terms never sum up to 1 (unless at offset = 0). Truncated sinc shows the same problem.
Are there any windowed sinc filters that do not exhibit this kind of error? Otherwise, any other suggestions for resampling techniques? I'm generally looking for something that offers the performance of a lanczos kernel with $a$ > 10.




Edit: Thanks for the comments. I'll elaborate a little on what I want: So I'm interpolating a waveform display. What's important and interesting is, that the interpolation passes through the original sample points and resembles the 'true' shape of the signal as much as possible. This means this is good:



So under- and overshoot is not a problem in itself (technically, it's the whole point). This, however, is (note this is just a DC signal) - ie. nothing in the signal provokes the ringing, it is just an artifact depending on your fractionate interpolation offset:
Figure 1. Illustration of the problem with Lanczos2 interpolation: The sum of the four time-shifted Lanczos-window multiplied sinc functions (red) do not sum (black) to unity in the middle between horizontal coordinates 1 and 2.

A simple fix would be to distribute one fourth of the deviation from unity as function of the fractional position in the middle interval, with negative sign, to each quadrant of the Lanczos2 kernel. The equations are lengthy, but this is all very easily done numerically. The difference to the original Lanczos2 kernel is small:

Figure 2. Lanczos2 kernel (blue) and fixed Lanczos2 kernel (red).

Figure 3. Fixed Lanczos2 kernels (red) sum to unity (black).

The magnitude frequency response from the fixed Lanczos2 kernel looks just fine compared to the original, by some measures even better:

Figure 4. Magnitude frequency response of Lanczos2 interpolation (blue) and the same with the fixed kernel (red).

A similar fix could be tried on larger Lanczos kernels. I tested it on Lanczos3 and saw no problems.