## Abstract

Nonlinear systems with two competing frequencies show locking or resonances. In lasers, the two interacting frequencies can be the cavity repetition rate and a frequency externally applied to the system. Conversely, the excitation of breather oscillations in lasers naturally triggers a second characteristic frequency in the system, therefore showing competition between the cavity repetition rate and the breathing frequency. Yet, the link between breathing solitons and frequency locking is missing. Here we demonstrate frequency locking at Farey fractions of a breather laser. The winding numbers exhibit the hierarchy of the Farey tree and the structure of a devil’s staircase. Numerical simulations of a discrete laser model confirm the experimental findings. The breather laser may therefore serve as a simple test bed to explore ubiquitous synchronization dynamics of nonlinear systems. The locked breathing frequencies feature a high signal-to-noise ratio and can give rise to dense radio-frequency combs, which are attractive for applications.

## Introduction

Nonlinear systems with two competing frequencies show locking or resonances, in which the system locks into a resonant periodic response featuring a rational frequency ratio^{1}. The locking increases with nonlinearity, and at subcritical values of the nonlinearity, the system has quasi-periodic responses between locked states, whilst the supercritical system may exhibit chaotic as well as periodic or quasi-periodic responses. A general feature of frequency locking is the robustness of the locked states to variations of system parameters, namely, the constancy of the frequency ratio (or winding number) over a range of parameters. Frequency locking has been investigated theoretically and experimentally in many physical systems including coupled oscillators^{2}, charge-density waves^{3}, Josephson junctions^{4,5}, and the Van der Pol oscillator^{6} amongst others^{7}, and their distribution in parameter space in the form of a devil’s staircase^{8} is well understood from the number theory concept of Farey trees^{9,10,11,12,13,14}. In optics, frequency-locking phenomena have been extensively studied in modulated semiconductor lasers, where an external frequency can be readily coupled to the nonlinear system by using a radio-frequency (RF) source^{11,15,16,17,18}, and the hierarchy of the Farey tree and structure of a devil’s staircase can be rather easily observed when tuning the external frequency^{11}. Frequency locking has also been demonstrated in other laser structures, such as fibre lasers with external loss modulation^{19} or solid-state lasers operating in a two-mode regime^{20}. Furthermore, although not explicitly mentioned by the authors, the subharmonic, harmonic, and rational harmonic operation regimes of Kerr microresonators that were reported in refs. 21,22 imply a frequency-locking process. The generation of soliton molecules (i.e., stable bound states of two solitons) in a titanium-sapphire laser that was reported in ref. 23 also evidences the occurrence of frequency locking: a subharmonic response of the soliton molecule was observed when the strength of the external driving force exceeded a certain threshold.

All the frequency-locking examples mentioned above relate to nonlinear systems where an external, accurately controllable modulation provides a new frequency to the system. Far less is known, by comparison, when the second frequency is not externally controlled and is intrinsic to the nonlinear system. This is particularly relevant to breathing solitons that have recently emerged as a universal ultrashort pulse regime in passively mode-locked fibre lasers^{24,25,26,27,28}. Breathing solitons are localised structures showing periodic variations in their parameters. They are found in various subfields of natural science, such as solid-state physics, fluid dynamics, plasma physics, chemistry, molecular biology and nonlinear optics^{29}. In optics, breathers were first observed in Kerr fibre cavities^{30} and subsequently found in microresonators^{21,31,32}. They are currently attracting significant research interest in virtue of their relationship with a rich set of important nonlinear phenomena, such as rogue wave formation^{33,34}, the Fermi–Pasta–Ulam recurrence^{35,36,37}, turbulence^{38}, chimera states^{39,40}, chaos^{41} and modulation instability phenomena^{42}. From a practical application perspective, breathers contribute to improving the accuracy of dual-comb spectroscopy^{43} as the breathing frequency comes along with additional tones in a frequency comb, and the breather laser can produce strong ultrashort pulses without using compressors^{44,45}.

In this paper, we present the first in-depth study of the locking of breather oscillations to the cavity repetition frequency in a fibre laser. Besides the hurdle represented by the absence of an external driver to realise frequency locking, the excitation of breathing solitons requires fine-tuning of the laser parameters, as the parameter space of breathing soliton mode locking is much narrower than stationary mode locking^{44}. Therefore, targeting frequency-locked breather states in the laser via trial and error is a laborious task. Here we show that such a difficulty can be circumvented by using an evolutionary algorithm (EA). Machine-learning methods, referring to using statistical techniques and numerical algorithms to carry out tasks without explicit programmed and procedural instructions, are widely deployed in many areas of engineering and science^{46}. In the field of ultrafast photonics, machine-learning approaches and the application of genetic and evolutionary algorithms have recently led to several dramatic improvements in dealing with the multivariable optimisation problem associated with reaching desired operating regimes in fibre lasers. In the present study, the merit function used in the EA optimisation procedure can distinguish between frequency-locked and unlocked breather states, thereby enabling fast and precise tuning of the laser to the target frequency-locked breather operation. The locked breather states show two unambiguous features: persistence under pump power and polarisation perturbations, and narrow linewidth and high signal-to-noise ratio (SNR) of the oscillation frequency in the electrical spectrum of the laser emission. Importantly, frequency-locked states occur in the order they appear in the Farey tree and within a pump-power range equalling the width of the corresponding step in the devil’s staircase. This demonstrates that breather mode-locked fibre lasers exhibit the ubiquitous competing dynamics of two interacting frequencies in coupled systems.

## Results

### Frequency-locked and unlocked breathers in the laser

To investigate the dynamics of breathers, we have built the fibre ring cavity that is sketched in Fig. 1a. Pump light is provided by a 980-nm laser diode and it is delivered to the unidirectional cavity through a wavelength-division multiplexer. A piece of erbium-doped fibre (1.25 m) is employed as the gain medium. Other fibres in the cavity are standard single-mode fibres. These two optical fibres have group-velocity dispersion (GVD) parameters of 65, and –22.8 ps^{2}/km, respectively, resulting in a net cavity dispersion of 0.009 ps^{2} around 1565 nm. The laser has a repetition rate (\({f}_{{{{{{\rm{r}}}}}}}\)) of 34.2 MHz. Mode locking is realised through an effective saturable absorber by the nonlinear polarisation evolution (NPE) effect^{47}. The transfer function of the saturable absorber (NPE) is controlled via three wave plates based on liquid crystal (LC) phase retarders working together with a polarisation beam splitter (PBS). The PBS is also used as an output coupler. The emitted light from the laser is monitored by several diagnostic systems. A portion is measured directly by a 50-GHz photodiode (PD1) connected to a real-time oscilloscope with a bandwidth of 33 GHz and a sampling rate of 80 GSa/s. The second laser output is input to a dispersive Fourier transform (DFT) setup which constitutes a long segment fibre that cumulates a GVD large enough for the stretched waveform to represent the spectral intensity of the initial pulse waveform^{48}. Thus, the optical spectrum of each pulse can be measured in real time by the oscilloscope through detecting the output signal from the DFT setup (PD2). Additional measurement devices are used to characterise the spectral properties of the laser output: an optical spectrum analyser, an electrical spectrum analyser (ESA), and a cymometer.

Breathing solitons can be excited by tuning the pump strength and the cavity loss (polarisation controllers)^{24} in the laser. Figure 2a, b shows an example of a breather operation of the laser recorded at a pump power of 74 mW. In sharp contrast with soliton pulse shaping which generates uniform pulse trains, the train of output pulses shows periodic variations in intensity occurring, in the example of Fig. 2a, across a well-defined period of 50 cavity roundtrips. Note that while Fig. 2a shows the photo-detected signal after time stretching, the same periodic evolution is also observed for the pulse train directly detected at the laser output. The corresponding spatiospectral representation of the laser regime (Fig. 2b) depicts that the optical spectrum of the pulse broadens and compresses periodically over cavity roundtrips, synchronised with the periodic variations in pulse energy (white line), which is a distinctive feature of breathing solitons. Variations in the system parameters may give rise to a different breather state in the laser as shown in Fig. 2c, d, where the pump power is decreased to 73 mW: whilst the period of oscillation seems to be unchanged, the quality of the periodic behaviour is clearly degraded in comparison with the previous case. The RF spectra of the laser emission taken from the ESA (Fig. 3) reveal the major difference between the two types of breather states. The breathing frequency of the unstable breather state shown in Fig. 2c exhibits a noisy and broad structure (Fig. 3c, d). By contrast, the stable breather state of Fig. 2a features a neat breathing frequency with narrow linewidth (0.5 Hz; see Supplementary Fig. 1 for details of the measurement) and high SNR (Fig. 3a, b). The measurements taken with the cymometer confirm the different stability properties of the breathing frequency for the two states (Fig. 3e). The breathing frequency (\({f}_{{{{{{\rm{b}}}}}}}\)) of the stable breather state is 6.84 MHz exactly equalling one-fifth of the fundamental repetition frequency, hence corresponding to a rational winding number of \({{f}}_{{{{{{\rm{b}}}}}}}/{f}_{{{{{{\rm{r}}}}}}}=1/5\). As discussed later in this paper, this locked breathing frequency remains unchanged over a range of pump power values.

### Evolutionary algorithm optimisation of frequency-locked breathers

Reaching a frequency-locked breather state in our laser depends on precisely adjusting four parameters: the pump strength and three polarisation controllers, which is quite difficult to do manually. In ref. 49, we have introduced an approach based on an EA to search and control the breather mode-locking state in ultrafast fibre lasers. It relies on detecting and controlling the key parameter of breathers—the breathing frequency, to tune the period and breathing ratio of breathers. In the self-tuning regime, the operation state of the laser is characterised in real time with the oscilloscope, which is linked to a computer running the EA and controlling the polarisation state through the voltages applied on the LCs via a driver to lock the system to the desired breather regime (Fig. 1a, b). Yet, the merit function of the breather mode locking used in ref. 49 is unable to distinguish between frequency-locked and unlocked breather states, where it usually breeds unlocked (unstable) states which have a wider parameter space. Here, we further develop our approach to directly pinpoint frequency-locked breathers so that the EA tunes the laser to these states only. To this end, we define a new merit function that takes into account the distinguishing trait of frequency-locked breather states, namely, a high SNR of the breathing frequency as shown in Fig. 3a, b. The new merit function is given in Eq. (3) in “Methods”. Figure 4a shows a representative optimisation curve (referring to a breather state with a winding number of 1/5). It depicts the evolution of the maximum and mean merit scores of the population over successive generations along with the corresponding evolution of the SNR of the breathing frequency. We can see that the SNR grows rapidly and converges to a maximum after eight generations, thus indicating the establishment of a frequency-locked operation mode of the laser. The best merit score features a similar evolution. The measurements of the breathing frequency under pump power and ploarisation tuning shown in Fig. 4b and c, respectively, confirm that the laser works in the target regime. The reliability of the merit function of the frequency-locked breather state has been assessed by repeating the optimisation procedure numerous times, with the results showing that each time the SNR of the breathing frequency is high-frequency locking occurs. Additional examples of optimisation curves (for breather states with the winding numbers 1/5 and 2/9) are given in Supplementary Fig. 2.

### Farey tree and devil’s staircase of the breather laser

Benefiting from a reliable and efficient EA-based optimisation approach, we have explored the transitions between the different breather states of the laser that can be accessed by varying the pump power starting from the range corresponding to a 1/5 frequency-locked state. Figure 5a shows an example of a plot of the breathing frequency as a function of the pump power, revealing the presence of various plateaux (steps). The spectral measurements carried out with the ESA allow us to unambiguously relate the breathing frequencies associated with the plateaux to rational winding numbers: as shown in Fig. 5b–d, when the laser operates in a frequency-locked state, the RF spectrum features a finite number *n* of spectral lines below the cavity repetition frequency \({f}_{{{{{{\rm{r}}}}}}}\) and equally spaced by \({f}_{{{{{{\rm{r}}}}}}}\)/*n*. For example, in Fig. 5d, the frequency-locked breather regime brings about the excitation of a RF comb that is 41 times denser than that obtained when the laser operates in the usual single-pulse stationary regime. The most intense line in the spectrum is the breathing frequency \({f}_{{{{{{\rm{b}}}}}}}\), and if this is the *m*th line from the short-frequency side, then the corresponding winding number is given by *m*/*n*. The temporal and spectral dynamics of the breather patterns belonging to the winding numbers 2/9 and 9/41 are given in Supplementary Fig. 3.

Importantly, in Fig. 5a the winding numbers occur from left to right in the sequence predicted by the Farey tree, as shown in the inset of the figure, and the width of the step associated with a *m*/*n* frequency-locked state depends on the level where *m*/*n* appears in the Farey tree’s hierarchy. The gaps (in pump power) between the stairs (plateaux) refer to quasi-periodic breather oscillations similar to the example shown in Figs. 2c, d and 3c, d. The fractal dimension *D* of the stairs can be calculated from the set of gaps (see Methods), and is determined to be *D* = 0.906 ± 0.025, approaching the value of 0.87 expected from a complete devil’s staircase^{9}. Note that fractal dimensions of 0.890 ± 0.001 and 0.91 ± 0.03 were reported in refs. 8,11, respectively. Here, the small deviation (4%) from 0.87 partly results from the minimum power increment of the pump laser diode (0.1 mW). The fact that the steps associated with the winding numbers 7/32 and 9/41 consist of only one point in Fig. 5a is also due to this limitation, thus stressing the need for very robust control of the system’s properties. The process of formation of the devil’s staircase is reversible: by decreasing the pump power, nearly the same staircase can be observed. We emphasise that contrarily to modulated external-cavity semiconductor lasers where the modulation frequency can be arbitrarily set hence the frequency-locked states appearing in the order predicted by the Farey tree can be easily accessed^{11}, in a breathing soliton mode-locked laser the breathing frequency is established once the laser is fabricated, while it can be entrained by tuning the laser parameters. Nevertheless, the Farey tree and devil’s staircase can still be observed, indicating the universality of this fractal phenomenon. Setting the laser to a slightly different initial polarisation state, Farey fractions belonging to other two parts of the Farey tree can be identified through the RF spectra while tuning the pump power (see Supplementary Figs. 4 and 5). In both cases, the calculated dimension of the stairs approaches that of a complete devil’s staircase.

Figure 5e illustrates the build-up phase of frequency locking. Starting from a pump power of 69 mW, three radiofrequencies are present, namely the breathing frequency (\({f}_{{{{{{\rm{b}}}}}}}\)), the difference frequency between \({f}_{{{{{{\rm{r}}}}}}}\) and 5th harmonic of \({f}_{{{{{{\rm{b}}}}}}}({f}_{{{{{{\rm{r}}}}}}}-5{f}_{{{{{{\rm{b}}}}}}})\), and the difference frequency between the first two \((6{f}_{{{{{{\rm{b}}}}}}}-{f}_{{{{{{\rm{r}}}}}}})\). As \({f}_{{{{{{\rm{r}}}}}}}-5{f}_{{{{{{\rm{b}}}}}}}\) approaches zero, frequency locking occurs at the winding number 1/5. This winding number then experiences redshifts under pump-power increments, generating other winding numbers. The map shown in Fig. 5e also evidences the very different spectral features of frequency-locked and quasi-periodic breather states. Therefore, even though the winding numbers 7/32 and 9/41 display only one point in Fig. 5a, they can clearly be identified in this map, which reveals a richness of detail that has been largely overlooked in previous studies due to the lack of high-quality RF spectral measurements. It is also noteworthy that changing the pump power by only 10% is enough to find seven frequency-locked states for the laser, whose power-stability properties are dictated by a devil’s staircase. As a further note, we would like to emphasise that the frequency-locked states observed are reproducible but not self-starting, meaning that if the pump power is turned off when the laser operates in a locked state and then it is turned back on again, the laser does not return to that state instantaneously. To restore the frequency-locked operation, one can run the EA controlling the polarisation states again, which will quickly reset the laser to the desired state. Many such experimental tests have confirmed the reproducibility of the locked states.

To validate our experimental findings, we have performed numerical simulations of the laser using a scalar-field, lumped model that includes the dominant physical effects of the system on the evolution of a pulse over one round trip inside the cavity, namely, GVD and self-phase modulation for all the fibres, gain saturation and bandwidth-limited gain for the active fibre^{50}, and the discrete effects of a saturable absorber element (see “Methods”). The gain saturation energy in the model is related to the pump power in the experiment. Figure 6a, b shows plots of the breathing frequency (winding number) as a function of the gain saturation energy when the latter is varied starting from the range corresponding to a 1/5 locked state with a step of 10 and 1 pJ, respectively. With the smaller step, more plateaux are observed, thus confirming the fractal structure of the winding number distribution. It is seen in Fig. 6b that the model can reproduce the same part of the Farey tree from a breathing frequency of 1/5 to 2/9 as that observed in the experiment (Fig. 5a). The gaps (in gain saturation energy) between the stairs also resemble those (in pump power) found in the experiment. The fractal dimension of the set of gaps calculated from the model is 0.873 ± 0.09, which is closer to the value expected from a complete devil’s staircase than the experimentally calculated value because the step in gain saturation energy can be made arbitrarily small in the model. Figure 6c illustrates the build-up phase of frequency locking, which again shows good agreement with the experimental results (Fig. 5e). As mentioned above, a small change in the initial polarisation state of the laser can trigger Farey fractions belonging to a different part of the Farey tree. This experimental observation is confirmed by the results shown in Supplementary Fig. 6, which have been obtained by slightly changing the linear intracavity loss in the model.

## Discussion

We have demonstrated for the first time that a fibre laser working in the breathing soliton generation regime is a nonlinear system showing frequency locking at Farey fractions. The frequency-locked breather states of the laser are characterised by robustness against parameter (pump power and polarisation) variations and a breathing frequency with narrow linewidth and high SNR. We have exploited the latter feature to realise intelligent control of the frequency-locking process, where the use of an EA with a locked breather-tailored merit function has been the key to the precise excitation of these breather states. Indeed, contrary to previous frequency-locking demonstrations in optics relying on an external modulation applied to the system, we have been able to manipulate the intrinsic breathing frequency of the laser system. Both the experiments and simulations show that the fractal dimension of the winding numbers of breathers approaches that of devil’s staircase, indicating the universal nature of the laser. The breather mode-locked fibre laser thus may serve as a simple model system to investigate the universal dynamics of frequency locking. Besides, our work may stimulate the study of frequency locking in other physical systems where breathing solitons are found, where frequency locking could give a new angle on the dynamics of these systems. The EA approach used in this paper could benefit the control of the frequency-locking process in such systems as well as in others. We also believe that our EA-based approach for the control of frequency locking in fibre lasers is not restricted to NPE-based configurations and can be extended to other laser mode-locking schemes that entail period multiplication, such as the Mamyshev oscillator^{51,52}.

Optical breathing solitons have been extensively studied in open-loop nonlinear systems such as single-pass fibre systems^{36,53}. However, in the absence of a frequency-locking mechanism, these breathers may suffer from instabilities originating from the noise of the input light. By contrast, we have studied the dynamics of breathers in a closed-loop system—a laser resonator. In this system, the universal frequency-locking process is tailored through the nonlinear interaction between the cavity repetition frequency provided by the laser resonator and the breathing frequency. Ergo, frequency-locked breathers can be generated, showing excellent stability against cavity parameter perturbations.

Frequency-locked breathers give rise to wide and dense RF combs which are not constrained by the length of the laser cavity. We have shown an example of a comb where the density of the spectral lines is increased by a factor of 41 compared with stationary single-pulse mode locking, thus enabling a line spacing in the sub-MHz range. Another example of a dense comb (where the density increase factor is 35) is given in Supplementary Fig. 4. Therefore, representing an alternative to fibre cavities of hundreds of metres which are regarded as being highly unstable, controlled frequency-locked breather lasers are attractive for many applications, for instance, in high-resolution spectroscopy.

We note that subharmonic entrainment of breather oscillations to the cavity repetition rate in a fibre laser was recently reported and explained as arising between the exceptional points of a non-Hermitian system involving two coupled modes with different detunings^{26}. However, in light of the results presented in this paper, we believe that the observed dynamics of subharmonically entrained breathers fall outside of the exceptional point physics and can be well understood in the framework of frequency locking of a nonlinear system with two competing frequencies.

Dispersion plays an important role in determining the pulse dynamics in ultrafast fibre lasers^{54,55,56}. The laser cavity used in this work has a nearly zero net dispersion. We have observed that frequency locking of breathers does not occur when the laser is operated at moderate or large normal dispersion^{24,49}. Thus, a very small net cavity dispersion seems to be crucial to the emergence of frequency-locked breathers in a fibre laser. It is worth noting in this regard that breathing solitons at nearly zero net dispersion and large normal dispersion differ quite significantly in respect to their period of oscillation. Indeed, the former oscillates with a period ranging from several to dozens of round trips while the latter generally features a much longer period of the order of hundreds of round trips^{24}, indicating that the underlying formation mechanism could be different. Future work will thoroughly investigate the connection between the frequency-locking mechanism and the cavity dispersion.

## Methods

### Farey tree

The Farey tree refers to a particular sequence of rational numbers by using the Farey-sum or median operation \(\bigoplus\) to two adjacent fractions, *m*/*n* and *p*/*q*, returning a new fraction in the next lower level of the tree by summing the denominators and numerators separately:

The physically motivated hypothesis invoked to explain the local ordering of the hierarchy of (two-frequency) resonances is that the larger the denominator, the smaller the plateau. The Farey fraction or Farey mediant is the fraction with smallest denominator between *m*/*n* and *p*/*q*, if they are sufficiently close that \(\left|{np}-{mq}\right |=1\) – when they are called adjacents—hence it is the most important resonance in the interval. The Farey tree provides a qualitative local ordering of two-frequency resonances and gives rise to a curve containing an infinite number of plateaux exhibiting self-similarity, which is known as the devil’s staircase. A detailed review can be found in ref. 10.

### Fractal dimension of a complementary set

We have employed the equation^{57}

for computation of the fractal dimension *D* of the Cantor set complementary (on the pump-power axis) to a complete devil’s staircase. In this equation, \(S\) refers to the gap (in pump power) between two parental stairs representing winding numbers *m*/*n* and *p*/*q*, and \({S}_{{{{{{\rm{i}}}}}}}\) corresponds to the gaps between the filial stair \((m+p)/(n+q)\) and the parental stairs.

### Evolutionary algorithm

The principle of the EA, as depicted in Fig. 1b, imitates Darwin’s evolution theory: only the fittest individuals in a population survive through successive generations^{58}. Here, an individual refers to a laser regime, related to the transfer function of NPE determined by the three control voltages added to the LCs; the three voltages are thus the individuals’ genes. The algorithm starts with a group of individuals (population), each constituted by a collection of random genes. The output of the system is monitored for all the individuals in each generation, calculated by a user-defined merit function and a score is returned. Then the EA produces the new generation by breeding individuals from the last generation; the possibility of an individual to be chosen as a “parent” depends on their score (“roulette wheel” selection^{58}). To generate two new individuals (children), the genes are interchanged between two parents who are randomly chosen. Mutation is also considered, allowing refreshing the genetic sequence. This procedure continues until the algorithm converges, giving rise to the fittest individual. In the experiment, the algorithm starts with a population containing 50 individuals and the number of individuals of the next generations is maintained at a constant value of 30 (6 parents and 24 children). It takes 2.5 min for the system to evaluate the merits of the 30 individuals in a generation.

The merit function plays a key role in realising self-tuning of the laser, which must give a larger value as the target state is approached. In the present work, we have defined and tested the following merit function for the auto-setting of an optimised self-starting frequency-locked breather regime:

with *F*_{ml} being the merit function associated with the mode-locking state of the laser^{59}:

where *N* is the number of the outputting laser intensity peaks (*N* = 2^{24}, referring to a time trace of 7174 round trips), *I*_{i} is the intensity at the position *I* in the time trace and *I*_{th} is an intensity threshold higher than the noise. Thus, *F*_{ml} is the average intensities of the pulses and is used to exclude laser modes, including noise-like pulsing and relaxation oscillations, which can display similar RF spectral features to the breather regime. The second term *F*_{b} is a merit function that distinguishes between breathers and stationary mode-locked regime, derived from the feature that the breathing frequency \({f}_{{{{{{\rm{b}}}}}}}\) emerges as two symmetrical sidebands \({f}_{\pm 1}\) around the cavity repetition frequency \({f}_{{{{{{\rm{r}}}}}}}\) as measured by the ESA \(({f}_{{{{{{\rm{b}}}}}}}=|{f}_{\pm 1}-{f}_{{{{{{\rm{r}}}}}}}|).\) There are no sidebands when the laser operates at a stable mode-locked state. As a result, *F*_{b} is designed to exploit the intensity ratio between the cavity repetition rate (\({f}_{{{{{{\rm{r}}}}}}}\)) and its sidebands at \({f}_{\pm 1}\):

where the numerator and denominator in the fraction are the intensities measured across the frequency range with a width of 2Δ centred at \({f}_{{{{{{\rm{r}}}}}}}\) and the frequency span from \({f}_{-1}\) to \({f}_{+1}\), respectively. Therefore, if *F*_{b} is close to zero, it represents that \({f}_{{{{{{\rm{r}}}}}}}\) dominates and no sidebands are present, indicating that the laser works in a stationary mode-locked regime. In contrast, a far from zero value of *F*_{b} means the generation of strong sidebands in the RF spectra, evidencing that breathers could be formed in the laser. In the optimisation process, the RF spectrum is calculated through fast Fourier transform of the laser intensity recorded by the oscilloscope. The weighted sum of *F*_{ml} and *F*_{b} can be used to target the regime of breather mode locking^{49}. The third term in Eq. (3) is a new merit function used to distinguish between frequency-locked and unlocked breather oscillations by evaluating the strongest breathing frequency in the interval \(\left[{f}_{{{{{{\rm{r}}}}}}}+\delta,3{f}_{{{{{{\rm{r}}}}}}}/2\right]\):

where the frequency shift \(\delta\) is used to exclude the fundamental frequency from the evaluation interval, and \({f}_{{{{{{\rm{r}}}}}}}\)/2 represents the maximum possible breathing frequency. The weights of the three components in Eq. (3) are determined empirically and set to \(\alpha\) = 2000, β = 200 and \(\gamma\) = 200.

### Numerical modelling

The generalised nonlinear Schrödinger equation is used to model the pulse evolution dynamics in optical fibres and its scalar version is^{50}:

where \(\psi=\psi (z,t)\) is the slowly varying electric field, *z* is the propagation coordinate, \({\beta }_{2}\) and \(\gamma\) are the second-order dispersion and Kerr nonlinearity coefficients, respectively, and the dissipative terms represent linear gain as well as a parabolic approximation to the gain profile with the bandwidth *Ω*. The gain is saturated according to \(g\left(z\right)={g}_{0}{\exp }(-{E}_{{{{{{\rm{p}}}}}}}/{E}_{{{{{{\rm{sat}}}}}}}),\) where *g*_{0} is the small-signal gain, which is non-zero only for the gain fibre, \({E}_{{{{{{\rm{p}}}}}}}\left(z\right)=\int {{\mbox{d}}}t{\left|\psi \right|}^{2}\) is the pulse energy, and \({E}_{{{{{{\rm{sat}}}}}}}\) is the gain saturation energy determined by the pump power. The NPE-based mode-locking method can be modelled by an instantaneous and monotonous nonlinear transfer function for the field amplitude:

where \({q}_{0}\) is the unsaturated loss due to the absorber, \({q}_{{{{{{\rm{m}}}}}}}\) is the saturable loss (modulation depth), \(P\left(z,t\right)={\left|\psi (z,t)\right|}^{2}\) is the instantaneous pulse power, and \({P}_{{{{{{\rm{sat}}}}}}}\) is the saturation power. Linear losses are imposed after the passive fibre segments, which summarise intrinsic losses and output coupling. The numerical model is solved with a standard symmetric split-step propagation algorithm and uses similar parameters to the nominal or estimated experimental values (see Supplementary Table 1).

## Data availability

The data generated in this study have been deposited in the Zenodo database [https://zenodo.org/record/7009100#.Yv82ubdBxD8t].

## Code availability

The code that supports the findings of this study is available from the corresponding author on request.

## References

Huygens, C. “Extrait d’une lettre escrite de La Haye, le 26 fevrier 1665”.

*J. des Scavans***11**(1665). See the correction published in the following issue in Huygens, C. Observation a faire sur le dernier article de precedent journal, où il est parlé de la concordance de deux pendules suspenduës à trois ou quatre pieds l’une de l’ autre.*J. des Scavans***12**(1665).Thévenin, J., Romanelli, M., Vallet, M., Brunel, M. & Erneux, T. Resonance assisted synchronization of coupled oscillators: frequency locking without phase locking.

*Phys. Rev. Lett.***107**, 104101 (2011).Grüner, G. The dynamics of charge-density waves.

*Rev. Mod. Phys.***60**, 1129 (1988).Shapiro, S. Josephson currents in superconducting tunneling: the effect of microwaves and other observations.

*Phys. Rev. Lett.***11**, 80 (1963).Wiesenfeld, K., Colet, P. & Strogatz, S. H. Frequency locking in Josephson arrays: connection with the Kuramoto model.

*Phys. Rev. E***57**, 1563–1569 (1998).Van der Pol, B. & Van Der Mark, J. Frequency demultiplication.

*Nature***120**, 363–364 (1927).Zhang, J. et al. Observation of a discrete time crystal.

*Nature***543**, 217–220 (2017).Brown, S. E., Mozurkewich, G. & Grüner, G. Subharmonic Shapiro steps and devil’s-staircase behavior in driven charge-density-wave systems.

*Phys. Rev. Lett.***52**, 2277 (1984).Jensen, M. H., Bak, P. & Bohr, T. Complete devil’s staircase, fractal dimension, and universality of mode-locking structure in the circle map.

*Phys. Rev. Lett.***50**, 1637 (1983).Bak, P. Devil’s staircase.

*Phys. Today***39**, 38–45 (1986).Baums, D., Elsässer, W. & Göbel, E. O. Farey tree and devil’s staircase of a modulated external-cavity semiconductor laser.

*Phys. Rev. Lett.***63**, 155 (1989).Jin, F.-F., Neelin, J. D. & Ghil, M. El Niño on the devil’s staircase: annual subharmonic steps to chaos.

*Science***264**, 70–72 (1994).Kuroda, K. et al. Devil’s staircase transition of the electronic structures in CeSb.

*Nat. Commun.***11**, 2888 (2020).Bak, P. & von Boehm, J. Ising model with solitons, phasons, and “the devil’s staircase”.

*Phys. Rev. B***21**, 5297–5308 (1980).Winful, H., Chen, Y. & Liu, J. Frequency locking, quasiperiodicity, and chaos in modulated self‐pulsing semiconductor lasers.

*Appl. Phys. Lett.***48**, 616–618 (1986).Varangis, P., Gavrielides, A., Erneux, T., Kovanis, V. & Lester, L. Frequency entrainment in optically injected semiconductor lasers.

*Phys. Rev. Lett.***78**, 2353 (1997).Wünsche, H. J. et al. Synchronization of delay-coupled oscillators: a study of semiconductor lasers.

*Phys. Rev. Lett.***94**, 163901 (2005).Shortiss, K., Lingnau, B., Dubois, F., Kelleher, B. & Peters, F. H. Harmonic frequency locking and tuning of comb frequency spacing through optical injection.

*Opt. Express***27**, 36976–36989 (2019).Yue, L., Xue, F., Wei, Z. & Xiao-Ming, L. An experiment of dynamical behaviours in an erbium-doped fibre-ring laser with loss modulation.

*Chin. Phys. B***18**, 3318 (2009).Otsuka, K., Hwong, S.-L. & Nguyen, B. A. Intrinsic instability and locking of pulsation frequencies in free-running two-mode class-B lasers.

*Phys. Rev. A***61**, 053815 (2000).Cole, D. C. & Papp, S. B. Subharmonic entrainment of Kerr breather solitons.

*Phys. Rev. Lett.***123**, 173904 (2019).Xu, Y. et al. Harmonic and rational harmonic driving of microresonator soliton frequency combs.

*Optica***7**, 940–946 (2020).Kurtz, F., Ropers, C. & Herink, G. Resonant excitation and all-optical switching of femtosecond soliton molecules.

*Nat. Photon.***14**, 9–13 (2020).Peng, J., Boscolo, S., Zhao, Z. & Zeng, H. Breathing dissipative solitons in mode-locked fiber lasers.

*Sci. Adv.***5**, eaax1110 (2019).Du, Y., Xu, Z. & Shu, X. Spatio-spectral dynamics of the pulsating dissipative solitons in a normal-dispersion fiber laser.

*Opt. Lett.***43**, 3602–3605 (2018).Xian, T., Zhan, L., Wang, W. & Zhang, W. Subharmonic entrainment breather solitons in ultrafast lasers.

*Phys. Rev. Lett.***125**, 163901 (2020).Peng, J. & Zeng, H. Experimental observations of breathing dissipative soliton explosions.

*Phys. Rev. Appl.***12**, 034052 (2019).Peng, J. et al. Breather molecular complexes in a passively mode‐locked fiber laser.

*Laser Photon. Rev.***15**, 2000132 (2021).Remoissenet, M.

*Waves Called Solitons: Concepts and Experiments*(Springer Science & Business Media, 2013).Leo, F., Gelens, L., Emplit, P., Haelterman, M. & Coen, S. Dynamics of one-dimensional Kerr cavity solitons.

*Opt. Express***21**, 9180–9191 (2013).Yu, M. et al. Breather soliton dynamics in microresonators.

*Nat. Commun.***8**, 14569 (2017).Lucas, E., Karpov, M., Guo, H., Gorodetsky, M. L. & Kippenberg, T. J. Breathing dissipative solitons in optical microresonators.

*Nat. Commun.***8**, 736 (2017).Suret, P. et al. Single-shot observation of optical rogue waves in integrable turbulence using time microscopy.

*Nat. Commun.***7**, 13136 (2016).Dudley, J. M., Dias, F., Erkintalo, M. & Genty, G. Instabilities, breathers and rogue waves in optics.

*Nat. Photon.***8**, 755–764 (2014).Bao, C. et al. Observation of Fermi-Pasta-Ulam recurrence induced by breather solitons in an optical microresonator.

*Phys. Rev. Lett.***117**, 16 (2016).Mussot, A. et al. Fibre multi-wave mixing combs reveal the broken symmetry of Fermi–Pasta–Ulam recurrence.

*Nat. Photon.***12**, 303–308 (2018).Flach, S., Ivanchenko, M. & Kanakov, O. q-Breathers and the Fermi-Pasta-Ulam problem.

*Phys. Rev. Lett.***95**, 064102 (2005).Soto-Crespo, J. M., Devine, N. & Akhmediev, N. Integrable turbulence and rogue waves: breathers or solitons?

*Phys. Rev. Lett.***116**, 103901 (2016).Tinsley, M. R., Nkomo, S. & Showalter, K. Chimera and phase-cluster states in populations of coupled chemical oscillators.

*Nat. Phys.***8**, 662–665 (2012).Larger, L., Penkovsky, B. & Maistrenko, Y. Laser chimeras as a paradigm for multistable patterns in complex systems.

*Nat. Commun.***6**, 7752 (2015).Kouomou, Y. C., Colet, P., Larger, L. & Gastaud, N. Chaotic breathers in delayed electro-optical systems.

*Phys. Rev. Lett.***95**, 203903 (2005).Närhi, M. et al. Real-time measurements of spontaneous breathers and rogue wave events in optical fibre modulation instability.

*Nat. Commun.***7**, 13675 (2016).Liao, P. et al. Chip-scale dual-comb source using a breathing soliton with an increased resolution. in

*Conference on Lasers and Electro-Optics*. paper JTh5A.4 (Optical Society of America, 2018).Chang, W., Soto-Crespo, J. M., Vouzas, P. & Akhmediev, N. Extreme soliton pulsations in dissipative systems.

*Phys. Rev. E***92**, 022926 (2015).Chang, W., Soto-Crespo, J. M., Vouzas, P. & Akhmediev, N. Extreme amplitude spikes in a laser model described by the complex Ginzburg–Landau equation.

*Opt. Lett.***40**, 2949–2952 (2015).Jordan, M. I. & Mitchell, T. M. Machine learning: trends, perspectives, and prospects.

*Science***349**, 255–260 (2015).Noske, D., Pandit, N. & Taylor, J. Subpicosecond soliton pulse formation from self-mode-locked erbium fibre laser using intensity dependent polarisation rotation.

*Electron. Lett.***28**, 2185–2186 (1992).Goda, K. & Jalali, B. Dispersive Fourier transformation for fast continuous single-shot measurements.

*Nat. Photon.***7**, 102–112 (2013).Wu, X. et al. Intelligent breathing soliton generation in ultrafast fiber lasers.

*Laser Photon. Rev.***16**, 2100191 (2022).Haus, H. A. Mode-locking of lasers.

*IEEE J. Sel. Top. Quantum Electron.***6**, 1173–1185 (2000).Pitois, S., Finot, C., Provost, L. & Richardson, D. J. Generation of localized pulses from incoherent wave in optical fiber lines made of concatenated Mamyshev regenerators.

*J. Opt. Soc. Am. B***25**, 1537–1547 (2008).Cao, B. et al. Observation of pulsating dissipative solitons in a Mamyshev oscillator.

*Phys. Rev. A***106**, 023519 (2022).Xu, G., Gelash, A., Chabchoub, A., Zakharov, V. & Kibler, B. Breather wave molecules.

*Phys. Rev. Lett.***122**, 084101 (2019).Wise, F. W., Chong, A. & Renninger, W. H. High‐energy femtosecond fiber lasers based on pulse propagation at normal dispersion.

*Laser Photon. Rev.***2**, 58–73 (2008).Grelu, P. & Akhmediev, N. Dissipative solitons for mode-locked lasers.

*Nat. Photon.***6**, 84–92 (2012).Peng, J. & Boscolo, S. Filter-based dispersion-managed versatile ultrafast fibre laser.

*Sci. Rep.***6**, 25995 (2016).Hentschel, H. G. E. & Procaccia, I. The infinite number of generalized dimensions of fractals and strange attractors.

*Phys. D.***8**, 435–444 (1983).Mitchell, M.

*An Introduction to Genetic Algorithms*(MIT Press, 1998).Pu, G., Yi, L., Zhang, L. & Hu, W. Intelligent programmable mode-locked fiber laser with a human-like algorithm.

*Optica***6**, 362–369 (2019).

## Acknowledgements

We acknowledge support from the National Natural Science Fund of China (11621404, 11561121003, 11727812, 61775059, 12074122, 62022033 and 11704123), Shanghai Municipal Science and Technology Major Project (2019SHZDZX01-ZX05), Key Project of Shanghai Education Commission (2017-01-07-00-05-E00021), National Key Laboratory Foundation of China (6142411196307), Shanghai Rising-Star Program and Science and Technology Innovation Program of Basic Science Foundation of Shanghai (18JC1412000), the Agence Nationale de la Recherche (ANR-20-CE30-004).

## Author information

### Authors and Affiliations

### Contributions

J.P. and H.Z. initiated the work. X.W., J.P. and H.Z. performed the experiments. X.W., Y.Z., J.P. and S.B. carried out the numerical simulations. J.P., S.B., C.F and H.Z. supervised and guided the work. All authors contributed to data analysis and the writing of the paper.

### Corresponding authors

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review

### Peer review information

*Nature Communications* thanks Shaowu Pan and the other anonymous reviewer(s) for their contribution to the peer review of this work. Peer review reports are available.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Wu, X., Zhang, Y., Peng, J. *et al.* Farey tree and devil’s staircase of frequency-locked breathers in ultrafast lasers.
*Nat Commun* **13**, 5784 (2022). https://doi.org/10.1038/s41467-022-33525-0

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41467-022-33525-0

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.