Digital filtering
Paolo Predonzani
predo at dist.dist.unige.it
Tue Dec 10 15:59:01 CET 1996
> First of all I want my filter to just not self-oscillate in order to stay
> away from instability problems.
Ok, that's a good point to start with. What you loose is effects like
`tuned noise' or things like this.
> Clipping is a problem indeed. You'll just have to make sure the input, at
> least that's what I think you're talking about, must be prohibited from
> clipping.
>
Attenuating the input signal so that in no case the output is clipped is
usually over-consevative. However, if the input waveforms are known
a priori then the attenuation amount can be sized properly.
> Another thing I've thought about. Is to make some extra free bits free for
> calculations (LSB's that is) in order to get more accurate approximations.
>
Yes, one bit at least is mandatory. Digital filters have the problem of
`limit cycles': for very small input signals (and for no input at all) the
approximations can produce DC offsets and high freq. oscillations on the
least significant bit. This is so because, for small signals, the poles tend
to move to z=1 and z=-1.
> > Sometimes suboptimal filter configurations are preferred to obtain a
> > regular distribution of possible poles.
>
> Perhaps this might be something to think of when poles get in those places
> where the effect is minimal.
>
Just to make an example consider a second order filter with poles in
r*cos(theta)+j*r*sin(theta)
r*cos(theta)-j*r*sin(theta)
Now, its Z-transform is:
(z^2 + 2*r*cos(theta)*z + r^2) * Y(z) = X(z)
The coefficients you quantize are:
2*r*cos(theta)
r^2
It's very difficult to show, in ASCII, what the possible poles are but
you can calculate that the zone with the largest number of possible poles is
near 0 + 1*j (and 0 - 1*j). This is not very useful.
There is a filter configuration that solves the problem but is more expensive
in terms of computational power. I don't remember how it works but if you
need a reference (Oppenheim, Shafer, at least) or an explanation I will
help you.
>
> thought about this. Also, how could you implement Q?
>
Sorry, I don't see the problem. Choose the filter configuration
and tabulate/calculate the coefficients you need. If you use a lookup table
it should be 2-dimensional (cutoff-freq, Q).
--
+-------------------+----------------------------------+
| Paolo Predonzani | email: predo at dist.dist.unige.it |
+-------------------+----------------------------------+
More information about the Synth-diy
mailing list