Log Power FFT: 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...")
 
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Block Docs]]
[[Category:Block Docs]]
[[Category:Stub Docs]]
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.


As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.
Create a log<sub>10</sub>(|fft|²) stream chain, with real or complex input.


== Parameters ==
== Parameters ==
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>


; Param 1 (''R'')
; FFT Size
: 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).
: Number of FFT bins


; Param 2
; Reference Scale
: blah blah blah
: Sets 0 dB value input amplitude
 
; Frame Rate
: Output frame rate
 
; Average (''R'')
: Whether to average [True, False]
 
; Average Alpha (''R'')
: FFT averaging (over time) constant [0.0-1.0]


== 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.
[[File:Log Power FFT, 913 x 278.png|800px]]


== Source Files ==
<p>This flowgraph can be downloaded from [[Media:Log Power FFT.grc]].</p>
 
Flowgraph Description: Log Power FFT Spectrum Analysis
 
This flowgraph, created in GNU Radio Companion (GRC), showcases the Log Power FFT block's ability to compute and display the logarithmic power spectrum of a 1 kHz sine wave. Below is a concise overview of its components, configuration, and output:
 
- Signal Source: Generates a 1 kHz sine wave with an amplitude of 1, sampled at 32 kHz (32,000 samples per second). This provides a single-tone input for analysis.
- Throttle: Set to 32 kHz to regulate the data flow, ensuring real-time visualization without overwhelming the system.
- Log Power FFT: Processes the input signal to produce a logarithmic power spectrum. Key parameters include:
 
  - FFT Size: 1024, creating 1024 frequency bins with a resolution of 31.25 Hz (32,000 Hz / 1024).
  - Reference Scale: 512, setting the sine wave's peak at 0 dB in the output.
  - FFT Shift: Enabled, centering the spectrum with 0 Hz in the middle.
- QT GUI Vector Sink: Visualizes the spectrum, spanning -16,000 Hz to +16,000 Hz on the x-axis. The output displays a prominent peak at ±1,000 Hz at 0 dB, reflecting the input sine wave, with a noise floor between -200 dB and -150 dB.


; C++ files
This flowgraph effectively illustrates how the Log Power FFT block converts a time-domain signal into a frequency-domain representation, offering a clear view of the signal’s spectral characteristics.
: [https://github.com/gnuradio/gnuradio TODO]


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


; Public header files
; Python Source
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/267d669eb21c514c18a6ee979f5cf247d251f1ad/gr-fft/python/fft/logpwrfft.py Here]


; Block definition
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/267d669eb21c514c18a6ee979f5cf247d251f1ad/gr-fft/grc/fft_logpwrfft_x.block.yml Here]

Latest revision as of 20:06, 14 April 2025


Create a log10(|fft|²) stream chain, with real or complex input.

Parameters

(R): Run-time adjustable

FFT Size
Number of FFT bins
Reference Scale
Sets 0 dB value input amplitude
Frame Rate
Output frame rate
Average (R)
Whether to average [True, False]
Average Alpha (R)
FFT averaging (over time) constant [0.0-1.0]

Example Flowgraph

Log Power FFT, 913 x 278.png

This flowgraph can be downloaded from Media:Log Power FFT.grc.

Flowgraph Description: Log Power FFT Spectrum Analysis

This flowgraph, created in GNU Radio Companion (GRC), showcases the Log Power FFT block's ability to compute and display the logarithmic power spectrum of a 1 kHz sine wave. Below is a concise overview of its components, configuration, and output:

- Signal Source: Generates a 1 kHz sine wave with an amplitude of 1, sampled at 32 kHz (32,000 samples per second). This provides a single-tone input for analysis. - Throttle: Set to 32 kHz to regulate the data flow, ensuring real-time visualization without overwhelming the system. - Log Power FFT: Processes the input signal to produce a logarithmic power spectrum. Key parameters include:

 - FFT Size: 1024, creating 1024 frequency bins with a resolution of 31.25 Hz (32,000 Hz / 1024).
 - Reference Scale: 512, setting the sine wave's peak at 0 dB in the output.
 - FFT Shift: Enabled, centering the spectrum with 0 Hz in the middle.

- QT GUI Vector Sink: Visualizes the spectrum, spanning -16,000 Hz to +16,000 Hz on the x-axis. The output displays a prominent peak at ±1,000 Hz at 0 dB, reflecting the input sine wave, with a noise floor between -200 dB and -150 dB.

This flowgraph effectively illustrates how the Log Power FFT block converts a time-domain signal into a frequency-domain representation, offering a clear view of the signal’s spectral characteristics.

Source Files

Python Source
Here
Block definition
Here