Harmonic Estimation Analysis Object and Template (Spectral Analysis Option)

09.03.2021

The Harmonic Estimation is a powerful composite procedure that generates a parametric (sinusoids or damped sinusoids) model of the signal. There are two stages to the algorithm for Harmonic Modeling. In the first optional stage, an AR, Prony-, Eigenanalysis, or Fourier algorithm is used to determine the number of spectral components and their frequencies. In the second stage a linear fit is made to determine the amplitudes and phases.

Algorithm

The estimation of component count and frequencies can be done by one of the following procedures:

Algorithm

Description

Automatic

Seeks to select the best algorithm based on data length, frequency resolution and the chosen model

Fourier

Fourier Spectral Analysis. The Exact-N windowed FFT in the Fourier Spectral Analysis analysis object.

Fourier Uneven 1x Avg. Nyquist

Fourier Spectral Analysis. The Lomb-Scargle Periodogram of the Unevenly Spaced Data Fourier Analysis analysis object with a Nyquist-multiple of 1.

Fourier Uneven 2x Avg. Nyquist

Fourier Spectral Analysis. The Lomb-Scargle Periodogram of the Unevenly Spaced Data Fourier Analysis analysis object with a Nyquist-multiple of 2.

Fourier Uneven 4x Avg. Nyquist

Fourier Spectral Analysis. The Lomb-Scargle Periodogram of the Unevenly Spaced Data Fourier Analysis analysis object with a Nyquist-multiple of 4.

AR Data Matrix FB SVD

Autoregressive Modeling. The Data Matrix FB SVD algorithm of the AR (Autoregressive) Spectral Estimator analysis object.

EigenAnalysis Root MUSIC

Eigendecomposition. The MUSIC algorithm of the EigenAnalysis Spectral Estimator.

Prony SVD

Parametric modeling. The damped sinusoids Prony Algorithm.

Linear Modeling

No automatic estimation of frequencies. Instead, a linear model for a given list of frequencies is fitted to obtain the amplitudes and phases.

In case of unevenly sampled data only the Fourier algorithms for unevenly sampled data are available.

For the Fourier algorithm, the Chebyshev data taper is used and its frequency domain one-sided width is set automatically. For data lengths 256 and less, this width is set to 2. For data lengths above 1024, the window width is set to 4. Between these values, this window adjustment varies logarithmically by -6 + 1.4427*ln(n). This produces a frequency domain width of 3 for a data length of 512. Zero padding is done to create a 16384 length FFT if the data length is less than 16384.

Model

The model can be one of the following:

Model

Formula/Description

Sinusoid

Y=Ampl*sin(2*π*Freq*X+Phase)

Damped sinusoid

Y=Ampl*exp(-k*X)*sin(2*π*Freq*X+Phase)

The Prony algorithm is required for modeling damped sinusoids.

Number of Components

The number of components can be set by maximum count or by a dB threshold below the largest harmonic. Harmonics are ranked by fitted amplitudes. Note that a target signal component count may not be realized as fewer peaks than this target may be detected in the first stage of the algorithm where frequency identification occurs.

Result Type

The Harmonic components option generates an amplitude and frequency bar plot of the individual harmonics. For this option, the number of components should be the number of harmonics to be retained in the model.

The options Harmonic distortion spectrum % and Harmonic distortion spectrum dB generate a spectrum whose Y component consists of ratio of the sequential addition of components to the primary or principal harmonic. An x of 1 compares the principal harmonic to the next largest in amplitude. An x of 2 compares the principal harmonic to the second and third largest amplitude component. For this option, the number of components should be set to the count that will detect all of the secondary harmonics in the spectrum. The last value in the sequence will represent a THD (total harmonic distortion) absent noise.

The options THD - Total Harmonic Distortion %, SNR - Signal-to-Noise Ratio dB and SINAD dB are only available in the analysis object. They all return scalar values. The THD is the ratio of the square root of the sum of the powers or squared amplitudes of all harmonic frequencies above the fundamental frequency to the amplitude of the fundamental frequency. The SNR is the ratio of the sum of the powers of all of all harmonic frequencies including the fundamental frequency to the power of the noise in the signal. The SINAD is is the ratio of the power of the whole signal including all harmonic components and the noise to the sum of the powers of all secondary harmonic frequencies and the noise. The SNR and SINAD values are transformed into decibels with the formula 10.0 * log10(Ratio).

The option De-noised signal reconstructed from the fitted sinusoidal or damped sinusoidal model.

AR, Eigen, Prony Parameters

The model order for the AR Data Matrix FB SVD algorithm is set in accordance with the explanations in the AR (Autoregressive) Spectral Estimator analysis object. In accord with the Prony Algorithm algorithm, and as fitting the EigenAnalysis Spectral Estimator analysis object for the MUSIC algorithm. There is no model order in a Fourier procedure.

The Automatic algorithm adjusts the model order automatically. In general, all three algorithms will use approximately the same order for an optimized frequency analysis.

Frequencies

If you select Linear Modeling as the algorithm, then you need to specify the exact frequencies of the harmonic components to be modeled. You can provide them as a  of comma-separated values or as a  containing a data series with the frequencies.

Options - Set/Clear Reference, Toggle Labels (Analysis Wizard Only)

This function lets you compare various spectral procedures and settings. You can view a copy of the currently displayed spectrum in the lower pane by pressing Set Reference. Next, you can adjust additional settings that affect the display in the upper pane. With Clear Reference you can remove the copy and the time signal will appear again.

You can view the Y  and/or X values of the spectral components by pressing Toggle Labels.

Harmonic Table (Analysis Wizard Only)

The option Optional numeric results option on page three of the Analysis Wizard produces a table of frequencies, amplitudes, phases (sine-based) and damping coefficients. Please note that the phases here are sine-based phases reported in the range from 0 to 2π. Although the frequencies originate from the spectral procedure, the amplitudes and phases derive from the least-squares fit. Also, an analytic TISA (time-integral squared amplitude) power is computed for each component. This is a time-domain integral based on each component's amplitude, frequency, and phase and the time range represented in the data.

Absolute and relative percents are also given for the component powers. These are often the quantities of interest when comparing strengths of signal components. The summed power reported in the table is merely the sum of the component powers. It is not the power of the composite signal that would result from the addition of the components. In most instances, this sum will be lower than the TISA power of the incoming data.

Performance Issues

The AR, Prony, and Eigen algorithms involve computationally intense methods for frequency identification. These are most useful when data lengths are modest. Very large data lengths are impractical, and for modeling sinusoids, unnecessary. For large data lengths, Fourier analysis is perfectly adequate for accurately determining the harmonic frequencies.

FPScript Functions Used

HarmonicEstimation

See Also

Analysis Objects

Spectral Analysis Option

Harmonic Modeling

AR Algorithms

EigenAnalysis Algorithms

Prony Algorithm

Fourier Spectral Analysis

Eigendecomposition

Data Tapering Window

Harmonic Analysis Tutorial

Share article or send as email:

You might be interested in these articles