Filter to speed up convergence of geometric series I want to speed up convergence of geometric series
$\ \  lim + c^n \ \ $ where $|c| &lt; 1$ and $lim$ is not known.
A basic low-pass filter, here Butterworth, is good for $-1 &lt; c &lt; 0$ but not $0 &lt; c &lt; 1$:

butter  N 2  Wn 0.5:  [.293 .586 .293] / [1 0 .172]
|response|: [100 100  99  97  88  71  47  25  10   3   0]
(-.8) ^ n  [100 -80  64 -51  41 -33  26 -21  17 -13]  -&gt;  [29 35 -4 -7  1  1  0  0  0  0]
.8 ^ n     [100  80  64  51  41  33  26  21  17  13]  -&gt;  [29 82 90 62 45 38 31 25 20 16]


Is there a filter that does both ?

Why: many iterative processes that generate points $X_n$ in 1d, 3d, 100d
converge to an $X_{lim}$ slowly,
but roughly geometrically:
either one-sided like $.8^n$, or oscillating like $(-.8)^n$ .
It would be nice to have a simple, robust filter that speeds up both.

Shanks transformation
is a nonlinear transform that works really well on geometric series.
But on linear input 1 2 3 it'll divide by 0.
(Check for that, push on regardless ? practical, but unsatisfying.)
(I believe that 
Aitken's delta-squared process
is the same as Shanks -- not sure.)
The problem is that in the case with positive $c$ you have a DC desired signal ($lim$) and a low frequency noise ($c^n$). In the case when $c$ is negative you have a high frequency noise signal, which is of course much easier to separate from the desired DC value.

If you figure out some way to estimate $c$ (sign and magnitude) you can use a simple FIR filter


b=[1,-c]/(1-c); a=1;


which will exactly eliminate the exponentially decaying noise:

$$y[n]=\frac{1}{1-c}(x[n]-cx[n-1])=\frac{1}{1-c}(lim+c^n-c\cdot lim - c\cdot c^{n-1})=lim$$