Stochastic approximation algorithm The goal is to find the FIR filter coefficients $\mathbf{h} = [5;3]$ with the help of the adaptive FIR filter $\mathbf{w}$ of order $p = 2$.

I have implemented the Stochastic approximation algorithm in MATLAB for this adaptive system identification problem.

$\mathbf{w}[k] = \mathbf{w}[k-1] + (1/k) \cdot \mathbf{x}[k] e[k]$ 

As input sequence I use white gaussian noise with zero mean and variance of 1.
Measurement noise is also WGN with variance of 1.

$N = 1000 $ ... number of measured datapoints

For the input sequence above my algorithm works fine and converges and I find the right $\mathbf{w}$.

However if I change my input sequence to $x[k] = 0.1 \cdot \cos(\pi k /(N/10))$ my algorithm doesn't find the right coefficients.

So my question is:

Is the Stochastic approximation algorithm restricted to special input sequences, and if so what is the optimal input sequence to use?
The issue is possibly that the input signal you have chosen is not persistently exciting.  This means that the signal doesn't "excite" enough modes of the filter in order to be able to accurately estimate its parameters.  Another way to think about it is that it doesn't have enough energy in enough places in the spectrum: just at the frequency of the cosine, whereas white noise has energy everywhere in the spectrum.

From the paper:


  Recent work (e.g. [1–5]) has shown the convergence and robustness properties of adaptive estimation
  and control algorithms to be closely related to persistence of excitation of regression vectors (equivalently
  that they have a sufficient number of spectral lines [5])