|Subject:||Re: [Discuss-gnuradio] voltage pulse from UHD driver|
|Date:||Thu, 15 Jan 2015 09:49:17 -0800|
Okay, this makes sense.
What about the version I posted on StackExchange where I am using GNU Radio's scheduler to request the samples?
What does GNU Radio do when running a constant flowgraph (like uhd_fft) that it doesn't to when running topblock.run() for each collection, as far as discarding samples off the front?
From: Nick Foster [address@hidden]
Sent: Thursday, January 15, 2015 10:40 AM
To: Anderson, Douglas J.
Cc: GNURadio Discussion List
Subject: Re: [Discuss-gnuradio] voltage pulse from UHD driver
In general you cannot use the first few samples of output from an acquisition. There are a couple of reasons:
First, if you begin collecting data immediately (rather than using UHD to schedule a collection at a given time) and you are using a daughterboard with a downconverter (anything but BasicRX or LFRX), tuning takes some time and things will be ugly while PLLs settle, etc.
Second, there are digital halfband and CIC filters in the USRP, and they are not reset between acquisitions. This means that the first samples will have some junk left over from the last acquisition.
Unfortunately, the general answer to what you're trying to do is, don't do that.
On Thu, Jan 15, 2015 at 9:26 AM, Anderson, Douglas J. <address@hidden> wrote:
I've been slowly working to understand/isolate an issue with a strange voltage pulse at all freqs and on USRP N210 with 50 Ohm load.
I posted about it on StackExchange here, and there are more details at this link: http://stackoverflow.com/questions/27968237/semi-consistent-voltage-pulse-from-usrp-when-using-simple-gnu-radio-flowgraph
Since then, I've further isolated it as a UHD issue by completely removing the GNU Radio scheduler from the equation and simply using the finite_acquisition function on UHD to pull samples directly into Python.
Here is the code I'm using to produce this output http://i.imgur.com/c3YWA22.png:
An interesting thing is that when using the UHD driver is used outside a flowgraph (uhd.finite_acquisition), I get the strange pulse consistently, whereas when used in a flowgraph it was inconsistent (see the StackExchange question).
import numpy as npimport matplotlib.pyplot as plt
FREQ = 800e6RATE = 1e6NSAMPS = 100usrp = uhd.usrp_source(device_addr="", stream_args=uhd.stream_args('fc32'))usrp.set_center_freq(FREQ)usrp.set_samp_rate(RATE)
fig, (freqplot, timeplot) = plt.subplots(2, sharex=True)freqplot.set_title("Frequency domain")timeplot.set_title("Time domain")
def plot():data = "">shifted_fft = np.fft.fftshift(np.fft.fft(data))dBm = 20*np.log10(np.abs(shifted_fft)) - 30freqplot.plot(dBm)timeplot.plot(np.abs(data))
def run_tb(times=25):for _ in range(times):plot()plt.show(block=False)
Discuss-gnuradio mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|