View Single Post
  #8   Report Post  
Mark Borgerding
 
Posts: n/a
Default

Tom wrote:
"Mark Borgerding" wrote in message
...

To make a "leaky integrator" fast cross correlator, I would omit the
second coefficient in your formula, 1-beta.
Leaving,
Sxy(i) = beta*Sxy(i-1) + X(i)*Y(i)

This makes the boundary cases nice and clean:
beta = 0 -- forget everything , use current block only
beta = 1 -- forget nothing , use entire signal


-- Mark


If you do what you suggest you get a dc gain (ie when z=1) which is
1/(1-beta) rather than unity.
Take z-transforms and the TF is

(1-beta)/(1-betaz^-1) ....

I see your argument - you are trying to get back to a pure integrator when
beta=1 but pure integrators are not a good idea in open-loop - any slight
dc-offset and off they go for a walk.Best results are obtained with beta=05
up to 0.9 (ish!).

Tom


I agree pure integration is a bad idea for endless input, but that was
not the problem put forth.
The OP didn't mention anything about an open loop.

FWIW, I don't think the term "unity gain" is very meaningful when
applied to a single buffer answer in cross-correlation.

Let's hop a little further down this bunny trail ...

Both systems' transfer functions contain a single pole on the real axis
with magnitude beta.

I suggest that the unity gain created by the (1-beta) term causes more
problems than
it solves. It certainly declaws the unstable pole when beta == 1 by
setting the gain to zero.
Unfortunately, that happens to be is the useful case of
cross-correlation of two complete sequences.

To have the best of both worlds, I'd split beta and 1-beta up into two
gains: beta and alpha.
y(i) = beta*y(i-1) + alpha*x(i)
For the case when unity gain is desired, alpha = 1-beta. If
integration is the goal, then alpha = beta = 1

Perhaps it comes down to personal preference.
I prefer one algorithm that does two things even if it is slightly more
complicated, rather than needing two algorithms.

In any case, a gain is usually easy to slip in someplace computationally
convenient.

-- Mark