niarn, it helps when doing "ASCII math", to set your font to a
mono-spaced font, so you can line things up (like the limits to the
summation) better for everyone to see. otherwise i have to guess at
which font you're seeing things with.
On 7/13/12 10:14 AM, niarn wrote:
>> now, Hardy, can you relate this to anything that you're talking about?
>
> Hi rbj, Let's do it in steps.
>
> This is the 'FIR model'
>
> N-1
> y[n] = SUM{ h[n,i] * x[n-i] } + e[n]
> i=0
that is *not* the FIR model. there is no e[n] in the FIR model. but
there *is* a "desired signal", d[n], that is based on the same x[n]
going into the FIR and that we're trying to match the FIR to. very
similar to "system identification".
> Do you accept this formulation as a formulation of adaptive FIR filtering:
> "Given y[n] and x[n] and given some assumptions about e[n], then in some
> sense estimate/compute h[n]."
a time-invariant FIR is, of course
N-1
y[n] = SUM{ h[i] * x[n-i] }
i=0
this is LTI and h[i] can be thought of as the unchanging FIR
coefficients or h[n] can be thought of as the impulse response of the
FIR. (we'll define "n" as discrete "time").
a time-variant FIR would be
N-1
y[n] = SUM{ h[n,i] * x[n-i] }
i=0
the impulse response is not well-defined in this case (because it's
different for impulses applied at different times), but h[n,i] can be
thought of as the FIR coefficients at time n, or h[m,n] is the impulse
response of an impulse applied at time m.
we are modeling the desired signal, d[n], as being some *other* filter
(could be FIR but doesn't have to be) acting on the same input, x[n].
so, for shits and grins, let's say it *is* an FIR (same length, N):
N-1
d[n] = SUM{ g[i] * x[n-i] }
i=0
but the coefficients, g[i], are hidden and considered fixed (or *very*
slowly varying) and we have to figger out what they are by looking at
the input, x[n], and output, d[n], and we have access to both signals.
this would be easy (non-blind deconvolution: use the DFT and iDFT to get
g[i]) but there is also interference, i'll call v[n]. now this
interference *might* be exactly the signal you're looking for (it *is*
in speakerphone echo/feedback cancellation) and the above d[n] (the
feedback signal from speaker into microphone) is what you are trying to
get rid of. so we add this interference signal:
N-1
d[n] = SUM{ g[i] * x[n-i] } + v[n]
i=0
now, if
N-1
y[n] = SUM{ h[n,i] * x[n-i] }
i=0
and if
e[n] = d[n] - y[n]
and we can compute this e[n] in real time because we compute y[n] and
d[n] is given. then, *only* if h[n,i] has converged to g[i] will this
apparent error e[n] be the same as v[n].
now, going back the the speakerphone application, when there is no
"double-talk", then v[n] should be close to zero, and the only reason
that e[n] is not zero is because h[n,i] is not (yet) the same as the
target coefficients g[i]. the idea of the simple LMS adaptive filter is
to slowly get h[n,i] to converge to g[i] (for 0 <= i < N), and then when
v[n] is not zero, *and* hopefully h[n,i] has already converged to near
g[i], then e[n] = v[n]. a good LMS application will have some other
system that will detect or estimate doubletalk and will reduce the
adaptation gain (so h[n,i] remains constant with n) during doubletalk so
that it doesn't screw up the adaptation.
> I could also have written (but for simplicity only consider the above
> formulation for now):
> "Given y[n] and x[n] and given some assumptions about e[n] and h[n], then
> in some sense estimate/compute h[n]."
you also need a separate desired signal d[n]. you're not given y[n],
but you can figure it out from x[n] and the *current* FIR coefficients
h[n,i]. so you have inputs x[n] and d[n], and you're trying to get y[n]
to match d[n] and "then in some sense [you] estimate/compute h[i]" to be
whatever those coefs have to be to get y[n] to best match d[n].
a typical simple LMS filter has *two* inputs, x[n] and d[n], and two
outputs, y[n] and e[n], and often it's v[n] that we're really looking
for, which, when the adaptation settles down, is the same as e[n]. if
the application is system identification, then what we're looking for
are the coefficients, h_d[i] which should be converged upon by h[n,i].
--
r b-j rbj@audioimagination.com
"Imagination is more important than knowledge."