On 2022-04-20 08:20, Christophe Marqué wrote:
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()
#######
Have you repeated your experiments with a terminator on the input of the
receiver? I've been using Gnu Radio for radio astronomy applications
since 2005 or so. The only
anomaly I've found that was GR-related in this regard was that the
single-pole IIR filter has some numerical instability for very small inputs.
Also, for a total-power radiometer, I normally just use
complex-to-mag**2 followed by integration and decimation.
In the analog world, you can often get dips in received power due to
what some call "receiver de-sense" which is caused by a strong
out-of-band signal exceeding the
linearity limits of an early gain stage, but since it's out of band,
you don't see the signal, just the non-linearity effects its causes.