Hi, I'm thinking of this in the context of decimation (but same thing for interpolation). As an example, say we want to decimate by 8. In the frequency domain, our goal is to design a filter that attenuates the frequencies that will alias when we through away 7 samples. You go off and design an FIR filter that gives you say 60dB worst case in the stopbands. So far so good. When comes time to implementing the filter, it's better to use a polyphase decomposition so we don't calculate new data points that we're about to through away. Still so far so good. Now, what is the relationship between the frequency response of each of the polyphase branch and the original FIR filter designed? Can the problem be approached by designing the 8 branches directly instead of the 'overall' FIR? If so, how do you specify the branches response (I understand the specifications for the FIR, but I don't for the branches). Also, a symmetric FIR might not give you symmetric branches. Now if we can design the branches as being symmetric, the 'overall' FIR might not be symmetric. Just an observation here, any thoughts welcome! Thanks --------------------------------------- Posted through http://www.DSPRelated.com

# Relationship between FIR frequency response and each polyphase response

Started by ●November 12, 2015

Reply by ●November 12, 20152015-11-12

On Thu, 12 Nov 2015 13:46:06 -0600, "gretzteam" <34989@DSPRelated> wrote:>Hi, >I'm thinking of this in the context of decimation (but same thing for >interpolation). As an example, say we want to decimate by 8. In the >frequency domain, our goal is to design a filter that attenuates the >frequencies that will alias when we through away 7 samples. You go off and >design an FIR filter that gives you say 60dB worst case in the stopbands. >So far so good. > >When comes time to implementing the filter, it's better to use a polyphase >decomposition so we don't calculate new data points that we're about to >through away. Still so far so good.For integer decimation ratios there's no need to use a polyphase. If you do, it'll probably just use the same phase (or "branch", as I think you're calling it) over and over.>Now, what is the relationship between the frequency response of each of >the polyphase branch and the original FIR filter designed?Assuming you mean the various potential "phase" coefficient sets that can be extracted from the overall coefficient set during the interpolation of an output sample, the frequency response of the overall set is generally preserved.>Can the problem be approached by designing the 8 branches directly instead >of the 'overall' FIR? If so, how do you specify the branches response (I >understand the specifications for the FIR, but I don't for the branches).You can get strange artifacts this way, especially if maintaining phase coherence between samples is important.>Also, a symmetric FIR might not give you symmetric branches. Now if we can >design the branches as being symmetric, the 'overall' FIR might not be >symmetric. Just an observation here, any thoughts welcome!The overall coefficient set drives the characteristics of the filter. The asymmetric characteristics of potential subsets used in interpolation is only a consequence of ignoring the skipped computations. If you perform the full filtering of each potential interpolated output sample by upsampling and then decimating, the coefficient sets are never asymmetric. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com

Reply by ●November 12, 20152015-11-12

In article <5644ff46.2077384318@news.eternal-september.org>, Eric Jacobsen <eric.jacobsen@ieee.org> wrote:>On Thu, 12 Nov 2015 13:46:06 -0600, "gretzteam" <34989@DSPRelated> >wrote: > > >>Also, a symmetric FIR might not give you symmetric branches. Now if we can >>design the branches as being symmetric, the 'overall' FIR might not be >>symmetric. Just an observation here, any thoughts welcome! > >The overall coefficient set drives the characteristics of the filter. >The asymmetric characteristics of potential subsets used in >interpolation is only a consequence of ignoring the skipped >computations. If you perform the full filtering of each potential >interpolated output sample by upsampling and then decimating, the >coefficient sets are never asymmetric.Eric - Whah? I'm a lurker wanna-be for DSP stuff. But that's not right is it? When designing the typical polyphase filter (upsample by L, low-pass filter, downsample by M), then do the polyphase thing (i.e. don't bother multiplying zeros, don't bother calculating samples you're gonna throw out) - you end up with basically a bank of filter coefficients that you select on a sample-by-sample basis. The bank is a subset of the entire coefficient set. The sub-bank coefficient set isn't symmetric. (Flipping through Rick's book ...) Yep, I rememember right. From Lyons: "Because the subfilter coefficient sets ... are not neccesarily symmetrical, we can't reduce the number of mults by means of a folded FIR structure". [1] I think that's what the OP was referring too. Unless you know some trick to make those sub-filter's sets come out as symmetric too? That'd be a neat trick. And Rick's quote isn't absolute: "not neccesarily". I'd sure think this trick would be useful if someone could come up with it. Rereading your response, I think I'm just mis-reading you. But I'll throw this out there anyway. Regards, Mark [1] Understanding Digital Signal Processing, Third Edition by Richard Lyons, pg 526.

Reply by ●November 12, 20152015-11-12

>In article <5644ff46.2077384318@news.eternal-september.org>, >Eric Jacobsen <eric.jacobsen@ieee.org> wrote: >>On Thu, 12 Nov 2015 13:46:06 -0600, "gretzteam" <34989@DSPRelated> >>wrote: >> >> >>>Also, a symmetric FIR might not give you symmetric branches. Now if we >can >>>design the branches as being symmetric, the 'overall' FIR might not be >>>symmetric. Just an observation here, any thoughts welcome! >> >>The overall coefficient set drives the characteristics of the filter. >>The asymmetric characteristics of potential subsets used in >>interpolation is only a consequence of ignoring the skipped >>computations. If you perform the full filtering of each potential >>interpolated output sample by upsampling and then decimating, the >>coefficient sets are never asymmetric. > >Eric - Whah? I'm a lurker wanna-be for DSP stuff. But that's not >right is it? When designing the typical polyphase filter >(upsample by L, low-pass filter, downsample by M), then do the polyphase>thing (i.e. don't bother multiplying zeros, don't bother calculating >samples you're gonna throw out) - you end up with basically a bank of >filter coefficients that you select on a sample-by-sample basis. The bank>is a subset of the entire coefficient set. > >The sub-bank coefficient set isn't symmetric. (Flipping through Rick's >book ...) >Yep, I rememember right. From Lyons: >"Because the subfilter coefficient sets ... are not neccesarilysymmetrical,> >we can't reduce the number of mults by means of a folded FIR structure". >[1] > >I think that's what the OP was referring too. Unless you know sometrick>to make those sub-filter's sets come out as symmetric too? That'd be a >neat >trick. And Rick's quote isn't absolute: "not neccesarily". I'd sure >think this trick would be useful if someone could come up with it. > >Rereading your response, I think I'm just mis-reading you. >But I'll throw this out there anyway. > >Regards, > >Mark > >[1] Understanding Digital Signal Processing, Third Edition by RichardLyons,> >pg 526.Hi, This is correct. You design some FIR filter that will attenuate the new images created by inserting zeros. For implementation, you then calculate the polyphase decomposition matrix, giving you a shorter FIR to calculate for each desired output point. Those are just a downsampled version of the original FIR. They are not symmetric (at least most of the time). I call them branches. My question was that you can then look at the magnitude response and phase delay response of each of those 'branches'. The phase delay of each branch is close to the delay you want, wiggling around the ideal value. The first branch close to 1/8, then 2/8 (scaling aside). That all makes sense. Now, how do the specifications of the original filter (passband/stopband) are related to the characteristics of each of those polyphase filter (each branches)? I know that if I design a superb FIR filter, with 120dB attenuation across the stopbands, as brickwall as you can get, then the 'branches' response will be very close to the ideal...how are those two set of specifications linked? Thanks --------------------------------------- Posted through http://www.DSPRelated.com

Reply by ●November 12, 20152015-11-12

On Thu, 12 Nov 2015 21:40:58 -0000 (UTC), gtwrek@sonic.net (Mark Curry) wrote:>In article <5644ff46.2077384318@news.eternal-september.org>, >Eric Jacobsen <eric.jacobsen@ieee.org> wrote: >>On Thu, 12 Nov 2015 13:46:06 -0600, "gretzteam" <34989@DSPRelated> >>wrote: >> >> >>>Also, a symmetric FIR might not give you symmetric branches. Now if we can >>>design the branches as being symmetric, the 'overall' FIR might not be >>>symmetric. Just an observation here, any thoughts welcome! >> >>The overall coefficient set drives the characteristics of the filter. >>The asymmetric characteristics of potential subsets used in >>interpolation is only a consequence of ignoring the skipped >>computations. If you perform the full filtering of each potential >>interpolated output sample by upsampling and then decimating, the >>coefficient sets are never asymmetric. > >Eric - Whah? I'm a lurker wanna-be for DSP stuff. But that's not >right is it? When designing the typical polyphase filter >(upsample by L, low-pass filter, downsample by M), then do the polyphase >thing (i.e. don't bother multiplying zeros, don't bother calculating >samples you're gonna throw out) - you end up with basically a bank of >filter coefficients that you select on a sample-by-sample basis. The bank >is a subset of the entire coefficient set.Exactly. But if you DON'T throw out the zeros or stuff that doesn't contribute, which is the actual effective input data stream, the coefficient sets aren't asymmetric. So from this perspective you don't have to worry about whether linear phase is preserved due to losing symmetry, because the symmetry is ultimately there in effective data stream. It's just a way to show that all those funky, different, asymmetric coefficient sets that ultimately get applied in a polyphase filter aren't problematic as far as worrying about the ultimate filter response. The thing that matters is the overall coefficient set.>The sub-bank coefficient set isn't symmetric. (Flipping through Rick's >book ...) >Yep, I rememember right. From Lyons: >"Because the subfilter coefficient sets ... are not neccesarily symmetrical, >we can't reduce the number of mults by means of a folded FIR structure". [1] > >I think that's what the OP was referring too. Unless you know some trick >to make those sub-filter's sets come out as symmetric too? That'd be a neat >trick. And Rick's quote isn't absolute: "not neccesarily". I'd sure >think this trick would be useful if someone could come up with it. > >Rereading your response, I think I'm just mis-reading you. >But I'll throw this out there anyway.It's a good question because people get hung up on this all the time regarding polyphase filters.>Regards, > >Mark > >[1] Understanding Digital Signal Processing, Third Edition by Richard Lyons, >pg 526. >Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com

Reply by ●November 12, 20152015-11-12

Mark Curry <gtwrek@sonic.net> wrote:> Yep, I rememember right. From Lyons: "Because the subfilter > coefficient sets ... are not neccesarily symmetrical, we can't > reduce the number of mults by means of a folded FIR structure".I would assume Lyons' statement about multiplier re-use not being possible is true for the general case, but for some (large?) category of polyphase decimation filters the multiplier re-use is there. Looking at a some simple examples should make this apparent. Steve

Reply by ●November 12, 20152015-11-12

You're mixing up decimation and interpolation. Decimation does not have the concept of polyphase branches. If you have an N-tap filter and are decimating by K, you execute the filter every K input samples and use the last N samples multiplied by their respective coefficients. In the interpolation case you DO have polyphases. Each polyphase set of coefficients can be sub-sampled from the original master filter set, or alternatively you can design them as low pass filters with a fractional delay target. Bob

Reply by ●November 12, 20152015-11-12

In article <n235dt$5aj$1@blue-new.rahul.net>, Steve Pope <spope33@speedymail.org> wrote:>Mark Curry <gtwrek@sonic.net> wrote: > >> Yep, I rememember right. From Lyons: "Because the subfilter >> coefficient sets ... are not neccesarily symmetrical, we can't >> reduce the number of mults by means of a folded FIR structure". > >I would assume Lyons' statement about multiplier re-use not being >possible is true for the general case, but for some (large?) >category of polyphase decimation filters the multiplier re-use >is there. Looking at a some simple examples should make this >apparent.That was my interest in this thread. I designed such a filter (straight from Rick's book) in the past. We had an optimized folded filter already designed which we COULDN'T use, as the polyphase filter sets were not symmetric. I remember thinking at the time "what could we do to make them symmetric?" I gave up as it wasn't obvious to me at all. I remember concluding it wasn't possible (and multipliers were cheap for me in my implementation). But this thread, and Rick's non-absolute general case statement is making me wonder. I may jot down some cases again and think about it. By I'm not as confident as you that for "some (large?) category of polyphase decimation filters" that the multiplier reuse is there. Regards, Mark

Reply by ●November 12, 20152015-11-12

>In article <n235dt$5aj$1@blue-new.rahul.net>, >Steve Pope <spope33@speedymail.org> wrote: >>Mark Curry <gtwrek@sonic.net> wrote: >> >>> Yep, I rememember right. From Lyons: "Because the subfilter >>> coefficient sets ... are not neccesarily symmetrical, we can't >>> reduce the number of mults by means of a folded FIR structure". >> >>I would assume Lyons' statement about multiplier re-use not being >>possible is true for the general case, but for some (large?) >>category of polyphase decimation filters the multiplier re-use >>is there. Looking at a some simple examples should make this >>apparent. > >That was my interest in this thread. I designed such a filter >(straight from Rick's book) in the past. We had an optimized >folded filter already designed which we COULDN'T use, as the >polyphase filter sets were not symmetric. I remember thinking >at the time "what could we do to make them symmetric?" I gave >up as it wasn't obvious to me at all. I remember concluding >it wasn't possible (and multipliers were cheap >for me in my implementation). But this thread, and Rick's >non-absolute general case statement is making me wonder. > >I may jot down some cases again and think about it. By I'm >not as confident as you that for "some (large?) category of >polyphase decimation filters" that the multiplier reuse is there. > >Regards, > >MarkI don't think designing an FIR filter where the polyphase components would be symmetric is particularly hard. Assuming a linear programming approach, apart from the frequency domain constraints from passband/stopband, all you have to do is add a set of linear constraints that will enforce symmetry on the polyphase components. You know which coefficients of the FIR will appear in which polyphase, so it's a for loop exercise... How that restricts the achievable performance of a filter without that restriction is an interesting question... --------------------------------------- Posted through http://www.DSPRelated.com

Reply by ●November 12, 20152015-11-12

>You're mixing up decimation and interpolation. Decimation does not have >the concept of polyphase branches. If you have an N-tap filter and are >decimating by K, you execute the filter every K input samples and use thelast N>samples multiplied by their respective coefficients. > >In the interpolation case you DO have polyphases. Each polyphase set of >coefficients can be sub-sampled from the original master filter set, or >alternatively you can design them as low pass filters with a fractionaldelay>target. > >BobI think it works out to be the same thing, although less obvious in decimation. When you interpolate, you open up the bandwidth by adding zeros. You then design a filter to attenuate the new images. The polyphase decomposition of that filter is nice as each 'branch' calculate one output point. When you decimate, the bandwidth is already opened up. You design a filter to attenuate the frequencies that are about to alias on you. Now that filter should run at the high rate, and you would throw away sample after filtering. Since that is not efficient, we want a way to not calculate the points we won't use. The exact same polyphase decomposition can be done, the only difference is you ADD the output of all the phases to calculate the desired output point. Although each output sample consist of the last N sample times the impulse response (length N), you can look at it the other way and see those same polyphase filters as in the interpolation, being applied to phases of the input signal. So I think it's quite similar, but more obvious in interpolation. I'm still struggling in linking the frequency domain specifications of the overall filter with the magnitude/phase response of each polyphase. They are clearly linked, as a better filter in the classical sense (good stopband across all images), produces phases that approximate the desired 'delay' much closer. I wondered if there was a mathematical relationship between the two. --------------------------------------- Posted through http://www.DSPRelated.com