GNURadio and USRP2: Unterschied zwischen den Versionen

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche
(New page: 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. ...)
 
 
(70 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 
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.  
 
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.  
  
[[Image:usrp2.jpg|400px]]
+
I was literally shaken by the following video where this guy demonstrates that a software defined transceiver is able to act as a GSM base station. This made me understand that we're currently leaving the age where transceivers were built and we're entering the age where transceivers will be written in code. We're currently experiencing nothing less but the rise of a new technological basis for all types of wireless communication. Everything will change.  
  
== Scope ==
+
* http://www.youtube.com/watch?v=o6aKuDSg_CQ
=== 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
+
The USRP platform is being used by research departments worldwide, so I decided that it was a good investment that allows me to keep up with the developments that are currently being made.
 +
 
 +
 
 +
== Scope: 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.  
 +
 
 +
[[Image:usrp2.jpg|400px]] [[Image:usrp2-open-noboards.jpg|400px]] [[Image:usrp2-open-lfrx.jpg|400px]]
 +
 
 +
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
 
  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  
 
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
 
  usrp2_fft.py
and it gave me a wonderful spectrum scope of short wave frequencies.  
+
and it gave me a wonderful spectrum scope of short wave frequencies.
[[Image:usrp2-fft.jpg|400px]]
 
  
 +
== Projects ==
  
 
=== Receive the first signal ===
 
=== 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!
 +
 +
[[Image:usrp2-fft.jpg|400px]]
 +
 +
* 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.
  
 
=== Transmit the first signal ===
 
=== 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
 +
 +
Status: confirmed, works!
 +
 +
=== Transmit a AM signal ===
 +
Amplitude Modulation is the simplemost signal that you can generate. Here it comes:
 +
 +
[[Image:GnuRadio_USRP2_AM_TRX.jpg|400px]]
 +
 +
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.
 +
 +
[[Media:USRP2_AM_TX.grc]]
 +
 +
Status: confirmed, works!
 +
 +
=== Receive an AM singnal ===
 +
Here's my AM receiver. I constructed it with the help of these fantastic tutorials from Professor Sharlene Katz, WB6FFE, from California State University:
 +
 +
* 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:
 +
 +
[[Image:GnuRadio_USRP2_AM_RX.jpg|400px]]
 +
 +
* [[Media:USRP2_AM_RX.grc]]
 +
 +
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.
 +
 +
Status: confirmed, works!
 +
 +
=== Receive a Narrowband FM signal ===
 +
We're getting more complex. The below given flowgraph comes from Alexandru Csete OZ9AEC:
 +
 +
* http://www.oz9aec.net/index.php/gnu-radio/grc-examples
 +
 +
[[Image:GnuRadio_USRP2_FM_narrowbandRX.jpg|400px]]
 +
 +
Status: confirmed, works!
 +
 +
=== Receive a Narrowband FM signal (2) ===
 +
The following example implements a complex narrowband FM receiver from Alex Csete, with the modification that it works with the USRP2:
 +
 +
[[Image:USRP2_FM_narrowbandRX_Csete2.jpg|400px]]
 +
 +
I modified the original flowgraph so that it works with the USRP2 but I also changed it to work on the 70cm band.
 +
 +
* [[Media:USRP2_FM_narrowbandRX_Csete2.grc]]
 +
 +
Status: confirmed, works!
 +
 +
=== Receive a Wideband FM signal ===
 +
Michel Barbeau provides a good FM radio receiver code on his website:
 +
 +
* http://people.scs.carleton.ca/~barbeau/SDR/Python/radio.py
 +
 +
I have modified it so that it works for my scenario here in Munich with Radio Energy 93.3 and my sound card with a sampling rate of 44.1 Kilosamples/Second
 +
 +
* [[Media:usrp2_WBFM_933.py]]
 +
 +
Status: confirmed, works!
 +
 +
=== Update the SD card so that the USRP2 and the WBX board work together ===
 +
In order to make the USRP2 work with the WBX board, I needed to update the firmware on the SD card.
 +
 +
Here is how I did it.
 +
 +
* First download the u2_flash_tool.py:
 +
** [[Media:u2_flash_tool.py]]
 +
* Then download the most recent FPGA firmware and the most recent U2 code from here:
 +
** http://code.ettus.com/redmine/ettus/projects/public/wiki/U2binaries
 +
** Be sure to download the "RAW Ethernet" FPGA image and the "Raw Ethernet, with WBX" Firmware image.
 +
* Then execute the following commands (here as root)
 +
u2_flash_tool.py --dev=/dev/XXXX -t s/w Download/firmware-txrx.bin -w
 +
u2_flash_tool.py --dev=/dev/XXXX -t fpga Download/u2_rev3.bin -w
 +
* That's it.
 +
 +
I did this in the SD card that came with the USRP2 from Ettus.
 +
 +
=== LSB transmitter using complex band pass filter ===
 +
The below given transmitter scheme originates from Alexandru Csete OZ9AEC but contains my modification so that it works with the USRP2:
 +
 +
[[Image:USRP2_LSB_TX_Complex_Bandpass.jpg|400px]]
 +
 +
* [[Media:USRP2_LSB_TX_Complex_Bandpass.grc]]
 +
 +
Status: confirmed, works
 +
 +
=== Transmit a simple FM signal ===
 +
The below example will be highly illegal in Germany, but I have not tried it out. The below flowgraph is taken from here:
 +
 +
* http://opendigitalradio.org/
 +
 +
[[Image:GnuRadio_USRP2_FM_TRX.jpg|400px]]
 +
 +
Status: confirmed, works. verified in the 70cm Amateur radio band.
 +
 +
=== Transmit a Narrowband FM signal ===
 +
 +
I tried this myself in the 70cm band:
 +
 +
[[Image:GnuRadio_USRP2_NBFM_TRX.jpg|400px]]
 +
 +
The first multiply block regulates the AF sensitivity and the second block regulates the transmit power.
 +
 +
* [[Media:usrp2_nbfm_tx.grc]]
 +
 +
Status: confirmed, works
 +
 +
=== Transmit a complex (stereo) FM signal ===
 +
 +
Since the below given flowgraph will also be rather illegal in Germany, I will just document it and not comment on it :-)
 +
 +
[[Image:GnuRadio_USRP2_FM_stereo_TX.jpg|400px]]
 +
 +
=== Transmit a SSB signal ===
 +
SSB signals are really rather complex. We need to eliminate one carrier and one sideband. Here is how it works:
 +
 +
[[Image:GnuRadio_USRP2_SSB_TX.jpg|400px]]
 +
 +
Status: unconfirmed, but looks good
 +
 +
=== Receive a SSB signal ===
 +
The below example comes from here:
 +
 +
* https://github.com/csete/gnuradio-grc-examples/raw/master/receiver/ssb_rx.grc
 +
 +
It has not yet been tested but has been adapted to the requirements of the USRP2:
 +
 +
[[Image:GnuRadio_USRP2_SSB_RX.jpg|400px]]
 +
 +
* [[Media:uspr2_ssb_rx_v05_LF_bin.grc]] A SSB receiver also from Alex Csete OZ9AEC
 +
 +
=== Transmit a D-ATV signal ===
 +
I haven't tried this yet but here's a report in a British forum that reports that soneone has generated a D-ATV signal with the USRP:
 +
 +
* http://www.batc.org.uk/forum/viewtopic.php?f=15&t=369
 +
 +
=== Transmit a Digital Video Stream ===
 +
* http://www.wu.ece.ufl.edu/projects/wirelessVideo/project/realTimeCoding/index.htm
 +
* http://www.oz9aec.net/index.php/gnu-radio/gnu-radio-blog/320-a-simple-way-to-get-video-in-and-out-of-gnu-radio
 +
 +
 +
== Links ==
 +
* http://gnuradio.wordpress.com/
 +
* http://www.funwithelectronics.com/?id=11
 +
* http://gnuradio.org/redmine/wiki/1/UsrpFAQIntroFPGA
 +
* http://james.ahlstrom.name/
 +
* http://www.oz9aec.net/index.php/gnu-radio
 +
* http://www.hs-ulm.de/opus/volltexte/2010/27/pdf/SDR_GNURadio_USRP_Feb2010.pdf Bachelor Thesis from HS Ulm on FM / GSM applications
 +
* GnuRadio - A fantastic introduction from Sharlene Katz, WB6FEE!
 +
** 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
 +
* MIT [http://ocw.mit.edu/OcwWeb/web/courses/courses/index.htm OpenCourseWare]:
 +
** [http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-450Fall-2006/CourseHome/index.htm 6.450 Principles of Digital Communications I]
 +
** [http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-451Spring-2005/CourseHome/index.htm 6.451 Principles of Digital Communication II]
 +
* [http://www.complextoreal.com/index.htm Complex2Real]: [http://www.complextoreal.com/tutorial.htm Tutorials in Communications Engineering]
 +
* http://www.snowymtn.ca/GNURadio/GNURAdioDoc-7.pdf
 +
* http://www.linuxjournal.com/article/7505
 +
* http://sourceforge.net/projects/sdr/ A complete Amateur Radio Transceiver implemented with USRP(1)
 +
* http://www.slideshare.net/csete/gnu-radio-and-the-universal-software-radio-peripheral-4889786 really cool flow graphs including analog Video mod and demod.
 +
* http://www.danielgarcia.info/thesis/ prototype frame detector that does vertical and horizontal sync detection: decode PAL / NTSC in software usind GNURadio
 +
* http://www.youtube.com/watch?v=Yc3K3bUxPW8&feature=plcp GNURADIO: GNURADIO-COMPANION part-5 (Basic filtering)
 +
* http://www.youtube.com/watch?v=Ka540X5NjwE&feature=plcp GNURADIO: GNURADIO-COMPANION part-6-1 (Significance of sampling rate in simulations)
 +
* http://www.youtube.com/watch?v=7dvw-B_CGEg&feature=plcp GNURADIO: GNURADIO-COMPANION part-6-2 (Significance of sampling rate in simulations contd.)
 +
 +
== Movies ==
 +
* more to come
 +
 +
== Communication ==
 +
* http://lists.darc.de/mailman/listinfo/sdr DARC SDR mailing list

Aktuelle Version vom 25. Juni 2012, 17:56 Uhr

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.

I was literally shaken by the following video where this guy demonstrates that a software defined transceiver is able to act as a GSM base station. This made me understand that we're currently leaving the age where transceivers were built and we're entering the age where transceivers will be written in code. We're currently experiencing nothing less but the rise of a new technological basis for all types of wireless communication. Everything will change.

The USRP platform is being used by research departments worldwide, so I decided that it was a good investment that allows me to keep up with the developments that are currently being made.


1 Scope: 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.

Usrp2.jpg Usrp2-open-noboards.jpg Usrp2-open-lfrx.jpg

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.

2 Projects

2.1 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!

Usrp2-fft.jpg

  • 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.

2.2 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

Status: confirmed, works!

2.3 Transmit a AM signal

Amplitude Modulation is the simplemost signal that you can generate. Here it comes:

GnuRadio USRP2 AM TRX.jpg

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.

Media:USRP2_AM_TX.grc

Status: confirmed, works!

2.4 Receive an AM singnal

Here's my AM receiver. I constructed it with the help of these fantastic tutorials from Professor Sharlene Katz, WB6FFE, from California State University:

That's really fantastic intraductory literature! And here it comes:

GnuRadio USRP2 AM RX.jpg

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.

Status: confirmed, works!

2.5 Receive a Narrowband FM signal

We're getting more complex. The below given flowgraph comes from Alexandru Csete OZ9AEC:

GnuRadio USRP2 FM narrowbandRX.jpg

Status: confirmed, works!

2.6 Receive a Narrowband FM signal (2)

The following example implements a complex narrowband FM receiver from Alex Csete, with the modification that it works with the USRP2:

USRP2 FM narrowbandRX Csete2.jpg

I modified the original flowgraph so that it works with the USRP2 but I also changed it to work on the 70cm band.

Status: confirmed, works!

2.7 Receive a Wideband FM signal

Michel Barbeau provides a good FM radio receiver code on his website:

I have modified it so that it works for my scenario here in Munich with Radio Energy 93.3 and my sound card with a sampling rate of 44.1 Kilosamples/Second

Status: confirmed, works!

2.8 Update the SD card so that the USRP2 and the WBX board work together

In order to make the USRP2 work with the WBX board, I needed to update the firmware on the SD card.

Here is how I did it.

u2_flash_tool.py --dev=/dev/XXXX -t s/w Download/firmware-txrx.bin -w
u2_flash_tool.py --dev=/dev/XXXX -t fpga Download/u2_rev3.bin -w
  • That's it.

I did this in the SD card that came with the USRP2 from Ettus.

2.9 LSB transmitter using complex band pass filter

The below given transmitter scheme originates from Alexandru Csete OZ9AEC but contains my modification so that it works with the USRP2:

USRP2 LSB TX Complex Bandpass.jpg

Status: confirmed, works

2.10 Transmit a simple FM signal

The below example will be highly illegal in Germany, but I have not tried it out. The below flowgraph is taken from here:

GnuRadio USRP2 FM TRX.jpg

Status: confirmed, works. verified in the 70cm Amateur radio band.

2.11 Transmit a Narrowband FM signal

I tried this myself in the 70cm band:

GnuRadio USRP2 NBFM TRX.jpg

The first multiply block regulates the AF sensitivity and the second block regulates the transmit power.

Status: confirmed, works

2.12 Transmit a complex (stereo) FM signal

Since the below given flowgraph will also be rather illegal in Germany, I will just document it and not comment on it :-)

GnuRadio USRP2 FM stereo TX.jpg

2.13 Transmit a SSB signal

SSB signals are really rather complex. We need to eliminate one carrier and one sideband. Here is how it works:

GnuRadio USRP2 SSB TX.jpg

Status: unconfirmed, but looks good

2.14 Receive a SSB signal

The below example comes from here:

It has not yet been tested but has been adapted to the requirements of the USRP2:

GnuRadio USRP2 SSB RX.jpg

2.15 Transmit a D-ATV signal

I haven't tried this yet but here's a report in a British forum that reports that soneone has generated a D-ATV signal with the USRP:

2.16 Transmit a Digital Video Stream


3 Links

4 Movies

  • more to come

5 Communication