# Implementation of Block LMS

In the implementation of block LMS, i need one clarification.

In the 3rd step as shown in the figure attached, the summation over a product of input, $$\mathbf{u}$$ and error, $$e$$, associated with each sample value in a block, gives rise to a single value (some integer). Every first statement (formulae) in a line belongs to Block LMS algorithm and second statement (formulae) belongs to simple LMS Algorithm. What I want is only to consider first formulas in every line.

If all the initial weights $$\hat{w}(k)$$ are the same (all are zeros), then this constant value will be added to that at the end of each block which results in updates weights having the same value. i.e;

[0 0 0 0 0] + x = [x x x x x].

If this process continues till the end of input, all the filter weights will be of the same value.

Is this correct?

• I think in step 3 the transition from the first line to the second is not correct: You should take the sum of the vectors $\mathbf{u}(kL + i)\cdot e(kL + i)$, which is not the same as computing the scalar product. As a result, you obtain a vector (the gradient) that is used to update the filter coefficients. – applesoup Jan 7 at 15:35
• sorry, I couldn't get you. Can you explain the second statement written by you in detail? – Ramakrishna Jan 7 at 16:14
• Please see my comment on Peter K.'s answer. – applesoup Jan 7 at 17:10

As applesoup says in the comments the term $$\mathbf{u}(kL+i)e(kL+i)$$ is a vector, not a single value (some integer).

Why do you think it's a scalar?

To answer your question: no, it's incorrect to state that all the algorithm does is add a constant to all elements of $$\hat{w}(k)$$.

As per this slide from here the block LMS error is still a scalar. It's just that the errors across multiple blocks are used to form the updates.

Another way to look at it is that $$\Phi(k)$$ can be written as: $$\mathbf{u}_k \mathbf{e}_k$$ where $$\mathbf{u}_k = \left[ \begin{eqnarray*} &\mathbf{u}(kL+0) &\mathbf{u}(kL+1) &\mathbf{u}(kL+2) &\ldots &\mathbf{u}(kL+L-1) \end{eqnarray*} \right]$$ is an $$N_u \times L$$ array and $$\mathbf{e}_k = \left[ \begin{eqnarray*} &e(kL+0)\\ &e(kL+1)\\ &e(kL+2)\\ &\vdots\\ &e(kL+L-1)\\ \end{eqnarray*} \right]$$ is an $$L\times 1$$ vector.

As a result $$\mathbf{u}_k \mathbf{e}_k$$ is an $$N_u \times 1$$ vector.

• Comments are not for extended discussion; this conversation has been moved to chat. – Peter K. Jan 7 at 17:01
• In the non-block version of the LMS algorithm, for a single set of input samples, i.e., for each vector $\mathbf{u}$, you have only one error value. This one error value is used to compute the gradient vector that is in turn used to update the filter coefficients. Then, you shift $\mathbf{u}$ by one sample and repeat the process. The block-based LMS algorithm can be interpreted as to compute an average gradient vector and update the filter coefficient every $L$ samples only. – applesoup Jan 7 at 17:09
• @applesoup Yes. Let me try to rewrite the equation in vector form. – Peter K. Jan 7 at 17:17
• My last comment was actually addressing the OP, sorry for the confusion... – applesoup Jan 7 at 19:05