Derivation of the Wiener filter for system identification
Given a known input signal
, the output of an unknown LTI system
can be expressed as:

where
is an unknown filter tap coefficients and
is noise.
The model system
, using a Wiener filter solution with an order N, can be expressed as:

where
are the filter tap coefficients to be determined.
The error between the model and the unknown system can be expressed as:

The total squared error
can be expressed as:



Use the Minimum mean-square error criterion over all of
by setting its gradient to zero:
which is
for all 

Substitute the definition of
:

Distribute the partial derivative:

Using the definition of discrete cross-correlation:


Rearrange the terms:
for all 
This system of N equations with N unknowns can be determined.
The resulting coefficients of the Wiener filter can be determined by:
, where
is the cross-correlation vector between
and
.
Derivation of the LMS algorithm
By relaxing the infinite sum of the Wiener filter to just the error at time
, the LMS algorithm can be derived.
The squared error can be expressed as:

Using the Minimum mean-square error criterion, take the gradient:

Apply chain rule and substitute definition of y[n]


Using gradient descent and a step size
:

which becomes, for i = 0, 1, ..., N-1,

This is the LMS update equation.