# Multiharmonic Frequency Tracking Method Using The Sigma-Point Kalman Smoother

- Sunghan Kim
^{2}Email author, - Anindya S. Paul
^{1}, - Eric A. Wan
^{1}and - James McNames
^{2}

**2010**:467150

https://doi.org/10.1155/2010/467150

© Sunghan Kim et al. 2010

**Received: **28 May 2009

**Accepted: **2 February 2010

**Published: **22 March 2010

## Abstract

Several groups have proposed the state-space approach to tracking time-varying frequencies of multiharmonic quasiperiodic signals. The extended Kalman filter/smoother (EKF/EKS) is one of the common frequency tracking approaches seen in the literature. We introduce a multiharmonic frequency tracker based on the forward-backward statistical linearized Sigma-Point Kalman smoother (FBSL-SPKS) and compare its performance to that of the extended Kalman smoother (EKS). In all cases the FBSL-SPKS tracker outperformed the EKS tracker over a wide range of signal-to-noise (SNR) ratios. We also demonstrate its superior performance on real signals.

## Keywords

## 1. Introduction

Many natural signals contain nearly periodic rhythms with slowly varying morphologies. Example signals with this property include tremor, speech, electrocardiogram (ECG), and arterial blood pressure (ABP). In many applications the instantaneous frequency (IF) of these signals contains useful information for further analysis.

Many signal processing methods have been applied to the problem of multiharmonic frequency tracking in quasiperiodic signals. Especially, the pitch tracking in the speech signal analysis is one of the most common applications of multiharmonic frequency tracking. Pitch detection/tracking algorithms can be roughly categorized into three groups: time-domain methods such as zero-crossing, frequency-domain methods, and time-frequency-domain methods. All pitch tracking methods apply the frame-by-frame analysis due to the nature of human voice [1]. Recently Tabrikian et al. proposed the maximum *a posteriori* (MAP) probability pitch tracking method using harmonic model [2]. They implemented the MAP estimator by a dynamic programming procedure based on measurement collected over several frames. However, these frame-by-frame based algorithms are always not applicable especially when a local signal stationarity cannot be assumed. There are other methods that have been applied to track rhythmicity (harmonic components) in nonstationary quasiperiodic signals based on adaptive schemes [3]. The advantage of using these adaptive schemes is that one can track rhythmicity (frequencies) *recursively* as signal samples are acquired.

In this paper we use a Fourier series representation, which is shown in (1) Section 2.1, of multiharmonic quasiperiodic signals in which the amplitudes, phases, and frequencies are allowed to change slowly over time. The application of state space methods to continuously track the amplitudes, phases, and frequencies was pioneered by Parker and Anderson in [4] with many subsequent investigations [5–9]. Recently there have been several proposed methods based on particle filters [10, 11] which are highly computationally intensive and hence practically intractable.

The Kalman filter (KF) recursively estimates the optimal state of a linear state space system driven by Gaussian noise by minimizing the MSE [12]. However, it cannot be applied directly to frequency tracking because our state space model has nonlinearity due to the relationship between frequencies and observed signals. There are many types of generalizations of the KF for the case of a nonlinear state space model. The extended Kalman filter (EKF) uses a local linear approximation of the model. The algorithm is relatively simple and faster than other generalizations of the KF because it relies on a first-order Taylor series approximation of the nonlinear system around the estimate of the current state. The Sigma-Point Kalman filter (SPKF) is another generalization to nonlinear state-space models, which includes the Unscented Kalman filter (UKF) [13], Central Difference Kalman filter (CDKF) [14], and their square-root variants [15]. Like the EKF, the SPKF approximates the state distribution by a Gaussian Random Variable. The SPKF uses a deterministic sampling approach to approximate the probability density of the state-error and noise covariances by a set of carefully chosen sample points known as sigma-points. These sigma-points are chosen in such a way that they completely capture the mean and covariance of the corresponding densities. These sigma-points are then propagated through the true nonlinear system, with the posterior mean and covariance estimated using simple weighted averaging. This approach captures the posterior mean and covariance accurately to the 2nd order (3rd order is achieved for symmetric distributions) compared to EKF which only achieves 1st-order accuracy. Another advantage of the SPKF over other Kalman generalizations is that it maintains the same order of computational complexity as the EKF.

The Kalman smoother (KS) is a noncausal version of the KF. Typically, smoothers can achieve better estimates than filters since they deal with more measurements with proper design. We proposed a tremor frequency tracking method utilizing the extended Kalman smoother (EKS) in [16, 17]. However, we are unaware of any literature that investigates the estimation accuracy of smoothers in the multiharmonic frequency tracking application.

*Forward-backward statistical linearized sigma-point Kalman smoother* (FBSL-SPKS), which is recently proposed in [18], presents a new formulation for nonlinear smoothing using Sigma-Point Kalman filtering method. The derivation of the FBSL-SPKS is obtained by making use of the relationship between the SPKF and weighted statistical linear regression (WSLR). WSLR takes into account both the mean and covariance of the prior distribution to pseudolinearize the nonlinear dynamics. Therefore, it is more accurate than the first-order Taylor series-based linearization approach, which completely neglects the prior covariance at the point of linearization. In [18], the FBSL-SPKS is shown to obtain superior estimates than the EKS in general. To our best knowledge, however, the head-to-head performance comparison between the EKS and SPKS has not been made explicitly for the multiharmonic frequency tracking application. Especially, FBSL-SPKS has never been applied to any practical applications such as multiharmonic frequency tracking.

The first objective of our study was to implement two multiharmonic frequency trackers utilizing the EKS and FBSL-SPKS and demonstrate their feasibility of tracking the frequency of multiharmonic signals. The second objective was to compare the performance of the EKS and FBSL-SPKS trackers based on the Monte Carlo simulations and real biomedical signals. We used three performance metrics to quantify different aspects of the multiharmonic tracking performance. We only examined the smoothers since our work was focused on an offline analysis of prerecorded signals.

## 2. Methodology

We apply two nonlinear smoothing schemes using the EKF and SPKF approaches for multiharmonic frequency tracking problem. The EKF-based smoother, that is, the EKS, has many mathematically equivalent expressions. Here, we use a variant similar to that developed in [19] (see [20, page 374]). The nonlinear SPKF-based smoother was derived from the first principle in [18] and is referred as the FBSL-SPKS. The FBSL-SPKS is a fixed interval smoother, which uses two independent forward and backward filters for smoothing. The standard SPKF is used as a forward filter. The backward filter requires the inverse dynamics of the forward filter. While the EKS can easily invert the Taylor series based linearized dynamics, the SPKS requires a new approach to linearize the forward nonlinear dynamic model. There are two major variants of SPKS available in the literature which can solve this problem in a roundabout way. In [21], the inverse dynamic model was learned from the data by training a backward nonlinear predictor (e.g., neural network). The major disadvantages of this method are that it is application and data specific and requires a learning phase. Recently an Unscented Rauch-Tung-Striebel- (URTSS-) based smoother was proposed in [22], where a joint distribution of the current and future state is maintained in order to smoothen the current state. This method requires more computation due to doubling of the state dimension.

The FBSL-SPKS introduced a direct and straightforward formulation for forward-backward smoothing [18]. Instead of learning a backward dynamical model from the data, the proposed smoother (FBSL-SPKS) makes use of weighted statistical linear regression (WSLR) formulation of SPKF (see [18] for details). WSLR is a linearization technique that takes into account the uncertainty of the prior random variable when linearizing the nonlinear model. In this way, WSLR is more accurate in the statistical sense than the first-order Taylor series-based linearization employed by the EKF which only considers the mean of the prior densities while linearizing. By representing the forward nonlinear dynamics in terms of WSLR, a linear backward filter was derived from first principle in [18]. The forward and backward estimates were then statistically combined to obtain a smoothed estimate. This newly proposed FBSL-SPKS performed comparably with the smoothers presented in [21, 22] but with higher computational efficiency and ease of implementation.

### 2.1. State Space Model

We use boldface notation to denote random processes, normal face for deterministic parameters, upper case letters for matrices, lower case letters for vectors and scalars, and subscripts for time indices. The observed signal is denoted as where represent discrete time.

where is the mean frequency, is the difference between the instantaneous frequency and the mean frequency , the accumulative sum of , and the sample interval. This is one of the major differences between our state-space model and the one proposed in [4]. This modification was necessary because the FBSL-SPKS requires the state variables to have zero mean. Since is the accumulative sum of , its mean is zero. This increases numerical stability and makes it easier to invert the model for the backward filter.

where is the fluctuating component in , an autoregressive (AR) process coefficient of , and mutually uncorrelated white noise processes. A value of results in a random walk model of and results in a white noise model. The variance of determines how quickly the parameters are expected to change over time.

where and are the linear state transition and nonlinear observation functions, respectively.

### 2.2. EKS Frequency Tracker Recursions

#### 2.2.1. Forward Updates

- (i)
- (ii)

The further detail of the EKF recursions can be found in [20].

#### 2.2.2. Smoothing

### 2.3. SPKS Multiharmonic Frequency Tracker Recursions

- (ii)
*Weighted Statistical Linear Regression (WSLR)*is as follows.

From (28),
, we observe that the covariance of the linearization error
is added when calculating the posterior covariance
. The *uncertainty feedback* scheme is very important especially when there is severe nonlinearity over the *uncertainty region* of prior RV. First-order Taylor series-based linearization employed by EKF often diverges in highly nonlinear region as it only performs linearization around the mean of the RV but neglects this error term. In general, the WSLR technique is an optimal way of linearizing any nonlinear function in the minimum mean square error (MMSE) sense as this approach explicitly takes into account the prior RV statistics (e.g., mean and covariance).

where is the state, is the observation at time index , and are Gaussian distributed process and observation noises, is the nonlinear dynamic model and is the nonlinear observation model function. The process and observation noise has zero mean and covariances and , respectively. The SPKF is then derived by recursively applying the sigma-point selection scheme shown above at every time index to these dynamic equations (see [13] for more details).

where , , , and are the statistical linearization parameters and , are the linearization error with mean zero and covariance and . All the parameters can be obtained by applying (22) and (26) iteratively at each time index . Deriving the KF using the linearized state-space shown in (30) also leads to SPKF (see [21]). This statistically linearized form allows to form the dynamics of the backward filter used in forward-backward smoothing approach. As the statistically linearized state space shown in (30) is different from the standard linear state space used by the Kalman filter, the detailed derivation of the FBSL-SPKS which is demonstrated in the next sections needs to be done from the first principle. The pseudocode for the FBSL-SPKS can now be specified as follows.

#### 2.3.1. Forward Updates

- (i)
- (ii)
- (iii)
- (iv)
- (v)
- (vi)
- (vii)
- (viii)

where controls the size of the sigma-point distribution and should be within to avoid sampling nonlocal points when the nonlinearities are strong [21]. is the weighting term which incorporates the higher-order moments of the prior distribution. As generally sigma-points can effectively capture the first 2 moments (mean and covariance) of the distribution (for gaussian any symmetrical sigma-points set also capture the third-order moment, i.e., skewness), the parameter also can be used to minimize the error of higher-order moments of the distribution due to sigma-point approximation effects. For Gaussian prior, [13]. The parameter is used to make sure that the positive definiteness of the covariance matrices and the default choice of should work for most of the cases. is the dimension of the augmented state; and are the process and observation noise covariances.

#### 2.3.2. Backward Updates

#### 2.3.3. Smoothing

## 3. Experiment

### 3.1. Synthetic Time-Variant Harmonic Signals

We generated two sets of synthetic signals with time-variant harmonics whose sample rate was kHz, mean frequency Hz, and duration s using (1)–(3). The first set of synthetic signals contains the rhythmicity during the entire 3 seconds duration. The second set of synthetic signals contains the rhythmicity only during the first and last one seconds, - and - seconds. Between and seconds the signals are simply white Gaussian noise. The second set of synthetic signals mimics those signals whose rhythmicity is intermittent.

### 3.2. Parameter Selection

Summary of user-specified design parameters.

The SPKS multiharmonic frequency tracker has a few of parameters that the EKS tracker does not have. Those parameters and their chosen values are described in Section 2.3.1.

### 3.3. Performance Measures

There are two main issues that need to be addressed when comparing the performance of frequency trackers: accuracy and lock-on time. The accuracy quantifies how closely the tracker estimates the state. The lock-on time is a measure of how quickly the tracker can converge to the true state.

Depending on the application, the primary objective of frequency tracking may be accurate tracking of an instantaneous frequency or "signal denoising". When the rhythmicity in a given signal is intermittent, it is also important that the frequency tracker can regain its track of the intermittent instantaneous frequency as quickly as possible [10].

where is the instantaneous frequency (IF), is the estimated IF, and is the mean IF. NFMSE has a natural scale ranging from to . A value means that the average accuracy of the estimated IF is no better than simply using the mean IF as an estimate. Values of indicate poorer frequency tracking than a simple mean estimator and those of indicate accurate frequency tracking.

When this metric is averaged over an ensemble of synthetic signals, it visualizes how rapidly the trackers lock on to the true frequency. In contrast to NMSE and NFMSE, is a function of time that shows the squared difference between the true IF and its estimate at a given time. For all of our results we calculated the NFMSE, NMSE, and SFE over an ensemble of synthetic signals.

## 4. Results and Discussion

### 4.1. Synthetic Signals

### 4.2. Real Signal Examples

We applied both trackers to two different types of real signals: a photosenor insect activity signal and an arterial blood pressure (ABP) signal. The photosensor insect activity signal has a clear harmonic structure, which carries important entomological information. The instantaneous frequency and the harmonic amplitudes help entomologists determine what kind of insects flew over the photosensor [23, 24]. The ABP signal also has many harmonics by nature. Accurate tracking of the harmonics in the ABP signal is critical to check a patient's heart condition. However, the ABP signal can often be noisy due to signal drops and medical device interference. The following example will demonstrate that the FBSL-SPKS harmonic tracker is more robust to this type of noise than the EKS harmonic tracker.

## 5. Conclusion

We implemented the multiharmonic tracker using the recently proposed FBSL-SPKS technique and made the head-to-head performance comparison between the FBSL-SPKS and EKS multiharmonic trackers based on synthetic and real-world signals. Using three difference performance metrics, we demonstrated that the FBSL-SPKS multiharmonic tracker is more accurate and robust to noise than the EKS multiharmonic tracker.

## Declarations

### Acknowledgment

This work was supported in part by the Thrasher Research Fund.

## Authors’ Affiliations

## References

- McAulary RJ, Quatieri TF: Speech analysis/synthesis based on a sinusoidal representation.
*IEEE Transactions on Acoustics, Speech, and Signal Processing*1986, 34(4):744-754. 10.1109/TASSP.1986.1164910View ArticleGoogle Scholar - Tabrikian J, Dubnov S, Dickalov Y: Maximum a-posteriori probability pitch tracking in noisy environments using harmonic model.
*IEEE Transactions on Speech and Audio Processing*2004, 12(1):76-87. 10.1109/TSA.2003.819950View ArticleGoogle Scholar - Li D, Jung R: Tracking rhythmicity in nonstationary quasi-periodic biomedical signals using adaptive time-varying covariance.
*Computers in Biology and Medicine*2002, 32(4):261-282. 10.1016/S0010-4825(02)00022-7View ArticleGoogle Scholar - Parker PJ, Anderson BDO: Frequency tracking of nonsinusoidal periodic signals in noise.
*Signal Processing*1990, 20(2):127-152. 10.1016/0165-1684(90)90124-HMathSciNetView ArticleMATHGoogle Scholar - James B, Anderson BDO, Williamson RC: Conditional mean and maximum likelihood approaches to multiharmonic frequency estimation.
*IEEE Transactions on Signal Processing*1994, 42(6):1366-1375. 10.1109/78.286953View ArticleGoogle Scholar - La Scala BF, Bitmead RR, Quinn BG: An exteded Kalman filter frequency tracker for high-noise environments.
*IEEE Transactions on Signal Processing*1996, 44(2):431-434. 10.1109/78.485940View ArticleGoogle Scholar - La Scala BF, Bitmead RR: Design of an extended Kalman filter frequency tracker.
*IEEE Transactions on Signal Processing*1996, 44(3):739-742. 10.1109/78.489052View ArticleGoogle Scholar - Bittanti S, Savaresi SM: On the parameterization and design of an extended Kalman filter frequency tracker.
*IEEE Transactions on Automatic Control*2000, 45(9):1718-1724. 10.1109/9.880631MathSciNetView ArticleMATHGoogle Scholar - Johnston LA, Krishnamurthy V: Derivation of a sawtooth iterated extended Kalman smoother via the AECM algorithm.
*IEEE Transactions on Signal Processing*2001, 49(9):1899-1909. 10.1109/78.942619View ArticleGoogle Scholar - Fischler E, Bobrovsky BZ: Mean time to loose lock of phase tracking by particle filtering.
*Signal Processing*2006, 86(11):3481-3485. 10.1016/j.sigpro.2006.06.001View ArticleMATHGoogle Scholar - Dubois C, Davy M: Joint detection and tracking of time-varying harmonic components: a flexible bayesian approach.
*IEEE Transactions on Audio, Speech and Language Processing*2007, 15(4):1283-1295.View ArticleGoogle Scholar - Kalman RE: A new approach to linear filtering and prediction problems.
*Transactions of the ASME*1960, 82: 35-45.View ArticleGoogle Scholar - Julier SJ, Uhlmann JK: Unscented filtering and nonlinear estimation.
*Proceedings of the IEEE*2004, 92(3):401-422. 10.1109/JPROC.2003.823141View ArticleGoogle Scholar - Norgaard M, Poulsen NK, Ravn O: New developments in state estimation for nonlinear systems.
*Automatica*2000, 36(11):1627-1638. 10.1016/S0005-1098(00)00089-3MathSciNetView ArticleMATHGoogle Scholar - van der Merwe R, Wan E: The square-root unscented kalman filter for state and parameter estimation.
*Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP '01), May 2001*6: 3461-3464.Google Scholar - Kim S, McNames J: Tracking tremor frequency in spike trains using the extended Kalman filter.
*Proceedings of the Annual International Conference of the Engineering in Medicine and Biology Society, 2005*7: 7576-7579.Google Scholar - Kim S, McNames J: Tracking tremor frequency in spike trains using the extended Kalman smoother.
*IEEE Transactions on Biomedical Engineering*2006, 53(8):1569-1577. 10.1109/TBME.2006.877809View ArticleGoogle Scholar - Paul AS, Wan EA: A new formulation for nonlinear forwardbackward smoothing.
*Proceedings of the IEEE International Conference on Acoustic Speech and Signal Processing (ICASSP '07), 2007*Google Scholar - Bryson AE, Frazier M:
*Smoothing for linear and nonlinear dynamic systems.*Aero Systems Division, Wright-Patterson Air Force Base, Dayton, Ohio, USA; 1963.Google Scholar - Kailath T, Sayed AH, Hassibi B:
*Linear Estimation*. Prentice-Hall; 2000.MATHGoogle Scholar - van der Merwe R:
*Sigma point kalman filters for probabilistic inference in dynamic state-space models, Ph.D. dissertation*. OGI School of Science and Engineering, Oregon Health & Science University (OHSU); 2004.Google Scholar - Sarkka S: Unscented rauch-tung-striebel smoother.
*IEEE Transactions on Automatic Control*2008, 53(3):845-849.MathSciNetView ArticleGoogle Scholar - Moore A, Miller J, Tabashnik B, Gage S: Automated identification of flying insects by analysis of wingbeat frequencies.
*Journal of Economic Entomology*1986, 79(6):1703-1706.View ArticleGoogle Scholar - Moore A, Miller RH: Automated identification of optically sensed aphid (homoptera:aphidae) wingbeat waveforms.
*Annals of the Entomological Society of America*2002, 95(1):1-8. 10.1603/0013-8746(2002)095[0001:AIOOSA]2.0.CO;2MathSciNetView ArticleGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.