Report

Instructor: Dr.George Collins Satyakiran Anugu Introduction Why Mathematics in GNU Radio Creating block Pyhthon Mathematical operators in Python Mathematical classes Conclusion References GNU Radio is a free software development toolkit that provides the signal processing runtime and processing blocks to implement software radios using readily-available, low-cost external RF hardware and commodity processors. GNU Radio applications are primarily written using the Python programming language, while the supplied, performance-critical signal processing path is implemented in C++ using processor floating point. GNU Radio does support development of signal processing algorithms using pre-recorded or generated data, avoiding the need for actual RF hardware. GNU Radio is licensed under the GNU General Public License (GPL) version 3. All of the code is copyright of the Free Software Foundation. GNU Radio provides a library of signal processing blocks and the glue to tie it all together. The programmer builds a radio by creating a graph where the vertices are signal processing blocks(implemented in c++) and the edges represent the data flow between them. Conceptually, blocks process infinite streams of data flowing from their input ports to their output ports. Blocks' attributes include the number of input and output ports they have as well as the type of data that flows through each. Some blocks have only output ports or input ports. These serve as data sources and sinks in the graph. There are sources that read from a file or ADC, and sinks that write to a file, digital-to-analog converter (DAC) or graphical display. Graphs are constructed and run in Python processing blocks in gnu radio GNU Radio C++ Signal Processing Blocks Signal Sources Signal Sinks Filters Mathematics Signal Modulation Signal Demodulation Information Coding and Decoding Synchronization Equalization Type Conversions Signal Level Control (AGC) Fourier Transform Wavelet Transform OFDM Blocks Pager Blocks Miscellaneous Blocks Slicing and Dicing Streams Voice Encoders and Decoders Base classes for GR Blocks Basics A block is a c++ block Typically derived from gr_block or gr_sync_block class Three components my_block_xx.h: Block definition my_block_xx.cc: Block implementation my_block_xx.i: Python bindings Why python Object oriented Free Mixable(python/c++) Python scripts can be written in text files with the suffix .py Example: $ python script.py This will simply execute the script and return to the terminal afterwards Python defines the modulus operator so that the result of a % b is in the open interval [0,b), where b is a positive integer. (When b is negative, the result lies in the interval[b, 0]. Integer division is defined to round towards minus infinity. This is different from many programming languages, where the result of integer division rounds towards zero Python provides a round function for rounding floats to integers Python allows boolean expressions with multiple equality relations in a manner that is consistent with general usage in mathematics. Here are some commonly used mathematical operators a+b addition a-b subtraction a*b multiplication a/b division a//b floor division(e.g. 5//2=2) %b modulo -a negation abs(a) absolute value a**b exponent math.sqrt(a) square root Python uses the standard order of operations as taught in Algebra and Geometry classes at high school or secondary school. That is, mathematical expressions are evaluated in the following order Parentheses( ... ) Exponents** Multiplication andDivision * / // % Addition andSubtraction gr_conjugate_cc Complex conjugate of input gr_nlog10_ff Output= n*log10(input)+k gr_random Pseudo random number is generated gr_rms_ff Output is rms average power of input gr_add_cc Add across all input streams Output= sum of(inpout_0, input_1…) gr_add_const_cc Output= input+constant gr_add_const_vcc output= input vector+ constant gr_and_bb Output is defined as the bitwise boolean across all the inputs gr_and_const_ii bitwise boolean and of constant to data stream gr_divide_cc Divide across all the input streams gr_integrate_cc Integrate successive samples in input stream and decimate gr_multiply_cc multiply across all input streams gr_multiply_const_cc output= input* constant gr_multiply_const_vcc output vector= input vector* constant vector gr_not_bb bitwise boolean not across the input stream gr_or_bb Bitwise boolean or across the input stream gr_sub_cc Subtract across all the input streams gr_xor_bb Bitwise boolean across input stream Mathematical operators application in GNU Radio is discussed. Mathematics is nothing but one of many signal processing block used http://gnuradio.org/doc/doxygen/group__math__blk.ht ml http://gnuradio.org/redmine/wiki/1/GNURadioCompani onOld http://www.winlab.rutgers.edu/~therom/GNUradio_pyth on_tutorial_20090609.pdf http://gnuradio.org/doc/doxygen/group__math__blk.ht ml http://www.winlab.rutgers.edu/~therom/GNUradio_pyth on_tutorial_20090609.pdf http://en.wikibooks.org/wiki/Python_Programming/Basi c_Math Thank You