0% found this document useful (0 votes)
896 views4 pages

Gnu Radio Tutorial 2

This tutorial demonstrates how to use sliders, text boxes, and other variable input blocks in GNU Radio Companion to control parameters in a signal flow graph. It walks through an example where a slider is used to vary the frequency of one signal source, a text box is used to control the amplitude of another, and a chooser block allows selecting different frequencies for a third signal source. Experimenting with these variable blocks allows interacting with and modifying the output signal in real-time.

Uploaded by

Tuan Do Trong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
896 views4 pages

Gnu Radio Tutorial 2

This tutorial demonstrates how to use sliders, text boxes, and other variable input blocks in GNU Radio Companion to control parameters in a signal flow graph. It walks through an example where a slider is used to vary the frequency of one signal source, a text box is used to control the amplitude of another, and a chooser block allows selecting different frequencies for a third signal source. Experimenting with these variable blocks allows interacting with and modifying the output signal in real-time.

Uploaded by

Tuan Do Trong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Using GNU Radio Companion: Tutorial 2

This tutorial illustrates some of the features available in GNU Radio Companion such as sliders
and other variable input options.
1. Open a terminal window using: Applications > Accessories > Terminal. At the prompt type:
grc
Construct the flow graph shown below. Note that the sample rate is set to 48000 in this
example.

2. Execute the flow graph. You should hear the composite tone and see the FFT sink display of
the spectrum. Experiment with the FFT size in the FFT sink. It must always be a multiple of
two. Note that as you increase the FFT size the resolution of the display increases. Reset the
FFT size to 1024 when you are done.
3. Add a Variable Slider (from the Variables category) to the flow graph. Double click on the
block and set the parameters as shown below.

4.

Execute the flow graph. This time when the FFT sink display opens you will see a
horizontal slider at the top. Move the slider back and forth to change the value of freq2
between 10 and 2000. You should observe that this does not change the spectrum or the
sound. This is because freq2 has not been assigned to control anything.

5. Double click on the bottom Signal Source (set to 800). Replace the frequency (800) with the
variable freq2. Execute the flow graph. You should now observe that both the spectrum and
the sound change as you vary the frequency of the Signal Source using the slider.
6. Add a Variable Text Box to the flow graph. Set the parameters as shown in the figure below.

7. Double click on the bottom Signal Source and replace the Amplitude (.5) with the variable,
level2. Execute the flow graph. Note that a text box will not appear in the display. The
default value of 0.5 will be entered. Change the value to 0.1 followed by Enter. The volume
of the 800 Hz tone will decrease and this will be reflected on the spectrum plot. Do not vary
the level above one.
8. Add a Variable Chooser block to the flow graph. This block will add either a drop down
menu, radio buttons or a button. Input the parameters as shown in the figure below.

9. Change the Frequency of the top Signal Source (1KHz) to freq1. Execute the flow graph and
change the frequency of the top Signal Source using the radio buttons. Experiment with the
Drop Down menu and the Button to see how they work.

You might also like