# Inter-point interpolation using FIR filter

Suppose I have discrete noisy signal $X = (0.096, -0.0632, 0.351, 0.531, 0.360, 0.006, -0.320)$ sampled at discrete time points $T = (1, 2, 3, 4, 5, 6, 7)$. Filtering (zero-padded) $X$ with symmetrical FIR $G = (\frac{1}{4}, \frac{1}{2}, \frac{1}{4})$ gives me a good approximation of underlying $f(t)$ but only at discrete time points $T$. Is it possible to use filter coefficients to approximate the values of $f(t)$ between discrete values, e.g. estimate $f(\sqrt 2)$?

In Interpolation with an FIR filter user Hilmar mentions Whittaker–Shannon interpolation formula, but it is sensitive to noise. Is it possible to construct smooth but more noise-robust interpolation by using FIR coefficients somehow?

Or, separate interpolation step (e.g. spline or polynomial interpolation) after FIR application is the only practical way to go?

From Hilmar's answer to the linked question, the Whittaker–Shannon interpolation formula is:

$$x(t)=\sum_{n=-\infty }^{\infty }x[n]\cdot \operatorname{sinc}\left(\frac{t-nT}{T}\right).$$

If the signal is low-pass and the noise is high-pass, to filter high-pass noise, we can make a low-pass version of the interpolation formula:

$$x(t)=\sum_{n=-\infty }^{\infty }x[n]\cdot 2f_c/f_s\cdot \operatorname{sinc}\left(\frac{t-2f_c/f_s\cdot nT}{T}\right),$$

where $f_c$ is the cutoff frequency and $f_s$ is the sampling frequency. The highest signal-to-noise ratio is obtained by setting the cutoff frequency to a frequency for which the signal and the noise have equal power. Actually the Whittaker–Shannon interpolation formula is low-pass as well, with $f_c=f_s/2$.

• Unfortunately, I don't know $f_c$, only filter coefficients $G$. Is it possible to generalize the formula for arbitrary symmetric $G$? – Andrey Paramonov Mar 31 '16 at 13:58
• You could the -3dB cutoff frequency of your filter with coefficients $G$: $\omega_c = 1.14371774040242049375067,$ solved numerically from $\left|\frac{1}{4}\exp(- i\omega) + \frac{1}{2} + \frac{1}{4}\exp(i \omega)\right| = \sqrt{0.5}.$ Then $f_c/f_s = \omega_c/(2\pi)$ – Olli Niemitalo Mar 31 '16 at 14:33
• ...assuming that your filter (with coefficients $G$) has the same sampling rate as your signal. – Olli Niemitalo Mar 31 '16 at 21:24

The filter you are applying is a lowpass. So noise is high frequency? You could just do an upsampling of your signal and set the cutoff frequency of the lowpass, that is required for upsampling, to the lowest frequency of the noise. Then you have two tasks in one step: de-noising and interpolating.

• Upsampling wouldn't enable me to get $f(t)$ for any real $t$, unfortunately. Also, upsampling would require a lot of memory, while the time points $t$ I'm interested in are sparse. – Andrey Paramonov Mar 31 '16 at 11:51