FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-27-2010, 10:04 PM
gretzteam
Guest
 
Posts: n/a
Default Detecting if a notch filter is 'notching' something!

Hi,
I'm receiving a signal at 100kHz and need to do two things at the sam
time:

-notch the 2k frequency.
-rough detection of the presence of 2k frequency.

So basically the notch filter is always there, but I also want to know i
something is being notched.

I could obviously have in parallel a bandpass filter at 2k and monitor th
signal at the output. However I wonder if the answer isn't already withi
the notch filter. Would there be a way to see if the notch filter was doin
any work by looking at some internal values within the filter...

I'm using a 4th order butterworth DirectForm-II SOS notch filter.

Any idea
Reply With Quote
  #2 (permalink)  
Old 01-27-2010, 10:28 PM
Dirk Bell
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

On Jan 27, 4:04*pm, "gretzteam" <gretzt...@yahoo.com> wrote:
> Hi,
> I'm receiving a signal at 100kHz and need to do two things at the same
> time:
>
> -notch the 2k frequency.
> -rough detection of the presence of 2k frequency.
>
> So basically the notch filter is always there, but I also want to know if
> something is being notched.
>
> I could obviously have in parallel a bandpass filter at 2k and monitor the
> signal at the output. However I wonder if the answer isn't already within
> the notch filter. Would there be a way to see if the notch filter was doing
> any work by looking at some internal values within the filter...
>
> I'm using a 4th order butterworth DirectForm-II SOS notch filter.
>
> Any idea


Energy into the filter compared to energy out of the filter?
Reply With Quote
  #3 (permalink)  
Old 01-28-2010, 02:32 AM
John Monro
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

Dirk Bell wrote:
> On Jan 27, 4:04 pm, "gretzteam" <gretzt...@yahoo.com> wrote:
>> Hi,
>> I'm receiving a signal at 100kHz and need to do two things at the same
>> time:
>>
>> -notch the 2k frequency.
>> -rough detection of the presence of 2k frequency.
>>
>> So basically the notch filter is always there, but I also want to know if
>> something is being notched.
>>
>> I could obviously have in parallel a bandpass filter at 2k and monitor the
>> signal at the output. However I wonder if the answer isn't already within
>> the notch filter. Would there be a way to see if the notch filter was doing
>> any work by looking at some internal values within the filter...
>>
>> I'm using a 4th order butterworth DirectForm-II SOS notch filter.
>>
>> Any idea

>
> Energy into the filter compared to energy out of the filter?


Use a linear-phase FIR bandpass filter for the signal-detect
function. For the notch function, subtract the output of
the band-pass filter from an appropriately delayed version
of the original signal.

Regards,
John
Reply With Quote
  #4 (permalink)  
Old 01-28-2010, 05:24 AM
Tim Wescott
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

On Wed, 27 Jan 2010 15:04:45 -0600, gretzteam wrote:

> Hi,
> I'm receiving a signal at 100kHz and need to do two things at the same
> time:
>
> -notch the 2k frequency.
> -rough detection of the presence of 2k frequency.
>
> So basically the notch filter is always there, but I also want to know
> if something is being notched.
>
> I could obviously have in parallel a bandpass filter at 2k and monitor
> the signal at the output. However I wonder if the answer isn't already
> within the notch filter. Would there be a way to see if the notch filter
> was doing any work by looking at some internal values within the
> filter...
>
> I'm using a 4th order butterworth DirectForm-II SOS notch filter.
>
> Any idea


A notch filter is basically a unity-gain, zero-phase shift resonator
whose output gets subtracted from the input signal.

So figure out where that resonator is in your filter, and monitor it --
when it shows energy, it's detecting your tone.

--
www.wescottdesign.com
Reply With Quote
  #5 (permalink)  
Old 01-28-2010, 03:09 PM
gretzteam
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

>A notch filter is basically a unity-gain, zero-phase shift resonator
>whose output gets subtracted from the input signal.


>So figure out where that resonator is in your filter, and monitor it --
>when it shows energy, it's detecting your tone.
>www.wescottdesign.com


This is what I don't understand well. How can a sum of SOS be a 'resonato
whose output gets subtracted from the input'?
Are you talking about another Notch filter structure that would match thi
more closely?

Thanks,




Reply With Quote
  #6 (permalink)  
Old 01-28-2010, 03:23 PM
Tauno Voipio
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

gretzteam wrote:
>> A notch filter is basically a unity-gain, zero-phase shift resonator
>> whose output gets subtracted from the input signal.

>
>> So figure out where that resonator is in your filter, and monitor it --
>> when it shows energy, it's detecting your tone.
>> www.wescottdesign.com

>
> This is what I don't understand well. How can a sum of SOS be a 'resonator
> whose output gets subtracted from the input'?
> Are you talking about another Notch filter structure that would match this
> more closely?
>
> Thanks,



You can make it in reverse: Take a suitably delayed copy
of the input signal and subtract the notched signal from
it. The difference is what is notched out.

--

Tauno Voipio

Reply With Quote
  #7 (permalink)  
Old 01-29-2010, 07:35 AM
John Monro
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

Tauno Voipio wrote:
> gretzteam wrote:
>>> A notch filter is basically a unity-gain, zero-phase shift resonator
>>> whose output gets subtracted from the input signal.

>>
>>> So figure out where that resonator is in your filter, and monitor it
>>> -- when it shows energy, it's detecting your tone. www.wescottdesign.com

>>
>> This is what I don't understand well. How can a sum of SOS be a
>> 'resonator
>> whose output gets subtracted from the input'? Are you talking about
>> another Notch filter structure that would match this
>> more closely?
>>
>> Thanks,

>
>
> You can make it in reverse: Take a suitably delayed copy
> of the input signal and subtract the notched signal from
> it. The difference is what is notched out.
>


Not if the OP uses his 4th order butterworth DirectForm-II
SOS notch filter. For subtraction to work the filter must
have a linear phase.

Regards,
John
Reply With Quote
  #8 (permalink)  
Old 01-29-2010, 02:40 PM
Greg Berchin
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

On Fri, 29 Jan 2010 17:35:11 +1100, John Monro <[email protected]>
wrote:

>For subtraction to work the filter must
>have a linear phase.


A generic 2nd-order notch filter:

.. s² + A²
.. ------------
.. s² + Bs + A²

"One minus a generic 2nd-order notch filter":

.. s² + A²
.. 1 - ------------
.. s² + Bs + A²
..
.. s² + Bs + A² - (s² + A²)
.. = ------------------------
.. s² + Bs + A²
..
.. Bs
.. = ------------
.. s² + Bs + A²

.... which is a bandpass filter.

Neither the notch filter nor the bandpass filter is linear phase.

Greg
Reply With Quote
  #9 (permalink)  
Old 01-30-2010, 03:17 AM
Tim Wescott
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

On Thu, 28 Jan 2010 08:09:25 -0600, gretzteam wrote:

>>A notch filter is basically a unity-gain, zero-phase shift resonator
>>whose output gets subtracted from the input signal.

>
>>So figure out where that resonator is in your filter, and monitor it --
>>when it shows energy, it's detecting your tone. www.wescottdesign.com

>
> This is what I don't understand well. How can a sum of SOS be a
> 'resonator whose output gets subtracted from the input'? Are you talking
> about another Notch filter structure that would match this more closely?
>
> Thanks,


The feedback half of each second order section is a resonator, the output
half (the b0-b2 coefficients) are what makes it a notch, high-, low-, or
band-pass. The arrangement of these output coefficients into a notch
configuration are effectively subtracting a bandpass filter from the
initial signal -- really.

Knowing the states at any given time will uniquely determine the amount
of energy in the filter. You have two filter sections; correctly sum up
the energy from each one and you'll know how much energy is being notched
out.

You _are_ going to have to do some math here -- that's life for a DSP
engineer.

--
www.wescottdesign.com
Reply With Quote
  #10 (permalink)  
Old 01-30-2010, 12:22 PM
John Monro
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

Greg Berchin wrote:
> On Fri, 29 Jan 2010 17:35:11 +1100, John Monro <[email protected]>
> wrote:
>
>> For subtraction to work the filter must
>> have a linear phase.

>
> A generic 2nd-order notch filter:
>
> . s² + A²
> . ------------
> . s² + Bs + A²
>
> "One minus a generic 2nd-order notch filter":
>
> . s² + A²
> . 1 - ------------
> . s² + Bs + A²
> .
> . s² + Bs + A² - (s² + A²)
> . = ------------------------
> . s² + Bs + A²
> .
> . Bs
> . = ------------
> . s² + Bs + A²
>
> ... which is a bandpass filter.
>
> Neither the notch filter nor the bandpass filter is linear phase.
>
> Greg


You are quite right Greg. What I was thinking of was the
situation where the 'notch' filter is a reasonably flat
band-reject filter, but of course this would have a much
higher order than second-order filter mentioned by the OP.

With a nice flat higher-order band-reject filter the
subtraction scheme does not work well because the phase
shift either side of centre frequency messes up the
amplitude response when you do the subtraction. at passband.


Regards,
John
Reply With Quote
  #11 (permalink)  
Old 01-30-2010, 12:26 PM
John Monro
Guest
 
Posts: n/a
Default Re: Detecting if a notch filter is 'notching' something!

Greg Berchin wrote:
> On Fri, 29 Jan 2010 17:35:11 +1100, John Monro <[email protected]>
> wrote:
>
>> For subtraction to work the filter must
>> have a linear phase.

>
> A generic 2nd-order notch filter:
>
> . s² + A²
> . ------------
> . s² + Bs + A²
>
> "One minus a generic 2nd-order notch filter":
>
> . s² + A²
> . 1 - ------------
> . s² + Bs + A²
> .
> . s² + Bs + A² - (s² + A²)
> . = ------------------------
> . s² + Bs + A²
> .
> . Bs
> . = ------------
> . s² + Bs + A²
>
> ... which is a bandpass filter.
>
> Neither the notch filter nor the bandpass filter is linear phase.
>
> Greg


You are quite right Greg. What I was thinking of was the
situation where the 'notch' filter is a reasonably flat
band-reject filter, but of course this would have a much
higher order than the second-order filter mentioned by the OP.

With a nice flat higher-order band-reject filter the
subtraction scheme would not work well because the phase
shift either side of centre frequency would mess up the
amplitude response when the subtraction was carried out.


Regards,
John
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
notching filter that removes the power line harmonics? DigitalSignal DSP 38 11-13-2008 12:54 AM
IIR notch filter itsh11 DSP 18 06-28-2008 02:36 PM
Notch filter y17476 DSP 4 05-12-2008 07:05 PM
filter notch tw DSP 6 04-25-2008 02:04 PM
Notch filter OZ DSP 7 05-21-2005 06:08 PM


All times are GMT +1. The time now is 03:27 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved