Você está na página 1de 3

Gnuradio part 1

Main Menu
Welcome
SDR Radio
Gnuradio
Gnuradio part 1
Upcoming Projects
Guestbook
Links
finger

Hits: 5038

Gnuradio ? Where to begin ? Trying to understand the basics to begin making a software radio ?
Perhaps I can help you with the very basics, as I've searched the internet for the basic knowlegde to set
up something that would actually produce some sound, and get some signals through. I wouldn't say that I
wasn't able to find anything on the internet, but the websitesI found,was just over my initially state of
understanding of gnu radio. Thatis why I write this small toturial to try and help you to get a basic
understanding of how to set up your first radio. After that,if you got the idea, then you have the
basicradio to continue to build on.
I will in this example use a simple setup using the rtl2832u as the hardware.
The beginning.
We need to know where to find our blocks in Gnuradio Companion, or GRC. They are placed to theright on
your screen and are expanding menues with a lot to get lost in at first.
And it looks like this :

To begin with, we needan input source block, thisis the block that control
our hardware device, or audio inputfrom the soundcard.
There are different parameters tobe set. And all of these settings are
depending on your hardware or soundcard.
Let's take a look at one of these blocks.
The OSMOSDR SourceBlock
The OsmoSDR SourceBlock is foundunderSources. Itdoes control the
rtl2832u chipsset along with others.
Most of the rtl2832u can operate at a sample rate of 2.8MHz and at VHF, 145
MHz thisgivesall of the bandwidth of the band.
The source block looks like this :

Sample Rate (sps): 2.8M specifies the bandwith that the hardware, in this
case the rtl2832u can handle. 2.8MHz can be put in the field as 2800000 or in
math terms 2.8e6.
Ch0: Frequency(Hz):145M does here mean that we will center the band at
145MHz, nothing special or even surpricing in that.
Ch0: Freq. Corr. (ppm):-70 here we will set the difference from the actual
hardware frequency to the frequency that we do see in our gnuradio. The reason for this is, that the

http://www.oz2da.dk/index.php/gnuradio/part1[4/2/2015 2:10:51 AM]

Gnuradio part 1

hardware isn't always spot-on the frequence. Small differences in the components may differ a little,
making the frequency a little off. This is corrected here.In this case my rtl2832u is a little high in
frequency andI have to pull itback a littleto make it fit the actual "real life" frequency.
Ch0: Gain Mode: Auto can be set to Auto or Manual, by manual we do configurethe gain in our
hardware our self, and then the next two inputs has to be set by us. Usingthe Auto mode the block does
the job for us.
Ch0: Gain (dB):0 since I use Auto it doesn't matter, but ifyou want to control it yourself by choosing
manual in the last step, then you need to know what your hardware devicecan handle. This can inLinux
Terminal be concluded by using the command: rtl_test, this will bringyou a list of what frequencies that
are available.
Ch0: IF Gain (dB): 15 are the same as the last step, except that this controls the IF gain.

Lets move on to the next block


We need a filter. An in most cases a Low Pass Filter will do. It's first when we begin to make SSB radios
that we start using other kinds of filters. Let me just make one thing clear, this filter is not to be thought of
as a normal low pass filter in the input of a ordinary radio. This filter will makea filter "around" your center
frequency and cut off at the desired range you set it to.
Let's take a look at the Low Pass Filter block :
I'll explain this block a bit different than the source block, as I'll
jumb a little, and not taking it for the top down.
The Sample Rate: 2.8M, is the same as in the Source block,
nothing has changed here yet.
We have Decimation: 8 this doesn't have to fit your needs.
The Decimation is a divider, what happens is that your sample rate
are devided by the decimation. Soin this block your Sample Rate
will not be 2.8MHz anymore, it will be 350kHz.
Gain:1 are set as default, it can be raised, but there might not be a reason to do that.
Cutoff Freq: 5k I have here chosen to set the cutoff frequency to 5kHz. Play around with this and see
what it does to your filter.
Transition Width: 8k I have here chosen to set my transistion with to 8kHz, again play around with this
value to see what it does to your filter.
Window: Hamming The Window is where you choose what kind of filter that you want, there are several
to choose from, some like others better, and some might work better on other types of radios you'll later
build.
Beta: 6.76 The filter edition.

Moving on to the demodulator.


In this example I've chosen to use the Narrow BandFM filter, also known as NBFM filter. I looks like this:
Again I'll jumb in this, as I'll start with the Quadrature Rate: The
Quadrature Rate are here 350kHz. As you just have read above in
the Low Pass Filter block, it used a divider to reduce the signal to
350kHz, and this is the value we set in the Quadrature Rate. This
is importent to remember as this will give the NBFM Receive
Demodulator the right value to work with.
Audio Rate: 35kHz is another credical number, as Quadrature
Rate devided by Audio Rate should give a whole number. This will
make it easier for your computer to calculate, use less memory.
And if these numbers doesn't add up you risk that you won't get
any sound at all.
Tau: 75u I have no idea about this number yet, but I'm sure I'll find out.
Max Deviation: 12.5kHz well, your signal can be a bit off and will still be demodulated.

Next Block
Since you probably doesn't have a soundcard that are happy about working with 35kHz audio, we
somehow have to get the demodulated signal up to a frequency that your soundcard will accept. Most
soundcards will accept without problems 48 kHz.

http://www.oz2da.dk/index.php/gnuradio/part1[4/2/2015 2:10:51 AM]

Gnuradio part 1

Here we will be able to use a block called a Rational Resampler.


The Rational Resampler takes the values from the Audio Rate in the
NBFM Demodulator and devides it with the value put in to
Decimation.
The Audio Rate is here 35kHz, and I've chosen to put the value of
35 into Decimation. In math it'll be 35 kHz devided by 35 = 1kHz.
That is the result of this.
Interpolation: 48will then take my 1 kHz and multiply it by 48 as
I've typed in. Which will turn up and be 48 kHz and that is a usable
frequency for your soundcard.

The Last Block in this puzzle is the audio sink. This is what makes you frequency move to the soundcard,
where you will be able to hear sound. The block looks like this and are found under Sinks.
You set your Sample Rate to 48 KHz since it's what your soundcard can
accept and play.
Device Name: is dependent on which Linux version you use. If you use the
latest Linux you have to set the device name to pulse since this is what
your driver for your soundcard will be named.

I've now tried to tell you how to make the beginning of a very simple narrow band fm receiver in gnuradio.
I will ofcourse show you how it will look put together as a last picture in this perhaps part 1 out of many.
The whole sequence of blocks looks like this :

Hope to see you on these pages again.

Copyright 2012. All Rights Reserved.


designed from atjoomla.com

http://www.oz2da.dk/index.php/gnuradio/part1[4/2/2015 2:10:51 AM]

Você também pode gostar