<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="new4">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The LMS Adaptive Filter Algorithm</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">**new**</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/07/01 14:37:34.995 GMT-5</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/08/04 17:08:45.570 GMT-5</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dljones">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Douglas</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">L.</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Jones</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dl-jones@uiuc.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="dljones">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Douglas</md:firstname>
      <md:othername xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">L.</md:othername>
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Jones</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">dl-jones@uiuc.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="kclarks">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Kyle</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Clarkson</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">kclarks@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/"/>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para1">
       Recall the Weiner filter problem
      
      <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure1">
	<media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="Discrete-Timefig1.png"/>
      </figure>
      
      <m:math>
	<m:set>
	  <m:ci>
	    <m:msub>
	      <m:mi>x</m:mi>
	      <m:mi>k</m:mi>
	    </m:msub>
	  </m:ci>
	</m:set>
      </m:math>,
      <m:math>
	<m:set>
	  <m:ci>
	    <m:msub>
	      <m:mi>d</m:mi>
	      <m:mi>k</m:mi>
	    </m:msub>
	  </m:ci>
	</m:set>
      </m:math> jointly wide sense stationary
      
    </para>   

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para2">
      Find <m:math><m:ci>W</m:ci></m:math> minimizing
      <m:math>
	<m:apply>
	  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
	  <m:apply>
	    <m:power/>
	    <m:ci>
	      <m:msub>
		<m:mi>ε</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:cn>2</m:cn>
	  </m:apply>
	</m:apply>
      </m:math>

      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msub>
	      <m:mi>ε</m:mi>
	      <m:mi>k</m:mi>
	    </m:msub>
	  </m:ci>
	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msub>
		<m:mi>d</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:ci>
	      <m:msub>
		<m:mi>y</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	  </m:apply>
	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msub>
		<m:mi>d</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:sum/>
	      <m:bvar>
		<m:ci>i</m:ci>
	      </m:bvar>
	      <m:uplimit>
		<m:apply>
		  <m:minus/>
		  <m:ci>M</m:ci>
		  <m:cn>1</m:cn>
		</m:apply>
	      </m:uplimit>
	      <m:lowlimit>
		<m:cn>0</m:cn>
	      </m:lowlimit>
	      <m:apply>
		<m:times/>
		<m:ci>
		  <m:msub>
		    <m:mi>w</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub>
		</m:ci>
		<m:ci>
		  <m:msub>
		    <m:mi>x</m:mi>
		    <m:mrow>
		      <m:mi>k</m:mi>
		      <m:mo>-</m:mo>
		      <m:mi>i</m:mi>
		    </m:mrow>
		  </m:msub>
		</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msub>
		<m:mi>d</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:transpose/>
		<m:ci>
		  <m:msup>
		    <m:mi>X</m:mi>
		    <m:mi>k</m:mi>
		  </m:msup>
		</m:ci>
	      </m:apply>
	      <m:ci>
		<m:msup>
		  <m:mi>W</m:mi>
		  <m:mi>k</m:mi>
		</m:msup>
	      </m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msup>
	      <m:mi>X</m:mi>
	      <m:mi>k</m:mi>
	    </m:msup>
	  </m:ci>
	  <m:matrix>
	    <m:matrixrow>
	      <m:ci>
		<m:msub>
		  <m:mi>x</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>
		<m:msub>
		  <m:mi>x</m:mi>
		  <m:mrow>
		    <m:mi>k</m:mi>
		    <m:mo>-</m:mo>
		    <m:mn>1</m:mn>
		  </m:mrow>
		</m:msub>
	      </m:ci>
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>⋮</m:ci>
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>
		<m:msub>
		  <m:mi>x</m:mi>
		  <m:mrow>
		    <m:mi>k</m:mi>
		    <m:mo>-</m:mo>
		    <m:mi>M</m:mi>
		    <m:mo>+</m:mo>
		    <m:mn>1</m:mn>
		  </m:mrow>
		</m:msub>
	      </m:ci>
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
      </m:math>
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msup>
	      <m:mi>W</m:mi>
	      <m:mi>k</m:mi>
	    </m:msup>
	  </m:ci>
	  <m:matrix>
	    <m:matrixrow>
	      <m:ci>
		<m:msubsup>
		  <m:mi>w</m:mi>
		  <m:mn>0</m:mn>
		  <m:mi>k</m:mi>
		</m:msubsup>
	      </m:ci>
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>
		<m:msubsup>
		  <m:mi>w</m:mi>
		  <m:mn>1</m:mn>
		  <m:mi>k</m:mi>
		</m:msubsup>
	      </m:ci>
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>⋮</m:ci>
	    </m:matrixrow>
	    <m:matrixrow>
	      <m:ci>
		<m:msubsup>
		  <m:mi>w</m:mi>
		  <m:mrow>
		    <m:mi>M</m:mi>
		    <m:mo>-</m:mo>
		    <m:mn>1</m:mn>
		  </m:mrow>
		  <m:mi>k</m:mi>
		</m:msubsup>
	      </m:ci>
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
      </m:math>

      The superscript denotes absolute time, and the subscript denotes
      time or a vector index.

    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para3">
      the solution can be found by setting the gradient 
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:cn>0</m:cn>
	</m:apply>
      </m:math>
      <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="eq1">
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msup>
		<m:mi>∇</m:mi>
		<m:mi>k</m:mi>
	      </m:msup>
	    </m:ci>
	    <m:apply>
	      <m:partialdiff/>
	      <m:bvar>
		<m:ci>W</m:ci>
	      </m:bvar>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:apply>
		    <m:power/>
		    <m:ci>
		      <m:msub>
			<m:mi>ε</m:mi>
			<m:mi>k</m:mi>
		      </m:msub>
		    </m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:ci>
		    <m:msub>
		      <m:mi>ε</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:apply>
		    <m:minus/>
		    <m:ci>
		      <m:msup>
			<m:mi>X</m:mi>
			<m:mi>k</m:mi>
		      </m:msup>
		    </m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		<m:apply>
		  <m:times/>
		  <m:cn>-2</m:cn>
		  <m:apply>
		    <m:minus/>
		    <m:ci>
		      <m:msub>
			<m:mi>d</m:mi>
			<m:mi>k</m:mi>
		      </m:msub>
		    </m:ci>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:transpose/>
			<m:ci>
			  <m:msup>
			    <m:mi>X</m:mi>
			    <m:mi>k</m:mi>
			  </m:msup>
			</m:ci>
		      </m:apply>
		      <m:ci>
			<m:msub>
			  <m:mi>W</m:mi>
			  <m:mi>k</m:mi>
			</m:msub>
		      </m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci>
		    <m:msup>
		      <m:mi>X</m:mi>
		      <m:mi>k</m:mi>
		    </m:msup>
		  </m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:minus/>
		  <m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		    <m:apply>
		      <m:times/>
		      <m:ci>
			<m:msub>
			  <m:mi>d</m:mi>
			  <m:mi>k</m:mi>
			</m:msub>
		      </m:ci>
		      <m:ci>
			<m:msup>
			  <m:mi>X</m:mi>
			  <m:mi>k</m:mi>
			</m:msup>
		      </m:ci>
		    </m:apply>
		  </m:apply>
		</m:apply>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:apply>
		  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		  <m:times/>
		  <m:ci>
		    <m:msup>
		      <m:mi>X</m:mi>
		      <m:mi>k</m:mi>
		    </m:msup>
		  </m:ci>
		  <m:apply>
		    <m:transpose/>
		    <m:ci>
		      <m:msup>
			<m:mi>X</m:mi>
			<m:mi>k</m:mi>
		      </m:msup>
		    </m:ci>
		  </m:apply>
		</m:apply>
		  <m:ci>W</m:ci>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:apply>
		  <m:times/>
		  <m:cn>-2</m:cn>
		  <m:ci>P</m:ci>
		</m:apply>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:ci>R</m:ci>
		  <m:ci>W</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	</m:math>
      </equation>

      <m:math display="block">
	<m:apply>
	  <m:mo>⇒</m:mo>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub>
		<m:mi>W</m:mi>
		<m:mi>opt</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:times/>
	      <m:apply>
		<m:inverse/>
		<m:ci>R</m:ci>
	      </m:apply>
	      <m:ci>P</m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>

      Alternatively, 
      <m:math>
	<m:ci>
	  <m:msub>
	    <m:mi>W</m:mi>
	    <m:mi>opt</m:mi>
	  </m:msub>
	</m:ci>
      </m:math> can be found iteratively using a gradient descent
      technique
      
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msup>
	      <m:mi>W</m:mi>
	      <m:mrow>
		<m:mi>k</m:mi>
		<m:mo>+</m:mo>
		<m:mn>1</m:mn>
	      </m:mrow>
	    </m:msup>
	  </m:ci>
	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msup>
		<m:mi>W</m:mi>
		<m:mi>k</m:mi>
	      </m:msup>
	    </m:ci>
	    <m:apply>
	      <m:times/>
	      <m:ci>μ</m:ci>
	      <m:ci>
		<m:msup>
		  <m:mi>∇</m:mi>
		  <m:mi>k</m:mi>
		</m:msup>
	      </m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      
      In practice, we don't know <m:math><m:ci>R</m:ci></m:math> and
      <m:math><m:ci>P</m:ci></m:math> exactly, and in an adaptive
      context they may be slowly varying with time.

    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para4">
      To find the (approximate) Wiener filter, some approximations are
      necessary. As always, the key is to make the
      <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">right</emphasis> approximations!

      <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="Good idea">Approximate
      <m:math><m:ci>R</m:ci></m:math> and
      <m:math><m:ci>P</m:ci></m:math>: ⇒ RLS methods,
      as discussed last time.
      </note>

      <note xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="Better idea">Approximate the gradient!
	<m:math display="block">
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msup>
		<m:mi>∇</m:mi>
		<m:mi>k</m:mi>
	      </m:msup>
	    </m:ci>
	    <m:apply>
	      <m:partialdiff/>
	      <m:bvar>
		<m:ci>W</m:ci>
	      </m:bvar>
	      <m:apply>
		<m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
		<m:apply>
		  <m:power/>
		  <m:ci>
		    <m:msub>
		      <m:mi>ε</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:cn>2</m:cn>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math> 
      </note>

      Note that 
      <m:math>
	<m:apply>
	  <m:power/>
	  <m:ci>
	    <m:msub>
	      <m:mi>ε</m:mi>
	      <m:mn>k</m:mn>
	    </m:msub>
	  </m:ci>
	  <m:cn>2</m:cn>
	</m:apply>
      </m:math> itself is a very noisy approximation to 
      <m:math>
	<m:apply>
	  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#expectedvalue"/>
	  <m:apply>
	    <m:power/>
	    <m:ci>
	      <m:msub>
		<m:mi>ε</m:mi>
		<m:mn>k</m:mn>
	      </m:msub>
	    </m:ci>
	    <m:cn>2</m:cn>
	  </m:apply>
	</m:apply>
      </m:math>. We can get a noisy approximation to the gradient by
      finding the gradient of
      <m:math>
	<m:apply>
	  <m:power/>
	  <m:ci>
	    <m:msub>
	      <m:mi>ε</m:mi>
	      <m:mn>k</m:mn>
	    </m:msub>
	  </m:ci>
	  <m:cn>2</m:cn>
	</m:apply>
      </m:math>! Widrow and Hoff first published the LMS algorithm,
      based on this clever idea, in 1960.
      <m:math display="block">
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#estimate"/>
	    <m:ci>
	      <m:msup>
		<m:mi>∇</m:mi>
		<m:mi>k</m:mi>
	      </m:msup>
	    </m:ci>
	  </m:apply>
	  <m:apply>
	    <m:partialdiff/>
	    <m:bvar>
	      <m:ci>W</m:ci>
	    </m:bvar>
	    <m:apply>
	      <m:power/>
	      <m:ci>
		<m:msub>
		  <m:mi>ε</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	      <m:cn>2</m:cn>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:cn>2</m:cn>
	    <m:ci>
	      <m:msub>
		<m:mi>ε</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:partialdiff/>
	      <m:bvar>
		<m:ci>W</m:ci>
	      </m:bvar>
	      <m:apply>
		<m:minus/>
		<m:ci>
		  <m:msub>
		    <m:mi>d</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
		<m:apply>
		  <m:times/>
		  <m:apply>
		    <m:transpose/>
		    <m:ci>
		      <m:msup>
			<m:mi>W</m:mi>
			<m:mi>k</m:mi>
		      </m:msup>
		    </m:ci>
		  </m:apply>
		  <m:ci>
		    <m:msup>
		      <m:mi>X</m:mi>
		      <m:mi>k</m:mi>
		    </m:msup>
		  </m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:times/>
	    <m:cn>2</m:cn>
	    <m:ci>
	      <m:msub>
		<m:mi>ε</m:mi>
		<m:mi>k</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:minus/>
	      <m:ci>
		<m:msup>
		  <m:mi>X</m:mi>
		  <m:mi>k</m:mi>
		</m:msup>
	      </m:ci>
	    </m:apply>
	  </m:apply>
	  <m:apply>
	    <m:minus/>
	    <m:apply>
	      <m:times/>
	      <m:cn>2</m:cn>
	      <m:ci>
		<m:msub>
		  <m:mi>ε</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	      <m:ci>
		<m:msup>
		  <m:mi>X</m:mi>
		  <m:mi>k</m:mi>
		</m:msup>
	      </m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      This yields the LMS adaptive filter algorithm
      </para>
      <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="LMSalgorithm">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The LMS Adaptive Filter Algorithm</name>
      <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="importantlist" type="enumerated">
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>y</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:times/>
		<m:apply>
		  <m:transpose/>
		  <m:ci>
		    <m:msup>
		      <m:mi>W</m:mi>
		      <m:mi>k</m:mi>
		    </m:msup>
		  </m:ci>
		</m:apply>
		<m:ci>
		  <m:msup>
		    <m:mi>X</m:mi>
		    <m:mi>k</m:mi>
		  </m:msup>
		</m:ci>
	      </m:apply>
	      <m:apply>
		<m:sum/>
		<m:bvar><m:ci>i</m:ci></m:bvar>
		<m:lowlimit>
		  <m:cn>0</m:cn>
		</m:lowlimit>
		<m:uplimit>
		  <m:apply>
		    <m:minus/>
		    <m:ci>M</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:uplimit>
		<m:apply>
		  <m:times/>
		  <m:ci>
		    <m:msubsup>
		      <m:mi>w</m:mi>
		      <m:mi>i</m:mi>
		      <m:mi>k</m:mi>
		    </m:msubsup>  
		  </m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>x</m:mi>
		      <m:mrow>
			<m:mi>k</m:mi>
			<m:mo>-</m:mo>
			<m:mi>i</m:mi>
		      </m:mrow>
		    </m:msub>
		  </m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub>
		  <m:mi>ε</m:mi>
		  <m:mi>k</m:mi>
		</m:msub>
	      </m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>
		  <m:msub>
		    <m:mi>d</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
		<m:ci>
		  <m:msub>
		    <m:mi>y</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msup>
		  <m:mi>W</m:mi>
		  <m:mrow>
		    <m:mi>k</m:mi>
		    <m:mo>+</m:mo>
		    <m:mn>1</m:mn>
		  </m:mrow>
		</m:msup>
	      </m:ci>
	      <m:apply>
		<m:minus/>
		<m:ci>
		  <m:msup>
		    <m:mi>W</m:mi>
		    <m:mi>k</m:mi>
		  </m:msup>
		</m:ci>
		<m:apply>
		  <m:times/>
		  <m:ci>μ</m:ci>
		  <m:apply>
		    <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#estimate"/>
		    <m:ci>
		      <m:msup>
			<m:mi>∇</m:mi>
			<m:mi>k</m:mi>
		      </m:msup>
		    </m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:minus/>
		<m:ci>
		  <m:msup>
		    <m:mi>W</m:mi>
		    <m:mi>k</m:mi>
		  </m:msup>
		</m:ci>
		<m:apply>
		  <m:times/>
		  <m:ci>μ</m:ci>
		  <m:apply>
		    <m:times/>
		    <m:cn>-2</m:cn>
		    <m:ci>
		      <m:msub>
			<m:mi>ε</m:mi>
			<m:mi>k</m:mi>
		      </m:msub>
		    </m:ci>
		    <m:ci>
		      <m:msup>
			<m:mi>X</m:mi>
			<m:mi>k</m:mi>
		      </m:msup>
		    </m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	      <m:apply>
		<m:plus/>
		<m:ci>
		  <m:msup>
		    <m:mi>W</m:mi>
		    <m:mi>k</m:mi>
		  </m:msup>
		</m:ci>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:ci>μ</m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>ε</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:ci>
		    <m:msup>
		      <m:mi>X</m:mi>
		      <m:mi>k</m:mi>
		    </m:msup>
		  </m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  (<m:math>
	    <m:apply>
	      <m:eq/>
	      <m:msubsup>
		<m:mi>w</m:mi>
		<m:mi>i</m:mi>
		<m:mrow>
		  <m:mi>k</m:mi>
		  <m:mo>+</m:mo>
		  <m:mn>1</m:mn>
		</m:mrow>
	      </m:msubsup>
	      <m:apply>
		<m:plus/>
		<m:ci>
		  <m:msubsup>
		    <m:mi>w</m:mi>
		    <m:mi>i</m:mi>
		    <m:mi>k</m:mi>
		  </m:msubsup>
		</m:ci>
		<m:apply>
		  <m:times/>
		  <m:cn>2</m:cn>
		  <m:ci>μ</m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>ε</m:mi>
		      <m:mi>k</m:mi>
		    </m:msub>
		  </m:ci>
		  <m:ci>
		    <m:msub>
		      <m:mi>x</m:mi>
		      <m:mrow>
			<m:mi>k</m:mi>
			<m:mo>-</m:mo>
			<m:mi>i</m:mi>
		      </m:mrow>
		    </m:msub>
		  </m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>)
	</item>
      </list>
      </example>
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="parasomething">
      The LMS algorithm is often called a <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">stochastic
      gradient</term> algorithm, since
      <m:math>
	<m:apply>
	  <m:csymbol definitionURL="http://cnx.rice.edu/cd/cnxmath.ocd#estimate"/>
	  <m:ci>
	    <m:msup>
	      <m:mi>∇</m:mi>
	      <m:mi>k</m:mi>
	    </m:msup>
	  </m:ci>
	</m:apply>
      </m:math> is a noisy gradient. This is <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">by
      far</emphasis> the most commonly used adaptive filtering
      algorithm, because
      <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="enumerated" id="lastlist">
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">it was the first</item> 
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">it is very simple</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">in practice it works well (except that sometimes it
	converges slowly)</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">it requires relatively litle computation</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">it updates the tap weights every sample, so it 
	  continually adapts the filter</item>
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">it tracks slow changes in the signal statistics well</item>
      </list>
	

    </para>

    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="compsection">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Computational Cost of LMS</name>
      <table xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="table">
	<tgroup xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" cols="5">
	  <thead xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">To Compute ⇒</entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:msub>
		    <m:mi>y</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:math>
	      </entry>
	     <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:msub>
		    <m:mi>ε</m:mi>
		    <m:mi>k</m:mi>
		  </m:msub>
		</m:math>
	      </entry> 
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:msup>
		    <m:mi>W</m:mi>
		    <m:mrow>
		      <m:mi>k</m:mi>
		      <m:mo>+</m:mo>
		      <m:mn>1</m:mn>
		    </m:mrow>
		  </m:msup>
		</m:math>
	      </entry> 
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">= Total</entry>
	    </row>
	  </thead>
	  <tbody xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	    <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">multiplies</entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math><m:ci>M</m:ci></m:math>
	      </entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math><m:cn>0</m:cn></m:math>
	      </entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:apply>
		    <m:plus/>
		    <m:ci>M</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:math>
	      </entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:apply>
		    <m:plus/>
		    <m:apply>
		      <m:times/>
		      <m:cn>2</m:cn>
		      <m:ci>M</m:ci>
		    </m:apply>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:math>
	      </entry>
	    </row>
	    <row xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="left">adds</entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:apply>
		    <m:minus/>
		    <m:ci>M</m:ci>
		    <m:cn>1</m:cn>
		  </m:apply>
		</m:math>
	      </entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math><m:cn>1</m:cn></m:math>
	      </entry>
		<entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math><m:ci>M</m:ci></m:math>
	      </entry>
	      <entry xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" align="center">
		<m:math>
		  <m:apply>
		    <m:times/>
		    <m:cn>2</m:cn>
		    <m:ci>M</m:ci>
		  </m:apply>
		</m:math>
	      </entry>
	    </row>
	  </tbody>
	</tgroup>
      </table>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para5">
	So the LMS algorithm is 
	<m:math>
	  <m:apply>
	    <m:ci type="fn">O</m:ci>
	    <m:ci>M</m:ci>
	  </m:apply>
	</m:math> per sample. In fact, it is nicely balanced in that
	the filter computation and the adaptation require the same
	amount of computation.
      </para>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para6">
	Note that the parameter <m:math><m:ci>μ</m:ci></m:math>
	plays a very important role in the LMS algorithm. It can also
	be varied with time, but usually a constant
	<m:math><m:ci>μ</m:ci></m:math> ("convergence weight
	facor") is used, chosen after experimentation for a given
	application.
      </para>
      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="tradeoffs">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Tradeoffs</name>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para7">
	  large <m:math><m:ci>μ</m:ci></m:math>: fast convergence,
	  fast adaptivity
	</para>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para8">
	  small <m:math><m:ci>μ</m:ci></m:math>: accurate
	  <m:math><m:ci>W</m:ci></m:math> → less
	  misadjustment error, stability
	</para>
      </section>
    </section>
  </content>
  
</document>
