> On Jun 27, 12:01 pm, Jerry Avins <j...@ieee.org> wrote:
>> robert bristow-johnson wrote:
>>> On Jun 26, 11:22 pm, Jerry Avins <j...@ieee.org> wrote:
>> ...
>>
>>>> Tim, you need to figure out how to stop your newsreader from breaking
>>>> URLs.http://www.dsprelated.com/showmessage/81610/1.php.
>>> i always just put it on a separate line.
>> That can break too if it's long enough. Try this:http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3...
>>
>> ...
>
> seems to work for me. some google search for [ dog Tibet ]. only
> needed to click on the line. was something missing?

You got it all, but I didn't. (I had been looking for the name of the
breed of a lap dog I had been petting earlier.*) In your reply above,
the overlong line was truncated with an ellipsis. Thunderbird ignores
truncation rules in order not to break a link.
Jerry
__________________________________
* Lasang: http://www.lasangtibetanterriers.co.uk/images/main2.jpg
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

Reply by robert bristow-johnson●June 28, 20082008-06-28

On Jun 27, 12:01 pm, Jerry Avins <j...@ieee.org> wrote:

seems to work for me. some google search for [ dog Tibet ]. only
needed to click on the line. was something missing?
r b-j

Reply by Vladimir Vassilevsky●June 27, 20082008-06-27

dbell wrote:

> On Jun 26, 1:30 pm, "itsh11" <its...@yahoo.com> wrote:
>
>>I am trying to design a second order digital IIR band stop (notch) filter
>>with the following specs:
>>
>>3dB cut off frequencies: 55Hz and 65Hz
>>I want the notch at 60Hz with atleast 90dB attenuation at the 60Hz.
>>Sampling frequency: 200hz
>>
>>I tried various filter configurations like a Butterworth or Chebyshev but
>>could not get the attenuation higher than 70 dB.I want a second order
>>filter to accomplish this i.e I do not want to go to a higher order
>>filter.
>>
>>Can someone suggest any possible solutions to this problem. Many thanks
>
>
> Assuming, perhaps incorrectly, that this is a real (not homework)
> problem, when you say you want a 60 Hz notch, is the source of your 60
> Hz stable enough that you really only need to think about the response
> at a single frequency and not in terms of a stopband? Have you checked
> to see if the '60 Hz' is really 60 Hz? Try a very large FFT, use a
> rectangular window (effectively no window) such that an integer number
> of cycles is input into the very large FFT. See if all of the energy
> effectively falls into the expected 2 bins. That would be a good
> place to start.

The good place to start would be choosing the sample rate to be the
exact multiple of 60Hz. F = N x 300Hz is especially good because it is
the multiple of 50Hz also; so you can nail both standard power
frequencies and their harmonics. Then designing a notch and testing it
becomes very trivial task.
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

>
> Dirk

Reply by dbell●June 27, 20082008-06-27

On Jun 26, 1:30�pm, "itsh11" <its...@yahoo.com> wrote:

> I am trying to design a second order digital IIR band stop (notch) filter
> with the following specs:
>
> 3dB cut off frequencies: 55Hz and 65Hz
> I want the notch at 60Hz with atleast 90dB attenuation at the 60Hz.
> Sampling frequency: 200hz
>
> I tried various filter configurations like a Butterworth or Chebyshev but
> could not get the attenuation higher than 70 dB.I want a second order
> filter to accomplish this i.e I do not want to go to a higher order
> filter.
>
> Can someone suggest any possible solutions to this problem. Many thanks

Assuming, perhaps incorrectly, that this is a real (not homework)
problem, when you say you want a 60 Hz notch, is the source of your 60
Hz stable enough that you really only need to think about the response
at a single frequency and not in terms of a stopband? Have you checked
to see if the '60 Hz' is really 60 Hz? Try a very large FFT, use a
rectangular window (effectively no window) such that an integer number
of cycles is input into the very large FFT. See if all of the energy
effectively falls into the expected 2 bins. That would be a good
place to start.
Dirk

Reply by Jerry Avins●June 27, 20082008-06-27

itsh11 wrote:
...

> And why in the world one would need a 60Hz notch filter????

Many people who try to use a 60-Hz filter to suppress power-line noise
are greatly disappointed. Analysis of the noise's spectrum shows why.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

Reply by Jerry Avins●June 27, 20082008-06-27

robert bristow-johnson wrote:

> On Jun 26, 11:22 pm, Jerry Avins <j...@ieee.org> wrote:

That can break too if it's long enough. Try this:
http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&q=dog+Tibet&btnG=Search
...
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

Reply by Mikolaj●June 27, 20082008-06-27

On 27-06-2008 at 17:01:25 itsh11 <itsh11@yahoo.com> wrote:
(...)

> In this case common sense and knowledge tells you
> that when you put a zero at a particular point on the unit circle, you
> will
> get infinite attenuation but only when you see its frequency response you
> see it aint so!! .

(...)
No, you are wrong. Look for maximum modulus theorem.

> So I appreciate your beautiful insight into all the so
> called magic spells that you are making me believe that I cast to solve
> this. And as a matter of fact, if you dont understand any of the things I
> talked about, dont assume that I dont understand them as well.

Well, you act like a technician , not like an engineer. And yes,
you don't understand the basis and you are casting spells.
Vladimir Vassilevsky is right and you are wrong.
--
Mikolaj

Reply by Tim Wescott●June 27, 20082008-06-27

itsh11 wrote:

>> Your ultimate attenuation should be infinite, barring the numerical
>> issues mentioned.
>
> I am using MATLAB to see how much attenuation I am getting at 60Hz. Here
> is what I see:
>
> for a 2nd order FIR filter with zero at 60Hz(on the unit circle): 85db
> attenuation
>
> for a 2nd order IIR filter with zero at 60Hz(on the unit circle) : 65dB
> attenuation
>
> for a 4th order IIR butterworth filter with two zeros at 60Hz(on the unit
> circle) : 130db attenuation
>
> I agree when you say if I have a zero on the unit circle at 60Hz, it
> should have infinite attenuation, barring the numerical issues. And I think
> that the finite value of attenuation MATLAB is showing, is because of this.
> But I don't understand why a 4th order filter shows a (much)higher
> attenuation at 60Hz than a 2nd order filter? Is this by chance or is there
> some reason to it, like having 2 zeros at the same location instead of 1?
> If this is the reason, why 2 zeros at the same point is better than 1 zero?
>
>
> What consequences I will face if I switch to a 4th order IIR notch from a
> 2nd order? The implementation is on a PC with sufficient computing power.
>
> Thanks.
>

-- snip --
Are you sure you're hitting the zero right on the button when you do
your measurement? Are you measuring with real data or in the transfer
function domain? With transfer functions I'd expect to see on the order
of (48 * 6) dB = 288 +/- 12 or 20dB of attenuation with double-precision
math; with real data I'd expect to have to use a _long_ sample of just
the right frequency to insure that I wasn't measuring sidebands.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html

Reply by itsh11●June 27, 20082008-06-27

>
>
>itsh11 wrote:
>
>
>> I am using MATLAB to see how much attenuation I am getting at 60Hz.

Here

>> is what I see:
>
>My dear friend,
>
>MATLAB is only a tool. Despite of the popular belief, it can't replace
>the common sense, the knowledge and the experience. No matter how many
>magic spells like "Chebyshev Butterworth Zero Unit Circle" do you cast;
>you can't just take a function and use it without understanding how it
>works and what is inside. You should have already realized by now that
>the things don't work that way.
>
>On another note, the problem starts with the definition. Why exactly do
>you need this filter? Where do the requirements to the passband/stopband

>come from?
>
>The problem as stated is rather trivial. Get a book on filter design,
>such as:
>
>Dietrich Schlichtharle. Digital Filters: Basics and Design.
>Springer ISBN 3-540-66841-1
>
>Then design and implement the filter yourself. Avoid the unnecessary
>clutter offered by MatLab and don't use any words or methods if you
>don't understand what do they mean and imply.
>
>
>Vladimir Vassilevsky
>DSP and Mixed Signal Design Consultant
>http://www.abvolt.com
>

Dear Vladimir,
I am an engineer and by that term I rely more on practical knowledge in
addition to common sense. In this case common sense and knowledge tells you
that when you put a zero at a particular point on the unit circle, you will
get infinite attenuation but only when you see its frequency response you
see it aint so!! . So I appreciate your beautiful insight into all the so
called magic spells that you are making me believe that I cast to solve
this. And as a matter of fact, if you dont understand any of the things I
talked about, dont assume that I dont understand them as well.
And why in the world one would need a 60Hz notch filter????
Many thanks again,

Reply by Vladimir Vassilevsky●June 27, 20082008-06-27

itsh11 wrote:

> I am using MATLAB to see how much attenuation I am getting at 60Hz. Here
> is what I see:

My dear friend,
MATLAB is only a tool. Despite of the popular belief, it can't replace
the common sense, the knowledge and the experience. No matter how many
magic spells like "Chebyshev Butterworth Zero Unit Circle" do you cast;
you can't just take a function and use it without understanding how it
works and what is inside. You should have already realized by now that
the things don't work that way.
On another note, the problem starts with the definition. Why exactly do
you need this filter? Where do the requirements to the passband/stopband
come from?
The problem as stated is rather trivial. Get a book on filter design,
such as:
Dietrich Schlichtharle. Digital Filters: Basics and Design.
Springer ISBN 3-540-66841-1
Then design and implement the filter yourself. Avoid the unnecessary
clutter offered by MatLab and don't use any words or methods if you
don't understand what do they mean and imply.
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

>
> for a 2nd order FIR filter with zero at 60Hz(on the unit circle): 85db
> attenuation
>
> for a 2nd order IIR filter with zero at 60Hz(on the unit circle) : 65dB
> attenuation
>
> for a 4th order IIR butterworth filter with two zeros at 60Hz(on the unit
> circle) : 130db attenuation
>
> I agree when you say if I have a zero on the unit circle at 60Hz, it
> should have infinite attenuation, barring the numerical issues. And I think
> that the finite value of attenuation MATLAB is showing, is because of this.
> But I don't understand why a 4th order filter shows a (much)higher
> attenuation at 60Hz than a 2nd order filter? Is this by chance or is there
> some reason to it, like having 2 zeros at the same location instead of 1?
> If this is the reason, why 2 zeros at the same point is better than 1 zero?
>
>
> What consequences I will face if I switch to a 4th order IIR notch from a
> 2nd order? The implementation is on a PC with sufficient computing power.
>
> Thanks.
>
>
>>On Thu, 26 Jun 2008 12:30:23 -0500, itsh11 wrote:
>>
>>
>>>I am trying to design a second order digital IIR band stop (notch)
>>>filter with the following specs:
>>>
>>>3dB cut off frequencies: 55Hz and 65Hz I want the notch at 60Hz with
>>>atleast 90dB attenuation at the 60Hz. Sampling frequency: 200hz
>>>
>>>I tried various filter configurations like a Butterworth or Chebyshev
>>>but could not get the attenuation higher than 70 dB.I want a second
>>>order filter to accomplish this i.e I do not want to go to a higher
>>>order filter.
>>>
>>>Can someone suggest any possible solutions to this problem. Many
>
> thanks
>
>>Your ultimate attenuation should be infinite, barring the numerical
>>issues mentioned.
>>
>>I don't design these from a Butterworth, Chebychev, etc., point of view;
>
>
>>I just make a plain ol' notch. For a transfer function given a notch
>>frequency and bandwidth, look here: http://www.dsprelated.com/
>>showmessage/81610/1.php.
>>
>>A good book on DSP should show you how to calculate your numerical
>>effects.
>>
>>--
>>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
>>