[sdiy] Digital filtering question
Wooster Audio
nathan at woosteraudio.com
Tue Aug 24 15:43:31 CEST 2010
I've got an 18-bit 4-pole IIR filter running on my FPGA synth. It
sounds okay, but hopefully has some room for improvement. I have a
feeling the extra bits come in handy for resonance and distortion.
One area where you really need the extra bits in an IIR filter is an
ADSR. I tried to approximate an exponential curve using an 18-bit IIR,
and could not get a good range of envelope times. At some point x(n)
effectively equals x(n-1) and it stops moving. I think I calculated I
would need 26 bits. I switched to an NCO-based ADSR with exponential
look-up table shaper and am much happier.
Nathan
> The downside of IIR designs is the greater accuracy requirement. I haven't done much IIR filtering, so I'm not speaking from practical experience (the best basis on which to have an opinion, I reckon), but my researches on the topic all suggest that whereas you might hope to do FIR filtering at 16-bit accuracy and get a decent result (See Seb Francis' 4XD for an example) for IIR, you probably need 24-bit or 32-bit as a minimum. This is because errors can accumulate as a result of the feedback. There may be ways to manage with 16-bit coefficients if you have a larger accumulator (as is the case on the dsPIC, and probably others).
>
> One other thing to mention with IIR filters is that you have to calculate all the coefficients, no matter what. This is different from FIR filters where (for decimation, for example) you may be able to get away with only calculating the ones you need. So there are situations where FIR can be very efficient.
>
> It's a big subject, and there's a lot of judgements to be made about what constitutes "the best solution" for a given problem. I find Richie's posts incredibly useful because he is able to explain it in a way I understand, and because he has the practical experience to be able to make those judgements well. A big thank you to him for that.
>
> Tom
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
More information about the Synth-diy
mailing list