# USRP RF output frequency is much faster than intended

**URL:** <https://www.ruby-forum.com/t/usrp-rf-output-frequency-is-much-faster-than-intended/242468>\
**Category:** GNU Radio\
**Created:** [June 25, 2015, 3:39pm UTC](https://www.ruby-forum.com/t/usrp-rf-output-frequency-is-much-faster-than-intended/242468 "2015-06-25T15:39:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [June 25, 2015, 3:39pm UTC](https://www.ruby-forum.com/t/usrp-rf-output-frequency-is-much-faster-than-intended/242468/1 "2015-06-25T15:39:18Z")

</div>

I build a flow graph like an image in the following link:  
[http://i.imgur.com/PpXck09.jpg](http://i.imgur.com/PpXck09.jpg)

After then, I connect the USRP and an oscilloscope and see output, which  
yields: [http://i.imgur.com/JEKhnfx.jpg](http://i.imgur.com/JEKhnfx.jpg)

As you see, both are square waves, but the frequency, the above is 1k  
and  
the below is 7.8 kHz.  
If I set a frequency of signal source to 2k, the below says 16.6 kHz.  
(Of  
course, there are some deviation)

How could I understand this?  
If the oscilloscope shows a frequency slower than the GNU radio,  
I think that is acceptable since there are latency and processing time  
and  
something.

But the output is 7.8 times faster than what I inteded.  
The only thing I can guess is… 7.8 is rounded up to 8, and 8 indicates  
‘8’ bits.  
But it seems a bit unnatural and weird…

Could anyone give me a hint?

If you think it is more appropriate to be posted on USRP-users, I’ll  
post  
it there later. 🙂

Regards,  
Jeon.

---

<div class="post-metadata">

**Author:** ![Jeon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Jeon](https://www.ruby-forum.com/u/Jeon)\
**Post date:** [June 25, 2015, 3:52pm UTC](https://www.ruby-forum.com/t/usrp-rf-output-frequency-is-much-faster-than-intended/242468/2 "2015-06-25T15:52:45Z")

</div>

Hi Jeon,

there’s a bit wrong with this:  
32kHz is not a valid sampling rate of any USRP that can take basicTX,  
LFTX or UBX daughterboards, which is what you’d need to produce a  
baseband signal. Your console window should show a warning saying which  
sampling rate was actually used. We can deduct which rate was used:  
32kHz \* 7.8 ~= 250kHz.

Best regards,  
Marcus

---

<div class="post-metadata">

**Author:** ![Jeon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Jeon](https://www.ruby-forum.com/u/Jeon)\
**Post date:** [June 25, 2015, 3:59pm UTC](https://www.ruby-forum.com/t/usrp-rf-output-frequency-is-much-faster-than-intended/242468/3 "2015-06-25T15:59:10Z")

</div>

Hi Jeon,

I stared at this over my morning coffee. I can’t quite explain why  
you’re  
getting 7.8kHz output on a scope, but there’s some other considerations.

1. Your UHD block has a center frequency of 0Hz. When you run your  
flowgraph do you get messages from UHD? You should see something about  
not  
being able to set a center frequency of 0Hz and using x Hz instead.

2. 32 kHz is not a good sampling rate for USRPs. You should see  
something  
similar to #1 about setting the clock. The signal you are seeing is  
probably a result of generating a signal with some expected sampling  
frequency and looking at with another. If you compare the actual USRP  
clock  
rate to 32kHz and do some math I wouldn’t be surprised if it comes out  
to  
be a factor of 8 different.

3. Imagine an even simpler case with just a sine wave. You have a sine  
wave  
of 1kHz at complex baseband going in to an upconverter (imagine this as  
multiplying your signal by an oscillator at your center frequency). What  
would you expect on the scope? If you don’t know, then do the math; it’s  
fairly simple trig.

Good luck,  
Nathan

---

<div class="post-metadata">

**Author:** ![Jeon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e8c25b/32.png) [@Jeon](https://www.ruby-forum.com/u/Jeon)\
**Post date:** [June 25, 2015, 5:02pm UTC](https://www.ruby-forum.com/t/usrp-rf-output-frequency-is-much-faster-than-intended/242468/4 "2015-06-25T17:02:51Z")

</div>

Dear all, Mleech, Marcus and Nathan

Thanks for all your advices.

I’ve set the samp\_rate to 250k and it works perfectly.

Marcus,

I’ve checked your answer on USRP users mailing list a few minutes ago.  
Some settings were set wrong, so the mail was not delivered to me.  
Sorry for late.

Nathan,

LFTX and LFRX can use center frequnecy of 0 Hz (maybe…) which are  
what I  
am using now.

Regards,  
Jeon.

2015-06-25 22:58 GMT+09:00 West, Nathan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
