Forum Discussion
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- ...All I want to do is implement a simple low-pass filter to attenuate all harmonics (except the 1st - the fundamental) from an guitar audio signal when a string is plucked - i.e. I'm making a digital guitar tuner. I've designed all the other components of the circuit and am now just trying to get the filter working. A low order IIR low-pass should be fine and shouldn't be too hard to implement... I'm just trying to figure out what to do with the fractions! Nick --- Quote End --- Why do you want to implement an IIR filter and not a FIR? If it is to get a minimal latency, then its fine, but simple to do, - NO!. IIR filters are deceptively difficult to implement, especially in fixed point arithmetic, as you can get internal oscillations and gross offset errors if you dont apply the proper scaling. In practice you probably find that you need surprisingly much extra internal precision. I bet this is the reason Altera abandonned their IIR filter design tool kit many years ago. So although you need fewer multiplications, additions and storage for an IIR compared to FIR, it is offset by the mentioned implementation difficulty and large internal word width. And be carefull not to slip additional delays into your feedback loop! This can easily happen when using pipelined building blocks, with the result that your filter will work differently than designed, but in a subtle manner. The FIR filter design tool in Quartus is excellent and your done in minutes, but if you require a filter with low latency, then IIR filter is the right and maybe more fun due to the difficulty:) - depends on your point of view. Fixed point or integer - its simply a matter of how you map the binary code to a physical value. The hardware is the same. Good luck