Analog Filters -> Digital

Martin Czech martin.czech at intermetall.de
Thu Feb 4 08:31:06 CET 1999


> i've read a little about the bilinear-transform, which seems to do
> continuous to discrete transformation, but i don't know if that's what we
> are looking for ... does anyone have any ideas or algorithms for
> converting analog filters into their digital counterparts?

I think that using transforms for s->z plane warping is mostly an academic
first order approach, if you take a look into the bible (Rabiner & Gold) you'll
see that there are other methods directly in z, like minimum square error etc.
to design fir and iir filters to fit to a specific shape.

 
> also, before anyone yells "just use fft's", we're aiming for real-time.
> i'm fairly convinced that fft's have too much associated delay to work in
> this application.  we want real fast, smooth spectral analysis of the
> input signal for the optimal vocoding effect.

Why?

(Oh dear, I have to remember now all this signal theory stuff, hope I
get it right).  

You are right. Using a simple long fft gives artefacts, a certain
roughness.  You can hear this with the software vocoders on the net.

But using fft is of course computationally efficent. It can be shown that
applying a specific window function prior to fft gives you (allmost?) any
fir filter response that you want.  Indeed, fft is basically the same
as fir filtering. And if you think about response time, how much time
will an analog bandpass with f=20 Hz take to settle? Initial guess 1/f,
i.e. 50ms, but it will be more due to ringing. Higher filters will of
course settle considerably faster. Now, you need a long fft to get good
resolution in the low end.  For Fs=44.100 kHz and 1024 points this will
be about 43 Hz resolution, but of course you will loose something because
of windowing. If your lowest filter band is about 40 Hz this means only
one filter per octave in the low end.  Ok, the idea is now to do a long
fft for good resolution in the low end, and some shorter ffts more often
to have good response time at higher frequencys.

Maybe 2048 512 and 64 points or so. With 64 points you'll have a
spectral estimation sample rate of about 1.5ms. Fast enough? Now you
have to figure out what frequency points from what fft you take for
spectral estimation. You'll also need some smoothing filter for spectral
information.

Computational effort :

2048 dots ~ 26000 multiplications
512  dots ~ 4600    "
64   dots ~ 380     "
---------------------------------
            30980   "


ie. about 20% overhead compared to the simple one-fft approach.
Of course, descrambling and adding will take some additional time.
But still the number of operations grows only with n*log(n), so I guess
you could even add some more fft without too bad overhead.


This applies to analysis only, of course.  I don't know if one can play
the same trick on the synthesis side.  The splitting idea means basically
different channels.  The idea would be to use only  those points for the
fft that are used for the specific split channel, all others set to zero.
If you read about the close relationship between fft and filtering,
it should become clear what to do.

Using fir filters has an additional big advantage: analog vocodrs
suffer from very uneven group delay for different channels. Ie. there
are differnt time delays for the frequency bands, this lead to a
kind of reverbation effect, the "roughness".  Or in other therms: the
overall impulse response of the filter banks is poor.  Rabiner & Gold
show in their book how this can be avoided using properly scaled fir
filters. They get also some delay, but it is "even" for all frequencies,
ie. the impulse response looks good.



m.c.






More information about the Synth-diy mailing list