DSPRelated.com
Forums

Interpolation after RRC

Started by Unknown September 8, 2006
Martin Eisenberg <martin.eisenberg@udo.edu> writes:

> Randy Yates wrote: >> stenasc@yahoo.com writes: > >>> I have a VHDL implementation of an RRC filter which at 1 MHz >>> sampling rate is very efficient in terms of space on the FPGA. >>> However, if I use a sampling rate of 8MHz, the number of samples >>> required is 637, which will not fit on the chip. > >> Also, although I don't know exactly how you analyzed it, I suspect >> your concerns regarding "number of samples" will disappear when you >> see how to implement a polyphase upsampler. > > As I understand it, for given specifications the output rate > determines the IR length and polyphase structure won't reduce > that...?
Hi Martin, I see your point. However, if he thought that an N tap filter at 1 MHz requires an 8N tap filter at 8 MHz, he'd be mistaken. Since 637 isn't divisible by 8 though, that's probably not what he was thinking. It's not worth second-guessing - if Bob needs more help, he needs to fill us in on more of the details. -- % Randy Yates % "With time with what you've learned, %% Fuquay-Varina, NC % they'll kiss the ground you walk %%% 919-577-9882 % upon." %%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO http://home.earthlink.net/~yatescr
Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes:

> stenasc@yahoo.com wrote: >> Hi All, >> Thanks for replying. As you all have correctly deduced, the >> upsampling >> is required purely to ease the requirements for the analog filter. I >> have a VHDL implementation of an RRC filter which at 1 MHz sampling >> rate is very efficient in terms of space on the FPGA. However, if I use >> a sampling rate of 8MHz, the number of samples required is 637, which >> will not fit on the chip. I am under time pressure, so come up with a >> solution. > > The efficient way to upsample by 8 is by upsampling by the factor of 2 > three times. You can probably use the same set of coefficients for > each of three stages. It saves a lot of memory also.
Yes! If he makes the filter a half-band filter, he can save half again the number of coefficients! His 637-tap filter may only end up requiring 127 taps or so. -- % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and %%% 919-577-9882 % Verdi's always creepin' from her room." %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO http://home.earthlink.net/~yatescr
Hi all,

I've been reading around polyphase filter implementation, and it
doesn't seem so bad. I think I should be able to implement it quite
quickly. Will let you know how I get on. Many thanks for all your ideas
and suggestions.

Bob


Randy Yates wrote:
> Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes: > > > stenasc@yahoo.com wrote: > >> Hi All, > >> Thanks for replying. As you all have correctly deduced, the > >> upsampling > >> is required purely to ease the requirements for the analog filter. I > >> have a VHDL implementation of an RRC filter which at 1 MHz sampling > >> rate is very efficient in terms of space on the FPGA. However, if I use > >> a sampling rate of 8MHz, the number of samples required is 637, which > >> will not fit on the chip. I am under time pressure, so come up with a > >> solution. > > > > The efficient way to upsample by 8 is by upsampling by the factor of 2 > > three times. You can probably use the same set of coefficients for > > each of three stages. It saves a lot of memory also. > > Yes! If he makes the filter a half-band filter, he can save half again > the number of coefficients! His 637-tap filter may only end up requiring > 127 taps or so. > -- > % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. > %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and > %%% 919-577-9882 % Verdi's always creepin' from her room." > %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO > http://home.earthlink.net/~yatescr
Randy Yates wrote:
> Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes: > > > stenasc@yahoo.com wrote:
<snipped>
> > > > The efficient way to upsample by 8 is by upsampling by the factor of 2 > > three times. You can probably use the same set of coefficients for > > each of three stages. It saves a lot of memory also. > > Yes! If he makes the filter a half-band filter, he can save half again > the number of coefficients! His 637-tap filter may only end up requiring > 127 taps or so. > -- > % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. > %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and > %%% 919-577-9882 % Verdi's always creepin' from her room." > %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO > http://home.earthlink.net/~yatescr
Randy, Vladimir: Unless the signal is already bandlimited below the original Fs/2, the first of the 3 interpolate-by-2 stages would not be a half-band filter, since it would not properly remove the images from the first stage of zero padding. The first stage would have to provide the necessary bandlimiting so the 2nd and 3rd stages could be half-band. Normally the number of taps would decrease as the stages go up since there would be known empty bands that do not have to have imaging removed and these bands could be used to widen the transition bands making less taps required for a given filter performace. Dirk Bell DSP Consultant
Hi all,

If I take an example of a 16 tap fir and use a polyphase structure of 4
filters each containing 4 taps, will the symmetrical properties of the
filter be negated?

e.g

 c0, c1, c2 .....c15

becomes

c0, c4, c8, c12
c1, c5, c9, c13
c2, c6, c10, c14
c3, c7, c11, c15

It look to me that for the individual filter, there is no symmetry. Can
the coefficients be rearranged?

Thanks
Bob

dbell wrote:
> Randy Yates wrote: > > Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes: > > > > > stenasc@yahoo.com wrote: > > <snipped> > > > > > > > The efficient way to upsample by 8 is by upsampling by the factor of 2 > > > three times. You can probably use the same set of coefficients for > > > each of three stages. It saves a lot of memory also. > > > > Yes! If he makes the filter a half-band filter, he can save half again > > the number of coefficients! His 637-tap filter may only end up requiring > > 127 taps or so. > > -- > > % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. > > %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and > > %%% 919-577-9882 % Verdi's always creepin' from her room." > > %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO > > http://home.earthlink.net/~yatescr > > Randy, Vladimir: > > Unless the signal is already bandlimited below the original Fs/2, the > first of the 3 interpolate-by-2 stages would not be a half-band filter, > since it would not properly remove the images from the first stage of > zero padding. The first stage would have to provide the necessary > bandlimiting so the 2nd and 3rd stages could be half-band. Normally > the number of taps would decrease as the stages go up since there would > be known empty bands that do not have to have imaging removed and these > bands could be used to widen the transition bands making less taps > required for a given filter performace. > > Dirk Bell > DSP Consultant
"dbell" <bellda2005@cox.net> writes:

> Randy Yates wrote: >> Vladimir Vassilevsky <antispam_bogus@hotmail.com> writes: >> >> > stenasc@yahoo.com wrote: > > <snipped> > >> > >> > The efficient way to upsample by 8 is by upsampling by the factor of 2 >> > three times. You can probably use the same set of coefficients for >> > each of three stages. It saves a lot of memory also. >> >> Yes! If he makes the filter a half-band filter, he can save half again >> the number of coefficients! His 637-tap filter may only end up requiring >> 127 taps or so. >> -- >> % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. >> %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and >> %%% 919-577-9882 % Verdi's always creepin' from her room." >> %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO >> http://home.earthlink.net/~yatescr > > Randy, Vladimir: > > Unless the signal is already bandlimited below the original Fs/2,
Huh? What "signal" are you referring to? It seems like you mean the input signal, but how can the input signal, since it's digital, NOT be bandlimited below the original Fs/2?
> the first of the 3 interpolate-by-2 stages would not be a half-band > filter, since it would not properly remove the images from the first > stage of zero padding.
I don't see why not. A half-band low-pass filter, when applied to a signal that has been upsampled by two, will (at least in the ideal case) remove the upper image. -- % Randy Yates % "And all that I can do %% Fuquay-Varina, NC % is say I'm sorry, %%% 919-577-9882 % that's the way it goes..." %%%% <yates@ieee.org> % Getting To The Point', *Balance of Power*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:

> > Huh? What "signal" are you referring to? It seems like you mean the > input signal, but how can the input signal, since it's digital, NOT be > bandlimited below the original Fs/2? >
The key word here is "below". To use a half-band filter as your first filter, the difference between the bandwidth and the original Fs/2 is going to be have to be significant enough that [bandwidth, original Fs - bandwidth] is included in the transition band of the half-band filter. Whatever falls in the half-band transition band (part of original signal and corresponding image) is not going to be removed (remember gain is 1.0 at original Fs/2 for a HB filter with DC gain=2.) so it has to have been filtered out. the half-band filter filter
> > the first of the 3 interpolate-by-2 stages would not be a half-band > > filter, since it would not properly remove the images from the first > > stage of zero padding. > > I don't see why not. A half-band low-pass filter, when applied to a > signal that has been upsampled by two, will (at least in the ideal > case) remove the upper image.
It will remove the upper image only if the upper image completely falls in the stopband of the half-band filter and there is no significant signal in the transition band, i.e. it is bandlimited as described above. Dirk Bell DSP Consultant
> -- > % Randy Yates % "And all that I can do > %% Fuquay-Varina, NC % is say I'm sorry, > %%% 919-577-9882 % that's the way it goes..." > %%%% <yates@ieee.org> % Getting To The Point', *Balance of Power*, ELO > http://home.earthlink.net/~yatescr
Ignore dangling 'the half-band filter filter' I don't know where that
came from.

Dirk

"dbell" <bellda2005@cox.net> writes:

> Randy Yates wrote: > >> >> Huh? What "signal" are you referring to? It seems like you mean the >> input signal, but how can the input signal, since it's digital, NOT be >> bandlimited below the original Fs/2? >> > > The key word here is "below". To use a half-band filter as your first > filter, the difference between the bandwidth and the original Fs/2 is > going to be have to be significant enough that [bandwidth, original Fs > - bandwidth] is included in the transition band of the half-band > filter. Whatever falls in the half-band transition band (part of > original signal and corresponding image) is not going to be removed > (remember gain is 1.0 at original Fs/2 for a HB filter with DC gain=2.) > so it has to have been filtered out.
I see your point now, Dirk. I agree.
> the half-band filter filter >> > the first of the 3 interpolate-by-2 stages would not be a half-band >> > filter, since it would not properly remove the images from the first >> > stage of zero padding. >> >> I don't see why not. A half-band low-pass filter, when applied to a >> signal that has been upsampled by two, will (at least in the ideal >> case) remove the upper image. > > It will remove the upper image only if the upper image completely falls > in the stopband of the half-band filter and there is no significant > signal in the transition band, i.e. it is bandlimited as described > above.
That's true if you require ALL image frequency components from Fs/2 to Fs (where Fs is the original input sample rate) to be attenuated by the stopband attenuation. However, is this really necessary? For example, what if only 1/100th of the image frequency bandwidth bled through (at Fs/2)? Or how about 1/1000th? At some point, it's probably going to be practically a non-issue, but I'm not sure where that point is. In most practical designs, there is some "overkill" in the sample rate, so that there is not much energy up near Fs/2 anyway. FYI, I played around with remez and found a 999-tap half-band filter that had a stopband attenuation of >70 dB with a stopband begin frequency of only 0.504 (where 1 corresponds to the original sample rate of Fs). Now 999 taps sounds like a lot, but about half of them are zero and it's symmetric, so that means you'd only have to store about 250 coefficients for this magnificent filter. Perhaps Bob can store 250 coefficients in his FPGA but not 637. I agree that any energy in the transition band of the half-band filter should be considered since it will never be filtered out (as you stated, the response at Fs/2 is only down 6 dB), and perhaps that was your main point. However, I'm not sure this is a "half-band show stopper" for Bob's application or for any real-world practical application. -- % Randy Yates % "I met someone who looks alot like you, %% Fuquay-Varina, NC % she does the things you do, %%% 919-577-9882 % but she is an IBM." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://home.earthlink.net/~yatescr
stenasc@yahoo.com writes:

> Hi all, > > If I take an example of a 16 tap fir and use a polyphase structure of 4 > filters each containing 4 taps, will the symmetrical properties of the > filter be negated? > > e.g > > c0, c1, c2 .....c15 > > becomes > > c0, c4, c8, c12 > c1, c5, c9, c13 > c2, c6, c10, c14 > c3, c7, c11, c15 > > It look to me that for the individual filter, there is no symmetry. Can > the coefficients be rearranged? > > Thanks > Bob
Hi Bob, As far as storage is concerned, it doesn't matter that the individual polyphase filters aren't symmetric as long as the "overall" filter is symmetric. Then, using your example, c7 = c8 c6 = c9 c5 = c10 c4 = c11 c3 = c12 c2 = c13 c1 = c14 c0 = c15 However, if you were trying to optimize the operations by summing two inputs and multiplying once, then you're out of luck as far as I can tell. -- % Randy Yates % "My Shangri-la has gone away, fading like %% Fuquay-Varina, NC % the Beatles on 'Hey Jude'" %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Shangri-La', *A New World Record*, ELO http://home.earthlink.net/~yatescr