1. Introduction
Observed time series from a large number of physical processes generally display erratic temporal behavior. In the last decades, various measures of complexity have been proposed to characterize these data and to distinguish regular (e.g., periodic), chaotic, and random dynamics [
1]. A spectral representation based on the Fourier transform is a natural way to describe oscillatory behavior in terms of frequency, magnitude, and phase. Indeed, changes in power spectra of some dynamical systems as they bifurcate to chaos have been documented [
2,
3,
4]. However, although several measures have been proposed to quantify such spectral changes [
2,
5,
6,
7], a close relation between these measures and attractor topology remains unclear and is not supported by numerical simulations [
2,
7]. These open issues already suggest that spectral descriptors alone may miss essential dynamical structure.
This limitation becomes most apparent when distinct mechanisms yield look-alike spectra. It is generally accepted that time series observed from chaotic systems exhibit characteristic signatures such as fractal geometry and broadband frequency content. In particular, time series from chaotic systems often display an exponential decay in their power spectrum at high frequencies, different from the classical power–law behavior of colored stochastic noise [
5,
8,
9]. Nevertheless, some studies have shown that spectra of colored noises cannot be related to the dynamical route to chaos [
10,
11]. In fact, the power spectrum estimated from chaotic sequences can be replicated by a monotonic nonlinear transformation of linearly filtered noise [
12,
13,
14]. Taken together, this evidence indicates that classical spectral analysis alone does not provide adequate information for identifying chaotic systems.
This motivates moving beyond linear spectra toward statistics that capture phase coupling and nonlinear interactions. Although classical spectral analysis is adequate for characterizing linear systems, power spectra cannot reflect the nonlinear interactions between Fourier components of a chaotic motion [
3,
15,
16]. Bispectral techniques have been used to investigate such nonlinear interactions [
15,
16], but several works have shown that higher-order statistics are required for a more complete characterization of chaotic dynamics [
16,
17]. More recently, other nonlinear spectral methods have been proposed to distinguish deterministic from stochastic dynamics in finite time series. The so-called symbol spectrum test developed in Refs. [
18,
19] does not take into account the temporal dynamics of the symbols, but rather the variability of their distribution in the symbolic sequence. The spectrum proposed in Ref. [
20] characterizes, in the frequency domain, the recurrence of a reconstructed trajectory in phase space.
A complementary avenue is to characterize organization directly in state–space and via symbolization. Based on the concept of state–space reconstruction, measures such as entropies, Lyapunov exponents, and fractal dimensions have proved effective to characterize dynamics and, in favorable cases, to reconstruct equations of motion when the underlying model is deterministic [
1,
21]. Alternative nonlinear mapping functions have been proposed to better capture the disorder of a time series through symbolization procedures [
22,
23]. Among these, the method known as ordinal patterns (OP) transforms local order relations among data values and provides a robust estimation of the associated probability distribution function [
24]. This ordinal representation has offered a reliable tool to discriminate, in the time domain, different dynamical regimes in time series [
25,
26,
27]. Coarse-graining approaches [
28,
29], as well as the use of ordinal structures for different time delays [
30], have been proposed to characterize complexity at different temporal scales. These properties make ordinal information a natural candidate to inform a frequency–domain analysis.
Motivated by these considerations, we introduce a frequency–domain tool that explicitly leverages ordinal structure. In this study we introduce the ordinal spectrum of time series. The method is based on a spectral transformation of a symbolic representation of the data; it relies on ordinal patterns and is therefore fully data-driven. In contrast with other nonlinear approaches, the proposed analysis provides a characterization of the data’s complexity in the frequency domain, by identifying the temporal scales implied in a chaotic dynamics. We assess the reliability of the method in distinguishing periodic or random time series from chaotic data, and we evaluate its performance on synthetic and real signals spanning linear, nonlinear, stochastic, and deterministic dynamics. Results suggest a method that may provide new insights into the non-linear oscillations observed in different real data.
2. Materials and Methods
The main steps to estimate the ordinal spectrum from a time series
are summarized in
Figure 1 and detailed in
Box 1; the procedure is as follows.
(i) Ordinal pattern representation of the data. A symbolization procedures maps a time series
onto a discretized sequence of symbols by extracting information from its amplitudes [
31]. Among several symbolization proposals [
32], we consider here the dynamical transformation of ordinal patterns (OP) [
24]. This method maps a time series
with
to a finite number of patterns that encode the relative amplitudes observed in the
D-dimensional vectors
. The elements of
are mapped uniquely onto the permutation
of
that fulfills
.
Box 1. Ordinal spectrum: six-step procedure.
Steps |
(1) Choose embedding parameters and form for . |
(2) Map each to its permutation and obtain the symbolic sequence over the ordinal patterns (). |
(3) Estimate the stationary probabilities and the m-step transition probabilities from . |
(4) Compute the rank autocovariance using Equations (1)–(2). |
(5) Obtain the ordinal spectrum from via Equation (3). |
(6) Assess significance by comparing with IAAFT-surrogate spectra and corrected for multiple comparisons. |
The set of all possible ordinal patterns derived from a time series, representing the whole embedding state space, is denoted by
and has cardinality at most
The entire sequence of OP extracted from
is the symbol sequence
of the series. Higher
D captures more information from the data and increases the number of possible symbols. To sample the empirical distribution of ordinal patterns densely enough for a reliable probability estimation, we follow [
31] and require
The OP symbolization has several practical advantages [
25,
26]: (a) it is computationally efficient; (b) it is fully data-driven, with no assumptions about data ranges to define partitions; (c) it is invariant to monotonic transformations; and (d) small
D is generally useful in descriptive analysis [
24,
31]. Moreover, this representation is relatively robust to noise and useful for weakly stationary series [
25,
31,
33,
34].
Unlike phase-space reconstruction, in ordinal time-series analysis the choice of the embedding dimension D is primarily dictated by computational cost and statistical significance given the available T. The selection of the embedding delay may influence the analysis of correlated data. To mitigate correlation effects, we select as either the first minimum or the zero crossing of the sample autocorrelation function of (the folding time is used in case of monotonic ).
(ii) Capturing information dynamics from the symbolic sequence. To characterize the time evolution of we model it as a homogeneous, ergodic Markov chain with finite state space (the set of distinct available permutations). Let be the set of transition matrices describing the probability of leaving symbol and entering symbol at distance m, i.e., . If the chain is stationary, , where is the invariant distribution satisfying .
(iii) Characterization of symbolic dynamics at different time lags. For a first-order Markov chain, each symbol in
is conditionally independent of all but the immediately previous symbol. However, by construction, each ordinal pattern in
depends on its predecessors, which induces nonzero correlation between
and
even for
. The correlation between
and
is termed the autocovariance at lag
m and, for a Markov chain converging to a unique stationary distribution, it is expected to decrease as
m increases [
35,
36].
We note that, in contrast with numeric signals, symbolic sets have no algebraic structure and algebraic operations are not usually meaningful. To address this, several rules have been proposed to map a symbolic sequence into a numerical domain [
37,
38]. The numerical algorithm used in the OP transformation yields an enumeration of permutations such that each unique ordinal pattern can be associated with a nonnegative integer,
with
[
39,
40]. This enumeration induces a natural order of symbols: the pattern
and
are at maximal distance, representing opposite monotonic behaviors [
40].
On the basis of this representation of patterns as ordered symbols, a rank variance and a rank autocovariance of the Markov chain can be obtained as follows [
35,
36]:
where
. We can also write
, which yields:
(iv) Estimation of the ordinal spectrum. To explore the spectral properties of the ordinal-pattern sequence, the
ordinal spectrum (OS) is obtained from the spectral representation of the autocovariance function defined above [
41]:
Periodicity in time series yields periodic structure in the symbolic sequence and is reflected in an ordinal spectrum with clear peaks. Similarly to its classical counterpart, a random symbolic sequence is decorrelated and exhibits an approximately flat spectrum. The structure of symbolic sequences depends on the temporal correlations of the original time series [
42]; consequently, their symbolic autocovariance and ordinal spectrum are expected to depend on the degree of such correlations. We notice that alternative estimators (e.g., an autoregressive model) can be used to obtain the
from
, depending on the expected bias, variance or spectral resolution [
42].
(v) Detection of relevant scales in the ordinal spectrum. Peaks in the ordinal spectrum could arise from large autocorrelation at certain time lags in the original symbolic sequence
. To rule out this possibility, we compare the ordinal spectrum with those obtained from an ensemble
of surrogate series that replicate the linear autocorrelation and amplitude distribution of
. We use Iterative Amplitude Adjusted Fourier Transform (IAAFT) surrogates [
13,
14], which preserve the autocorrelation function and amplitude distribution while destroying higher-order structure. For each
, we repeat steps
(i)–(iv) to compute a set
. If any value in
is statistically distant from the distribution of
, we reject the null hypothesis of a linear stochastic process. The statistical significance is assessed by a z-test to quantify the statistical deviation from those values obtained in the ensemble of surrogate data (set here to
). All significance tests are set at
with a correction for multiple comparisons (False Discovery Rate [
43]) over frequencies
f.
3. Results
To demonstrate our method, we apply it first to synthetic data generated by a logistic map, defined by the iterative equation
where
r is the bifurcation parameter. This nonlinear map has several transitions in the dynamics occurring during
, with several period-doubling cascades before the onset of chaos at
[
44]. Beyond this value, several isolated ranges of
r display non-chaotic behavior [
44]. For this analysis, each time series consists of
points, after discarding the first 1000 iterations to eliminate transient effects.
Main plots in
Figure 2a,b show that, despite the large peaks observed in the ordinal spectrum, the dynamical properties of the periodic process are not statistically different from those replicated by the surrogate data and thus, the null hypothesis cannot be rejected at any frequency. As expected for chaotic sequences, results in
Figure 2c,d indicate that the ordinal spectrum identifies frequency ranges in which the dynamics significantly deviate from the surrogate data, thereby revealing signatures of increased dynamical complexity.
We also test our method on data generated by the Rössler system whose equations are given by , with control parameter . Similar to the logistic map, Rössler system has several periodic transitions before the onset of chaos at . For larger values of a, some periodic windows can still be observed. Each time series has length , with the first 1000 samples discarded to remove transients.
Figure 3a–c demonstrate that the ordinal spectrum test discriminates between periodic and chaotic regimes. In the periodic cases, the spectra of the original time series are statistically indistinguishable from those of the surrogates, and the null hypothesis cannot be rejected. In contrast, in the chaotic regime, the ordinal spectrum reveals a frequency interval where the dynamics deviate significantly from the surrogate data, indicating the presence of nonlinear correlations not explained by linearly filtered noise. Notably, this distinction is not apparent in the power spectra, which show similar power-law decays for both original and surrogate series.
We also assess the sensitivity of the method to time series length. As shown in
Figure 3d, chaos in the logistic map is consistently detected when
. For the chaotic R"ossler system, the method requires time series longer than approximately ten times the fundamental oscillation period to reliably reject the null hypothesis. For shorter sequences, no statistically significant differences from surrogate data are detected, and the method fails to identify chaos.
In addition to testing across deterministic time series (chaotic or not), we evaluated the method on non-chaotic stochastic data. Here we firstly evaluated a Gaussian noise with distribution and a stochastic process with a power law spectrum where . For each stochastic process, the ordinal spectrum is computed using time series of length .
The results in
Figure 4a,b show that, although the ordinal spectra reflect the temporal correlations of the original series, they are statistically indistinguishable from those obtained from surrogate data. Consistently, the statistical tests do not reject the null hypothesis for either white (uncorrelated) or colored (correlated) noise.
We then analyzed nonlinear systems driven by non-Gaussian noise. The first system was defined as
and
, where noises
,
are iid drawn from the Laplacian distribution
, with
and
. To further evaluate performance under the null hypothesis of nonlinearly transformed stochastic processes, we considered a static nonlinear and non-monotonic transformation
applied to the linear non-Gaussian process
, where
is obtained by squaring a uniform noise with amplitude distribution between
and
[
45]. For these two models, the data length is also set to
, after discarding the first 1000 points.
A clear distinction between chaos and stochastic behavior can be difficult for data generated by nonlinear systems driven by non-Gaussian noises [
13,
14]. Similarly, it is well known that nonlinear transformations may introduce sufficient phase correlations in linearly filtered noises making difficult to identify the stochastic behavior. Results depicted in
Figure 4c,d indicate that the ordinal spectrum, in combination with the IAAFT algorithm, correctly diagnoses the nonlinear and non-Gaussian models as stochastic process, including the static non-monotonic transformation of a non Gaussian random process.
These findings highlight three key points: (i) large peaks in the ordinal spectrum, by themselves, cannot be taken as evidence of chaotic dynamics; (ii) for chaotic time series, the frequency intervals in which the ordinal spectrum significantly deviates from that of surrogate data do not necessarily span the entire frequency range; and (iii) regardless of whether the underlying dynamics are periodic or chaotic, random shuffling of the symbolic sequence invariably yields a flat spectrum. Consequently, statistical tests based solely on shuffled symbolic sequences are insufficient to distinguish chaos from stochastic processes.
Finally, we demonstrate the potentials of our method on real data of different nature: epidemiology (measles and cholera time series [
46]), astrophysics (the sunspots number series) and neuroscience (electroencephalographic data from an epileptic patient). Since the data sets have different lengths, we apply the ordinal symbolic transformation in different embedding dimensions, following the condition
[
26].
The pattern of measles epidemics in several countries is among the best documented population cycles in ecology. Different studies have proposed evidence for low dimensional dynamics in epidemiological time series [
47,
48]. The inset in
Figure 5a shows the monthly cases of measles in Copenhague, Denmark, between 1927 and 1968 [
48]. For this series, our method clearly rejects the null hypothesis of a stochastic process. Consistent with previous findings, the results indicate that measles dynamics cannot be adequately described by conventional linear models, and instead reflect a low-dimensional nonlinear structure.
Interannual cycles in many infectious diseases arise from the interplay between intrinsic and extrinsic factors [
49]. These interactions can generate oscillatory patterns of considerable complexity, including chaos [
50]. The inset in
Figure 5b depicts the monthly deaths from cholera in Dacca, East Bengal between 1891 and 1940 [
51,
52]. Our analysis indicates that the ordinal spectrum captures nonlinear deterministic features in the data, suggesting the presence of low-dimensional dynamics. This result is consistent with earlier mathematical models of seasonally driven epidemics [
50].
Solar activity is governed by the emergence of magnetic flux through the photosphere, forming active regions that include sunspots. While the dominant feature of solar activity is the modulated 11-year cycle [
53], several studies have proposed that the irregular component of sunspot activity reflects low-dimensional chaotic dynamics [
53]. The inset in
Figure 5c shows the monthly mean total sunspot number (the arithmetic mean of the daily total sunspot number over all days of each calendar month) between 1749 and 2020 [
54]. Our method rejects the null hypothesis of stochasticity, in agreement with previous results suggesting that sunspot fluctuations can be described by nonlinear, possibly chaotic, dynamics [
53].
Electroencephalographic (EEG) signals, like many biological and medical time series, exhibit strong nonlinearities during both cognitive and pathological states [
55]. In epilepsy, the dynamical properties of EEG signals can serve as markers of the epileptogenic zone [
56]. We analyzed scalp EEG recordings from a patient with intractable epileptic seizures, obtained at
Hz using a right central (C4) electrode with linked-earlobe reference [
57,
58]. Time series ploted in
Figure 5d,e correspond to data from interictal and ictal (seizure) period, respectively. These results confirm previous findings suggesting that interictal EEG dynamics can be associate to a stochastic process, whereas a low dimensional dynamics characterizes epileptic seizures [
56].
4. Discussion
In this study, we introduced a nonlinear spectral method for characterizing complexity in the frequency domain based on ordinal patterns. Our approach provides a robust framework for distinguishing chaotic fluctuations from stochastic dynamics in finite time series. By comparing the spectral information of the symbolic representation of a time series with that of linearly filtered surrogate data, the method effectively accounts for static nonlinear transformations of linear data and yields reliable results even in the presence of correlated noise or nonlinearly transformed stochastic processes.
We demonstrated that the detection of chaotic oscillations can be successfully addressed through spectral analysis of ordinal symbolic sequences. The main advantages of the proposed method are its simplicity, reliability, and computational efficiency. Being fully data-driven, it does not require prior knowledge of the time series to construct the symbolic representation, making it highly suitable for real-world applications. Furthermore, while our approach is based on ordinal patterns, it can be readily extended to other symbolic representations and alternative spectral analyses derived from symbolic data.
Application to real-world data confirms the practical utility of the method. Our results support the presence of low-dimensional chaotic dynamics in sunspot time series and epidemiological data, such as measles and cholera cases. In neuroscience, EEG recordings during epileptic seizures exhibit complex, low-dimensional dynamics, whereas interictal activity is consistent with stochastic processes. These findings suggest that nonlinear spectral methods provide a more complete characterization of time series, revealing underlying dynamical structures that are not captured by conventional linear or power spectral analyses.
The ordinal spectrum can be particularly useful for capturing nonlinear correlations in signals, with future applications in forecasting of nonlinear time series. Even though in this study we only discuss the case for univariate data, the extension to multivariate cases is straightforward. In particular, extending the ordinal spectrum to a nonlinear cross-spectrum (or coherence) could provide a more comprehensive characterization of complex systems. The original algorithm could also be extended to investigate higher-order statistics (i.e., ordinal higher-order statistics), since its main building blocks rely on the covariance function. Such an extension would allow for the analysis of more intricate dependencies beyond second-order correlations, thereby providing deeper insights into the underlying dynamics of nonlinear systems.
Overall, the proposed approach offers a powerful tool for the analysis of complex oscillatory signals across diverse domains, including biomedical, ecological, financial, and climate systems. By combining symbolic representations with spectral analysis, it enables a deeper understanding of the intrinsic dynamics of time series and provides a rigorous framework for distinguishing chaotic oscillations.