discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Rational Resampler


From: Robert McGwier
Subject: [Discuss-gnuradio] Rational Resampler
Date: Wed, 09 Nov 2005 00:55:47 +0000
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

The rational resampler is functional and has been checked in by Eric. I learned a valuable lesson which I will pass on. Like everyone who does a lot of different coding these days, the first place to go is to Google for the time saving code. Julius O. Smith of CCRMA did a very good study of resampling technology and shared code. http://ccrma.stanford.edu/~jos/resample/resample.html

Rather than doing the smart thing for the required Kaiser window derived filter, I used the "top of the list" kaiser window calculation code. I have subsequently discovered, after Matt and I confirmed that it is hosed, that it was taken directly (without attribution by the way) from Numerical Recipes. JUST SAY NO. Their modified bessel function of order zero is broken. In JOS pages on this, he points to code for his resampling code and in it, he uses the recursion relation and allows it to proceed iteratively until the update is very small. The Kaiser window derived filters now look spectacular. We chose to have a fixed "Beta" allowing for the first lobe to be 50 dB down from the "main lobe" in the frequency response of the Kaiser window. Do not be alarmed by the huge size of the FIR filter designed if, for example, you have a 32000 or 48000 sample per second input and you chose to output 11025 samples per second. The size of the filter is determined by number of taps at the output frequency if the default filter is 0.4 cutoff and 0.5 being Nyquist. The closer you push the cutoff towards Nyquist, the longer it will get. Let's take the exampler of 48000 and 11025 as the input and output sample rates respectively. The lcm of 48000 and 11025 is 7056000 so the first step is to interpolate up by 147 times and then decimate by 640. So the filter will be about huge for this. However, the amount of computational load is the on the order of the decimation of the filter. HOWEVER: You will have a problem with this code if you have a cache free machine. The Sempron and the Celeron are not great signal processing chips because of their cache challenged state!

This is round one of this.  Enjoy.

Bob

--
Laziness is the number one inspiration for ingenuity.  Guilty as charged!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]