DSPRelated.com
Forums

Iterative Match Filterings

Started by Bret Cahill April 3, 2012
Instead of just taking the convolution of a signal with the reference
or kernel once and then taking the square root in the frequency
domain, why not match filter with the reference again and again to
recover the original clean signal?

Well, you _can_ do that if a wave form is all you want, but you can
get that from the ref. alone _anyway_.

If you want to keep the original magnitude of the signal, however, and
if the kernel is a different magnitude than the original signal, then
you will only be working your way back to the kernel with each
iteration.

The solution here is to convolve the signal with the kernel and then
the kernel with the kernel and then comparing the magnitudes of those
two convolutions.

Apply that factor to correct the magnitude of the filtered signal.


Bret Cahill


> Instead of just taking the convolution of a signal with the reference > or kernel once and then taking the square root in the frequency > domain, why not match filter with the reference again and again to > recover the original clean signal? > > Well, you _can_ do that if a wave form is all you want, but you can > get that from the ref. alone _anyway_. > > If you want to keep the original magnitude of the signal, however, and > if the kernel is a different magnitude than the original signal, then > you will only be working your way back to the kernel with each > iteration. > > The solution here is to convolve the signal with the kernel and then > the kernel with the kernel and then comparing the magnitudes of those > two convolutions. > > Apply that factor to correct the magnitude of the filtered signal.
One question is: Is there anything to be gained with iterative match filterings as far as recovering the correct magnitude is concerned? Bret Cahill
Bret Cahill wrote:
>> Instead of just taking the convolution of a signal with the reference >> or kernel once and then taking the square root in the frequency >> domain, why not match filter with the reference again and again to >> recover the original clean signal? >> >> Well, you _can_ do that if a wave form is all you want, but you can >> get that from the ref. alone _anyway_. >> >> If you want to keep the original magnitude of the signal, however, and >> if the kernel is a different magnitude than the original signal, then >> you will only be working your way back to the kernel with each >> iteration. >> >> The solution here is to convolve the signal with the kernel and then >> the kernel with the kernel and then comparing the magnitudes of those >> two convolutions. >> >> Apply that factor to correct the magnitude of the filtered signal. > > One question is: > > Is there anything to be gained with iterative match filterings as far > as recovering the correct magnitude is concerned? > > > Bret Cahill >
This answer is loaded with observer bias, but I find that application of any filter is almost guaranteed to change the magnitude of the result. I've played with normalization* of the output signal back to the magnitude of the original and I don't detect any general pattern. *almost always audio signals, and the measure of magnitude is almost always the RMS of the vector in question... If the mag. of the result is 0.5 dB down, then add 0.5 gain... this may or may not mean you can change the filter to do that for you... for convolution kernels, I belive it *can*, but IIR filters almost certainly don't work that way... -- Les Cargill
On Mon, 02 Apr 2012 22:25:33 -0700, Bret Cahill wrote:

> Instead of just taking the convolution of a signal with the reference or > kernel once and then taking the square root in the frequency domain, why > not match filter with the reference again and again to recover the > original clean signal? > > Well, you _can_ do that if a wave form is all you want, but you can get > that from the ref. alone _anyway_. > > If you want to keep the original magnitude of the signal, however, and > if the kernel is a different magnitude than the original signal, then > you will only be working your way back to the kernel with each > iteration. > > The solution here is to convolve the signal with the kernel and then the > kernel with the kernel and then comparing the magnitudes of those two > convolutions. > > Apply that factor to correct the magnitude of the filtered signal.
If doing matched filtering once is optimal, then doing _any_ follow-on filtering degrades the output. If doing matched filtering _isn't_ optimal in the sense that you desire, then you need to choose a different filter, designed to an optimality constraint that matches your desire. Trying to solve a problem by randomly picking terminology out of a hat, then throwing the result at the problem, is not optimal. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On 4/2/2012 10:25 PM, Bret Cahill wrote:
> Instead of just taking the convolution of a signal with the reference > or kernel once and then taking the square root in the frequency > domain, why not match filter with the reference again and again to > recover the original clean signal?
Perhaps you might consider: "What is the purpose of applying a matched filter?" I think you will find that the purpose is to enhance the SNR of the *detection of the presence* of the original signal in noise. Just consider that the calculation is that of an inner product between two vectors. The inner product is a scalar. There is a scalar output in time for each sample in time. So, the objective is to align the vectors in time such that it statistically generates a maximum output when the alignment is best. This is not about extracting a waveform. It's about extracting a maximum. I think it's fair to say that by extracting a maximum of reasonable value, the underlying clean waveform in noise is *implied*. But that's not "extraction" exactly is it? That is to say: if you apply some filter and want the original waveform to emerge then that's different than saying you want to detect the presence of the waveform in noise. There is a time/bandwidth tradeoff here as well. So, a very narrowband filter could be a matched filter for a suitably long sinusoid but with very poor temporal resolution as to "when did it happen?" But what about a short sinusoidal pulse? The temporal resolution is improved at the expense of frequency resolution. So, if we ask: "Did a sinusoidal pulse arrive at a particular time with a particular frequency?" there is ambiguity regarding both time and frequency when a maximum is detected. By extension, one might imply or even *measure* the apparent amplitude of the apparently present waveform in some context involving calibration, etc. But this gets fuzzed up if there are frequency variations and is dealt with by using multiple matched filters centered at different frequencies. .... and more beyond that. Fred
> >> Instead of just taking the convolution of a signal with the reference > >> or kernel once and then taking the square root in the frequency > >> domain, why not match filter with the reference again and again to > >> recover the original clean signal? > > >> Well, you _can_ do that if a wave form is all you want, but you can > >> get that from the ref. alone _anyway_. > > >> If you want to keep the original magnitude of the signal, however, and > >> if the kernel is a different magnitude than the original signal, then > >> you will only be working your way back to the kernel with each > >> iteration. > > >> The solution here is to convolve the signal with the kernel and then > >> the kernel with the kernel and then comparing the magnitudes of those > >> two convolutions. > > >> Apply that factor to correct the magnitude of the filtered signal. > > > One question is: > > > Is there anything to be gained with iterative match filterings as far > > as recovering the correct magnitude is concerned? > > > Bret Cahill > > This answer is loaded with observer bias, but I find that application > of any filter is almost guaranteed to change the magnitude of the result.
That shouldn't be a problem here as long as the % change is the same for both filtered signals. The reason for this is because the result is always the quotient of two filtered signals. This works out ok for just the convolution but if you complete the match filtering process by taking de convolutions to recover the original wave forms, then the magnitudes of both signals move toward the magnitude of the kernel and the quotient moves closer to 1.
> I've played with normalization* of the output signal back to the > magnitude of the original and I don't detect any general pattern.
Normalization is inherent/automatic taking the quotient of the convolutions. Trying to recover the magnitudes of the original signals from the match filtered signals requires 3 additional steps: 1. match filtering the kernel with itself and then, 2. comparing that with each match filtered signal for a factor. 3. applying that correction factor to it's respective signal.
> *almost always audio signals, and the measure of magnitude is > almost always the RMS of the vector in question... > > If the mag. of the result is 0.5 dB down, then add 0.5 gain... this > may or may not mean you can change the filter to do that > for you... for convolution kernels, I belive it *can*, but IIR > filters almost certainly don't work that way...
> > Instead of just taking the convolution of a signal with the reference > > or kernel once and then taking the square root in the frequency > > domain, why not match filter with the reference again and again to > > recover the original clean signal? > > Perhaps you might consider: > "What is the purpose of applying a matched filter?"
To get the magnitudes of the clean signals. Taking the convolution of each signal with the reference low pass filters and eliminates multiple crossings problems. If a quotient of two signals convolved with the same kernel is taken then any magnitude change is the same in both numerator and denominator so it cancels in the quotient. If you deconvolve the convolution to recover the original wave form -- basically completing the match filtering process -- then taking the quotient will not cancel the magnitude error that was introduced by the convolution.
> I think you will find that the purpose is to enhance the SNR of the > *detection of the presence* of the original signal in noise. > > Just consider that the calculation is that of an inner product between > two vectors. �The inner product is a scalar. > There is a scalar output in time for each sample in time. > So, the objective is to align the vectors in time such that it > statistically generates a maximum output when the alignment is best. > > This is not about extracting a waveform. �It's about extracting a maximum. > > I think it's fair to say that by extracting a maximum of reasonable > value, the underlying clean waveform in noise is *implied*. �But that's > not "extraction" exactly is it? �That is to say: if you apply some > filter and want the original waveform to emerge then that's different > than saying you want to detect the presence of the waveform in noise. > > There is a time/bandwidth tradeoff here as well. > So, a very narrowband filter could be a matched filter for a suitably > long sinusoid but with very poor temporal resolution as to "when did it > happen?" �But what about a short sinusoidal pulse? �The temporal > resolution is improved at the expense of frequency resolution. �So, if > we ask: "Did a sinusoidal pulse arrive at a particular time with a > particular frequency?" there is ambiguity regarding both time and > frequency when a maximum is detected. > > By extension, one might imply or even *measure* the apparent amplitude > of the apparently present waveform in some context involving > calibration, etc. �But this gets fuzzed up if there are frequency > variations and is dealt with by using multiple matched filters centered > at different frequencies. �.... and more beyond that. > > Fred
On Tue, 03 Apr 2012 20:42:16 -0700, Bret Cahill wrote:

>> > Instead of just taking the convolution of a signal with the reference >> > or kernel once and then taking the square root in the frequency >> > domain, why not match filter with the reference again and again to >> > recover the original clean signal? >> >> Perhaps you might consider: >> "What is the purpose of applying a matched filter?" > > To get the magnitudes of the clean signals.
Yes, we already established that _you_ want the filter to do that. What _Fred_ is saying (and, for that matter, I also) is
>>> What does the MATH say that a matched filter is designed for <<<
Because if you ain't applying a filter to the purpose for which it is designed, and hoping that a high concentration of buzz-words will make things operate well, then you ain't doing engineering -- you're doing magic, and the next step is to go buy some live chickens to sacrifice. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
> Because if you ain't applying a filter to the purpose for which it is > designed
If you can't figure out how to use convolutions and match filtering to determine magnitudes of noisy signals you need to start a thread entitled "A Scholarly Enumeration of Filters & Their Purposes." Maybe you can get it in Wikipedia! Bret Cahill
On Wed, 04 Apr 2012 16:24:37 -0700, Bret Cahill wrote:

>> Because if you ain't applying a filter to the purpose for which it is >> designed > > If you can't figure out how to use convolutions and match filtering to > determine magnitudes of noisy signals you need to start a thread > entitled "A Scholarly Enumeration of Filters & Their Purposes."
(A): _I_ can. (B): You don't even have a clue what you're saying. (C): If you can't ask a misguided question and then accept help getting your _question_ on track, then you shouldn't ask questions. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com