Page 49

EETE OCTOBER 2012

DESIGN & PRODUCTS aNalOG DESIGN How linear phase filters can still cause phase distortion By Kendall Castor-Perry PEOPLE OFTEN ASkme to talk about the waveform distortion that can be introduced by filtering. Each time I sit down to write a Filter Wizard piece on this topic, I either get overwhelmed by the amount of writing effort needed to encapsulate it at reasonable length, or I get sidetracked by an interesting nugget found lurking, metaphorically speak- ing, behind the cushions of the sofa (the couch, to y’all in North America). Fig. 1: An example FIR filter, showing So, this column covers just the latest phase response ‘jaggies’ nugget, not the essay on what happens to signals when you pass them through want to go all Babylonian on me) or “un- filters. For the moment, on the mat- wrapped” so that the derivative of the ter of filters and waveform distortion in curve is smooth, reflecting the generally general, I’ll just leave it at “well, what did smooth nature of the group delay of a you expect?” Filters inevitably change realizable filter circuit. the phase and amplitude balance of Except, even when you choose frequency components in a signal. the unwrapped presentation, some- I’m sure many of you will have had an times you still get these ‘jaggies’ in the encounter with an FIR filter, either prac- phase response plot in the ‘custom- tical or theoretical. It’s widely written izer’ graphs. At a training session, an that FIR filters with symmetrical impulse attendee asked me if these were caused responses are valuable because they by errors in the algorithms used to cre- delay all frequency components in the ate the curves. It’s never good when a input signal by the same time value, and customer finds a fault in your product preserve phase relationships whether or before you do, but fortunately in this not they change the amplitude of some case, I was able to explain, at least of those components. This is partly partly, why they were ‘really’ there. Boy, true, but there’s an ugly little catch that you do need to be quick on your feet in rarely gets discussed. So let’s discuss these sessions, though. it now. Look at Figure 1. It shows the mag- nitude, unwrapped phase and group As well as giving you coefficients delay of a pretty normal kind of lowpass for many kinds of useful digital filters FIR filter. It’s a 15 tap filter with a -6 dB that will run on the Digital Filter Block point at 0.15 times the sample rate, us- inside PSoC 3 and PSoC 5, the most ing a Hamming window. Now, we don’t recent version of the Filter component in cheat in the software just because we Cypress’ PSoC Creator design environ- ‘know’ that it’s a symmetrical FIR filter; ment is a fascinating what-if tool for the group delay really is calculated point checking out the behaviour of filters. by point. You can see that it’s constant, In particular, you can plot the phase and this might lead you to infer that response of a filter, either “wrapped” the phase shift should be proportional so that it fits into the range of pi to +pi to frequency. But the phase plot tells a radians (or -180 to +180 degrees if you different story; every time the frequency passes through one of the stopband Kendall does system architecture, zeroes, the phase response jumps up product definition and strategic by pi radians. The phase response is application analysis for Cypress made up of a number of straight line Semiconductor’s precision analog and segments; all have a constant slope, but www.tdk.eu mixed-signal devices - the phase is definitely not proportional www.epcos.com www.cypress.com/go/thefilterwizard - to frequency in the stopband segments. www.emea.tdk-lambda.com he can be reached at This is a real effect, not a consequence filterwizard@cypress.com of sloppy programming. www.electronics-eetimes.com Electronic Engineering Times Europe October 2012 39 TDK ad 60x277mm.indd 1 21.09.12 11:24


EETE OCTOBER 2012
To see the actual publication please follow the link above