In GRC I would like to combine the outputs of several NBFM modulator
blocks to drive a USRP sink. The idea is to output several discrete
channels within the USRP transmit bandwidth, e.g., three signal channels
at -30 kHz, 0 kHz, and +30 kHz offset from the USRP tune frequency.
I’d appreciate suggestions on how best to accomplish this.
Thanks,
John
On 21/06/2011 9:28 AM, John Ackermann N8UR wrote:
In GRC I would like to combine the outputs of several NBFM modulator blocks to
drive a USRP sink. The idea is to output several discrete channels within the
USRP transmit bandwidth, e.g., three signal channels at -30 kHz, 0 kHz, and +30
kHz offset from the USRP tune frequency.
I’d appreciate suggestions on how best to accomplish this.
Thanks,
John
Use a frequency translating FIR filter on all the modulator outputs, and
then just additively combine them prior to presentation
to the USRP.
On Tue, Jun 21, 2011 at 3:28 PM, John Ackermann N8UR [email protected]
wrote:
In GRC I would like to combine the outputs of several NBFM modulator blocks
to drive a USRP sink. The idea is to output several discrete channels
within the USRP transmit bandwidth, e.g., three signal channels at -30 kHz,
0 kHz, and +30 kHz offset from the USRP tune frequency.
I’d appreciate suggestions on how best to accomplish this.
I think there is an example to do exactly this in Python but you can
also do
it in GRC:
(1) multiply the output of each modulator with a complex number
corresponding to the offset from center
(2) add all channels together
Alex
On 06/21/2011 06:28 AM, John Ackermann N8UR wrote:
In GRC I would like to combine the outputs of several NBFM modulator
blocks to drive a USRP sink. The idea is to output several discrete
channels within the USRP transmit bandwidth, e.g., three signal
channels at -30 kHz, 0 kHz, and +30 kHz offset from the USRP tune
frequency.
I’d appreciate suggestions on how best to accomplish this.
If you are going to be doing more than 5 or so channels and the sample
rate is a multiple of the channel spacing it may be more computationally
efficient to use the synthesis filterbank.
Matt
In GRC I would like to combine the outputs of several NBFM modulator
blocks to drive a USRP sink. The idea is to output several discrete
channels within the USRP transmit bandwidth, e.g., three signal
channels at -30 kHz, 0 kHz, and +30 kHz offset from the USRP tune
frequency.
As was already mentioned, this can be done by mixing each of of the NBFM
streams with an appropriate complex carrier offset, then adding them
together to get the final TX baseband stream.
Close attention must be paid to amplitudes, spectral bandwidth, and
sample rates to make this work. The final baseband stream must have a
high enough sample rate to accommodate the total number of channels, and
must also be acceptable as an input sample rate to the TX USRP. The
most general way would be to upsample each NBFM stream to the final
baseband sample rate and then multiply it by a complex carrier generated
at that sample rate. If you have a lot of channels, this can be CPU
intensive, but it allows you to generate your final baseband with the
individual channels at arbitrary spacings.
Some tricks exist to lower CPU requirements using multi-rate
upconversion if the channel spacings have fixed offsets. Also, as the
number of channels increases, at some point it is more efficient to
switch to a synthesis filterbank structure.
The output of the frequency modulators will be [-1.0,1.0]. The
resampling and summing blocks will affect this; the final baseband
output must be scaled to be appropriate as input to the USRP sink. This
means that the TX power of the USRP will be divided among the channels
and any individual channel will only achieve a fraction of the USRP
output power.
Finally, while a single NBFM channel is constant amplitude and can drive
the USRP in its non-linear output power range, the above mix of channels
is not constant amplitude, and the output power must be backed off
from maximum until the IMD from cross-channel mixing is reduced to
acceptable levels.
Johnathan
On Tue, Jun 21, 2011 at 4:08 PM, Alexandru C. [email protected]
wrote:
I think there is an example to do exactly this in Python but you can also
do it in GRC:
(1) multiply the output of each modulator with a complex number
corresponding to the offset from center
(2) add all channels together
Sorry, I meant multiply with a complex sine or cosine wave of frequency
f,
where f is the offset.
Marcus suggested using filters, which will also work but it’s a bit
overkill
for a simple translation, isn’t it?
Alex
On Tue, Jun 21, 2011 at 09:05, Alexandru C. [email protected] wrote:
Marcus suggested using filters, which will also work but it’s a bit
overkill for a simple translation, isn’t it?
That depends on the sample rate of the original NBFM stream. Likely, it
is
only high enough for its own bandwith. If you want to generate a
frequency
offset, you need to interpolate it to a rate high enough to allow
frequency
content at that offset. If you interpolate, then you need an
interpolation
filter 
Johnathan
On 21/06/2011 12:05 PM, Alexandru C. wrote
Sorry, I meant multiply with a complex sine or cosine wave of
frequency f, where f is the offset.
Marcus suggested using filters, which will also work but it’s a bit
overkill for a simple translation, isn’t it?
Alex
Yes, it’s overkill, but I thought it might be the simplest “form” to get
working first.
Thanks, all, for the replies.
For my simple test case, I’m trying just two modulators with a frequency
translating FIR following each, one set to 0 Hz and the other to +25kHz.
I set the NBFM modulator quadrature outputs to 128ksps, then add them
together and feed to the USRP at 256ksps. (At this point, I’m not
worrying about gain setting; I know I need to address that but wanted to
get the basic flow correct first.)
When I run the program I get this error:
UHD Warning:
The hardware does not support the requested TX sample rate:
Target sample rate: 0.256000 MSps
Actual sample rate: 0.255102 MSps
Since I’m summing two 128ksps streams, I thought I’d get a 256ksps
stream at the output of the adder. Where are these 898 samples per
second disappearing? And how do I correct that? (The single channel
version of the program, with the NBFM quadrature rate set directly to
256ksps, worked fine.)
Thanks,
John
Marcus D. Leech said the following on 06/21/2011 12:33 PM:
On Jun 21, 2011, at 4:08 PM, Nick F. [email protected] wrote:
Couple of things. First of all, when you add two signals together, you
don’t add the sample rates. Two 256ksps streams added together still
result in a single 256ksps stream. Second, 256ksps is not a factor of
100Msps, so the USRP2 picks the closest available valid rate, which is
100e6/392=255.102ksps. You might have better luck using a sample rate
which is natively supported. Try 250ksps.
–n
Thanks, Nick. I missed the sample rate factor because I was thinking of
USRP1. I’ll fix that and the fallacy of adding rates, and try again.
Thanks,
John
On 06/21/2011 04:40 PM, John Ackermann N8UR wrote:
Thanks, Nick. I missed the sample rate factor because I was thinking of USRP1.
I’ll fix that and the fallacy of adding rates, and try again.
Thanks,
John
I have an example, in GRC, attached.
It uses an audio source, which is common to all three modulators, this
goes to a fractional interpolator to interpolate up to the basic
sample rate of 200Ksps, which is an integral divisor of 100Msps.
I don’t actually send it to a USRP2, but you can see the basic
structure, with complex multipliers acting as mixers, and a pair of
30Khz signal sources, sampled at the 200Ksps sample rate, one set for
30KHz, the other set for -30KHz. An FFT display shows
you the composite spectrum.
The bandwidth of the modulators is set by changing the “sensitivity”
parameter.
Marcus D. Leech said the following on 06/21/2011 07:54 PM:
I have an example, in GRC, attached.
It uses an audio source, which is common to all three modulators, this
goes to a fractional interpolator to interpolate up to the basic
sample rate of 200Ksps, which is an integral divisor of 100Msps.
After a couple of days away, I’m able to get back to this. Thanks very
much, Marcus, for the example. It perfectly shows how to do what I want
– it’s amazing how a block diagram coupled with a very few words can
explain a concept. GRC is a wonderful thing!
The project might be of some interest to the ham radio folks in the
group. I thought it would be a very neat demo of SDR capabilities to
program a multi-channel repeater using USRP. The final version will
have 4 NBFM input channels on the 2m ham band, mapped to 4 NBFM output
channels on the 70cm band (going crossband hugely simplifies the RF
plumbing issues).
I’m not actually putting this on the air, but plan to show it at local
ham radio club meetings as a demo of what you can do with SDR beyond the
paradigm of the traditional HF transceiver using PowerSDR. In a live
demo, it’ll be fun to play with the flow graph to show how truly
definable an SDR is. I’ll put the .grc and .py files on line once it’s
working to my satisfaction.
Next project after this is a linear transponder similar to that used on
the ham satellites, translating all the signals in a chunk of bandwidth
from one frequency range to another.
John
Hey John,
On 24/06/11 15:06, John Ackermann N8UR wrote:
– it’s amazing how a block diagram coupled with a very few words can
explain a concept. GRC is a wonderful thing!
The project might be of some interest to the ham radio folks in the
group. I thought it would be a very neat demo of SDR capabilities to
program a multi-channel repeater using USRP. The final version will
have 4 NBFM input channels on the 2m ham band, mapped to 4 NBFM output
channels on the 70cm band (going crossband hugely simplifies the RF
plumbing issues).
I’d be very interested - esp if you are planning on doing it in GRC.
I’ve been toying with a two-way (“Talk-Thru”) version myself (IE listen
on 2 and 70, (re)transmit on 2 when we get a carrier on 70, and vice
versa) for RAYNET use
73s
Iain
On Tue, 2011-06-21 at 15:54 -0400, John Ackermann N8UR wrote:
When I run the program I get this error:
256ksps, worked fine.)
Couple of things. First of all, when you add two signals together, you
don’t add the sample rates. Two 256ksps streams added together still
result in a single 256ksps stream. Second, 256ksps is not a factor of
100Msps, so the USRP2 picks the closest available valid rate, which is
100e6/392=255.102ksps. You might have better luck using a sample rate
which is natively supported. Try 250ksps.
–n