GFSK Mod: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Created page with "Category:Block Docs Category:Stub Docs This is the template for the "Page-per-block Docs". This first section should describe what the block...")
 
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Block Docs]]
[[Category:Block Docs]]
[[Category:Stub Docs]]
Hierarchical block for Gaussian Frequency Shift Key (GFSK) modulation.
This is the template for the [[:Category:Block_Docs|"Page-per-block Docs"]].  This first section should describe what the block does and how to use it, using however many paragraphs necessary.  Note that the title of the wiki page should match the block's name in GRC, i.e. the one defined in the block's .grc file.  Look at the [[FFT]] Block for a good example.
       
The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.


As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.
== Parameters ==
 
; Samples/Symbol
: Samples per baud >= 2 (integer)
: Default value = 2
 
; Sensitivity
: Given to the [[Frequency Mod]]
: Default value = 1.0
 
; BT
: Gaussian filter bandwidth * symbol time (float)
: Default value = 0.35


== Parameters ==
; Verbose
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
: Prints the value of bits per symbol and BT
: Default value = Off
 
; Log
: Prints the following modulation data to .dat files:
: * Chunks to Symbol data is written to "nrz.dat"
: * Output of Gaussian filter is written to "gaussian_filter.dat"
: * Output of frequency modulator is written to "fmmod.dat"
: Default value = Off
 
; Unpack (depreciated in GNU Radio 3.8)
: Unpack input byte stream?


; Param 1 (''R'')
== Internal Structure ==
: Description of parameter, provide any tips or recommended values.  Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
For GNU Radio 3.8:


; Param 2
Packed to unpacked (input:byte, output:byte) --> Chunks to Symbols (input: byte, output: float) --> Interpolating FIR Filter (Float to float(real taps)) --> Frequency Mod --> Multiply const (I/O type:complex)
: blah blah blah


== Example Flowgraph ==
== Example Flowgraph ==


Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.
This flowgraph has been created in GNU Radio 3.8. It shows an example of the GFSK Mod and GFSK Demod blocks in action. We GFSK modulate a 9-bit long bit stream '000111011', and then GFSK demodulate it. The input to the GFSK Mod block is in packed format, whereas the output of GFSK Demod block is in unpacked format. We can use the Repack Bits/ Pack K Bits block to convert the output from GFSK Demod to packed format. Both of these options are shown in the following flowchart. All three bit streams are compared in the QT GUI Time Sink block to make sure that they are the same.


== Source Files ==
[[File:GFSK Mod and Demod Example.PNG|1000px]]
 
When the flowgraph runs, we see that the red, blue and green signals are the same, meaning that the bit streams before and after the GFSK modulation and demodulation are the same.
 
In order to replicate the results shown below, make sure you do the following:
# Make sure you have a vector of 9 bits in your vector source. The vector in above example is (0,0,0,1,1,1,0,1,1).
# Create a QT GUI Range block with Id = delay.
# For the Repack Bits block, set the "endianness" value to MSB.
# Match the input and output types of the blocks as shown in the above flowchart (purple = byte, blue = complex, orange = float)


; C++ files
[[File:GFSK Mod and Demod Output.png|800px]]
: [https://github.com/gnuradio/gnuradio TODO]


; Header files
== Source Files ==
: [https://github.com/gnuradio/gnuradio TODO]


; Public header files
; Python files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/python/digital/gfsk.py]


; Block definition
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/master/gr-digital/grc/digital_gfsk_mod.block.yml]

Latest revision as of 17:34, 29 March 2022

Hierarchical block for Gaussian Frequency Shift Key (GFSK) modulation.

The input is a byte stream (unsigned char) and the output is the complex modulated signal at baseband.

Parameters

Samples/Symbol
Samples per baud >= 2 (integer)
Default value = 2
Sensitivity
Given to the Frequency Mod
Default value = 1.0
BT
Gaussian filter bandwidth * symbol time (float)
Default value = 0.35
Verbose
Prints the value of bits per symbol and BT
Default value = Off
Log
Prints the following modulation data to .dat files:
* Chunks to Symbol data is written to "nrz.dat"
* Output of Gaussian filter is written to "gaussian_filter.dat"
* Output of frequency modulator is written to "fmmod.dat"
Default value = Off
Unpack (depreciated in GNU Radio 3.8)
Unpack input byte stream?

Internal Structure

For GNU Radio 3.8:

Packed to unpacked (input:byte, output:byte) --> Chunks to Symbols (input: byte, output: float) --> Interpolating FIR Filter (Float to float(real taps)) --> Frequency Mod --> Multiply const (I/O type:complex)

Example Flowgraph

This flowgraph has been created in GNU Radio 3.8. It shows an example of the GFSK Mod and GFSK Demod blocks in action. We GFSK modulate a 9-bit long bit stream '000111011', and then GFSK demodulate it. The input to the GFSK Mod block is in packed format, whereas the output of GFSK Demod block is in unpacked format. We can use the Repack Bits/ Pack K Bits block to convert the output from GFSK Demod to packed format. Both of these options are shown in the following flowchart. All three bit streams are compared in the QT GUI Time Sink block to make sure that they are the same.

GFSK Mod and Demod Example.PNG

When the flowgraph runs, we see that the red, blue and green signals are the same, meaning that the bit streams before and after the GFSK modulation and demodulation are the same.

In order to replicate the results shown below, make sure you do the following:

  1. Make sure you have a vector of 9 bits in your vector source. The vector in above example is (0,0,0,1,1,1,0,1,1).
  2. Create a QT GUI Range block with Id = delay.
  3. For the Repack Bits block, set the "endianness" value to MSB.
  4. Match the input and output types of the blocks as shown in the above flowchart (purple = byte, blue = complex, orange = float)

GFSK Mod and Demod Output.png

Source Files

Python files
[1]
Block definition
[2]