From: gpezzella on
Dear Jerry

after been very busy with other stuff I finally have had time to write an
application in VB6 that implement the 50 Hz filter create by your GREAT
LINK.

If possible I would send you my program for see if filter work good and
more important:

1) How interpretate the output signal?

With my program I do this step:

1) create wave sin 40Hz 2volt signal
2) add to previous one wave sin 200Hz 2volt signal
3) apply the filter

but I obtain signal that is good wave sin of 40 Hz but with amplitude that
go to [80volt] to [-1.8volt]

How is possible???

My email is gpezzella(a)yahoo.com
Please send me your email so I can send you my program.

Giuseppe





>On 7/15/2010 11:48 AM, gpezzella wrote:
>> Dear Jerry,
>>
>> GREAT LINK!! Thanks
>>
>> If for example I choose:
>> -----------------------------------
>> filtertype = Chebyshev
>> passtype = Lowpass
>> ripple = -1
>> order = 5
>> samplerate = 2480
>> corner1 = 50
>> corner2 =
>> adzero =
>> logmin =
>>
>> Recurrence relation:
>> y[n] = ( 1 * x[n- 5])
>> + ( 5 * x[n- 4])
>> + ( 10 * x[n- 3])
>> + ( 10 * x[n- 2])
>> + ( 5 * x[n- 1])
>> + ( 1 * x[n- 0])
>>
>> + ( 0.8881071970 * y[n- 5])
>> + ( -4.5278119979 * y[n- 4])
>> + ( 9.2530651832 * y[n- 3])
>> + ( -9.4749879058 * y[n- 2])
>> + ( 4.8616237413 * y[n- 1])
>> ----------------------------------
>
>Why do you need so sharp a cutoff?
>
>There will be attenuation at the corner frequency, so you should set it
>higher than what you want to pass unattenuated.
>
>> 1) Always I must save Y[n] into a variable?
>
>Your recursion relation needs 5 past x[n] and 5 past y[n]. You need to
>save them all, then update them for the next iteration.
>
>> 2) If yes, for check if there are been frequency under 50Hz I must only
>> compare Y[n] with a threshold, correct?
>
>That should work.
>
>Jerry
>--
>Engineering is the art of making what you want from things you can get.
>
From: Jerry Avins on
On 7/28/2010 4:49 PM, gpezzella wrote:
> Dear Jerry
>
> after been very busy with other stuff I finally have had time to write an
> application in VB6 that implement the 50 Hz filter create by your GREAT
> LINK.
>
> If possible I would send you my program for see if filter work good and
> more important:
>
> 1) How interpretate the output signal?
>
> With my program I do this step:
>
> 1) create wave sin 40Hz 2volt signal
> 2) add to previous one wave sin 200Hz 2volt signal
> 3) apply the filter
>
> but I obtain signal that is good wave sin of 40 Hz but with amplitude that
> go to [80volt] to [-1.8volt]

I don't understand your notation. What quantity is 80V? What quantity is
-1.8V? (The negative sign probably represents a reversal of phase.

> How is possible???

Every filter has a gain. The gain of a low-pass filter is (exactly for
Butterworth, within the ripple magnitude for Chebychev) the output after
a long string of ones has been applied.

> My email is gpezzella(a)yahoo.com
> Please send me your email so I can send you my program.

My email address in this post is correct. What language is your code?

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������