I am using an Ettus Research B200 with GNU Radio Companion (GRC) and I would like to transmit two signals at two different frequencies simultaneously.

As a simple example, I would like to transmit a sine wave at 915 mhz and another at 916 mhz, both at the same time.

The frequencies are within 2 mhz of each other, so I would imagine that this is possible. Not having any luck messing with GRC to make this work; I'm a total noob to SDR! Which blocks do I need to use in GRC?


1 Answer 1


To transmit two signals at once, just generate the two signals with the appropriate frequency spacing between them, and add them together.

With your mentioned frequencies, you might generate the signals at −0.5 MHz and +0.5 MHz, add them together, and transmit with the hardware center frequency set to 915.5 MHz. (You don't have to use the exact midpoint, but doing so allows you to use the lowest sample rate and filter bandwidth.)

Specifically to transmit two unmodulated sine waves, in GRC:

  • Create two Signal Source blocks, complex sine, with their carrier frequencies set to -0.5e6 and 0.5e6.
  • Connect them to two inputs of an Add block.
  • Connect the output of the Add block to your (USRP) sink block with center frequency 915.5e6.

If you want to use a modulator that produces a baseband signal, you will have to take that baseband signal and frequency-shift it to the desired offset, in place of the signal source which creates the signal at any frequency.

Unfortunately, there's no block that is actually convenient for this purpose; the easiest is the "Frequency Xlating FIR Filter", which does decimation as well as shifting. Just enter 1 for the decimation, [1] for the filter taps, and it'll do the job.

The “Rotator” block does pure frequency shifting, but it needs the shift specified as a complex vector (amount of rotation per sample) so it's not convenient to use.

  • $\begingroup$ I think I had changed the "offset" value when I was trying this so it hadn't worked. Thanks so much for the quick response! $\endgroup$
    – Shrout1
    May 2, 2016 at 21:13
  • $\begingroup$ Nice answer! not convenient to use: Well, as you can imagine, I'm not 100% of that opinion, but I fully understand your point – you'd have to use some fraction that involves the desired frequency shift and the sampling rate as the phase increment. Do you think the GR project should be adding a separate "frequency shifter" block in GRC that does that calculation for you? $\endgroup$ May 22, 2016 at 11:49
  • $\begingroup$ @MarcusMüller No, not another block, because having different GRC-blocks that do exactly the same thing with different parameters would make things look more complex than they are, which is bad for learning. 2 ideas, can use either or both: 1. Static function on rotator_cc that does the calculation (good for programs, can be used from GRC). 2. GRC definition for rotator allows one to fill in freq/rate parameters. I think you can have parameters that hide or show themselves based on other params so one could have either-radians-or-frequency input based on a popup menu? $\endgroup$
    – Kevin Reid AG6YO
    May 22, 2016 at 13:43
  • $\begingroup$ @KevinReidAG6YO I like idea 2 the most – idea one is really just "give me these two values, I'll divide them for you", i.e. if you're working with the API, you should probably be aware of what a sampling rate and a phase is $\endgroup$ May 22, 2016 at 15:16
  • $\begingroup$ @MarcusMüller If it were just a division – if rotator's input were “cycles per sample” — I would agree with you, but it isn't, it's radians per sample, so you have to get a value of π in there, (2 * math.pi) * (shift / rate), which is annoying in GRC because then you need to import math or hardcode a constant. $\endgroup$
    – Kevin Reid AG6YO
    May 22, 2016 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .