I have a template function that I want to match against a signal. Easy enough: it’s a cross-correlation. I transform the template into the time-reversed conjugate, do the convolution in frequency space (doing an FFT), then transform back.

But what if the signal does not quite contain the template, but rather the template times another function? In particular, this function:

u(x) = cos(kx+d) + i*(sin(kx+d)

Well, I know what to do with part of it. The unknown function is also:

u(x) = e[sup]i(kx+d)[/sup] = e[sup]ikx[/sup]e[sup]id[/sup]

The e[sup]id[/sup] part is a constant, so I can factor it out of the whole thing and figure it out from the cross-correlation (i.e., find the spike with the highest magnitude, and look at its phase).

But what of the rest? I see some potentially interesting approaches, but I can’t quite get to something that works. The correlation looks something like (. is point-wise multiplication, * is convolution):

F© = F(t * (u . f)) = F(t) . F(u . f)

Which I can turn into:

F© = F(t) . (F(u) * F(f))

F(u) is a spike at the frequency of interest, so the convolution of that with F(f) just frequency-shifts the original (which is exactly the point of u(x) in the first place). Doesn’t seem to really help me much (though I think I just proved to myself some minor signal processing lemma), but I’m sure I’m missing something. Thoughts?

Yes, you can recover the original signal from a modulated signal using a correlation detector. Simple linear modulation is easily seperated from a signal envelope: that’s why it is used.

You were hoping for something different?

I’ve forgotten all my math.

I was hoping for math :).

I don’t quite understand the comment, though. A normal correlation won’t work because as the signal goes into and out of phase with the template, it cancels itself out. If it were a constant 180 degrees–or 90 degrees, or 75–it would be easy; I look for the correlation spike and examine the phase. 180 degrees gives a nice negative spike, etc.

But with the extra signal, it’s constantly going into and out of phase, so the correlation spends as much time in one direction as the other. It’s like the average angle of a dial: fine if it’s motionless; it just points in whatever direction. But if it’s spinning, the angle averages out to zero.

Upon rereading, I see I wasn’t completely clear about one thing–the function u(x) isn’t completely known–it’s paramaterized in terms of the unknowns k and d. I’m pretty sure I can get rid of d by factoring out a constant term, but I don’t know how to find k.

ah.

We only did stochastic time-invariant signals, so even if I could remember my math, I wouldn’t be able to help.

I guess if the two signals are as described, and aren’t correlated, then a very large sample would enable you to identify the exp(i(kx+d)) signal, transform the sample, and look for the template in the cleaned-up sample. ( I’m sure if that was possible you wouldn’t be asking).