Gr_delay behavior

Hi,

gr_delay is intended to delay the input of the signal by n samples.
I’ve been doing some testing with that block and I have observed that
the delay is applied to the chunk of data that the block receives as
input (on my case that was some 8000 samples) and applied again to the
next chunk.

I see two problems with that.

  • I’m not able to apply the delay once (to the very beginning of the
    signal). This is actually a very trivial problem that could be solved
    building a custom block.
  • If the delay I want to apply is larger than the size of the data
    that the block receives (say a delay of 10000 samples when the block
    receives the data in chunks of 8000 samples), the signal is set to 0
    as if applying an infinite delay.

Is this the expected behavior of the block or am I missing something
on my observations?

Thanks in advance for your answers.
Carlos.

Forgot to mention that I am using gnuradio-3.2.2 on Ubuntu 9.10.

Carlos.

On Mon, Feb 22, 2010 at 10:42 AM, Carlos Aviles
[email protected] wrote:

  • I’m not able to apply the delay once (to the very beginning of the
    Thanks in advance for your answers.
    Carlos.


Carlos
AvilésLeibnizstr. 47, 10629 Berlin
[email protected]
+49 15117321801

On Mon, Feb 22, 2010 at 10:42:08AM +0100, Carlos Aviles wrote:

building a custom block.

  • If the delay I want to apply is larger than the size of the data
    that the block receives (say a delay of 10000 samples when the block
    receives the data in chunks of 8000 samples), the signal is set to 0
    as if applying an infinite delay.

If you’d have pasted some code, the diagnosis would have been a bit
simpler, but I’ll give it a try:

gr_delay works as you explained. If you set delay to N, the first N-1
outputs will be zero, after that, everything will work as expected.
Of course, you must send at least N items before you get anything at
the output.

Concerning your second point: what do you mean by chunk size? Are you
talking about what GNU Radio passes between blocks? If so, ignore that,
GNU Radio will do the right thing. Or have you set itemsize to 8000 *
gr.sizeof_gr_float? In that case, remember you have to pass 800000000
samples (in blocks of 8000 samples each) through gr_delay before you’ve
reached a delay of 10000.

Please post your questions such that the answer requires less guesswork.

MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-3790
Fax: +49 721 608-6071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

Hi Martin,

Thanks for the answer and my apologies for the guessing work.

I reviewed my test code and it turns out that, as you say and as I was
expecting, gr_delay works fine. A custom block I built is the one to
blame for the misbehavior I’m seeing.
I’ll work on my custom block and eventually post another question in
case I can’t figure out by myself the problem.

Thanks,
Carlos.