## Abstract

A detailed systematic investigation of the accuracy of digital modal decomposition process that uses stochastic parallel gradient descent (SPGD) algorithm is presented in this paper. Composite beams of known weights and phases corresponding to the eigenmodes of a three-mode fiber are generated theoretically and through experiments using a spatial light modulator (SLM). The weights and phases of the constituent scalar modes are extracted from the intensity profile of the composite beam using the SPGD method, for both theoretical and experimental conditions. Detailed analysis of the sources of error in such SPGD based digital modal decomposition method is carried out by generating composite beams of various modal ratios and phase combinations theoretically. Impact of the experimental errors such as effect of background noise, nonlinearity, misalignment of the camera and that due to the cumulative propagation phase, on the extracted weights and relative phase values are quantified. We find that any ambiguity at phase angles closer to 90 deg among the constituent modes especially when the modal weights are non-uniform, cannot be corrected easily and hence is a fundamental limitation of the intensity-based modal decomposition technique. The methodology used in this manuscript to identify the systemic errors in modal decomposition can be potentially extended to any digital decomposition technique.

© 2021 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

Modal decomposition serves as an excellent tool for determining the transverse modal dynamics of multi-mode fibers (MMFs) or few-mode fibers (FMFs). This technique finds applications in a variety of scenarios in mode-division multiplexed optical communication systems as well as in fiber lasers [1]. They have been used for the estimation of mode resolved bending loss [2], determination of angular orbital momentum composition of light [2,3], adaptive mode control [4–6], measurement of fiber-to-fiber coupling losses [1,5], evaluation of specialty fiber designs [1], wave-front reconstruction [6], beam quality evaluation [2,3,6], determination of mode resolved gain/loss [1,2,5–6], laser beam cleanup [7] and for the diagnosis of mode instabilities [2,5,6,8] in high power fiber lasers.

Several modal decomposition techniques have been proposed over the past few years, and they can be in general categorized into two classes - all-optical techniques [6] and digital techniques. Nicholson et al. [9] demonstrated a spatially and spectrally (*S ^{2}*) resolved imaging methodology to reveal modal content of an MMF. A three-mirror ring resonator was used by Andermahr et al. [10] to determine the power fraction of each constituent mode. Ma et al. [11] have demonstrated a simultaneous decomposition of few-mode fiber output using the time-domain low-coherence interferometry method. Another popular alternative is the use of computer-generated holographic (CGH) filters to decompose a weakly guided fiber output [12]. Similar methodologies and their variants are demonstrated using SLM and optical cross-correlation [13–16]. Yan et al. [17] have developed a modal weight measurement methodology by using fiber Bragg gratings (FBGs). Most of these all-optical strategies are reasonably accurate, but complex, require extensive experimental effort, and some of them may not be fast enough to capture time-dynamic decomposition.

Digital modal decomposition is an excellent alternative to the all-optical techniques as it is relatively more straightforward and potentially fast, typically limited only by the acquisition speed of the camera used. Such a decomposition approach involves iterative numerical methods [6], where the intensity pattern of the composite beam is captured using a CCD/CMOS camera and the decomposition is carried out in a post-processing stage [2], thus requiring only relatively modest experimental efforts. The iterative modal decomposition methods are usually structured around minimizing the difference between measured intensity distribution and reconstructed intensity distribution generated using an iterative algorithm by optimizing modal weights and relative phase angles in small steps. Stochastic parallel gradient descent (SPGD) algorithm [1,4,8, 18–22] is one such popular scheme used to extract the weights and phases. Several variants of digital modal decomposition have also been demonstrated in the past – including the Gerchberg & Saxton algorithm [21], a hybrid genetic algorithm based stochastic parallel gradient descent (GA-SPGD) [6] and a convolutional neural network (CNN) with simulated patterns [5]. Most of hybrid methods [23] require extensive training period or training data sets to be fed for a particular application for which they are to be used, which may be different from the real-life scenario and in general computationally complex.

A fundamental drawback of the above digital decomposition approaches is that their accuracy is limited by measurement errors in the camera. In this work, we carry out theoretical and experimental investigation on the source of such errors, and quantify their impact on the digital decomposition. We chose the SPGD-based modal decomposition methods in our study as it is relatively easier to implement, and typically faster compared to the above-mentioned algorithms [1]. In order to minimise the experimental complexity, we do not employ any additional optics to map the near field output, but consider propagation effects in the digital domain.

Even though there are several reports on the implementation of iterative modal decomposition methods over the years, a systematic study that compares the accuracy of the algorithm with respect to the expected modal weights and phases that are experimentally realised in a controlled manner is yet to be reported. Most of the previous studies related to iterative modal decomposition methods demonstrate the effectiveness of the strategy for some generic test cases generated either theoretically or experimentally for some specific mode ratios and relative phases. In this paper, we address this gap in literature by generating composite intensity profiles corresponding to different possible known weights and relative phase values of the three eigenmodes of a few-mode fiber theoretically in a systematic manner, and then use the SPGD algorithm to extract the same. We quantify the error involved in the process for different amplitude weights and relative phase values, and thus evaluate the robustness of the algorithm. We repeat the systematic generation process of composite beams through controlled experiments, where we generate the desired proportions through a spatial light modulator, capture the resultant intensity profile using a CMOS camera and use the SPGD algorithm to extract the modal weights and relative phase values. Additionally, we also show that in the absence of a near-field imaging system, an extra phase is added to composite beam structure while it travels from spatial light modulator (SLM) towards CMOS camera, which needs to be taken into account before the decomposition step. In order to account for this, we calculate the “propagated” basis corresponding to the distance between SLM and CMOS camera. Advantages of using the “propagated” basis set for decomposition purpose as compared to “unpropagated” basis set are highlighted. The studies are useful to quantify the limitation in the accuracy of such a digital decomposition technique.

The rest of the article is organized as follows: In Section 2, we discuss the conceptual and mathematical background of modal decomposition methodology based on SPGD algorithm. Section 3 describes the details of the controlled experiment deployed in order to generate composite beams of known proportions. In Section 4, modal decomposition results of theoretically and experimentally generated composite beams using SPGD method are presented, followed by conclusions in Section 5.

## 2. Modal decomposition methodology

Consider a composite beam constituted by a linear combination of the three eigenmodes (represented as ${\psi _k}({r,\theta } )$ where *k = 1,2,3*) corresponding to those supported by a three-mode graded index fiber [24]. Let us assume that all the eigenmodes ${\psi _k}({r,\theta } )$ have the same spectrum [25]. Assuming that the laser linewidth is narrow enough to maintain coherence after fiber propagation, the measured output electric field (${E_{me}}({r,\theta } )$) and the corresponding intensity of the fiber output beam profile (${I_{me}}({r,\theta } )$) at any given instant of time are given as

*k*eigenmode and $\rho _k^{me}$ is the modal weight of

^{th}*k*eigenmode. Considering the phase of the fundamental mode as reference ($\phi _1^{me}$ = 0°), the phase of higher order modes ($\phi _2^{me}$ and $\phi _3^{me}$) can be expressed with reference to that of the fundamental mode. The problem at hand is to extract the values of $\rho _k^{me}$(

^{th}*k = 1,2,3*) and $\phi _k^{me}$(

*k = 2,3*) assuming the intensity profile of the composite beam and the exact transverse field profiles of the constituent eigenmodes are available.

The SPGD method is initiated with guess values of reconstruction parameters: modal weight (${\rho _k}$) and phase (${\phi _k}$) of the *k ^{th}* reconstructed field. $\rho _k^2$ represents the fraction of the modal intensity of

*k*mode, with the additional condition of normalization ensuring $\sum\limits_{k = 1}^3 {\rho _k^2} = 1$ [22, 24,26,27]. The reconstructed electric field

^{th}*(*${E_{re}}({r,\theta } )$

*)*and intensity (${I_{re}}({r,\theta } )$) of the composite pattern at

*n*iteration step is represented as [22,24,26,27]

^{th}*l = 1 to 3*and $\delta {u_m}$,

*m = 1 to 2*, respectively. The random perturbations, $\delta {u_l}$ and $\delta {u_m}$ are drawn from an independent set of random variables with zero mean and unit variance. These are applied one by one in positive direction with corresponding cross correlations as $J_l^ +$ and $J_m^ +$, then in negative direction with $J_l^ -$ and $J_m^ -$ as the cross correlations. The corresponding gradients ($\delta {J_l}$ and $\delta {J_m}$) are computed as [22,24,26,27] with the cross-correlation function

*J*, evaluated as [22,24,26,27]

*M×N*is the size of ${I_{re}}\;$ and ${I_{me}}$ matrices. The modal amplitudes and weights are updated as per the following equations, until the convergence condition for the objective function is satisfied [22,24,26,27]. where

*n*represents the iteration number, ${\gamma _r}$ and ${\gamma _p}$ are gains for modal amplitude and phase update equations, respectively. ${\gamma _r}$ and ${\gamma _p}$ are optimized separately after observing reconstruction accuracy in several test cases while implementing the SPGD based digital modal decomposition algorithm. The complete process is repeated until the desired convergence is achieved.

## 3. Experimental setup

A schematic of the experimental setup deployed to generate composite beams with known proportions is shown in Fig. 1. Spatial light modulator (SLM) based on liquid crystal on Si (LCoS) is used to generate composite beams with known proportions considering three basis modes i.e. ${\psi _k}({r,\theta } )$, *k = 1, 2, 3* (LP_{01}, LP_{11a} & LP_{11b}), respectively that is supported by a commercial graded-index FMF [24]. Note that, the results presented here are not specific to the choice of the basis modes of an FMF, but can be extended to any transverse mode profiles. As shown in Fig. 1, light from a narrow linewidth distributed feedback laser (DFB) operating at a center wavelength of 1064 nm is passed through a polarizer (P) and a half-wave plate (HWP), whose axis is rotated such that the polarization of the input matches the preferred axis of the SLM. A lens (*L _{1}*) is used at the output of the HWP to collimate the light falling on the SLM. Specific combinations of the modes corresponding to the three modes supported by a graded-index FMF with specific modal weights and relative phase angles are loaded on the SLM device using appropriate phase modulation functions [28].

A CMOS based camera (Thorlabs DCC1545M) with 1280×1024-pixel matrix, 68.2 dB dynamic range is used to capture the first order diffracted pattern which contains the composite intensity structure. Note that no lensing system is used to transform the output of SLM to the camera. The captured composite beams of known proportions are calibrated offline (described in detail in Sec. 4.2) during the post-processing stage. As shown in Fig. 1, there is ∼37 cm distance between SLM and CMOS camera. So, when composite beam patterns traverse distance between SLM and CMOS camera, it acquires phase due to propagation. This addition of phase during propagation between SLM and CMOS camera can potentially result in an error in estimation of actual relative phase of the composite pattern. So, in order to evaluate the effect of propagation on generated beam intensity and phase profile, we have used Huygens-Fresnel diffraction integral to simulate the propagation effects [29,30]. The modified beam profile ($U(x,y)$) after propagating through a distance of *z* is given as,

*U(x*is input beam pattern loaded on SLM, $\lambda $ is the wavelength of the light source,

_{0},y_{0})*z*is the distance between SLM and CMOS camera,

*k*is the wave number. We have numerically calculated the propagated set of basis modes to be used in decomposition process using Eq. (15), to include the effect of propagation phase on the composite beam.

## 4. Results and discussion

In order to investigate the limitations in the accuracy of the digital modal decomposition, the following approach is followed. We first established a baseline by considering different combination of the two modes generated through theoretical simulations. Reconstruction performance of the SPGD-based digital modal decomposition is evaluated for all these theoretically generated patterns. Composite beams with known proportions are then generated experimentally and then reconstruction performance of the SPGD based digital modal decomposition is evaluated for these experimentally generated patterns for specific modal weight ratios and relative phase.

#### 4.1 Modal decomposition of theoretically generated beams

In this approach, we theoretically generated composite patterns consisting of two eigenmodes at a time, mixed with equal proportion. Further, for each weight combination as described earlier, relative phase ($\Delta \phi = |{{\phi_2} - {\phi_3}} |$) of one of constituent mode is varied from 0° to 180° with respect to the other mode. The corresponding theoretically generated composite patterns (${I_{me}}$) are shown in Figs. 2–4, respectively in the top rows.

Now each of these composite patterns shown in top row of Figs. 2–4, are decomposed using the SPGD algorithm described earlier. The decomposed beams consisting of the respective weights and relative phase is used to now re-create the composite mode intensity pattern. The reconstructed composite beam patterns thus created using the estimated weights and phases for each case are shown in the second row of Figs. 2–4. It is observed from phase parity plots shown in Figs. 2–4 that the digital modal decomposition has performed exceptionally well in decomposing all the phase combinations for the case where equal weights of the modes are considered. Negligible residual intensity error ($\mathrm{\Delta }I ={\sim} 0.5$) is observed for all three considered compositions. ${\gamma _r}$ and ${\gamma _p}$ which are gains for modal amplitude and phase update equations, have same values (15 and 150, respectively) throughout for every test case. We now evaluate the performance of the SPGD algorithm for its stability against different proportions of modal weights.

We further repeated the above procedure for theoretically generated composite beams by varying constituent weight composition from 20:80 to 80:20, and relative phase ($\Delta \phi$) from 0° to 180°. We estimated the relative weights and phase values from each case, and the residual intensity error ($\Delta I$), relative phase error ($\Delta \phi (Error) = |{\Delta \phi (Generated) - \Delta \phi (Reconstructed)} |$ and error in constituent weights ($|{{\rho_k}(error)} |= \frac{{|{{\rho_k}(Generated) - {\rho_k}(Reconstructed)} |}}{{{\rho _k}(Generated)}}$) for each of the mode combinations are shown in Figs. 5(a)-5(h).

The intensity error shown in Figs. 5(a) and 5(e) shows that he SPGD based reconstruction algorithm performs well, as $\Delta I$ is almost zero for most of weight and relative phase compositions, but for some specific ranges of $\Delta \phi$ and *ρ*. It is also inferred from Figs. 5(a) and 5(e) that the intensity error for the LP_{01} and LP_{11(a)} combination is much smaller than that for the combinations involving higher order degenerate modes, especially when $\Delta \phi$ is closer to 90°. This higher $\Delta I$ for these specific cases (specifically, when the modal weights are highly imbalanced) is primarily contributed by the corresponding errors in reconstructed relative phase ($\Delta \phi (Error)$) and weights ($\rho (Error)$) in the composite patterns, shown in Figs. 5(b)-5(d) for LP_{01} and LP_{11(a)} combination, respectively and in Figs. 5(f)-5(h) for LP_{11(a)} & LP_{11(b)} combination, respectively.

### 4.1.1 Effect of asymmetric weights

The relative phase error ($\varDelta \phi (Error)$) and constituent modal weight errors ($\rho (Error)$) arise due to the fact that when one of the constituent mode is dominant as compared to the other, and when the relative phase is around 90°, the resulting intensity pattern is very much similar to the dominant mode present in the combination. This results in reconstruction errors as indicated in Fig. 5. In order to illustrate this, consider the intensity patterns of some sample cases which are theoretically generated for following weight and relative phase combinations: (a) LP_{01}: LP_{11(a)} = 20:80, $\Delta \phi$ = 90°, (b) LP_{01} : LP_{11(a)} = 80:20, $\Delta \phi$ = 90°, (c) LP_{11(a)} :LP_{11(b)} = 20:80, $\Delta \phi$ = 90°, (d) LP_{11(a)}: LP_{11(b)} = 80:20, $\Delta \phi$ = 90° are depicted in Figs. 6(a)-6(d), respectively.

It is clearly observed from Fig. 6(a) that theoretically generated intensity pattern for LP_{01} & LP_{11(a)} = 20:80, $\Delta \phi$ = 90° combination resembles a pure LP_{11(a)} mode intensity pattern. Similar observations can be made for other combinations shown in Fig. 6(b) as pure LP_{01} mode, Fig. 6(c) as pure LP_{11(b)} mode and Fig. 6(d) as pure LP_{11(a)} mode.

Also, note that the error in the weights (Figs. 5(c)-5(d) and Figs. 5(g)-5(h)) are not symmetrical for the 80:20 and 20:80 split ratios. In fact, the maximum error occurs for 20/80 case for ${\rho _1}$, and 80/20 case for ${\rho _2}$. This is now understandable based on the above explanation which attributes the errors to the similarity with individual modes for $\Delta \phi$ = 90°. Thus, we believe that any modal decomposition algorithm which is based on the measurement of intensity is expected to have ambiguities when the relative phase between the modes is 90°.

### 4.1.2 Effect of camera placement

We further evaluate the performance of our digital modal decomposition algorithm based on SPGD method in case of error due to any displacement of the beam with respect to the center of the camera. In order to quantify the extent of this error, we have deliberately displaced the center of theoretically generated patterns for the cases with different weights and phase differences, considering two modes at a time. The center is altered for following randomly chosen displacements from the actual values: offset - 1: 1 pixel west and 3 pixels north, offset – 2: 3 pixels west and 2 pixels south. Intensity patterns for the considered combinations generated by altering these two offset values have been then decomposed using the SPGD based digital modal decomposition method. Decomposition results is terms of phase parity plots and weight parity plots are shown in Fig. 7 for these weight combinations. In the Fig. 7, “Actual” represents the case when the center of the camera is aligned to the center of the beam, and the plots shown in black and pink refer to the cases corresponding to the random offsets described above.

It can be assessed from Fig. 7 that for all combinations, $\Delta \phi (Error)$ observed is minimal, particularly for LP_{11(a)}:LP_{11(b)} = 50:50 combination. However, the error due to the above displacement of the observed intensity pattern is found to be significant for the reconstructed weights when fundamental mode is combined with either of the higher order modes. Specifically, the error is minimum for $\Delta \phi$ of 90° and tends to increase as $\Delta \phi$ is closer to zero or 180. The worst-case phase error observed is within +/- 10°. Note that this observation is quite contrary to the previous case where there is an inherent error when the phase difference between the modes is 90°. Thus, we can conclude that, any ambiguity at phase angles closer to 90°, especially when the modal weights are non-uniform, cannot be corrected and is a fundamental limitation of the intensity-based technique. On the other hand, the ambiguity at other phase angles can be corrected by aligning the center of the beam to the center-reference of the image frame used in the modal decomposition algorithm.

### 4.1.3 Effect of camera nonlinearity and background noise

The camera used to capture composite beams can introduce extra non-idealities due to its nonlinear response and background noise. So, in order to study the impact of these camera non-idealities (nonlinear response and intensity noise) on error in the weight and phase of the decomposed patterns, we have attempted the decomposition of composite patterns of known proportions after emulating camera nonlinearity and background noise.

The camera (Thorlabs DCC1545M) that we have used to capture beams has in-built gamma correction and as such, is designed to exhibit linear response. However, in order to investigate the effect of any nonlinear response of the camera, the distorted intensity (${I_{out}}$) is modeled in terms of the undistorted intensity (${I_{in}}$) as ${I_{out}} = {({{I_{in}}} )^\gamma }$ in simulations, with $\gamma = 0.95$. The corresponding errors in the modal decomposition for different cases are estimated and the results are shown Figs. 8(a)-8(i). It is clearly evident from Figs. 8(a)-8(i) that the decomposition of the modal combination involving the fundamental mode (LP_{01}) and any other higher order mode (LP_{11(a)/(b)}), produces a worst-case error of 1.2% in weight and 2.81° in phase. The error is found to be minimal when the constituent modes are LP_{11(a)} and LP_{11(b)}. So, it can be deduced from this study that small values of camera nonlinearity have a very minor impact on decomposed weights and phases.

In addition to the above, we have also carried out investigations on the effect of background intensity noise from our camera. We have generated multiple realizations of random noise with same mean ($\mu = 0.0406$) and standard deviation ($\sigma = 0.0064$), and added it to the different composite patterns. These specific values of $\mu$ and $\sigma$ were chosen based on the background noise captured from our camera. We generate multiple instances of noise files with the same mean and standard deviation and add to the composite patterns. The intensity patterns with the noise are then decomposed for different pair of modes, and the results are shown in Figs. 9(a)-9(i). The standard deviation of the decomposed weights and phases from multiple trials are shown as error bar.

It is clearly observed from Figs. 9(a)-9(i) that the decomposition of the modal combination involving the fundamental mode (LP_{01}) and any other higher order mode (LP_{11(a)/(b)}) produces a worst-case error of 2.4% in weight and 6.4° in phase. The error is found to be minimal when the constituent modes are LP_{11(a)} and LP_{11(b)}. Overall, we note that the decomposition errors in weight as well as phase terms are much more sensitive to camera intensity noise as compared to nonlinearity of the camera.

### 4.1.4 Importance of correct basis set

The accuracy of the digital modal decomposition technique is dependent on the knowledge of the exact basis set constituting the eigenmodes supported by the fiber. In some cases, we may not exactly know the mode field diameter (MFD) of the eigenmodes involved i.e., the MFD of the eigenmode set used for decomposition is different from the MFD of the modes used in the measurement. In order to consider the effect of mode field mismatch on the modal decomposition, we have considered composite beam patterns with following compositions: 1) LP_{01} & LP_{11(a)} = 50:50, $\Delta \phi$ = 0°, 2) LP_{11(a)} & LP_{11(b)} = 50:50, $\Delta \phi$ = 0°, 3) LP_{01} & LP_{11(a)} = 50:50, $\Delta \phi$ = 90° and 4) LP_{11(a)} & LP_{11(b)} = 50:50, $\Delta \phi$ = 90°. The decomposition results in terms of weight and phase errors for considered combinations: 1) LP_{01} & LP_{11(a)} = 50:50, $\Delta \phi$ = 0°, 2) LP_{11(a)} & LP_{11(b)} = 50:50, $\Delta \phi$ = 0°, 3) LP_{01} & LP_{11(a)} = 50:50, $\Delta \phi$ = 90° and 4) LP_{11(a)} & LP_{11(b)} = 50:50, $\Delta \phi$ = 90° are depicted in Figs. 10(a)-10(d).

From Figs. 10(a)-10(d) it is observed that the error in modal weight increases as a function of MFD mismatch (in %) when the modal combination consists of the fundamental mode (LP_{01}) and one of the higher order modes (LP_{11(a)/(b)}), whereas the error in the relative phase is negligible irrespective of the MFD mismatch. On the other hand, the error in weight term is not much influenced by MFD % mismatch when the constituent modes are both higher order modes (LP_{11(a)/(b)}). On the basis of these observations, we can state that the MFD mismatch is an issue for dissimilar mode combinations (LP_{01} and LP_{11(a)/(b)}), and not for combination involving similar modes (LP_{11(a)/(b)}).

#### 4.2 Modal decomposition of experimentally generated beams

We now consider the same set of weight combinations namely-varying proportions of the mixing modes, considered two at a time and generate the composite patterns experimentally using a SLM. Experimental setup shown in Fig. 1 is used to generate composite patterns experimentally. The SLM is loaded with appropriate phase modulation functions corresponding to particular composite pattern to be generated [28]. As shown in Fig. 1, collimated beam after lens L_{1} is spatially modulated by SLM. The resulting intensity profiles are then captured on CMOS camera. The experimentally captured composite intensity profiles are then calibrated offline before feeding them to SPGD modal decomposition module. Calibration involves the following steps: (a) extracting a square matrix from captured raw image of 1280×1024 and then applying a smoothening spatial domain box filter, (b) normalizing the intensity with respect to the peak intensity of the captured composite image, and (c) adjusting the magnification factor comparable to the size of simulated eigenmodes of the system. The last step is usually done by comparing the spot size of captured and simulated LP_{01} mode so that there is no residual intensity error.

For all considered weight cases, the relative phase ($\Delta \phi$) of one of constituent higher order mode is varied from 0° to 180° with respect to the fundamental mode. To quantify the accuracy of reconstruction using SPGD based method, phase parity plots and weight parity plots with two modes considered at a time are shown in Figs. 11(a)-11(i). In order to decompose these experimentally captured composite beams, two different set of eigenmodes are used. The first set consists of theoretically generated unpropagated basis set, and the other set consists of the propagated basis set calculated using Huygens-Fresnel diffraction integral defined in Eq. (15) and include the impact of propagation taking place between SLM and CMOS camera.

It is seen from weight parity plots shown in Figs. 11(h)-11(i) that weight error in case of LP_{11(a):}LP_{11(b) }= 50:50 is smaller as compared to other two modal combinations involving the fundamental mode. We had observed a similar trend while decomposing theoretically generated patterns as shown in Figs. 7(h)-7(i). Further, it is observed from all the relative phase ($\Delta \phi = |{{\phi_1} - {\phi_2}} |$) and weight parity plots displayed in Fig. 11(a-i) the absolute error observed in experimental data in weights is < ∼7.5% while in phase is < 9° (using propagated modal basis), and these are marginally higher than those observed in Section 4.1.2. Note that, it is ensured that the camera is aligned to the center of the beam.

Another important observation noticeable from Figs. 11(a), 11(d), and 11(h) that the relative phase error is lower in the case when with propagated basis set is used as compared to the case when decomposition is carried out using unpropagated basis set. This confirms the fact that when composite beam travels from SLM towards CMOS camera, it acquires additional phase which changes its resultant intensity structure as compared to the intended profiles. Ultimately, it results in an additional phase error when decomposition is carried out using unpropagated basis set. It is evident after observing Figs. 11(a)-11(h) that use of propagated basis set has resulted in considerable reduction of relative phase error as compared to unpropagated basis case. These results prove that the modal decomposition can be carried out without a lens and imaging system, provided the exact distance between the camera and the SLM is precisely known.

Further, it should be noted that in our experimental work, only near field intensity profiles have been captured of all composite beams which may cause ambiguity in the relative phase of the reconstructed profile such that the reconstructed modal weights are same but with conjugated phase [6,26]. The systematic investigation presented in this work is of considerable importance, as a number of operations performed in mode-division multiplexed communication systems and fiber lasers such as estimation of mode resolved bending loss [2], determination of angular orbital momentum composition of light [2,3], adaptive mode control [4–6], measuring fiber-to-fiber coupling process [1,5] evaluation of specialty fiber designs [1], wave-front reconstruction [6], beam quality evaluation [2,3,6], etc. are critically dependent on the accuracy of modal decomposition. Decomposition of near-field and far-field profile simultaneously can further reduce the phase ambiguity. But, there are certain composite beam combinations such as centrosymmetric beams, for which, even decomposition of both near-field and far-field profiles cannot resolve the phase ambiguity (related to the correct identification of the sign of the phase).

Even though we have performed this systematic investigation of digital modal decomposition methodology based on SPGD method for only three modes (N = 3), the method is scalable to some extent with increasing complexity. The physical limit related to number of modes in the digital decomposition process is influenced by modal ambiguity, wherein similar intensity patterns are formed for different combinations of modal weights and relative phases of distinctly different sets of modes. This modal ambiguity problem becomes more dominant when number of modes in system are increased and it imposes a physical limit on number of modes that can be decomposed unambiguously using iterative SPGD based method.

Additionally, it should be noted that digital modal decomposition method presented in this study is valid only with the assumption that all eigenmodes are excited with a relatively narrow linewidth source and are coherent. In the scenario involving high-power fiber lasers with broad spectrum, usually a large number of modes (longitudinal and transverse) are coupled inside multi-mode waveguide, with each exciting different modal weights and spectral components [25]. In such cases, SPGD based method presented in this manuscript needs to modified in order to include the impact of temporal coherence. Initial results regarding this aspect are reported in Ref. [31], considering three-mode case, which can be extended to more number of modes.

## 5. Conclusions

A systematic study of the sources of errors in stochastic parallel gradient descent (SPGD) method based digital modal decomposition method was carried out in this work. Composite beams consisting of different pairs among the 3 eigenmodes of a few mode fiber (FMF) and varying relative phase ($\Delta \phi$) from 0° to 180° of higher-order mode (LP_{11(a/b)}) with respect to fundamental mode (LP_{01}) have been generated theoretically and experimentally using a spatial light modulator (SLM). SPGD method was then later used to decompose the phase and weights of these theoretically and experimentally generated beams one by one in terms of eigenmodes of the system. It is found that the maximum absolute decomposition error is 3 to 4% in the case of the theoretically generated beams and ∼7.5% in experimentally generated beams.

We have also shown decomposition of experimentally captured beams using propagated mode basis set as well as unpropagated mode basis set. It is shown that reconstruction with the propagated basis set results in a significantly reduced error. For these studies, we also observe that when one of the constituent mode is dominant in a two mode composite beam (LP_{01} & LP_{11(a)} or LP_{11(a)} & LP_{11(b)}) and relative phase is around 90°, then slightly higher values of $\Delta I$ are observed, leading to increased values of phase and modal weight errors. We attribute this to the resemblance of the intensity pattern for these combinations with the intensity pattern of the dominant mode present in the composite beam. Consequently, we believe that any modal decomposition algorithm which is based on the measurement of intensity is expected to have ambiguities when the relative phase between the modes is 90°.

Another important aspect, which may be a source of considerable error in the modal decomposition is the camera misalignment while capturing composite beams. Such theoretically generated off-centered composite beams are decomposed using SPGD based digital modal decomposition method and decomposition results of these off-centered composite beams are compared with decomposition results of composite beams with perfect camera alignment. It is observed that for composite beam combinations involving fundamental mode (LP_{01}) with one higher order mode (LP_{11(a/b)}) with equal mode ratios (50:50), the error in weight terms is minimum for $\Delta \phi$ of 90° and tends to increase as $\Delta \phi$ is closer to zero or 180°. The worst-case phase error observed is within +/- 10°. Thus, we can conclude that, any ambiguity at phase angles closer to 90°, especially when the modal weights are non-uniform, cannot be corrected and is a fundamental limitation of the intensity-based technique, while the ambiguity at other phase angles can be corrected by aligning the center of the beam to the center-reference of the image frame used in the modal decomposition algorithm.

## Funding

Ministry of Electronics and Information technology.

## Acknowledgments

First author acknowledges Indian Institute of Technology Madras (IITM) for institute post-doctoral fellowship (IPDF).

## Disclosures

The authors declare no conflicts of interest.

## Data availability

Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.

## References

**1. **L. Huang, S. Guo, J. Leng, H. Lü, and P. Zhou, “Real-time mode decomposition for few-mode fiber based on numerical method,” Opt. Express **23**(4), 4620–4629 (2015). [CrossRef]

**2. **Y. An, J. Li, L. Huang, L. Li, J. Leng, L. Yang, and P. Zhou, “Numerical mode decomposition for multimode fiber: From multi-variable optimization to deep learning,” Opt. Fiber Technol. **52**, 101960 (2019). [CrossRef]

**3. **C. Schulze, S. Ngcobo, M. Duparré, and A. Forbes, “Modal decomposition without a priori scale information,” Opt. Express **20**(25), 27866–27873 (2012). [CrossRef]

**4. **L. Huang, J. Leng, P. Zhou, S. Guo, and H. Lü, “Adaptive mode control of a few-mode fiber by real-time mode decomposition,” Opt. Express **23**(21), 28082–28090 (2015). [CrossRef]

**5. **Y. An, L. Huang, J. Li, J. Leng, L. Yang, and P. Zhou, “Learning to decompose the modes in few-mode fibers with deep convolutional neural network,” Opt. Express **27**(7), 10127–10137 (2019). [CrossRef]

**6. **L. Li, J. Leng, P. Zhou, and J. Chen, “Multimode fiber modal decomposition based on hybrid genetic global optimization algorithm,” Opt. Express **25**(17), 19680–19690 (2017). [CrossRef]

**7. **J. Li, H. C. Zhao, Z. L. Chen, and X. J. Xu, “Beam cleanup of a multimode fiber seeded by an off-center single-mode laser source,” Opt. Express **124**(16), 2501–2503 (2013). [CrossRef]

**8. **K. Choi and C. Jun, “High-Precision Modal Decomposition of Laser Beams Based on Globally Optimized SPGD Algorithm,” IEEE Photonics J. **11**(5), 1–10 (2019). [CrossRef]

**9. **J. W. Nicholson, A. D. Yablon, S. Ramachandran, and S. Ghalmi, “Spatially and spectrally resolved imaging of modal content in large-mode-area fibers,” Opt. Express **16**(10), 7233–7243 (2008). [CrossRef]

**10. **N. Andermahr, T. Theeg, and C. Fallnich, “Novel approach for polarization-sensitive measurements of transverse modes in few-mode optical fibers,” Appl. Phys. B **91**(2), 353–357 (2008). [CrossRef]

**11. **Y. Z. Ma, Y. Sych, G. Onishchukov, S. Ramachandran, U. Peschel, B. Schmauss, and G. Leuchs, “Fiber-modes and fiber-anisotropy characterization using low-coherence interferometry,” Appl. Phys. B **96**(2-3), 345–353 (2009). [CrossRef]

**12. **T. Kaiser, D. Flamm, S. Schröter, and M. Duparré, “Complete modal decomposition for optical fibers using CGH-based correlation filters,” Opt. Express **17**(11), 9347–9356 (2009). [CrossRef]

**13. **D. Flamm, D. Naidoo, C. Schulze, A. Forbes, and M. Duparré, “Mode analysis with a spatial light modulator as a correlation filter,” Opt. Lett. **37**(13), 2478–2480 (2012). [CrossRef]

**14. **D. N. Schimpf, R. A. Barankov, and S. Ramachandran, “Cross-correlated (C^{2}) imaging of fiber and waveguide modes,” Opt. Express **19**(14), 13008–13019 (2011). [CrossRef]

**15. **M. Lyu, Z. Lin, G. Li, and G. Situ, “Fast modal decomposition for optical fibers using digital holography,” Sci. Rep. **7**(1), 1–9 (2017). [CrossRef]

**16. **S. Pachava, A. Dixit, and B. Srinivasan, “Modal decomposition of Laguerre Gaussian beams with different radial orders using optical correlation technique,” Opt. Express **27**(9), 13182–13193 (2019). [CrossRef]

**17. **L. Yan, R. Barankov, P. Steinvurzel, and S. Ramachandran, “Modal-weight measurements with fiber gratings,” J. Lightwave Technol. **33**(13), 2784–2790 (2015). [CrossRef]

**18. **J. Montoya, C. Aleshire, C. Hwang, N. K. Fontaine, A. Velázquez-Benítez, D. H. Martz, T. Y. Fan, and D. Ripin, “Photonic lantern adaptive spatial mode control in LMA fiber amplifiers,” Opt. Express **24**(4), 3405–3413 (2016). [CrossRef]

**19. **L. Huang, H. Lü, P. Zhou, J. Leng, and S. Guo, “Modal analysis of fiber laser beam by using stochastic parallel gradient descent algorithm,” IEEE Photonics Technol. Lett. **27**(21), 2280–2283 (2015). [CrossRef]

**20. **G. Bai, X. Chen, Y. Yang, Y. Zheng, X. Zhao, K. Liu, C. Zhao, Y. Qi, B. He, and J. Zhou, “Beam quality evaluation of 20/400 µm large-mode-area fiber based on mode decomposition and reconstruction,” Laser Phys. **28**(2), 025101 (2018). [CrossRef]

**21. **R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik **35**, 237–246 (1972).

**22. **H. Lü, P. Zhou, X. Wang, and Z. Jiang, “Fast and accurate modal decomposition of multimode fiber based on stochastic parallel gradient descent algorithm,” Appl. Opt. **52**(12), 2905–2908 (2013). [CrossRef]

**23. **D. Zhang, L. Guo, and G. E. Karniadakis, “Learning in modal space: Solving time-dependent stochastic PDEs using physics-informed neural networks,” SIAM J. Sci. Comput. **42**(2), A639–A665 (2020). [CrossRef]

**24. **O. Shapira, A. F. Abouraddy, J. D. Joannopoulos, and Y. Fink, “Complete modal decomposition for optical waveguides,” Phys. Rev. Lett. **94**(14), 143902 (2005). [CrossRef]

**25. **H. Pang, T. Haecker, A. Bense, T. Haist, and D. Flamm, “Focal field analysis of highly multi-mode fiber beams based on modal decomposition,” Appl. Opt. **59**(22), 6584–6592 (2020). [CrossRef]

**26. **R. Brüning, P. Gelszinnis, C. Schulze, D. Flamm, and M. Duparré, “Comparative analysis of numerical methods for the mode analysis of laser beams,” Appl. Opt. **52**(32), 7769–7777 (2013). [CrossRef]

**27. **K. Singh, P. Sharma, B. Srinivasan, R. D. Koilpillai, and D. Venkitesh, “Digital modal decomposition based on stochastic parallel gradient descent algorithm and its validation,” In 2020 Conference on Lasers and Electro-Optics Pacific Rim (CLEO-PR) P2_19 (2020)

**28. **V. Arrizón, U. Ruiz, R. Carrada, and L. A. González, “Pixelated phase computer holograms for the accurate encoding of scalar complex fields,” J. Opt. Soc. Am. A **24**(11), 3500–3507 (2007). [CrossRef]

**29. **J. W. Goodman, “* Introduction to Fourier optics*,” (Roberts and Company Publishers, 2005).

**30. **A. Dixit, S. K. Mishra, and A. K. Gupta, “Investigations on the turbulence resistant characteristics of custom designed beams embedded with multiple phase singularities,” Opt. Laser Technol. **122**, 105851 (2020). [CrossRef]

**31. **K. Choi, Y. Kim, Y. Yun, Y. C. Noh, and C. Jun, “Modal decomposition of measured near-field and far-field beams with partial coherence based on SPGD algorithm,” In 2020 Conference on Lasers and Electro-Optics Pacific Rim (CLEO-PR) P2_6 (2020).