Thursday 17 March 2011

Working with GNURadio

GNURadio is very easy to work with. It has blocks made for easy use. It consists of about 17 blocks which can be dragged and dropped for making a flowgraph. The flowgraph is the pictorial representation of the work that the user wants to do.  Blocks present in GNURadio are shown below in the figure.


GNURadio Environment and its blocks

Now for more understanding of the GNURadio environment, a simple task of adding noise to a streaming signal is described below.This section illustrates the basic manipulations on streaming signals, in either discrete or continuous time, to perform useful operations on those signals in GNURadio.


Addition of noise:

1. To start with open a new flow graph in GRC.
2. Now create a flow graph as shown below. For ease of use  the categories to which othe blocks used  in the flow graph belong are also specified.

Flowgraph for Adding  Noise

3. The signal sources and the noise blocks are in the category Sources, Add is in the category Operator and the Scope sink is in the  category Graphical sinks .
4. The properties of the blocks can be changed  by double clicking on the blocks for modification as shown below. As is seen, here the output type of both the signals is complex and the waveform type for one signal is Square while  the other is a Sine waveform.The other properties like frequency and amplitude can also be changed as required. Similarly the noise type can also be changed from Gaussian to Uniform, Impulse or Laplacian.Here the noise type is Gaussian .

Properties setting for addition of noise


5. Execute the flowgraph from the Build option or by pressing F6. The Scope sink should open. It  displays an output as  shown below.

Output when noise type is Gaussian.


6. Modify the flow graph and change the properties of all the blocks to float and also at the same time change the waveform types of the signal sources and execute the flow graph again. For two Constant  waveform and for the noise type Uniform , the following output is produced (keeping all other properties the same).


Output when noise type is Uniform.

Next is a flowgragh where correlation of streaming signals using multiplication is described.Correlation or disambiguation refers to any departure of two or more random variables from independence, but most commonly refers to a more specialized type of relationship between mean values.


Correlation using multiplication:

1. Open a new flow graph in GRC.
2. Now create a flow graph as shown below. For ease of use  the categories to which the blocks used in the flow graph belong are also specified.

Flowgraph for correlation using multiplication.


3.The signal sources  blocks are in the category Sources, Multiply is in the category Operator , the Scope sink and the Number Sink are  in the  category Graphical Sinks,Interpolating FIR filter is in the category Filters and Throttle is in the category Misc.
4.The properties of the blocks can be changed  by double clicking on the blocks for modification as shown below. As is seen, here the output type of both the signals is float and the waveform type for one signal is Cosine  while  the other is a Sine waveform.The other properties like frequency and amplitude can also be changed as required.Here the frequencies of the signals are 5 Hz and amplitude being 1. Throttle is basically used as a rate limiting block.The FIR filter is used to integrate the region of interest of the signal (basically a window of size  N filled with 1's as the tap of the FIR filter).

Properties setting for correlation using multiplication.


5.Execute the flowgraph from the Build option or by pressing F6. The Scope sink should open. It  displays an output as  shown below.

Output when waveform types are Sine and Cosine.


6.Modify the flow graph and change the properties of all the blocks to complex and also at the same time change the waveform types of the signal sources and execute the flow graph again. For a Triangular and a Square  waveform , the following output is produced (keeping all other properties the same).

Output when waveform types are Triangular and Sqaure.


No comments:

Post a Comment