# Comparing matched and Wiener filters

Started by December 24, 2008
```Hi,

This is something that's been bugging me for the last couple of days.

With the understanding that both are linear, we define the matched
filter as the one that maximises the output SNR, and the Wiener filter
as the one that minimises the mean square error (MSE).  Superficially,
these definitions sound almost identical. However, even in the simplest
model (estimating a scalar value with independent AWGN), we clearly end
up with different filters:

MF:          g = h*
Wiener:      g = Sh*(Shh* + sigma^2.I)^-1

such that x_est = gy, where y = hx + v (where x is scalar data with S =
E|x|^2, v is AWGN with sigma^2.I = E|v|^2, {y,h,v} are Nx1 vectors, and
* denotes conjugate transpose).

My question is, what is the intuitive reason (i.e. not just "because the
maths says so") why these don't end up with the same result, or more
specifically, how the Wiener filter can minimise the MSE without
maximising the SNR?

[This has been brought up before
and subsequent thread branch), but wasn't closed out on.]

--
Oli
```
```On Wed, 24 Dec 2008 11:12:45 +0000, Oliver Charlesworth wrote:

> Hi,
>
> This is something that's been bugging me for the last couple of days.
>
> With the understanding that both are linear, we define the matched
> filter as the one that maximises the output SNR, and the Wiener filter
> as the one that minimises the mean square error (MSE).  Superficially,
> these definitions sound almost identical. However, even in the simplest
> model (estimating a scalar value with independent AWGN), we clearly end
> up with different filters:
>
> MF:          g = h*
> Wiener:      g = Sh*(Shh* + sigma^2.I)^-1
>
> such that x_est = gy, where y = hx + v (where x is scalar data with S =
> E|x|^2, v is AWGN with sigma^2.I = E|v|^2, {y,h,v} are Nx1 vectors, and
> * denotes conjugate transpose).
>
> My question is, what is the intuitive reason (i.e. not just "because the
> maths says so") why these don't end up with the same result, or more
> specifically, how the Wiener filter can minimise the MSE without
> maximising the SNR?
>
> [This has been brought up before
dmode=source
> and subsequent thread branch), but wasn't closed out on.]

I don't think I could give a satisfactory answer to your question without
doing more mathematics than I care to.  So here's an answer to a closely
related question, and some hand-waving:

What this tells us is that SNR and MSE, although they sound very similar,
really aren't.  If you consider what the Wiener filter does to a signal,
though, you can certainly see that it's hacking off parts of the signal
that the matched filter doesn't.

--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
```
```Hi Oli,

The two are designed for different applications, even if their
formulations are similar.  Matched filter applies to the *detection* of the
presence of a known signal, whereas Wiener filter applies to the
*estimation* of an unknown random signal with known power spectrum.  In
either case, the spectrum of the signal is assumed to be known.

If you consider the outputs of the two for a binary communication signal,
the output of the MF looks like triangles with peak amplitudes at the
sampling times; that is, the MF maximizes the SNR only at these sampling
instances.  On the other hand, the output of a Wiener filter, if you really
wanted to use it, would look more like the transmitted binary sequence;
this could not be the last stage for a detector, though.

Hope this helps,

Emre
```
```>If you consider the outputs of the two for a binary communication signal,
>the output of the MF looks like triangles with peak amplitudes at the
>sampling times; that is, the MF maximizes the SNR only at these sampling
>instances.  On the other hand, the output of a Wiener filter, if you
really
>wanted to use it, would look more like the transmitted binary sequence;
>this could not be the last stage for a detector, though.

Just to clarify this example a bit more:  you do not care about the output
of the matched filter except for the sampling instances (which is usually
thresholded for decision), whereas you care about the output of the Wiener
filter equally at all times.

Emre
```
```On Dec 24, 5:12&#2013266080;am, Oliver Charlesworth <ca...@olifilth.co.uk> wrote:
> Hi,
>
> This is something that's been bugging me for the last couple of days.
>
> With the understanding that both are linear, we define the matched
> filter as the one that maximises the output SNR, and the Wiener filter
> as the one that minimises the mean square error (MSE). &#2013266080;Superficially,
> these definitions sound almost identical. However, even in the simplest
> model (estimating a scalar value with independent AWGN), we clearly end
> up with different filters:
>
> MF: &#2013266080; &#2013266080; &#2013266080; &#2013266080; &#2013266080;g = h*
> Wiener: &#2013266080; &#2013266080; &#2013266080;g = Sh*(Shh* + sigma^2.I)^-1
>
> such that x_est = gy, where y = hx + v (where x is scalar data with S =
> E|x|^2, v is AWGN with sigma^2.I = E|v|^2, {y,h,v} are Nx1 vectors, and
> * denotes conjugate transpose).
>
> My question is, what is the intuitive reason (i.e. not just "because the
> maths says so") why these don't end up with the same result, or more
> specifically, how the Wiener filter can minimise the MSE without
> maximising the SNR?
>
> [This has been brought up before
> and subsequent thread branch), but wasn't closed out on.]
>
> --
> Oli

One is SIGNAL based, and the other is MODEL based.

Maurice Givens
```
```emre wrote:
> Hi Oli,
>
> The two are designed for different applications, even if their
> formulations are similar.  Matched filter applies to the *detection* of the
> presence of a known signal, whereas Wiener filter applies to the
> *estimation* of an unknown random signal with known power spectrum.  In
> either case, the spectrum of the signal is assumed to be known.

I'm not sure there's much of a distinction.  The purpose of detection is
to determine some property of the signal, either presence or absence
(OOK), or some more complicated modulation scheme (or something else
entirely in e.g. radar applications).  Therefore, the requirement is to
*estimate* some parameter behind the signal.

> If you consider the outputs of the two for a binary communication signal,
> the output of the MF looks like triangles with peak amplitudes at the
> sampling times; that is, the MF maximizes the SNR only at these sampling
> instances.  On the other hand, the output of a Wiener filter, if you really
> wanted to use it, would look more like the transmitted binary sequence;
> this could not be the last stage for a detector, though.

I see what you're saying.  However, isn't this just an artifact of the
"filter across all time and sample" viewpoint of matched-filtering, as
opposed to the "integrate-and-dump" viewpoint, where we only calculate
the output for the sampling points (i.e. correlation, equivalent to the
vector formation).

--
Oli
```
```On 24 Des, 17:31, maury <maury...@core.com> wrote:
> On Dec 24, 5:12&#2013266080;am, Oliver Charlesworth <ca...@olifilth.co.uk> wrote:

> > My question is, what is the intuitive reason (i.e. not just "because the
> > maths says so") why these don't end up with the same result, or more
> > specifically, how the Wiener filter can minimise the MSE without
> > maximising the SNR?
..
> One is SIGNAL based, and the other is MODEL based.

Agreed. The matched filter is derived from the transient signal
in time domain, whereas the Wiener filter is derived from the
signal and noise covariances. Since infinitely many time
sequences share one autocovariance sequence, this means that
phase information is lost, even if the computations take place
in temporal domain.

Rune
```
```Oli Charlesworth <catch@olifilth.co.uk> writes:

> emre wrote:
>> Hi Oli,
>>
>> The two are designed for different applications, even if their
>> formulations are similar.  Matched filter applies to the *detection* of the
>> presence of a known signal, whereas Wiener filter applies to the
>> *estimation* of an unknown random signal with known power spectrum.  In
>> either case, the spectrum of the signal is assumed to be known.
>
> I'm not sure there's much of a distinction.  The purpose of detection is
> to determine some property of the signal, either presence or absence
> (OOK), or some more complicated modulation scheme (or something else
> entirely in e.g. radar applications).  Therefore, the requirement is to
> *estimate* some parameter behind the signal.
>
>
>> If you consider the outputs of the two for a binary communication signal,
>> the output of the MF looks like triangles with peak amplitudes at the
>> sampling times; that is, the MF maximizes the SNR only at these sampling
>> instances.  On the other hand, the output of a Wiener filter, if you really
>> wanted to use it, would look more like the transmitted binary sequence;
>> this could not be the last stage for a detector, though.
>
> I see what you're saying.  However, isn't this just an artifact of the
> "filter across all time and sample" viewpoint of matched-filtering, as
> opposed to the "integrate-and-dump" viewpoint, where we only calculate
> the output for the sampling points (i.e. correlation, equivalent to the
> vector formation).

Yeah. A matched filter in digital comms assumes you have timing.
--
%  Randy Yates                  % "I met someone who looks alot like you,
%% Fuquay-Varina, NC            %             she does the things you do,
%%% 919-577-9882                %                     but she is an IBM."
%%%% <yates@ieee.org>           %        'Yours Truly, 2095', *Time*, ELO
http://www.digitalsignallabs.com
```
```maury wrote:
> On Dec 24, 5:12 am, Oliver Charlesworth <ca...@olifilth.co.uk> wrote:
>> Hi,
>>
>> This is something that's been bugging me for the last couple of days.
>>
>> With the understanding that both are linear, we define the matched
>> filter as the one that maximises the output SNR, and the Wiener filter
>> as the one that minimises the mean square error (MSE).  Superficially,
>> these definitions sound almost identical. However, even in the simplest
>> model (estimating a scalar value with independent AWGN), we clearly end
>> up with different filters:
>>
>> MF:          g = h*
>> Wiener:      g = Sh*(Shh* + sigma^2.I)^-1
>>
>> such that x_est = gy, where y = hx + v (where x is scalar data with S =
>> E|x|^2, v is AWGN with sigma^2.I = E|v|^2, {y,h,v} are Nx1 vectors, and
>> * denotes conjugate transpose).
>>
>> My question is, what is the intuitive reason (i.e. not just "because the
>> maths says so") why these don't end up with the same result, or more
>> specifically, how the Wiener filter can minimise the MSE without
>> maximising the SNR?
>>
>> [This has been brought up before
>> and subsequent thread branch), but wasn't closed out on.]
>>
>> --
>> Oli
>
> One is SIGNAL based, and the other is MODEL based.

I appreciate that the optimisation criteria may have stemmed from
different sources, but I guess what I'm having most trouble reconciling
is that MSE and SNR aren't equivalent (even if we constrain S to be fixed).

--
Oli
```
```On 24 Des, 23:27, Oli Charlesworth <ca...@olifilth.co.uk> wrote:
> maury wrote:
> > On Dec 24, 5:12 am, Oliver Charlesworth <ca...@olifilth.co.uk> wrote:
> >> Hi,
>
> >> This is something that's been bugging me for the last couple of days.
>
> >> With the understanding that both are linear, we define the matched
> >> filter as the one that maximises the output SNR, and the Wiener filter
> >> as the one that minimises the mean square error (MSE). &#2013266080;Superficially,
> >> these definitions sound almost identical. However, even in the simplest
> >> model (estimating a scalar value with independent AWGN), we clearly end
> >> up with different filters:
>
> >> MF: &#2013266080; &#2013266080; &#2013266080; &#2013266080; &#2013266080;g = h*
> >> Wiener: &#2013266080; &#2013266080; &#2013266080;g = Sh*(Shh* + sigma^2.I)^-1
>
> >> such that x_est = gy, where y = hx + v (where x is scalar data with S =
> >> E|x|^2, v is AWGN with sigma^2.I = E|v|^2, {y,h,v} are Nx1 vectors, and
> >> * denotes conjugate transpose).
>
> >> My question is, what is the intuitive reason (i.e. not just "because the
> >> maths says so") why these don't end up with the same result, or more
> >> specifically, how the Wiener filter can minimise the MSE without
> >> maximising the SNR?
>
> >> [This has been brought up before
> >> and subsequent thread branch), but wasn't closed out on.]
>
> >> --
> >> Oli
>
> > One is SIGNAL based, and the other is MODEL based.
>
> I appreciate that the optimisation criteria may have stemmed from
> different sources, but I guess what I'm having most trouble reconciling
> &#2013266080;is that MSE and SNR aren't equivalent (even if we constrain S to be fixed).

The main difference is that MSE is the deviation between the
desired and actual response. SNR includes an additive noise
term as well, which is missing in the MSE.

Rune
```