Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020 May 9;20(9):2700.
doi: 10.3390/s20092700.

EventDTW: An Improved Dynamic Time Warping Algorithm for Aligning Biomedical Signals of Nonuniform Sampling Frequencies

Affiliations

EventDTW: An Improved Dynamic Time Warping Algorithm for Aligning Biomedical Signals of Nonuniform Sampling Frequencies

Yihang Jiang et al. Sensors (Basel). .

Abstract

The dynamic time warping (DTW) algorithm is widely used in pattern matching and sequence alignment tasks, including speech recognition and time series clustering. However, DTW algorithms perform poorly when aligning sequences of uneven sampling frequencies. This makes it difficult to apply DTW to practical problems, such as aligning signals that are recorded simultaneously by sensors with different, uneven, and dynamic sampling frequencies. As multi-modal sensing technologies become increasingly popular, it is necessary to develop methods for high quality alignment of such signals. Here we propose a DTW algorithm called EventDTW which uses information propagated from defined events as basis for path matching and hence sequence alignment. We have developed two metrics, the error rate (ER) and the singularity score (SS), to define and evaluate alignment quality and to enable comparison of performance across DTW algorithms. We demonstrate the utility of these metrics on 84 publicly-available signals in addition to our own multi-modal biomedical signals. EventDTW outperformed existing DTW algorithms for optimal alignment of signals with different sampling frequencies in 37% of artificial signal alignment tasks and 76% of real-world signal alignment tasks.

Keywords: dynamic time warping; nonuniform sampling; signal alignment.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure 1
Figure 1
Real multi-modal biomedical signals underlie the need for both an improved alignment methodology and an improved metric to evaluate the resulting alignment: (a) Heart rate measured with ECG (black, ~1.26 Hz) and photoplethysmogram (PPG) (blue, ~0.2 Hz); (b) an example of warping and distortion observed when comparing the heart rates measured by ECG (black, ~1.26 Hz) and PPG (blue, ~0.2 Hz).
Figure 2
Figure 2
Generating the warped and down-sampled companion signal Q from the reference signal R: (a) The temporal variable shift and amplitude distortion of the exemplary signal; (b) a diagram of the companion signal generation process; (c) an example of the original signal R, the intermediate signal R, and the warped and down-sampled companion signal Q.
Figure 3
Figure 3
Calculation of the optimal alignment, error rate, and singularity score: (a) An example of alignment; (b) the alignment with the most severe singularity problem.
Figure 4
Figure 4
An example of application of four dynamic time warping (DTW) algorithms to the BEEF signal from UCR dataset [20] in which EventDTW (eDTW) outperforms DTW, derivative DTW (dDTW), and shape DTW (sDTW). (a) The event information propagation process, and (b) the alignment after applying four methods to the signals in (a).
Figure 4
Figure 4
An example of application of four dynamic time warping (DTW) algorithms to the BEEF signal from UCR dataset [20] in which EventDTW (eDTW) outperforms DTW, derivative DTW (dDTW), and shape DTW (sDTW). (a) The event information propagation process, and (b) the alignment after applying four methods to the signals in (a).

References

    1. Myers C., Rabiner L., Rosenberg A. Performance tradeoffs in dynamic time warping algorithms for isolated word recognition. IEEE Trans. Acoust. Speech Signal Process. 1980;28:623–635. doi: 10.1109/TASSP.1980.1163491. - DOI
    1. Hachaj T., Piekarczyk M. Evaluation of Pattern Recognition Methods for Head Gesture-Based Interface of a Virtual Reality Helmet Equipped with a Single IMU Sensor. Sensors. 2019;19:5408. doi: 10.3390/s19245408. - DOI - PMC - PubMed
    1. Gineke T.H., Marcel A., Reinders J.T., Hendriks E.A. Multi-dimensional dynamic time warping for gesture recognition; Proceedings of the Thirteenth annual conference of the Advanced School for Computing and Imaging; Heijen, The Netherlands. 13–15 June 2007;
    1. Izakian H., Witold P., Iqbal J. Fuzzy clustering of time series data using dynamic time warping distance. Eng. Appl. Artif. Intell. 2015;39:235–244. doi: 10.1016/j.engappai.2014.12.015. - DOI
    1. Viceconti M., Clapworthy G., Testi D., Taddei F., McFarlane N. Multimodal fusion of biomedical data at different temporal and dimensional scales. Comput. Methods Programs Biomed. 2011;102:227–237. doi: 10.1016/j.cmpb.2010.04.017. - DOI - PubMed

LinkOut - more resources