# How does a matched filter know about input signal beforehand?

I know that a matched filter at time t0 is just the input signal reversed in time about that time. But how does the filter know about input signal. Received signal is transmitted signal plus the noise and if filter already has knowledge about input signal then why is there any need of filtering? You already know the input signal!

• A matched filter is just an ordinary filter and can process any signal that you apply to the input. It does not know or need to know what its input is ahead of time. Turning the question on its head, any filter (with impulse response $h(t)$) is a matched filter for a class of signals, all those of the form $A\cdot h(t_0-t)$, that is, $h(t)$ time-reversed, possibly with a time delay and a change in amplitude. You can find some information (though unfortunately not any answer to your question "why is there any need of filtering?") in this answer – Dilip Sarwate Apr 25 '15 at 13:20

A matched filter is used when the shape of the "desired" part of the received signal is known. Under the additive white Gaussian noise (AWGN) channel, a matched filter is the optimal detection scheme in the maximum-likelihood sense. This is a commonly-modeled case, so matched filtering is a typical signal-processing operation.

Based on your question, I think you're misunderstanding what a matched filter is: it doesn't require full knowledge of the exact transmitted signal. Instead, it helps to sift out the transmitted signal from the noise that is received with it, allowing the receiver to make more accurate decisions on what was actually transmitted.

• Consider a baseband communication system that transmits a rectangular pulse with amplitude $1$ to communicate a zero and $-1$ to communicate a one. The appropriate matched filter in this case would be a rectangular pulse that matches the shape that is used by the receiver.

• When the train of transmitted rectangular pulses is passed through the receiver's rectangular matched filter, the result is a train of triangular pulses (the autocorrelation of a rectangular pulse is a triangle pulse).

• The receiver then makes symbol decisions based on the amplitudes of the triangular peaks that it observes. At this point, the SNR is maximized, as the matched filter tends to pass the signal of interest while averaging out any additive noise.

This is a simple, but representative example. The matched filter doesn't carry any of the transmitted information in itself (as you noted, that would be nonsensical); instead, it is used as an optimal means of extracting the transmitted information from the observed waveform.

I would also call your attention to this very good answer to a previous question about matched filters. It contains many of the diagrams that would make the above discussion easier to understand but I didn't have time to produce. It's a great resource for additional details.

• You might consider saying that the information conveyed by the transmitted signal is not the shape of the transmitted signal (as for example in AM/FM broadcast radio) but rather its identity: which signal was transmitted. More particularly, the matched filter output looks nothing like its input, that is, the transmitted signal is not being extracted from the noise so that we can hear Lady Gaga with full clarity with little noise to distract us. Instead, the matched filter (matched to Lady Gaga's song) produces a peak if it is indeed Lady Gaga and little response if it is Beyonce' – Dilip Sarwate Apr 25 '15 at 21:57
• Well-put. I like that description better than my hastily-written text above. – Jason R Apr 26 '15 at 1:39
• So all we need is one rectangular pulse (in case the transmitted signal is a series of rectangular pulse with value 1 or -1) and you convolve it with whole signal and then you do the prediction based on the peaks. That's all right? – Pranav Prakash Apr 26 '15 at 5:30
• Sounds like you have it. – Jason R Apr 26 '15 at 12:27