Real-time complex amplitude reconstruction method for beam quality M 2 factor measurement

We present a real-time complex amplitude reconstruction method for determining the beam propagation ratio M of laser beams based on the transport of intensity equation (TIE). In this work, a synchronous acquisition system consisting of two identical CCDs is established. Once two beam intensity images at different cross-section positions along the optical axis are captured simultaneously by the system, the complex amplitude of the laser beam can be rapidly reconstructed using TIE algorithm. Then the beam intensity distribution at any section position along its propagation direction can be obtained by using angular spectrum (AS) theory. The beam quality M factor is therefore calculated utilizing the second-order moments and hyperbola fitting methods, which conform to the ISO standard. The suitability of this method is verified by the numerical analysis and experiments with the He-Ne and high-power fiber laser sources, respectively. The experimental technique is simple and fast, which allows to investigate laser beams under conditions inaccessible to other methods. © 2017 Optical Society of America OCIS codes: (140.0140) Lasers and laser optics; (140.3295) Laser beam characterization; (100.5070) Phase retrieval; (120.5050) Phase measurement. References and links 1. K. C. Jorge, R. Riva, N. A. S. Rodrigues, J. M. S. Sakamoto, and M. G. Destro, “Scattered light imaging method (SLIM) for characterization of arbitrary laser beam intensity profiles,” Appl. Opt. 53(20), 4555–4564 (2014). 2. F. Chen, J. Ma, R. Zhu, Q. Yuan, W. Zhou, J. Su, J. Xu, and S. Pan, “Coupling efficiency model for spectral beam combining of high-power fiber lasers calculated from spectrum,” Appl. Opt. 56(10), 2574–2579 (2017). 3. E. Perevezentsev, A. Poteomkin, and E. Khazanov, “Comparison of phase-aberrated laser beam quality criteria,” Appl. Opt. 46(5), 774–784 (2007). 4. A. E. Siegman, “New developments in laser resonators,” Proc. SPIE 1224, 2–14 (1990). 5. A. E. Siegman, “How to (maybe) measure laser beam quality,” in DPSS (Diode Pumped Solid State) Lasers: Applications and Issues, M. Dowley, ed., Vol. 17 of OSA Trends in Optics and Photonics (Optical Society of America, 1998), paper MQ1. 6. C. Borgentun, J. Bengtsson, and A. Larsson, “Full characterization of a high-power semiconductor disk laser beam with simultaneous capture of optimally sized focus and farfield,” Appl. Opt. 50(12), 1640–1649 (2011). 7. R. D. Niederriter, J. T. Gopinath, and M. E. Siemens, “Measurement of the M beam propagation factor using a focus-tunable liquid lens,” Appl. Opt. 52(8), 1591–1598 (2013). 8. International Organization for Standardization, ISO 11146–1/2/3 Test methods for laser beam widths, divergence angles and beam propagation ratios – Part 1: Stigmatic and simple astigmatic beams / Part 2: General astigmatic beams / Part 3: Intrinsic and geometrical laser beam classification, propagation and details of test methods (ISO, Geneva, 2005). 9. Ophir-Spiricon, Inc., “M-200 Operator’s Manual” (2007). Vol. 25, No. 17 | 21 Aug 2017 | OPTICS EXPRESS 20142 #300418 Journal © 2017 https://doi.org/10.1364/OE.25.020142 Received 21 Jun 2017; revised 6 Aug 2017; accepted 6 Aug 2017; published 10 Aug 2017 10. J. Strohaber, G. Kaya, N. Kaya, N. Hart, A. A. Kolomenskii, G. G. Paulus, and H. A. Schuessler, “In situ tomography of femtosecond optical beams with a holographic knife-edge,” Opt. Express 19(15), 14321–14334 (2011). 11. O. A. Schmidt, C. Schulze, D. Flamm, R. Brüning, T. Kaiser, S. Schröter, and M. Duparré, “Real-time determination of laser beam quality by modal decomposition,” Opt. Express 19(7), 6741–6748 (2011). 12. B. Schäfer, M. Lübbecke, and K. Mann, “Hartmann-Shack wave front measurements for real time determination of laser beam propagation parameters,” Rev. Sci. Instrum. 77(5), 053103 (2006). 13. J. V. Sheldakova, A. V. Kudryashov, V. Y. Zavalova, and T. Y. Cherezova, “Beam quality measurements with Shack-Hartmann wavefront sensor and M2-sensor: comparison of two methods,” Proc. SPIE 6452, 645207 (2007). 14. V. Akondi, A. R. Jewel, and B. Vohnsen, “Digital phase-shifting point diffraction interferometer,” Opt. Lett. 39(6), 1641–1644 (2014). 15. V. Akondi and B. Vohnsen, “Myopic aberrations: impact of centroiding noise in Hartmann Shack wavefront sensing,” Ophthalmic Physiol. Opt. 33(4), 434–443 (2013). 16. R. Cortés, R. Villag’omez, V. Coello, and R. L’opez, “Laser beam quality factor (M) measured by distorted fresnel zone plates,” Rev. Mex. Fis. 54(4), 279–283 (2008). 17. M. Scaggs and G. Haas, “Real time laser beam analysis system for high power lasers,” Proc. SPIE 7913, 791306 (2011). 18. 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). 19. D. Flamm, C. Schulze, R. Brüning, O. A. Schmidt, T. Kaiser, S. Schröter, and M. Duparré, “Fast M measurement for fiber beams based on modal analysis,” Appl. Opt. 51(7), 987–993 (2012). 20. C. Schulze, D. Flamm, M. Duparré, and A. Forbes, “Beam-quality measurements using a spatial light modulator,” Opt. Lett. 37(22), 4687–4689 (2012). 21. W. Shi, Z. Zhang, X. He, Q. Liu, Z. Zhang, Y. Ma, and Y. Jin, “Measuring laser beam quality by use of phase retrieval and Fraunhofer diffraction,” Proc. SPIE 9255, 92552Q (2015). 22. Y. Du, Y. Fu, and L. Zheng, “Complex amplitude reconstruction for dynamic beam quality M factor measurement with self-referencing interferometer wavefront sensor,” Appl. Opt. 55(36), 10180–10186 (2016). 23. M. R. Teague, “Deterministic phase retrieval: a Green’s function solution,” J. Opt. Soc. Am. 73(11), 1434–1441 (1983). 24. M. Silva-López, J. M. Rico-García, and J. Alda, “Measurement limitations in knife-edge tomographic phase retrieval of focused IR laser beams,” Opt. Express 20(21), 23875–23886 (2012). 25. Goodman J. W., Introduction to Fourier Optics (McGraW-Hill Companies, 2005). 26. C. Zuo, Q. Chen, and A. Asundi, “Boundary-artifact-free phase retrieval with the transport of intensity equation: fast solution with use of discrete cosine transform,” Opt. Express 22(8), 9220–9244 (2014). 27. X. Tian, W. Yu, X. Meng, A. Sun, L. Xue, C. Liu, and S. Wang, “Real-time quantitative phase imaging based on transport of intensity equation with dual simultaneously recorded field of view,” Opt. Lett. 41(7), 1427–1430 (2016). 28. Y. Zhu, Z. Zhang, and G. Barbastathis, “Phase imaging for absorptive phase objects using hybrid uniform and structured illumination Transport of Intensity Equation,” Opt. Express 22(23), 28966–28976 (2014). 29. Z. Jingshan, R. A. Claus, J. Dauwels, L. Tian, and L. Waller, “Transport of Intensity phase imaging by intensity spectrum fitting of exponentially spaced defocus planes,” Opt. Express 22(9), 10661–10674 (2014). 30. K. Komuro and T. Nomura, “Quantitative phase imaging using transport of intensity equation with multiple bandpass filters,” Appl. Opt. 55(19), 5180–5186 (2016). 31. M. Reed Teague, “Deterministic phase retrieval: a Green’s function solution,” J. Opt. Soc. Am. 73(11), 1434–1441 (1983). 32. D. A. Gilbarg and N. S. Trudinger, Elliptic Partial Differential Equations of Second Order (Springer, 2001), 224. 33. C. Zuo, Q. Chen, Y. Yu, and A. Asundi, “Transport-of-intensity phase imaging using Savitzky-Golay differentiation filter--theory and applications,” Opt. Express 21(5), 5346–5362 (2013).


Introduction
In laser applications, it is important to know the laser beam's propagation characteristics as they directly influence the application quality [1,2].In general, these characteristics are usually evaluated using the laser beam quality.Nowadays, a variety of criteria for laser beam quality determination have been put forward [3], such as laser beam quality factor β, beam propagation factor M 2 , Strechl ratio, power in the bucket.Among the various approaches for characterizing the quality of a laser beam, the beam propagation ratio or M 2 parameter as introduced by Siegman [4,5] has become the most common and accepted standard.It is defined as the ratio of the beam parameter product (the product of waist radius and divergence half angle) of the real beam to that of a fundamental Gaussian beam [5], and was adopted by the International Organization for Standardization in 1991.Now the M 2 factor has undoubtedly become an acceptable evaluation parameter for beam quality characterization in the laser system [6,7].
According to the instructions of ISO11146-1/2/3 [8], the measurement of the beam intensity with a camera in various planes within two Rayleigh lengths on either side of the beam waist is suggested, which allows the determination of the second-order moments and the M 2 value of the beam.Several conventional methods, which follow this standard, have been proposed to measure the M 2 value, such as camera scanning [9] or knife-edge [10] methods.However, despite the fact that these methods are carried out simply, they are still quite slow and laborious due to the requirements of multiple captures.Moreover, these methods all require the stability of the laser captured frames for both numerical data process and experiments, which makes high demands on the temporal stability of a cw laser or the pulse-to-pulse stability of a pulsed source [11].Caustic measurements are therefore unsuitable to characterize the fast dynamic process of a laser system, especially for high-power laser.
Therefore, a number of alternative methods have been developed to provide faster M 2 measurement.For example, Schäfer et.al. developed a fast and simple method for determining the beam propagation ratio M 2 based on the Shack-Hartmann wavefront sensor [12], but was shown to yield inaccurate results for multimode beams [13].Moreover, the sensitivity and dynamic range of this sensor is primarily limited by the number of subapertures and the focal distance of the microlenses, respectively [14,15].Other methods for real-time determination of M 2 factor conform to the ISO standard techniques.One method realized an M 2 factor measurement with simultaneous images by multiplane imaging using distorted diffraction gratings [16] or angled Fabry-Perot filter [17], which achieve a compact device for measuring the beam quality for high power laser beams.Flamm et.al. developed another robust technique -the complete modal decomposition of optical fields [18], for the beam quality measurement.They have applied this method to the real-time determination of laser beam quality [11,19] and shown that a modal decomposition of an investigated laser beam allows not only the quantitative determination of its transverse modal content but also its beam quality factor M 2 .Furtherly, they used a spatial light modulator (SLM) with digital holograms to achieve the M 2 factor measurement in real time [20].Due to the high SLM frame rate, an M 2 measurement time within 1s is achievable.In recent years, Jorge et.al. [1] presented a scattered light imaging method (SLIM) for the characterization of arbitrary laser beam intensity profiles.It is not only fast and simple but also a real-time, single-shot method with high accuracy and high sensitivity.Furthermore, the beam characterization method based on the phase retrieval is also an effective way to measure the beam quality M 2 factor.Shi et.al. [21] demonstrated the use of phase retrieval and Fraunhofer diffraction as a method for the measurement of laser beam quality.This method is expected to give a precise laser beam quality.Du et.al. [22] also developed a new approach for real-time determination of M 2 factor by amplitude and phase reconstruction based on a Mach-Zehnder self-referencing interferometer wavefront sensor.It is simple, fast, and operates without moving parts.In addition, it is suitable for characterizing the dynamic laser beam quality.
In this paper, we present a method for real-time complex amplitude reconstruction and dynamic beam quality M 2 factor measurement on basis of the transport of intensity equation (TIE) technique [23,24].The approach is a combination of three well known techniques (field reconstruction using TIE, field propagation using angular spectrum theory, M 2 -determination using a virtual caustic measurement).The skillful implementation of these techniques results in real-time measurements for the M 2 value.The schematic diagram of the process of phase retrieval and M 2 factor determination is depicted in Fig. 1.With two beam intensity images at defocused positions obtained via a synchronous acquisition system consisting of two identical CCDs, the wavefront of the test laser beam is reconstructed in high-speed utilizing the TIE method.Then according to the angular spectrum (AS) theory [25], the complex amplitude or intensity distributions in various cross section planes along the optical axis are obtained.And the beam quality M 2 factor is therefore calculated utilizing the second-order moments and hyperbola fitting algorithms based on the ISO standard method [8].It is worth mentioning that, the TIE method achieves a phase retrieval directly from intensity images obtained at several defocused positions by solving the Poisson equation with high accuracy and efficiency [26][27][28][29] and avoids an unwrapping problem [30].Compared to the phase retrieval method based on the conventional interferometry technology, the TIE algorithm is simple and fast, without separated reference wave or iterative computation.Moreover, this method does not need a complex optical system or strict experimental environment.In conclusion, the proposed approach for beam quality M 2 factor determination performs the measurements in real time, and operates without moving parts while the standardized technique for the general astigmatic beams is very complicated and prone to measurement errors.The time taken from the image acquisition to the M 2 value determination is only about 0.5s.In this work, we evaluate the performance of the real-time characterization method for laser beam quality based on the TIE technique by software simulations and experiments.We use a He-Ne laser and a fiber laser as light sources in experiments, and compare the results with those obtained by a conventional method, the camera scanning method -realized by the beam quality analysis device.The laser sources used in experiments are all single-mode beams, as the M 2 factor is commonly applied to the evaluation of the laser beam with good beam quality.When the M 2 >>1, there are indeed some limitations for the M 2 factor to evaluate the beam quality.

Phase retrieval by transport of intensity equation
Assuming that a laser beam is propagating along the z axis, and the complex amplitude can be expressed as ( )  .The derivative of intensity along the beam propagation direction z contains phase information that can be retrieved via TIE [31]: Expanding the right hand side of Eq. ( 1), we obtain where k is the wave number 2 / π λ .I(r) is the intensity.∇ denotes the gradient operator over the transverse direction r which is normal to the beam propagation direction, and ( ) r φ represents the phase of the beam.Zuo et.al [26] have presented an efficient numerical algorithm based on the fast discrete cosine transform (DCT) for quantitative phase retrieval in the field of microscopy.In this paper, we apply the DCT method to the phase retrieval of laser beam and reconstruct the complex amplitude for dynamic beam quality M 2 factor measurement.
Assuming that the region to be tested is a general open and bounded domain 2 R Ω ⊂ with a piecewise smooth boundary ∂Ω .The intensity distribution I is a continuous, non-negative function defined on the enclosure Ω and is smooth and strictly positive in Ω .The phase φ is expected to be single-valued and smooth in Ω .Before deriving a solution to the TIE, the issues concerning its solvability (well-posedness) and the uniqueness of the solution must be addressed.The classic theory of elliptic partial differential equation states that the uniqueness of the TIE solution subject to certain boundary conditions [26].According to the classic theory of elliptic partial differential equation, the solution of the TIE relies on certain boundary conditions [32] -the Neumann boundary conditions, which can be expressed as Here g is a smooth function on the boundary ∂Ω , and n The solution of the TIE is unique or unique up to an arbitrary additive constant.
Then, an auxiliary function ψ is introduced as suggested by Teague [31], which satisfies ) According to reference [26], the solution to TIE under non-uniform intensity distribution can be expressed by following fomula

DCT x DCT y DCT
Hence, the complex amplitude can be given by the combination of the recovery phase and amplitude distribution of the test laser beam.Here we should mention that, the reconstructed phase can be located at any cross-section position within two Rayleigh lengths on either side of the beam waist along the optical axis.

Determination of beam quality M 2 factor with complex amplitude
Once one can obtain the complex amplitude distribution of the test laser beam, the detailed complex amplitude distribution after propagation distance z can be calculated according to the scalar diffraction theory [25].In the framework of scalar diffraction theory, the physical process of light propagation can be strictly expressed by Kirchhoff formula, Rayleigh-Sommerfeld formula or angular spectrum transmission formula.As we all know, both of the Kirchhoff and Rayleigh-Sommerfeld diffraction transfer functions need a large amount of computation, while the angular spectrum formula is an analytic formula with just a few amount of calculation.Thus, it is advisable to calculate the complex amplitude using the angular spectrum formula: where G 0 (f x ,f y ) is the the frequency function of the reconstructed complex amplitude U(x,y,0).
( ) ,, 0 .ex p 1  is a phase delay factor, which can also be called the angular spectrum transfer function.Similary to the traditional measurement process of the M 2 factor, as described in ISO11146-1 [8], the calculated complex amplitude U(x,y,z) can be used to determine the beam intensity distribution instead of the traditional measurement way by moving a CCD.Then calculating the beam widths x ω and y ω by second-order moments algorithm and performing a hyperbolic fit to the beam widths along the beam propagation axis, ( ) ( ) where A, B, C are the hyperbola fitting coefficients.Finally the beam quality factor M 2 x and M 2 y can be calculated with the following fomula:

Simulation results
The computer simulations are performed under the environment of Virtuallab Fusion ® which is a modeling and design software based on unified optical modeling approach called field tracing.In the process of simulation, we select the Gaussian beam as the emergent light source and perform the field tracing in free space.The intensity and phase distributions of a beam spot at arbitrary section position along the propagation direction are obtained by a camera dectector.
The schematic diagram of the field tracing process of Gaussian beam is depicted in Fig. 2. As is shown in Fig. 2, two beam intensity images along the optical axis are captured by a camera detector.The beam spot (a) is located near the beam waist, while the spot (b) is slightly away from the waist and has an axial distance z Δ with spot (a).Then the intensity data of these two beam spots are exported from the simulation software for the phase retrieval using the TIE algorithm.Since these are numerical experiments, there is access to the true phase and hence the root-mean-square-error (RMSE) of the reconstructions can be computed.
In the ideal case without noise, the axial acquisition distance z Δ is smaller, the recovery phase is closer to the true phase.With the increase of the axial distance z Δ , the nonlinear error will also become large and the accuracy of the phase retrieval will be reduced.Figure 3 shows the reconstructed phase distributions and the phase errors between the true phase and the reconstructed values when the axial distances are 0.1mm, 10mm, 100mm, and 500mm, respectively.The RMSE values of the phase errors are listed in Table 1.According to above analysis, we can see that the RMSE values of the phase errors accrete with the increase of the axial distance between the beam spots.It is apparent that the axial distance should be reduced as much as possible under the ideal condition without noise.Yet the measured process data always mix with noise ineluctably.In actual experiments, we may resist outside stray lights erntering the CCD, but not completely eliminate the shot noise and thermal noise from the CCD.Thus, under the condition of noisiness, the axial distance z Δ must be large enough to ensure that the axial differential information resulting from two intensity images will not be submerged in noise.
In order to improve the signal-to-noise ratio (SNR) of the axial differential image, the axial distance of beam spots has to be increased.However, as mentioned earlier, with the increase of the axial distance, the nonlinear error will also become more apparent.Therefore, it is necessary to seek an optimal axial distance by making a trade-off between the noise and the nonlinear error.
Considering that the SNR of the CCD used in the experiment is 38.4db, and other noises may be introduced in actual experiments, we add the white Gaussian noise with different SNRs (38.4db, 30db, 25db, respectively) to these two beam intensity images.Then gradually increasing the axial spacing between the beam spots, analysing the changes of the recovery-phase errors and searching the best axial distance.Figure 4 illustrates the changes of the RMSE values of the phase errors with the increase of the axial acquisition distance and demonstrates that the best axial distance will become larger when adding white Gaussian noise with smaller SNR to the beam intensity images.

Experimental verification and discussion
The feasibility and the measurement accuracy for the laser beam quality of the proposed method are experimentally demonstrated.The optical setup in Fig. 5 consists of a laser source and a beam spots acquisition module that enable two simultaneous acquisition of the beam intensity images in different section positions along the optical axis.The characteristic parameters of He-Ne laser are listed in Table 2.As is shown in Fig. 5, the output beam firstly passes through a polarizer by which some light energy will be attenuated as the laser light source is linearly polarized light.Then it continues to pass through a focusing lens (FL, f = 175mm), which contributes to the great shortening of the Rayleigh length of the laser beam.A beam splitter (BS) is used here to divide the beam and guide the replicas into the two identical CCDs located at different positions along the beam propagation direction.The calibrated beam-splitting ratio of which is about 5.01:4.99.Particularly, the CCD-1 is located near the beam waist and the CCD-2 has a axial distance z Δ with the CCD-1.It is worth noting that the transmitted light and reflected light divided by the BS are mirror images of each other.Thus, the reflected beam intensity image needs to be flipped horizontally in the numerical computations.The type and characteristic parameters of the CCD are shown in Table 3.Through numerical simulations, we find that the range of optimal axial acquisition distance is from 10mm to 100mm.Based on the results obtained in Fig. 4, we adjust z Δ from 25mm to 75mm in the experiment.It is noted that with the TIE algorithm, one may accurately reconstruct the low-frequency phase, but suffer from the problem of high-frequency phase retrieval when the axial acquisition distance z Δ is large [33].However, since the phase of the test laser beam contains the majority of low-frequency information but very few high-frequency information, it can be recovered correctly even when the maximum axial acquisition distance is 75mm.Make sure that the CCD-1 is immovable, and another one is moved with a fixed distance away from the waist during each acquisition process, which is depicted in Fig. 6.By the synchronous acquisition system consisting of two identical CCDs shown in Fig. 5, two intensity images at different cross-section planes along the optical can be acquired simultaneously.Then the beam quality M 2 factor can be rapidly determined through the numerical computation.It is worth mentioning that the time taken from the intensity image acquisition to the M 2 value determination is only about 0.5s and the measurement time is independent of the beam quality.Furthermore, to guarantee the validity of experimental results, we continuously acquire and preserve 10 sets of beam intensity images at equal time interval in each measurement and calculate the mean values of the M 2 factor.The M 2 values are shown in Figs. 7. To validate the measurement accuracy of the proposed method, the results are compared to the values measured by the beam propagation analyzer which conforms to the ISO standard.The measurement accuracy for the M 2 value of the beam propagation analyzer can be up to ± 5% and we get the beam quality factors M 2 x = 1.025 and M 2 y = 1.015, which can be roughly regarded as the ground truth.Figure 8 shows the measurement errors of M 2 values of He-Ne laser.Thus, the maximum measured deviation from the proposed method is 7% for M 2 x and 5% for M 2 y .This result demonstrates the validity of the method.The experimental setup for determining the beam quality of the high-power tunable fiber laser is shown in Fig. 9, which mainly consists of a laser attenuation module and a beam spots acquisition module.The wavelength of the output beam is 1070nm.The BS used here is applicable to the near infrared laser beam, and its calibrated beam-splitting ratio is about 5.02:4.98.In addition, the Basler CCD has no high responsibility to the near infrared laser, but what we need in the experiment is the differential information resulting from two beam intensity images, which is not affected by the responsibility of the CCD camera.Because of the characteristics of the fiber, the beam quality factor M 2 may change with the enhancement of output power.Therefore, it is necessary to measure M 2 factor at different laser powers.Figure 10 illustrates the phase retrieval process under the different laser powers.In the process of the experiment, since the power has been chosen as the independent variable, the distance between two axial beam spots should remain constant.By repetitious experiments, we finally selected a suitable axial distance, 25 , as the fixed distance between these two CCDs.Similar to the measurement process of the He-Ne laser, we continuously acquire and preserve 10 sets of beam intensity images at equal time interval and calculate the mean values and errors of M 2 factor in each measurement.In addition, the beam propagation analyzer is utilized to determine the beam quality every time when capturing beam spots as shown in Fig. 9.The results for the measurement of the beam propagation ratio M 2 using the proposed method and the beam propagation analyzer conforming to ISO standard method are compared in Fig. 11  Here we can see that the M 2 value measured by the beam propagation analyzer increases along the x axis while the power boots up.Distinctively, for y axis, it first increases then decreases.We conclude which is possibly due to the following reasons: the beam propagation analyzer does not measure the beam quality in real time.The instability of beam intensity will affect the accuracy of the measurement results and yield the fluctuations of the measured M 2 values.Thus, the trends of the values measured by the beam propagation analyzer may be inconsistent in the x and y directions.
Figure 12 shows the measurement errors of M 2 values of fiber laser.Hence, in the case of above contrast result, we obtain that the maximum measured deviation from the proposed method is 9% for M 2 x and 6% for M 2 y .As mentioned before, the optimum axial distance is between 10mm and 100mm.In this case, we have tried to acquire beam intensity images and calculate beam quality M 2 factor under different axial acquisition distances, and the calculation results are nearly the same.
It is worth noting that the M 2 value is independent of the position of CCD-1.Under the condition that the spot size will not be out of the sensor area of CCDs, the CCD-1 can be placed at any cross-section position along the optical axis which is within two Rayleigh lengths on either side of the beam waist according to ISO standard.To verify this conclusion, we have performed experiments.Keep the other elements in the experimental system stationary, and move CCD-1 and CCD-2 at a equal distance in the same direction along the optical axis and the axial acquisition distance is still 25mm.Then calculating the M 2 values under the different laser powers.The comparison results before and after moving CCDs are shown in Fig. 13.Known from the above figures, after moving CCDs, the maximum deviation of M 2 values determined by proposed method is 0.6% for M 2 x and 0.5% for M 2 y , which demonstrates that the M 2 value will not change although the position of CCD-1 changes.
In summary, the deviations in the M 2 x and M 2 y factors are mainly caused by these factors: (1) the calculation accuracy of the algorithm; (2) the axial acquisition distance (optical path difference) and the accuracy of optical path difference; (3) aberrations and noises; (4) the consistency of beam intensity acquired by two CCDs; (5) the characteristics of the laser source; etc.In view of these factors, we will try to reduce the error from the following aspects in future research work.
(1) Improve the algorithm for numerical computation.As it is found that the algorithm itself would result in almost 2% error through related numerical simulations.
(2) Try to calculate the optical path difference between two beam intensity images more accurately, and improve the accuracy of the optical path difference.
(3) Reduce the influence of noise on the measurement results by utilizing relevant algorithm, e.g., the algorithm based on the Savitzky-Golay differentiation filter theory.
(4) The current experimental system acquires beam intensity images simultaneously with two CCDs, which may result in the inconsistency of these two intensity images and cause large errors.Thus, in subsequent research work, we will try to use one CCD instead of two CCDs to acquire two beam intensity images at different cross-section positions along the optics axis simultaneously.

Conclusion
In this work, we present a real-time method to obtain the complex amplitude and calculate the beam quality M 2 factor based on the TIE technique.The absolute phase can be rapidly recovered by solving the TIE and the complex amplitude of the test laser beam is directly reconstructed without a complex optical system or strict experimental environment.Then the beam intensity distributions at various longitudinal planes along its propagation direction can be obtained according to the diffraction integral theory and the beam quality M 2 factor is therefore calculated using the ISO standard method.The benefits of this approach are its experimental simplicity and the capability to perform measurements in real time, without time-consuming numerical analysis.Furthermore, this method is suitable for characterizing the beam quality of the dynamic laser system.

Fig. 1 .
Fig. 1.The schematic diagram of phase retrieval and M 2 factor calculation.(a)(b) the axial intensity images at two different longitudinal positions, (c) the phase retrieval by TIE, (d) the reconstructed intensity distribution at any selected plane, (e) performing a hyperbolic fit to the beam widths and calculating the M 2x,y .
long as the beam intensity ( ) I r is obtained by a CCD and the phase ( ) r φ is recovered with the TIE technique, it is possible to calculate the beam quality.

Fig. 2 .
Fig. 2. The schematic diagram of the field tracing process of Gaussian beam.

Fig. 4 .
Fig. 4. The RMSE values of phase errors with different axial acquisition distances when adding white Gaussian noise with different SNRs to the intensity images.

Fig. 6 .
Fig. 6.The phase retrieval process of the He-Ne laser with different axial acquisition distances.

Fig. 7 .
Fig. 7.The calculated M 2 values of He-Ne laser with different axial acquisition distances.

Fig. 8 .
Fig. 8.The measurement errors of M 2 values of the He-Ne laser.

Fig. 10 .
Fig. 10.The phase retrieval process of the fiber laser under the different laser powers.

Fig. 11 .
Fig. 11.The comparison results of M 2 values of the fiber laser determined by proposed method and beam propagation analyzer, respectively.(a) M 2 x , (b) M 2 y .

Fig. 12 .
Fig. 12.The measurement errors of M 2 values of the fiber laser.

Fig. 13 .
Fig. 13.The comparison results of M 2 values of the fiber laser determined by proposed method before and after moving CCDs, respectively.(a) M 2 x , (b) M 2 y .