[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] resampler block (DRM ok!)
From: |
Stephane Fillod |
Subject: |
Re: [Discuss-gnuradio] resampler block (DRM ok!) |
Date: |
Fri, 7 Oct 2005 23:44:27 +0200 |
User-agent: |
Mutt/1.5.10i |
On Tue, Oct 04, 2005 at 04:58:01PM -0700, Eric Blossom wrote:
[..]
> The _fff case mostly works. Look for FIXME's in
> qa_rational_rasampler.py. However, the automatic filter design
> feature is not written. Without that, you'll need to design the
> appropriate filter. Someone needs to finish sorting out the
> filter. For some reason it's failing in the 10,000 element test case.
> There is currently qa code for the _fff case. When it works for all
> cases, the _ccc qa code should be written too.
Thanks Matt, Eric and Bob for the reply. I took a snippet from ayfabtu.py,
and wrote something like this:
adc_rate = 64e6
usrp_decim = 125
if_rate = adc_rate / usrp_decim # 512 kS/s
if_decim = 8
demod_rate = if_rate / if_decim # 64 kS/s
# usrp is data source
src = usrp.source_c (0, usrp_decim)
src.set_rx_freq (0, IF_freq)
actual_IF_freq = src.rx_freq(0)
actual_offset = actual_IF_freq + station
src.set_pga(0,30)
channel_coeffs = \
gr.firdes.low_pass (1.0, # gain
if_rate, # sampling rate
64e3, # low pass cutoff freq
72e3, # width of trans. band
gr.firdes.WIN_HANN)
ddc = gr.freq_xlating_fir_filter_ccf
(if_decim,channel_coeffs,-actual_offset,if_rate)
volumecontrol = gr.multiply_const_cc(.0031)
print len(channel_coeffs)
ifrtaps = gr.firdes.low_pass(1,
2, # Fs
.75/3, # freq1
.25/3, # trans width
gr.firdes.WIN_HANN)
print "len(ifrtaps) =", len(ifrtaps)
jack_resampler = blks.rational_resampler_ccf(self, 3, 4, ifrtaps)
# split IQ because JACK audio is only mono
split_IQ = gr.complex_to_float ()
# JACK audio as final sink
jack_rate = 48e3
demod_sink_i = audio_jack.sink (int (jack_rate), "gr_sink_I")
demod_sink_q = audio_jack.sink (int (jack_rate), "gr_sink_Q")
# now wire it all together
self.connect (src, ddc)
self.connect (ddc, volumecontrol)
self.connect (volumecontrol, jack_resampler)
self.connect (jack_resampler, split_IQ)
self.connect ((split_IQ, 0), demod_sink_i)
self.connect ((split_IQ, 1), demod_sink_q)
After some hacking, and a yet-to-release patch against Dream DRM
receiver (jack I/O sound), I was able to receive a local DRM station:
http://f8cfe.free.fr/ham/gnuradio/drm40_4.png
Rem: Dream DRM receiver has some interesting frequency and samplerate
history tracking..
Here was the chain:
Wire antenna in attic -> automatic tuner (AH4) tuned to 12m --+
|
RG213
|
v
USRP/BasicRX
tuned to 25.775
decim to 512kS/s
|
v
freq_xlating_fir_filter_ccf
64 kS/s
|
v
rational_resampler_ccf
48 kS/s
|
v
audio_jack
|
v
Dream DRM rx (I/Q)
|
v
headphones <- soundcard <- jackd
Altough it worked, I still don't understand why the value passed to
multiply_const_cc (.0031) is so low. Would someone be kind to explain
me how to choose it? What are the pro/con of using a _ccf vs. _ccc
(float vs. complex) filter?
And honestly, the parameters of the gr.firdes.low_pass ifrtaps coeffs
are pure magic to me. Maybe I should read more books on signal
processing :-)
Rem: replacing the antenna with a wire couple of meters long in the
shack made the SNR drop to 21dB. I guess this can be explained by the
lack of band filtering of a barefoot BasicRX?
> > In the case of the 512kS/s to 48kS/s ddc, would the gr_rational_resampler
> > be able to replace gr_freq_xlating_fir_filter ?
Ok no.
IOW, the gr_rational_resampler does not do frequency translation,
and the USRP cannot decimate above 256. I used a decim rate
below 128 because I heard there's gain problems above.
So it looks like freq_xlating_fir_filter_ccf must be used.
This is still ok, the whole ddc python script takes less than
9% on a 1GHz AMD CPU. Still, I wished it would be less, because
I hope to eventually have several of them running in parallel,
plus a point and click waterfall, and some demodulating clients
around.
Patchs available on demand, comments welcome!
Cheers
--
Stephane
- [Discuss-gnuradio] resampler block, Stephane Fillod, 2005/10/04
- Re: [Discuss-gnuradio] resampler block, Krzysztof Kamieniecki, 2005/10/04
- Re: [Discuss-gnuradio] resampler block, Matt Ettus, 2005/10/04
- Re: [Discuss-gnuradio] resampler block, Matt Ettus, 2005/10/04
- Re: [Discuss-gnuradio] resampler block, Eric Blossom, 2005/10/04
- Re: [Discuss-gnuradio] resampler block (DRM ok!), Eric Blossom, 2005/10/08