I am trying to cancel one term within a function by convolution.
$y[n] = x[n] + 2x[n-N]$
$y[n] * h[n] = x[n]$
here, $x$ is periodic and $N$ is a delay
how can I find $h[n]$ such that convolution with $h[n]$ cancels the second term of $y[n]$ but leaves the first? Is this possible?
Thank you
Just to outline what you can do. Formally:
$$ y_n = x_n + 2 x_{n-N} $$ $$ \frac12 y_{n+N} = \frac12 x_{n+N} + x_n $$ $$ \frac12 \left( y_{n+N} - x_{n+N} \right) = x_n $$
So you get after changing variables
$$ \frac12 \left( y_{n + 2N} - x_{n+2N} \right) = x_{n+N} $$
Plugging back into two lines above you get
$$ \frac12 \left( y_{n+N} - \frac12 \left( y_{n+2N} - x_{n+2N} \right) \right) = x_n $$
Iterate this procedure you find
$$ x_n = \frac12 y_{n+N} - \frac14 y_{n+2N} + \frac18 y_{n+3N} - \frac1{16} y_{n+4N} + \cdots $$
Now, if $x_n$ is periodic, so is $y_n$. Let $M$ be the period. Let $k$ be the smallest positive number such that $kN$ is a multiple of $M$. Then you can write
$$ x_n = \left( \frac12 y_{n+N} - \frac14 y_{n+2N} + \cdots \pm \frac1{2^{k}} y_{n+kN} \right) \sum_{j = 0}^\infty (-1)^{kj} \frac1{2^{kj}} $$
The final number is a constant that you can evaluate using geometric series. The terms in the parentheses can be expressed as a convolution of $y$ with an appropriate kernel.
If you are doing signal processing, then it is even easier. Since $x_n$ is periodic. Let $X_\mu$ be its discrete Fourier transform and $Y_\mu$ that of $y_n$. Then in frequency space you have
$$ Y_\mu = X_\mu [1 + 2 \exp( - i \frac{2\pi}{M} \mu N ) ] $$
where $M$ is the period of your signal. So to recover $X_\mu$ from $Y_\mu$ you just divide by the multiplication factor (which never vanishes since it is a sum of two complex numbers, one with norm 1 and one with norm 2).
If you want to approach using convolutions, your function $h$ is the inverse Fourier transform of
$$ H_\mu = \frac{1}{1 + 2 \exp( -i \frac{2\pi}M \mu N )} $$