Classification of birefringence in mode-locked fiber lasers using machine learning and sparse representation

It has been observed that changes in the birefringence, which are difficult or impossible to directly measure, can significantly affect mode-locking in a fiber laser. In this work we develop techniques to estimate the effective birefringence by comparing a test measurement of a given objective function against a learned library. In particular, a toroidal search algorithm is applied to the laser cavity for various birefringence values by varying the waveplate and polarizer angles at incommensurate angular frequencies, thus producing a time-series of the objective function. The resulting time series, which is converted to a spectrogram and then dimensionally reduced with a singular value decomposition, is then labelled with the corresponding effective birefringence and concatenated into a library of modes. A sparse search algorithm (L1-norm optimization) is then applied to a test measurement in order to classify the birefringence of the fiber laser. Simulations show that the sparse search algorithm performs very well in recognizing cavity birefringence even in the presence of noise and/or noisy measurements. Once classified, the wave plates and polarizers can be adjusted using servo-control motors to the optimal positions obtained from the toroidal search. The result is an efficient, self-tuning laser. © 2014 Optical Society of America OCIS codes: (140.4050) Mode-locked lasers; (140.3510) Fiber lasers; (320.7090) Ultrafast lasers. References and links 1. D. J. Richardson, J. Nilsson, and W. A. Clarkson, “High power fiber lasers: current status and future perspectives,” J. Opt. Soc. Am. B 27, B63–B92 (2010). 2. C. D. Poole and R. E. Wagner, “Phenomenological approach to polarization dispersion in long single-mode fibers,” Electron. Lett. 22, 1029–1030 (1986). 3. C. R. Menyuk, “Pulse propagation in an elliptically birefringent Kerr media,” IEEE J. Quant. Electron. 25, 2674– 2682 (1989). 4. C. R. Menyuk, “Nonlinear pulse propagation in birefringent optical fibers,” IEEE J. Quant. Electron. 23, 174–176 (1987). 5. P. K. A. Wai and C. Menyuk, “Polarization mode dispersion, decorrelation, and diffusion in optical fibers with randomly varying birefringence,” J. Light. Tech. 14, 148–157 (1996). 6. J. P. Gordon and H. Kogelnik, “PMD fundamentals: polarization mode dispersion in optical fibers,” PNAS 97, 4541–4550 (2000). 7. J. N. Kutz, “Mode-locked soliton lasers,” SIAM Review 48, 629–678 (2006). 8. H. A. Haus, “Mode-locking of lasers,” IEEE J. Sel. Top. Quant. Elec. 6, 1173–1185 (2000). 9. K. Tamura, E.P. Ippen, H.A. Haus, and L.E. Nelson, “77-fs Pulse generation from a stretched-pulse mode-locked all-fiber ring laser,” Opt. Lett. 18, 1080–1082 (1993). #203188 $15.00 USD Received 18 Dec 2013; revised 20 Mar 2014; accepted 21 Mar 2014; published 3 Apr 2014 (C) 2014 OSA 7 April 2014 | Vol. 22, No. 7 | DOI:10.1364/OE.22.008585 | OPTICS EXPRESS 8585 10. K. Tamura and M. Nakazawa, “Optimizing power extraction in stretched pulse fiber ring lasers,” App. Phys. Lett. 67, 3691–3693 (1995). 11. G. Lenz, K. Tamura, H. A. Haus, and E. P. Ippen, “All-solid-state femtosecond source at 1.55 μm,” Opt. Lett. 20, 1289–1291 (1995). 12. A. Chong, W. H. Renninger, and F. W. Wise, “Properties of normal-dispersion femtosecond fiber lasers,” J. Opt. Soc. Am. B 25, 140–148 (2008). 13. A. Chong, J. Buckley, W. Renninger, and F. Wise, “All-normal-dispersion femtosecond fiber laser,” Opt. Express 14, 10095 (2006). 14. W. Renninger, A. Chong, and F. W. Wise, “Dissipative solitons in normal-dispersion fiber lasers,” Phys. Rev. A 77, 023814 (2008). 15. F. Ö. Ilday, J. Buckley, and F. W. Wise, “Self-similar evolution of parabolic pulses in a laser cavity,” Phys. Rev. Lett. 92, 213902 (2004). 16. W. H. Renninger, A. Chong, and F. W. Wise, “Self-similar pulse evolution in an all-normal-dispersion laser,” Phys. Rev. A 82, 021805 (2010). 17. B. Bale and S. Wabnitz, “Strong spectral filtering for a mode-locked similariton fiber laser,” Opt. Lett. 35, 2466– 2468 (2010). 18. F. Li, P. K. A. Wai, and J. N. Kutz, “Geometrical description of the onset of multi-pulsing in mode-locked laser cavities,” J. Opt. Soc. Am. B 27, 2068–2077 (2010). 19. F. Li, E. Ding, J. N. Kutz, and P. K. A. Wai, “Dual transmission filters for enhanced energy in mode-locked fiber lasers,” Opt. Express 19, 23408–23419 (2011). 20. X. Fu and J. N. Kutz, “High-energy mode-locked fiber lasers using multiple transmission filters and a genetic algorithm,” Opt. Express 21, 6526–6537 (2013). 21. S. L. Brunton, X. Fu, and J. N. Kutz, “Extremum-seeking control of a mode-locked laser,” IEEE J. Quant. Electron. 49, 852–861 (2013). 22. X. Shen, W. Li, M. Yan, and H. Zeng, “Electronic control of nonlinear-polarization-rotation mode locking in Yb-doped fiber lasers,” Opt. Lett. 37, 3426–3428 (2012). 23. D. Radnatarov, S. Khripunov, S. Kobtsev, A. Ivanenko, and S. Kukarin, “Automatic electronic-controlled mode locking self-start in fibre lasers with non-linear polarisation evolution,” Opt. Express 21, 20626–20631 (2013). 24. S. Wiggins, Introduction to Applied Nonlinear Dynamical Systems and Chaos, Second Edition, (Springer 2003). 25. J. N. Kutz, Data-Driven Modeling and Scientific Computation (Oxford 2013). 26. J. Wright, A. Yang, A. Ganesh, S. Sastry, and Y. Ma, “Robust face recognition via sparse representation,” IEEE Trans. Pattern Ana. Mach. Int. 31, 210–227 (2009). 27. D. Needell and J. A. Tropp, “CoSaMP: iterative signal recovery from incomplete and inaccurate samples,” Comm. of the ACM 53, 93–100 (2010).


Introduction
Mode-locked fiber lasers have continued to make tremendous strides in engineering performance, both in terms of output energy and peak powers, yielding approximately a two orders of magnitude power increase in the last decade [1].Despite such exceptional experimental achievements, first-principals modeling of fiber lasers has remained, for over two decades now, qualitative in nature.The underlying and primary reason which has prevented quantitative modeling efforts is the fiber birefringence [2][3][4][5] (See also the recent review article by Gordon and Kogelnik [6]).It is well understood from these studies, primarily aimed at fiber optic communications, that the fiber birefringence is stochastic in nature, varying randomly along the length of the fiber laser cavity and highly susceptible (and sensitive) to environmental factors such as bend, twist, anisotropic stress, and ambient conditions such as temperature.With modern data-analysis methods, we propose to optimize mode-locking performance by learning a proxy measure and classification for the fiber birefringence, thus allowing for a self-tuning laser design capable of adapting rapidly to changes in birefringence.
Just as in optical communications, a fiber laser cavity propagates pulses over ultra-long distances in fractions of a second.Signal distortions due to the chromatic dispersion and nonlinearity accumulate after many round trips of the laser cavity, as does the signal distortion due to the fiber birefringence [2][3][4][5][6].Successful pulsed laser operation is achieved when the linear and nonlinear cavity effects balance each other resulting in stable mode-locked pulses [7,8].Although single-mode fibers are typically used for such laser cavities, the so-called single-mode The SA is generated by nonlinear polarization rotation interacting with three waveplates (α j where j = 1, 2, 3) and a polarizer (α p ). Incoming polarized light (P − ) is attenuated by the polarizer if it is not in alignment with the transmitting axis.Thus only a single polarization direction (P + ) is transmitted.(C) The fiber itself is subject to stochastic fluctuations in the birefringence, i.e. random rotations of the principal fast-and slow-axes, u and v respectively.Shown is an example portion of fiber where the rotations depend sensitively on bend, twist, anisotropic stress, and/or ambient temperature.
fibers in fact support two modes simultaneously, which are orthogonally polarized.In an idealized circular-core fiber, these two modes will propagate with the same phase velocity.However, practical fibers are not perfectly circularly symmetric.As a result, the two modes propagate with slightly different phase and group velocities due to small differences in the effective index of refraction experienced by each.While this birefringence is small in absolute terms in standard optical fibers, approximately 10 −7 index of refraction difference in the two modes, the corresponding beat length L B is about 10 meters with variations occurring on lengths of 100 meters, which is often on the same order as the dispersive and/or nonlinear length scales.As a result, the birefringence can have a significant impact on mode-locking dynamics.
To illustrate the cavity sensitivity to birefringence, consider one of the most commercially successful mode-locked lasers to date (See Fig. 1): the well-known mode-locked fiber laser that relies on nonlinear polarization rotation (NPR) for achieving saturable absorption using a combination of waveplates and polarizer [8][9][10][11].This NPR based laser concept is more than two decades old and is so successful in part due to its reliance on simple off-the-shelf telecom components, rendering it a highly cost-effective mode-locking source.More recently, tremendous performance advances in this NPR laser have been made in power delivery by using all-normal dispersion fiber cavities [12][13][14] and/or self-similar pulse evolutions [15][16][17].It has also been recently conjectured that multi-NPR sections can be used in the cavity to overcome the multi-pulsing instability and achieve additional performance gains [18][19][20].However, such commercial lasers must enforce strict environmental control to maintain performance, i.e., the fiber birefringence is controlled by pinning into place and shielding it from temperature fluctuations.Such system sensitivity has prevented it from major performance advances, limiting power and pulsewidths.Moreover, failure to accurately model the stochastic and sensitive birefringence fluctuations in the cavity have deprived the community for more than two decades of a quantitatively accurate model of this highly successful laser system.
Our objective in this manuscript is to make use of modern data-analysis methods, i.e. machine learning techniques, to help discover a proxy measure for the effective cavity birefringence.Unlike optical communication lines where over long distances a statistical average might be experienced by a pulse, here a single realization of a stochastic variation of the birefringence is what drives the laser cavity dynamics (See Fig. 1(c)).If the cavity is perturbed by bend, twist, anisotropic stress, and/or ambient temperature, then a new realization results.For optimizing performance, it is critical to characterize, or recognize, the fiber birefringence correctly in order to determine the waveplate and polarizer settings, for instance, required to give the best energy performance.
Using pattern learning methods, we demonstrate that spectrogram measurements, which are dimensionally reduced using a singular value decomposition, uniquely characterize the average cavity birefringence.This gives rise to a sparse representation and classification scheme for identifying the dynamic regime of the cavity.Our algorithm allows for efficient self-tuning of the laser cavity when combined with an adaptive controller [21] with servo-driven components [22,23].Thus instead of attempting to model the stochastic birefringence fluctuations directly, which can only practically be done in a statistical way, we instead measure and learn the impact of birefringence on mode-locking performance and provide a method by which optimal, self-tuning can be achieved.Although we demonstrate the method on a computational model, the algorithm would ideally apply directly to the laser cavity as there is no need for an underlying model.
The paper is outlined as follows: Sec. 2 outlines the theoretical (computational) model used for the laser cavity along with the adaptive controller and objective function for optimizing the cavity performance.Section 3 develops a toroidal search algorithm which allows for an extensive and rapid search of the best candidate mode-locked states in the system.The construction of spectrograms for various average birefringence values are also shown.Section 4 develops the primary contribution of the paper: an algorithm that is capable of recognizing the average birefringence state of the system.Key to an accurate recognition is the application of a sparse classifier, which is a novel method for identifying dynamical regimes.Section 5 gives the results of the classification methodology and shows the success of the algorithm.An overview of the method and future outlook of its applicability are given in the concluding Sec. 6.

Fiber laser model and objective function
In previous work [21], an extremum seeking controller (ESC) was designed to achieve and maintain a high-energy, single-pulse state in a mode-locked fiber laser.Given initial parameter values, the ESC enables us to obtain the local maximum of our objective function by varying the fiber laser control parameters, i.e. waveplates and polarizers for a cavity based upon nonlinear polarization rotation.However, the performance of the laser is still limited since the controller itself is only capable of tracking the local maximum of the objective function instead of the desired global maximum.As a result, we propose a data-driven technique which allows us to build a library of time series of the objective function that globally samples the entire parameter space for different birefringence values.Once a sufficiently large library is obtained, the state of fiber laser system can be then characterized by matching the current system behavior with library entries, hence the global optimal performance can be identified, and then subsequently maintained by ESC.In order to perform such a task, an example model laser system is introduced.

Laser Cavity Model
In order to demonstrate that the machine learning algorithm provides us with the accurate birefringence characterization, full simulations of a laser cavity are performed.In practice, the al-gorithm advocated here would sample from the experimental laser dynamics and no theoretical model would be required.
To describe the propagation dynamics in the laser fiber, including the interaction of chromatic dispersion, self-phase modulation, birefringence, cavity attenuation/loss, and bandwidth limited gain and saturation, we use the coupled nonlinear Schrödinger equations (CNLS) [3,4]: where u and v represent two orthogonally polarized electric field envelopes (the fast-and slowaxis respectively) in the fiber cavity of an optical fiber with birefringence K.The variable z denotes the propagation distance which is normalized by the length of the first fiber section and t is the retarded time normalized by the full-width at half-maximum of the pulse.The parameter D is the averaged group velocity dispersion of the fiber section.It is positive for anomalous dispersion and negative for normal dispersion.The nonlinear coupling parameters A (cross-phase modulation) and B (four-wave mixing) are determined by the material of the optical fiber.For axially symmetric fibers A = 2/3 and B = 1/3.The right hand side of the equations, which are dissipative terms, account for the bandwidth limited gain saturation and attenuation, where the operator R of the dissipative terms is defined as follows: Here g 0 and e 0 are the nondimensional pumping strength and the saturating energy of the gain.Parameter τ characterizes the bandwidth of the pump, and Γ measures the losses (taken to be distributed) caused by the output coupling and the fiber attenuation.
The waveplates and polarizer are modeled by discrete components in the laser cavity corresponding to Jones matrices.The standard Jones matrices of the quarter-waveplate, halfwaveplate and polarizer are given, respectively, by: The Jones matrices are valid only when the principle axes of the device is aligned with the fast axis of the fiber.However, this is not generically the case.For an arbitrary orientation given by α k (k = 1, 2, 3, p), the Jones matrices are modified so that where W is one of the given Jones matrices and R is the rotation (alignment) matrix: This provides a full characterization of the waveplates and polarizers along with their alignment back to the principal axes of the fiber itself.The CNLS model together with the Jones matrices provides a full description of pulse propagation and mode-locking dynamics in the laser system.The full simulation of the laser evolves the CNLS equations, using a spectral (Fourier transform) decomposition in the time domain and an adaptive Runge-Kutta method for propagating along the fiber, and a periodic (after every round trip) implementation of the Jones matrices of waveplates and polarizers.The discrete application of Jones matrices after each cavity round trip produces an effective saturable absorption that can be used to control and tune the mode-locking dynamics.

Objective Function
For any sampling and machine learning method to work, one need to decide how to characterize the state of the laser system effectively.In previous work [21], an objective function O was introduced which was obtained by dividing the pulse energy E by the spectral kurtosis M 4 (fourth-moment) of the wave form: This objective function, which has been shown to be successful for applying adaptive control, is large (optimal) when we have a large amount of energy in a tightly confined temporal wave packet [21].The spectral kurtosis M 4 measures the spread of the waveform.
The objective function enables us to discriminate multi-pulse and chaotic wave forms from the desired single-pulse wave form while providing us with a quantity that favors tight, highenergy, single-pulse wave forms.Figure 2(h) shows the normalized objective function (red), pulse energy (black) and kurtosis of the spectrum (blue) when rotating on the 2-torus of waveplate α 3 and polarizer α p .The objective function selected is ideal for optimizing pulse energy while simultaneously keeping the mode-locking away from instability boundaries (gray regions) [21].Figure 2(g) shows the wave forms that correspond to the settings marked by the circle, square, diamond, and triangle in Fig. 2(h).The maximal energy occurs away from the regions of single-pulse mode locking (white region), thus tracking energy alone as the objective function would lead to chaotic solutions (grey regions).In contrast, the objective function has local maxima in the single-pulse, mode-locked region.The spectral kurtosis (blue) is small in the single-pulse mode-locking region and is much larger in the grey regions because of multipulsing or chaotic wave forms.As a result, dividing energy by the spectral kurtosis penalizes non-mode-locked and multi-pulsing mode-locked states.In the remainder of this paper, we will use this objective function to characterize the state of the fiber laser.It should be noted, however, that any objective function could be picked so that the shortest pulse, broadest spectrum or some other quantity of interest can be selected as a quantity of interest.

Toroidal search and library building
In this section, a search algorithm will be developed for characterizing the optimal modelocking performance as a function of birefringence.In practice, this algorithm could take a few to tens of minutes to execute given the fact that mode-locking itself occurs in microseconds.Thus the only limitation to how fast the algorithm can be executed is the speed of the servo-driven controllers [22,23].

Toroidal Search
In the experimental setting, the NPR unit consists of the polarizer and three waveplates that can be rotated from 0 to 2π, thereby creating a parameter space that is a 4-torus.Multiple NPR sections can be included, let's say N of them, to further enhance performance [18][19][20].In order to sample the resulting parameter space (4N-torus), a toroidal search algorithm is developed.If we want to sample this 4N-dimensional torus, then 4N time series are constructed from: for j ∈ [1, . . ., 4N], where θ j0 are initial parameter values, ω i are angular frequencies which are incommensurate, i.e. equation mω j + nω k = 0 (8) doesn't have integer solution.In other words, ω j /ω k is irrational for any j, k ∈ [1, . . ., 4N], given j = k.It is easy to prove that under such conditions, [θ 1 (t) . . .θ 4N (t)] is dense on the torus [24].Thus using this method, it is guaranteed that one can sample any torus sufficiently well if sampling for a long enough time or using a high enough sample rate.In the following sections of this paper, we take a 2-torus for a single NPR laser as a simple example case.However, the methods mentioned in this paper can be applied to toroidal parameter spaces of any dimensionality.Figure 2 shows how the toroidal sampling works on a 2-torus comprised of parameters α 3 and α p .Specifically, the resulting time series of the objective function O is demonstrated as the 2-torus is sampled.In Fig. 2(a), the torus in under-sampled and aliasing of the objective function occurs.However, as the sampling rate is increased, as shown in Fig. 2(e), the objective function is fully constructed and an evaluation of best performance can be ascertained.Indeed, the red dot in Fig. 2(f) shows the optimal global maxima of the laser cavity.The narrow shaded region around this peak performance is highlighted in Fig. 2(h) where an additional evaluation is made of whether the solution is mode-locked or not.

The Gábor Transform (spectrogram) and Library Building
For a given birefringence value, toroidal sampling is used to produce a time series of the objective function.Note that we use the entire time series to compute spectrograms in our library building process.Once the library is constructed, optimal parameter settings are kept for future use.In order to develop a robust algorithm that matches the current objective function time series with the library entries, we want to utilize both the temporal and spectral (frequency) signatures of the time series.As a result, we introduce the Gábor transform and construct a spectrogram [25] of the optimal solution.It is observed that the time series collected from toroidal sampling are comprised of various frequency components that are exhibited at different times.Although the Fourier transform of the signal contains all frequency information, there is no indication of when each frequency occurs in time.Indeed, by definition, the Fourier transform eliminates all time-domain information since we integrate over all time.To circumvent the limitation of the direct application of Fourier transform, Gábor proposed a formal method for keeping information in both time and frequency.His method involved a simple modification of the Fourier transform kernel: where the filter g(τ −t) was introduced with the aim of localizing both time and frequency.The Gábor transform, also known as the short-time Fourier transform is then defined as: where the bar denotes the complex conjugate of the function.Thus the function g(τ − t) acts as a time filter for localizing the signal and its frequency content over a specific window of time, allowing for the construction of a spectrogram.A spectrogram represents a time series (signal) in both the time and spectral domain, as shown in Fig. 3.
Our key observation is that these spectrograms are unique for varying cavity birefringence.Thus the spectrogram serves as a proxy measure for classifying the underlying cavity birefringence.Unique spectrograms for various birefringence values in the library are shown in Fig 4.
By definition the spectrograms are symmetric in frequency, for storage and computation efficiency concerns, we only use the positive frequency part of the spectrograms for classification purposes.These spectrograms serve as the basis of a pattern recognition/classification scheme for determining the value of cavity birefringence.

Birefringence classification and recognition
In the previous section, we built a spectrogram library using a Gábor transform with Gaussian window.To match a current time series with library entries, the Gábor transform is also applied to the time series sampled from the current system to get the spectrogram.A sparse sampling technique is then applied to recognize the current birefringence from possible library elements.
To start, assume we have computed the spectrogram S k for a large number of possible birefringence values where k ranges from 1 to M, and for each k, a singular value decomposition  (SVD) is applied to the spectrogram [25]: and the highest energy and store them in the modes library U L such that where the k-th sub-library Ũk contains the first m modes of U k : Once we have constructed our dimensionally reduced modes library, we can take a measurement of the laser system (the objective function) and compute the spectrogram.Note that the sampling time does not have to be of the same length as the time series collected when the library was built.We perform an SVD reduction on the measured spectrogram and keep the first m modes as before, as illustrated in Fig. 5.With the most important (dominant) modes from the measurement in hand, we can do an L 1 -norm library search, thus promoting sparsity in our solution [25].In the L 1 -norm search, our objective is to find a vector a = arg min a a 1 (15) subject to Here we require the number of library modes to be greater than the dimensionality of the frequency domain.Given this condition, this becomes an underdetermined linear system of equations.The L 1 -norm minimization produces a sparse vector a, i.e.only a small portion of the elements are non-zero, as shown in Fig. 6.The non-zero elements of vector a act as a classifier (indicator function) for identifying which sub-library the birefringence falls into.Thus if the largest element falls into the i-th sub-library, the recognized birefringence value is equal to K i .This sparsity promoting optimization, when used in conjunction with the unique spectrograms, gives a rapid and accurate classification scheme for the fiber birefringence.Thus birefringence recognition can be easily accomplished.Note that our classification scheme essentially uses the L 1 -norm minimization produce as an indicator function for the correct library elements.More sophisticated sparse classification/recognition strategies can be applied if desired [26], potentially yielding even better recognition results.

Classification results
The sparse search algorithm is tested using the pre-computed spectrograms with Gaussian random noise added.In our test, the birefringence K is varied following a gaussian random walk.For each trial, the spectrogram corresponding to the current birefringence is computed and the L 1 -norm sparse search is executed.Recognition results and errors are showed in Fig 7 .In the figure, the recognition algorithm is tested in two scenarios: (i) well-aligned data given the assumption that the servo motors that control the waveplates and polarizers work without error, and (ii) the mis-aligned data that considers the error in the initial angle of the servo motors.In both of these two scenarios, the sparse search works very well.In the well-aligned case, a birefringence recognition (classification) rate of 98% is achieved while in the mis-aligned case, we get a 88% recognition rate.It should also be noted that even when our recognition algorithm fails to find the correct birefringence value, the error between the true birefringence and the recognized value is very small.Thus, even if we use the mis-classified birefringence, is is likely that the predicted optimal parameters will be near the true optimal parameters and the adaptive controller [21] will bring the laser system back to peak performance.

Conclusions and outlook
The stochastic nature of fiber birefringence has been the major impediment in allowing for quantitatively accurate modeling of fiber lasers for optimizing their performance.Indeed, all other physical parameters in the system, such as the Kerr nonlinearity, dispersion characteristics as a function of wavelength, gain and gain bandwidth, can be fairly well characterized in theoretical models.Thus only the birefringence remains unknown and randomly varying.And unlike optical communications, where statistical averaging methods can be used to quantify its effects statistically, a fixed laser cavity represents a single, and unknown, statistical realization of the birefringence which is highly susceptible and sensitive to environmental factors such as bend, twist, anisotropic stress, and ambient conditions such as temperature.Such a system requires new modeling methods which are based upon state-of-the-art data-driven strategies.
We have demonstrated that a toroidal search method forms the basis of a machine learning algorithm for characterizing the performance of a mode-locked laser cavity as a function of birefringence.By constructing a library of objective function spectrograms and their peak performance, a unique signature is given for various cavity birefringence values.Indeed, each unique spectrogram can be reduced using a singular value decomposition and stored in a li-  7. Left: Recognition results and errors using well-aligned data.A 98% correct birefringence classification is achieved.Right: recognition results and errors using mis-aligned (shifted) data.In this case, an 88% correct birefringence classification is achieved.Note that the blue dots represent the true birefringence labels while the red circles are the classified birefringence.Even if misclassified, the algorithm produces a birefringence that is only slightly off, thus still allowing for a rapid tuning of the laser cavity to the optimal waveplate and polarizer settings.Colored boxes have corresponding pseudo code provided in Table 1.
brary for future reference and classification.To evaluate the current cavities birefringence, a time-series sample of the objective function is taken, converted to a spectrogram, reduced using a singular value decomposition, and classified using a sparsity promoting L 1 -norm optimization routine.Accuracies as high as 98% are achieved, thus suggesting the algorithm is highly promising for application purposes.And even when birefringence is misclassified, the results are only off by a small percentage, thus suggesting that cavity tuning can still be effective and efficient.Although the algorithm was demonstrated on an underlying theoretical model, the method can be integrated directly into an experimental laser cavity design, i.e. the advocated method does not rely on an underlying model of the laser dynamics.
Philosophically, the approach taken here does not attempt to construct a better model of  .( † represents built-in MATLAB functions svd and spectrogram.The L-1 norm library search can be implemented using the cvx package with details provide in Section 4, or with the compressive sampling matching pursuit (CoSaMP) [27].)birefringence and its stochastic fluctuations.Rather, the cavity birefringence simply is what it is, and the goal is to use state-of-the-art data methods for classifying the birefringence into a previously learned library, i.e. the library and classifier become the expert-in-the-loop.Once classified, the optimal waveplate and polarizer settings are then already known from the toroidal search algorithm.This ultimately leads to an efficient, self-tuning laser since the waveplates and polarizers can be adjusted directly to their optimal positions using servo-control motors [22,23].Specifics of the physical implementation are given in Fig. 8 with the training and execution algorithms given by the pseudo-codes in Table 1.The flow charts and algorithm architecture, which are color coded with each other, illustrate the practical implementation of the method.
More broadly, such difficulties in quantitative modeling are a hallmark feature of complex systems which display some underlying stochastic dynamics.For instance, the modeling of climate and weather is extremely difficult due to underlying stochastic, micro-scale physics.In such complex systems, data-driven modeling techniques are critical for improving quantitative predictions.In weather forecasting, for instance, data-assimilation methods have been critical in achieving better performance (accuracy) and longer forecast windows [25].Thus instead of attempting to construct more refined, and typically over-parametrized models for the stochastic effects, the goal is to simply make use of recognized, coherent patterns of activity and direct measurements to inform decisions about the state of the system.The demonstration here shows that such a method is highly effective for modeling fiber lasers.

Fig. 1 .
Fig. 1. (A) Schematic of a mode-locked laser cavity which includes a ring fiber with saturable absorber (SA) and gain element.(B)The SA is generated by nonlinear polarization rotation interacting with three waveplates (α j where j = 1, 2, 3) and a polarizer (α p ). Incoming polarized light (P − ) is attenuated by the polarizer if it is not in alignment with the transmitting axis.Thus only a single polarization direction (P + ) is transmitted.(C) The fiber itself is subject to stochastic fluctuations in the birefringence, i.e. random rotations of the principal fast-and slow-axes, u and v respectively.Shown is an example portion of fiber where the rotations depend sensitively on bend, twist, anisotropic stress, and/or ambient temperature.

#Fig. 2 .
Fig. 2. (a, c, e) 2-torus of α 3 and α p with sample points shown (dots) for different sample rates (1.25Hz-black, 5Hz-magenta, 20Hz-blue, the global optimum is marked in red).(b, d, f) The time-series of the corresponding objective function with the global optimum again marked in red.(g) Wave forms of the laser output corresponding to different parameter values marked in (h).(h) Zoomed in objective function (red) plot near the global optimum, pulse energy (black) and kurtosis (blue) are also shown (all normalized to the same scale for comparison).

Fig. 3 .
Fig. 3. Top: objecive function time series sampled at K = 0.17143 (black solid), a Gaussian Gábor window centered at τ = 20 is also shown (red solid).Bottom: corresponding spectrogram obtained using Gábor transform with the Gaussian window shown in top panel.

Fig. 4 .
Fig. 4. Spectrograms for different birefringence values, various (and unique) temporal dynamics can be observed from the comparison.

)Fig. 5 .
Fig. 5. Top left: Time series of objective function obtained by toroidal search, sampled at 20Hz.Top right: Spectrogram of the time series.Bottom left: Singular values from SVD, the largest 15 singular values (corresponding to SVD modes used in the library) are plotted in red and the rest are plotted in blue.Bottom right: SVD modes correspond to the largest 15 singular values.

#Fig. 6 .
Fig.6.Top: Barplot of the components of vector a from L 1 optimization where sparsity can be observed, i.e. it is mostly comprised of zeros.The indicator function nature of the sparse representation is clearly observed.Bottom: Barplot of components of vector a from L 2 -norm optimization, showing it does not produce any classification.

#
Fig.7.Left: Recognition results and errors using well-aligned data.A 98% correct birefringence classification is achieved.Right: recognition results and errors using mis-aligned (shifted) data.In this case, an 88% correct birefringence classification is achieved.Note that the blue dots represent the true birefringence labels while the red circles are the classified birefringence.Even if misclassified, the algorithm produces a birefringence that is only slightly off, thus still allowing for a rapid tuning of the laser cavity to the optimal waveplate and polarizer settings.

Fig. 8 .
Fig. 8. (a) Setup of the proposed mode-locked fiber laser wrapped with servos and machine learning module.(b) Flowchart of training algorithm.(c) Flowchart of execution algorithm.Colored boxes have corresponding pseudo code provided in Table1.