Echo cancelling using autocorrelation function
Haven't you already got it there?

$$
\hat{k} = \arg \max_{l &gt; \frac{k}{10}} r_{xx}(l)
$$
and
$$
\hat{\mu} = \sqrt{\frac{r_{xx}(0) }{ r_{ss}(0) } - 1}
$$

The R code below outputs the figure and:


  "k Estimate: 613  vs  613  mu Estimate :  0.747619585689531  vs  0.768768"






R Code

# 26617

T &lt;- 10000
mu &lt;- 0.768768
k &lt;- 613

s &lt;- filter(runif(T,-1,1), rep(10/k,k/10), circular = TRUE)


x &lt;- s + mu*c(rep(0,k),s[1:(T-k)])


par(mfrow=c(2,1))
r_xx = acf(x, lag.max=1000, type="covariance")

min_idx &lt;- floor(k/10)
mx &lt;- which.max(r_xx$acf[(min_idx+1):10000])

khat &lt;- min_idx+mx-1 # R indices start from 1, not 0

points(min_idx+mx,r_xx$acf[khat], col="red", pch=19)

r_ss = acf(s, lag.max=1000, type="covariance")

muhat &lt;- sqrt( r_xx$acf[1] / r_ss$acf[1] - 1 )
print(paste("k Estimate:" , khat, " vs " , k, " mu Estimate : ", muhat, " vs ", mu ))