discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] How to use the TV board?


From: Paul Creekmore
Subject: Re: [Discuss-gnuradio] How to use the TV board?
Date: Fri, 15 Feb 2008 13:22:40 -0500
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Nick Stephens wrote:
Hello Everyone - I am doing my best to understand how the TVRx board
works. I have Rev. 3 of the TV board, with MicroTuner module with IF of
~44 MHz.

(Preface - Thanks for your patience, as I am relatively new to GNU radio
and the USRP!)

In my experiment, I have an 80 MHz sine wave at 2 mV pk-pk input to the
TV tuner from a function generator. The goal is to properly record this
signal to a data file, then plot the time domain and FFT of the signal
in Matlab to verify functionality.

My record script is from the examples directory:

#!/usr/bin/env python

"""
Read a specified number of samples from a USRP and write the data to
a file.
"""

from gnuradio import gr, eng_notation
from gnuradio import usrp
import sys

class record_graph(gr.flow_graph):
    def __init__(self):
        gr.flow_graph.__init__(self)

        self.u = usrp.source_c(which=0, decim_rate=8)
        self.dst = gr.file_sink(gr.sizeof_gr_complex, 'recorded.dat')
        self.head = gr.head(gr.sizeof_gr_complex, 5000)

        self.connect(self.u, self.head, self.dst)

        self.u.set_mux(usrp.determine_rx_mux_value(self.u, [1,0]))
        self.subdev = usrp.selected_subdev(self.u, [1,0])
        self.subdev.set_gain(10)
        tuning = self.u.tune(0, self.subdev, 79000000)
        print "baseband_freq:", tuning.baseband_freq
        print "dxc_freq:", tuning.dxc_freq
        print "residual_freq:", tuning.residual_freq
        print "inverted:", tuning.inverted
        fs = self.u.converter_rate()
        print "source converter rate:", fs

try:
        record_graph().run()
except KeyboardInterrupt:
        pass

----
Now, as I understand it, with my tuning target frequency in this code at
79 MHz and a decimation rate of 16, and 64 MS/s sampling, then the sine
wave signal should appear at approximately a 1 MHz frequency. However,
all I am seeing is wideband noise. Does anybody know why this may be?
Also, what can you tell me about using the TV board?

We've solved this problem internally (I'm working directly with Nick at Purdue), but here's the answer, for the record.

The short answer is that the 80 MHz test signal was wiped out by the Hilbert filter in the ADC. Here's why: The specified 79 MHz center frequency gets down-converted by the tuner module on the TVRX daughter card to 44 MHz (for our version of the card). This then goes to an ADC on the motherboard, sampling at 64 MHz. Draw the aliasing diagram, and you'll see that 44 MHz aliases down to 20 MHz, and that the spectrum is inverted. So what was 80 MHz is now at 19 MHz rather than 21 MHz. The Hilbert filter, if I understand it correctly, then passes only the positive portion of the frequency spectrum on to the FPGA. Finally, the FPGA's digital down-converter takes what was at 20 MHz down to 0, and the test signal that was at 19 MHz disappears into the ether.

A test signal 1 MHz LESS than the specified center frequency then aliases down to 21 MHz and then down-converts to 1 MHz.

--Paul




reply via email to

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