3
$\begingroup$

I am trying to solve the following exercise:

Show that the signal $x_n = A\cos(\omega n)$ can be fully predicted by a system with two weights $w_1,w_2$ (i.e. $x_n = w_1 x_{n-1} + w_2 x_{n-2}$). Find $w_1,w_2$.

Some ideas came up but, even if they are right, I can't seem to order them in the right direction:

  1. I can see that $x'' = -\omega^2x$. Does it connected somehow to what is asked?

  2. I guess it has something to do with stationary signals. If yes, how can I prove that this signal is stationary? (Also, somehow I can't find in the internet a clear definition of "stationary signal". Just vage ideas like "not depended on time". What does this mean mathematically for a signal to be "not depended on time"?)

  3. Maybe it is concerned with some trigonometry of this form: $$ x_{n+2} = A\cos((n+2)\omega) = A\cos(n\omega + 2\omega) = A\cos(n\omega)\cos(2\omega) - A\sin(n\omega)\sin(2\omega) = B\cos(n\omega) + C\sin(n\omega)$$ I could go on with this development but I am realy not sure what am I looking for..

Any help? Thanks!

$\endgroup$
  • $\begingroup$ Don't be confused about the variable names $w$ and $\omega$. They may have been chosen just to confuse you. They are just labels that happen to look similar. Continue your step 3 for $x_{n+1}$ and substitute $x_n$ back in where you can. You should see your way through the rest. $\endgroup$ – Jim Mar 23 '16 at 18:32
0
$\begingroup$

You are almost there (third idea);: you should also write down $x_{n+1}$ and look for a combination the eliminates the $\sin$ term. That's a little easier when making it centered:

$$ x_{n}=A \cos (\omega n)$$ $$ x_{n+1}=A \cos (\omega (n+1))=A \cos (\omega n) \cos \omega - A \sin (\omega n) \sin \omega$$ $$ x_{n-1}=A \cos (\omega (n-1))=A \cos (\omega n) \cos \omega + A \sin (\omega n) \sin \omega$$

Summing the last two, we get:

$$ x_{n+1} + x_{n-1} = 2 A \cos (\omega n) \cos \omega = 2 x_n \cos \omega $$

Hence the recursion is

$$ x_{n+1} = (2 \cos \omega) \, x_n - x_{n-1} \tag{1}$$

BTW: this is LTI (linear time invariant) causal system (or "filter"). But it has a pole over the unit circle, and hence it's just marginally stable. This suggests that using the equation in practice to compute the succesive values might have numerical problems.

Regarding your first idea: It's not the way, but it's certainly suggestive. If we replace the second derivative by its analogous discretized difference (centered) we get

$$ x_{n+1} -2 x_n + x_{n-1} = -\omega^2 x_n $$ or

$$ x_{n+1} = (2 -\omega^2 ) x_n - x_{n-1} \tag{2} $$

This is not the same as the correct formula $(1)$, but if $\omega$ is small, then the first order Taylor expansion is $\cos \omega \approx 1- \omega^2/2$ which makes $(1)$ and $(2)$ coincide.

Regarding your second idea: stationarity has nothing to do with this. Stationarity is a statistical concept, it applies to random signals (it's statistics does not depend on the time). This is a deterministic signal.

$\endgroup$
0
$\begingroup$

It's a linear system, and you can calculate all the $x_i$, so

$$ \left[ \begin{array}{cc} x_{n-1} & x_{n-2} \\ x_{n-2} & x_{n-3} \end{array} \right] \left[ \begin{array}{c} w_{1} \\ w_{2} \end{array} \right] = \left[ \begin{array}{c} x_{n} \\ x_{n-1} \end{array} \right]. $$

To be robust, I'd try to show that the matrix is always full-rank and, thus, $w_1$ and $w_2$ can always be found. To that, all you have to do is show that the determinant is not zero, thus

$$ x_{n-1} x_{n-3} - x_{n-2} x_{n-2} \neq 0. \\ \Rightarrow \cos(\omega(n-1)) \cos(\omega(n-3)) - \cos^2( \omega(n-2)) \neq 0 $$

After simplifying, I get the condition that $\cos(2\omega) - 1 \neq 0$, which means only when $\omega = k\pi$, $k\in\mathbb{Z}$ will the determinant be zero. You can handle this case separately with induction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.