Difference between revisions of "Simulation example: Single Sideband transceiver"

From GNU Radio
Jump to: navigation, search
(Block descriptions)
Line 56: Line 56:
 
# replace the Audio Source block with a Signal Source block (frequency: 600) and a Throttle block.
 
# replace the Audio Source block with a Signal Source block (frequency: 600) and a Throttle block.
  
 +
== SSB receiver ==
  
<hr>
+
Using gnuradio-companion (GRC) and the following Block descriptions, build this separate flowgraph of the receiver section:<br>
  
 
[[File:SSB_rcv_fg.png|800px]]
 
[[File:SSB_rcv_fg.png|800px]]
 +
 +
=== Block descriptions ===
 +
 +
* The Options block identifies the filename for the flowgraph, a title, author, etc.
 +
** id: SSB_rcv
 +
** Click on File -> Save As&nbsp;&nbsp;Use the file name 'SSB_rcv'. the extension '.grc' is added automatically
 +
* The signal from the transmitter section is received by the ZMQ PULL Source. It is a 24khz carrier with a sample rate of 768khz.
 +
** Address: tcp://127.0.0.1:50301
 +
* A Variable block defines the sample rate.
 +
** id: samp_rate
 +
** value: 768000
 +
* Another Variable block defines the decimation factor. Since the Audio Sink (speaker) uses a sample rate of 48khz, we will reduce (decimate) the incoming sample rate by a factor of 16.
 +
** id: decim
 +
** value: 16
 +
* The Frequency Xlating FIR Filter performs three functions: frequency translation, filtering, and decimation. See [[Frequency_Xlating_FIR_Filter]] for more detail.
 +
[[File:SSB_rcv_FIR_parms.png]]
 +
 +
Description of Weaver method...
 +
 +
* The QT GUI Range block defines an Audio gain (volume) control
 +
** id: volume
 +
** default value: 0.2
 +
** start: 0
 +
** stop: 1.0
 +
** step: 0.05
 +
** Widget: choose whatever you like
 +
* The value of the volume control is used as a multiplier in the Multiply Const block.
 +
** Constant: volume
 +
* The speaker output is defined by an Audio Sink block. The parameters are:
 +
** Sample rate: set to 48khz (use the pull-down)
 +
** Device name: for most speakers (or headphone jacks) built into the computer, the Device name can be left blank; for other cases, see [[Audio_Sink#Device_Name]]
 +
 +
== Testing ==
 +
 +
== What do to next ==

Revision as of 14:14, 23 October 2020

UNDER CONSTRUCTION

The first section of this tutorial explains how a Single Sideband (SSB) signal can be created. Rather than using any real hardware for transmission, the signal is sent via a socket to the second section of the tutorial which explains how to demodulate the received signal. The only actual hardware involved is the computer's microphone input and speaker output. In the case of a Raspberry Pi computer, which has no microphone input, an alternative is presented.

This tutorial can be performed with either GNU Radio (GR) version 3.7 or 3.8 (and later). The Graphical User Interface gnuradio-companion (GRC) is used to create a flowgraph for each section.

Prerequisites

SSB transmitter

Using gnuradio-companion (GRC) and the following Block descriptions, build this flowgraph of the transmitter section:

SSB xmt 1 fg.png

Block descriptions

  • The Options block identifies the filename for the flowgraph, a title, author, etc.
    • id: SSB_xmt_1
    • Click on File -> Save As  Use the file name 'SSB_xmt_1'. the extension '.grc' is added automatically
  • The microphone input is defined by an Audio Source block. The parameters are:
    • Sample rate: set to 48khz (use the pull-down)
    • Device name: for most microphone jacks built into the computer, the Device name can be left blank; for other cases, see Audio_Source#Device_Name
  • For the remainder of the flowgraph, a sample_rate of 768khz is used. This value was chosen to give the 48khz audio frequency 16 samples per cycle (48000 x 16 = 768000).
    • Variable block
      • id: samp_rate
      • value: 768000
  • To boost the 48khz sample rate of the audio input to the 768khz sample rate, a Repeat block with an Interpolation value of 16 is used.
  • The QT GUI Range block defines an Audio gain (volume) control
    • id: volume
    • default value: 0.5
    • start: 0
    • stop: 20.0
    • step: 0.1
    • Widget: choose whatever you like
  • The value of the volume control is used as a multiplier in the Multiply Const block.
    • Constant: volume
  • The carrier signal (in this example is 24khz) is generated by the Signal Source block.
    • Sample Rate: samp_rate
    • Frequency: carrier_freq
    • Amplitude: 1.0
  • To create a double sideband signal, the carrier signal is multiplied by the audio signal.

The Band Pass Filter creates the Single Sideband signal by passing the frequencies from 24300Hz to 27000Hz and rejecting the others. This gives a signal with only one sideband (upper) and no carrier. The audio frequencies of that signal are 300Hz to 3000Hz.

  • For a real radio transmitter, the output of the Band Pass Filter would be fed to Radio Frequency (RF) hardware. For this tutorial, we are sending the transmit signal to a ZMQ PUSH Sink data socket connected to the receiver section.
    • Address: tcp://127.0.0.1:50301

Note for Raspberry Pi

Since a Raspberry Pi has no audio input jack, there are two alternatives:

  1. use a USB audio dongle.
  2. replace the Audio Source block with a Signal Source block (frequency: 600) and a Throttle block.

SSB receiver

Using gnuradio-companion (GRC) and the following Block descriptions, build this separate flowgraph of the receiver section:

SSB rcv fg.png

Block descriptions

  • The Options block identifies the filename for the flowgraph, a title, author, etc.
    • id: SSB_rcv
    • Click on File -> Save As  Use the file name 'SSB_rcv'. the extension '.grc' is added automatically
  • The signal from the transmitter section is received by the ZMQ PULL Source. It is a 24khz carrier with a sample rate of 768khz.
    • Address: tcp://127.0.0.1:50301
  • A Variable block defines the sample rate.
    • id: samp_rate
    • value: 768000
  • Another Variable block defines the decimation factor. Since the Audio Sink (speaker) uses a sample rate of 48khz, we will reduce (decimate) the incoming sample rate by a factor of 16.
    • id: decim
    • value: 16
  • The Frequency Xlating FIR Filter performs three functions: frequency translation, filtering, and decimation. See Frequency_Xlating_FIR_Filter for more detail.

SSB rcv FIR parms.png

Description of Weaver method...

  • The QT GUI Range block defines an Audio gain (volume) control
    • id: volume
    • default value: 0.2
    • start: 0
    • stop: 1.0
    • step: 0.05
    • Widget: choose whatever you like
  • The value of the volume control is used as a multiplier in the Multiply Const block.
    • Constant: volume
  • The speaker output is defined by an Audio Sink block. The parameters are:
    • Sample rate: set to 48khz (use the pull-down)
    • Device name: for most speakers (or headphone jacks) built into the computer, the Device name can be left blank; for other cases, see Audio_Sink#Device_Name

Testing

What do to next