• No se han encontrado resultados

Simulated Annealing for Obtaining Contribution Coefficients of Laguerre Gauss Beams in Light Profiles Using Finite Bases

N/A
N/A
Protected

Academic year: 2020

Share "Simulated Annealing for Obtaining Contribution Coefficients of Laguerre Gauss Beams in Light Profiles Using Finite Bases"

Copied!
100
0
0

Texto completo

(1)Instituto Tecnologico y de Estudios Superiores de Monterrey Monterrey Campus. School of Engineering and Sciences. Simulated Annealing for Obtaining Contribution Coefficients of Laguerre-Gauss Beams in Light Profiles Using Finite Bases A thesis presented by. Iván Villalobos Martı́nez Submitted to the School of Engineering and Sciences in partial fulfillment of the requirements for the degree of. Master of Science in. Computer Science. Monterrey, Nuevo León, September, 2019.

(2)

(3)

(4)

(5)

(6)

(7) Dedication. To my parents Octavio and Mary Tony. Thanks for all your unconditional confidence, support, patience, and encouragement. You were my main motivation for pushing through this work.. v.

(8)

(9) Acknowledgements. First and foremost, I would like to express my deepest gratitude to my Co-Advisor, Raúl Ignacio Hernández Aranda, a professor who has been passing his knowledge onto me since early career years. I would also like to thank my Advisor, Manuel Valenzuela Rendón, for helping me and motivating me to push forward with this work. I also want to thank all those who have been side by side with me along the long hours at night. Thanks to Tecnológico de Monterrey for the support on tuition, and to CONACyT for the living support.. vii.

(10)

(11) Simulated Annealing for Obtaining Contribution Coefficients of Laguerre-Gauss Beams in Light Profiles Using Finite Bases by Iván Villalobos Martı́nez Abstract The thesis that is being presented is for the masters in Computer Science. Laguerre-Gauss (LG) beams are an orthogonal family of optical beams that constitute a solution to the paraxial wave equation with azimuthal symmetry. These beams present applications on different areas, such as lithography, microscopy, spectroscopy, and classic and quantum communications. Specifically in the field of communications, the need to transmit large amounts of information has led to the study of different properties of light, such as its polarization, wavelength, intensity, and orbital angular momentum (OAM), to mention a few. It is widely known that LG beams have an intrinsic OAM, directly related to their angular mode. The OAM degree of freedom has been employed for information encoding in free space communications, taking advantage of the fact that the basis states of OAM span an infinite dimensional Hilbert space. Superpositions of OAM states, namely helical LG beams, can be constructed to encode and transmit information, however for this technique to be successful one should also be able to completely reconstruct the optical field as well as its OAM density distribution. Therefore, the particular problem that is addressed corresponds to the modal decomposition of an optical beam in the OAM basis, which consists on determining the contribution that each individual LG beam mode, chosen from a finite basis, has on the composition of an arbitrary light profile, and through the application of a simulated annealing algorithm. This problem is addressed in order to have the possibility of performing experiments which involve the transmission of information encoded in the OAM of LG beams. There are different approximations that have been done in the past, some examples include: Hankel fractional transform, modal classification, and projective phase-flattening measurement. The approximation that is presented in this thesis uses a simulated annealing algorithm to obtain a reliable representation of an arbitrary light profile. Also, the uniqueness of the solutions, considering small errors and finite bases, will be studied. The main results indicate that for the superposition of 98 base functions, using matrices of 128 by 128 elements, the simulated annealing algorithm is capable of obtaining good solutions, using only around 4 minutes. It has been shown that, if a small error is to be accepted, there is no uniqueness in the solution. Also, the results bring to light that the algorithm, with the specifications used for this thesis, is capable to have a good performance under the presence of white gaussian noise across the whole transverse section of the original complex beam, since it can provide a solution which is similar to the original complex beam without white gaussian noise.. ix.

(12)

(13) List of Figures 2.1 2.2. Laguerre-Gauss modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Phase of Laguerre-Gauss modes. . . . . . . . . . . . . . . . . . . . . . . . .. 4.1. Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Particle Swarm Optimization algorithm. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . . . . . . . . . Best found curve for the performance of the Particle Swarm Optimization algorithm. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . . . . Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Genetic Algorithm. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Best found curve for the performance of the Genetic Algorithm. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Basic Simulated Annealing. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . Best found curve for the performance of the Basic Simulated Annealing. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Basic Simulated Annealing for case number 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Basic Simulated Annealing for case number 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Basic Simulated Annealing for case number 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4.2. 4.3. 4.4. 4.5. 4.6. 4.7. 4.8. 4.9. xi. 12 12. 26. 27. 28. 29. 31. 32. 33. 33. 34.

(14) 4.10 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Basic Simulated Annealing for case number 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11 Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Simulated Annealing with New Neighbors. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . . . . . . . . . 4.12 Best found curve for the performance of the Simulated Annealing with New Neighbors. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . . . . 4.13 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with New Neighbors for case number 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with New Neighbors for case number 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with New Neighbors for case number 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.16 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with New Neighbors for case number 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.17 Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Simulated Annealing with Higher Initial Temperature. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . 4.18 Best found curve for the performance of the Simulated Annealing with Higher Initial Temperature. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . 4.19 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Higher Initial Temperature for case number 1. . . . . . . . . . . . . . . . . . . . . . . 4.20 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Higher Initial Temperature for case number 2. . . . . . . . . . . . . . . . . . . . . . . 4.21 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Higher Initial Temperature for case number 3. . . . . . . . . . . . . . . . . . . . . . . 4.22 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Higher Initial Temperature for case number 4. . . . . . . . . . . . . . . . . . . . . . . xii. 34. 35. 36. 37. 37. 38. 38. 39. 40. 41. 41. 42. 42.

(15) 4.23 Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Simulated Annealing with Complex Weights. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . . . . . . . 4.24 Best found curve for the performance of the Simulated Annealing with Complex Weights. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . . . . 4.25 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Complex Weights for case number 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.26 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Complex Weights for case number 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.27 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Complex Weights for case number 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.28 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Complex Weights for case number 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.29 Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Simulated Annealing with Gaussian Noise. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . . . . . . . . . 4.30 Best found curve for the performance of the Simulated Annealing with Gaussian Noise. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . . . . . . . 4.31 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Gaussian Noise for case number 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.32 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Gaussian Noise for case number 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.33 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Gaussian Noise for case number 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.34 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Gaussian Noise for case number 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.35 Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Simulated Annealing with Exaggerated Gaussian Noise. The amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4. . . . . . . . . . . . . . . . xiii. 43. 44. 45. 46. 46. 47. 48. 49. 50. 50. 51. 51. 53.

(16) 4.36 Best found curve for the performance of the Simulated Annealing with Exaggerated Gaussian Noise. A step of 200 pints is used to show the error bars of only some parts. The error bars were generated with one standard deviation. The y-axis of the graph is in arbitrary units (A.U.). . . . . . . . . . . . . . . 4.37 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Exaggerated Gaussian Noise for case number 1. . . . . . . . . . . . . . . . . . . . . . . . 4.38 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Exaggerated Gaussian Noise for case number 2. . . . . . . . . . . . . . . . . . . . . . . . 4.39 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Exaggerated Gaussian Noise for case number 3. . . . . . . . . . . . . . . . . . . . . . . . 4.40 Power Map of the weights used for the original function and the weights used for the reconstructed functions for the Simulated Annealing with Exaggerated Gaussian Noise for case number 4. . . . . . . . . . . . . . . . . . . . . . . .. xiv. 54. 55. 55. 56. 56.

(17) List of Tables 4.1. Statistics for time taken for the Particle Swarm Optimization algorithm to finish 10,000 iterations, along with statistics for errors in field, amplitude, and phase. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Statistics for time taken for the Genetic Algorithm to finish 10,000 iterations, along with statistics for errors in field, amplitude, and phase. . . . . . . . . . 4.3 Comparison of Particle Swarm Optimization (PSO) and Genetic Algorithm (GA) on different variables that can be of interest, according to the results presented. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Statistics for the total time taken for the Basic Simulated Annealing to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found. . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Statistics for the total time taken for the Simulated Annealing with New Neighbors to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found. . . . . . . . . . . . . . . . 4.6 Statistics for the total time taken for the Simulated Annealing with Higher Initial Temperature to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found. . . . . . . . . . 4.7 Statistics for the total time taken for the Simulated Annealing with Complex Weights to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found. . . . . . . . . . . . . . . . 4.8 Statistics for the total time taken for the Simulated Annealing with Gaussian Noise to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found. . . . . . . . . . . . . . . . 4.9 Statistics for the total time taken for the Simulated Annealing with Exaggerated Gaussian Noise to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found. . . . . . . . . . 4.10 Comparison of Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Simulated Annealing (SA), and Final Simulated Annealing (FSA) on different variables describing their performance. . . . . . . . . . . . . . . . . . . . . . A.1 Some of the most basic Associated Laguerre Polynomials . . . . . . . . . . .. xv. 25 28. 30. 31. 35. 39. 43. 48. 52. 58 64.

(18)

(19) Contents Abstract. ix. List of Figures. xiv. List of Tables. xv. 1. 2. 3. Introduction 1.1 Introduction and Motivation 1.2 Problem Definition . . . . . 1.3 Justification . . . . . . . . . 1.4 Hypothesis . . . . . . . . . 1.5 Objectives . . . . . . . . . . 1.5.1 Particular Model . . 1.6 Organization . . . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. . . . . . . .. 1 1 2 4 4 4 5 5. Literature Review 2.1 Related Works . . . . . . . . . . . . 2.2 Theoretical Framework . . . . . . . 2.2.1 Electromagnetic Waves . . . 2.2.2 Particle Swarm Optimization 2.2.3 Genetic Algorithms . . . . . 2.2.4 Simulated Annealing . . . . 2.2.5 Memetic Algorithms . . . . 2.2.6 Modal Decomposition . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. . . . . . . . .. 7 7 8 8 11 13 14 15 16. Implementation Details 3.1 Particle Swarm Optimization . . 3.1.1 Particle Best . . . . . . 3.1.2 Global Best . . . . . . . 3.1.3 Updating Positions . . . 3.2 Genetic Algorithm . . . . . . . 3.2.1 Selection . . . . . . . . 3.2.2 Crossover . . . . . . . . 3.2.3 Mutation . . . . . . . . 3.3 Basic Simulated Annealing . . . 3.3.1 Generation of Neighbors. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. . . . . . . . . . .. 19 19 19 20 20 20 20 20 21 21 21. . . . . . . . . . .. . . . . . . . . . .. xvii.

(20) 3.4 3.5 4. 3.3.2 Variation of Temperature . . . . . . . . . . . . . . . . . . . . . . . . Evolution of Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . . Experimental Data Collection . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . .. 23 25 25 27 29 30 30 34 38 43 47 52 57 57. Conclusions 5.1 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 59 60. A Laguerre Polynomials A.1 Associated Laguerre Polynomials . . . . . . . . . . . . . . . . . . . . . . .. 63 64. B Spatial Light Modulator. 65. C Code for Custom Simulated Annealing. 67. Bibliography. 77. 5. Experiments, Results, and Analysis 4.1 Population Based Methods . . . . . . . . . . . . . 4.1.1 Particle Swarm Optimization . . . . . . . . 4.1.2 Genetic Algorithm . . . . . . . . . . . . . 4.1.3 Comparison of Population Based Methods 4.2 Simulated Annealing . . . . . . . . . . . . . . . . 4.2.1 Basic Simulated Annealing . . . . . . . . . 4.2.2 New Neighbors . . . . . . . . . . . . . . . 4.2.3 Higher Initial Temperature . . . . . . . . . 4.2.4 Complex Weights . . . . . . . . . . . . . . 4.2.5 Noisy Original Function . . . . . . . . . . 4.2.6 Exaggerated Noise . . . . . . . . . . . . . 4.3 Analysis of the Results . . . . . . . . . . . . . . . 4.3.1 Comparison of Algorithms . . . . . . . . .. 21 21 22. xviii. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . ..

(21) Chapter 1 Introduction 1.1. Introduction and Motivation. In different areas of research and industry, such as lithography, microscopy, and communications, structured light plays a vital role [1]. In the latter, the different degrees of freedom of light such as its amplitude, frequency, polarization, and momentum are key to have availability to send greater amounts of information. In addition to this, the orbital angular momentum (OAM) is another feature that can be encoded to send information. This is why the determination of OAM modes in a light profile is a well-studied area [1, 2, 3]. Given the relevance of structured light, and particularly of OAM, this phenomena has been extensively studied in the past [4, 5, 6]. In addition to this, the application of intelligent computing for the modal decomposition of structured light has potential applications both in research and in industry. In the research area, any project that includes information encoding in structured light is benefited by a modal decomposition process. In the area of industry, these procedures could be used for the characterization of real fields after deformations introduced by the sending of information. The problem in modal decomposition exists when information is sent through a medium which degrades the quality of the transmitted information. Since the medium where the information is sent is not perfect, the light sent acquires what is known as noise, which deteriorates the integrity of the information, usually by deforming the complex field, and therefore its amplitude and phase [7]. Although at present there are different techniques to determine the modes of OAM present in a light profile, each one has different complications, among them are the following: the solutions assume that diverse specialized equipment is available, which is not necessarily true for all laboratories; the solutions do not have sufficient reliability; and the solutions assume that symmetric functions are handled. There are other techniques that have also been applied previously, but that are fundamentally different from what is proposed in this work, since they take advantage of the existence of optical elements or theoretical techniques to obtain the desired results [2, 3, 8, 9]. Intelligent algorithms have also been used, but for different beam shaping problems than the one under consideration. The solution model that is being proposed consists in using a simulated annealing algorithm for the determination of OAM contributions in a finite basis of Laguerre-Gauss (LG) functions, since these are widely known to carry OAM. A simulated annealing algorithm computationally replicates the process of slow cooling 1.

(22) 2. CHAPTER 1. INTRODUCTION. of steels in industry. In general, the algorithm is divided into three different steps: generating neighbors, evaluating a solution, and deciding whether to accept the new solution. In the first one, we start by proposing a generally random solution, and then we look for a neighbor in the solution space. In the next step, we have an objective function, with which the new solution obtained with the neighbor is evaluated. Finally, there is a probability of accepting a new solution even if it is worse than the previous one, and if it is better, it is accepted with a 100% probability. This process usually continues until the temperature (a parameter that controls the probability of acceptance of new solutions) decreases to a certain value, or until some predetermined stop condition is satisfied [10]. The advantages offered by a simulated annealing algorithm with respect to other existing algorithms is that it does not necessarily depend on initial parameters outside the algorithm to have a convergence. Likewise, a solution based on simulated annealing can be easily implemented for new problems, and it has been stated that this algorithm can be considered as one of the most flexible and applicable algorithms that exist [11]. Another advantage that these algorithms present is their flexibility with respect to the type of problem they face, since there are methods by which one can have fast convergence, treatment of evaluation functions difficult to carry out, to mention a few [12, 13]. The main motivation of the research is that wavefront reconstruction of optical fields has become an important task in many domains of optics, such as astronomy, microscopy, ophthalmology, and opththalmoscopy [14]. In addition to this, vortex beams, which are known to contain a well-defined OAM per photon, have applications in different research areas, such as optical tweezing, laser material surface processing, quantum entanglement, optical communication, image procession, and quantum metrology [15]. Particularly, modal decomposition is an elegant approach to characterize optical fields, where the measurement of a set of corresponding modal expansion coefficients allows the determination of the amplitudes and phases of the modes that compose the beam. Discrete modes appear in systems such as laser resonators and optical fibers. Nonetheless, there are limitations to the theoretical approach, when certain conditions are met, which will be discussed later on. Thus, there is a need for different strategies to apply modal decomposition in presence of said conditions [14].. 1.2. Problem Definition. The modal decomposition of a beam of light has different complications when the field under consideration is not an ideal one, or does not possess a convenient symmetry. In the ideal case, there are no sources of noise or disturbances that can affect the signal generated in a laser (or superposition of several lasers), so analytic methods can be used to separate a beam into its orthogonal components. In the case where there is no ideal situation, there may be several sources that introduce noise to the signal to be separated. Applying an analytic method to this distorted signal would yield the existence of high-order terms in the superposition that are not necessarily in the finite basis that is used (the noise is usually reflected in special high-frequency components), which is far from the original composition [16]. The modal decomposition, or in general the orthogonal decomposition, has been widely studied. In general, any function in N dimensions can be represented in terms of an orthogonal.

(23) 1.2. PROBLEM DEFINITION. 3. base, where each element of the base has an associated value, known as weight. This weight indicates the importance of a term in the original function. The analytical form consists on calculating the internal product (of continuous functions in this case) between the original function and each of the functions that make up the orthogonal base. The disadvantage of this method is that it requires as many internal product calculations as weights we want to find [16]. Applying the analytical method mentioned in a specialized software has its challenges. The resolution of the mesh that describes the functions must be small enough to have adequate results, this is, the value of the weights corresponding to the functions of the base depends on the resolution of the mesh. Similarly, there are different methods to calculate the integral needed in the internal product, such as using trapezoids (and its extension to N dimensions) or using flat lines (and its extension to N dimensions) [17]. Then, measuring the OAM in light profiles in a reliable way can open the door to a new way of encoding information in lasers. What we want to achieve is to have a reliable way to determine the contribution of each element of a finite base of LG beams in an arbitrary light profile in both amplitude and phase, i.e. minimize the error in obtaining the coefficients with respect to the original profile. In general, one has a function F (r, θ) that one wants to express on a finite basis with a minimum error, this is F (r, θ) =. X. k∈D,. wk LGk ,. (1.1). k. where D is the set of integer pairs (e.g. 00, 31, 42) that represent the functions included in the base. The representative quantities of a beam that are simple to obtain in a laboratory are the amplitude and the phase. These two quantities are defined as follows for an arbitrary complex field U : √ (1.2) A = |U | = U × U ∗ ,. Φ = tan. −1. . =(U ) <(U ).  ,. (1.3). where |U | indicates the module of U and U ∗ indicates the conjugate complex of U , and < and = indicate the real and imaginary part of an argument, respectively. Therefore, we seek to find the weights wk that minimize the error in the field between the function F (r, θ) and P k wk LGk , which at the same time minimize the error in amplitude and phase. For this problem, a solution based around a simulated annealing algorithm is developed. The algorithm will receive as an input a complex matrix (composed of real and imaginary part for each element of the matrix) and will return as an output two matrices indicating the weights found for each of the orthogonal basis functions. The output consists of two matrices due to the nature of Laguerre-Gauss beams, where there is a quantity called topological charge, which can be positive or negative. The main contributions are the specifications for the simulated annealing algorithm that has an overall good performance, along with a new technique to perform modal decomposition in the presence of noise..

(24) 4. CHAPTER 1. INTRODUCTION. 1.3. Justification. Given the above, there is a need to find a way to carry out the modal decomposition of a beam in the presence of noise in a precise manner, and that is not limited to the amount of weights that we want to obtain, nor by the resolution of the mesh where the functions are generated. Specifically, the algorithm to be programmed will be carried out with applications in the area of research with laser systems in mind. The final product will be an algorithm capable of doing modal decomposition in a distorted beam using a maximum number of elements of an orthogonal base. The approach will be through artificial intelligence, and will move away from analytical methods. Given enough time, other methods to solve the problem exist, such as Genetic Algorithms [18], Memetic Algorithms [19], and Particle Swarm Optimization [20, 21] to mention a few. An algorithm based on Simulated Annealing is the predilect choice due to the ease of coding and implementation, and due to its ability to handle quite complex cost functions and constraints [22]. Genetic Algorithms and Memetic Algorithms are unfeasible due to the high time required to find a good result; while Particle Swarm Optimization seems to have a poor performance. A solution based on Genetic Algorithms is presented, although it has poor quality, and is considerably less time efficient than the other solutions presented. Consequently, Memetic Algorithms would be even less efficient, due to the extra local search that they present.. 1.4. Hypothesis. The modal decomposition with and without noise in a beam can be carried out by intelligent algorithm techniques, such simulated annealing. The research questions are the following: • Can modal decomposition be done with a solution based on the simulated annealing algorithm? • Is the proposed technique immune to the problems presented by conventional methods? • Is the proposed technique efficient in time? • Are the solutions found unique? • What are the applications of the proposed technique in other areas of experimental optics?. 1.5. Objectives. The general objective of this thesis project is the application of a simulated annealing algorithm to obtain beam contribution coefficients formed by a superposition of Laguerre-Gauss functions in an arbitrary light profile. The final algorithm must be immune to the problems of existing methods. The particular objectives to fulfill in this research work are the following:.

(25) 1.6. ORGANIZATION. 5. • Compare the performance of the simulated annealing algorithm against classical algorithms. • Determine if the solutions found for the weights are unique within a tolerance range. • Explore the applicability of the solution based on the algorithm of simulated annealing in finite bases of different families.. 1.5.1. Particular Model. The proposed technique consists on the application of a simulated annealing algorithm for modal decomposition with and without noise, without considering analytical methods, due to the problems that, as we saw, they present. The simulated annealing algorithm will compare the final solution against the original function, and will determine the error between these two quantities. The different parameters of the simulated annealing algorithm will be adjusted to attack this particular problem, but all the values, conditions, and methods that are used will be specified.. 1.6. Organization. The document is organized as follows: Chapter 2 shows the literature review and the theoretical framework, including the works with greater relation to what is presented in this document, along with all the theory necessary for the understanding of this work; Chapter 3 shows the methodology, which includes what and how will be conducted, specifying the most important points of the data collection and the algorithm that is used; Chapter 4 shows the results and their discussion, where the most important and most impactful results that were obtained by the research are mentioned, and the most important aspects of the results and what can be improved. Finally, Chapter 5 shows the conclusions together with possible future work, and recapitulates the most important points of the thesis..

(26)

(27) Chapter 2 Literature Review In this chapter, all of the related works that were found will be presented briefly, mentioning mainly what the authors did, and some of their claims. Also, an overall framework on the different subjects that are needed for understanding this work will be presented (such as the deduction of the so-called Laguerre Gauss beams, and the operation of different optimization algorithms, some of which were implemented and have reported results), in the form of a Theoretical Framework.. 2.1. Related Works. Ways of determining the contribution of LG beams in arbitrary profiles in theoretical form have been proposed. Alieva and Bastiaans [2] present an analysis of the relationship of LG modes with Hankel fractional transformations, where they show that the LG spectrum of a rotationally symmetric beam can be determined by its fractional Hankel transform on the optical axis. A more experimental approach through the use of optical elements was carried out by Lavery et al. [3]. In their work, they present the construction of a mode classifier to perform geometric optical transformations, taking the OAM components to plane waves with a transverse phase gradient. Similarly, El-Agmy et al. [8] use adaptive diffractive phase elements for the Beam Shaping area. Their approach is based on using a deformable mirror, combined with a Simulated Annealing algorithm. The Simulated Annealing algorithm adjusts the control voltages of 37 independent electrodes of the mirror iteratively to reduce the variance between the shape of the beam, and the desired shape of the beam. Their results indicate that the system is able to adaptively create Gaussian beams that approach the desired parameters. Continuing with the use of diffractive phase elements (DPE), Zhou et al. [9] use a hybrid of Genetic Algorithms and local search based on gradients for the design of the optical elements mentioned for the Beam Shaping area. Their approach is more general, in the sense that they use a generalization for the DPEs and divide it into two: an element to modulate amplitude, and another to modulate phase. On the other hand, Qu et al. [23] attack the problem that only the sampling points are controlled by the algorithms of optimization in the design of adaptive optical elements (DOE), while other points are far from the ideal distribution. For this they use a modification of the 7.

(28) 8. CHAPTER 2. LITERATURE REVIEW. Gerchberg-Saxton algorithm, where they use a finer mesh for the output plane. They make the design of a DOE in two dimensions for the area of Beam Shaping. Continuing, Qassim et al. [1] have a different experimental approach, using phase flattening. This technique consists of flattening the phase spiral of one mode, and coupling it to a single-mode fiber. The team studies the implications of the technique, and gives a quantification of the losses that are present due to communication that exists between different modes, reflected in energy losses. In further related work, we can see that Baumeister et al. [24] demonstrate the first integration of a deep learning architecture with model predictive control in order to self-tune a mode-locked fiber laser. This integration can build a dynamical model of the laser and appropriate control law for maintaining robust, high-energy pulses despite a stochastically drifting birefringence. They claim that the method advocated can be broadly applied to a variety of optical systems that require robust controllers. Also, Rivenson et al. [25] have demonstrated that a neural network can learn to perform phase recovery and holographic image reconstruction after appropriate training. They claim that this deep learning-based approach provides an entirely new framework to conduct holographic imaging by rapidly eliminating twin-image and self-interference-related spatial effects; and that this neural network based method is fast to compute and reconstructs phase and amplitude images if the objects using only one hologram, requiring fewer measurements in addition to being computationally faster.. 2.2. Theoretical Framework. The main application that will be given to modal decomposition is in the area of transmission of information with lasers, specifically applied to research purposes. Given the nature of the structured light and the approach by artificial intelligence that will be used for the problem, it is necessary to know about electromagnetic waves (especially those that contain orbital angular momentum), and about the operation of different algorithms, such as Particle Swarm Optimization, Genetic Algorithms, Simulated Annealing algorithm and Memetic Algorithms. Likewise, information will be given on the analytical solution that exists for the problem of modal decomposition.. 2.2.1. Electromagnetic Waves. Electromagnetic waves are the propagation through space, either in a vacuum or in some medium, of an electromagnetic field. Maxwell’s equations for vacuum are described as ∇·E=0 ∇·B=0 ∂B ∇×E=− ∂t ∂E ∇ × B = µ0 0 ∂t. (2.1). where E is the electric field, B is the magnetic field, 0 is the permittivity of empty space, and µ0 is the permeability of empty space [26]. Obtaining the rotational of the rotational of the.

(29) 2.2. THEORETICAL FRAMEWORK electric and magnetic fields, you get to the expressions   ∂B 2 ∇ (∇ · E) − ∇ E = ∇ × − ∂t  . ∂E 2 ∇ (∇ · B) − ∇ B = ∇ × µ0 0 ∂t. 9. (2.2). Knowing that the divergence of the electric and magnetic fields is 0, and that the rotational and temporal derivative operators are independent of each other, we have the following expressions ∂ 2E ∇2 E = µ0 0 2 ∂t (2.3) ∂ 2B 2 ∇ B = µ0 0 2 ∂t which have the shape of the wave equation, where µ0 0 is 1/c2 , being c the speed of light. Then, the generalization of the electromagnetic wave equation ψ(r, t) is   1 ∂2 2 ∇ − 2 2 ψ(r, t) = 0 . (2.4) c ∂t Helmholtz Equation The equation of an electromagnetic wave ψ(r, t) can be solved by separating variables. It is proposed ψ (r, t) = U (r) T (t) (2.5) where r is the spatial vector and t is the time. Introducing Eq. (2.5) in Eq. (2.4) you get 1 d2 T ∇2 U = 2 . U c T dT 2. (2.6). Since each side of the previous equation is independent of the other, we can say that this equation is valid if each side of the equation is equal to a constant. For convenience, this constant is chosen to be −k 2 , where it is later seen that k is the wave vector defined as k = 2π/λ, where λ is the wavelength. Then, the resulting equations of Eq. (2.6) are ∇2 U = −k 2 U . 1 d2 T 2 = −k c2 T dT 2 Rearranging the equations in Eq. (2.7) the Helmholtz equation is obtained  ∇2 + k 2 U = 0 and, knowing that ω = kc, the temporary dependence is obtained  2  d 2 +ω T =0. dt2. (2.7). (2.8). (2.9).

(30) 10. CHAPTER 2. LITERATURE REVIEW The most basic solution to the wave equation is the plane wave, which is described as ψ(r, t) = Aei(k·r−wt+φ). (2.10). where A is the amplitude of the field, k is the wave vector, w is the frequency of the wave, φ is a phase quantity, and for this case U = Aei(k·r+φ) T = e−iwt. .. (2.11). Paraxial Approximation When an electromagnetic wave has propagation exclusively in the direction of the axis z, the spatial part is represented in the form U (r) = A(r)eikz .. (2.12). The approximation that is customary to use, called paraxial approximation, consists of ∂A ∂ 2A  k . ∂z 2 ∂z. (2.13). Using Eqs. (2.8) and (2.12) the following expression must be fulfilled: ∇2⊥ Aeikz +.  ∂2 Aeikz + k 2 Aeikz = 0 2 ∂z. (2.14). where. ∂2 ∂2 + (2.15) ∂x2 ∂y 2 The term of the second derivative in z can be expanded, taking into account that A has dependency on z. In this way, this term is expanded, taking    ∂ 2 A ikz ∂A ikz ∂2 ∂ ∂A ikz ikz ikz e + ike A = e + 2ik e − k 2 Aeikz . (2.16) Ae = 2 2 ∂z ∂z ∂z ∂z ∂z ∇2⊥ =. Combining Eqs. (2.14) and (2.16)) you have that ∇2⊥ Aeikz +. ∂ 2 A ikz ∂A ikz e + 2ik e =0. ∂z 2 ∂z. (2.17). At this point, if the condition imposed by the paraxial approximation, established in Eq. (2.13) is used, and Eq. (2.12) is used, we have    ikz ∂ ∂U −ikz 2 −ikz 2 −ikz ∇⊥ U + 2ik Ue e = ∇⊥ U + 2ik e − ikU e eikz = 0 . (2.18) ∂z ∂z Therefore, the Helmholtz equation in the paraxial approximation is represented as ∇2⊥ U + 2ik. ∂U + 2k 2 U = 0 . ∂z. (2.19).

(31) 2.2. THEORETICAL FRAMEWORK. 11. The general solution to Eq. (2.19) in cylindrical coordinates is given by the following expression: LG± n,l. Cn,l =√ 2. . µ∗ µ. n+l/2.   " √ #l   1 r2 2r2 2r l exp − 2 exp(±ilθ) Ln µ µω0 ω(z) ω 2 (z). (2.20). where Lln are the associated Laguerre functions, ω0 is a width parameter, i is the imaginary constant ± represents the decision of whether positive or negative topological charge is used, and µ = 1 + iz/zR kω02 zR = q2 (2.21) ω(z) = ω0 1 + z 2 /z02  1/2 1 4n! Cn,l = ω0 (1 + δ0,l )π(n + l)! where δ0,l is the Kronecker delta, having as value 1 if the subscripts are equal, and 0 if the subscripts are different. Figure 2.1 shows the amplitude of some modes of the LG beams with positive topological charge that were generated computationally by the use of MATLAB, and Figure 2.2 shows the phase of the same modes. Appendix A gives a brief description of Laguerre functions.. 2.2.2. Particle Swarm Optimization. The algorithm of Particle Swarm Optimization is based on the behavior of animal societies that do not have any leader in their group or swarm, such as birds and fish. Usually, a flock of animals that have no leader will fin food bu random, or by following one of the members of the group that has the closest position with a food source. The groups of animals can achieve their best possible condition through mutual communication with the rest of the animals in the group, especially with those who already have a better situation [20]. Particle Swarm Optimization starts by initializing a population of particles with random positions (~ xi ) and velocities (~ vi ), and an objective function (f ) is evaluated using the particles’ positional coordinates as input values. Positions and velocities are adjusted and the objective function is evaluated with the new coordinates at each time step. When a particle discovers a pattern that is better than any it has found previously, it stores the coordinates in a vector (~ pi ). The difference between the best point found by each particle and the individual’s current position is stochastically added to the current velocity, causing the trajectory to oscillate around that point. Then, each particle is in a neighborhood of particles, and thus the stochastically weighted difference between the neighborhood’s best position (p~g ) and the individual’s current position is also added to its velocity [21]. The corresponding pseudo-code is shown in Algorithm 2.2.1. In the algorithm, the variables φ1 and φ2 are random positive numbers following a uniform distribution. The variable vid is limited to the range ±Vmax because of the following.

(32) 12. CHAPTER 2. LITERATURE REVIEW. Figure 2.1: Laguerre-Gauss modes.. Figure 2.2: Phase of Laguerre-Gauss modes..

(33) 2.2. THEORETICAL FRAMEWORK. 13. reason: the random weighting of the control parameters in the algorithm results in a kind of explosion, as particles’ velocities and positional coordinates careen toward infinity. This explosion is contained through the implementation of a maximum velocity parameter, which limits step size or velocity. An important source of the swarm’s search capability comes from interactions among particles as they react to one another’s findings. Initialize population repeat for i = 1 to Population Size do if f (~ xi ) < f (~ pi ) then p i = xi end p~g = min(~pneighborhood ) for d = 1 to Dimension do vid = vid + φ1 (pid − xid ) + φ2 (pgd − xid ) vid = sign(vid ) · min(abs(vid ), vmax ) xid = xid + vid end end until finishing criteria is met; Algorithm 2.2.1: Pseudo-algorithm of a Particle Swarm Optimization.. 2.2.3. Genetic Algorithms. A Genetic Algorithm is a search algorithm based on the mechanics of natural selection and natural genetics. Among the main ideas that are present in this kind of algorithms is the survival of the fittest, among string structures with a structured yet randomized information exchange to form a search algorithm. In every generation (stage of the algorithm), a new set of binary strings is created using bits and pieces of the fittest of the past generation, and occasionally, a new part is tried for good measure [12]. A simple Genetic Algorithm is composed of three basic operators, namely reproduction, crossover, and mutation. Reproduction is a process in which individual strings are copied according to their objective function values. This operator is an artificial version of natural selection, a Darwinian survival of the fittest among string creatures. Crossover may proceed in two steps. First, members of the post-reproduction stage are mated at random; second, each pair of strings undergoes crossing over as follows: an integer position along the string is selected uniformly at random between 1 and the string length minus one. Two new strings are created by swapping all characters between the chosen position and the last position inclusively. Mutation is the occasional random alteration of the value of a string position [12]. The corresponding pseudo-code is shown in Algorithm 2.2.2. The binary representation traditionally used in Genetic Algorithms has some drawbacks when applied to multidimensional, high-precision numerical problems. For example, for 100 variables with domains in the range [-500,500] where a precision of six digits after the decimal point is required, the length of the binary solution vector is 3000, and this generates a search space of 23000 elements. For such problems. a Genetic Algorithm would perform poorly. This presents an opportunity for floating point implementation. In floating point implementation,.

(34) 14. CHAPTER 2. LITERATURE REVIEW. each chromosome vector is coded as a vector of floating point numbers. The pieces of the algorithm, reproduction, crossover, and mutation, are implemented in analogous ways to those of the binary implementation. It must be stated that there are different ways to perform the mentioned pieces of a Genetic Algorithm, which can yield different results [27]. Generate initial population f~ ← Calculate fitness S ← Get best solution repeat P arents ← Selection for p1 , p2 in P arents do Children ← Crossover Children ← Mutation end f~ ← Calculate fitness S ← Get best solution P opulation ← Update population until finishing criteria is met; Algorithm 2.2.2: Pseudo-algorithm of a Genetic Algorithm. 2.2.4. Simulated Annealing. The Simulated Annealing algorithm is based on the idea of the slow cooling of different metallic pieces, which results in a crystallization of its atomic structure, i.e. structures that minimize the potential energy of atoms, and that are repetitive in the material. Then, in the Simulated Annealing algorithm there is a temperature parameter that decreases following an arbitrary function, which plays an important role in determining the optimal solution [11]. The Simulated Annealing algorithm consists of a non-homogeneous Markov chain discrete in time. It starts by proposing a state, or initial solution, for the evaluation function. For each iteration of the algorithm, a neighbor state of the current state must be chosen randomly, where all neighboring states have the same probability of being chosen. Once the neighbor has been found, the following state is determined in the following way: if the neighbor is better or equal in the evaluation function, the new state will be the neighbor, if not, the neighbor is accepted as a new state based on a probability, keeping in mind that for this case, a better solution is reflected in a lower value in the evaluation of the objective function, since we are minimizing. The aforementioned probability takes into account the evaluation of both states, together with a control parameter known as temperature, which decreases as the Markov chains increase. The evaluation of the neighbors depends on each specific problem, while the form of the decision to accept the neighbor remains constant for all the problems that use this technique. This is best seen in the Algorithm 2.2.3 [28, 11]. A finite-time implementation of Simulated Annealing can be done by generating a sequence of Markov chains of finite lengths, at descending values of temperature (control parameter). This implies that a set of variables must be specified: a cooling schedule. A cooling schedule specifies a sequence of values of the temperature, and a number of transitions at each value of the control parameter. More precisely, the cooling schedule is specified by an initial.

(35) 2.2. THEORETICAL FRAMEWORK. 15. value of the control parameter, a decrement function for lowering the value of said control parameter, a final value of the control parameter specified by a stop criterion, and a finite length of each Markov chain [11]. One simple cooling schedule is known as the geometric schedule. The initial value of the control parameter is chosen in such a manner that the ratio of accepted new solutions to proposed new solutions is sufficiently large. The lowering of the control parameter is given by a decrement function of the form ck+1 = α · ck. k = 0, 1, . . .. (2.22). where α is a positive constant smaller and close to 1. The final value of the control parameter is fixed at some small value. The length of Markov chains is fixed by some number that may be related to the size of the neighborhoods in the problem [11]. k←0 u ← u0 repeat for l = 1 to Lk do Generate neighbor v of u; if f (v) ≤ f (u) then u←v else .  (u) then if rand (0,1) < exp − f (v)−f ck u←v end end end k ←k+1 Calculate length Lk Calculate control ck until finishing criteria is met; Algorithm 2.2.3: Pseudo-algorithm of a Simulated Annealing.. 2.2.5. Memetic Algorithms. A Memetic Algorithm is based on the idea that human culture can be decomposed into bricks called memes, which can be duplicated in human brains, modified, and combined with other memes in order to generate a new meme. In this way, there are some memes that are simply not interesting, and thus will die away in a relatively short period of time. Similarly, there are other memes that are somewhat strong, and will propagate within the entire community. Memes can also undergo slight modifications or combine with each other thus generating new memes which have stronger features and are more durable and prone to propagation [19]. Memetic Algorithms can thus be defined as population-based metaheuristics composed of an evolutionary framework and a set of local search algorithms which are activated within the generation cycle of the external framework. The general structure of a Memetic Algorithm is as follows: selection of parents, which aims to determine the candidate solutions that.

(36) 16. CHAPTER 2. LITERATURE REVIEW. will survive in the following generations and be used to create new solutions; combination of parents for offspring generation, which aims to create new promising candidate solutions by blending existing solutions: local improvement of offsprings, which has the goal of improving the quality of an offspring as far as possible; and updating the population, which decides whether a new solution should become a member of the population and which existing solution of the population should be replaced [19]. The corresponding pseudo-code is shown in Algorithm 2.2.4. Here, the Initialize procedure is responsible for producing the initial set of solutions. Traditional evolutionary algorithms resort to generating solutions at random, but in Memetic Algorithms it is typical to attempt to use high-quality solutions as starting point. The Cooperate procedure consists on using two operators, for selecting solutions from the population and recombining them. The Improve procedure embodies the application of a local search procedure to solutions in the population. Finally, the Compete procedure us used to reconstruct the current population using the old population and the population of offsprings [19]. Generate initial population f~ ← Calculate fitness S ← Get best solution repeat P arents ← Selection for p1 , p2 in P arents do Children ← Crossover Children ← Mutation Children ← Improve via Local Search end f~ ← Calculate fitness S ← Get best solution P opulation ← Update population until finishing criteria is met; Algorithm 2.2.4: Pseudo-algorithm of a Memetic Algorithm.. 2.2.6. Modal Decomposition. It is a known fact that any arbitrary function can be expressed as a linear combination of modes from an orthogonal basis. This implies that f (r) =. X. wk Bk (r) ,. (2.23). k. where r = (x, y) is the spatial coordinate in the transverse plane, and Bk (r) represents the k-th basis mode. The complex coefficient wk represents the contribution of each basis mode, which is known as weight. From this follows that the weights can be calculated from the function f (r) and the basis modes Bk (r) through an inner product, defined as Z wk = hf (r)Bk (r)i = f (r)Bk (r)g(r)dr , (2.24) T.

(37) 2.2. THEORETICAL FRAMEWORK. 17. where g(x) is a weight function that guarantees orthogonality, and T represents the entire region where the functions exist [29]..

(38)

(39) Chapter 3 Implementation Details In this chapter, the methodology that was followed for the implementation of some of the algorithms mentioned in Chapter 2 will be explained. Also, there will be a brief explanation on how the required data for an experimental implementation could be acquired. Here, a modification on one algorithm will be presented, along with the reasons behind this modification, which all come from empirical evidence. Along with all of the algorithms, there is an objective function that is used to evaluate the solutions. The error metric (objective function in this case) that was used is an average square error for images (IMMSE), defined as: n. m. 1 1 XX (Mi,j − M̂i,j )2 , IMMSE = n m j=1 i=1. (3.1). where m specifies the number of pixels on the x axis of the images used, n specifies the number of pixels on the y axis, M is the matrix of the ideal field (the one that we want to reconstruct through a process based on modal decomposition), and M̂ is the matrix of the field generated by the implemented algorithms.. 3.1. Particle Swarm Optimization. As seen in Section 2.2.2, the algorithm can be easily divided into three parts: obtaining the best value for each particle, obtaining the global best of the positions, and updating the positions. The population was initialized with random real values in the range [0, 1]. The implementation has a population size of 20, and the φ values are random numbers obtained from a uniform distribution, in the range [0, 1]. The fitness, as stated above, uses the IMMSE metric. The finishing criteria is hitting 10,000 iterations, or having an IMMSE value of 0.0001.. 3.1.1. Particle Best. The best value that every particle has obtained is easily calculated. At first, the Particle Best is initialized as random positions. As iterations go on, a comparison on evaluations of each position (for the same particle) is performed, and if a better value is found, the Particle Best is updated accordingly. This is repeated for all of the particles that are being used. 19.

(40) 20. 3.1.2. CHAPTER 3. IMPLEMENTATION DETAILS. Global Best. For every iteration, the Particle Best is found for every particle, as stated before. Using the stored information about the best position for each particle, one can find the minimum (or maximum, depending on whether one is minimizing or maximizing) of these values, and store it as the Global Best value.. 3.1.3. Updating Positions. Updating the position of each particle has a part of the Global Best, and a part of the Particle Best. The particle turns in a direction that is a linear superposition of the directions of the Global Best and the Particle Best, starting from the current position of the particle that is being updated. Then, a control parameter, V max, is used to control explosions on velocity, and have a well-behaved function for velocity. In this case, this control parameter was established as 0.1.. 3.2. Genetic Algorithm. As mentioned in Section 2.2.3, the algorithm is divided mainly into three different parts: selection, crossover, and mutation. For this work, the implementation that was done is based on real genes, rather than binary genes. The underlying reason for this is the nature of the problem, since we are looking for real values, in a continuous space. Now, let us proceed with the explanation of each of the parts of the Genetic Algorithm that was implemented. The implementation uses a population size of 20, a crossover probability of 1, and a mutation probability of 20%, which yielded the best results for this algorithm. The fitness, as stated above, uses the IMMSE metric. The finishing criteria is hitting 10,000 iterations, or having an IMMSE value of 0.0001.. 3.2.1. Selection. For selection, a Stochastic Universal Sampling procedure was used. This procedure is a single-phase sampling algorithm with minimum spreand and zero bias. It is based on roulette wheel selection methods, but instead of a single selection pointer employed, Stochastic Universal Sampling uses N equally spaced pointers, where N is the number of selections required. The population is shuffled randomly and a single random number pointer1 in the range [0, 1/N ] is generated. The N individuals are then chosen by generating the N pointers, starting with pointer1 and spaced by 1/N , and selecting the individuals whose fitness spans the positions of the pointers [30].. 3.2.2. Crossover. For crossover, an Arithmetic Crossover procedure was used. This procedure randomly selects two individuals (Cigen and Cjgen ) of the population at any given iteration or generation, which.

(41) 3.3. BASIC SIMULATED ANNEALING. 21. can produce two offsprings (Cigen+1 and Cjgen+1 ) through a linear combination of the parents, in the following manner Cigen+1 = a · Cigen + (1 − a) · Cjgen Cjgen+1 = (1 − a) · Cigen + a · Cjgen ,. (3.2). where a is the weight which governs dominant individual reproduction, and is a small value in the range [0,1] [31].. 3.2.3. Mutation. For mutation, a simple procedure was used. A random uniform value in the range [−0.05, 0.05] is added (or subtracted, depending on the sign) to the mutated elements of the population. This range is small to avoid big changes in the population, that might result in completely “ignoring” a good solution.. 3.3. Basic Simulated Annealing. As mentioned in Section 2.2.4, there are two main parts for the implementation of a Basic Simulated Annealing (basic in the sense of following the rules by the book), the neighbors and the control parameter, which will be named temperature. Also, for ease of implementation, there will be no Markov chains, in the sense that temperature will always vary. Similar to the previous algorithm, the objective function is given by the IMMSE metric. The finishing criteria is reaching 10,000 iterations, or having an IMMSE value of 0.01.. 3.3.1. Generation of Neighbors. For generating the neighbors in the Basic Simulated Annealing, a simple procedure similar to mutation in Genetic Algorithm is used. A vector of random numbers in the range of [−0.05, 0.05] is generated, which has the same size of the solution vector in the Basic Simulated Annealing, then, the two vectors are arithmetically added together. The reason behind this small range is the same as in the mutation for Genetic Algorithm.. 3.3.2. Variation of Temperature. The way in which the Temperature is varied is given by the geometric schedule, as mentioned in Section 2.2.4. The initial value for the temperature is 1, and is slowly going down by a factor of 0.999, until 10,000 iterations are reached, or until the IMMSE value is lower than 0.0001.. 3.4. Evolution of Simulated Annealing. After different experiments, empirical evidence suggest that the Basic Simulated Annealing has potential to solve the problem, with some tweaks. In this way, different improvements.

(42) 22. CHAPTER 3. IMPLEMENTATION DETAILS. were done to the Basic Simulated Annealing that addressed some of the problems that arose, which include: • Initially, the weights in the solution should vary in a relatively large manner, but with higher number of iterations, this variations should decrease to find more fine solutions. • The way in which the different parameters related to Temperature are set impede good solutions when the problem is pushed into a more difficult instance. When experimenting with the tweaks, different paths were taken, which yielded quite the diversity of results. Some of the things that were done are: • The way to generate neighbors was altered. In some instances, not every element of the solution was varied, and in other instances, the variation was each time smaller. • The initial Temperature was varied, going from values lower than 1, and up to 100. Also, the step for the Temperature was varied, from 0.9 up to 0.9999. After all of these experiments, the specifications for an algorithm that has an excellent performance were found, and are mentioned below. Results showing the evolution of the Simulated Annealing will be shown in Chapter 4: • The neighbors, variations to a solution x, are generated according to ∆x =. t × rand , 20. (3.3). where t is the temperature, and rand is a random number with a uniform distribution between 0 and 1. • The Temperature follows a geometric schedule, with a factor of 0.999. • The neighbors are complex quantities. • There are no Markov chains, in the sense that the temperature always varies. The final code is included in Appendix C.. 3.5. Experimental Data Collection. Since the algorithms work with the field that describes a beam, and not with the amplitude or phase, it would be necessary to perform some experiments. The field can not be obtained experimentally, but the amplitude and the phase can. Then, it is possible to recreate the field U from the amplitude A and the phase Φ in the following way: U = A (cos Φ + i sin Φ) .. (3.4). With this, it must be borne in mind that an optical arrangement must be made to obtain amplitude, and another to obtain a phase..

(43) Chapter 4 Experiments, Results, and Analysis In this chapter, all of the results and their corresponding analyses will be presented. The main idea here is to try out some of the algorithms presented in Chapter 2.2, and/or some sort of variation to them. For this, a simulation on modal decomposition of an arbitrary Laguerre Gauss beam is required. First, a simple superposition of Laguerre Gauss base functions will be proposed, using real weights. Then, further difficulty will be used, in the form of more basis functions, as well as Complex Weights to be found. There are certain subtleties regarding the implementation of the superposition, which will be explained below, but they arise only for ease of coding. In general, the number of functions that will be used for generating a superposition follows a custom function, either for using it as the original function (which for this work represents a function that is given to us, and on which we want to perform modal decomposition); or the reconstructed function (which represents the proposed solution by the algorithms that will be used further on). This function behaves as 2 × (g + 1)2 , (4.1) where g represents an auxiliary variable that will be replaced depending on which superposition we want to build, either the original function or the reconstructed function. There will be two different variables which will replace g in the equation above, namely mx and up. The former is a variable indicating the maximum degree of the Laguerre Gauss function that will be used, in both indices and both topological charges (radial and azimuthal for positive and negative topological charges), for the original function; similarly, the latter is indicating the maximum degree of the Laguerre Gauss function that will be used for the reconstructed function (also radial and azimuthal for positive and negative topological charges). In this fashion, all of the functions from degree 0 in both radial index and azimuthal index, and both topological charges, to the indices specified by mx, would be used for a superposition, and, for example, if we were to set mx as 1, eight different Laguerre Gauss functions would be used in the original function superposition, which are given by the following ordered pairs LG+ = {(0, 0), (0, 1), (1, 0), (1, 1)} LG− = {(0, 0), (0, 1), (1, 0), (1, 1)} ,. (4.2). where LG+ represents the positive topological charges, and LG− represents the negative topological charges. Following the example, if we set up to 1, the same functions would be used 23.

(44) 24. CHAPTER 4. EXPERIMENTS, RESULTS, AND ANALYSIS. for the reconstructed function, although the difference resides in the weights found by the algorithm (contrasting with the original weights, that will be chosen at random, following a uniform distribution). In this way, if we were to set up to a value greater than 1, the algorithm should be able to establish the corresponding extra weights as 0, since those basis functions do not appear in the original function. As for the Laguerre Gauss functions themselves, they were numerically implemented following Eq. 2.20, on a 128 × 128 grid. The size of the grid was arbitrarily chosen, and the only underlying reason for this is that is a power of 2. The implementation itself was done in an Asus X541UA laptop, with an Intel(R) Core(TM) i5-6200U CPU processor, at 2.30 GHz with 8 GB of RAM, using MATLAB 2018a. The results that will be presented include tables showing the total time taken for the implemented algorithms to finish a total of 10,000 iterations, and the total error in amplitude, phase, and complex field for the solutions found by the implemented algorithms; figures showing comparative graphs for amplitude and phase, between the original function and the reconstructed function, for different cases; and finally, best found curves, which plots the average value of the evaluation of the objective function (shown in Chapter 3), along with other statistical quantities such as standard deviation, for several runs of an algorithm applied to solving a problem instance against the number of iterations performed by an algorithm. To avoid repetition further on, bear in mind that although there are 10,000 iterations for each algorithm, the population based methods have a total of 200,000 evaluations of the objective function, while the Simulated Annealing and its variations have a total of 10,000 evaluations of the objective function. This will be mentioned with more detail in the next section. Also, since tables presenting different errors, as well as best found curves, will be shown, it has to be stated that for the necessary statistics, each algorithm was run a total of 100 times. Furthermore, for the best found curves, logarithmic scales will be used in the dependant axis to have a better appreciation of the curve, since the variation at low iteration values is considerably greater than the variation at higher values; and a step of 200 will be used in the error bars of said curves to avoid cluttering, which are obtained with one standard deviation. The figures showing comparative graphs for amplitude and phase, between the original function and the reconstructed function, for different cases have the following structure: the amplitude is shown in columns 1 and 3, and the phase is shown in columns 2 and 4; the original function is shown on the left, and the reconstructed function is shown on the right. Particularly for the Simulated Annealing, the values for mx and up will change, depending on the case of the problem that is being solved, and the implementation of said algorithm. Also, given that the results obtained are considerably better than those provided by population based methods implemented in this work, power maps will be shown, which show a visual comparison of the weights composing the original function, and the weights composing the reconstructed function, which is provided by the algorithm. Since the variables mx and up will be different, there are certain basis elements in the reconstructed function that are not present in the original function, and thus some of the power maps are composed of two parts, depending on the existence of these extra weights: the first shows a comparison of the absolute value of the weights (considering that the weights will be complex at some point) that are present in both the original and the reconstructed functions, having the positive topological charge on the left and the negative topological charge on the right, while the second part shows the extra weights that are only present in the reconstructed function, and that have an absolute value.

(45) 4.1. POPULATION BASED METHODS. 25. greater than 0.05, number that was arbitrarily chosen. The presentation of the results will follow the flux of fitness, which is how the evaluation of the objective function will be called, as it goes down with the use of a different algorithm. It has to be stated that, although an objective function evaluation with value 0 indicates a perfect resemblance between the original function and the reconstructed function, we’re not strictly looking for that. In turn, this objective function evaluation value can be greater than 0, as long as the original function and the reconstructed function have a noticeable similarity.. 4.1. Population Based Methods. Population based methods enclose two different algorithms in this work, namely Particle Swarm Optimization and Genetic Algorithms. These methods have a particular characteristic, which is that the number of iterations of the algorithm does not match the number of evaluations of the objective function. For these two algorithms, the population size was set to 20, and the initial populations were extracted from uniform distributions, in the range of [0, 1]. Given that a total of 10,000 iterations will be performed per algorithm, the population based methods will have a total of 200,000 evaluations of the objective function.. 4.1.1. Particle Swarm Optimization. As a starting point, simple cases were used. In the cases that will be shown for the Particle Swarm Optimization algorithm, mx was set to 1, and up was set to 2, meaning that the original function was a superposition of 8 different functions, while the reconstructed function used a total of 18 functions. The weights of the original function were random real numbers in the range [0,1], extracted from a uniform distribution. This can be translated to saying that the Particle Swarm Optimization algorithm had to find 18 real values, from 0 to 1. Overall, this algorithm had the worst performance of all the algorithms that were implemented to solve the problem at hand. Table 4.1 shows the statistics (mean and standard deviation) for the total time taken for the Particle Swarm Optimization algorithm to finish all of the iterations (stated above), and the total error in amplitude, phase, and complex field for the solutions found by Particle Swarm Optimization algorithm; using a total of 100 runs of the algorithm. Table 4.1: Statistics for time taken for the Particle Swarm Optimization algorithm to finish 10,000 iterations, along with statistics for errors in field, amplitude, and phase. Variable. Mean. St. Dev.. Time (s). 1164.35. 18.17. Field (A.U.). 485.80. 279.19. Amplitude (A.U.). 1.24×108. 1.48×108. Phase (A.U.). 6.51. 2.62. These values indicate that overall we can expect the time for this algorithm to solve a.

Figure

Figure 2.1: Laguerre-Gauss modes.
Figure 4.1: Visual comparison between amplitude and phase of the original function and the reconstructed function, for four different cases, using a Particle Swarm Optimization  algo-rithm
Figure 4.2: Best found curve for the performance of the Particle Swarm Optimization al- al-gorithm
Figure 4.4: Best found curve for the performance of the Genetic Algorithm. A step of 200 pints is used to show the error bars of only some parts
+7

Referencias

Documento similar

On the other hand it has been found that this concretion also acts as a protective layer against corrosion, considerably reducing the rate of corrosion of iron in seawa- ter, and

A catchment model for river basins and a hydrodynamic model were combined in order to simulate the spreading of the turbidity plume produced by sediment discharges from the

Variation in the coastal area of the GoC (depth of the water column &lt;100 m) of the normalized mean values of pH T (pH T @Tmean) and aragonite saturation state (ΩAr@.. Tmean) at

No obstante, como esta enfermedad afecta a cada persona de manera diferente, no todas las opciones de cuidado y tratamiento pueden ser apropiadas para cada individuo.. La forma

 The expansionary monetary policy measures have had a negative impact on net interest margins both via the reduction in interest rates and –less powerfully- the flattening of the

We first run each application for a total of 1 billion of instructions (0.5 billion per core) for ev- ery refresh policy and the total execution time and the energy consumption

We evaluated the performance of Partial Least Squares Regression (PLS) models to predict crude protein (CP), neutral detergent fibre (NDF), acid detergent fibre (ADF) and

Electron diffusion was simulated with Magboltz [39] for the additive concentrations used in this work, for a xenon TPC with a nominal pressure of 10 bar and a reduced electric field