AnalyticSignal (FPScript)

21.09.2021

Transforms a real signal into an analytic signal whose imaginary part results in the Hilbert transform. Frequently used to calculate instantaneous amplitude or instantaneous frequency as well as for the demodulation of signals.

Syntax

AnalyticSignal(Signal [ , FFTLength = 0 ])

 

The syntax of the AnalyticSignal function consists of the following parts:

Part

Description

Signal

The real data set from which the analytic signal is to be calculated. The data set should be equidistantly sampled, since the algorithm uses the discrete Fourier transform (for equidistant data).

Permitted data structures are data series, data matrix, signal, signal series und signal series with two-dimensional X-component. All real data types are permitted, except calendar time und time span.

Void values are not permitted in this argument.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

FFTLength

The length of the Fourier transform which is required for calculating the analytic signal. The FFT length must be longer than or equal to the data length. If the specified FFT length is longer than the data length, then zeros are appended for the internal Fourier transform. A value of -1 sets the FFT length to equal the next highest power of 2. The default value of 0 sets the FFT length to equal the data length.

Permitted data structures are scalar value. All integral data types are permitted.

The value must be greater or equal to -1.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

Remarks

The result has the same unit as the argument Signal.

For aggregate data structures, only the Y component is considered. If present, the X or Z components are copied to the result unchanged. In the case of data matrices and signal series, the calculation is made on a per column basis.

The function calculates from a real input signal x(t) an analytic (i.e. complex, differentiable) signal z(t) through the following mathematical algorithm in the frequency domain; refer to [1]:

In this case, X(f) and Z(f) describe the associated complex-valued (continuous time) Fourier transforms of x(t) and z(t). The transfer function is therefore specified as:

In other words: z(t) results in x(t), where the positive half of the spectrum is doubled and the negative half of the spectrum is removed.

Note        The real part of the analytic signal z(t) defined this way corresponds to the original input signal x(t); the imaginary part of the analytic signal results in the Hilbert transform of x(t); refer to [1].

Available in

Option Spectral Analysis

Examples

Imag(AnalyticSignal(realSig))

Results in the Hilbert transform of a real value signal. The code is equivalent to Hilbert(realSig).

realSig + 1i*Hilbert(realSig)

Transforms a real value signal into an analytic signal with its imaginary part resulting in the Hilbert transform. The code returns the same result as AnalyticSignal(realSig).

Absolute(AnalyticSignal(realSig))

Results in the instantaneous amplitude or the upper envelope of a signal (if the signal does not have a trend).

Dim offset = Trend(realSig, TREND_LINEAR)
Absolute(AnalyticSignal(realSig - offset))

Calculates the instantaneous amplitude of a signal. The trend correction in this case is done using the Trend function.

Dim offset = Trend(realSig, TREND_LINEAR)
Absolute(AnalyticSignal(realSig - offset)) + offset

Calculates the upper envelope of a signal. The trend correction in this case is done using the Trend function.

Dim offset = Mean(realSig, MEAN_ARITHMETIC + CALC_MOVING, 200)
-Absolute(AnalyticSignal(realSig - offset)) + offset

Calculates the lower envelope of a signal. The trend correction in this case is done using the Mean function.

PhaseUnwrap(Phase(AnalyticSignal(realSig)))

Results in the instantaneous phase of a single-component signal (if the signal does not have a trend).

Dim offset = Trend(realSig, TREND_ADAPTIVE)
PhaseUnwrap(Phase(AnalyticSignal(realSig - offset)))

Calculates the instantaneous phase of a single-component signal. The trend correction in this case is done using the Trend function.

Dim instPhase = PhaseUnwrap(Phase(AnalyticSignal(realSig)))
Derivative(instPhase)/(2*PI)

Results in the instantaneous frequency of a single-component signal (if the signal does not have a trend).

Dim offset = Mean(realSig, MEAN_ARITHMETIC + CALC_MOVING, 50)
Dim instPhase = PhaseUnwrap(Phase(AnalyticSignal(realSig - offset)))
Derivative(instPhase)/(2*PI)

Calculates the instantaneous frequency of a single-component signal. The trend correction in this case is done using the Mean function.

See Also

Hilbert Function

FFTn Function

IFFTn Function

IRFFTn Function

Absolute Function

Phase Function

Derivative Function

Trend Function

Mean Function

PhaseUnwrap Function

Instantaneous Quantity Analysis Object

Spectral Analysis Option

Calculation of the Analytic Signal

References

[1] S. Lawrence Marple, Jr.: Computing the Discrete-Time "Analytic" Signal via FFT. In: IEEE Transactions on Signal Processing, Vol. 47, No.9. http://ieeexplore.ieee.org/iel5/78/16975/00782222.pdf?arnumber=782222,1999.

[2] B. Boashash: Estimating and Interpreting the Instantaneous Frequency of a Signal-Part I: Fundamentals. In: Proceedings of the IEEE, Vol. 80, No. 4, pp. 519–538. 1992.

[3] Bernard Picinbono: On Instantaneous Amplitude and Phase of Signals. In: IEEE Trans. Signal Processing, Vol. 45, No. 3. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.178.833,1997.

Share article or send as email:

You might be interested in these articles