Despite what Newton’s laws suggest, physical systems do not respond instantaneously. Real systems generally have a non-instantaneous response, which can be mathematically described by a time-delayed term in the equation of motion representing them [1,2,3,4,5,6,7,8]. Already a simple constant time delay can result in complex behavior, such as delay-induced bifurcations [9,10,11] and chaos [12, 13]. The more general classes of distributed time delays [14,15,16,17,18], time-varying delays [19,20,21,22,23] and state-dependent delays [24, 25] can also lead to a rich phenomenology. Beyond their fundamental relevance, time-delayed systems are also relevant to many applications in computation and machine learning [26,27,28,29,30,31,32], sensing [33,34,35], and chaos-based communication [36,37,38]. While a number of systems with nonlinear time delay have garnered strong interest [22, 39,40,41,42], most efforts in the field have focused on systems with time delay in their linear response.

Fig. 1
figure 1

a Schematic of our optical setup. Two electro-optical modulators (EOM) add noise to the laser amplitude and phase. The laser light is then focused on an oil-filled optical microcavity using microscope objectives. The transmitted light is measured using a photodetector (PD). b Transmitted intensity while opening and closing the cavity (black circles), averaged over 20 cycles, for a laser power of 7.8 mW at the excitation objective. Yellow solid (dashed) curves show stable (unstable) steady-state solutions of Eq. (1). Green solid curve shows a dynamical simulation while scanning \(\Delta /\Gamma \), with \(F=10.7\sqrt{\Gamma }\). Inset: Schematic of an oil-filled optical microcavity. c Transmitted intensity (black) when the input laser is modulated by a chopper, creating a step function in the intensity (yellow). Inset: Zoom of overshoot. Green line indicates the full-width half-maximum of the overshoot, which is 5 \(\upmu \)s. d Simulation of Eq. (1) when increasing F from 0 to \(7\sqrt{\Gamma }\) at \(\Gamma t=5000\), with \(\Delta =1.4\Gamma \). Inset: Zoom of the overshoot. Green line indicates the width of the overshoot, which is \(\tau /2\)

Optical systems, and particularly lasers, have enabled numerous studies of the physics emerging from a time-delayed response [43,44,45,46,47,48,49,50,51,52]. Recently, coherently-driven thermo-optical nonlinear cavities have also attracted strong interest in this context. They offer a convenient platform for probing the effects of a distributed time delay, or memory, in the nonlinear optical response [53,54,55,56]. In this case, the nonlinear optical response is time-delayed because it is coupled to a slow variable, i.e., the temperature of the nonlinear medium in the cavity. From the perspective of the full system (optical plus thermal degrees of freedom), the evolution is local in time. Nonetheless, the slow dynamics of the temperature can lead to a rich phenomenology for the optical degrees of freedom. For instance, recent experiments with a thermo-optical nonlinear cavity revealed a universal scaling law for hysteresis phenomena [55], and an enlarged bandwidth for noise-assisted amplification of periodic signals [56]. Motivated by these recent findings of fundamental and practical relevance, we hereby explore the physics emerging as the memory time of the system is varied. We do this for a thermo-optical nonlinear cavity as well as for a noise-driven mechanical oscillator with memory in its nonlinear response. In both cases, we demonstrate the emergence of stable limit cycles when the delay time is commensurate with the inverse dissipation rate of the oscillator. For the mechanical oscillator, we also discover a chaotic regime associated with a double scroll attractor, occurring for larger delay times. Our results have implications for nonlinear vibration energy harvesters [57], which can be improved by a nonlinear response with memory. We stress that the type of distributed time delay, or memory, we consider can be explained fully in terms of an instantaneous response of a higher-dimensional dynamical system. However, the dynamical variable of interest (optical or mechanical) displays effective memory effects due to its coupling to a slow variable.

Let us first demonstrate, experimentally, the existence of a distributed time-delayed optical response of an oil-filled optical microcavity. Figure 1a illustrates our experimental setup: a tunable Fabry–Pérot cavity filled with macadamia oil and driven by a 532 nm continuous wave laser. The cavity (Fig. 1b inset) is made by a planar and a concave mirror. The planar mirror comprises a 60 nm silver layer on a glass substrate. The concave mirror has a diameter of 7 \(\upmu \)m and a radius of curvature of 12 \(\upmu \)m. It is fabricated by milling a glass substrate with a focused ion beam [58], and then coating it with a distributed Bragg reflector (DBR). The DBR has a peak reflectance of 99.9% at the center of the stopband, located at 530 nm. Thanks to micron-scale dimensions of the concave mirror strongly confining the optical modes, we can probe a single mode when scanning the cavity length across a wide (\(> 10\) nm) range.

In a frame rotating at the frequency of the driving laser \(\omega \), the light field \(\alpha \) in our cavity satisfies:

$$\begin{aligned} i {\dot{\alpha }}(t)= & {} \left[ -\Delta - i\frac{\Gamma }{2} + U \int _0^t \mathrm{d}s\,K(t-s)|\alpha (s)|^2\right] \alpha (t)\nonumber \\&+ i \sqrt{\kappa _L}F+ \frac{D}{\sqrt{2}} \left[ \xi _\mathrm {R}(t) + i \xi _\mathrm {I}(t) \right] . \end{aligned}$$
(1)

\(\Delta =\omega -\omega _0\) is the laser-cavity detuning, with \(\omega _0\) the cavity resonance frequency. \(\Gamma =\gamma +\kappa _\mathrm {L}+\kappa _\mathrm {R}\) is the total dissipation rate, with \(\gamma \) the intrinsic loss rate, and \(\kappa _\mathrm {L}\) (\(\kappa _\mathrm {R}\)) the input-output coupling rate through the left (right) mirror. U quantifies the strength of the cubic nonlinearity, corresponding to effective photon-photon interactions in optical systems. The memory kernel \(K(t)=\mathrm {exp}\left( -t/\tau \right) /\tau \) accounts for the non-instantaneous nonlinear response of our cavity, with memory time \(\tau \). \(\tau \) is the time in which the temperature of the oil relaxes to a steady state when the laser amplitude F changes. The term \(D\xi (t)=D[\xi _\mathrm {R}(t)+i\xi _\mathrm {I}(t)]/\sqrt{2}\) represents Gaussian white noise with variance \(D^2\) in the laser amplitude and phase. \(\xi _\mathrm {R,I}(t)\) each have zero mean [i.e., \(\langle \xi _\mathrm {R,I}(t) \rangle = 0\)], and are delta-correlated with unit variance [i.e., \(\langle \xi _\mathrm {R,I}(t) \xi _\mathrm {R,I}(t+t') \rangle = \delta (t')\)]. Moreover, \(\xi _\mathrm {R}(t)\) and \(\xi _\mathrm {I}(t)\) are mutually uncorrelated. While (shot) noise with these properties is inherent to laser light, a controlled amount of noise with the same characteristics can be added by passing the laser through amplitude and phase electro-optical modulators (EOMs) [56]. The spectral density of the amplitude noise can be directly assessed by Fourier transforming a time-resolved measurement of the laser intensity. Meanwhile, the phase noise can be similarly assessed by interfering the laser light with itself at the detector, with the help of a beam splitter. Such an interferometric approach translates phase fluctuations into intensity fluctuations, thereby allowing for a full characterization of the noise.

The time integral in Eq. (1) implies that the nonlinear optical response of our cavity is non-local in time. This temporal non-locality arises because we are restricting our attention to the optical degrees of freedom, e.g., amplitude and phase of light. However, Eq. (1) can also be written as a three-dimensional (3D) system of ordinary differential equations (ODEs). Thus, by increasing the dimensionality of our system by one and accounting for the dynamics of a new variable (the temperature of the oil in our case), the response of the full system becomes instantaneous. Writing Eq. (1) as a 3D system of ODEs is also convenient for numerical simulations. Hence, we rewrite Eq. (1) as follows:

$$\begin{aligned} \begin{aligned} {\dot{\alpha }}_\mathrm {R}(t)&= -\frac{\Gamma }{2}\alpha _\mathrm {R}(t) + \left[ w(t)-\Delta \right] \alpha _\mathrm {I}(t) + \sqrt{\kappa }F + D\xi _\mathrm {R}/\sqrt{2}\\ {\dot{\alpha }}_\mathrm {I}(t)&= -\frac{\Gamma }{2}\alpha _\mathrm {I}(t) - \left[ w(t)-\Delta \right] \alpha _\mathrm {R}(t) + D\xi _\mathrm {I}/\sqrt{2}\\ {\dot{w}}(t)&= \left\{ U\left[ \alpha _\mathrm {R}^2(t)+\alpha _\mathrm {I}^2(t)\right] - w(t) \right\} /\tau . \end{aligned} \end{aligned}$$
(2)

\(\alpha _R\) and \(\alpha _I\) are the real and imaginary parts of \(\alpha \), respectively, such that \(\alpha =\alpha _R + i\alpha _I\). \(w=\int _0^t \mathrm{d}s\,K(t-s)|\alpha (s)|^2\) is the new variable, which accounts for the temperature of the oil in our cavity. Equation (2) can now be solved numerically using standard techniques for stochastic ODEs. We used the xSPDE Matlab toolbox [59] and a fourth-order Runge–Kutta algorithm for solving Eq. (2) and other equations ahead.

For strong driving (large F), the cavity supports optical bistability: two stable steady states with different intra-cavity intensity \(|\alpha |^2\) at a single driving condition. To evidence bistability, we measure the transmitted intensity while scanning the cavity length (and hence \(\Delta \)) forward and backward. The black curve in Fig. 1b shows the result when the laser power is 7.8 mW at the excitation objective. We observe a large optical hysteresis, and bistability occurs in the \(1.5 \lesssim \Delta /\Gamma \lesssim 5\) range. We also observe a large overshoot around \(\Delta /\Gamma =1.5\), which is due to the non-instantaneous thermo-optical nonlinearity of the oil-filled cavity. The solid (dashed) yellow curve in Fig. 1b shows stable (unstable) steady-state solutions, obtained by setting \({\dot{\alpha }}=0\) in Eq. (1). These steady-state calculations reproduce the bistability, but not the overshoot. In contrast, dynamical simulations of Eq. (2), shown as solid green curves in Fig. 1b, reproduce our experimental observations including the overshoot. The overshoot arises when the duration of the scan is similar to or less than the thermal relaxation time of the oil [55], which is the case in our experiments.

Figure 1c, d further evidence the non-instantaneous nonlinear optical response of our cavity. The black curve in Fig. 1c represents the transmitted intensity when modulating the laser power in a step-like fashion, as shown by the yellow curve. Prior to the step, the laser is blocked and the transmission is zero. Immediately after the step, the transmission first increases to a low intensity state. Then, the nonlinearity gradually builds up due to the laser-induced heating of the oil. This results in a slow increase of the transmitted signal. Finally, after the nonlinearity has sufficiently built up, the transmitted intensity displays a large overshoot followed by relaxation to a high intensity steady state. In Fig. 1d we numerically reproduce our experimental observations using Eq. (2). From our calculations we find that the full-width at half-maximum of the overshoot, indicated by the green line in the Fig. 1c inset, is \(\tau /2\) regardless of the cavity parameters. Based on this finding, we deduce that \(\tau =10\) \(\upmu \)s in our cavity.

Fig. 2
figure 2

a Bifurcation diagram as function of \(\Gamma \tau \). Vertical yellow lines indicate the phase space trajectories in ce. Vertical green line corresponds to the value of \(\Gamma \tau \) used in b. Bifurcation diagram as function of \(F/\sqrt{\Gamma }\) for \(\Gamma \tau =1\). Inset: \(|\alpha |^2\) as function of \(F/\sqrt{\Gamma }\) in the limit \(\tau \rightarrow 0\). Solid (dashed) line corresponds to stable (unstable) steady-state solutions. Gray area corresponds to range wherein limit cycles are observed. Parameters: \(U{=}\Gamma /40\), \(F{=}56\sqrt{\Gamma }\), \(\Delta {=}6\Gamma \), \(D{=}0\)

Next we explore the effect of changing the thermal relaxation time \(\tau \) in our optical cavity. This is much more easily done numerically than experimentally. Hence, we leverage the good agreement between our model and experiments to investigate this effect numerically. Figure 2a shows a bifurcation diagram for Eq. (2) as we vary \(\Gamma \tau \) for fixed \(\Delta =6\Gamma \) and \(F=56\sqrt{\Gamma }\). We plot the values of \(\alpha _\mathrm {R}=\Re \left[ \alpha \right] \) where the phase space trajectory crosses the manifold \(\alpha _\mathrm {I}=\Im \left[ \alpha \right] =0\) with \({\dot{\alpha }}_\mathrm {I}>0\). For \(\Gamma \tau \ll 1\) the nonlinearity is effectively instantaneous and the intracavity field quickly relaxes to its steady state. However, for \(\Gamma \tau \sim 1\) stable limit cycles emerge. For \(\Gamma \tau <0.25\) we observe a single point for all \(\Gamma \tau \), indicating a period-1 limit cycle (see Fig. 2c). Near \(\Gamma \tau =0.25\) and \(\Gamma \tau =0.5\) we observe a period-doubling bifurcation leading to period-2 (Fig. 2d) and period-4 (Fig. 2e) limit cycles, respectively. For \(\Gamma \tau \gg 1\) the system effectively behaves linearly and no limit cycles are observed. Figure 2b shows a bifurcation diagram as function of \(F/\sqrt{\Gamma }\). Stable limit cycles are only observed above the bistability range, indicated by the gray area in the inset.

The results presented above and in References [55, 56] motivate us to explore more generally, beyond the realm of optics, the effects of a non-instantaneous nonlinearity. In this spirit, we consider a mechanical oscillator with non-instantaneous Duffing-type nonlinearity. The Duffing oscillator is a cornerstone of nonlinear dynamics. While the Duffing oscillator has a cubic nonlinearity identical to the one of our thermo-optical cavity in the \(\tau \rightarrow 0\) limit, there are important differences between the two models worth to explore. These differences lead to qualitatively different behavior, as explained below.

Our nonlinear mechanical oscillator with memory satisfies the following equation of motion:

$$\begin{aligned} m\ddot{x}(t)=\left( a-b\int _0^t \mathrm{d}s\;K(t-s)x(s)^2\right) x(t)-\gamma {\dot{x}}(t) + D\xi (t).\nonumber \\ \end{aligned}$$
(3)

m is the mass of the oscillator and \(\gamma \) its dissipation. a and b define the potential \(V(x)=-ax^2/2+bx^4/4\) in the limit \(\tau \rightarrow 0\). We set \(a>0\) and \(b>0\), such that V(x) is a double-well potential. We describe the memory with the same kernel function \(K(t)=\mathrm {exp}\left( -t/\tau \right) /\tau \) (memory time \(\tau \)) used to describe our oil-filled cavity.

To simulate Eq. (3) it is convenient to define the variables \(w=b\int _0^t \mathrm{d}s\;K(t-s)x(s)^2\) and \(v={\dot{x}}\). This allows us to write Eq. (3) as a set of 3 ODEs, like we did for the thermo-optical cavity. Hence, we have

$$\begin{aligned} \begin{aligned} {\dot{x}}&=v,\\ m{\dot{v}}&=\left( a-w\right) x-\gamma v+D\xi (t),\\ {\dot{w}}&=\left( bx^2-w\right) /\tau . \end{aligned} \end{aligned}$$
(4)

By comparing the above equations to Eq. (2), we can immediately recognize important differences between the two systems. First, notice that Eq. (3) describes a single underdamped oscillator with memory. Consequently, in Eq. (4), the velocity \({\dot{x}}=v\) is only coupled to the acceleration \(m{\dot{v}}\) but not to w. In contrast, Eq. (2) shows that a single optical mode corresponds to two coupled overdamped oscillators. The overdamped (in a frame rotating at the laser frequency) optical degrees of freedom are the real and imaginary parts of the field \(\alpha \), namely \(\alpha _R\) and \(\alpha _I\). Since \(\alpha _R\) and \(\alpha _I\) are mutually coupled by the nonlinear term containing the slow variable w, all three degrees of freedom are directly mutually coupled in the thermo-optical system. Clearly, the adjacency matrices (connectivity) of the mechanical and thermo-optical systems are different. Hence, we may expect significantly different phase space structure and emergent behavior.

Fig. 3
figure 3

Simulations of an oscillator with Duffing-type nonlinearity with memory. \(\gamma \) is the dissipation rate and \(\tau \) is the memory time. ac show position as function of time for \(\gamma \tau =10^{-2}\), \(\gamma \tau =3\), and \(\gamma \tau =20\), respectively. df show the phase space trajectories for trajectories of duration \(\gamma t=10^3\). The color plot in the xv plane is a 2D histogram built from a trajectory of duration \(\gamma t=10^4\). Simulation parameters: \(\gamma =1\), \(a=1\), \(b=a/10\), \(m=10a\gamma ^{-2}\), \(D^2=\gamma \)

Fig. 4
figure 4

a Bifurcation diagram as function of \(\gamma \tau \). Vertical yellow lines indicate the phase space trajectories in bd. Inset: Zoom of region in the green rectangle. Parameters are as in Fig. 3 with \(D=0\)

Fig. 5
figure 5

a Power spectral density of an oscillator with Duffing-type nonlinearity having distributed time delay. \(\gamma \) is the dissipation rate and \(\tau \) is the memory time. b Enhancement of the root-mean-squared displacement with respect to \(\gamma \tau =10^{-2}\) as function of \(\gamma \tau \). Parameters are as in Fig. 3

Let us now investigate how the dynamics of our nonlinear mechanical oscillator depend on the memory time \(\tau \). In Fig. 3a we plot a trajectory of x for \(\gamma \tau \ll 1\), i.e., in the limit of an instantaneous nonlinear response. This and all calculations ahead are obtained by solving Eq. (4) numerically with time increments \(\Delta t=\gamma ^{-1}/100\). Figure 3a shows random transitions between the two minima of V(x), located at \(x_\pm =\pm \sqrt{a/b}\). This is the typical behavior of a bistable system. Figure 3d shows the corresponding trajectory in phase space. The projection of that trajectory on the xv plane shows the expected behavior for a noise-driven Duffing oscillator without memory. Figure 3b, e show a typical trajectory in time and phase space, respectively, when \(\gamma \tau \gtrsim 1\). In that case, we observe stable limit cycles with an amplitude far exceeding the distance between the two minima of V(x). The limit cycles arise due to a Hopf bifurcation near \(\gamma \tau = 1\). Finally, for certain ranges of \(\gamma \tau >1\), the dynamics become chaotic. An example of this chaotic regime is shown in Fig. 3c, f. Notice in Fig. 3f the characteristic shape of the double scroll attractor, indicative of chaos [60].

Figure 4a shows a bifurcation diagram for our mechanical oscillator as \(\gamma \tau \) increases, similar to what we showed for the optical cavity. We plot the x-values where the phase space trajectory crosses the manifold \(v=0\) with \({\dot{v}}>0\). For \(\gamma \tau <13.6\) we observe a single point for each \(\gamma \tau \), indicating a period-1 limit cycle (Fig. 4b). Near \(\gamma \tau =13.6\) we observe a bifurcation, whereafter a period-2 limit cycle arises (Fig. 4c). Finally, for \(\gamma \tau >16.5\) we observe the double scroll attractor characteristic of deterministic chaos. The figure as a whole (and the inset in more detail) shows the typical cascade of period-doubling bifurcations leading to chaos. Notice that we also observe periodic windows in between chaotic regimes, occurring within certain ranges of \(\gamma \tau \). We would like to point out that we did not find chaotic dynamics in the optical resonator, despite the fact that we searched for them across a wide parameter range (not shown here). This may be due to the fundamental differences in the equations of motion of the two systems, as we explained above.

Recently, nonlinear oscillators have attracted great interest for potential applications to vibration energy harvesting [57, 61,62,63,64,65]. Many efforts in this direction emerged from the seminal work of Cottone et al. [57], who demonstrated the superior energy harvesting capabilities of a Duffing oscillator relative to a linear oscillator. The enhanced performance was associated with the wider spectral response of the Duffing oscillator. Indeed, while the linear oscillator only efficiently harvests energy from noise with frequency close to the resonance frequency, the nonlinear oscillator can harvest energy across a larger bandwidth in the regime of bistability. This suggests that an oscillator with a wide frequency response, as expected for example in a chaotic regime, could be ideal for energy harvesting. In this vein, we analyze the spectral response and the root-mean-square (RMS) displacement of our nonlinear oscillator with memory. While previous works have considered energy harvesting with nonlinear oscillators, to the best of our knowledge this is the first time that the effects of memory in the nonlinearity on energy harvesting are studied.

Figure 5a shows the spectral response of our nonlinear oscillator for different \(\tau \). The spectra are obtained by Fourier transforming the time traces in Fig. 3. For \(\gamma \tau =10^{-2}\), the orange curve shows a single shallow peak near the resonance frequency \(\omega _\pm \) for the \(\tau =0\) case. The peak deviates slightly from \(\omega _\pm =a/m\) because of the finite \(\tau \) in our system. Moving on to \(\gamma \tau =3\), the black curve in Fig. 5a reveals a strong peak at \(f/\gamma \approx 0.09\). This peak corresponds to the large amplitude limit cycle oscillations observed in Fig. 3b. We also notice a peak around \(f/\gamma \approx 0.27\), due to the oscillations not being purely sinusoidal. Moving on to the chaotic regime (\(\gamma \tau =20\)), the green curve in Fig. 5a no longer shows any well-resolved resonances. This is expected based on the fact that chaotic dynamics can involve a wide range of frequency components. However, Fig. 5a shows that the power spectrum for the chaotic oscillator decays significantly at high frequencies. Thus, it may not necessarily be the case that chaotic dynamics are advantageous for energy harvesting. To assess the frequency-integrated effect of the memory time more carefully, let us analyze the RMS displacement \(x_\mathrm {rms}\) of the oscillator.

Figure 5b shows \(x_\mathrm {rms}\) normalized to the average value in the small \(\tau \) limit, \(\left\langle x^0_\mathrm {rms}\right\rangle \), as function of \(\gamma \tau \). We observe that \(x_\mathrm {rms}/\left\langle x^0_\mathrm {rms}\right\rangle \approx 1\) in the Markovian limit (\(\gamma \tau \ll 1\)), where memory effects are irrelevant. In contrast, the RMS displacement is greatly enhanced for \(\gamma \tau \gtrsim 1\), where the limit cycles emerge. As \(\gamma \tau \) increases beyond 1, the RMS displacement decreases. For \(\gamma \tau \gg 1\) the RMS displacement remains constant as function of \(\gamma \tau \), since the system is effectively linear in this regime. However, the RMS displacement is still larger than in the Markovian limit because the system can intermittently make large amplitude excursions and then relax to the monostable state again. Thus, in summary, we did not find any advantage for energy harvesting due to chaotic dynamics. Instead, the regime of large amplitude limit cycle oscillations seems to be, by far, the most advantageous for energy harvesting. Finally, we would like to point out that the lack of data points in the range \(\gamma \tau =0.2-3\) is due to lack of numerical convergence. In our simulations, the amplitude of the limit cycle oscillations diverges in this range. While we believe that more sophisticated numerical methods may resolve this issue, limit cycle oscillations of very large amplitude are still likely to be found in that regime.

To summarize, we have demonstrated how a distributed time delay in a Duffing-type nonlinearity can lead to a rich phenomenology, including the emergence of stable limit cycles and chaos. Remarkably, the amplitude of the limit cycle oscillations can be very large when the delay time is commensurate with the dissipation time. If such a distributed time delay can be realized in nonlinear energy harvesters [57], our results could pave the way for massively improving the performance of those systems.