InstantaneousFrequency: Derive instantaneous frequency

View source: R/spectral_methods.R

InstantaneousFrequencyR Documentation

Derive instantaneous frequency

Description

Calculates instantaneous frequency from an analytic signal.

Usage

InstantaneousFrequency(asig, tt, method = "arctan", lag = 1)

Arguments

asig

Analytic signal produced by HilbertTransform

tt

Sample times

method

How the instantaneous frequency is calculated. "arctan" uses the arctangent of the real and imaginary parts of the Hilbert transform, taking the numerical derivative of phase for frequency. "chain" uses the analytical derivative of the arctangent function prior to performing the numerical calculation.

lag

Differentiation lag, see the diff function in the base package.

Value

instfreq

Instataneous frequency in 1/time

Note

The "arctan" method was adapted from the hilbertspec function in the EMD package.

!!IMPORTANT!! The numeric differentiation may be unstable for certain signals. For example, high frequency sinusoids near the Nyquist frequency can give inaccurate results when using the "chain" method. When in doubt, use the PrecisionTester function to check your results!

Author(s)

Daniel C. Bowman danny.c.bowman@gmail.com

See Also

PrecisionTester


hht documentation built on March 31, 2023, 10:08 p.m.