Hi Marc,

welcome to GNU Radio!

The grey ports are "message passing" ports. You can, for example, use
them with the Message Strobe block. For more info on message passing,
I'd like to refer you to the guided tutorials,

http://tutorials.gnuradio.org

I think somewhere in chapter 4 or 5. I'd recommend starting at chapter 1
and going linearly through the chapters – they build atop of each other,
and since you've obviously already know a lot, they should be a fun and
quick read!

The signal you describe is a linear chirp and you wouldn't produce it by
changing the frequency of a signal source all the time. Instead, use the
Phase Mod block! Go to its documentation tab. It says there:

 output = complex(cos(in*sensitivity), sin(in*sensitivity))

So we simply go and set the sensititity to 2*3.14159 (==2pi).

Now, to make a constant-frequency tone, we'd connect a signal source to
the Phase Mod's input (hint: connect a throttle to its output, and a QT
Gui time sink to that), and set that to produce a Saw Tooth of amplitude
1 with the frequency we want. (read, process, yeah: that means that when
the sawtooth does one period, the output of the phase mod is one full
sine/cosine).

Now about the frequency:

>From theory, we know that frequency is simply the derivate of phase over
time (right, we showed that just now practically!), $f(t) =
\frac{d\varphi(t)}{dt}$, which implies that
$\int f(t) \, dt= \varphi(t) + C,\quad C \text{ const.}$

So, if the frequency itself changes over time linearly, we know that

$f(t) = a + b\cdot t = \frac{d\varphi(t)}{dt}$

>From which follows that

$\varphi(t) = \tilde C + \int{(a+bt)\,dt} = \tilde C + \int a\,dt + \int
bt \, dt$
   $= \tilde C + at + \frac 12 b t^2$.

So the phase needs to be a quadratic function, not a linear one like the
one we're using now!

We arbitrarily demand that the starting phase should be 0, so
$\varphi(0) = 0 \iff \tilde C = 0$. Because I'm lazy, I'm also setting
$a=0$ (and leave you to figure out why), and hint at $\frac12b$ having
very much to do with how fast the frequency changes (hint: frequency is
derivate of phase in  time).

So, how do we make phase a quadratic function of time?

Very simple: just add a multiply block between the sawtooth and the
phase mod. And set the phase mod's sensitivity to a value that makes
sense for you (see hint above). Your flow graph might look a bit like this:

Phase mod example

A comment on your intended application:

I don't understand, what are you planning to do with that chirp as soon
as you have it?

Best regards,
Marcus

On 12.01.2017 14:10, Marc Pàmies Massip wrote:
> Hello everyone,
>
> I have noticed that the Signal Source block has an input which says
> "Freq" (in gray color), but I don't know how to use it properly (I'm
> quite new in GNUradio)... I wanted to use it to change the generated
> signal's frequency automatically, without having to use a slider in
> the GUI or something similar that requires user interaction. 
>
> My goal is to make a frequency scanner for a band of 45 MHz that I
> cannot look at once because of the sample rate limitation, and then
> try to detect the strongest signals in that band. The idea to do this
> was generating a saw tooth signal which output value would be the
> input of a Signal Source that generates a cosine wave (in order to
> modulate the center frequency gradually until the entire band is scanned).
>
> I don't know if I have explained myself well... The question is
> basically if it is possible to automatically change the frequency of a
> sinusoid between certain predefined values.
>
> If you need more information just ask!
>
> Thank you very much for your time,
>
> Marc.
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to