Hi Andrew,
yes you certainly can, but "GNU Radio is like a spectrum
analyzer" isn't really true – think of GNU Radio itself rather as
a big box of nice building blocks to put together one software
spectrum analyzer, or a DVB-T transmitter, or a radar, or…
What you can do, for example, is for starters:
1. Use the "noise source" block to generate digital noise, let's
say of variance 0.3.
2. use a "low pass filter" block with cutoff = sampling rate/8.0,
transition width sampling rate/24.0, and put it behind your noise
source. Look at what a Qt GUI frequency sink shows you: the noise
you're producing now occupies roughly one third of your bandwidth,
right? (one fourth in its 3dB bandwidth, and if you count from it
disappearing in total irrelevance to total irrelevance; the good
ol' problem of defining what bandwidth actually is)
That's because we have to think about the low-pass being
symmetric, so it lets through -sampling rate/8 to +sampling
rate/8, so that's 1/4 of the sampling rate in bandwidth. Add 2/24
of transition between passthrough and stop band, you end up with
1/3.
3. We want to move that noise band away from 0 to the lower or
upper side band. Why? Because the HackRF leaks its LO, and you'd
basically very much get into trouble if you need to calibrate that
away, so let's keep our signals away from 0, which is the baseband
frequency that the HackRF mixes to the LO frequency. So, let's put
it smack in the middle of the upper side band. We again do that
frequency shift with...
4. the rotator block! So, we shift the frequency by one fourth of
the sampling rate. So, that means, we need to go 2*pi/4 forward in
phase per sample. That's roughly 1.57 for the phase increment
field!
5. Check with the frequency sink: you should now have a nice noise
plateau in the upper side band.
6. use an osmocom Sink to talk to the HackRF; set it to some
frequency let's say 1 MHz below the frequency you want to first
characterize your filter at. Run it at let's say 2MS/s sampling
rate. That means your HackRF now is able to define a 2 MHz swath
of spectrum on RF – half the sampling rate below the frequency you
set it to, half the sampling rate above. And we now what will be
in the upper half: our noise! Connect the Hackrf in loopback to
our RTL dongle; don't use much gain in either, or a strong
attenuator – the signals in loopback are "screamingly loud", and
we don't want to deafen the RTL receiver or even kill it!
7. Use an osmocom source to bring in our RTL dongle. Set it to
2MS/s, set it to the same frequency as the HackRF.
8. Now, we first rotate the receive signal back, so that the
noise will be centered around 0 again; so copy the "rotator"
block, and just add a "-" in front of the phase increase; check
with the frequency sink!
9. Next, we get rid of the LO leakages: copy just the same
Low-pass filter, and add it behind our rotator. LO be gone!
10. So, now we convert the complex noise to digital power – use
the "complex to Mag^2" block.
11. We don't care about the individual sample noise power. So we
add yet another low-pass filter – in this case, one with a cutoff
of maybe 1/100.0 of the sampling rate, and a decimation of 100.
now, we only get one output power sample per every 100 received
samples; that still means 10kS/s, but that's enough to put into a
time sink!
Now, compare direct loopback cable digital power at any frequency
to the value you get behind your filter – since neither the RTL
dongle nor the HackRF are calibrated, you need to know how much
you get without the filter, first, to calibrate the digital
receive power.
Hope I made that approach clear!
Marcus
On 10/27/2017 05:54 PM, Andrew Rich
wrote:
Can I ask a silly question
Can you use gnu radio as a filter
sweeper
Perhaps hack rf sig gen in harmony
with rtl sdr to sweep a filter or preamp for gain response
Since gnu radio is like a spectrum
analyser
Andrew
Sent from my iPhone
If you want to first manually correct, add a Qt GUI Range
block, give it the ID "dopplercorrection", and allow a start
and stop of +- what you expect. Set the default value to
zero.
Then, add a "rotator" block, and put in the "Phase
Increment" field the value you want to advance the phase of
every sample. In fact, that means that you want to put in
"-dopplercorrection/sampling rate" there.
I made a quick toy example:
<dopplercorrection.grc.png>
In fact, the correcting part of a PLL pretty much does the
same, mathematically, ideally.
Now, I'm not 100% familiar with the nature of packet radio,
but in the end, you want automatic doppler tracking – so, you
typically do stuff like using a "band-edge FLL" block to
roughly bring the signal's spectral power to the center of
your baseband, then –if necessary– you'd probably try to use
the structure of the packet to get finer frequency
information, to correct the rest.
Best regards,
Marcus
On 2017-10-27 16:04, Andrew Rich
wrote:
I am up to the stage of adding fft and scope sinks and resamplers and sliders
Need to explore the blocks
Curious about doppler correction
Andrew
Sent from my iPhone
On 27 Oct 2017, at 11:35 pm, Marcus Müller <address@hidden> wrote:
Glad you're getting engaged with SDR, and especially GNU Radio!
So, if you're completely new to GNU Radio, I'd recommend the "official Guided Tutorials":
http://tutorials.gnuradio.org
They start out rather smooth, and you can "stop" at any point (e.g. if you don't actually want to learn how to write your own C++ block, read only the chapters before that happens), and you'll get a pretty good idea of how things fall into place. Generally, feel free to ask here, or on IRC, or Slack, whatever feels nicest to you :)
Best regards,
Marcus
On 2017-10-27 14:19, Andrew Rich wrote:
Thanks Marcus
I can now start learning gnu radio
Andrew
Sent from my iPhone
On 27 Oct 2017, at 10:09 pm, Marcus Müller <address@hidden> wrote:
Hi Andrew,
most SDR devices are most easily usable in GNU Radio with the "Osmocom Source" block, contained in gr-osmosdr.
BUT: to get an gr-osmosdr with the AirSpy driver, you need to, in this order
1. Install GNU Radio and libairspy
2. build gr-osmosdr from source (Do NOT install it as binary package)
You get libairspy from [1].
Best regards,
Marcus
[1] https://github.com/airspy/airspyone_host
On 2017-10-27 11:16, Andrew Rich wrote:
Hello
Can some one tell me please what I need to do to use my AirSpy Mini as a source in GRC.
What do I need to install ?
The only other SDR I have is RTL-SDR and HackRF and Funcube Dongle
Want to start learning packet radio
Andrew Rich VK4TEC
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
|