Related Searches
Definitions

Matched filter

In telecommunications, a matched filter is obtained by correlating a known signal, or template, with an unknown signal to detect the presence of the template in the unknown signal. This is equivalent to convolving the unknown signal with a time-reversed version of the template (cross-correlation). The matched filter is the optimal linear filter for maximizing the signal to noise ratio (SNR) in the presence of additive stochastic noise. Matched filters are commonly used in radar, in which a known signal is sent out, and the reflected signal is examined for common elements of the out-going signal. Pulse compression is an example of matched filtering. Two-dimensional matched filters are commonly used in image processing, e.g., to improve SNR for X-ray pictures.

Derivation of the matched filter

The matched filter is the linear filter, $h$, that maximizes the output signal-to-noise ratio.

$y\left[n\right] = sum_\left\{k=-infty\right\}^\left\{infty\right\} h\left[n-k\right] x\left[k\right].$

Though we most often express filters as the impulse response of convolution systems, as above (see LTI system theory), it is easiest to think of the matched filter in the context of the inner product, which we will see shortly.

We can derive the linear filter that maximizes output signal-to-noise ratio by invoking a geometric argument. The intuition behind the matched filter relies on correlating the received signal (a vector) with a filter (another vector) that is parallel with the signal, maximizing the inner product. This enhances the signal. When we consider the additive stochastic noise, we have the additional challenge of minimizing the output due to noise by choosing a filter that is orthogonal to the noise.

Let us formally define the problem. We seek a filter, $h$, such that we maximize the output signal-to-noise ratio, where the output is the inner product of the filter and the observed signal $x$.

Our observed signal consists of the desirable signal $s$ and additive noise $v$:

$x=s+v.,$

Let us define the covariance matrix of the noise, reminding ourselves that this matrix has Hermitian symmetry, a property that will become useful in the derivation:

$R_v=E\left\{ vv^H \right\},$

where $.^H$ denotes Hermitian (conjugate) transpose, and $E$ denotes expectation. Let us call our output, $y$, the inner product of our filter and the observed signal such that

$y = sum_\left\{k=-infty\right\}^\left\{infty\right\} h^*\left[k\right] x\left[k\right] = h^Hx = h^Hs + h^Hv = y_s + y_v.$

We now define the signal-to-noise ratio, which is our objective function, to be the ratio of the power of the output due to the desired signal to the power of the output due to the noise:

$SNR = frac\left\{|y_s|^2\right\}\left\{E\left\{|y_v|^2\right\}\right\}.$

We rewrite the above:

$SNR = frac\left\{|h^Hs|^2\right\}\left\{E\left\{|h^Hv|^2\right\}\right\}.$

We wish to maximize this quantity by choosing $h$. Expanding the denominator of our objective function, we have

$E\left\{ |h^Hv|^2 \right\} = E\left\{ \left(h^Hv\right)\left\{\left(h^Hv\right)\right\}^H \right\} = h^H E\left\{vv^H\right\} h = h^HR_vh.,$

Now, our $SNR$ becomes

$SNR = frac\left\{ |h^Hs|^2 \right\}\left\{ h^HR_vh \right\}.$

We will rewrite this expression with some matrix manipulation. The reason for this seemingly counterproductive measure will become evident shortly. Exploiting the Hermitian symmetry of the covariance matrix $R_v$, we can write

$SNR = frac\left\{ | \left\{\left(R_v^\left\{1/2\right\}h\right)\right\}^H \left(R_v^\left\{-1/2\right\}s\right) |^2 \right\}$
{ {(R_v^{1/2}h)}^H (R_v^{1/2}h) },

We would like to find an upper bound on this expression. To do so, we first recognize a form of the Cauchy-Schwarz inequality:

$|a^Hb|^2 leq \left(a^Ha\right)\left(b^Hb\right),,$

which is to say that the square of the inner product of two vectors can only be as large as the product of the individual inner products of the vectors. This concept returns to the intuition behind the matched filter: this upper bound is achieved when the two vectors $a$ and $b$ are parallel. We resume our derivation by expressing the upper bound on our $SNR$ in light of the geometric inequality above:

$SNR = frac\left\{ | \left\{\left(R_v^\left\{1/2\right\}h\right)\right\}^H \left(R_v^\left\{-1/2\right\}s\right) |^2 \right\}$
{ {(R_v^{1/2}h)}^H (R_v^{1/2}h) }
`            leq`
`            frac{ left[`
{(R_v^{1/2}h)}^H (R_v^{1/2}h)
`              right]`
`              left[`
{(R_v^{-1/2}s)}^H (R_v^{-1/2}s) right] } { {(R_v^{1/2}h)}^H (R_v^{1/2}h) }.
`            `

Our valiant matrix manipulation has now paid off. We see that the expression for our upper bound can be greatly simplified:

$SNR = frac\left\{ | \left\{\left(R_v^\left\{1/2\right\}h\right)\right\}^H \left(R_v^\left\{-1/2\right\}s\right) |^2 \right\}$
{ {(R_v^{1/2}h)}^H (R_v^{1/2}h) } leq s^H R_v^{-1} s.
`            `

We can achieve this upper bound if we choose,

$R_v^\left\{1/2\right\}h = alpha R_v^\left\{-1/2\right\}s$

where $alpha$ is an arbitrary real number. To verify this, we plug into our expression for the output $SNR$:

$SNR = frac\left\{ | \left\{\left(R_v^\left\{1/2\right\}h\right)\right\}^H \left(R_v^\left\{-1/2\right\}s\right) |^2 \right\}$
{ {(R_v^{1/2}h)}^H (R_v^{1/2}h) } = frac{ alpha^2 | {(R_v^{-1/2}s)}^H (R_v^{-1/2}s) |^2 } { alpha^2 {(R_v^{-1/2}s)}^H (R_v^{-1/2}s) } = frac{ | s^H R_v^{-1} s |^2 } { s^H R_v^{-1} s } = s^H R_v^{-1} s.
`          `

Thus, our optimal matched filter is

$h = alpha R_v^\left\{-1\right\}s.$

We often choose to normalize the expected value of the power of the filter output due to the noise to unity. That is, we constrain

$E\left\{ |y_v|^2 \right\} = 1.,$

This constraint implies a value of $alpha$, for which we can solve:

$E\left\{ |y_v|^2 \right\} = alpha^2 s^H R_v^\left\{-1\right\} s = 1,$

yielding

$alpha = frac\left\{1\right\}\left\{sqrt\left\{s^H R_v^\left\{-1\right\} s\right\}\right\},$

giving us our normalized filter,

$h = frac\left\{1\right\}\left\{sqrt\left\{s^H R_v^\left\{-1\right\} s\right\}\right\} R_v^\left\{-1\right\}s.$

If we care to write the impulse response of the filter for the convolution system, it is simply the complex conjugate time reversal of $h$.

Though we have derived the matched filter in discrete time, we can extend the concept to continuous-time systems if we replace $R_v$ with the continuous-time autocorrelation function of the noise, assuming a continuous signal $s\left(t\right)$, continuous noise $v\left(t\right)$, and a continuous filter $h\left(t\right)$.

Alternative derivation of the matched filter

Alternatively, we may solve for the matched filter by solving our maximization problem with a Lagrangian. Again, the matched filter endeavors to maximize the output signal-to-noise ratio ($SNR$) of a filtered deterministic signal in stochastic additive noise. The observed sequence, again, is

$x = s + v,,$

with the noise covariance matrix,

$R_v = E\left\{vv^H\right\}.,$

The signal-to-noise ratio is

$SNR = frac\left\{|y_s|^2\right\}\left\{ E\left\{|y_v|^2\right\} \right\}.$

Evaluating the expression in the numerator, we have

$|y_s|^2 = \left\{y_s\right\}^H y_s = h^H s s^H h.,$

and in the denominator,

$E\left\{|y_v|^2\right\} = E\left\{ \left\{y_v\right\}^H y_v \right\} = E\left\{ h^H v v^H h \right\} = h^H R_v h.,$

The signal-to-noise ratio becomes

$SNR = frac\left\{h^H s s^H h\right\}\left\{ h^H R_v h \right\}.$

If we now constrain the denominator to be 1, the problem of maximizing $SNR$ is reduced to maximizing the numerator. We can then formulate the problem using a Lagrange multiplier:

$h^H R_v h = 1$
$mathcal\left\{L\right\} = h^H s s^H h + lambda \left(1 - h^H R_v h \right)$
$nabla_\left\{h^*\right\} mathcal\left\{L\right\} = s s^H h - lambda R_v h = 0$
$\left(s s^H\right) h = lambda R_v h$

which we recognize as an eigenvalue problem

$h^H \left(s s^H\right) h = lambda h^H R_v h = lambda.$

Since $s s^H$ is of unit rank, it has only one nonzero eigenvalue. It can be shown that this eigenvalue equals

$lambda_\left\{max\right\} = s^H R_v^\left\{-1\right\} s,$

yielding the following optimal matched filter

$h = frac\left\{1\right\}\left\{sqrt\left\{s^H R_v^\left\{-1\right\} s\right\}\right\} R_v^\left\{-1\right\} s.$

This is the same result found in the previous section.

Example of matched filter in radar and sonar

Matched filters are often used in signal detection (see detection theory). As an example, suppose that we wish to judge the distance of an object by reflecting a signal off it. We may choose to transmit a pure-tone sinusoid at 1 Hz. We assume that our received signal is an attenuated and phase-shifted form of the transmitted signal with added noise.

To judge the distance of the object, we correlate the received signal with a matched filter, which, in the case of white (uncorrelated) noise, is another pure-tone 1-Hz sinusoid. When the output of the matched filter system exceeds a certain threshold, we conclude with high probability that the received signal has been reflected off the object. Using the speed of propagation and the time that we first observe the reflected signal, we can estimate the distance of the object. If we change the shape of the pulse in a specially-designed way, the signal-to-noise ratio and the distance resolution can be even improved after matched filtering: this is a technique known as pulse compression.

Additionally, matched filters can be used in parameter estimation problems (see estimation theory). To return to our previous example, we may desire to estimate the speed of the object, in addition to its position. To exploit the Doppler effect, we would like to estimate the frequency of the received signal. To do so, we may correlate the received signal with several matched filters of sinusoids at varying frequencies. The matched filter with the highest output will reveal, with high probability, the frequency of the reflected signal and help us determine the speed of the object. This method is, in fact, a simple version of the discrete Fourier transform (DFT). The DFT takes an $N$-valued complex input and correlates it with $N$ matched filters, corresponding to complex exponentials at $N$ different frequencies, to yield $N$ complex-valued numbers corresponding to the relative amplitudes and phases of the sinusoidal components.

Example of matched filter in digital communications

The matched filter is also used in communications. In the context of a communication system that sends binary messages from the transmitter to the receiver across a noisy channel, a matched filter can be used to detect the transmitted pulses in the noisy received signal.

Imagine we want to send the sequence "0101100100" coded in non polar Non-return-to-zero (NRZ) through a certain channel.

Mathematically, a sequence in NRZ code can be described as a sequence of unit pulses or shifted rect functions, each pulse being weighted by +1 if the bit is "1" and by 0 if the bit is "0". Formally, the scaling factor for the $k^mathrm\left\{th\right\}$ bit is,

$a_k =$
begin{cases} 1, & mbox{if bit } k mbox{ is 1}, 0, & mbox{if bit } k mbox{ is 0}. end{cases}

We can represent our message, $M\left(t\right)$, as the sum of shifted unit pulses:

$M\left(t\right) = sum_\left\{k=-infty\right\}^infty a_k times$
Pi left( frac{t-kT}{T} right).

where $T$ is the time length of one bit.

Thus, the signal to be sent by the transmitter is

If we model our noisy channel as an AWGN channel, white Gaussian noise is added to the signal. At the receiver end, for a Signal-to-noise ratio of 3dB, this may look like:

A first glance will not reveal the original transmitted sequence. There is a high power of noise relative to the power of the desired signal (i.e., there is a low signal-to-noise ratio). If the receiver were to sample this signal at the correct moments, the resulting binary message would possibly belie the original transmitted one.

To increase our signal-to-noise ratio, we pass the received signal through a matched filter. In this case, the filter should be matched to an NRZ pulse (equivalent to a "1" coded in NRZ code). Precisely, the impulse response of the ideal matched filter, assuming white (uncorrelated) noise should be a time-reversed complex-conjugated scaled version of the signal that we are seeking. We choose

$h\left(t\right) = Pileft\left(frac\left\{t\right\}\left\{T\right\} right\right).$

In this case, due to symmetry, the time-reversed complex conjugate of $h\left(t\right)$ is in fact $h\left(t\right)$, allowing us to call $h\left(t\right)$ the impulse response of our matched filter convolution system.

After convolving with the correct matched filter, the resulting signal, $M_mathrm\left\{filtered\right\}\left(t\right)$ is,

$M_mathrm\left\{filtered\right\}\left(t\right) = M\left(t\right) * h\left(t\right)$

where $*$ denotes convolution.

Which can now be safely sampled by the receiver at the correct sampling instants, and compared to an appropriate threshold, resulting in a correct interpretation of the binary message.

Since the matched filter is the filter that maximizes the signal-to-noise ratio it can be shown that it also minimizes the Bit error ratio (BER), which is the ratio of the number of bits that the receiver interprets incorrectly as a fraction of the total number of bits sent.