```> Hello. I have a toy situation in which,
>
> known the desired signal d(n),
>
> d(n) = sin(100*pi*n+pi/3);
>
> and a noisy signal, with white noise v(n) with known variance and mean
>
> x(n) = d(n) + v(n);

> According to "Statistical digital processing and modeling" by Hayes, the
> output error of LMS, for the same filter length, should be always greater
> than xi_min when the LMS filter reaches a steady state, because
>
> xi_LMS(inf) = xi_min + xi_excess(n)
>
> but in my case the LMS filter with fair values of the mu parameter (e.g.
> 10^-5) performs much better than the optimum filter, i.e. xi_excess is
> negative!!
> Is there an interpretation for that, or it's more likely that I did an
> error writing the code? I suppose that if there's a problem, it should be
> in the optimum filter computation...

While I'm not counting out entirely that your code is error-free :P, yes,
such behavior, so-called non-Wiener or non-linear phenomenon, occurs with the
LMS algorithm when you have strong narrowband input signals.

My intuitive interpretation of this effect is that if you have a periodic
deterministic (or almost deterministic) signal as a reference input, the LMS
algorithm updates its weight so that their time-varying dynamic behavior
(which we typically see as a bad guy as it's viewed as misadjustment) can be
used to our advantage to further reduce the error. In other words, the
optimal filter is then become a time-varying Wiener filter as opposed to the
conventional time-invariant Wiener filter.

I suspect that as you reduce the sinusoid power in x(n) w.r.t. the power of
v(n), you observe that the error level approaches and surpasses that of the
Wiener error level.

Hope this helps,
Kesh

>
> Gabriele Paganelli
>
```
```gabinet wrote:
> Hello. I have a toy situation in which,
>
> known the desired signal d(n),
>
> d(n) = sin(100*pi*n+pi/3);
>
> and a noisy signal, with white noise v(n) with known variance and mean
>
> x(n) = d(n) + v(n);
>
> the goal is define an optimal Wiener filter of 101 coefficients.
> (I call it "toy situation" because I have at the same time the value of
> the noisy signal and the value of the original signal)
>
> After some calculation, in this problem we have that the autocorrelation
> of the signal d(n) equals the correlation sequence between x(n) and d(n),
> r_dx(n).
>
> I calculated (with Matlab) r_d(n), the 101 pts autocorrelation sequence of
> d(n).
>
> I found the optimal coefficients w:
>
> w = (R_x^(-1)) * r_d(n)
>
> where R_x is the Toeplitz autocorrelation matrix of x,
> and the minimum error xi_min,
>
> xi_min = r_d(0) - r_d(0)'(R_x^-1)r_d(0)
>
> Then I implemented a LMS filter to compare the difference between the
> optimum coefficients and the coefficients estimated by LMS.
>
> According to "Statistical digital processing and modeling" by Hayes, the
> output error of LMS, for the same filter length, should be always greater
> than xi_min when the LMS filter reaches a steady state, because
>
> xi_LMS(inf) = xi_min + xi_excess(n)
>
> but in my case the LMS filter with fair values of the mu parameter (e.g.
> 10^-5) performs much better than the optimum filter, i.e. xi_excess is
> negative!!
> Is there an interpretation for that, or it's more likely that I did an
> error writing the code? I suppose that if there's a problem, it should be
> in the optimum filter computation...
>
> Gabriele Paganelli
>
How are you defining your signal for the purposes of synthesizing the
LMS algorithm would pick up on this and make a very narrow filter (with
tremendous noise attenuation) where your Wiener filter would be based on
whatever bandwidth you specified.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
```
```Hello. I have a toy situation in which,

known the desired signal d(n),

d(n) = sin(100*pi*n+pi/3);

and a noisy signal, with white noise v(n) with known variance and mean

x(n) = d(n) + v(n);

the goal is define an optimal Wiener filter of 101 coefficients.
(I call it "toy situation" because I have at the same time the value of
the noisy signal and the value of the original signal)

After some calculation, in this problem we have that the autocorrelation
of the signal d(n) equals the correlation sequence between x(n) and d(n),
r_dx(n).

I calculated (with Matlab) r_d(n), the 101 pts autocorrelation sequence of
d(n).

I found the optimal coefficients w:

w = (R_x^(-1)) * r_d(n)

where R_x is the Toeplitz autocorrelation matrix of x,
and the minimum error xi_min,

xi_min = r_d(0) - r_d(0)'(R_x^-1)r_d(0)

Then I implemented a LMS filter to compare the difference between the
optimum coefficients and the coefficients estimated by LMS.

According to "Statistical digital processing and modeling" by Hayes, the
output error of LMS, for the same filter length, should be always greater
than xi_min when the LMS filter reaches a steady state, because

xi_LMS(inf) = xi_min + xi_excess(n)

but in my case the LMS filter with fair values of the mu parameter (e.g.
10^-5) performs much better than the optimum filter, i.e. xi_excess is
negative!!
Is there an interpretation for that, or it's more likely that I did an
error writing the code? I suppose that if there's a problem, it should be
in the optimum filter computation...
{"ft_lang_label":"__label__en","ft_lang_prob":0.89605385,"math_prob":0.94275606,"size":5646,"snap":"2021-43-2021-49","text_gpt3_token_len":1495,"char_repetition_ratio":0.114321165,"word_repetition_ratio":0.5324408,"special_character_ratio":0.26585194,"punctuation_ratio":0.11141305,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99711937,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-28T15:08:18Z\",\"WARC-Record-ID\":\"<urn:uuid:7bf7b291-3971-4008-b91f-3b17bf81d72f>\",\"Content-Length\":\"9623\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:751889aa-7551-4797-9f77-fa54ecbcd0e9>\",\"WARC-Concurrent-To\":\"<urn:uuid:1033beb8-dd56-4160-a365-dba158387bfa>\",\"WARC-IP-Address\":\"69.16.201.59\",\"WARC-Target-URI\":\"https://www.dsprelated.com/new2/showthread_ajax.php?threadid=78540&group=comp.dsp&sort=nf&page=1&tabshash=tabs1-achronological\",\"WARC-Payload-Digest\":\"sha1:MTTC5HGFJWJPFHVGBPFCYQRLBHAEPAFS\",\"WARC-Block-Digest\":\"sha1:E3YDALN5WCOGOGZFJJ2OBOWRHML6YWG4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323588341.58_warc_CC-MAIN-20211028131628-20211028161628-00019.warc.gz\"}"}