discuss-gnuradio
[Top][All Lists]
Advanced

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

unexplained received power fluctuations with usrp b210 and gnuradio


From: Christophe Marqué
Subject: unexplained received power fluctuations with usrp b210 and gnuradio
Date: Wed, 20 Apr 2022 14:20:14 +0200

Hi,

I'm not sure this is the right place to ask this question, but I will try 
anyway.

I am using a usrp b210 to simply record the received power at a certain 
frequency. The receiver is plugged to a bicone antenna and an amplifier for 
testing, but the behaviour I describe below has shown up in more elaborated 
setups. I attach the simple flowgraph. The receiver is tuned with a tune 
request and an offset equal to half the sample rate.

In short, the power I am recording is not stable and I see large excursions (up 
or down) appearing abruptly, even in frequency bands where I expect no signal 
(e.g. radio astronomy bands). I know RFI are expected even in quiet bands, but 
I would not expect drops in the power levels. I see this at different gain 
settings for the receiver, although a higher gain makes things worse. Without 
any tune request, it improves a bit but not much.

I have made a similar set of measurements using directly the UHD python API, 
and it seems to me that on comparable timescales, no suspicious fluctuations 
appear. (see plots, the one of the uhd python api has been integrated by a 
factor 1000 to get the same rate as the gnuradio generated ones)

Has this behavior been seen in the past? I'm using fairly recents uhd and 
gnuradio libraries (UHD_4.2.0.0, gnuradio 3.10.1), and python 3.8 on a linux 
(ubuntu 20.4) pc, but I encountered this with older library versions.

Thanks for any suggestions,

Best regards,
Christophe

#######Code for the python uhd-api (derived from online example):  
import uhd
import numpy as np
import argparse

def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument("-a", "--args", default="", type=str)
    parser.add_argument("-o", "--output-file", type=str, required=True)
    parser.add_argument("-f", "--freq", type=float, required=True)
    parser.add_argument("-r", "--rate", default=1e6, type=float)
    parser.add_argument("-d", "--duration", default=5.0, type=float)
    parser.add_argument("-c", "--channels", default=0, nargs="+", type=int)
    parser.add_argument("-g", "--gain", type=int, default=10)
    return parser.parse_args()

def main():
    args = parse_args()
    usrp = uhd.usrp.MultiUSRP(args.args)
    num_samps = int(np.ceil(args.duration*args.rate))
    if not isinstance(args.channels, list):
        args.channels = [args.channels]
    samps = usrp.recv_num_samps(num_samps, args.freq, args.rate, args.channels, 
args.gain)
    with open(args.output_file, 'wb') as f:
        np.save(f, np.real(samps*np.conj(samps)),
                allow_pickle=False, fix_imports=False)

if __name__ == "__main__":
    main()
#######

PNG image

PNG image

PNG image

Attachment: test_flowgraph.grc
Description: Binary data


reply via email to

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