GNURadio and USRP2
This project is a major masterproject which heads several smaller projects. It is my first occupation with Software Defined Radio and I am getting into this intersting field step by step.
Inhaltsverzeichnis
1 Scope
1.1 Get to know the USRP2 and get it running
- 2010-10-20 Today my USRP2 arrived. Brought to me by FedEx. Got to pay VAT but well, that's fine.
I decided to insert the LFRX receiver board first and only in order not to break the TX board for a undecent SWR. After a while I discovered that the tool
find_usrps
will identify the USRP2 when connected directly to the GBit port of my desktop computer. Well, it does. Obviously the USRP does react on network access. Now, the only thing it needs to do is to run. Therefore I tried out the tool
usrp2_fft.py
and it gave me a wonderful spectrum scope of short wave frequencies.
1.2 Receive the first signal
- 2010-10-20 The same tool as above was well suitable as a proof that my USRP2 was actually working. So I decided to tune my Kenwood TS-450S to a frequency in the 14 MHz band and keep transmitting with FM in order to generate a signal. Well, that was the result!
- 2010-10-21 Today I understood that I am missing two things to operate the WBX transceiver module: One coax cable for the TRX and the necessary firmware to drive it. Will need to get it from somewhere...
- 2010-10-22 I tried out a ssb receiver program. Worked mostly fine. The only downside is that it responded with a very strong delay. I still don't understand why.
1.3 Transmit the first signal
This experiment works exactly the other way round: I use the USRP2 as a transmitter and see if I can detect it with my Kenwood TS-450S shortwave receiver.
- 2010-11-04 Great. I can transmit. But I see that my dummy load is really closed. I didn't get any signal out.
Here are the parameters:
- Sample rate 200k
- Signal source at 1 KHz, amplitude at a minimum of 0.001 - to make sure that a bad SWR does no harm. BTW, this is a good counter check that you can really influence the output power!
- USRP2 sink: interpolation 500, frequency 14 MHz
Result: I hear a clear signal at 14.000 MHz, +/- 1 kHz
1.4 Transmit a AM signal
Amplitude Modulation is the simplemost signal that you can generate. Here it comes:
Please note that the incoming signal has a sampling rate of 44.1 kHz which equals 44100 bit per second or 44100 samples. In order to upconvert it to the 100 megasamples which are required by the FPGA, we will multiply it with a fractional figure, which we here need to indicate in reverse: 1:220507. This is factor 4.535 and gives us exactly 200000 samples per second. And these 200k samples will be interpolated by factor 500 in the USRP2 which makes 100 Megasamples.
1.5 Receive an AM singnal
Here's my AM receiver. I constructed it with the help of these tutorials:
- http://www.csun.edu/~skatz/katzpage/sdr_project/sdr/grc_tutorial1.pdf
- http://www.csun.edu/~skatz/katzpage/sdr_project/sdr/grc_tutorial2.pdf
- http://www.csun.edu/~skatz/katzpage/sdr_project/sdr/grc_tutorial3.pdf
- http://www.csun.edu/~skatz/katzpage/sdr_project/sdr/grc_tutorial4.pdf
That's really fantastic intraductory literature! And here it comes:
Note that we're using the USRP2 as a signal source, tuned to 7.100 kHz in the center of the 40m band. When I transmit a short signal, it will appear in the FFT displays and it will be audible in the speaker. There's a small delay, but that is not so serious. I want to demonstrate how it works in general. The decimation of 512 will downconvert the 100 Megasamples to 195312 samples / second.
The 256k cosine signal source multiplied upon the incoming signal will act as a VFO. Yes, my friends, that's it. This is a VFO.
After the application of the VFO shift, the signal will be downsampled by the factor of 4 to 48828 samples. Basically it is already slow enough to make it audible. In any case it is more or less slow enough to feed into a FFT. But it might make sense to apply a throttle before the FFT, because for some computers 48 kilosamples per second is still rather fast.
In order to level the volume to a reasonable degree, we here apply a ACG (Automatic Gain Control).
The demodulation will in fact be done by the Complex to Mag converter.
In order to adjust the volume, we multiply 0.5 received from a variable slider and then we do the last little resampling to feed the signal into the audio sink.
1.6 Transmit a FM signal
We're getting more complex. The below example will be highly illegal in Germany, but I have not tried it out. The below flowgraph is taken from here:
2 Links
- http://www.funwithelectronics.com/?id=11
- http://gnuradio.org/redmine/wiki/1/UsrpFAQIntroFPGA
- http://james.ahlstrom.name/
- GnuRadio - A fantastic introduction!