# About understanding a Matched Filter

I have some basic doubt in understanding a matched filter (MF). Please note that I have already seen very informative post in this context Understanding the Matched Filter

In what follows, I list three information about matched filter that I found in standard textbook and wikipedia:

(1) Wiki page says that MF is obtained by correlating a known signal, or template, with an unknown signal to detect the presence of the template in the unknown signal. In digital communication, I assume that the known template is the pulse shape p(t) used by the transmitter [e.g., 'sinc-like' impulse response of root-raised cosine (RRC) spectrum] and the unknown signal is the noisy received signal r(t). Assuming that the receiver knows p(t) used by the transmitter, the receiver convolves r(t) with p*(-t). The output of convolution is sampled at decision points.

(2) A standard textbook on communication says that the receiver does a convolution of the received waveform with the time-reverse conjugate of channel response h(t). That means, MF operation consists of convolution of r(t) with h*(-t), followed by a sampler. (3) The textbook also says that MF can be seen as an equalizer.

I understand that MF does a convolution followed by a sampling. That is it. Simple. But I am seeking detailed clarity in my understanding of the philosophy of this operation.

Questions:

(A). What is p(t) in the MF operation? Suppose I have NRZ data, then do I use the 'rectangular pulse of NRZ' or the 'sinc-like impulse response of RRC' as p(t) in the convolution? Wiki says, rectangular NRZ pulse is used. Why so?

(B). Refering to the two different notions in (1) and (2), seems my understanding of the relation between p(t) and h(t) is unclear. Can someone make it clear with simple explanation?

(C). How do you explain MF operation as an equalization? Equalizer removes ISI, MF removes the effect of noise...

(D). What is partial MF?

I really appreciate your help in improving my understanding of this beautiful concept of matched filtering.

I just want to comment on the confusion between $$p(t)$$ and $$h(t)$$. What happens is that we transmit a signal $$s(t)$$ where

$$s(t)=\sum_ks_kg(t-kT_s)$$

where $$s_k$$ are the data symbols, $$g(t)$$ is the transmit pulse shape, and $$T_s$$ is the symbol time.

Transmitting this over a wireless channel with a channel impulse response $$h(t)$$, the channel acts acts as a filter, and thus the channel output is the convolution between the transmitted signal and the channel, i.e.,

$$y(t) = s(t)\star h(t) = \sum_ks_k\underbrace{\left[g(t-kT_s)\star h(t)\right]}_{p(t-kT_s)}$$

So, the convolution of the transmit pulse shape and the channel is considered in the matched filter design.

By the way, the purpose of the matched filter is not to "remove the noise", but rather to maximize the signal-to-noise ratio (SNR) by maximizing the received signal power at the output of the matched filter.

• Thanks! I understand from your response that p(t) used by the MF is a convolution of template pulse g(t) used by transmitter and channel impulse response h(t). I think the e.g. in wiki assumes AWGN channel, so there h(t) is unity. Seems I have a better understanding now, thanks to your answer. Could you kindly tell me what is g(t)? Is it rectangular NRZ (as mentioned in wiki) or sinc function-like impulse response of RRC? And how do I know h(t)? – sig_proc_enthusiast Jun 12 '19 at 5:20
• $g(t)$ could be rectangular or not. For theoretical purposes, rectangular can be assumed. $h(t)$ is estimated using channel estimation methods, where you send a known data (called pilot) signals to the receiver, and then the receiver recovers the channel impulse response. – BlackMath Jun 12 '19 at 6:12

Correlators and Matched Filters are very different devices (regardless of what Wikipedia might say) whose outputs happen to equal one another at the sampling instants and are almost always different at other time instants.

If $$p(t)$$, identically zero for $$t < 0$$ and $$t > T$$, is the transmitted pulse, then (in an AWGN channel)

• the Matched Filter (matched at time $$T$$ in the wording used in this answer cited by the OP) is an LTI system with impulse response $$h(t) = p(T-t)$$ and the MF output signal at any time $$t$$ is given by \begin{align} \text{MF}_{\text{out}}(t) &= \int_{-\infty}^\infty \text{MF}_{\text{in}}(\tau)h(t-\tau) \,\mathrm d\tau\\ &= \int_{-\infty}^\infty \text{MF}_{\text{in}}(\tau)p(T-(t-\tau)) \,\mathrm d\tau\\ &= \int_{-\infty}^\infty \text{MF}_{\text{in}}(\tau)p(T-t+\tau) \,\mathrm d\tau\\ &= \int_{t-T}^t \text{MF}_{\text{in}}(\tau)p(T-t+\tau) \,\mathrm d\tau &{\scriptstyle{\text{using properties of }}p(\cdot)}\tag{1}\\ \end{align} Note that if $$\text{MF}_{\text{in}}(\tau)$$ is just $$p(\tau)$$ which is $$0$$ except when $$\tau \in [0,T]$$, then $$\text{MF}_{\text{in}}(\tau)$$ has value $$0$$ (and hence the integral in $$(1)$$ has value $$0$$) if $$t < 0$$ or if $$t-T > T$$ i.e. $$t > 2T$$. In short, the support of $$\text{MF}_{\text{out}}(t)$$ is $$[0,2T]$$. Note in particular that at $$t=T$$, $$\text{MF}_{\text{out}}(t)$$ has a maximum value given by $$\text{MF}_{\text{out}}(T) = \int_{0}^T \text{MF}_{\text{in}}(\tau)p(\tau) \,\mathrm d\tau = \int_{0}^T [p(\tau)]^2 \,\mathrm d\tau \tag{2}.$$ What if $$\text{MF}_{\text{in}}(t)$$ were a pulse train or sequence of non-overlapping pulses $$\text{MF}_{\text{in}}(t) = \sum_{k=-\infty}^\infty a_k p(t-kT)??$$ Well, one can go through an analysis just like the above to arrive at the result that $$(1)$$ still applies while $$(2)$$ can be generalized to \begin{align} \text{MF}_{\text{out}}((k+1)T) &= \int_{kT}^{(k+1)T}\text{MF}_{\text{in}}(\tau)p(\tau-kT) \,\mathrm d\tau\\ &= a_k \int_{kT}^{(k+1)T} [p(\tau-kT)]^2 \,\mathrm d\tau\\ &= a_k \int_{0}^{T} [p(\tau)]^2 \,\mathrm d\tau\tag{3}\end{align} Thus, the data symbols $$a_k$$ are popping out at $$T$$-second intervals with no inter symbol interference.

• In contrast, Correlators are not LTI (passive) filters but rather active nonlinear devices with switches etc, and are best described as Integrate and Dump circuits. _During the time interval $$[0,T]$$, the correlator corresponding to the Matched Filter described above multiplies its input $$\text{MF}_{\text{in}}(t)$$ by $$p(t)$$ and integrates the product. Thus, for $$t\in [0,T]$$, the correlator output can be expressed as \begin{align}C_{\text{out}}(t) &= \int_{0}^t \text{MF}_{\text{in}}(\tau) p(\tau) \,\mathrm d\tau \\ &= \int_{0}^t [p(\tau)]^2 \,\mathrm d\tau\tag{4}\end{align} which should be contrasted with $$(1)$$. The two integrals are not equal except at $$t=T$$ when both have value $$\int_{0}^T [p(\tau)]^2 \,\mathrm d\tau$$. Turning to more circuit-oriented details, the integrator is sampled at $$t=T^-$$, just a tad before the integrator is dumped (reset to have $$0$$ output) at $$t=T$$, and then a new integration starts at $$t=T^+$$ just a tad after the dumping. Note the presence of a critical race here; the signal to sample the correlator output better arrive just a little before the signal to dump the correlator output and reset it to $$0$$, and failing to ensure this can be a fireable offense. During the interval $$(T,2T)$$, $$\text{MF}_{\text{in}}(\tau)$$ is multiplied by $$p(\tau-T)$$ etc. More generally, for $$t\in (kT, (k+1)T)$$, we have that $$C_{\text{out}}(t) = a_k \int_{kT}^t \text{MF}_{\text{in}}(\tau) p(\tau-kT) \,\mathrm d\tau\tag{5}$$ (note the absence of any intersymbol interference) which does not equal $$\text{MF}_{\text{out}}(\tau)$$ (the latter depends on both $$a_k$$ and $$a_{k-1}$$). However, at $$t=(k+1)T^-$$, \begin{align} C_{\text{out}}((k+1)T^-)(\tau) &= \int_{kT}^{(k+1)T^-} \text{MF}_{\text{in}}(\tau) p(\tau-kT) \,\mathrm d\tau\\ &= a_k \int_{kT}^{(k+1)T} [p(\tau-kT)]^2 \,\mathrm d\tau\\ &= a_k \int_{0}^{T} [p(\tau)]^2 \,\mathrm d\tau\tag{6}\end{align} and so at multiples of $$T$$ seconds, the Correlator output equals the Matched Filter.

Examples of how the matched filter and correlator output differ are given in the answer cited above (for the case of rectangular pulses). If the pulse is one cycle of a sinusoid, the matched filter output looks like this over the $$2T$$ second interval

while the correlator output looks like the figure below. Note that $$(4)$$ implies that the correlator output is an increasing function of time over $$[0,T]$$ and this is clearly seen here. In contrast, the matched filter output dips below $$0$$ before rising to the same peak value at $$T$$.