Hi All, This query is related to data resampling. I have an ADC whose sampling frequency is 40Mhz now I need two different version of resampled data one being data resampled at 20Mhz while the other being at 22Mhz. Could any one please tell me what would be the best way of doing the resampling of data obtained from the ADC. Thanking you, Regards Janey

# Data resampling

Started by ●June 16, 2004

Reply by ●June 16, 20042004-06-16

Just use decimator afterwards. The 20MHz one should be easy, just directly downsampling by 2. The 22Mhz one, since is not a integer, may require upsampling first and then down sampling. "Janey" <janeyup@lycos.com> wrote in message news:ed172f93.0406152009.1602d7c5@posting.google.com...> Hi All, > > This query is related to data resampling. I have an ADC whose sampling > frequency is 40Mhz now I need two different version of resampled data > one being data resampled at 20Mhz while the other being at 22Mhz. > Could any one please tell me what would be the best way of doing the > resampling of data obtained from the ADC. > > Thanking you, > > Regards > > Janey

Reply by ●June 16, 20042004-06-16

Janey wrote:> Hi All, > > This query is related to data resampling. I have an ADC whose sampling > frequency is 40Mhz now I need two different version of resampled data > one being data resampled at 20Mhz while the other being at 22Mhz. > Could any one please tell me what would be the best way of doing the > resampling of data obtained from the ADC. > > Thanking you, > > Regards > > JaneyRead the Multirate FAQ at DSPGuru: http://www.dspguru.com/info/faqs/mrfaq.htm For the 20MHz, you'll need to decimate by two. For 22MHz, you'll need to interpolate by 11 and then decimate by 20. There are a lot of ways to reduce the computations involved, but those are spelled out pretty well in the FAQ. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 In theory, theory and practice are the same, but in practice, they're not

Reply by ●June 17, 20042004-06-17

Hi Honglei, Thanks for your informative response. Regards Janey "Honglei Chen" <hchen@mathworks.com> wrote in message news:<capecq$ov5$1@fred.mathworks.com>...> Just use decimator afterwards. The 20MHz one should be easy, just directly > downsampling by 2. The 22Mhz one, since is not a integer, may require > upsampling first and then down sampling. > > > "Janey" <janeyup@lycos.com> wrote in message > news:ed172f93.0406152009.1602d7c5@posting.google.com... > > Hi All, > > > > This query is related to data resampling. I have an ADC whose sampling > > frequency is 40Mhz now I need two different version of resampled data > > one being data resampled at 20Mhz while the other being at 22Mhz. > > Could any one please tell me what would be the best way of doing the > > resampling of data obtained from the ADC. > > > > Thanking you, > > > > Regards > > > > Janey

Reply by ●June 17, 20042004-06-17

Hi Jim, Thanks for your informative response. Regards Janey Jim Thomas <jthomas@bittware.com> wrote in message news:<10d0kneft1ccd82@corp.supernews.com>...> Janey wrote: > > Hi All, > > > > This query is related to data resampling. I have an ADC whose sampling > > frequency is 40Mhz now I need two different version of resampled data > > one being data resampled at 20Mhz while the other being at 22Mhz. > > Could any one please tell me what would be the best way of doing the > > resampling of data obtained from the ADC. > > > > Thanking you, > > > > Regards > > > > Janey > > Read the Multirate FAQ at DSPGuru: > > http://www.dspguru.com/info/faqs/mrfaq.htm > > For the 20MHz, you'll need to decimate by two. For 22MHz, you'll need > to interpolate by 11 and then decimate by 20. There are a lot of ways > to reduce the computations involved, but those are spelled out pretty > well in the FAQ.

Reply by ●June 17, 20042004-06-17

Janey wrote:> Hi All, > > This query is related to data resampling. I have an ADC whose sampling > frequency is 40Mhz now I need two different version of resampled data > one being data resampled at 20Mhz while the other being at 22Mhz. > Could any one please tell me what would be the best way of doing the > resampling of data obtained from the ADC. > > Thanking you, > > Regards > > JaneyYou may want to peek at Secret Rabbit Code. www.mega-nerd.com

Reply by ●June 18, 20042004-06-18

Janey wrote:

Reply by ●June 19, 20042004-06-19

In article <ed172f93.0406152009.1602d7c5@posting.google.com>, Janey <janeyup@lycos.com> wrote:>This query is related to data resampling. I have an ADC whose sampling >frequency is 40Mhz now I need two different version of resampled data >one being data resampled at 20Mhz while the other being at 22Mhz. >Could any one please tell me what would be the best way of doing the >resampling of data obtained from the ADC.You probably want to low-pass filter for both new sampling rates to avoid aliasing unless the original signal is already appropriate (e.g. already has no components above 10MHz or 11Mhz). You can use a windowed sinc interpolator for the 22MHz interpolation. On a fast computer you can calculate the taps on the fly, or save them into a hash table as needed. No need to upsample. IMHO. YMMV. -- Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/ #include <canonical.disclaimer> // only my own opinions, etc.

Reply by ●June 20, 20042004-06-20

Suodatin Pussi wrote:> Janey wrote: >> Hi All, >> >> This query is related to data resampling. I have an ADC whose sampling >> frequency is 40Mhz now I need two different version of resampled data >> one being data resampled at 20Mhz while the other being at 22Mhz. >> Could any one please tell me what would be the best way of doing the >> resampling of data obtained from the ADC. >> >> Thanking you, >> >> Regards >> >> Janey > A Fir approach: > For up 11 you add 10 zeros to each sample and fir-filter the signal. > Since multiplying with zeros will result in zero output, you can skip > these calcs. Basicly you're multiplying each sample with every 11th > filter coefficient (startpoint however differs, depending on overlap). > For down 20 you throw away 19 out of every 20 filtered samples, so you > could have skipped these calcs and start the fir at every 20th sample. > The best thing is to draw it out on paper. > Don't forget so gain the signal with the upfactor. Since instead of > adding zero's you actually should have repeated each sample 11 times. > The fir filter should have a lp cuttoff for the lowest fs (its doing > both cutoff and interpolating).Using a FIR approach you actually do not up 11 or down sample 20 the signal. It's more like interpolating the signal with 11/20th (you do not have a large intermediate signal). But thinking as if you upsample and downsample makes it easier to understand the mechanism. Instead of adding zero's you could repeat a sample 11 times. Sincs they're all the same in value you just can sum all corresponding FIR coeffients and multiply it with the sample value. From the summed FIR coeffs you could make a table. But thinking in therms