# Trivial echo separation

Say we have a signal S, and we composite it with a 0.1-volume 30-sample-delayed version of itself, so:

T(k) = S(k) + 0.1*S(k-30)


How would one rearrange this equation to make S the subject?

i.e given the resultant signal T, and the fact that we know the parameters of the echo (0.1 and 30), how to reproduce the original S?

-
Linked: IR from Transfer Function –  P i Mar 12 '14 at 17:31

The way the signal $T(k)$ is generated is by applying an FIR (finite impulse response) filter to the signal $S(k)$. The transfer function of this FIR filter is

$$H(z)=1+0.1z^{-30}$$

If you want to compensate for such a filter, you need a filter with a transfer function which is the inverse of $H(z)$:

$$G(z)=1/H(z)=\frac{1}{1+0.1z^{-30}}$$

This is a recursive filter with an infinitely long impulse response (IIR). If you filter the signal $T(k)$ with this IIR filter, the result will be $S(k)$.

-

To complement Matt L. perfectly correct answer, the easy way to rearrange your equation to solve for $S$ is just like you'd do for any simple arithmetic equation:

\begin{aligned} T_k &= S_k + 0.1 \; S_{k-30} \\ \iff \quad S_k &= T_k - 0.1 \; S_{k-30} \\ \end{aligned}

But, I hear you saying, there's still an $S$ on the right hand side! Yes, there is, but it's a delayed version of $S$. If you just start at, say, sample $0$ and compute $S$ for successive samples, then by the time you need to compute $S_k$, you already know $S_{k-30}$, because you just computed it 30 steps ago.

-