discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] voltage pulse from UHD driver


From: Anderson, Douglas J.
Subject: [Discuss-gnuradio] voltage pulse from UHD driver
Date: Thu, 15 Jan 2015 17:26:43 +0000

Hi all,

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. 


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 np
import matplotlib.pyplot as plt

FREQ = 800e6
RATE = 1e6
NSAMPS = 100
usrp = 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)) - 30
    freqplot.plot(dBm)
    timeplot.plot(np.abs(data))

def run_tb(times=25):
    for _ in range(times):
        plot()
    plt.show(block=False)

Douglas Anderson | Intern
DOC/NTIA/ITS-T | 325 Broadway St., Boulder, CO 80305 | P: 303 497 3582

reply via email to

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