Display Problem with QT GUI Vector Sink

Dear all,

I built an angle-of-arrival system using four Ettus USRP2. I’m facing a
problem when trying to display a vector containing the calculated
MUSIC-Spectrum using a “QT GUI Vector Sink”. The vector sink won’t
display any data for the first two minutes, and then it is starting to
show very old values. When I use the block “Vector to Stream” and a
simple “QT GUI Time Sink” instead, the values are displayed immediately
without delay.

The block “music_cf” feeding the vector sink is a sync_decimator,
generating one vector of 181 elements for every 1000 input samples. I’ve
provided a shortened version of my c++ code in the attachment, without
the actual mathematics.

What could be the reason for this huge delay when using the “QT GUI
Vector Sink”? Is it a buffering problem?

Best regards,
Simon

Block Diagram:
http://fs1.directupload.net/images/150903/7cnqbzup.png

The vector sink has an averaging option, is that on?

M

Hi Martin,

averaging is disabled. Any further ideas?

Best regards,
Simon

Am 2015-09-03 18:49, schrieb Martin B.:

There’s an example for the vector sink, which doesn’t seem to have that
issue. Can you confirm that? It’s in gr-qtgui/examples.

M

PS: I had to locally fix the example, maybe you need to do that to, the
actual vector sink block was missing.

Hi Simon,

Is it possible, that the way my music_cf function is outputting the
data, might cause some trouble?

181 floats isn’t really a “round” itemsize, and since GNU Radio can only
build buffers that are multiple of 4KB (==4096B), I assume that you get
a large buffer (probably 4096 items of size 181*sizeof(float) each).
That per se is not a problem (maybe a loss of a few MB of RAM, but who
cares in this day and age?); but things get large, and as you can see,
latency can be pretty high. I remember seeing this a while back, when I
was trying large (as in 50dBbin) FFTs with the vector sink; I kind of
assumed visualizing a vector that is a couple of thousand times larger
than my screen had pixels in x-direction would have been what introduced
the latency, so I didn’t look into it.

Attempt of building a test case, which might solve your issue, but is
vastly bad design (because it just copies twice):

music_cf->vector_to_stream->stream_to_vector->qt_vector_sink

Could you try that?

Next step, because this might be interesting: If you have both
performance counters enabled and Thrift/gr-controlport, you could have a
look at the ctrlport performance monitor, which would tell you things
like the average buffer fill, average work() run time, and variance of
these numbers.

Best regards,
Marcus

The example is running without errors.
Is it possible, that the way my music_cf function is outputting the
data, might cause some trouble?

Simon

Am 2015-09-04 21:45, schrieb Martin B.:

Hi Marcus,

thanks for your detailed reply. I built your test case, which shows the
same huge delays of ~2 minutes.
Surprisingly, changing the vector size to 1024 elements (=4096 bytes)
yielded a much better result with delays going down to about 3 seconds.
Nevertheless I think I’ll stick to to the workaround of using ‘Vector to
Stream’ combined with a time sink, as this gives me the best
responsiveness.
Performance counters and Thrift seem promising methods to further
analyze this behavior, but as of now the idea of having to recompile and
reinstall gnuradio isn’t very tempting.

Thanks again for your help,
best regards,
Simon

Am 2015-09-07 13:18, schrieb Marcus Müller:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs