> > 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 > > "The matched filter is the optimal linear filter for maximizing the > signal to noise ratio (SNR) in the presence of additive stochastic > noise" =A0(http://en.wikipedia.org/wiki/Matched_filter) > > LINEAR is the key word hereLinearity was the assumption of the OP as nothing new was being done until the deconvolution. The reference is just the noise free signal times a scalar so all you are really doing when you take the product of the template and noise free signal in the frequency domain is taking the square of the reference or signal times a scalar. So taking the square root in the frequency domain is the reverse operation of multiplying the noise free signal by the reference in the frequency domain. That's how you deconvolve what some consider the final output of a match filter. This was first done a few months ago on Excel at http://www.bretcahill.com The original goal was to filter the signal for amplitude. If the convolution works best, use the convolution. If recovering the filtered signal by usig the deconvolution works better then use that. Bret Cahill
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
Iterative Match Filterings
Started by ●April 3, 2012
Reply by ●April 10, 20122012-04-10
Reply by ●April 10, 20122012-04-10
On 4/9/2012 11:19 PM, Bret Cahill wrote:> Depends on what you want from the matched filterI want to do the classical thing. I don't know of any other using that terminology. Terminology remains an issue in this thread. My objective would be to find the time delay or advance which maximizes the signal to noise ratio *of the inner product of two signal vectors or sequences*. Note that the inner product can have a slowly changing value as a function of the length of the replica. That is, for a square pulse of length N samples, the output will change by 1/N times the difference between the first and last samples. Maybe that's a case where you mention "lowpass". Anyway, the output at each sample time is a single sample. To do something else is to do something else which has a different name. For example, I can imagine this: 1) Define a signal 2) Based on that signal, define a matched filter. 3) Run a perturbed version of the original signal through the matched filter. 4) Examine the output for a peak which will estimate the time delay with highest possible SNR of the *PEAK* output. So that's what we mean by "matched filtering". But, what if you do 1,2 and 3 but not 4? What if you substitute for 4 something like this: 4) Examine the output for a shape that looks like the replica. What do you call that? It's not a matched filter in the classical sense. How is "examine" implemented in this process? What if "examine" is implemented by doing yet another correlation? I think maybe that's what you had in mind. Then, doing another correlation, in view of the objective, what do you look for? A peak no doubt, right? This gives rise to a few questions: Q1: Why would one think that the output of a classical matched filter would look like the replica .. even in the noisless or unperturbed case? A1: One would not expect that to be the case. Q2: Given Q1/A1 then what would one expect? A2: Use a square pulse as an example. The matched filter output has a triangular wave shape with a peak where the square pulses coincide. The same happens with a square pulse shaped sinusoid. The output envelope is triangular. Re correlating this with another square pulse does nothing very good to restore the original square pulse shape. If this post isn't helpful then maybe it will suggest ways that the discussion can be cleaned up so we understand what's being: - asked? - claimed? - asserted? what???? It is very much not clear Bret. Fred
Reply by ●April 10, 20122012-04-10
> > Depends on what you want from the matched filter> I want to do the classical thing.But supposing matched filtering could be adapted for another use where it was better than another popular filter, say, a Wiener filter?> I don't know of any other using that > terminology. Terminology remains an issue in this thread.The French are really big on using the exact right terms. They have an expression that means, "the exact right word." I generally agree but everything seems so straightforward here any formality whatsoever seems silly. Just follow the steps in Excel in the optics thread to understand how it's being done but a good mathematician should be able to figure it out just from the 2 or 3 paragraphs at http://www.bretcahill.com If anyone wants I'll email the Excel program. The colors of the cells are the same as those in the graphs. . . .> To do something else is to do something else which has a different name. > =A0 =A0For example, I can imagine this:> 1) Define a signal > 2) Based on that signal, define a matched filter. > 3) Run a perturbed version of the original signal through the matched > filter. > 4) Examine the output for a peak which will estimate the time delay with > highest possible SNR of the *PEAK* output.> So that's what we mean by "matched filtering".Fine, but does that recover something that always looks like original signal? Except for _maybe_ some exponential curve, there are no convolutions that look like the original signal. So, if your goal is to recover the original signal without nearly as much noise, why not use all the information in the template / reference? Why not use all the phase angle information as well as the PSD that is provided by matched filtering? There's more to life than radar and other signal detection solutions.> But, what if you do 1,2 and 3 but not 4?> What if you substitute for 4 something like this:> 4) Examine the output for a shape that looks like the replica.My next step would be the deconvolution of the match filter output, your step 3. This is easy because all you need to do is IMSQRT the convolution in the frequency domain. This recovers the original signal's wave form minus a lot of noise.> What do you call that? =A0It's not a matched filter in the classical sens=e. OK, call it "Matched Filtering for Restoring Signals." I was so sure they had been doing this for decades I never even bothered to google it.> How is "examine" implemented in this process? > What if "examine" is implemented by doing yet another correlation? =A0I > think maybe that's what you had in mind. > Then, doing another correlation, in view of the objective, what do you > look for? =A0A peak no doubt, right? > > This gives rise to a few questions: > > Q1: =A0Why would one think that the output of a classical matched filter > would look like the replica .. even in the noisless or unperturbed case?It won't until you take the deconvolution.> A1: =A0One would not expect that to be the case. > > Q2: =A0Given Q1/A1 then what would one expect? > > A2: =A0Use a square pulse as an example. > =A0 =A0 =A0 The matched filter output has a triangular wave shape with a =peak> where the square pulses coincide.Why screw around with triangles when it is so easy to deconvolve the triangles back to the original square pulses? Just take the square root in the frequency domain then inverse FFT. A $250 netbook will easily do the dozen or so 512 sample convolutions in a couple of seconds.> The same happens with a square pulse > shaped sinusoid. =A0The output envelope is triangular.> Re correlating this with another square pulse does nothing very good to > restore the original square pulse shape.> If this post isn't helpful then maybe it will suggest ways that the > discussion can be cleaned up so we understand what's being: > - asked? > - claimed? > - asserted? > what???? =A0It is very much not clear Bret.There's very little to work with to clarify. Bret Cahill
Reply by ●April 10, 20122012-04-10
On Tue, 10 Apr 2012 14:36:09 -0700 (PDT), Bret Cahill <BretCahill@peoplepc.com> wrote:>> > Depends on what you want from the matched filter > >> I want to do the classical thing. > >But supposing matched filtering could be adapted for another use where >it was better than another popular filter, say, a Wiener filter?Supposing you can drive a screw into a piece of wood faster with a hammer than a screwdriver, does that mean it's a better method? Eric Jacobsen Anchor Hill Communications www.anchorhill.com
Reply by ●April 10, 20122012-04-10
On 4/10/2012 2:36 PM, Bret Cahill wrote:>> If this post isn't helpful then maybe it will suggest ways that the >> > discussion can be cleaned up so we understand what's being: >> > - asked? >> > - claimed? >> > - asserted? >> > what???? It is very much not clear Bret. > There's very little to work with to clarify.I was suggesting that my post may *not* be helpful which would suggest in turn that you clarify whether you are asking, claiming or asserting. I get it now. You're asserting. I'm not further interested as I clearly cannot help you assert. Fred
Reply by ●April 11, 20122012-04-11
> >> If this post isn't helpful then maybe it will suggest ways that the > >> > =A0discussion can be cleaned up so we understand what's being: > >> > =A0- asked? > >> > =A0- claimed? > >> > =A0- asserted? > >> > =A0what???? =A0It is very much not clear Bret. > > There's very little to work with to clarify.> I was suggesting that my post may *not* be helpful which would suggest > in turn that you clarify whether you are asking, claiming or asserting. > > I get it now. =A0You're asserting. =A0I'm not further interested as I > clearly cannot help you assert._Everyone_ needs to start asserting more. I'd be a hypocrite if I didn't do some asserting myself. Asserting doesn't preclude the asking of questions either. Bret Cahill
Reply by ●April 11, 20122012-04-11
On 4/11/12 12:26 AM, Bret Cahill wrote:> > _Everyone_ needs to start asserting more.sometimes society (the rest of us) need some people to assert less and listen more. the "needs" of the individual to assert are secondary.> I'd be a hypocrite if I didn't do some asserting myself.i don't see anyone accusing you of hypocrisy.> Asserting doesn't preclude the asking of questions either.asking non-rhetorical questions are pointless when not listening for an answer. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●April 11, 20122012-04-11
> > _Everyone_ needs to start asserting more. > > sometimes society (the rest of us) need some people to assert less and > listen more.That was never true, even _before_ everything was online. Bret Cahill "Anything less than genius just won't do." -- English woman commentator on BBC (2006)
Reply by ●April 11, 20122012-04-11
eric.jacobsen@ieee.org (Eric Jacobsen) writes:> On Tue, 10 Apr 2012 14:36:09 -0700 (PDT), Bret Cahill > <BretCahill@peoplepc.com> wrote: > >>> > Depends on what you want from the matched filter >> >>> I want to do the classical thing. >> >>But supposing matched filtering could be adapted for another use where >>it was better than another popular filter, say, a Wiener filter? > > Supposing you can drive a screw into a piece of wood faster with a > hammer than a screwdriver, does that mean it's a better method?Eric, have you ever considered philosophy as a career? :) -- Randy Yates DSP/Firmware Engineer 919-577-9882 (H) 919-720-2916 (C)
Reply by ●April 11, 20122012-04-11
> >>> > Depends on what you want from the matched filter > > >>> I want to do the classical thing. > > >>But supposing matched filtering could be adapted for another use where > >>it was better than another popular filter, say, a Wiener filter? > > > Supposing you can drive a screw into a piece of wood faster with a > > hammer than a screwdriver, =A0does that mean it's a better method? > > Eric, have you ever considered philosophy as a career? :)He dodged the issue so he might work out as a GOP political "philosopher." Match filtering, or, if the additional deconvolution step is new, "Matched Filtering/Magnitude Recovery" utilizes all of the phase angle info as well as the PSD info and is, therefore, better than any other filter as far as recovering the magnitude of the original signal. Matched filtering/signal recovery also seems to be a better way to recover square waves out of noise than screwing around with triangle shaped convolutions. Bret Cahill







