Recursive estimation of time delay in sampled systems