discuss-gnuradio
[Top][All Lists]
Advanced

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

Help with sweep generator


From: e heuchamps
Subject: Help with sweep generator
Date: Fri, 11 Feb 2022 13:36:59 +0000

Hello everybody,

I am trying to implement a signal sweeping a given bandwidth with a given sweep rate, but I am having some trouble...
To begin, I want to say that I am even less than a newbie to everything related to radio (be it GNU Radio, SDR, etc.), hence I apologise in advance if this question is not clear or does not even make sense.
I have been trying to solve my problem by myself without bothering anybody, but could not manage, so here I am.

I have written a custom python block to sweep periodically across frequencies by sending messages to my signal source, but the sweep frequency is not correct.
I have read in a thread in this forum that the sampling rate (usually denoted by the variable "samp_rate") is just a number representing how much values are in a period of the signal.
This means that, for signal with frequency "f" or, equivalently, period "T = 1/f", 1 second is equal to T*f = samp_rate*f values.

If now I want to sweep the bandwidth, composed of "n_channels" channels, at a rate "sweep_rate" per second, it means that I have to stay sweep_rate/(samp_rate*f)/n_channels
values at a given frequency. As you can see, the frequency "f" is involved, which seems strange to me, especially since that frequency will vary along the sweep. Attached to this email, I given a screen shot of what I get. It can be seen that after 20 seconds, I do not have 20 repetitions (those results were obtained with samp_rate=100e3, f_start=2e3, f_stop=10e3, n_channels=2, and sweep_rate=1).
I was wondering if someone could help me out ? Also, how could I give the value of "sweep_rate" given by a slider (I mean, if I change it with the slider, to see the result, i.e. sweep faster or slower. So far, the slider does not modify the behaviour) ?

Thank you, and have a nice day,
Alex


P.S. : I also give the .grc and the .py of the custom block in attachement

Attachment: Capture d’écran de 2022-02-11 14-25-23.png
Description: Capture d’écran de 2022-02-11 14-25-23.png

Attachment: epy_block_0_0.py
Description: epy_block_0_0.py

Attachment: sweep_jammer_02.grc
Description: sweep_jammer_02.grc


reply via email to

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