1 Introduction

Modulational instability (MI) is an ubiquitous phenomenon for wave packets propagating in a weakly nonlinear medium [1]. It consists in the appearance of sidebands growing around a uniformly modulated carrier and was observed in deep water waves, nonlinear optics, Bose–Einstein condensates and plasma physics [2, 3].

If the envelope of the wave-packet is narrowbanded, the nonlinear stage of the evolution (i.e., when the sidebands start to grow at amplitudes comparable to the unstable stationary background) can be modeled by means of the universal nonlinear Schrödinger equation (NLSE). This integrable equation exhibits exact solutions, e.g., stationary envelope solitons and pulsating breathers of Kuznetsov-Ma-, Peregrine- and Akhmediev-type [4,5,6,7]

The family of Akhmediev breather (AB) is the prototype of the nonlinear evolution of MI: in the time-like NLSE, an initially slightly modulated time-periodic train of pulses reaches its peak value at a given point in space, as a result of the exponential sideband growth, as is followed by the recovery of the initial state known as Fermi-Pasta-Ulam recurrence [8]. Because of this characteristic feature, i.e., extreme waves appearing from nowhere and suddenly disappearing [9], it is also a candidate solution for the explanation of rogue waves and other nonlinear systems.

The NLSE is a framework not only valid for deep water, but also for intermediate depth cases, as is well known from the literature [10,11,12].

The depth is thus an important degree of freedom that tunes the dispersion and nonlinear coefficients during wave propagation, thus allowing the possibility to dynamically control the MI gain. In optics, an adiabatic variation of fiber dispersion is well known to provide an effective path to soliton compression [13, 14]. Moreover, the transition from two fibers of different dispersion was recently proposed to control an AB at its peak focusing point [15]. A standard fiber has a large cross section; thus, the nonlinear coefficient does not change much (as it depends mostly on the core area and Kerr nonlinear refractive index); the dispersion is instead much more sensitive to geometry [16]. The opposite is true for surface gravity waves in water: the group velocity always decreases with frequency increase, while the nonlinearity can be tuned to positive or negative values [17].

Here, we propose a theoretical framework for the control of breathing water wave-packets over a smoothly varying uneven bottom. A three-wave truncation [18, 19] allows us to formulate the conditions required for stabilization, as well as the limits of our approach.

We rely on a mechanism similar to autoresonance, in which the change of an external parameter in the system allows one to lock it in a stable and stationary oscillating state of large amplitude, starting from an initial condition close but not exactly matching the resonant condition. This theory finds its origin in accelerator and plasma physics [20,21,22] and was recently applied also to optical frequency conversion [23,24,25,26].

Section 2 recalls the generalized NLSE model in finite water depth of Ref. [27] and the description of the nonlinear stage of MI by means of a three-wave truncation approach. In Sect. 3, we discuss the conditions for stabilization and report improvements on the implementation of the abrupt transition as proposed in [15]. Numerical results are presented in Sect. 4. Section 5 is devoted to result summary and outlook.

2 Model equation

2.1 Generalized finite water depth NLSE

In [27], a NLSE-like equation is derived for the one-dimensional evolution of the envelope of surface water waves on an uneven bottom of depth h at frequency \(\omega =\sqrt{gk\sigma }\), with \(\sigma \equiv \tanh {\kappa }\) and \(\kappa \equiv k h\), k being the local wavenumber, which varies with h, while \(\omega \) is fixed.

Fig. 1
figure 1

Schematic representation of a surface wave packet propagating over an uneven bottom. The propagation is uni-directional from left to right. Wavelengths, depth and amplitude are not in real scales. (Color figure online)

The 2D Laplace equation \(\left[ \frac{\partial ^2}{\partial x^2}+\frac{\partial ^2}{\partial z^2}\right] \varPhi =0\) for the velocity potential \(\varPhi \) in the longitudinal and depth coordinates (xz) is solved with the usual kinematic and dynamic boundary conditions at the free surface [12], whereas the bottom boundary condition reads as

$$\begin{aligned} \frac{\partial \varPhi }{\partial z}=-h'(x)\frac{\partial \varPhi }{\partial x}, \,\, z=-h(x). \end{aligned}$$
(1)

It is required that the bottom slope is small enough to prevent wave-reflections due to wavenumber mismatches, i.e., \(h'(x)=\mathcal {O}( \varepsilon ^2)\), with \(\varepsilon \equiv k a\ll 1\) the wave steepness (a is the local carrier wave amplitude).

By employing the standard method of multiple scales up to third-order in \(\varepsilon \) [12], the following evolution equation was derived [27]

$$\begin{aligned} i\frac{\partial U}{\partial \xi } + \beta \frac{\partial ^2U}{\partial \tau ^2} - \gamma |U|^2U = -i \mu U -i \nu U, \end{aligned}$$
(2)

where \(U(\xi ,\tau )\) is the envelope of the free-surface water elevation, with \(\xi \equiv \varepsilon ^2 x\) and \(\tau \equiv \varepsilon \left[ \int _0^x \frac{\mathrm {d}\zeta }{c_\mathrm {g}(\zeta )}-t\right] \) are the coordinates in a frame moving at the group velocity of the envelope, \(c_\mathrm {g} \equiv \frac{\partial \omega }{\partial k}= \frac{g}{2\omega }\left[ \sigma + \kappa (1-\sigma ^2)\right] \); moreover \(\beta \), \(\gamma \), and \(\mu \equiv \mu _0 \frac{\mathrm {d}\kappa }{\mathrm {d}\xi }\) represent the dispersion, cubic nonlinearity and shoaling coefficient, respectively. The first two are simply the coefficients of the NLSE on arbitrary depth, see [10], and are functions of \(\kappa \) only; detailed expressions can be found in “Appendix A”; \(\mu \) results from wave-energy conservation arguments as \(\mu _0\equiv \frac{1}{2{\omega c_g}}\frac{\mathrm {d}\left[ \omega c_g\right] }{\mathrm {d}\kappa }\), i.e., \(\mu \) is the logarithmic derivative of \(c_\mathrm {g}\). At variance with [27], we include also a homogeneous loss term, \(\nu \) due to, e.g., viscosity or friction with bottom and sidewalls, which is appropriate at the NLSE order [28, 29].

Let \(g=\omega =1\) for definiteness. It is well-known that \(\beta <0\) for all values of \(\kappa \) (provided that only surface gravity waves are considered) [blue solid line in Fig. 2a], while \(\gamma \ge 0\) for \(\kappa \ge 1.363\) [red dashed line in Fig. 2b]. Recall also that \(c_\mathrm {g}\) [red dashed line in Fig. 2a] is maximum for \(\kappa \approx 1.20\).

Fig. 2
figure 2

Dependence on the depth parameter \(\kappa \) of the coefficients of Eq. (2), with \(g=\omega =1\). a Dispersion parameters: \(c_\mathrm {g}\) (dashed red line) and \(\beta \) (solid blue line); b Nonlinear parameters: \(\gamma \) (dashed red line), \({\tilde{\gamma }}/\beta \) (solid blue line) and \(\gamma /\beta \) (black dotted line), see Sect. 2.1 and “Appendix A”. \({\tilde{\gamma }}\) is defined in Eq. (4): for definiteness we take \(\nu =0\) and \(\kappa (\xi =0)=2\), marked by a black dotted vertical line. The impact of shoaling is minor. (Color figure online)

The form of \(\mu \) allows us to simplify Eq. (2). Following [30], we let \(U=V\exp \left[ -\int _0^\xi {\mu (y) \,\mathrm {d}y} - \nu \xi \right] \); Eq. (2) can be rewritten as

$$\begin{aligned} i\frac{\partial V}{\partial \xi } + \beta \frac{\partial ^2V}{\partial \tau ^2} - {\tilde{\gamma }}|V|^2V = 0, \end{aligned}$$
(3)

i.e., a NLSE with varying parameters, with

$$\begin{aligned} {\tilde{\gamma }}(\xi ) \equiv \gamma (\xi ) \frac{c_\mathrm {g}(\xi =0)}{c_\mathrm {g}(\xi )}\exp (-2\nu \xi ). \end{aligned}$$
(4)

The effect of shoaling is clear from Eq. (4): in the focusing regime, \(\beta {\tilde{\gamma }}<0\), it slightly increases the effective nonlinearity, because \(c_\mathrm {g}\) monotonically decreases, see the red dashed line in Fig. 2a. The effect of \(\nu \) is to decrease the impact of nonlinearity as the wave propagates. It is easy to verify that the perfect compensation of \(\nu \) by shoaling is impossible for increasing depth. For the sake of simplicity, we will take \(\nu =0\) in what follows, except for Sect. 4.3.

In the framework of field theory, Eq. (3) conserves the total mass \(N\equiv \int _{-\infty }^{\infty }{ |V|^2 \mathrm {d}\tau }\) and the momentum \(P \equiv \mathrm {Im}\left\{ \int _{-\infty }^{\infty }{ V^*\frac{\partial V}{\partial \tau }}\mathrm {d}\tau \right\} \). We use them in our numerical calculations to assure the precision of solutions. No other conserved quantity is present, if coefficients have no specific functional dependence.

2.2 Modulation instability

Equation (3) possesses a steady-state solution \(V_s(\xi ) = V_0 \exp \left( -iV_0^2\int _0^\xi {\tilde{\gamma }}(y)\mathrm {d}y\right) \). For \(\beta {\tilde{\gamma }}<0\), this solution is modulationally unstable for a detuning \(\varOmega \in \left[ 0,\varOmega _\mathrm {C}\right] \) from the central frequency \(\omega \), with \(\varOmega _\mathrm {C}\equiv \sqrt{2\left| \frac{{\tilde{\gamma }}}{\beta }\right| }V_0\). The linear MI gain is \(G = |\beta \varOmega |\sqrt{\varOmega _\mathrm {C}^2-\varOmega ^2}\), with peak at \(\varOmega _\mathrm {M}\equiv \frac{\varOmega _\mathrm {C}}{\sqrt{2}}\). This is the result of the conventional linear stability analysis, but it can also be thought of as the nonlinear phase-matching condition between the steady-state solution and the two sidebands, a sort of nonlinear resonance condition.

To compute \({\tilde{\gamma }}\), the initial value of \(\kappa \) must be fixed. As an example, we let \(\kappa (0)=2\) and thus \(c_g(\xi =0)=0.55\). The main parameter of our problem, \({\tilde{\gamma }}/\beta \), is shown as blue solid line in Fig. 2b. For comparison, we also include the ratio \(\gamma /\beta \), as a dotted black line, to show that the effect of shoaling on MI is quite small (less than 5%) in the focusing regime. As this parameter is changed, the same sideband frequency can turn from modulationally stable to unstable or experience a different instability gain along the MI curve. In Fig. 2b, it is clear that the range of variation is quite limited, compared to optical fibers, because both \(\beta \) and \(\gamma \) tend to their deep-water limits as \(\kappa \rightarrow \infty \). The choice of the reference value \(\kappa =2\) (marked in Fig. 2) is a good trade-off for having strong enough nonlinear effects, while avoiding high-order corrections appearing when \({\tilde{\gamma }}\approx 0\), see for instance [31, 32].

The MI gain is a linear approximation, beyond which the nonlinear behavior demands a more detailed analysis.

2.3 Nonlinear regime

A thorough understanding of the problem can come from a low-dimensional analysis. We follow the three-wave truncation proposed in Ref. [18], that was proven effective also in higher-order generalizations of the NLSE [19, 33].

Let \(V(\xi ,\tau )= A_0(\xi ) + A_1(\xi ) e^{i \varOmega \tau } + A_{-1}(\xi )e^{-i\varOmega \tau }\), where \(\varOmega \) is the angular detuning in normalized units, and \(A_{n}\), with \(n\in \{-1,0,1\}\) are complex variables, the phases of which are denoted by \(\phi _n\). It is easy to reduce Eq. (3) to a one degree-of-freedom (d.o.f.) Hamiltonian system [18]. The canonical variables are the conversion rate to sidebands \(\eta \equiv \frac{|A_1|^2+|A_{-1}|^2}{E}\) and the relative phase \(\psi \equiv \frac{\phi _1 + \phi _{-1} }{2}-\phi _{0}\), where \(E\equiv |A_0|^2 + |A_1|^2+|A_{-1}|^2=V_0^2 \) is a conserved quantity of the truncated system, as well as the sideband imbalance \(\chi \equiv |A_1|^2-|A_{-1}|^2\). Compared to [18], we consider a slightly different set of variables, more suitable to our goals.

The Hamiltonian function is \(H^{(\xi )}(\psi ,\eta ) \equiv {\tilde{\gamma }} E \eta (\eta -1)\cos 2 \psi + {\tilde{\gamma }} E \left( \frac{3\eta ^2}{4}-\eta \right) - \beta \varOmega ^2 \eta \), and

$$\begin{aligned} \psi ' = \frac{\partial H^{(\xi )}}{\partial \eta };\;\eta ' = -\frac{\partial H^{(\xi )}}{\partial \psi } \end{aligned}$$
(5)

where the prime denotes the derivative with respect to \(\xi \). More details are found in “Appendix B”.

A final transformation to \(X\equiv E\int _{0}^\xi { {\tilde{\gamma }} (y)\mathrm {d}y}\) allows us to simplify the Hamiltonian function to

$$\begin{aligned} H^{(X)}(\psi ,\eta ) \equiv \eta (\eta -1)\cos 2 \psi + \frac{3\eta ^2}{4} +\alpha \eta , \end{aligned}$$
(6)

with \(\alpha \equiv -\left[ \frac{ \beta \varOmega ^2}{{\tilde{\gamma }} E}+1\right] =\left( \frac{\varOmega }{\varOmega _\mathrm {M}}\right) ^2-1=-4 a_\mathrm {AB}+1\), with \(a_\mathrm {AB}\) the well-known parameter of the AB. Now

$$\begin{aligned} {\dot{\psi }} = \frac{\partial H^{(X)}}{\partial \eta } ; \;{\dot{\eta }} = -\frac{\partial H^{(X)}}{\partial \psi }, \end{aligned}$$
(7)

where the dot denotes the derivative with respect to X.

The system is modulationally unstable for \(|\alpha | \le 1\), the peak gain is for \(\alpha =0\), while the MI cut-off is for \(\alpha =1\).

Before going on, we recall that, for constant parameters, the system (7) exhibits the following fixed points [18]:

  1. 1.

    \({\tilde{\psi }}_0=\frac{\cos ^{-1} \alpha }{2},{\tilde{\eta }}_0=0\) (i.e., no conversion to sidebands, a center for \(|\alpha |>1\), a saddle otherwise);

  2. 2.

    \({\tilde{\psi }}_1=\frac{\cos ^{-1} \left( -\alpha -\frac{3}{ 2}\right) }{2},{\tilde{\eta }}_1 = 1\) (i.e., full conversion, a center for \(\alpha >-\frac{1}{2}\), a saddle otherwise);

  3. 3.

    \({\tilde{\psi }}_2=m\pi \; (m\in \mathbb {Z}), {\tilde{\eta }}_2=\frac{2(1-\alpha )}{7}\) (i.e., oscillations around finite conversion rate, which exists as a center for \(|\alpha |\le 1\));

  4. 4.

    \({\tilde{\psi }}_3 = \frac{ \pi }{2}+m\pi , {\tilde{\eta }}_3=2(1+\alpha )\) (which exists as a center for \(-1<\alpha \le -\frac{1}{2}\)).

The last case applies only to the lower half of the MI gain curve (\(\varOmega \le \frac{\varOmega _\mathrm {C}}{2}\)), where the three-wave truncation obviously breaks down and higher-order sidebands at \(\pm n\varOmega \), \(n\in \mathbb {Z}\) are also unstable. Here, we stress that resorting to a five-wave or more truncation neither solves this problem nor improves the description for \(\frac{\varOmega _\mathrm {C}}{2}\le \varOmega \le \varOmega _\mathrm {C}\), since the reduction to a Hamiltonian system with a small number of degrees of freedom is feasible only in the present three-wave case. Thus, it represents a mathematical complication with few practical benefits. Instead an approach based on exact NLSE solutions should be envisaged.

The two different topologies of the phase-plane (for \(\alpha \gtrless 1\)) are exemplified in Fig. 3a, b, respectively.

Fig. 3
figure 3

The two topologies of the phase-plane considered in this work. We show the level sets of the Hamiltonian \(H^{(X)}\) Eq. (6), on which a trajectory lies for constant \(\alpha \)a \(\alpha =1.25\): the system is modulationally stable and only free rotations around \({\tilde{\eta }}_0\) (a center, marked as a black asterisk) are possible. b \(\alpha =0\): \({\tilde{\eta }}_0\) (marked as a red plus sign) is unstable and lies on a separatrix curve, while centers \(\pm {\tilde{\eta }}_2\) (marked as black asterisks) appear. In all situations, the trajectories turn anticlockwise. (Color figure online)

For what follows, it is also useful to recall that, for \(\alpha <1\), the trajectory emanating from \(({\tilde{\psi }}_0,{\tilde{\eta }}_0)\) is homoclinic and is referred to as a separatrix. By direct inspection of Eq. (7), it is easy to see that trajectories always turn anticlockwise for \(X>0\), irrespective of \(\alpha \). This implies that the separatrix exits the origin in the second and fourth quadrants and rejoins it in the third or first, respectively. We recall also that conventionally, trajectories outside (resp. inside) the separatrix are named period-two (resp. one) solutions. This is apparent in Fig. 3b and corresponds to the classification of time-periodic NLSE solutions, exhibiting (or not) a phase shift [7]. The separatrix turns out to correspond to an AB, while the centers \(({\tilde{\psi }}_2,{\tilde{\eta }}_2)\) to the steady-state dn-oidal solution [35]. It is also important that \(H^{(X)}({\tilde{\psi }}_0,{\tilde{\eta }}_0)=0\) for all \( \alpha \). For \(\alpha \ge 1\), \(H^{(X)}>0\) everywhere in the whole unit disk, while for \(\alpha <1\), \(H^{(X)}\gtrless 0 \), outside or inside the separatrix, respectively. This is obvious, by noticing that \(H_ \mathrm {min}\equiv H^{(X)}({\tilde{\psi }}_2, {\tilde{\eta }}_2)=-\frac{(1-\alpha )^2}{7}\le 0\), in its domain of existence.

In general, as the bathymetry and thus \({\tilde{\gamma }}/\beta \) vary, the change of \(\alpha \) lets \(H^{(X)}\) (or \(H^{(\xi )}\)) vary across 0, see Eq. (6). This additional degree of freedom provides the flexibility to explore the stabilization regime we will present in the next section.

We will refer to the results of the present section as truncated or three-wave model, while the numerical solutions of Eq. (3) are referred to as simulations.

3 Stabilization over an uneven bottom

It is well known from classical mechanics that a trajectory oscillating around an elliptic fixed point keeps on following the same type of oscillatory trajectories if an internal parameter is changed adiabatically, i.e., the speed of variation is much smaller than the oscillation frequency [36]. For Hamiltonian systems, a quantity, called the adiabatic invariant, is conserved all along the transition; this is the classical counterpart of Ehrenfest theorem in quantum mechanics. In order to solve our problem, we have to go beyond this result and recall the theory of autoresonance [21, 22, 37]. Two possible regimes can occur. Either the trajectory starts close to an equilibrium and a parameter is changed adiabatically, so that the adiabatic invariant is conserved; or it is forced to cross the separatrix and phase-locks in the close proximity to an equilibrium and the adiabatic invariant is not conserved. We explain below that the second solution is much more practical if the total transition length is constrained and for the flexibility in initial conditions.

Thus, we focus here on how to physically apply the second approach to our model. As shown in Sect. 2.3, our system has only elliptic fixed points for \(\alpha >1\) and both unstable hyperbolic and elliptic points for \(\alpha <1\). Our aim is to stabilize the trajectory around \(({\tilde{\psi }}_2,{\tilde{\eta }}_2)\) starting from small oscillations around \({\tilde{\eta }}_0\), by varying \(\alpha \). The trajectory must thus cross the separatrix: a sign change of the Hamiltonian is associated to this transition.

Thus, three different aspects have to be considered: (i) the initial stage where the system behaves almost linearly, (ii) the separatrix crossing stage, and (iii) small oscillations around an equilibrium adiabatically shifted toward a larger \(\eta \). We describe the three successively below.

3.1 Linear stage

We start from \(\eta _0\equiv \eta (0)\ll 1\) and \(\alpha _0\equiv \alpha (0)>1\) and linearize the system of Eq. (7) in order to understand its behavior when we tune the parameters to cross the bifurcation point \(\alpha = 1\) from above. By letting \(R\equiv \sqrt{\eta }e^{i\psi }\), we reduce Eq. (7) to

$$\begin{aligned} \dot{R} = i \alpha R - i R^*, \end{aligned}$$
(8)

which can also be obtained by linearizing the complex system reported in “Appendix B”, Eq. (18), directly. The validity of Eq. (8) is limited to \(\eta \ll 1\); nevertheless, we can obtain some useful information about the full dynamics.

We let \(R=u+iv\) and split Eq. (8) in real and imaginary part to get

$$\begin{aligned} \begin{aligned} \dot{u}&= -(\alpha +1) v,\\ \dot{v}&= (\alpha -1) u. \end{aligned} \end{aligned}$$
(9)

If we divide these two equations term by term, we see that the solution is of the form \(v^2 = C - \frac{\alpha -1}{\alpha +1}u^2\), which is either an ellipse or a hyperbola, for resp. \(\alpha \gtrless 1\). For \(\alpha >1\), it entails periodic oscillations, albeit, \(\varLambda _\mathrm {lin}^{(0)}(\alpha )>\varLambda _\mathrm {nl}(\alpha ,H^{(X)})\), defined as the periods predicted by Eqs. (8) and (7), respectively, see “Appendix C and D”. For \(\alpha <1\), Eq. (8) gives exponentially divergent solutions. For \(\alpha =1\), we have a pair of straight lines \(v=\pm \sqrt{C}\), i.e., the horizontal semi-axis of the ellipse diverges. If \(|u|\gg C\) at the same X, \(\psi \rightarrow m\pi ={\tilde{\psi }}_2\). Thus, we can define this stage as the phase-locking stage.

Finally, from Eq. (8), notice that for \(\alpha \gg 1\) the second term can be neglected and R oscillates on a circle of radius \(|R|^2\rightarrow \eta (-\infty )\); this limit gives \(C = \eta (-\infty )\).

The trajectories of the full nonlinear system turn anticlockwise, so do necessarily the solutions of its linearized version [the first of Eqs. (9) clearly shows that]. In order to follow the separatrix and then cross it and approach the centers located at \( \mp {\tilde{\eta }}_2=\mp \frac{2}{7}(1-\alpha )\), (uv) are required to lie in the second or fourth quadrant, respectively: at \(\alpha \approx 1\), we thus impose \(\dot{u} u >0\) (or, equivalently, \(u v<0\)). Otherwise, the solution moves away from the elliptic fixed points and oscillates outside the separatrix.

Let \(\alpha = 1 - \varDelta \alpha ^\mathrm {i} (X-X^*)\), with \(\varDelta \alpha ^\mathrm {i} >0\), so that at \(X=X^*>0\) we reach the MI band edge \(\varOmega _\mathrm {C}\).

In order to find suitable initial conditions, we resort to a local approximation in power series, as shown in “Appendix E”. We conclude that, for \(\alpha _0\) close to 1 and \(\psi _0\equiv \psi (0)=\pm \frac{\pi }{2}\) trajectories evolve to the correct quadrant and phase-lock to, respectively, \(\pi \) or 0, while \(\psi _0= 0\) does not.

A lower limit to \(\varDelta \alpha ^\mathrm i\) must be imposed. \(\alpha (X^*)=1\) gives \(X^* = \frac{\alpha _0-1}{\varDelta \alpha ^\mathrm i}\). We require that \(X^*\ll \varLambda _\mathrm {nl}/2\), i.e., the MI band is crossed before the system reaches the peak \(\eta \). Otherwise, the trajectory would point back and could not enter the separatrix as this last appears. We conclude that \(\varDelta \alpha ^\mathrm i\gg \frac{2(\alpha _0-1)}{\varLambda _\mathrm {nl}}> \frac{2(\alpha _0-1)\sqrt{\alpha _0^2-1}}{\pi }\), by virtue of \(\varLambda _\mathrm {nl}<\varLambda _\mathrm {lin}^{(0)}=\pi (\alpha _0^2-1)^{-\frac{1}{2}}\), as shown in “Appendix C and D”. In order to lie close but near the separatrix as it appears, we require \(\eta _0\ll 1\). The Hamiltonian takes thus the value \(H^{(X)}(X^*)\approx \left[ 1+(X^*)^2\right] v_0^2\) at the bifurcation point.

3.2 Intermediate regime

Suppose that the solution of Eq. (7) behaves at \(X^*\) as a trajectory close to the separatrix, Eq. (24) in “Appendix C”, and grows away from \({\tilde{\eta }}_0\). After an initial exponential growth, \(\eta \) slows down and its growth rate starts soon decreasing. The homoclinic orbit appears at \(\alpha =1\) and expands linearly in width with decreasing \(\alpha \). From Eq. (6), as \(\alpha \eta \) decreases, \(H^{(X)}\) will change sign, thus separatrix crossing occurs. The analytic treatment to characterize the solution near this point is very involved for the system given by \(H^{(X)}\) [38] and does not provide hints about the dynamics of Eq. (3). Nevertheless, we estimate the optimal variation of \(\alpha \) and the distance at which it can be achieved by following a simpler argument, similar to what reported in Ref. [39]. Starting at \(X^{*}\), the optimal transition is such that \(H^{(X)}(X^{**})=H_\mathrm {min}\), where \(X^{**}\) marks the adiabatic stage start. In this way, the orbit reaches closely to \(({\tilde{\psi }}_2,{\tilde{\eta }}_2)\). From Eq. (6), we have

$$\begin{aligned} \frac{\mathrm {d}H}{\mathrm {d}X} = {\dot{\alpha }} \eta \approx - \varDelta \alpha ^\mathrm {t} \eta , \end{aligned}$$
(10)

where we assumed, as before, that \(\alpha \) decreases linearly with slope \(\varDelta \alpha ^\mathrm {t}\). We can thus approximately integrate Eq. (10) and write

$$\begin{aligned} H^{(X)}(X^{*}) - \frac{\varDelta \alpha ^\mathrm {t}(X^{**}-X^{*})}{2}(\eta ^*+\eta ^{**})=H_\mathrm {min}. \end{aligned}$$
(11)

\(\eta ^{*}\equiv \eta (X^*)\) is known from the linear stage above, and we take \(\eta ^{**}\equiv \eta (X^{**})={\tilde{\eta }}_2\), to enforce the proximity to the center at some given distance. We thus require that

$$\begin{aligned} \varDelta X^\mathrm {t} \equiv X^{**}-X^{*}=\frac{\varLambda _\mathrm {nl}^{m\rightarrow 1}(H^{(X)}(X^*))}{4}, \end{aligned}$$
(12)

i.e., the start and end of the intermediate stage are separated by roughly a fourth of a period of an external orbit close to the separatrix, computed at \(X^*\), see “Appendix C”. This is justified by the fact that we have period-two solutions outside the separatrix. By plugging these values into Eq. (11), we obtain the optimal slope for changing \(\alpha \) in the intermediate stage,

$$\begin{aligned} \varDelta \alpha ^\mathrm {t} = \frac{2 H^{(X)}(X^*)}{\eta ^{*} \varDelta X^\mathrm {t}}. \end{aligned}$$
(13)

We notice that the farther we start from the separatrix, the larger the variation of \(\alpha \) is required.

3.3 Adiabatic conversion stage

Suppose that the separatrix is crossed and, at distance \(X^{**}\), the system is close to the center \(({\tilde{\eta }}_2,{\tilde{\psi }}_2)\) computed at the current value of \(\alpha (X^{**})\). Suppose we can approximate \(\alpha (X) = \alpha (X^{**}) - \varDelta \alpha ^\mathrm {f} (X-X^{**})\). The trajectory will keep on oscillating around the equilibrium, which in turn varies with \(\alpha \), provided that an adiabaticity condition on \(\varDelta \alpha ^\mathrm f\) is satisfied. We estimate it by resorting to the same approach of Ref. [37].

In “Appendix D”, we discuss the general method to linearize the Hamiltonian and obtain that \((\psi ,\eta )\) make small oscillations around \(({\tilde{\psi }}_2,{\tilde{\eta }}_2)\) if

$$\begin{aligned} \left| \frac{2{\dot{\alpha }}}{7 \kappa _2}\right| = \left| \frac{2\varDelta \alpha ^\mathrm {f}}{7 \kappa _2}\right| \ll 1, \end{aligned}$$
(14)

where \(\kappa _2\equiv \frac{2\sqrt{7}}{7}\sqrt{(1-\alpha )(5+2\alpha )}\) is the linearized angular frequency around the center, see “Appendix D”.

It is easy to check that \(\kappa _2\) grows monotonically for \(-\frac{3}{2}<\alpha <1\); thus, the most stringent upper bound on \(\varDelta \alpha ^\mathrm {f}\) occurs at \(X^{**}\).

4 Numerical results

4.1 Initial conditions

We suppose for simplicity that \(\kappa \) is changed linearly all over the domain: \(\alpha _0=1.56\), i.e., \(\varOmega =1.6\varOmega _\mathrm {M}\), and \(\kappa \) varies from 2 to 5. In practice, this means a linear variation of h, see the magenta dashed-dotted line in Fig. 4a (the scale on the right axis). The effect on \(\alpha \) is instead a faster variation in the beginning and slower after \(\xi \approx 200\). This is a particularly favorable situation for the locking into the elliptic fixed point, according to the previous discussion.

The initial conditions are \(\varepsilon (0)\equiv \varepsilon _0 = V_0 k(0) = 0.12\), \(\eta _0=0.025\) and \(\psi _0=\frac{\pi }{2}\): they are optimal according to the discussion in Sect. 3.1.

4.2 Simulation results

We solve Eq. (3) by means of the adaptive 3rd-order Runge–Kutta (RK) scheme embedding the conventional 4th-order applied to the interaction-picture formulation [40]. We use \(2^{11}\) points for time-discretization, while the integration step in \(\xi \) is adapted to keep the error below \(1\times 10^{-9}\). This guarantees a short computational time (less than 30 seconds for each simulation) with a satisfactory conservation of N and P (deviations of less than \(5\times 10^{-3}\) and \(2\times 10^{-6}\), respectively).

Fig. 4
figure 4

Simulated spectral evolution over a smoothly varying depth. \(\xi \) and h are in units of m in the scaling discussed in the main text; the other quantities are dimensionless. a On the left axis, conversion efficiency \(\eta \) (blue solid line), its value at the elliptic fixed point \({\tilde{\eta }}_2\) predicted by the three-wave truncation (black dotted line) computed from the local value of \(\alpha \), and the relative intensity of the second-order sidebands, \(\eta ^{(2)}\) defined below in the main text (red dashed line). On the right axis, we plot the bathymetry, shown as a purple dash-dotted line. b The evolution of the relative phase \(\psi /\pi \) (blue solid lines, refers to the left axis) and the MI coefficient \(\alpha \) (defined in the text, red dotted line, refers to the right axis). The crossing into the MI band is where \({\tilde{\eta }}_2\) appears; to guide the eye, panel b includes a thin black dashed-dotted horizontal line. The vertical black dotted line marks the \(\alpha =1\) point, while the vertical black dash-dotted identifies the point where \(H^{(\xi )}=0\) (separatrix crossing). The red (resp. green) shaded region represents the linear (resp. adiabatic) stage of stabilization. (Color figure online)

In Fig. 4, we clearly identify the three stages described above: (i) the linear, around \(\alpha =1\), where \(\eta \) grows and \(\psi \) approaches \(\pi \) (red-shaded area); (ii) the intermediate, starting at \(\xi \approx 200\), where the growth slows down, the separatrix is crossed and \(\psi \) locks to \(\pi \); (iii) and the adiabatic, starting at \(\xi \approx 450\), where \(\eta \) adiabatically follows the equilibrium up to \(\eta \approx 0.5\) (green-shaded area). The residual oscillations in amplitude and phase are below 5% and 1% in relative terms, see blue solid lines in panels (a) and (b), respectively. The second-order sideband fraction, defined as \(\eta ^{(2)}\equiv \frac{|{\hat{V}}(2\varOmega ,\xi )|^2 + |{\hat{V}}(-2\varOmega ,\xi )|^2}{V_0^2}\), represents less than 10\(\%\) of the total mass N [red dashed line in panel Fig. 4a]. They are generated via nonlinear processes of the sort \(0 \pm \varOmega \pm \varOmega \rightarrow \pm 2\varOmega \), which are thresholdless and oscillating. They partially account for the discrepancy between the numerical solution and \({\tilde{\eta }}_2\) (black dotted line). Systematically simulations end up oscillating around a larger \(\eta \) than predicted by the three-wave truncation. This is the main limitation of the truncated model and mitigated in the \(\varOmega \rightarrow \varOmega _C\) limit for small \(\eta \) [18, 19].

Fig. 5
figure 5

Phase space representation of the numerical results of simulation and three-wave truncation (solid and dashed line, respectively) over a smoothly varying depth. The direction of evolution in \(\xi \) is represented by the line getting a lighter hue, while the red cross denotes the initial condition and the black circle the point of separatrix-crossing where \(H^{(X)}=H^{(\xi )}=0\). The asterisk corresponds to the \(\alpha =1\) point. Notice that the horizontal and vertical axes have different scales. (Color figure online)

We compare simulations (solid line with changing hue) to the truncated model (dashed blue line) in the phase-plane, Fig. 5. In both cases \(\eta \) grows, the phase is locked and the residual oscillations are very small. Notably, in the simulation the oscillations around the average are limited to less than 0.025.

The asterisk marks the \(\alpha =1\) transition, after which the linear approximation soon breaks down. The circle denotes instead the separatrix crossing, \(H^{(\xi )}=0\). Notice that the trajectory turns away from the horizontal axis just after a close approach to an elliptic equilibrium [equivalent to \(({\tilde{\psi }}_2,{\tilde{\eta }}_2)\)]. This occurs at \(\eta =0.28\), and the phase is then locked, see Fig. 4b.

The three-wave solution (dashed line in Fig. 5) exhibits larger oscillations than the simulated ones (the horizontal and vertical scales differ much): in fact, the final value of \(\kappa \) is chosen to minimize these latter. The former meets its optimal conversion effectiveness at \(\kappa (\xi =1000)\approx 5.5\), which combines the fast locking condition with the adiabatic following of the center: \(\varDelta \alpha ^\mathrm {i}\gg 0.5\) at \(\xi =0\), while \(\varDelta \alpha ^\mathrm {f}\ll 5\) at \(\xi =450\). For such a \(\kappa \), the simulation turns out to oscillate more, which we explain by the faster displacement of the elliptic fixed point of the NLSE compared to \({\tilde{\eta }}_2\), i.e., the conditions (13) and (14) are stricter for the NLSE than for the truncated model. This is again inherent to the three-wave approximation.

In principle, there is no limit on how large the fraction of N can be funneled into \(\eta \). The physical range of \({\tilde{\gamma }}/\beta \) is nevertheless limited, see Fig. 2a. Finally, once the total length of the system is constrained, \(\varDelta \alpha ^\mathrm f\) is bounded from below. The condition of Eq. (13) looks quite more stringent, but we verified numerically that, provided the separatrix is crossed, the behavior is very similar to the optimal one: the blue dashed line in Fig. 5, pertaining to the three-wave model, shows indeed the typical solution.

Fig. 6
figure 6

Simulated evolution of \(\eta \) in the \(\xi \)-dependent potential well, explicitly derived for the three-wave model in “Appendix C”. The color-map represents the values of the function \(-W(\eta )\) (the darker the deeper negative, yellow regions are classically inaccessible). We let \(H^{(\xi )}\) vary in \(\xi \) and the potential well is recomputed accordingly for each point in the evolution, by replacing values extracted from simulations. The blue solid line corresponds to the numerical solution of Eq. (3), while the dark green dotted curve represents the solution of Eq. (8), \(|R|^2\). The red dashed line shows the values of the three-wave Hamiltonian calculated from the solution of Eq. (3), mapped on the top axis. Like in Fig. 4, the black dotted and dash-dotted lines represent the distances at which \(\alpha =1\) and \(H^{(\xi )}=0\). (Color figure online)

A third alternative representation is available. Recall that Eqs. (5)–(7) are equivalent to a particle moving in a potential well, as explained in “Appendix C”. Notice that the potential well \(W(\eta )\) depends on the initial value of \(H^{(X)}\); thus, its minima do not correspond to equilibria, in general. We let \(H^{(X)}\) vary and update it at each integration step by replacing values of \(\eta \) and \(\psi \) extracted from simulations, according to the X-dependent expression Eq. (6), see “Appendix C” for more details. In Fig. 6, we show the map of the accessible values of the potential well \(-W(\eta )\le 0\): this is very shallow and narrow at the beginning (where \(\alpha >1\)), then it becomes broader and deeper. Again, we see that the linear approximation, dark green dotted line, diverges at \(\xi \approx 200\). After this linear stage, the well smoothly widens and deepens; \(H^{(\xi )}\) changes sign at \(\xi \approx 300\). In the last stage, from \(\xi \approx 450\), the potential well gets deeper and deeper and the results of the simulation (blue solid line) are clearly trapped into it, as expected by the adiabatic following of the elliptic fixed point, proven above, and in spite of the systematic difference with the three-wave results.

Fig. 7
figure 7

Color-map of the space-time evolution of steepness kU, with U the solution of Eq. (2), over an uneven bottom with linear slope. \(\xi \) and \(\tau \) are in units of \(\mathrm {m}\) and \(\mathrm {m}^\frac{1}{2}\), respectively, as discussed in the text. The red dashed line shows the variation of \(\alpha \) as a function of \(\xi \) and is mapped on the additional abscissa on the top. The two horizontal black lines (dotted and dashed-dotted) correspond to their counterpart in Fig. 6. (Color figure online)

Finally, a further limitation inherent to water waves is that nonlinear effects cannot be increased arbitrarily, because they scale as the generalized Ursell number [41], which is proportional to \(\varepsilon \) in the deep water limit. An AB envelope peaks at roughly two-to-three times the background amplitude, and wavebreaking occurs if \(\varepsilon \gtrsim 0.4\) [42]. The physical soundness of our approach is confirmed by representing the evolution of \(\varepsilon \) attained by U—the solution of Eq. (2), which represents the envelope of physical surface elevation, see Fig. 7. We notice that the proposed stabilization technique almost completely suppresses oscillations of U; this reflects in negligible \(\varepsilon \) overshoots, never larger than 0.3, which guarantees that the train of pulses will not break.

4.3 A glimpse into a physical realization in hydrodynamics

In the previous section, we use a quite conservative set of parameters, in order to assure the validity of the NLSE and the non-breaking of the wavetrain. The question arises if the stabilization can be achieved in a laboratory setting.

We consider a 100 m long wave tank , which is feasible in state-of-the-art hydrodynamic facilities. As our \(\xi =1000\)-long domain reduces to this length, all the other quantities presented in Sect. 4.1 are automatically rescaled. We obtain a carrier frequency \(f=1.58\) Hz, the corresponding depth values are then \(h(x=0) = 20\) cm and \(h(x=100\, \mathrm {m})=50 \) cm, the local wavelength varies from \(\lambda (x=0) = 63\) cm to \(\lambda (x=100 \,\mathrm {m})=157 \) cm, and the sideband detuning converts to \(\varDelta f = 0.17\) Hz. Finally, the maximum wave amplitude is estimated to vary from the initial 1.2 cm to 6.5 cm at the end of the wave tank.

This is an idealization, because damping occurs. From Eq. (4), we notice that the shoaling partially compensates dissipation. Nevertheless, shoaling becomes negligible for larger \(\kappa \), while the wave field keeps on damping exponentially: mathematically it is impossible to have exact compensation because \(c_\mathrm {g}\) decreases with \(\kappa \). Moreover, we showed above that phase-locking is kept only if \(\alpha \) is changed slowly. Thus, it is not possible to simply choose an arbitrarily large \(\kappa \) so that \({\tilde{\gamma }}\) reaches the same values of the undamped case; in fact, this would lie outside of the accessible parametric range because, for \(\kappa >5\), \(\gamma \) is almost constant, see Fig. 2.

The pulse train is thus meta-stable: for large enough damping, the separatrix will be crossed again, a period-two solution will be observed, and eventually the wave will vanish completely [43, 44].

The analytic treatment is as involved as the one required to describe the second stage of the stabilization.

We found from simulations that keeping every parameter as before a total loss of 20% can be tolerated. For the wave tank length specified above, this corresponds to \(\nu \approx 2 \times 10^{-3} \,\mathrm {m}^{-1}\), which is reasonable when the effect of sidewall dissipation is taken into account [45].

5 Conclusions

In this work, we study the nonlinear stage of evolution of modulational instability in surface water waves over a water body of gradually increasing depth. We showed that this stage can be stabilized and results in a uniform train of pulses on a background. The initial condition does not need to be restricted to an exact NLSE solution (e.g., an Akhmediev breather), but just a harmonic perturbation with a given small amplitude.

Based on a three-wave truncation, we studied how a linear depth change naturally leads to a virtually frozen state (which can be considered close to dn-oidal solution of the NLSE), provided that suitable initial conditions, i.e., frequency lying just outside the instability margin and with a relative phase facilitating separatrix crossing, are chosen.

Within these restrictions, still a wide range of carrier frequencies and depth variation is compatible with stabilization, even in spite of the unavoidable viscous damping.

Although the flexibility available to vary parameters in the hydrodynamics of surface water waves is much less than in other physical systems, such as optical fibers, our results will help clarify the possibility to dynamically control the breathing evolution of water wave-packets and to understand the impact of bathymetry on the persistence (or lifetime) of rogue waves.

Finally, we emphasize that the dn-oidal solution exhibits a specific stationary spectral profile, where sidebands are all phase-locked and where sidebands are in a given ratio among one another [47]. While we find our approach more general and physically transparent, the transformation between general solutions of the NLSE will be the subject of future studies.