0
$\begingroup$

It easy enough to study correlation, and matched filters. But the challenge I see unmet anywhere to date and which I struggle to meet myself is a simpler presentation, to with more difficult task I suspect.

Can you explain, in lay terms, to satisfy the intuitions of a listener, why the matched filter is a time reversed copy of the signal we hope to detect? It is not a mathematical proof, or explanation I'm after (they abound) but other some way of explaining it (to lay listeners) that generates a "a ha" experience, a feeling that it makes sense, and I get why we time reverse the signal for a matched filter ...

This is something I have yet to find, read or master myself.

$\endgroup$
  • $\begingroup$ By "filter" do you mean its impulse response? $\endgroup$ – Olli Niemitalo Sep 7 '20 at 3:23
  • 1
    $\begingroup$ I guess so. The actual context is working with someone who's implemented pulse compression demo in Excel. It's actually quite good. But in walking someone through it we're reversing the signal we're looking for (the transmitted pulse) and that's a common hanging point, a kind of, um, why? There's no easy intuititive traction on that which doesn't involve math ... I guess it's a natural language approach I'm looking for not a mathematical one (they are easy to find, ubiquitous even). $\endgroup$ – Bernd Wechner Sep 7 '20 at 4:35
2
$\begingroup$

Picture the transmitted signal as a «signature». You want to find some process that maximize the probability of detecting that signature even when there is noise.

What do you do to find some signature buried in noise? You make a template that exactly match the known signature, and you slide it back or forth in time, noting how much the actual signal deviates from the ideal template in any one spot. The time-shift that gives a «large enough» correspondence is your assumed signal location.

The time-reversal of the template is just about reversing the reversal of that argument in the convolution operation. Think of it as non-reversed correlation if you prefer (leaving out complex numbers right now).

-k

$\endgroup$
1
$\begingroup$

Does the "time-reversing" of one of the signals that occurs in convolution also bother you? I put that in quotes because the result of convolution does a great job of hiding that the output is simply the sum of scaled and time-delayed versions of the impulse response. You can think about it the other way around as well, where the signal is what is being weighted, delayed, and summed. We try to make the mechanics of the calculation more "intuitive" by stating that one of the signals is simply flipped in time.

I can't really think of a way to explain the concept of the matched filter without some math, because the Cauchy-Schwarz inequality (among other things) is invoked in order to do so. However, the derivation begins with convolution as the underlying operation, which we already described that there is no actual "flipping" of the signal.

The general result of the matched filter accommodates for a peak SNR to occur at some delay $t_0$. For practical reasons, we many times set $t_0 = 0$ which in turn yields the time-reversed version of the original signal. Introducing this new filter to convolution yields the autocorrelation operation.

If you do decide to dive into the math, Dilip Sarwate has an excellent answer here.

$\endgroup$
1
$\begingroup$

There's a very simple intuitive explanation that applies not just to matched filtering, but to any filter.

Assume we do the "convolution" without time reversal: you hold the impulse response "fixed", and slide (shift) the input signal on top of it.

So, imagine sliding the input signal back to $-\infty$ and then shifting it forward in time. The "convolution" is zero up to the point where $h(t)$ and $x(t)$ overlap. However (this is the key point): at this point the start of the IR overlaps with the end of the input signal.

This is not what you want, since obviously the earliest part of $x(t)$ goes into the filter first. So, for the convolution to make sense, what should happen is that the start of $x(t)$ coincides with the start of $h(t)$. This is obtained by reversing $x(t)$ before the "convolution" operation.

The same is true of the matched filter. In this case, you want to filter a pulse with itself, so to speak. So, for the convolution to do this, the IR must be the reversed pulse.

$\endgroup$
  • $\begingroup$ This is very close to satisfying. The notion of sliding the expected signal across the measurement and looking for where the match is best, gels well with non math intuition if you will. And I particularly like the image of the start meeting the start and the end the end so to speak as the pattern passes over the signal. I suspect what's still missing marginally is why or how that's better than comparing with the expected signal directly. I suspect something hangs on the difference between a comparison (say a difference, squared difference) and the product that is in the convolution. $\endgroup$ – Bernd Wechner Sep 8 '20 at 2:03
  • $\begingroup$ @BerndWechner There are many ways to compare two signals, as you say. Each has its pros and cons. One thing one would like is for the comparison to be a single number (the difference of two signals is another signal). One would also like the comparison of a signal with itself to be large and, again, the difference fails in this case. Also, we'd like the comparison of two similar but negative signals to be positive, and here the product helps. In practice, it turns out that correlation is an extremely useful and convenient way to compare two signals. $\endgroup$ – MBaz Sep 8 '20 at 3:12
  • $\begingroup$ Some nice properties of correlation can be proven mathematically; for example, the matched filter maximizes the output SNR over all possible filters. Other times it's used because, pragmatically, it's just the most convenient, expressive and powerful signal comparison technique. $\endgroup$ – MBaz Sep 8 '20 at 3:14
  • $\begingroup$ I agree about math and I have no trouble with the derivations (am communications engineer myself). I'm toying though with how to convey simply, intuitively and metaphrocially if needed why running the time-reversed expectation (signal) over the measurement yields better results than using the expected signal as it stands. In fact one of the beautiful things about math and the math here is the way it makes such things clear and fall into place - I am in fact a mathematician and lover of math too. But I'm struggling with the knowing vs being able to help a 10 year old understand for example. $\endgroup$ – Bernd Wechner Sep 8 '20 at 4:34
  • $\begingroup$ @BerndWechner I brief outline of how I would do it: (a) start with an asymmetric pulse-like signal, (b) show that it can be detected by correlating it with itself, (c) show that a filter implements correlation but time-reversed, for the reasons I explained in my answers. I hope this helps ;) $\endgroup$ – MBaz Sep 8 '20 at 12:20
0
$\begingroup$

To see why it makes sense, first recall the purpose of a matched filter: it implements cross-correlation between the input signal and the template that you're looking for. On the AWGN channel, correlation is the optimum method for detection of the presence of a particular waveform (represented by the matched filter).

Next, recall the definition of cross correlation between an input signal $x(t)$ and some template signal $g(t)$:

$$ y_{corr}(t) \int_{0}^{\infty} x(t) g^*(t+\tau) d\tau $$

Now, recall that matched filtering is implemented via convolution of the input signal with the matched filter. Assuming that the matched filter has impulse response $h(t)$, its output is defined as:

$$ y_{mf}(t) \int_{0}^{\infty} x(t) h(t-\tau) d\tau $$

Since matched filtering is just a convenient way to implement cross-correlation, we would like $y_{corr}(t) = y_{mf}(t)$. This can be done by defining the filter's impulse response to be:

$$ h(t) = g^*(-t) $$

That is, the matched filter's impulse response is just a conjugated and time-reversed version of the template signal that you would like to correlate against. For the common case of real-valued signals, you can ignore the conjugation, as this has no effect on real numbers.

$\endgroup$
  • $\begingroup$ While true, and brief, and elegant (I do like your answer), it doesn't really answer my question. Alas it rests too heavily on "Assuming that the matched filter has impulse response..." and is leaning a little too heavily on math (nothing I'm uncomfortable with, but not he subject of the question). What I'm hoping for is a way to appeal to the inuition of lay listeners. Perhaps a metaphoric approach (as metaphors work well with intuition), but not perforce. $\endgroup$ – Bernd Wechner Sep 7 '20 at 4:32
0
$\begingroup$

If your "why the matched filter is a time reversed copy of the signal we hope to detect" hints at a minus sign of the index of summation in impulse response for the correlation function $y[k] = \sum_{-\infty}^\infty {(x[i]·h[k-i])}$, this form of linear coefficients $h[k,i]$ is not specific to formulas for matching filters. Considering, for example, discrete-time systems, any LTI system has output in the form $y[k] = \sum_{-\infty}^\infty {(x[i]·h[k-i])}$, where $h[·]$ is the output of the LTI system when presented with a unity impulse input δ[i]. This means that, for $x[i] = δ[i]$, $y[k] = \sum_{-\infty}^\infty {(δ[i]·h[k-i])} = h[k]$, in evident agreement with the $h[·]$ definition.

For LTI systems, we can derive the convolution formula $y[k] = \sum_{-\infty}^\infty {(x[i]·h[k-i])}$ immediately from the definition of the LTI system, not appealing to intuition or clever reasining.

  1. It is a linear system, and its output is a linear combination of input values: $y[k] = \sum_{-\infty}^\infty {(x[i]·h[k,i])}$.
  2. It is a time-invariant system, and the coefficients $h[k,i]$ can only depend on $k-i$: $h[k,i] = h[k-i]$ or $h[k,i] = h[i-k]$. But if it were $y[k] = \sum_{-\infty}^\infty {(x[i]·h[i-k])}$, then, for a unit impulse input $δ[i]$, the output would be $y[k] = \sum_{-\infty}^\infty {(δ[i]·h[i-k])} = h[-k]$, and only with $h[k,i] = h[k-i]$ we arrive at $y[k] = \sum_{-\infty}^\infty {(δ[i]·h[k-i])} = h[k]$.

Therefore, the minus sign of the index of summation in impulse response for the correlation function is the direct, easily seen, and explicit consequence of the properties of LTI systems, and no additional "intuitive explanation" is needed to accept this fact.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.