Introduction

In signal processing, time–frequency analysis comprises those techniques that study a signal in both the time and frequency domains simultaneously, using various time–frequency representations. The motivation for this analysis is that variables and their transform representation are often tightly connected, and they can be understood better by studying them jointly, as a two-dimensional object, rather than separately.

Frequency domain data analysis, like the Fast Fourier Transform (FTT), is a powerful tool in many applications. It can reveal periodic variation in time series data indicating e.g. mechanical problems in a manufacturing process. One drawback is that it does not work well for a time series in which the frequencies vary over time. The frequency spectrum does not show the time instant when the frequency changed. For that we need time-frequency analysis methods and representations.

My previous blog covered some basic aspects in time-frequency analysis. This blog discusses Hilbert transforms that can be used for nonstationary signals (i.e. their statistics vary over time) and nonlinear signals. This is useful as most real-life signals are nonstationary. Wavelet transforms can also be used for nonstationary signals, but neither wavelets nor Fourier transforms work for nonlinear time series. A nonlinear signal is generally defined as the signal generated by the system that does not obey superposition and scaling properties.

In the next blog of this series I will discuss Wigner distributions functions.

Analytic Signals and Instantaneous Frequencies

In mathematics and signal processing, an analytic signal is a complex-valued function that has no negative frequency components. The real and imaginary parts of an analytic signal are real-valued functions related to each other by the Hilbert transform. The analytic signal of a real-valued signal can be computed using the Hilbert transform, e.g. in Python: scipy.signal.hilbert. The ‘2-D’ analytic signal can be computed in Python by using scipy.signal.hilbert2.

The amplitude envelope is given by the magnitude of the analytic signal. The envelope of an oscillating signal is a smooth curve outlining its extremes, and thus generalizes the concept of a constant amplitude into an instantaneous amplitude. The instantaneous frequency can be obtained by differentiating the instantaneous phase with respect to time. The instantaneous phase corresponds to the phase angle of the analytic signal.

As an example, we use a chirp waveform of which the frequency increases from 20 Hz to 100 Hz with applied amplitude modulation. A chirp is a signal in which the frequency increases or decreases with time. The Hilbert transform is used to determine the amplitude envelope and instantaneous frequency of this signal.

The unique capabilities of the Hilbert transform can be used to accurately determine amplitude envelopes and instantaneous frequency of time varying process measurements. For example, a measurement of vibration can be transformed into a level of vibration and frequency of vibration. These can then be correlated with process setpoints and other process variables that have slowly varying levels.

Instantaneous Frequencies from HHT

For some signals, we get better results using the Hilbert–Huang transform (HHT). The HHT uses an iterative algorithm called the Empirical Mode Decomposition (EMD) to adaptively decompose (in time domain) a signal into so-called intrinsic mode functions (IMF) at different time scales. The length of the IMFs is the same as the original signal. The Hilbert spectral analysis (HSA) is applied to IMFs to obtain instantaneous frequency data. The HHT is designed to work well for data that is nonstationary and nonlinear. One advantage of the IMFs are well-behaved Hilbert transforms enabling the extraction of physically meaningful instantaneous frequencies.

According to the uncertainty principle the high resolution cannot be obtained simultaneously in both time and frequency. The definition of the instantaneous time-localized frequency has been controversial as it contradicts with this principle. Also, the HTT is more like an algorithm (an empirical approach), without a well-defined mathematical base, that is applied to a data set, rather than a theoretical tool. However, the HHT is an additional tool for a data scientist, and can provide useful insight into some signals. The basis functions of the HHT are IMFs that are adaptive and empirical whereas Fourier and wavelets transforms are not adaptive (they have a priori basis functions). The HHT has been successfully used in many applications, see e.g.  https://en.wikipedia.org/wiki/Hilbert%E2%80%93Huang_transform

For industrial time series, the Hilbert-Huang transform may provide a compact representation where other transforms (like Fourier and Wavelet) cannot. This may provide a fuller picture of the dynamics of a process and can be used as inputs to build better predictive model.

HHT examples in MATLAB are given at https://www.mathworks.com/help/wavelet/ref/hht.html

PyHHT is a Python module based on NumPy and SciPy which implements the HHT

Other sources of HHT information:

https://www.sciencedirect.com/topics/engineering/hilbert-huang-transform

http://www.scholarpedia.org/article/Hilbert-Huang_transform