# Real Signal to I/Q Samples

**URL:** <https://www.ruby-forum.com/t/real-signal-to-i-q-samples/208583>\
**Category:** GNU Radio\
**Created:** [June 21, 2011, 11:39pm UTC](https://www.ruby-forum.com/t/real-signal-to-i-q-samples/208583 "2011-06-21T23:39:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 21, 2011, 11:39pm UTC](https://www.ruby-forum.com/t/real-signal-to-i-q-samples/208583/1 "2011-06-21T23:39:12Z")

</div>

Hello all, I am helping a colleague with the USRP center frequency  
tuning functionality and it is my understanding the signal must contain  
I and Q values centered at 0Hz.

A real valued signal is generated independently by another program and  
is fed to a GRC script. Is it easy/possible to make a GRC script  
downshift the signal to 0 Hz and convert to I and Q values or is there  
perhaps an example of this already?

Thank you in advance- Tom

---

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [June 22, 2011, 1:58am UTC](https://www.ruby-forum.com/t/real-signal-to-i-q-samples/208583/2 "2011-06-22T01:58:29Z")

</div>

On 06/21/2011 05:33 PM, Tom H. wrote:

> 

You can use a Hilbert transform to turn it into a complex-valued signal.

You can then mix it using a complex signal source and a multipler to  
downshift it.

---

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [June 22, 2011, 3:16am UTC](https://www.ruby-forum.com/t/real-signal-to-i-q-samples/208583/3 "2011-06-22T03:16:49Z")

</div>

Thank you Marcus,

For the reverse process what would I use to go from I and Q samples with  
the USRP tuned to a real signal at the proper center frequency?

I’m  
guessing the signal should remain in complex form and be upshifted  
using a multiplier, and then some transform (not sure which one in GRC)

Thank you again! - Tom

— On Tue, 6/21/11, Marcus D. Leech [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

From: Marcus D. Leech [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Discuss-gnuradio] Real Signal to I/Q Samples  
To: removed\_email\_address@domain.invalid  
Date: Tuesday, June 21, 2011, 11:56 PM

On 06/21/2011 05:33 PM, Tom H. wrote:

```
        Hello all, I am
          helping a colleague with the USRP center frequency tuning
          functionality and it is my understanding the signal must
          contain I and Q values centered at 0Hz.

          A real valued signal is generated independently by another
          program and is fed to a GRC script. Is it easy/possible
          to make a GRC script downshift the signal to 0 Hz and
          convert to I and Q values or is there perhaps an example
          of this already?

          Thank you in advance- Tom

You can use a Hilbert transform to turn it into a complex-valued
signal.

You can then mix it using a complex signal source and a multipler to
downshift it.

--

```

Marcus L.  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org/)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

-----Inline Attachment Follows-----

---

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [June 22, 2011, 3:23am UTC](https://www.ruby-forum.com/t/real-signal-to-i-q-samples/208583/4 "2011-06-22T03:23:36Z")

</div>

On 06/21/2011 05:33 PM, Tom H. wrote:

> 

I’ve attached an example that uses a narrow-band, real-only signal  
source, with everything running at an arbitrary sample rate of 150Ksps.

It uses a Hilbert transform, followed by a decimate-by-two bandpass  
filter.

Without the bandpass filter, there will still be a residual “image”  
frequency in the complex output of the Hilbert transform, and since  
we’re  
decimating by two anyway, I thought I’d put in a bandpass filter.
