# Setting the DSP frequency in the UHD blocks

**URL:** <https://www.ruby-forum.com/t/setting-the-dsp-frequency-in-the-uhd-blocks/235578>\
**Category:** GNU Radio\
**Created:** [July 1, 2013, 8:01pm UTC](https://www.ruby-forum.com/t/setting-the-dsp-frequency-in-the-uhd-blocks/235578 "2013-07-01T20:01:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 1, 2013, 8:01pm UTC](https://www.ruby-forum.com/t/setting-the-dsp-frequency-in-the-uhd-blocks/235578/1 "2013-07-01T20:01:01Z")

</div>

In gnu radio companion for a UHD block, how do I set the DSP frequency  
as well as the RF frequency. I have done this in my C code which  
doesn’t use gnuradio using the tune\_request\_t structure. From the  
comments in the python code, it appears that there is some way to do it.

I understand that I want to use the DSP LO so that the DC component from  
the ADC is moved outside the baseband. Is there a good value or is  
anything outside my receive bandwidth is ok?

Is there a reason to use the DSP LO on the transmit side? Does the up  
conversion happen before or after the DSP LO?

Thanks,  
Frank Wallace

---

<div class="post-metadata">

**Author:** ![WallaceS\_Frank\_L\_CI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/dbc845/32.png) [@WallaceS\_Frank\_L\_CI](https://www.ruby-forum.com/u/WallaceS_Frank_L_CI)\
**Post date:** [July 1, 2013, 8:31pm UTC](https://www.ruby-forum.com/t/setting-the-dsp-frequency-in-the-uhd-blocks/235578/2 "2013-07-01T20:31:24Z")

</div>

> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)  
> There’s a uhd “helper function” that gets imported to allow you to do  
> this:

Where the UHD block takes frequency, you can replace it with:

uhd.tune\_request (target\_freq, lo\_ffset)

The RF upconversion happens after the DSP on the TX side. It may be  
beneficial to move the LO on the TX side as well.

---

<div class="post-metadata">

**Author:** ![WallaceS\_Frank\_L\_CI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/dbc845/32.png) [@WallaceS\_Frank\_L\_CI](https://www.ruby-forum.com/u/WallaceS_Frank_L_CI)\
**Post date:** [July 1, 2013, 8:48pm UTC](https://www.ruby-forum.com/t/setting-the-dsp-frequency-in-the-uhd-blocks/235578/3 "2013-07-01T20:48:21Z")

</div>

Hi Frank,

Use the following line as the frequency variable for the ‘UHD Source’ &  
‘UHD Sink’ blocks in GRC:

uhd.tune\_request(center\_freq,  
rf\_freq=(center\_freq+lo\_offset),rf\_freq\_policy=uhd.tune\_request.POLICY\_MANUAL)

Where ‘center\_freq’ and ‘lo\_freq’ are variables which need to be  
defined.

Using the lo\_offset on the TX side prevents local oscilator leakage on  
the  
TX frequency, to prevent giving the false impression that it is  
transmitting after stopping the flowgraph.

Regards,

Mike

–  
Mike J. M0MIK BSc MIET  
Email: removed\_email\_address@domain.invalid  
Web: [http://scanoo.com](http://scanoo.com)

On Mon, Jul 1, 2013 at 6:38 PM, Wallace, Frank L CIV NSWCDD, Q41 \<
