# Recurrence period density entropy

Recurrence period density entropy (RPDE) is a method, in the fields of dynamical systems, stochastic processes, and time series analysis, for determining the periodicity, or repetitiveness of a signal.

## Overview

Recurrence period density entropy is useful for characterising the extent to which a time series repeats the same sequence, and is therefore similar to linear autocorrelation and time delayed mutual information, except that it measures repetitiveness in the phase space of the system, and is thus a more reliable measure based upon the dynamics of the underlying system that generated the signal. It has the advantage that it does not require the assumptions of linearity, Gaussianity or dynamical determinism. It has been successfully used to detect abnormalities in biomedical contexts such as speech signal.[1][2]

The RPDE value ${\displaystyle \scriptstyle H_{\mathrm {norm} }}$ is a scalar in the range zero to one. For purely periodic signals, ${\displaystyle \scriptstyle H_{\mathrm {norm} }=0}$, whereas for purely i.i.d., uniform white noise, ${\displaystyle \scriptstyle H_{\mathrm {norm} }\approx 1}$.[2]

How RPDE ranks signals by their phase space periodicity. The small panels are depictions of the time series, and the large scale in the middle is the RPDE value. It can be seen that purely periodic signals, regardless of harmonic content in a spectral sense, have an RPDE value of zero. Randomly forced periodic oscillation has a higher value, followed by chaotic systems, randomly forced linear resonators, autocorrelated random processes, and at the extreme, uniform random noise has an RPDE value of nearly one.

## Method description

The RPDE method first requires the embedding of a time series in phase space, which, according to stochastic extensions to Taken's embedding theorems, can be carried out by forming time-delayed vectors:

${\displaystyle \mathbf {X} _{n}=[x_{n},x_{n+\tau },x_{n+2\tau },\ldots ,x_{n+(M-1)\tau }]}$

for each value xn in the time series, where M is the embedding dimension, and τ is the embedding delay. These parameters are obtained by systematic search for the optimal set (due to lack of practical embedding parameter techniques for stochastic systems) (Stark et al. 2003). Next, around each point ${\displaystyle \scriptstyle \mathbf {X} _{n}}$ in the phase space, an ${\displaystyle \varepsilon }$-neighbourhood (an m-dimensional ball with this radius) is formed, and every time the time series returns to this ball, after having left it, the time difference T between successive returns is recorded in a histogram. This histogram is normalised to sum to unity, to form an estimate of the recurrence period density function P(T). The normalised entropy of this density:

${\displaystyle H_{\mathrm {norm} }=-(\ln {T_{\max })}^{-1}\sum _{t=1}^{T_{\max }}P(t)\ln {P(t)}}$

is the RPDE value, where ${\displaystyle \scriptstyle T_{\max }}$ is the largest recurrence value (typically on the order of 1000 samples).[2] Note that RPDE is intended to be applied to both deterministic and stochastic signals, therefore, strictly speaking, Taken's original embedding theorem does not apply, and needs some modification.[3]

Pictorial description of the calculations required to find the RPDE value. First, the time series is time delay embedded into a reconstructed phase space. Then, around each point in the embedded phase space, a recurrence neighbourhood of radius ${\displaystyle \scriptstyle \varepsilon }$ is created. All recurrences into this neighbourhood are tracked, and the time interval T between recurrences is recorded in a histogram. This histogram is normalised to create an estimate of the recurrence period density function P(T). The normalised entropy of this density is the RPDE value ${\displaystyle \scriptstyle H_{\mathrm {norm} }}$.

## RPDE in practice

RPDE has the ability to detect subtle changes in natural biological time series such as the breakdown of regular periodic oscillation in abnormal cardiac function which are hard to detect using classical signal processing tools such as the Fourier transform or linear prediction. The recurrence period density is a sparse representation for nonlinear, non-Gaussian and nondeterministic signals, whereas the Fourier transform is only sparse for purely periodic signals.

RPDE values ${\displaystyle H_{norm}}$ for normal sinus rhythm ECG, and for ECG from a patient with sleep apnoea. The time series (plots with blue traces) and spectra (plots with black traces) are relatively difficult to distinguish, nonetheless, the RPDE values are sufficiently different that detection of the abnormality is straightforward.