FOREVER { x += -a * (x - x0) }
x gets updated every time we go round the loop.
Assume that the loop time is very small, say dt,
(x - x0) requires
talking to hardware.Then the code amounts to
x(t + dt) = x(t) - a(x(t) - x0)
which can be turned into a differential equation and solved
x(t) - x0 = Constant * exp( -at )
What you see here is, in essence, Newton's method of finding roots, which, when it converges, converges exponentially.
FOREVER { x += -a * (x - x0(t)) }
We can work hard on this and discover that
x(t) - x0(t) = exp( -at ) \int^t exp( at') u'(t') dt'
In other words, we converge on a moving target as long as it doesn't move too fast
Return to: