UHD Underrun with Wav File Source and USRP Sink

Hello all,

I am using a USRP1 and an LFTX daughtercard and Ubuntu 12.04.

I am having an issue with a simple GRC script I made which has three
blocks.
A WAV file source connects to a resampler block and then to the UHD USRP
sink.

When I run the script I get a single underun right at the start of
running the script and no other underrun.
When I run the script using the sudo in front of it, I get two underruns
right at the start of running the script and no other underrun.
I monitored the signal out of the LFTX using an oscilloscope and noticed
some blips/noise when the script is run and I believe they correspond to
the underruns. I tried this with and without real-time scheduling
enabled and didn’t see any difference.

I tried the same exact type of script with an older version of GRC on a
different laptop with Ubuntu 10.04. This uses the USRP sink block not
the UHD sink block. This script plays the file perfectly without any
underruns at all and I don’t see the blips/noise at the beginning of the
signal.

I am using the LFTX for an audio application and the blips/noise will
cause a problem for me. Does anyone know why I am seeing this behavior
with the newer UHD block? Is there anything I can do to eliminate it?

Many thanks, -Tom

On 11/11/2012 01:21 PM, Tom H. wrote:

the sudo in front of it, I get two underruns right at the start of
any underruns at all and I don’t see the blips/noise at the beginning
of the signal.

I am using the LFTX for an audio application and the blips/noise will
cause a problem for me. Does anyone know why I am seeing this
behavior with the newer UHD block? Is there anything I can do to
eliminate it?

Hi Tom,

If I am understanding correctly, you are getting some initial underflows
when the flow graph begins processing. This is causing some
discontinuous stream interruption over on the receiver side.

If thats the case, I dont know of anything specifically to cause this,
so it might just be the issue of interrupt coalescing. That is the host
isnt initially ramped up to push out USB packets at full speed. So,
driver wise, there may have been a subtle difference thats brining this
out, USB 1.0 vs .1 for example.

I’d like to replicate it over on end. But if I have a quick suggestion,
it may be helpful to zero-pad the beginning of the wavefile so those
initial discontinuities are only lost in the padding.

-josh

Hello Josh,

Thanks for the suggestion. Yes I had zero padded the file with about 1
second of zero signal prior to the signal I want to transmit. I had
still
seen the blip/noise when running the script even when there was 1 second
of zero padded signal. Is there anything else I should try?

Thanks, -Tom


From: Josh B. [email protected]
To: [email protected]
Sent: Monday, November 12, 2012 1:03 PM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

On 11/11/2012 01:21 PM, Tom H. wrote:

the sudo in front of it, I get two underruns right at the start of
any underruns at all and I don’t see the blips/noise at the beginning
of the signal.

I am using the LFTX for an audio application and the blips/noise will
cause a problem for me. Does anyone know why I am seeing this
behavior with the newer UHD block? Is there anything I can do to
eliminate it?

Hi Tom,

If I am understanding correctly, you are getting some initial underflows
when the flow graph begins processing. This is causing some
discontinuous stream interruption over on the receiver side.

If thats the case, I dont know of anything specifically to cause this,
so it might just be the issue of interrupt coalescing. That is the host
isnt initially ramped up to push out USB packets at full speed. So,
driver wise, there may have been a subtle difference thats brining this
out, USB 1.0 vs .1 for example.

I’d like to replicate it over on end. But if I have a quick suggestion,
it may be helpful to zero-pad the beginning of the wavefile so those
initial discontinuities are only lost in the padding.

-josh

On 11/12/2012 02:10 PM, Tom H. wrote:

Hello Josh,

Thanks for the suggestion. Yes I had zero padded the file with about 1 second
of zero signal prior to the signal I want to transmit. I had still
seen the blip/noise when running the script even when there was 1 second of zero
padded signal. Is there anything else I should try?

Well, then perhaps it not the result of an underflow.

What is your transmit amplitude? In the old libusrp1 floats were
+/-2**15, but now they are +/-1.0 fullscale. So you must have had to
adjust the amplitude of the baseband samples; but are they scaled small
enough to avoid truncation?

-josh

Hello Josh,

The wav file has float values in the -1 to 1 range. In the old GRC
script I had used a constant multiplier of (2**15-1) to get the correct
amplitude.
In the newer GRC script I took that out since it was already in the
correct range.

When I check the output of the LFTX with an oscilloscope, they both look
identical except that I see the blip/noise (which I think is from
underrun) show up right at the start of the transmission. I have added
zero padding to the signal. This is for an audio recording project and
the blip/noise causes problems on the receive side because I am
listening continuously for the incoming signal and the blip causes
unwanted effects.

Any other suggestions?
Thanks so much for your responses, - Tom


From: Josh B. [email protected]
To: [email protected]
Sent: Tuesday, November 13, 2012 9:50 PM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

On 11/12/2012 02:10 PM, Tom H. wrote:

Hello Josh,

Thanks for the suggestion. Yes I had zero padded the file with about 1 second of
zero signal prior to the signal I want to transmit. I had still
seen the blip/noise when running the script even when there was 1 second of zero
padded signal. Is there anything else I should try?

Well, then perhaps it not the result of an underflow.

What is your transmit amplitude? In the old libusrp1 floats were
+/-2**15, but now they are +/-1.0 fullscale. So you must have had to
adjust the amplitude of the baseband samples; but are they scaled small
enough to avoid truncation?

-josh

As an additional check, I reduced the signal amplitude further in the
WAV file to make sure there is no truncation. I still see the same two
underruns at the start of running the script.
Thanks, - Tom


From: Tom H. [email protected]
To: “[email protected][email protected]
Sent: Wednesday, November 14, 2012 8:22 AM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

Hello Josh,

The wav file has float values in the -1 to 1 range. In the old GRC
script I had used a constant multiplier of (2**15-1) to get the correct
amplitude.
In the newer GRC script I took that out since it was already in the
correct range.

When I check the output of the LFTX with an oscilloscope, they both look
identical except that I see the blip/noise (which I think is from
underrun) show up right at the start of the transmission. I have added
zero padding to the signal. This is for an audio recording project and
the blip/noise causes problems on the receive side because I am
listening continuously for the incoming signal and the blip causes
unwanted effects.

Any other suggestions?
Thanks so much for your responses, - Tom


From: Josh B. [email protected]
To: [email protected]
Sent: Tuesday, November 13, 2012 9:50 PM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

On 11/12/2012 02:10 PM, Tom H. wrote:

Hello Josh,

Thanks for the suggestion. Yes I had zero padded the file with about 1 second of
zero signal prior to the signal I want to transmit. I had still
seen the blip/noise when running the script even when there was 1 second of zero
padded signal. Is there anything else I should try?

Well, then perhaps it not the result of an underflow.

What is your transmit amplitude? In the old libusrp1 floats were
+/-2**15, but now they are +/-1.0 fullscale. So you must have had to
adjust the amplitude of the baseband samples; but are they scaled small
enough to avoid truncation?

-josh

running the script and no other underrun. When I run the script using
the sudo in front of it, I get two underruns right at the start of
running the script and no other underrun. I monitored the
signal out

of the signal.

I am using the LFTX for an audio application and the blips/noise will
cause a problem for me. Does anyone know why I am seeing this
behavior with the newer UHD block? Is there anything I can do to
eliminate
it?
isnt initially ramped up to push out USB packets at full speed. So,

Discuss-gnuradio mailing list

[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

On 16/11/12 07:15 PM, Tom H. wrote:

Does anyone have some ideas on what else I can try right now? I’m out
of ideas on what is causing the underruns at the start of running the
script that reads the WAV file and outputs to the USRP LFTX.

Thank you, -Tom

Most systems like this have startup glitches. The analog hardware is
one source, and in your case, it’s the
kernels buffer management getting “ramped up”. Back in the 1980s, we
had to deal with this a lot on
low-speed packet-radio systems layered on top of ordinary analog FM
radios. There was no way to make
the radios not glitch on startup, so we simply devised mechanisms to
deal with it.

My suggestion is to setup up a continuous transmitter graph, and
gate-in “real” samples when you need them.

Also, I’d gently suggest that a receiver chain that can’t handle the odd
glitch isn’t much of a receiver chain, in
the signal-processing sense. Radio is analog. It’s subject to
distortions, glitches, pops, wheezes, snorts and
shudders that are utterly outside of your control. Your receiver has
to be able to deal with them, regardless
of whether the source is “natural”, or a quirk of the buffer-startup
behaviour.

Does anyone have some ideas on what else I can try right now? I’m out of
ideas on what is causing the underruns at the start of running the
script that reads the WAV file and outputs to the USRP LFTX.

Thank you, -Tom


From: Tom H. [email protected]
To: Tom H. [email protected]; “[email protected]
[email protected]
Sent: Wednesday, November 14, 2012 8:52 AM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

As an additional check, I reduced the signal amplitude further in the
WAV file to make sure there is no truncation. I still see the same two
underruns at the start of running the script.
Thanks, - Tom


From: Tom H. [email protected]
To: “[email protected][email protected]
Sent: Wednesday, November 14, 2012 8:22 AM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

Hello Josh,

The wav file has float values in the -1 to 1 range. In the old GRC
script I had used a constant multiplier of (2**15-1) to get the correct
amplitude.
In the newer GRC script I took that out since it was already in the
correct range.

When I check the output of the LFTX with an oscilloscope, they both look
identical except that I see the blip/noise (which I think is from
underrun) show up right at the start of the transmission. I have added
zero padding to the signal. This is for an audio recording project and
the blip/noise causes problems on the receive side because I am
listening continuously for the incoming signal and the blip causes
unwanted effects.

Any other suggestions?
Thanks so much for your responses, - Tom


From: Josh B. [email protected]
To: [email protected]
Sent: Tuesday, November 13, 2012 9:50 PM
Subject: Re: [Discuss-gnuradio] UHD Underrun with Wav File Source and
USRP Sink

On 11/12/2012 02:10 PM, Tom H. wrote:

Hello Josh,

Thanks for the suggestion. Yes I had zero padded the file with about 1 second of
zero signal prior to the signal I want to transmit. I had still
seen the blip/noise when running the script even when there was 1 second of zero
padded signal. Is there anything else I should try?

Well, then perhaps it not the result of an underflow.

What is your transmit amplitude? In the old libusrp1 floats were
+/-2**15, but now they are +/-1.0 fullscale. So you must have had to
adjust the amplitude of the baseband samples; but are they scaled small
enough to avoid truncation?

-josh

running the script and no other underrun. When I run the script using
the sudo in front of it, I get two
underruns right at the start of

running the script and no other underrun. I monitored the
signal out

of the signal.

I am using the LFTX for an audio application and the blips/noise will
cause a problem for me. Does anyone know why I am seeing this
behavior with the newer UHD block? Is there anything I can do to
eliminate
it?
isnt initially ramped up to push out USB packets at full speed. So,

Discuss-gnuradio mailing list

[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

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