Characterizing Complex Dynamics in the Classical and Semi-Classical Duffing Oscillator Using Ordinal Patterns Analysis

The driven double-well Duffing oscillator is a well-studied system that manifests a wide variety of dynamics, from periodic behavior to chaos, and describes a diverse array of physical systems. It has been shown to be relevant in understanding chaos in the classical to quantum transition. Here we explore the complexity of its dynamics in the classical and semi-classical regimes, using the technique of ordinal pattern analysis. This is of particular relevance to potential experiments in the semi-classical regime. We unveil different dynamical regimes within the chaotic range, which cannot be detected with more traditional statistical tools. These regimes are characterized by different hierarchies and probabilities of the ordinal patterns. Correlation between the Lyapunov exponent and the permutation entropy is revealed that leads us to interpret dips in the Lyapunov exponent as transitions in the dynamics of the system.


Introduction
The question of how classical chaos arises from underlying quantum mechanisms has long been a question of deep fundamental interest. Since closed quantum systems are periodic due to their discrete spectrum, it is unclear how chaos (i.e., exponential sensitivity to initial conditions) emerges in the classical limit. Pioneering theoretical work [1,2] showed that quantum chaotic Poincare sections indicating chaos do in fact arise in open quantum systems (which limit to dissipative classical dynamics). Recent work has extended this to show that this chaos has a smooth quantitative quantum-classical transition [3]. This has been established using the Lyapunov exponent, which is the inverse of the time rate of exponential growth of small differences between two initial conditions (and hence is a measure of the dynamical complexity [4]). This transition also contains complicated non-monotonic behavior as a function of system size [3] for a particular paradigmatic system, the Duffing oscillator. That is, the results show that Duffing oscillators in the semi-classical regime (intermediate size) can display chaos which does not exist in either the classical (large size limit) or quantum (very small size limit) systems. The nature of the transition between the quantum and classical limit seems to be strongly dependent on the dissipation (coupling to the environment) for the system, and in particular on how that dissipation changes the details of the behavior of the classical limit of the system [3], for example whether the dynamics have high order periodic orbits or not.
While the Lyapunov exponent is a definitive measure of chaos and dynamical complexity and relatively straightforward to compute theoretically, this does not translate to experiments because Lyapunov exponents depend on details of phase-space trajectories which are not easy to access experimentally. Even with access to phase-space trajectories, the formal definition requires the ability to start two phase-space trajectories close to each other, and to be able to reset this evolution for one of the trajectories at intervals defined by the evolution itself, while forcing both trajectories to evolve with the same "noise" (due to environmental fluctuations). While experiments rarely allow the ability to control all these aspects of trajectories, they usually allow access to time-series for a single variable. This constraint is particularly of relevance in comparing classical and semi-classical dynamics because the size of the effective phase-space changes in the transition to quantum mechanics (as we discuss in more detail below) and the extremely complicated nature of incorporating quantum measurement and initial condition specification into any quantum system dynamics.
To address these issues, in this paper we present results from using the technique of "ordinal pattern analysis" and permutation entropy for the same semi-classical and classical Duffing oscillator systems as previously studied. We show that this allows us to distinguish quantitatively between different kinds of complexity using only time series data. Thus, this form of analysis complements Lyapunov exponent analysis and is of particular value in understanding quantum dynamical chaos and potential experiments [5] searching for such behavior.
There is a further benefit to using ordinal pattern analysis. Lyapunov exponents are a blunt measure of chaotic dynamics. That is, it is possible to have the same Lyapunov exponent and significantly different chaotic attractors and underlying dynamics. It is similarly possible to have very different Lyapunov exponents but have essentially the same dynamics topologically. This similarity and difference is usually visible only visually in looking at phase-space, and is hard to quantify. As we show below, ordinal pattern analysis reveals a great deal about the underlying dynamics, including transitions hidden from Lyapunov exponent calculations.
We start our paper with an introduction to our model system, the classical and semi-classical Duffing oscillator, followed by a quick review of previous results from Poincaré sections and Lyapunov exponents. We then introduce the new techniques of ordinal pattern analysis and permutation entropy and present our results from a detailed analysis of the behavior of the classical and semi-classical systems as revealed by the new techniques, followed by a final conclusion.

The Duffing Oscillator
The Duffing equation can be used to model various types of damped and driven oscillators. One physical manifestation is that of a clamped cantilever beam which has two magnets creating stable potential wells on each side of the beam with an unstable fixed point at the central location, and with this beam being periodically driven. Nano-electro-mechanical (NEMS) versions of such systems are now experimentally in a regime where semi-classical effects can be seen [6].
The starting point for the full analysis is the stochastic Schrödinger equation for a quantum trajectory of a system in a double-well potential with coupling to an environment that yielding both the environmental noise (fluctuation) and damping (dissipation) effects. The details are available in [3]. The analysis yields a scaling factor β, which is constructed to be dimensionless and arises from the system's parameters of mass m, length l, and natural frequency ω 0 as β 2 =¯h ml 2 ω 0 . There is also a driving force of strength g and frequency ω, as well as a dissipative coupling to the environment Γ. It can be shown that β → 0 yields the classical limiting equation. This limit can be understood as coming simply from increasing the system size (increasing l) for example. In this limit we get the equationẍ which describes a classical particle with position x and momentum p =ẋ. For intermediate length scales, we obtain a semi-classical approximation given by the five equations As for the classical equations, we have the centroid variables x = Q and p = P . However, for the semi-classical system, the centroid variables couple to the spread variables µ = σ QQ , κ = σ PP and . The effect of environmental fluctuations acting on the quantum system is visible via ξ R and ξ I where dξ = dξ R + idξ I is a normalized complex differential random variable satisfying M(dξ) = 0; M(dξdξ * ) = dt where M(·) denotes the mean over realizations.
Previous research [3] has compared the classical and semi-classical chaos in this system using the Lyapunov exponent λ. The bulk of the analysis focused on the situation with fixed ω = 1, g = 0.3, while Γ was varied to explore the different kinds of dynamics visible. The results can be summarized as follows: Classically, as Γ initially increases away from zero the classical orbits remain simply periodic over the double well, with the driving compensating for the dissipation. For Γ ≈ 0.06 there is a transition to chaos. At this stage, the dissipation is large enough such that orbits do not always cross the central potential barrier which can yield chaos since given two nearby orbits, one may cross the barrier while the other does not, leading to drastically different evolution. This persists until Γ ≈ 0.210 after which the high damping restricts the dynamics entirely to one of the wells. While there is some single-well chaos for small window of Γ > 0.210 for sufficiently high damping, there is no complex behavior. Even when the system is mostly chaotic, there are many small windows of regularity, most prominently around Γ ≈ 0.110 for example. Thus we see the system switching between periodic behavior and chaotic attractors as we scan Γ although the differences between different kinds of periodic orbits or between the various chaotic attractors seen are not visible in the value of λ. The semi-classical Lyapunov exponents broadly follow the classical λ as a function of Γ, except that the semi-classical system is less parametrically sensitive to environmental coupling. That is, λ changes less for the semi-classical system as Γ changes (compared to the classical behavior), and there are no abrupt transitions. Remarkably, there are also multiple regimes where the system has classical λ < 0 (no chaos) to semi-classical λ > 0 (chaos) which-contrary to standard intuition-indicates that quantum effects can render a classical regular system chaotic.
Given this intriguing result, it would be useful to find experimentally viable methods of investigating this behavior. In what follows we re-examine the system in this same regime with precisely this aim and using ordinal pattern analysis on the trajectories of the classical and semi-classical Duffing oscillator as we vary Γ.

Ordinal Patterns Analysis and Permutation Entropy
Ordinal pattern analysis [7][8][9][10][11][12] has been shown to be a powerful tool to analyze time series of events, and to explore time correlations and memory. It has been widely used to characterize symptoms in epileptic patients [9], or to classify cardiac biosignals [13], to study EEG signals [14,15], to distinguishing determinism from stochasticity in optical systems [16], to identify hidden time-scales [17], or to understand phase transitions [18]. This symbolic analysis method transforms the original time series into a sequence of patterns, based on the relative size of consecutive events, or inter-event intervals. We can then compute the probabilities of occurrence of the different patterns to study their hierarchy, entropy, or the existence of forbidden patterns.
The first step in ordinal patterns analysis is to take a time series of N events and transform it into a series of N-D time intervals (TI) of dimension D. Then, D consecutive TIs are compared and labeled depending on their relative size, i.e., for dimension D = 2 only two patterns, also referred to as words, are possible: "01" and "10", for TI(i) < TI(i + 1), and TI(i) > TI(i + 1), respectively.
For dimension D = 3, six different words are possible: "012", for T(i) < T(i + 1) < T(i + 2); "021", for T(i) < T(i + 2) < T(i + 1); . . . . This transformation from events to words keeps the information about the time correlations in the sequence of events, and the short-time memory in the system, but it loses the information contained in the duration of the TIs. By computing the probabilities of appearance of the different words we can extract information about the dynamics of the system. For a purely stochastic process we expect all words to be equally probable (1/6 for words of dimension D = 3), while a more spread out distribution of the probabilities would be related to a more deterministic dynamics. Figure 1 depicts a section of a time series of the double-well Duffing oscillator, showing how the events are transformed into words, or ordinal patterns. The position has been normalized so that zero refers to the mid-point between both wells, positive positions correspond to one of the wells and negative positions to the other well. Green squares indicate peak detections, while red circles indicate the crossing from one well to the other. By comparing three consecutive TIs we compute the words of dimension 3. Because, for the three consecutive peaks selected, TI(i) < TI(i + 1) < TI(i + 2) the corresponding word is "012". For the three consecutive crossings all TIs are equal. This reveals a periodic behavior of the system when jumping from one well to the other. The green squares indicate the detection of a peak, and the red dots indicate the crossing from one well to the other. Indicated with black arrows is depicted one word of dimension D = 3 as example. The word is computed with inter-peak intervals. Because TI(i) < TI(i + 1) < TI(i + 2), we designate the word as "012". The orange arrows indicate three consecutive inter-crossing intervals. These time-intervals are equal, indicating certain regularity in the dynamics for crossing from one well to the other.
Once we know the probabilities of the ordinal patterns we can quantify the complexity of the dynamics through the permutation entropy (PE) [7]. This entropy is computed with the probabilities (P i ) of the different words of dimension D, and is normalized so that 0 ≤ PE ≤ 1, as PE has shown to be a helpful parameter in characterizing time series where more traditional parameters are not as conclusive, such as classifying cardiac time series, sleep stages from EEG recordings, or detecting laminar-to-turbulent transitions, among others [14,18? ].

Lyapunov Exponent and Poincaré Sections
Sections of the time series of the system can be seen in Figure 2 for different values of the damping parameter, Γ. The plots show the position of the system versus time. It can be seen how the dynamics for Γ = 0.06 and Γ = 0.23 are periodic with period one, i.e., the system is driven by the periodic forcing. Between those extremes, the system presents a variety of behaviors, with different periodicities and transitions. Because the damping acts against the tendency of the system to jump from well to well, the greater the damping, the longer it takes the system to jump, and the longer it remains in the same well.   Figure 2. Poincaré sections give information of the shape of the chaotic attractor of the system; we plot them computed with the frequency of the external driving. We recover the same results, i.e., for very low and very high damping the system is periodic, and this periodicity is the one of the external forcing; for other values of Γ the system shows a non-periodic behavior, where the chaotic attractor seems to maintain shape while slowly shrinking, as Γ is increased. Figure 4a displays the Lyapunov exponent (λ) of the double-well system versus the damping parameter, Γ. It shows that the system presents a regular behavior for low values of the damping (for Γ < 0.07, λ < 0), but it sharply changes to chaotic behavior, maintained until very high damping (Γ > 0.21), where it becomes non-chaotic again. This is in agreement with Figures 2 and 3. We can see a direct relation between the regions where the Lyapunov exponent is negative and the periodic dynamics as visible in the time series and Poincaré sections.   Figure 2. Horizontal axis corresponds to position, x, and vertical axis to momentum, p. Γ = 0.06 and Γ = 0.23 reflect the periodic behavior while for 0.07 < Γ < 0.21 the system is chaotic. For Γ = 0.21 this recurrence map shows how the system only moves in one of the two wells. Poincaré sections of the system do not indicate any transition in the chaotic regime. The attractor evolves smoothly as the control parameter, Γ, is changed. Figure 4a,b show the Lyapunov exponent versus coupling Γ for the classical (a), and semi-classical (b) Duffing oscillator. As described above, and in agreement with Figures 2 and 3, the system presents a regular behavior for Γ < 0.07 and 0.212 < Γ. Between those limits, the classical Duffing oscillator presents a very diverse behavior. Chaos dominates but windows of periodicity appear. There are abrupt changes from chaos to periodicity and vice versa. As the system increases its coupling to the environment the behavior can be very different for very similar parameters. For the semi-classical Duffing oscillator although the abrupt windows of periodicity are not present, the exponent does resembles the classical one. However, in particular the system shows chaos for all values of coupling, 0.07 < Γ < 0.212. This shows a smoothening of the graph in going from the classical regime to the semi-classical regime.

Ordinal Pattern Analysis of the Classical Duffing Oscillator
For the classical Duffing oscillator, Lyapunov exponents before and after one of the periodicity windows are similar, but we can not tell if the dynamics of the system are similar. In order to study the complex dynamics of the system in more depth we compute the ordinal patterns of dimension 3. Through the ordinal patterns we can explore the system in more detail, as we have now six different parameters to do it. Also, these ordinal patterns can unveil temporal correlations in the system for different Γ regimes.
To compute the words we consider the timing of events in the time series (see Figure 1 for event detection and words computing). These events can be (i) the peaks of the time series (Figure 4c,d, and green squares in Figures 1 and 2); or (ii) the times of the crossings from one well to the other (Figure 4e,f, and red dots in Figures 1 and 2). This analysis shall reveal temporal correlations in the global dynamics (peaks), or in the inter-well dynamics (crossings). Figure 4d,f include a seventh word (dotted line), computed with those inter-event intervals where there are two or three equal consecutive intervals (TI(i − 1) = TI(i), see Figure 1). This periodic seventh word dominates when the system has a periodic-type behavior.
By comparing Figure 4c,d we can see that the dynamics of the semi-classical Duffing oscillator retains a memory of the classical system, as also reflected in the Lyapunov exponent. For the values of Γ where there is chaos in the classical case, the hierarchies of the words probabilities are the same in the semi-classical. For the windows of periodicity in the classical system we can see this periodicity reflected in the appearance of forbidden words, and in the values of the probabilities of the allowed words, i.e., for Γ = 0.11 the probabilities are 1/3 for words "021", "102" and "210", while "012", "120", and "201" are forbidden; for the window of periodicity around Γ = 0.148 the probabilities are 1/4 for "120", 1/5 for "012", "102", and "201", while "021" and "210" are forbidden.
Investigating the word hierarchies of the classical system we see that they are not the same before and after a window of periodicity. This change of hierarchy shows a different chaotic dynamics for those parameters. As we increase the control parameter the system abandons the chaotic behavior to show periodicity, and when the systems returns to chaos it performs a different type of dynamics. The ordinal patterns probabilities indicate that the system does not explore the same region of the attractor before and after the periodicity window, even though the parameters of the system and the Lyapunov exponent are very similar. This changes in behavior is not evident if we only use the Lyapunov exponent.
All the sharp drop-outs and spikes in the words probabilities correspond to the Γ values where the system leaves chaos, as seen with Lyapunov exponent. Thus we do not need to calculate Lyapunov exponents to distinguish when the system is chaotic or periodic, and further this ordinal pattern analysis also reveals when, for the same Lyapunov exponent, the system performs a different dynamics.

Ordinal Pattern Analysis of the Semi-Classical Duffing Oscillator
The semi-classical system is more interesting, as there are no windows of periodicity to indicate a drastic change in behavior, but we can also see the change in the hierarchies of the words. We can determine six different regions depending on the type of dynamics described by the words probabilities (see Figure 4d).
Regions I (Γ < 0.07), and VI (0.212 < Γ), correspond to non-chaotic dynamics, in agreement with the time series (Figure 2), Poincaré sections (Figure 3), and Lyapunov exponent (Figure 4a, λ < 0). This is also indicated by the presence of the seventh word, which contains equal consecutive inter-event intervals. The abundance of this seventh word is a signature of periodicity, and its probability is one, or almost one, for regions I and VI in the peaks, and for region I for the crossings (there are no crossing events in region VI, where damping dominates such that the system remains in the same well and can not cross the central barrier). In regions I and VI the forcing is driving the system.
In region I two differentiated regimes can be seen. For some values of Γ only the seventh word is present (completely periodic dynamics), while for other Γ values some other words have non zero probability, although small compared to the seventh word (see Figure 5). For region II (0.07 < Γ < 0.11) in Figure 4b, the words probabilities present two differentiated groups, with the words "012" and "210" being less probable than average, and the rest more probable than the average. The less probable words are those that keep a persistence, as they are formed with consecutive increasing ("012") and consecutive decreasing ("210") time intervals. In this region, therefore, the most probable patterns are those that present up-down, time-oscillatory behavior. This is a signature of the proper frequency of the system competing with, but being dominated by, the external forcing. This hierarchy of the words can also be found in a chaotic optical system. A diode laser with optical feedback and external periodic forcing, in the regime where the external forcing is the dominant term, also shows this hierarchy of the words (see Figure 4 of [16]). This is in agreement with the fact that in region II of Figure 4 forcing is dominant over damping.
Region III (0.11 < Γ < 0.15) shows a different dynamic regime. The hierarchy of the words is different from the one in region II. The words probabilities are more spread out. This is related with a more deterministic, less stochastic, behavior. As the damping is increased, the system spends more time in each well before jumping to the other well. The in-well dynamics becomes more relevant with respect to the inter-well dynamics, as the damping increases. The transition between region II and region III is sharp, at Γ = 0.11, and it is characterized by an increase of the periodicity of the system, despite being still in a chaotic regime (λ > 0). The seventh word is the most relevant in the crossings and it increases considerably in the global, peaks dynamics (to 0.2). Looking at the behavior of the Lyapunov exponent (Figure 4b), while still positive, we see a dip right where the words indicate a transition in the dynamical behavior.
For region IV (0.151 < Γ < 0.21) the word "012", consecutive more spaced time intervals, is more likely to happen than the others, while the word "210", consecutive less spaced time intervals, remains among the less probable words. In this region, for the largest values of Γ, the system begins to lose information of the crossings; it spends increasing amounts of time, as Γ increases, in one well and it rarely jumps to the other well. Therefore, the hierarchy of the words in the peaks has a negligible influence from the second well. There is also an increase in the underlying periodicity of the dynamics (seventh word) as the system reduces its jumps from well to well.
Region V corresponds to the transition from chaotic to regular behavior (λ goes from positive to negative). All the dynamics is due to a single well, as there are no crossings in this regime (see Figure 4f). The damping does not allow the system to jump between wells. The words distribution in regions V and VI is due only to the topology of the attractor of one of the wells. Here the word "012" in the peaks dynamics, that was the most probable in region IV, becomes less probable than average, together with "210". This means a loss of persistence in the dynamics, just as in region II. Indeed, the hierarchy of the words is the same as in region II, besides the fact that the seventh word becomes increasingly relevant as the system transitions to the non-chaotic behavior. The fact that regions II and V have the same hierarchies of the words can be interpreted as similar behavior of the system. In region II the damping is small and the barrier between wells has a small effect compared with the overall energy of the system, i.e., the system behaves as in a single well. In region V, damping is strong and the system is bounded to a single well from which it can not escape. Finally, as the damping becomes more and more intense the system becomes more periodic, until it is finally free of chaos. Region VI corresponds to the non-chaotic dynamics of one well with external forcing and large damping.
Because the seventh word contains signatures of periodicity, it is clear that when its probability is high the dynamics has a relevant regular component. This regular signature can also appear underlying the chaotic region. Indeed it happens for the crossings at the transitions between regions I-II, II-III, and III-IV. The peaks also capture this increase of word seven for the transitions I-II, II-III and V-VI.
Looking at the Lyapunov exponent right at these transitions unveiled by the ordinal patterns, we can interpret the dips in the exponent as changes of the underlying chaotic dynamics. Dips 1, 2 and 4 in Figure 4b correspond to transitions II-III, III-IV, and V-VI, the latter being the transition from chaos to non-chaos. Also, dip 3 is reflected in the increase of the seventh word of the peaks, which reflects a more regular behavior. Figure 6 shows the Lyapunov exponent (a) and the PE computed with words of dimension 3 for the semi-classical system (the seven different words used in Figure 4) for the peaks (b) and the crossings (c). PE captures qualitatively the variations of the Lyapunov exponent for low to intermediate Γ.

Permutation Entropy and Relation with Lyapunov Exponent
For intermediate to high Γ the crossings can not capture any changes in the dynamics, as there are not enough crossings. But the permutation entropy of the peaks do capture the complex transitions in dynamics reflected in the words probabilities in this regime. Thus PE not only complements Lyapunov exponent calculation, but it also goes beyond in exposing the complexity of a dynamical system.

Conclusions
We have studied the complex dynamics of the classical and semi-classical double-well Duffing oscillator, using the techniques of ordinal patterns analysis and permutation entropy. We have shown that these techniques quantitatively indicate the same transitions between chaos and regular behavior as the better-known technique of Lyapunov exponent, as a function of Γ, the coupling to the environment, as well as as a function of β, a measure of the system size. However, these techniques deployed here only need a single (even if noisy) time-series from a single observable, which is significantly simpler to access in experimental situations.
We have also seen that the system performs different dynamics as we vary the damping of the system. These different dynamics are not revealed by the Lyapunov exponent, but the ordinal patterns clearly detect the transitions in the dynamics, indicated by different hierarchies of the patterns in the different regimes revealed.
We have studied the dynamics by looking at two different types of events: the peaks of the time series, that capture the global dynamics of the system; and the crossings of the system from one well to the other well, that focuses in the inter-well dynamics. The hierarchies of the words are different in each set of events (peaks or crossings), but the regions and the transitions are revealed with both.
While the classical Duffing oscillator presents windows of periodicity, and the semi-classical displays chaos for the most of the parameter region analyzed, the semi-classical system remembers the classical through the Lyapunov exponent and the hierarchies of words. But the ordinal analysis can detect transitions and distinguish between dynamics, even when the system does not transition in and out of regular dynamics, and even when the Lyapunov exponents are only slightly altered.
By computing the permutation entropy of dimension 3 for peaks and crossings we have seen a relationship between PE and Lyapunov exponent that lets us conclude that the dips in the latter indicate transitions in the underlying chaotic dynamics. These transitions and changes in the dynamics can not be detected by exploring the time series or the Poincaré sections.
All of the above shows that the techniques of ordinal patterns analysis and permutation entropy are a computationally simple and reliable tool to explore the complexity of a system's dynamics.