[Fpga-synth] Simple Filter Question

Magnus Danielson magnus at rubidium.dyndns.org
Tue Jun 19 19:15:15 CEST 2007


From: Scott Gravenhorst <music.maker at gte.net>
Subject: Re: [Fpga-synth] Simple Filter Question
Date: Tue, 19 Jun 2007 07:21:00 -0700
Message-ID: <200706191421.l5JEKxkN001058 at linux7.lan>

> Magnus Danielson <magnus at rubidium.dyndns.org> wrote:
> >From: Scott Gravenhorst <music.maker at gte.net>
> >Subject: [Fpga-synth] Simple Filter Question
> >Date: Mon, 18 Jun 2007 13:35:14 -0700
> >Message-ID: <200706182035.l5IKZEcr003383 at linux7.lan>
> >
> >Hi Scott,
> >
> >> The terrormouse PDF specifies that the filter used at the end of the delay
> >> line is a "simple first order IIR".  It then gives this to describe it:
> >> 
> >>                        -1
> >>        0.8995 + 0.1087z
> >> H(z) = ------------------
> >>                      -1
> >>           1 + 0.0136z
> >> 
> >> >From what I understand, this makes:
> >> 
> >> a0 = 0.8995      a1 = 0.1087
> >>                  b1 = -0.0136
> >> 
> >> There was no explanation for the values chosen except that they "sound like
> >> an acoustic guitar string".  
> >> 
> >> What I don't understand is that this matches neither a first order lowpass
> >> nor highpass.  Lowpass should have only a0 and b1 terms and highpass has a1
> >> = - a0 (at least).
> >> 
> >> I am assuming this is supposed to be a lowpass filter of some kind.
> >> 
> >> When I did my testing, I used the first order lowpass as described at
> >> www.dspguide.com, in the recursive filters PDF.  It's not the same filter,
> >> but it works.
> >> 
> >> A resource that explains this would be most appreciated ... ?
> >
> >Will the list-admin do?
> >
> >Hmm...
> >
> >       0.8995 z + 0.1087
> >H(z) = -----------------
> >         z + 0.0136
> >
> >z_z = -0.1087/0.8995 = -0.1208
> >z_p = -0.0136
> >
> >i.e.
> >
> >              z + 0.1208
> >H(z) = 0.8995 ----------
> >              z + 0.0136
> >
> >Now, what is this creature? Plot the pole and zero in the z-plane
> >
> >            
> >         ^ jw
> >         |
> >         |         _
> >         |        o
> >---o---x-+-------->
> >         |
> >         |
> >         |
> >
> >This is a clear case of a low-pass filter.
> >
> >For low frequency (i.e. z = 1) the pole is nearer than the zero, so the pole
> >dominates and the gain for this case is 0.9947 (insert z = 1 in H(z)).
> >As you move along the unit circle you come closer to the zero and at the
> >Nyquist frequency (i.e. z = -1) the zero dominates and the gain is 0.8017
> >(insert z = -1 in H(z)). This is similar to a shelving filter.
> >Midways we have a gain of 0.9125 (insert z = j in H(z) and take absolute
> >value of complex value) at half the Nyquist frequency.
> >
> >You can view this as a shelving filter. which lowers the high frequency with
> >about -1.9 dB.
> >
> >Did that make any sense?
> 
> Yes, thanks, and most of it did.

Good.

> What I needed to do is exactly what you did, derive poles and zeroes and look
> at the Z plane as you did. Once I saw that I did agree that it has to be a
> lowpass.

Right.

> I need to learn how you turned the H(z) form into the z-plane, but it doesn't
> look too bad, at least for such a simple filter.  

Once I have attained this form:

              z + 0.1208
H(z) = 0.8995 ----------
              z + 0.0136

it is simple, this is

         Z(z)
H(z) = a ----
         P(z)

where Z(z) is the polynomial containing the zeros and P(z) is the polynomial
containing the poles. The roots of those polynomial gives the position of the
zeros and poles respectively.

Z(z) = 0 => z + 0.1208 = 0 => z = - 0.1208
P(z) = 0 => z + 0.0136 = 0 => z = - 0.0136

> What is this process called so I can read about it?

Finding roots in polynomials. Simple ones (degree one and two) can be done by
hand.

Cheers,
Magnus


More information about the Fpga-synth mailing list