Time-Dependent FFT

GX-TXT DEV112 P011-bis

Follow how the spectrum changes over time with successive windows and compare the results obtained with different resolution settings.

Enable the module and choose a Session

In Configuration → Modules → Analysis & Services select Time-Dependent FFT (analysis.time_dependent_fft 1.3.3 in the P011-bis test). With Health Available and state CORE / OFF uses Enable module. In Analysis select Run / recalculate now to include the module.

Time-Dependent FFT is available and can be enabled.
Time-Dependent FFT is available and can be enabled.

Use the procedure FFT Example to generate a Session with the Generator fft_example 1.0.0, acquire fft_example.csv as guida.fft.misura and assign seconds to time_s and unit 1 to signal. In Preview check the 1024 samples. Follow the Window Set procedure to save Quattro finestre FFT, size and step 256 samples, Drop. The lab produces four consecutive windows and uses the same grid for the time-frequency comparison.

Preview shows the synthetic two-tone signal before the time-frequency computation.
Preview shows the synthetic two-tone signal before the time-frequency computation.

Configure analysis, axis and representation

In Dataset sources choose guida.fft.misura as primary. For that role the command Remove is disabled. In Input variable bindings bind primary.time_s to Time / temporal variable and primary.signal to Signal variable. The selectors show auto and the available variables. The time must be uniform and consistent with the Window Set. For Temporal Window Set choose tset_001 — Quattro finestre FFT. None leaves the required set missing.

Control
Run mode
Choices and effect
auto, the default, decides based on the cache. recalculate rebuilds the results. render_only generates plots and exports from a compatible result. If mismatch_parameter_fingerprint, use recalculate or auto appears for the new parameters. After the dB computation, a Run with identical scientific parameters and render_only reused the cache.
Control
FFT weighting window
Choices and effect
rectangular applies a constant weight, hann, the default, tapers the ends, hamming keeps a residual weight at the ends, blackman attenuates the side lobes further, blackman_harris increases side-lobe suppression with a wider main lobe, flat_top favors the amplitude estimate near the peak.
Control
Pre-FFT detrend / DC handling
Choices and effect
none keeps the signal, mean, the default, removes the mean per window and linear subtracts the estimated trend.
Control
NFFT mode / Explicit NFFT
Choices and effect
auto derives the number of points from the windows. explicit uses the number entered, proposed as 4096. Specify a number that contains all the samples of the window. In the lab 256 produces 129 bins at 4 Hz, 512 produces 257 bins at 2 Hz through zero-padding.
Control
Spectral representation
Choices and effect
amplitude, the default, uses the unit of the signal. psd uses its square per Hz. amplitude_db uses a logarithmic representation of the amplitude with the reference given in the report. The choice applies to the Dataset created and to the view.
Control
Parallel workers
Choices and effect
auto, the default, delegates the choice, serial uses the serial path, a positive integer requests an explicit number. The report distinguishes request, effective workers and state.
Control
Separate per-window data export
Choices and effect
none, the default, avoids separate numerical files. selected_windows uses the same choice as Window spectrum plots. all_windows requests one file per window. The main Dataset still contains the whole grid.
Settings of the first computation with amplitude and four windows.
Settings of the first computation with amplitude and four windows.

Open the result and tell it apart from the views

In Run check the Dataset in the plan and start the Analysis. Wait for Selective analysis completed and open guida.fft.misura.tdfft.v0002.tset_001 from Dataset → Preview. Use Open Dataset → Canonical table. With amplitude and NFFT 256 you get 516 rows, 129 frequencies for four windows. time is the midpoint of the first and last coordinate of the window, in seconds. frequency is in Hz, window_index numbers the windows and amplitude gives the spectral value. The value columns and their units depend on the representation. In Metadata and Technical details read origin, contract table.generic, identity and shape of the table.

The Datasets with .display. in the name are used by the plots. Display limits and any dense reduction do not reduce the main table. In Results read time_dependent_fft_report.txt for effective parameters, window_plot_index.txt for any separate plots and split_export_index.txt for the separate numerical files.

Canonical table of the main product with time, frequency, amplitude and window index.
Canonical table of the main product with time, frequency, amplitude and window index.

Choose map, surface and per-window spectra

In Graphs offered by module the separate checkboxes select Time-frequency overview (map with X time, Y frequency, color value) and Time-frequency 3D surface (height Z as value), both on at first, and Window spectrum plots, initially off. Use Enable all or Disable all to change all the checkboxes. Configure… opens the parameters of the selected plot. Module graphics… concerns the common style. Variants… and Series… are the controls for the variants and for the series of the individual plots.

For map and surface, Plot title sets the title. X-axis label and Y-axis label use auto for time and frequency in the display units. Colorbar label on the map and Z-axis label on the surface use auto for quantity and unit. Write a text label to replace it.

Temporal scope
all, the default, uses all windows for the view. selected uses those chosen in Window spectrum plots.
Maximum displayed time windows / Maximum displayed frequency bins
Maximum displayed per dimension. 0 keeps all samples of the dimension. The map starts from 256 and 2048, the surface from 128 and 1024.
Display reduction for dense grids
peak, the default for the map, preserves the local maximum. mean, the default for the surface, shows the group mean.
Additional output format
none, the default, leaves the PNG, pdf or svg add a file.
Time-frequency map in the Plots panel after the first computation.
Time-frequency map in the Plots panel after the first computation.
Map title updated and SVG format added in Configure.
Map title updated and SVG format added in Configure.

For Window spectrum plots, Plot title, X-axis label and Y-axis label describe the spectra with frequency on the abscissa. auto derives quantity and unit. For Windows to plot/export choose a mode:

  • all uses all windows.
  • index_range uses the first index in First window index (1-based, default 1) and the last in Last window index (0 up to the end, default value).
  • explicit_list uses Explicit window list. Enter a list such as 1,3 or ranges such as 1,5,12-20.
  • time_range uses Start time and End time in the source unit. An empty field means an open end.

Maximum displayed frequency bins starts from 8192, 0 uses all available bins. Stable preview artifact offers first_selected, the default, or overlay_selected to overlay the selected spectra. Legend labels offers none, index, time and index_time. Write one separate plot file per selected window, initially on, creates one file per chosen spectrum. Individual plot format accepts png (default), pdf or svg. Individual plot basename starts from fft_window. In Individual title template uses {index}, {member_id} and {time} to include the window data. Additional preview output format uses none, pdf or svg. Close closes the dialog. Recalculate, or use the cache when compatible.

To repeat the test, enable the per-window plots, choose explicit_list with 1,3, overlay_selected, index_time, individual files svg and numerical export selected_windows. The computation with PSD and NFFT 512 produced two SVGs and two CSVs, registered in the indexes, besides the map with the updated title. A second run with amplitude_db, all_windows and auto produced all four CSVs. In Plots open the plot row to inspect the view.

The configuration selects windows 1 and 3 for the overlaid view.
The configuration selects windows 1 and 3 for the overlaid view.
The reprocessed PSD map shows the updated title in the plot list.
The reprocessed PSD map shows the updated title in the plot list.

Adjust axes, projection and color

Configure… → Axes… opens Axes / grid / 3D / color. Use plot-specific configuration applies overrides to the current view. The axes available in the dialog are X, Y Left, Y Right and Z. Fields that concern an axis or a view type that is absent have no effect.

Display unit
inherit inherits, auto uses the automatic choice and source displays in the source unit. Limits are expressed in the unit shown.
Min / Max / Step
Empty inherits or leaves the automatic value. Enter lower limit, upper limit and tick step consistent with the scale.
Format
inherit inherits, auto chooses the format, %g uses significant digits and %.0f to %.4f force zero to four decimals respectively.
Scale / Minor grid
inherit, linear or log; for log use positive coordinates. Off leaves the minor grid off, Auto delegates the subdivisions when the plot type supports it.
Z label / Z grid
Z-axis label and grid inherit, on or off in the relevant view.
2D XY data aspect / 3D view
inherit inherits, auto fits and xy_equal uses the same spatial scale on X and Y. In 3D Azimuth and Elevation orient the camera, Projection select inherit, orthographic or perspective. Aspect adds data_equal for all dimensions and manual for the three ratios in Manual X;Y;Z.
Colormap / Colorbar
Colormap names the palette, initially inherit. Colorbar uses inherit, 0 to hide or 1 to show. Color unit inherits, uses auto or source. Label replaces the text and CLim min and CLim max set the interval represented by the palette.
Plot background
Choose with Choose…, restore inheritance with Inherit or select Transparent. The export format determines how transparency appears.
Align Y labels / XY grid
Alignment inherit, 1 or 0. Grid both, vertical, horizontal, none or inherit. Select Y grid source inherit, left, right or none. Grid color sets the color.

Save stores the configuration, Save and rerender plot also requests a new rendering, Restore automatic returns to the automatic proposals, Cancel exits without applying the draft. Level scales… concerns the level scale available for the active plot type.

Axes dialog with the map-specific configuration.
Axes dialog with the map-specific configuration.

In Level scales…, choose the relevant Axis row, for example Y1 or Y2 for a view with two ordinates. In Scale, linear keeps the quantity, dB refers it to an explicit value, dBFS uses the level in decibels relative to full scale and FS uses the ratio to full scale. In Quantity enter amplitude for the 20 log formula or power for the 10 log formula. Basis distinguishes peak from rms. Empty fields are the initial state of the linear row. Reference and Reference unit declare a consistent value and unit, required to use an explicit reference. In Zero choose missing, the default, to treat zero in the log as missing data, or negative_infinity to represent it with the logarithmic limit. Use Save or Save and rerender. The change concerns the representation. If the column already contains amplitude_db, keep the linear scale to read those levels.

The Level scales window lists scale, quantity, base, reference and zero handling.
The Level scales window lists scale, quantity, base, reference and zero handling.