Documentos de Académico
Documentos de Profesional
Documentos de Cultura
The gr-bertool
Supervisors Candidate Prof. Salvatore Serrano Prof. Giuseppe Campobello Arturo Rinaldi
Department of Electronics Engineering, Chemistry and Electrical Engineering BEST School - Messina, September 2013
Radio
GNU Radio
GNU Radio is an open-source software
toolkit providing a huge library of blocks for Digital Signal Processing (DSP) written in C++ which can be combined together in order to build and develop radio applications
Gnu Radio Companion (GRC), XML Python Flow Graph (Created using the processing blocks) SWIG (Port C++ blocks to Python) GNU Radio Signal Processing Blocks (C++)
GNU Radio
GNU Radio is an open-source software
toolkit providing a huge library of blocks for Digital Signal Processing (DSP) written in C++ which can be combined together in order to build and develop radio applications
It is provided with a graphical interface
Gnu Radio Companion (GRC), XML Python Flow Graph (Created using the processing blocks) SWIG (Port C++ blocks to Python) GNU Radio Signal Processing Blocks (C++)
Signal Source
The block generates dierent kind of waveforms to be used as the main signal to transmit or as a reference one. The block is only not able to generate Sinusoidal or Costant kind of waveforms but also Square, Triangle and Saw Tooth ones. Type : complex, oat, int, short
Noise Source
The block is able to generate noise according to the Uniform, Gaussian, Laplacian and Impulse models. Please also note that the Amplitude parameter fed to the Gaussian kind of noise is the standard deviation of the Gaussian Noise, given by : = N0 2
where N0 /2 is the power spectral density of white noise (i.e. its variance). Type : complex, oat, int, short
Arturo Rinaldi - The gr-bertool
7 of 66
Operators
These blocks perform the four basic arithmetical functions over the signal sources they are fed with (sum, subtraction, multiplication and division). Please also note that they perform the operation element by element (i.e. rst element of the row rst element of the column) so the rule of thumb is to feed the inputs with equal amounts of data. Type : complex, oat, int, short
Random Source 2
The block generates a random array of unsigned integer data with values spanning from 0 to 255 (we are working with 1-byte elements !). We use it because is a more reliable source of random data compared to the one provided with the GNU Radio platform. The only parameter fed to the block is the number of samples (i.e. the length of the generated list of elements). Type : complex, oat, byte
9 of 66 Arturo Rinaldi - The gr-bertool
Random Source 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 from g n u r a d i o i m p o r t g r i m p o r t random d e f OnDataSource random ( s a m p l e s ) : src1 = [ ] f o r i in range ( samples ) : d a t a = random . r a n d i n t ( 0 , 2 5 5 ) s r c 1 . append ( d a t a ) return src1 c l a s s randomsource b ( gr . h i e r b l o c k 2 ) : def init ( s e l f , number samples ) : gr . h i e r b l o c k 2 . init ( s e l f , randomsource b , gr . i o s i g n a t u r e (0 , 0 , 0) , gr . i o s i g n a t u r e (1 , 1 , gr . s i z e o f c h a r ) ) d a t a s a m p l e s = OnDataSource random ( n u m b e r s a m p l e s ) s e l f . v e c t o r = g r . v e c t o r s o u r c e b ( d a t a s a m p l e s , True , 1 ) s e l f . connect ( s e l f . vector , s e l f )
Packed to Unpacked
The block returns sequences of packed bytes according to the integer number we set to the Bits per Chunk argument. It is possible to set the Endianness of the output sequences according to Big (MSB) or Little (LSB)a . So lets assume we have this binary sequence 11100001. If we feed it to the block well get four binary sequences, specically :
00000011 00000010 00000000 00000001
Map
We usually exploit this block every time we want to perform Gray Coding on the symbols of a digital modulation. For a 2-bit symbols modulation :
Binary to Gray sequence : [0,1,3,2] Gray to Binary sequence : [0,1,3,2]
Type : byte
Constellation Decoder - 1
It could be seem strange feeding the same coding numeric sequence when un-gray a constellation. However, this is due to how GNU Radio works and in particular how the Constellation Decoder block operates over the signal points. So, once you have assigned the correct Symbol Value Out (i.e. for a QPSK constellation is [0,1,2,3]), you have to scramble the Symbol Position values again to perform a correct decoding. You can take care of this by using a cascading link to the Map block again and feeding it with the originary coding sequence.
15 of 66 Arturo Rinaldi - The gr-bertool
Constellation Decoder - 2
Please also note that all our work is based on the old version of the gr constellation decoder block. In fact, the version we have just dealt with is the one taken from the GNU Radio 3.4.2 tarball and built again as a custom block with the cmake custom wrapper you can usually nd inside a tarball1 . This however is nowadays considered an old-school method since the latest tarballs provide the Swiss-army knife tool called gr-modtool, which will generate the skeleton of your new custom package.
Chunks to Symbols
Once we have set the coding on our binary sequences (the ones from the Packed to Unpacked block) we can assign the points of the constellation to them. So for example, if we want to build a BPSK constellation we will assign the points [-1,1] to the Symbols Table. Otherwise if we want to build a QPSK constellation we will assign these other points : [1+1j,-1+1j,-1-1j,1-1j] Input type : int, short, byte Output type : complex, oat
17 of 66 Arturo Rinaldi - The gr-bertool
Throttle
We usually use this block to limit the cpu load when operating with non-audio or non-usrp sources/sinks. This means that our system wont freeze or be overloaded by the GNU Radio engine. If by any chance we forget it to put it in our ow graph, we will be warned about it runtime. Type : complex, oat, int, short, byte
WX GUI Slider
Its a simple slider making part of the GNU Radio GUIs. We can use to vary at runtime the value of certain variable we have previously set. We will mostly use this slider to set the Eb /N0 value in our simulations. We are also able to set the Default Value (it is usually a oat one), and the number of steps between the Maximum and Minimum value of the variable itself.
Unpacked to Packed
Basically, this block exactly works in the reverse way of the Packed to Unpacked block we saw a couple of slides ago. Remembering the four binary sequences, which were splitted from the original one :
00000011 00000010 00000000 00000001
they will be reverted to the original transmitted binary sequence 11100001. Type : int, short, byte
21 of 66 Arturo Rinaldi - The gr-bertool
Import
The Import block allows us to import the installed python libraries or even some custom code residing in your PYTHONPATH(s). Some common examples of imports into the block are : Import: numpy
Import: Import:
scipy <my-code>
and so on.
$ gnuradio-companion &
errors divided by the total number of transferred bits during a studied time interval
errors divided by the total number of transferred bits during a studied time interval
Lets verify the BER theoretical values with the experimental ones by
errors divided by the total number of transferred bits during a studied time interval
Lets verify the BER theoretical values with the experimental ones by
a range of Eb /N0 values given by min and max with the opportunity to choose the increase step size
a range of Eb /N0 values given by min and max with the opportunity to choose the increase step size
We can enable or disable the Gray
Coding
a range of Eb /N0 values given by min and max with the opportunity to choose the increase step size
We can enable or disable the Gray
Coding
By clicking on the Plot button the BER
BER and signal constellation evolution in the three dierent types of examinated transmission channels
BER and signal constellation evolution in the three dierent types of examinated transmission channels
In the following example well show the
BER evolution in the Rician Channel in the range of Eb /N0 values going from 15 dB to 0 dB
BER and signal constellation evolution in the three dierent types of examinated transmission channels
In the following example well show the
BER evolution in the Rician Channel in the range of Eb /N0 values going from 15 dB to 0 dB
Once started the BER value settles to
BER and signal constellation evolution in the three dierent types of examinated transmission channels
In the following example well show the
BER evolution in the Rician Channel in the range of Eb /N0 values going from 15 dB to 0 dB
Once started the BER value settles to
Theoretical Value
39 of 66 Arturo Rinaldi - The gr-bertool
BER and signal constellation evolution in the three dierent types of examinated transmission channels
In the following example well show the
BER evolution in the Rician Channel in the range of Eb /N0 values going from 15 dB to 0 dB
Once started the BER value settles to
Theoretical Value
Lets see the evolution....
Arturo Rinaldi - The gr-bertool 39 of 66
Figure : Generic block diagram for a TLC system In the absence fo any noise in the channel the generci transmitted
symbol s i will be correctly received. The plot of the received symbols is knows as Constellation of the digital modulation.
s 3 (01) s 0 (11)
s 2 (00)
s 1 (10)
the transmitted symbols and so the received symbol r i is not one belonging to the constellation showed before
s 3 (01) r i s 0 (11) The transmitted s i symbol is not correctly received
s 2 (00)
s 1 (10)
47 of 66 Arturo Rinaldi - The gr-bertool
Image Transmission
Image Transmission
This tool allow us to observe how the
Image Transmission
This tool allow us to observe how the
simulated channels (AWGN, Rayleigh e Rician) for a xed value of Eb /N0 = 0 dB and Q-PSK digital modulation for a Jpeg image
Image Transmission
This tool allow us to observe how the
simulated channels (AWGN, Rayleigh e Rician) for a xed value of Eb /N0 = 0 dB and Q-PSK digital modulation for a Jpeg image
Lets see the results......
(a) Original
(b) AWGN
56 of 66
(c) Original
(d) Rician
57 of 66
(e) Original
(f) Rayleigh
58 of 66
Image Transmission
Audio Transmission
This tool allow us to observe how the
Audio Transmission
This tool allow us to observe how the
simulated channels (AWGN, Rayleigh e Rician) for a xed value of Eb /N0 = 10 dB and Q-PSK digital modulation
Audio Transmission
This tool allow us to observe how the
simulated channels (AWGN, Rayleigh e Rician) for a xed value of Eb /N0 = 10 dB and Q-PSK digital modulation
We took as sample the wav le
Audio Transmission
Specications of the sample le
play_it_sam.wav : File Size: 1.76M Bit Rate: 1.41M Encoding: Signed PCM Channels: 2 @ 16-bit Samplerate: 44100Hz Replaygain: off Duration: 00:00:10.00
Lets see the results....
61 of 66 Arturo Rinaldi - The gr-bertool
Audio Transmission
(g) Original
Audio Transmission
(i) Rician
(j) Rayleigh
Conclusions
Conclusions
Why using gr-bertool ? Advantages
Its an helpful tool for the teacher to use in TLC courses
Conclusions
Why using gr-bertool ? Advantages
Its an helpful tool for the teacher to use in TLC courses The student can nd a quick verication with the learnt notions during classes
Conclusions
Why using gr-bertool ? Advantages
Its an helpful tool for the teacher to use in TLC courses The student can nd a quick verication with the learnt notions during classes It has an user-friendly GUI
Conclusions
Why using gr-bertool ? Advantages
Its an helpful tool for the teacher to use in TLC courses The student can nd a quick verication with the learnt notions during classes It has an user-friendly GUI Its open-source !
Contact Information
Arturo Rinaldi Freelance Collaborator @ DIECII Address : Dep. of Electronics Engineering (DIECII) C.da di Dio, 98166 Messina (Italy) E-mail : arty.net2@gmail.com Fixed : +39-090-3977376 ; Mobile : +39-340-5795584 (Whatsapp) Skype : arty.net ; Facebook : arty.net Twitter : artynet2 ; LinkedIn : Arturo Rinaldi Prof. Giuseppe Campobello, Ph.D. Researcher in Telecommmunications Address : Dep. of Electronics Engineering (DIECII) C.da di Dio, 98166 Messina (Italy) - Room: 636 (block B, 6th oor) E-mail : gcampobello@unime.it Fixed : +39-090-3977378 Prof. Salvatore Serrano, Ph.D. Researcher in Telecommmunications Address : Dep. of Electronics Engineering (DIECII) C.da di Dio, 98166 Messina (Italy) E-mail : sserrano@unime.it Fixed : +39-090-3977522
66 of 66 Arturo Rinaldi - The gr-bertool