discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Number sink and making a clock


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Number sink and making a clock
Date: Tue, 6 Sep 2016 22:06:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Santos,

you're not actually describing your problem all that well, but there's the central question:

Are you using a throttle block, or is your flow graph rate-limited by a hardware device (e.g. a USRP or HackRF or Audio sink)?

===Not using throttle or rate-limiting hardware===

GNU Radio just works as fast as it can. The sampling rate you configure in your signal source has nothing to do with how fast that signal is generated – it just says "ok, generate a signal with period f_signal/f_sample samples". This is DSP – everything is measured in sample durations, and there's no "real world time" involved in any of these calculations.

Hence, your number sink will just show the value of an incredibly fast changing signal at the time it updated its display. Not very useful

===Using throttle or other rate-limiting blocks===

You might be under the wrong impression that if you use throttle e.g. with 1kHz throttle rate, you'll actually get one sample every 1ms.

That's not the case – GNU Radio generally works on sample chunks, ie. the signal source fills its output buffer as fast as it can, GNU Radio wakes up the downstream block, and hands it everything there is in that buffer. So assume, that, for example, the block that limits your rate (throttle, hardware interface) gets handed 8192 samples at once. It will now take the time it needs to process these 8192 samples – for example, with a throttle set to freq=1k, it will copy these 8192 samples from in- to output, and simply sleep for 8.192s! In other words, your number sink does see 1000 samples per second _on average_, but in much, much greater chunks than 1 sample at a time.

Hence, for really low rates, where your eye is faster than the number of sample packets per second that are generated, your number sink simply gets an update very seldom, and when it gets it, it's going to be a lot of samples at once.


Best regards,

Marcus


On 06.09.2016 21:17, Santos Campos wrote:
Ah that did slow it down to more real time!

So, data isn't really streaming out of the signal source block like the parameters would suggest, is it?
My expectation with forcing a long period was it'd stream high for 10s and low for 10s.

On Tue, Sep 6, 2016 at 1:24 PM, Nicolas Cuervo <address@hidden> wrote:
Hi Santos,

inside the number sink there is a field called "Update Period", which you can reduce to a value that suits your needs. For what I understand of your setup, maybe you have a rather big number here in comparison with the update rate of the sink. Try reducing this value and let us know if this helps you solve your problem.

Cheers,

-Nicolas

On Tue, Sep 6, 2016 at 7:49 AM, Santos Campos <address@hidden> wrote:
Hello, all!

I'm using a square wave to make a clock(frequency = .05 Hz, Period = 20s).
It shows up well in a time sink, but has trouble gaining stability in a number plot.

How can I get the number sink to update in real time?

Thanks and any help is much appreciated!

-Santos

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





--
/*
Santos Campos
University of Michigan '17 | Computer Engineering
Virtual EM Inc | Engineering Intern
(269)419-5113
*/


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


reply via email to

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