Reply by Eric Jacobsen March 13, 20082008-03-13
On Wed, 12 Mar 2008 14:03:30 -0500, Vladimir Vassilevsky
<antispam_bogus@hotmail.com> wrote:

> > >Ron N. wrote: > >>>>"Vladimir Vassilevsky" <antispam_bo...@hotmail.com> wrote in message >>>>news:_PzBj.15715$Ej5.2369@newssvr29.news.prodigy.net... >>> >>>>>Recently I run into the problem with a basic task: design of a polyphase >>>>>set of filters for the interpolation of a signal. The input is the sampled >>>>>signal; the output should be the interpolated values spaced at 1/10 of the >>>>>sample. >>> >>>>>So, I designed the LPF at 10 x sample rate by the Parks-McClellan >>>>>algorithm, and then decimated it into 10 subsets of the coefficients. >>> >>>>>But, although the original filter is well within the specs, the decimated >>>>>subsets (calculated to the original sample rate) are not! There is a >>>>>significant difference is in the passband flatness as well as in the >>>>>stopband. >>> >> I think the key difference might be that Vladimir was >> concerned about passband ripple after proper decimation or >> subsampling. > > >My goal was a variable delay line with a resolution of 1/10 of a sample. >So I am using just one of the subsets of the coefficients of the x10 >interpolation filter at a time. It was quite unexpected to find out that >the frequency response of a subset filter in the passband could be very >different from that of the complete interpolation filter. > >I don't know what should be the exact design procedure, however it looks >like for the worst case the interpolator filter by N should have lower >stopband by the factor of N also. I guess you have to do several >iterations adjusting the stopband. > > > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com
FWIW, my application was a delay-tracking filter to lock the symbol clock on a comm signal. If the receive reference and the transmit reference were not far off or locked, the polyphase would essentially be a variable-delay filter like you're describing, but in practice automatically tracked out the differences. I did, after the thing was in the field and working, have a sudden theoretical concern one day that perhaps it was really screwing up the phase response by doing it that way (and I had no real reason for concern, it ran about 0.3dB from theoretical in testing). I spent a bunch of time in MathCAD and with other tools worrying myself that these sorts of problems could be real, but in the end ran out of reasons for being concerned about it. That system had, IIRC, 256 phases. I was careful about the coefficient designs, but didn't go out of the way to do anything super-special. Perhaps I was lucky in accidentally having all the right steps in the design process. As I understand it that company is still selling those modems, and that was done about 13 years ago. I assume if it were broken it'd have shown up by now. ;) Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org
Reply by March 13, 20082008-03-13
On Mar 12, 3:03&#4294967295;pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> Ron N. wrote: > >>>"Vladimir Vassilevsky" <antispam_bo...@hotmail.com> wrote in message > >>>news:_PzBj.15715$Ej5.2369@newssvr29.news.prodigy.net... > > >>>>Recently I run into the problem with a basic task: design of a polyphase > >>>>set of filters for the interpolation of a signal. The input is the sampled > >>>>signal; the output should be the interpolated values spaced at 1/10 of the > >>>>sample. > > >>>>So, I designed the LPF at 10 x sample rate by the Parks-McClellan > >>>>algorithm, and then decimated it into 10 subsets of the coefficients. > > >>>>But, although the original filter is well within the specs, the decimated > >>>>subsets (calculated to the original sample rate) are not! There is a > >>>>significant difference is in the passband flatness as well as in the > >>>>stopband. > > > I think the key difference might be that Vladimir was > > concerned about passband ripple after proper decimation or > > subsampling. > > My goal was a variable delay line with a resolution of 1/10 of a sample. > So I am using just one of the subsets of the coefficients of the x10 > interpolation filter at a time. It was quite unexpected to find out that > the frequency response of a subset filter in the passband could be very > different from that of the complete interpolation filter. > > I don't know what should be the exact design procedure, however it looks > like for the worst case the interpolator filter by N should have lower > stopband by the factor of N also. I guess you have to do several > iterations adjusting the stopband. > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com- Hide quoted text - > > - Show quoted text -
Hello Vlad, Yes you are on the right track. Years back I have to time delay equalize analog reconstructed channels on a E1 line. So I needed a bank of filters each with a different integral delay of 1/32 sample. So I designed a long low pass filter whose passband was a little less that 1/32 of the frequency range. And of course the stop bands had to be deeper by 32. The resulting filters when decimated by 32 worked wonderfully well. So you just have to look at where your aliasing is falling and make sure it does no harm. Clay
Reply by robert bristow-johnson March 13, 20082008-03-13
On Mar 12, 5:23 pm, "Ron N." <rhnlo...@yahoo.com> wrote:
...
> Try finding those segments of the stopband that overlaps > the passband in the repeated spectra, and only constrain > those smaller portions lower. e.g. equiripple with notches.
i thought i said as much. if you have notches to -inf dB at integer multiples of Fs, then, at least at DC, there won't be any difference between the different phases.
> Might result in a shorter filter.
if you compare apples to apples with the same length filter, there is a slight trade off with the first and biggest stopband lobe.
> IMHO.
my O, too. r b-j
Reply by Ron N. March 12, 20082008-03-12
On Mar 12, 11:03 am, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> Ron N. wrote: > >>>"Vladimir Vassilevsky" <antispam_bo...@hotmail.com> wrote in message > >>>news:_PzBj.15715$Ej5.2369@newssvr29.news.prodigy.net... > > >>>>Recently I run into the problem with a basic task: design of a polyphase > >>>>set of filters for the interpolation of a signal. The input is the sampled > >>>>signal; the output should be the interpolated values spaced at 1/10 of the > >>>>sample. > > >>>>So, I designed the LPF at 10 x sample rate by the Parks-McClellan > >>>>algorithm, and then decimated it into 10 subsets of the coefficients. > > >>>>But, although the original filter is well within the specs, the decimated > >>>>subsets (calculated to the original sample rate) are not! There is a > >>>>significant difference is in the passband flatness as well as in the > >>>>stopband. > > > I think the key difference might be that Vladimir was > > concerned about passband ripple after proper decimation or > > subsampling. > > My goal was a variable delay line with a resolution of 1/10 of a sample.
That was my guess.
> So I am using just one of the subsets of the coefficients of the x10 > interpolation filter at a time. It was quite unexpected to find out that > the frequency response of a subset filter in the passband could be very > different from that of the complete interpolation filter.
Subsampling (by 1/10th) in the time domain repeats the filter's frequency response in the frequency domain. The resultant subset filter is the sum of those overlapped spectra. Only if there is no overlap (Nyquist) and the stopband level is zero will the new frequency response be identical.
> I don't know what should be the exact design procedure, however it looks > like for the worst case the interpolator filter by N should have lower > stopband by the factor of N also. I guess you have to do several > iterations adjusting the stopband.
Try finding those segments of the stopband that overlaps the passband in the repeated spectra, and only constrain those smaller portions lower. e.g. equiripple with notches. Might result in a shorter filter. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M http://www.nicholson.com/rhn/dsp.html
Reply by Vladimir Vassilevsky March 12, 20082008-03-12

Ron N. wrote:

>>>"Vladimir Vassilevsky" <antispam_bo...@hotmail.com> wrote in message >>>news:_PzBj.15715$Ej5.2369@newssvr29.news.prodigy.net... >> >>>>Recently I run into the problem with a basic task: design of a polyphase >>>>set of filters for the interpolation of a signal. The input is the sampled >>>>signal; the output should be the interpolated values spaced at 1/10 of the >>>>sample. >> >>>>So, I designed the LPF at 10 x sample rate by the Parks-McClellan >>>>algorithm, and then decimated it into 10 subsets of the coefficients. >> >>>>But, although the original filter is well within the specs, the decimated >>>>subsets (calculated to the original sample rate) are not! There is a >>>>significant difference is in the passband flatness as well as in the >>>>stopband. >> > I think the key difference might be that Vladimir was > concerned about passband ripple after proper decimation or > subsampling.
My goal was a variable delay line with a resolution of 1/10 of a sample. So I am using just one of the subsets of the coefficients of the x10 interpolation filter at a time. It was quite unexpected to find out that the frequency response of a subset filter in the passband could be very different from that of the complete interpolation filter. I don't know what should be the exact design procedure, however it looks like for the worst case the interpolator filter by N should have lower stopband by the factor of N also. I guess you have to do several iterations adjusting the stopband. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by Ron N. March 12, 20082008-03-12
On Mar 12, 9:56 am, Eric Jacobsen <eric.jacob...@ieee.org> wrote:
> On Tue, 11 Mar 2008 13:22:03 -0700, "Fred Marshall" > > > > <fmarshallx@remove_the_x.acm.org> wrote: > > >"Vladimir Vassilevsky" <antispam_bo...@hotmail.com> wrote in message > >news:_PzBj.15715$Ej5.2369@newssvr29.news.prodigy.net... > > >> Recently I run into the problem with a basic task: design of a polyphase > >> set of filters for the interpolation of a signal. The input is the sampled > >> signal; the output should be the interpolated values spaced at 1/10 of the > >> sample. > > >> So, I designed the LPF at 10 x sample rate by the Parks-McClellan > >> algorithm, and then decimated it into 10 subsets of the coefficients. > > >> But, although the original filter is well within the specs, the decimated > >> subsets (calculated to the original sample rate) are not! There is a > >> significant difference is in the passband flatness as well as in the > >> stopband. > > >> Where is the mistake? > > >> Vladimir Vassilevsky > >> DSP and Mixed Signal Design Consultant > >>http://www.abvolt.com > > >Vladimir, > > >I'm not sure I understand what you're doing yet. You can't just take any > >filter and make it polyphase. The essential ingredient is that only certain > >coefficients contribute to the output at each output sample instant. Once > >that's ascertained then the filter can be split into "phases" leading to a > >polyphase / parallel sort of implementation. Otherwise it can't. > > >A classical halfband filter meets this criterion because (nearly) half of > >the coefficients are zero and equispaced. Thus one shift of the half the > >input samples contribute to the output and one delay later the opposite > >input samples contribute to the output. So, one can construct two filter > >paths that add at the output. > > >It's not proper to simply skip multiplies that are in the original filter > >design. > > >But, perhaps I missed the point? > > >Fred > > Having built resampling polyphase filters with arbitrary coefficients > (i.e., read from RAM), that had all sorts of coefficient sets in > practical use, both symmetric and minimum-phase, I don't think your > assertion is accurate. As long as the filter is reasonably designed > to avoid aliasing under the configured resampling conditions and the > coefficients were adequately oversampled, it's a fairly generalized > problem. > > At least in our case everything always worked as expected, and we did > some weird stuff with it.
Were you concerned about extreme flatness in the passband? I think the key difference might be that Vladimir was concerned about passband ripple after proper decimation or subsampling. Subsampling a properly but imperfectly bandlimited signal (e.g. new Fs > Bw*2, but the bandlimit filter length was finite) causes the a portion of the filter stopband ripple to affect the resulting passband ripple. One needs to find the overlapping portions of the repeated filter spectra, and perhaps use tighter constraints on those segments of the bandlimit filter. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M http://www.nicholson.com/rhn/dsp.html
Reply by Eric Jacobsen March 12, 20082008-03-12
On Tue, 11 Mar 2008 13:22:03 -0700, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:

> >"Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message >news:_PzBj.15715$Ej5.2369@newssvr29.news.prodigy.net... >> >> Recently I run into the problem with a basic task: design of a polyphase >> set of filters for the interpolation of a signal. The input is the sampled >> signal; the output should be the interpolated values spaced at 1/10 of the >> sample. >> >> So, I designed the LPF at 10 x sample rate by the Parks-McClellan >> algorithm, and then decimated it into 10 subsets of the coefficients. >> >> But, although the original filter is well within the specs, the decimated >> subsets (calculated to the original sample rate) are not! There is a >> significant difference is in the passband flatness as well as in the >> stopband. >> >> Where is the mistake? >> >> >> Vladimir Vassilevsky >> DSP and Mixed Signal Design Consultant >> http://www.abvolt.com >> > >Vladimir, > >I'm not sure I understand what you're doing yet. You can't just take any >filter and make it polyphase. The essential ingredient is that only certain >coefficients contribute to the output at each output sample instant. Once >that's ascertained then the filter can be split into "phases" leading to a >polyphase / parallel sort of implementation. Otherwise it can't. > >A classical halfband filter meets this criterion because (nearly) half of >the coefficients are zero and equispaced. Thus one shift of the half the >input samples contribute to the output and one delay later the opposite >input samples contribute to the output. So, one can construct two filter >paths that add at the output. > >It's not proper to simply skip multiplies that are in the original filter >design. > >But, perhaps I missed the point? > >Fred
Having built resampling polyphase filters with arbitrary coefficients (i.e., read from RAM), that had all sorts of coefficient sets in practical use, both symmetric and minimum-phase, I don't think your assertion is accurate. As long as the filter is reasonably designed to avoid aliasing under the configured resampling conditions and the coefficients were adequately oversampled, it's a fairly generalized problem. At least in our case everything always worked as expected, and we did some weird stuff with it. Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org
Reply by Greg Berchin March 11, 20082008-03-11
On Tue, 11 Mar 2008 13:22:03 -0700, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:

>I'm not sure I understand what you're doing yet. You can't just take any >filter and make it polyphase. The essential ingredient is that only certain >coefficients contribute to the output at each output sample instant. Once >that's ascertained then the filter can be split into "phases" leading to a >polyphase / parallel sort of implementation. Otherwise it can't.
I'm not convinced that's strictly true. Generally you're using a polyphase filter to resample by M/N, with certain restrictions on the common factors of M and N. Under these circumstances you're 'conceptually' upsampling to LCM(M,N) (LCM = least common multiple), anti-alias filtering as appropriate, and decimating. With a polyphase filter, in this situation, I believe that you'll need the output from every phase at one point in time or another, just not *all* of them *all* of the time. And I think that any old filter will suffice for the polyphase implementation, provided that it meets the anti-aliasing criteria when implemented at the LCM sampling rate. Vladimir appears to be doing something different. It looks like he's keeping his original sampling rate, but shifting his sampling times 1/10 sample period by interpolating. In this case he's really only using one phase of his polyphase filter, and throwing the other nine away. So for this I think he just needs a filter that works better after its coefficients have been decimated.
>A classical halfband filter meets this criterion because (nearly) half of >the coefficients are zero and equispaced. Thus one shift of the half the >input samples contribute to the output and one delay later the opposite >input samples contribute to the output. So, one can construct two filter >paths that add at the output. > >It's not proper to simply skip multiplies that are in the original filter >design.
If you were to construct the two decimated filters extracted from the two "halves" of the halfband filter, their frequency responses would be dissimilar due to aliasing. Their sum would be okay, but each one individually would not look exactly like the desired overall response. This is similar to what Vladimir is apparently observing. Greg
Reply by Ron N. March 11, 20082008-03-11
On Mar 11, 1:10 pm, dbell <bellda2...@cox.net> wrote:
> On Mar 11, 4:36 pm, "Ron N." <rhnlo...@yahoo.com> wrote: > > > > > On Mar 11, 12:16 pm, dbell <bellda2...@cox.net> wrote: > > > > On Mar 11, 3:58 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> > > > wrote: > > > > Vladimir Vassilevsky wrote: > > > > > > Recently I run into the problem with a basic task: design of a polyphase > > > > > set of filters for the interpolation of a signal. The input is the > > > > > sampled signal; the output should be the interpolated values spaced at > > > > > 1/10 of the sample. > > > > > > So, I designed the LPF at 10 x sample rate by the Parks-McClellan > > > > > algorithm, and then decimated it into 10 subsets of the coefficients. > > > > > > But, although the original filter is well within the specs, the > > > > > decimated subsets (calculated to the original sample rate) are not! > > > > > There is a significant difference is in the passband flatness as well as > > > > > in the stopband. > > > > > > Where is the mistake? > > > > > What happens: when the original interpolator LPF response is decimated > > > > by the factor of N, its stopband gets aliased by the factor of N also. > > > > This alters the frequency response of the subset filters. So, if it is > > > > desired to keep the passband flatness, then the stopband attenuation of > > > > the original filter has to be increased. In the worst case, the increase > > > > should be by the factor of N, however you can probably get by the > > > > smaller factors. > > > > > Thanks to everybody! The question is clear now. > > > > > Vladimir Vassilevsky > > > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com-Hidequotedtext - > > > > > - Show quoted text - > > > > If the net effect is a flat passband on the whole filter, what is the > > > concern about the individual partial filters? > > > 1) > > They give you a properly filtered or interpolated partial > > sample tapped delay line, or 1/10th sample delay element. > > > 2) > > If the result from the full filter is properly bandlimited > > to below 1/20th the new sample rate, then subsampling that > > new bandlimited signal at or above 1/10th the new sample > > rate should produce results that allow reconstruction of > > the original signal. > > > IMHO. YMMV. > > -- > > rhn A.T nicholson d.0.t C-o-M- Hide quoted text - > > > - Show quoted text - > > And would that not be true anyway if the original filter was > appropriately designed, without caring exactly how the partial filters > looked?
The question appears to be how to appropriately design the original filter if you actually do care about the output of the partial filters (as would be the case if you were using them as a selectable delay elements, or some-such.) e.g. If have a given Passband specification for the partial filters, is it affected by the Stopband spec in the undecimated full filter? Looks like it might be. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by dbell March 11, 20082008-03-11
On Mar 11, 4:36&#4294967295;pm, "Ron N." <rhnlo...@yahoo.com> wrote:
> On Mar 11, 12:16 pm, dbell <bellda2...@cox.net> wrote: > > > > > > > On Mar 11, 3:58 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com> > > wrote: > > > Vladimir Vassilevsky wrote: > > > > > Recently I run into the problem with a basic task: design of a polyphase > > > > set of filters for the interpolation of a signal. The input is the > > > > sampled signal; the output should be the interpolated values spaced at > > > > 1/10 of the sample. > > > > > So, I designed the LPF at 10 x sample rate by the Parks-McClellan > > > > algorithm, and then decimated it into 10 subsets of the coefficients. > > > > > But, although the original filter is well within the specs, the > > > > decimated subsets (calculated to the original sample rate) are not! > > > > There is a significant difference is in the passband flatness as well as > > > > in the stopband. > > > > > Where is the mistake? > > > > What happens: when the original interpolator LPF response is decimated > > > by the factor of N, its stopband gets aliased by the factor of N also. > > > This alters the frequency response of the subset filters. So, if it is > > > desired to keep the passband flatness, then the stopband attenuation of > > > the original filter has to be increased. In the worst case, the increase > > > should be by the factor of N, however you can probably get by the > > > smaller factors. > > > > Thanks to everybody! The question is clear now. > > > > Vladimir Vassilevsky > > > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com-Hidequoted text - > > > > - Show quoted text - > > > If the net effect is a flat passband on the whole filter, what is the > > concern about the individual partial filters? > > 1) > They give you a properly filtered or interpolated partial > sample tapped delay line, or 1/10th sample delay element. > > 2) > If the result from the full filter is properly bandlimited > to below 1/20th the new sample rate, then subsampling that > new bandlimited signal at or above 1/10th the new sample > rate should produce results that allow reconstruction of > the original signal. > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M- Hide quoted text - > > - Show quoted text -
And would that not be true anyway if the original filter was appropriately designed, without caring exactly how the partial filters looked? Dirk