On moment of velocity for signal analysis

The instantaneous frequency (IF) of a signal is a well-defined quantity that is widely used for analysing non-stationary signals. However, often in practice, IF as a function of time can possess large spikes and negative values. Moreover, IF is very sensitive to noise, limiting its range of practical application. Due to these deficiencies, we introduce the concept of moment of velocity (MoV) for signal analysis. As a case study, we compare the performance of MoV to a standard Hilbert transform-based approach for R-wave identification in human electrocardiogram signals, demonstrating that our approach is more robust to noise. We examine characteristic heartbeats obtained from the MIT-BIH Arrhythmia database. A detection error rate of 0.07%, a positive predictive value of 99.97%, and a sensitivity of 99.95% are achieved against analysis results from the database.


Introduction
The concept of the Hilbert transform and instantaneous frequency (IF), amplitude and phase is used in many scientific applications, such as communications, seismology, sonar and biomedical engineering [1,2]. Conceptually, IF is explicated as the frequency of a sine function that locally fits the signal. The definition of IF is based on the Hilbert transform and the phase derivative of the analytic signal [3].
The application of IF is limited for multicomponent signals. Note that the IF of a signal normally is a fluctuating waveform, which is sensitive to the amplitudes of the frequency components. Therefore, the interpretation of spectral information is often severely constrained by the nonlinear nature of the IF.
In order to overcome this difficulty, a number of useful quantities are introduced in the literature. To  of the amplitudes, the concept of weighted average IF (WAIF) can be used for multicomponent signals [4]. The intensity and envelope weighted average of IF (IWAIF and EWAIF) are introduced to increase computational efficiency and accuracy [5]. The main difference between the IWAIF of a signal and its EWAIF is the choice of weighting function. Both IWAIF and EWAIF are constant and independent of time. Therefore, they are not appropriate for a signal with varying frequency such as a chirp. One useful concept for describing the changing spectral structure of a timevarying signal is its average frequency as a function of time, which arises in time-frequency distribution theory and is the first conditional moment of frequency or conditional mean frequency of the distribution [6,7].
In this paper, we suggest the concept of moment of velocity (MoV) as a convenient tool for analysis of non-stationary signals. As will be seen, MoV is very similar to IF except that it is more robust to noisy conditions. We show that MoV can suppress the large spikes that often clutter the IF signal. Therefore, it can provide spectral information of the original signal in a more convenient way. As a case study application of MoV, we demonstrate its use in electrocardiogram (ECG) signals from the MIT-BIH Arrhythmia database [8] in order to identify the QRS complex in ECG waveforms.

The Hilbert transform
Many approaches have been presented for signal instantaneous parameters estimation such as those based on Gabor's method, EMD, the Wigner distribution, etc. In this section, we will briefly review the Gabor approach that uses the Hilbert transform to produce the IF.

The Hilbert transform equations
Any one-dimensional integral transform pair may be written as u(t) , U(s) [3], where a time (or other variable) function u(t) is transformed into a complex function of a real or complex variable s. The transform pair is defined by the following pair of integrals: where the function w(t, s) is the kernel; C(s, t) is the conjugate kernel; U(s) is called the (integral) transform of u(t); and u(t) is the inverse transform. The Hilbert transform pair is defined by the integrals [9] A comparison with the general forms of (2.1) and (2.2) shows that the Hilbert transform is defined using the kernel w(t, s) ¼ 1/[ p(s 2 t)] and the conjugate kernel C(s, t) ¼ 1/[ p(t 2 s)]; that is, the kernels differ only by sign. The variable s is a time variable. Therefore, the Hilbert transform of a function of time is another function of a time of different shape. The mathematical definition of the Hilbert transform is usually written in the form x(t) t À t dt: (2:5) The Hilbert transform can be considered as a convolution between 1/pt and the signal x(t), i.e. y(t) ¼ x(t) 1/pt, and the inverse relation is x(t) ¼ y(t) 21/pt.

Instantaneous parameters
The complex signal that has an imaginary term equal to the Hilbert transform of the real part is called the analytic signal The instantaneous amplitude is defined as the magnitude of the analytic function or the instantaneous amplitude is absolute value of analytic signal . The IF of a signal is a function of time and also a measure of the frequency royalsocietypublishing.org/journal/rsos R. Soc. open sci. 6: 182001 corresponding to a particular time component of the signal. For a real signal, s(t), the instantaneous frequency, f (t), is defined as where f(t) is the instantaneous phase of analytic signal, and defined by f(t) ¼ arctan(H[x(t)]/x(t)). Therefore, the IF may be written in following form: (2:7) In order for IF to be meaningful (i.e. always non-negative), the slope of the instantaneous phase must be always positive. This implies that the time signal must be locally symmetric to the zero mean. Therefore, as explained in appendix A, any DC offset produces results with negative frequencies that are difficult to interpret.

The moment of velocity
The initial concept of MoV is derived by analogy from angular momentum in the field of particle dynamics. For an analytic signal, the imaginary part is the Hilbert transform of its real part that is the original signal. Therefore, the original signal is always orthogonal to the Hilbert transform of the waveform. Similarly, the angular momentum vector is perpendicular to the position vector. The angular momentum coordinate system is shown in figure 1a. As an example, a signal and the Hilbert transform analytic plane are illustrated in figure 1b for the case when x(t) ¼ sin(t).
The angular momentum for a moving particle of unit mass is defined as where r is the position vector of particle and v is particle velocity. If the vectors r and v are resolved into components and the cross-product formula is applied we obtain, where i, j, k, are the standard unit vectors, and the indices represent the x, y and z components of the vectors. Assuming the particle moves in the x-y plane, the angular momentum is perpendicular to the x-y plane and equation (3.2) is reduced to only its z components defined by the scalar In terms of signal and the Hilbert transform of the analytic signal, we replace r x , r y and L z in equation (3.3) by x(t), H(t) and MoV, respectively. Therefore, MoV is defined as

Case study: moment of velocity in ECG analysis
In this section, as a case study, we illustrate the application of MoV in the analysis of an ECG time series.
To demonstrate the utility of MoV, an ECG time series is selected as it is a well-known class of nonstationary signal. The ECG waveform, which reveals the electrical activity of the heart, is a vital physiological signal [10]. Note that ECG signals are transient, time-varying and non-stationary. The fact that ECG signals are non-stationary imposes a number of limitations on using basic time and frequency analyses. Most time and frequency analyses are established on the assumption that signals are stationary or locally stationary. Therefore, these methods cannot cope with all the characteristics of ECG signals. Consequently, Hilbert transforms have been found to be useful for analysis of an ECG signal (e.g. [11 -15]). The combination of some useful properties of the Hilbert transform and other mathematical tools is used for detecting the QRS complex in the study of Benitez et al. [16]. Current methods have varying success in their ability to determine R peaks. Not only do ECG signals vary in morphology, baseline, amplitude and signal strength but also they are usually contaminated with noise, and the analysis of an ECG signal with noise is challenging. We employ the detection of R peaks as a case study to demonstrate the utility of MoV.

R-wave detection using the moment of velocity
In an ECG waveform, the interval between cardiac cycles is called the beat-to-beat interval and is used to explore instantaneous heart rate [17]. Basically, the beat-to-beat interval is labelled using the letters P, Q, R, S and T for the individual peaks and this is carried out for whole recording [18]. According to the literature [19,20], the most important information about an ECG signal is contained in the P wave, QRS complex and T wave. A Hilbert transform-based approach using IF has been proposed to analyse ECG signals [21]. The fact that the R wave lies in a different frequency range is used as a key factor for QRS identification. royalsocietypublishing.org/journal/rsos R. Soc. open sci. 6: 182001 Figure 2 illustrates the ECG, corresponding IF and MoV curves for a patient from the Physionet database [8]. Here, IF is obtained from two different approaches, the Hilbert transform and the complex wavelet. The particular complex wavelet method we use is based on the Morse wavelet [22,23]. Additionally, 20 dB SNR noise is intentionally added to the signal and the corresponding IF and MoV waveforms are shown. In order to directly compare IF and MoV, no filtering or pre-processing steps are carried out on the ECG.
Considering figure 2, although the IF waveforms possess the frequency information of the ECG signal under analysis, the information is cluttered with large spikes and negative values, particularly in the case of the IF obtained from the Hilbert transform. The influence of DC offset, riding waves and abrupt changes of signal are the main causes of these large spikes and negative IF values. The use of MoV can overcome this problem by removing the numerator that can take on very small values.
As is mentioned in [21], frequency characteristics may be used to identify the QRS complex and the R wave may be identified by detecting spikes in instantaneous frequency plot. However, this is problematic as the IF signal is cluttered with too many spikes as can be seen in figure 2b. Considering figure 2b,c,d, when focusing on higher frequency components or rapidly changing features, the MoV may be a more practical tool than IF.
The R peaks are distinguishable in the MoV plots. In addition, ECG signals may be contaminated by different kinds of noise [20], and all ECG analysis applications require the accurate detection of the R wave in the presence of noise. In figure 2e, we intentionally add 20 dB SNR Gaussian white noise to the ECG signal to show the deleterious impact on IF. In figure 2f,g, it may be seen from corresponding IF plots that the effect of noise obscures any signal features including R waves. Moreover, figure 2h shows the MoV for the same EGC waveforms with 20 dB SNR of added white Gaussian noise, showing that the R waves are maintained above the noise.
After applying MoV to the ECG signal, a simple filtering and peak detection algorithm is used to identify the R waves. The peak detection algorithm must be adaptive, because if the amplitude of the signal varies, the algorithm will miss the R waves that are less than the defined tolerance.     royalsocietypublishing.org/journal/rsos R. Soc. open sci. 6: 182001 different amounts of Gaussian white noise to the ECG signal of subject no. 100 from the MIT-BIH Arrhythmia database [8], and evaluate both MoV and the approach of Benitez et al. [16]. The approach of Benitez is a Hilbert transform-based method; and so we select this for purposes of comparison. It applies a useful Hilbert transform property that takes a zero crossing between consecutive positive and negative inflection points in the original waveform and represents it as a peak in its Hilbert transform conjugate. Therefore, in order to transform R peaks to zero crossings, the algorithm first obtains the derivative of the ECG signal. Then it applies the Hilbert transform to obtain peaks from zero crossing points. Finally, it uses instantaneous amplitude of the analytic signal to highlight R waves. In order to obtain a fair comparison, the same peak detection algorithm is applied to both approaches in a similar way. Performance is then assessed by comparison with manual annotations.
A false negative (FN) occurs when a true QRS complex identified in the corresponding manual annotation file is missed. Moreover, a false QRS detection is denoted as a false positive (FP). Sensitivity (SE) and detection error rate, respectively, are calculated using the following equations:  The performance of MoV versus the approach of Benitez et al. [16] is evaluated in figure 5 that shows MoV is more reliable than Benitez's approach in noisy conditions. In particular, the detection error rate of MoV is considerably lower for SNR levels worse than 18 dB.

Results
The results for 22 subjects obtained from the MIT-BIH Arrhythmia database are illustrated in table 1. The performance of MoV approach against the approach of Benitez et al. [16] is evaluated in table 2 as a number of other approaches have also been compared to the study by Benitez et al. [16]. Note that no noise is added in this experiment. Here, positive predictive values (PPV) respectively are calculated using the following equation, Â 100: (4:3)

Conclusion
MoV is introduced as a tool for the analysis of non-stationary signals. The approach is based on IF and yet is more robust to noisy conditions. As a case example, we demonstrate that for a noisy ECG signal, the loss in signal features in an IF plot is dramatic. Moreover, using the MIT-BIH Arrhythmia database, the

Appendix A
Negative values may appear in the IF waveforms, which is meaningless physically. Note that DC offsets, riding waves and abrupt changes in the signal under analysis can be the main cause of negative IF. Figure 6 shows how DC offset may potentially influence the sign of IF. Figure 6a demonstrates three signals with different DC terms, s(t) ¼ sin(2pt), sin(2pt) þ 0.5 and sin(2pt) þ 2. In figure 6b, the trajectory of the signals versus their Hilbert transforms are shown. The trajectory for all the signals is a circle with the centres shifted by different amounts. Finally, the corresponding instantaneous phase and frequency diagrams are shown in figure 6c,d, respectively.

A.1. No DC offset
For the case of zero DC offset, s(t) ¼ sin(2t), the trajectory of signal and Hilbert transform is a circle with its centre exactly located on the origin; see blue circle in figure 6b. Therefore, a point moving on the circle

A.2. Low DC offset
In the presence of a small DC offset less than the signal amplitude, s(t) ¼ sin(2pt) þ 0.5, the origin is still located in the Hilbert transform circle but is not located exactly on the centre of the circle; see red circle in figure 6b. Thus, for a point travelling on the circle with constant v, the phase slope is time-varying. It may be seen that from the blue curve in figure 6c that the slope is always positive, therefore, the corresponding IF possesses some positive peaks in the location of major phase variations.

A.3. High DC offset
In this case, s(t) ¼ sin(2pt) þ 2, the origin is located out of the Hilbert circle; see yellow circle in figure 6b. Therefore, for a moving point with constant v, the instantaneous phase possesses negative slope in each period. These negative slopes in the instantaneous phase diagram cause negative values in the corresponding IF, see yellow curve in figure 6d.