# Power and Frequency Estimator (G Dataflow)

Version:

Computes the estimated power and frequency around the peak frequency in the power spectrum of a time-domain signal.

This node achieves good frequency estimates for measured frequencies that lie between frequency lines on the spectrum. This node also makes corrections for the window function you use.

## power spectrum

The power spectrum of a time domain signal.

## peak frequency (max)

The frequency, usually in Hz, of the frequency peak around which to estimate the frequency and power.

If you do not wire this input, this node automatically searches for the maximum peak in the power spectrum array and estimates the frequency and power around it.

Default: -1

## window constants

The window constants for the selected window.

You obtain window constants from the Window Properties node. You need this input only when you use the spectral density output formats, the last four output unit selections.

### eq noise BW

The equivalent noise bandwidth (ENBW) of the window that was used. You can use this value to divide a sum of individual power spectra of the power spectrum or to compute the power in a given frequency span.

Default: 1.0

### coherent gain

The inverse of the scaling factor applied to the window.

Default: 1.0

## span

The number of frequency lines (bins) around the peak to be included in the peak frequency and power estimation.

Default: 7—which means that the power in three frequency lines before the peak frequency line, the peak frequency line itself, and the three frequency lines after the peak are included in the estimation. This number is adequate for most windows.

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## df

The frequency interval of the power spectrum.

Default: 1.0

## estimated frequency peak

The estimated frequency of the peak in the input power spectrum.

Algorithm for Calculating the estimated frequency peak

The following equation computes the estimated frequency peak:

$\text{estimated frequency peak}=\frac{\mathrm{\Sigma }\left(\text{Power Spectrum}\left(j\right)*\left(j*\mathrm{df}\right)\right)}{\mathrm{\Sigma }\left(\text{Power Spectrum}\left(j\right)\right)}$

for $j=i-\frac{\text{span}}{2},...,i+\frac{\text{span}}{2}$

where

• i is the peak index
• Power Spectrum (j) is the power in bin j
• df is the frequency bin width

## estimated power peak

The estimated power of the peak in the input power spectrum.

Algorithm for Calculating the estimated power peak

The following equation computes the estimated power peak:

$\text{estimated power peak}=\frac{\mathrm{\Sigma }\left(\text{Power Spectrum}\left(j\right)\right)}{\text{ENBW}}$

for $j=i-\frac{\text{span}}{2},...,i+\frac{\text{span}}{2}$

where

• i is the peak index
• Power Spectrum (j) is the power in bin j
• ENBW is the equivalent noise bandwidth of the window

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application