Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

New automatic optical design method based on combination of particle swarm optimization and least squares

Open Access Open Access

Abstract

Damped least square method is one of the popular methods for automatic lens design. Various improvements in this automatic optical design are mainly due to the optimization of the damping factor and the weight factor. Especially in the four stages of lens design, designers pay more attention to the “correction” stage, and recognized the importance of human experience in “correction”. The introduction of computer brought the feeling of indescribable about the balance aberration of computer. In fact, the function of computer has not gone beyond the range of balance aberration. In this paper, we discussed how to make the whole process of lens design completely automatic by computer, including the selection, correction and evaluation of the system. To achieve this process, the key step is how to make the computer think like a designer and select the type of lens. The success of lens design depends largely on the type selection. Designers who have a profound understanding of optical design theory and rich practical experience can select the simplest and most suitable one from a wide range of types, therefore, this method can also express a new global search method for optical design. Least squares is added to Particle Swarm Optimization (PSO) algorithm to optimize glass selection in optical system. After comparing and analysing the optimized design solutions, the system performance is well achieved. This method can be conveniently implemented and expands the solution space of the optical system.

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

1. Introduction

Designers begin to learn optical design often have blindness and tentative in modifying parameters. With the gradual deepening of the understanding of aberration theory and the enrichment of practical experience, this blindness gradually decreases. Although computer calculation is thousands of thousands times faster than manual calculation, it is impossible for computer to calculate all the design solutions of lens.

In a three piece lens system, if the glass material and thickness are fixed, there are six radii and two air spacing to be designed. Suppose that each variable has only ten values, the possible design solutions will reach such a huge number as 10 ^ 8. If the number of lens increased to 5 pieces and the number of variables will increase by 6, and the possible combination of the solutions will be increased by 10 ^ 6 times than that of the three pieces. Without a good method, computers can’t deal with the design work.

If the aberration of optical system varies linearly with parameters, no matter using least squares method, gradient method, inequality method, adaptive method, orthogonalization method, etc., it can always move in one direction to reach the minimum of MF (Merit Function). Unfortunately, this kind of linearity can only be established at very short distances. Optical design is actually a linear iterative treatment of non-linear problems.

A. Girard and C. G. Wynne first applied the damped least squares method to optical automatic design. Later, Wynne and others made a variety of improvements to this automatic optical design method, especially the damping factor and weight factor; the term “automatic lens design” was introduced into the field of optical design [1–3].

There are three aspects to consider in realizing optical automatic design. Firstly, the choice of mathematical methods is very important, and a kind of self-adapting method is needed to avoid falling into the stagnation point of local limit value. Secondly, there is no mature method for calculating the initial structure of optical system and automatically increasing or reducing the elements of the system. Thirdly, there seems to be a problem about how to deal with the material as a variable, because optical glass is a binary function of dispersion and refractive index, and it is discontinuous, so it is difficult to process in the computer program.

Aiming at the selection of mathematical methods. There are many intelligent optimization algorithms, such as genetic algorithm, differential evolution algorithm, immune algorithm, ant colony algorithm, PSO, simulated annealing algorithm, tabu search algorithm, neural network algorithm and so on [4,5].

In this paper, PSO is selected as the optimization method. Similar to genetic algorithm, PSO is simple and easy to implement, and has no parameters to adjust, and has greater randomness.

PSO is a new evolutionary algorithm developed by J. Kenned and R. C. Eberhart. PSO is a kind of evolutionary algorithm, which is similar to simulated annealing algorithm. It also starts from random solution and searches for optimal solution by iteration. It also evaluates the quality of solution by fitness [6–10]. PSO algorithm is applied to the automatic correction of spherical and aspherical aberrations by H.Qin for the first time, and a useful exploratory study is made on the correction method and results [11,12]. PSO algorithm also has an effective application in other fields such as film detection [13–16].

The work proposed here is to apply PSO idea of stochastic solution to the glass map in optical system design, and mainly discuss how to improve the effectiveness of glass optimization by combining least square method with PSO. Two search mechanisms are proposed, first, the least square method is used to search for continuous numerical variables, second and the PSO is used to optimize glass in glass space. The optimal direction of solution vector in multidimensional variable space is determined.

2. PSO and Improvement

The idea of PSO arises from the study of bird or fish predation behavior, which simulates the behavior of bird swarm flying and foraging, and makes the swarm achieve the optimal goal through collective cooperation between birds. PSO is an optimization method based on Swarm Intelligence. It does not have the “Crossover” and “Mutation” operations of genetic algorithm. It searches for the global optimum by following the currently searched optimum values.

The basic idea of PSO:

Imagine a scene where a flock of birds is searching for food at random. It is known that there is only one piece of food in this area, all birds do not know where the food is. But they can feel how far away the current location is from the food. So what's the best strategy to find the food?

  • 1. Search the area around the bird nearest to the food;
  • 2. Judge where the food is based on your flight experience.

Algorithm Introduction

Every optimization problem solution is imagined as a bird, called a “particle”. All particles are searched in a D-dimensional space.

All particles are fitness function to determine the fitness of the current position.

Each particle must have a memory function that remembers the best location to be found.

Each particle also has a velocity that determines the distance and direction of flight. This speed is dynamically adjusted according to its own flight experience and the flight experience of its companions.

Velocity updates in D-Dimension of “Particle”:

  • vidk=wvidk1+c1r1(pbestidxidk1)+c2r2(gbestdxidk1)

Location updates of Particle in D-Dimension Space:

  • xidk=xidk+vidk1
  • vidk–D-dimensional component of particle i's flight velocity vector of the k iteration.
  • xidk–D-dimensional component of the particle i flight position vector of the k iteration.

C1, C2 is the acceleration constant. r1, r2 is random function of value [0, 1] to increase search randomness. w is the weight factor adjusts the search range of solution space [9,10].

Pbestd is the best position of particle individual traversal, and Gbestd is the best position of swarm traversal.

The flow chart of PSO is shown in Fig. 1.

 figure: Fig. 1

Fig. 1 The flow chart of PSO

Download Full Size | PDF

The combination of PSO and least squares is determined by the complexity of optical design. As mentioned in the introduction, if the glass and thickness are fixed in a three-piece system, the number of possible particles will be as large as 10 ^ 8 if the number of variables is only 10. In a small linear continuous space, PSO has no advantage as shown in Fig. 2. In order to reach the lowest point, more particles and iterations are needed to complete it. Least squares or gradient methods have obvious advantages in dealing with continuous changes in local small space, so the least squares method is selected to combine with POS. Least squares is a popular local search algorithm in optical design, which has been proved to be reliable and effective. Designers can also combine gradient method with PSO to achieve the same goal.

 figure: Fig. 2

Fig. 2 Relative relationship between particle position and solution space

Download Full Size | PDF

When using PSO to design the system, the individual swarm is established for the focal length of the lens. The number of the swarm does not need to be very large. The initial lens focal length can be allocated by combining the least square method with the number of iterations controlled within three times. It is not necessary to consider whether the allocation ratio is appropriate here. Next, the optical glass is initialized and the ideal lens is replaced by random glass selection. The random number is used to generate particles. After replacing the glass, it is necessary to ensure that there is not too much deviation in the distribution of the optical focal length.

Because optical glass is a binary function of dispersion and refractive index and is discontinuous, it is necessary to consider dispersion and refractive index as two dimensions when using PSO to select glass. During the iteration process, the particle velocity is updated in two dimensions. One dimension is responsible for the glass refractive index (nd) dimension and the other is responsible for the glass dispersion coefficient (abb) dimension.

The spectra of optical glass are irregular. Take SCHOTT AG glass map as an example, the number of glass labels in the glass map is about 151 kinds The refractive index and Abbe number of glass are shown in Table 1.

Tables Icon

Table 1. The Characteristics and Material of Glass

The refractive index distribution space of glass is approximately nd: 1.45 ~2.2. The distribution space of glass Abbe number is about vd: 20 ~70. The refractive index and Abbe number distribution of glass Storage is shown in Fig. 3.

 figure: Fig. 3

Fig. 3 Refractive index and Abbe number distribution of glass Storage

Download Full Size | PDF

In order to effectively implement the iteration of PSO, the glass is numbered as a particle (Num). When the particle swarm is initialized, the selection range of particles is integer from 1 to 151, and each particle corresponds to a specific glass.

The new flow chart combining the PSO and the least squares is shown in Fig. 4.

 figure: Fig. 4

Fig. 4 The flow chart of optimized PSO.

Download Full Size | PDF

In the process of iteration, the particle is divided into two directions for velocity iteration. The local optimum pbest and the global optimum gbest use the refractive index and Abbe number of glass as the update unit. The iteration step of refractive index and Abbe number in two dimensions is calculated by velocity update formula, so the space update position of refractive index and Abbe number can be obtained. According to refractive index and Abbe number, the space update position of refractive index and Abbe number can be obtained. The new location searches for the nearest glass nearby to replace it. After the replacement is completed, the least squares operation is performed to obtain the optimal evaluation function of the glass combination, which serves as the starting point of the next iteration operation.

Each iteration updates the system's focal allocation at the same time. The algorithm adjusts and updates the allocation ratio in the iteration process, while taking into account the location of the aperture is feasible.

3. Design example and results discussion

Using the above methods and models, the optimization algorithm of glass was compiled by ZEMAX, and three COOKER lenses were selected for design simulation.

Specification parameters of three lenses are defined as: object distance L = ∞, field of view angle: 2w = 40°, working F /# = 5.0. Aperture is on the first side of the second lens in the system, and effective focal length EFL = 55mm, system back focal length BFL ≥50mm.

According to the initial design method, we use paraxial optics to initialize the system, and we get the initial paraxial optical focal distribution solution. The specification of the initial system is shown in Fig. 5 and the focus distribution is shown in Table 2.

 figure: Fig. 5

Fig. 5 Specification of optical system. EFFL = 55mm, Paraxial Image H = 20.018.

Download Full Size | PDF

Tables Icon

Table 2. Initial focus distribution of optical system

Firstly, the glass is initialized, and the ideal lens is replaced by random glass selection (glass selection range is [1,151], which can be generated by random number) to generate the first particle. After replacing the glass, it is necessary to ensure that focal length does not deviate too much.

Then, according to the above method, we randomly generate 50 glass combination solutions, that is, the number of glass particles is 50.

Fifty replacement glass population solutions are completed, and the least square operation is performed to obtain the local optimization of each system. Generally, the number of iterations for each system population solutions is more than 100.

Finally, we take the number of evolutionary iterations 20 times, i.e. repetitive substitution and local optimization operations need 20*50 = 1000 times; particle learning factor C1 = C2 = 2, weight factor w = 1. After running for 30 minutes, we get the optimization solution of the system 1. The structural parameters of the three systems 1 are shown in Table 3. The optical design layout and parameters of the system 1 are shown in Fig. 6.

Tables Icon

Table 3. System 1 parameters obtained by PSO

 figure: Fig. 6

Fig. 6 Optical design system layout and parameters of the system 1

Download Full Size | PDF

The system 1 aberration is close to Airy range as shown in Fig. 7(a). At the 30lp, the MTF is above 75% at the center of view field, and the MTF is above 40% at the edge of the view field as shown in Fig. 7(b). The distortion of the system 1 is less than 1% as shown in Fig. 8.

 figure: Fig. 7

Fig. 7 Optical design system 1 performance

Download Full Size | PDF

 figure: Fig. 8

Fig. 8 Distortion of optical system 1

Download Full Size | PDF

The design of the three-lens system has reached the ideal design state, and the space for further improving of performance is very limited.

In order to further test the robustness of the system, we have designed and validated the three structures several times. Then we got three other optical design systems. The parameters of system 2-4 are shown in Tables 4-6. And the performance of the optical systems are shown below.

Tables Icon

Table 4. System 2 parameters obtained by PSO

Tables Icon

Table 5. System 3 parameters obtained by PSO

Tables Icon

Table 6. System 4 parameters obtained by PSO

After comparing and analysing the four optimized design solutions, the system performance are better met as shown in Figs. 9-17. Among them, the performance of solution 1 (system 1) and solution 3 (system 3) is the best. The glass combination of the four design solutions is not identical. Usually when the designer replaces the glass according to experience, it is impossible to compare all glass combinations by iterative comparison. This method can be conveniently implemented and expands the solution space of the optical system. Using this method, a global optimal solution can be obtained by averaging 6 iterations as shown in Fig. 18.

 figure: Fig. 9

Fig. 9 Optical design system layout and parameters of the system 2

Download Full Size | PDF

 figure: Fig. 10

Fig. 10 Optical design system 2 performance

Download Full Size | PDF

 figure: Fig. 11

Fig. 11 Distortion of optical system 2

Download Full Size | PDF

 figure: Fig. 12

Fig. 12 Optical design system layout and parameters of the system 3

Download Full Size | PDF

 figure: Fig. 13

Fig. 13 Optical design system 3 performance

Download Full Size | PDF

 figure: Fig. 14

Fig. 14 Distortion of optical system 3

Download Full Size | PDF

 figure: Fig. 15

Fig. 15 Optical design system layout and parameters of the system 4

Download Full Size | PDF

 figure: Fig. 16

Fig. 16 Optical design system 4 performance

Download Full Size | PDF

 figure: Fig. 17

Fig. 17 Distortion of optical system 4

Download Full Size | PDF

 figure: Fig. 18

Fig. 18 Error function progress.

Download Full Size | PDF

The search for optical glass is based on the glass library, and the actual production needs, we are pursuing a lower cost glass combination. This method can be used to build low-cost glass independently, that is, to impose restrictions on glass particles, and to initialize the particle group only for low-cost, manufacturable glass, and to design optical with lower cost and better performance.

The existing professional design software can’t achieve such a design process. Software like CODE V provides glass expert tools to implement glass selection as shown in Fig. 19. Compared with CODE V glass expert tool, this algorithm can get Merit Function's solution with less iterations. But CODE V has the advantage of fast running speed

 figure: Fig. 19

Fig. 19 Error function value vs run time.

Download Full Size | PDF

At present, there is no method to transplant this algorithm to the running environment of CODE V. However, it is certain that in the environment of CODE V, this algorithm combined with CODE V local optimization algorithm will perform more astonishing advantages.

The algorithm can be easily run in a system with higher complexity. This is also the reason for the choice of PSO, and it is simple and easy to implement. The increase of variables only brings about the increase of population types. In theory, any complex coaxial optical system design can be achieved. Threshold control for iteration can be achieved, and the system can evolve by itself (add or subtract lenses). This is the advantage of intelligent algorithm and the inevitable direction of optical design in the future.

4. Conclusion

PSO algorithm is a very effective evolutionary algorithm for solving discontinuous problems. In the process of solving, the local optimization of least squares is combined, which can maximize the effectiveness of PSO algorithm. It is a very strong complement to local optimal pbest and global optimal gbest.

PSO greatly reduces the difficulty of optical design, and weakens the limitation of optical designers' experience. Under the premise of a clear definition and clear specifications of a system, this method can be used to find best solution.

From the process of three COOKER designs and four design results, it can be seen that PSO combined with least squares method is an effective way to achieve optical design glass optimization and has the opportunity to achieve full automation of optical design. Using this method, there is no need to understand the initial structure and search the lens library, nor need to limit the approximate shape of the lens; we only need glass. In the replacement process, the system can be designed by controlling the large deviation of the paraxial optical focus, so as to ensure the effectiveness of ray tracing.

By using this method, a series of design solutions can be obtained. According to the comparison of various solutions, we can choose the best system considering the manufacturability and processing cost, and use PSO to open a new door for optical design.

Funding

National Key Research and Development Program of Ministry of Science and Technology of China (Grant No. 2016YFB0402001).

References

1. C. G. Wynne, “Lens designing by electronic digital computer,” Proc. Phys. Soc. 73(5), 777–787 (1959). [CrossRef]  

2. J. Meiron, “Automatic lens design by the least squares method,” J. Opt. Soc. Am. 49(3), 293–298 (1959). [CrossRef]  

3. C. G. Wynne and P. M. J. H. Wormell, “Lens design by computer,” Appl. Opt. 2(12), 1233–1238 (1963). [CrossRef]  

4. R. E. Fischer, A. J. Grant, U. Fotheringham, P. Hartmann, and S. Reichel, “Removing the mystique of glass selection,” Proc. SPIE 5524, 134–146 (2004). [CrossRef]  

5. B. F. de Albuquerque, J. Sasian, F. L. de Sousa, and A. S. Montes, “Method of glass selection for color correction in optical system design,” Opt. Express 20(13), 13592–13611 (2012). [CrossRef]   [PubMed]  

6. J. Kennedy and R. C. Eberhart, “Particle swarm optimization” Neural Networks, Proceedings., IEEE International Conference, 1942–1948 (1995).

7. R. C. Eberhart and J. Kennedy, A New Optimizer Using Particle Swarm Theory, Proceedings of the 6th International Symposium on Micro Machine and Human Science, Nagoya, Japan, (Academic, 1995), 39–43 (1995). [CrossRef]  

8. S. Yuhui and R. C. Eberhart, “Parameter selection in particle swarm optimization,” International Conference on Evolutionary Programming , 1447 (1998).

9. Y. Shi and R. C. Eberhart, “Empirical study of particle swarm optimization” Evolutionary Computation, 1999. CEC 99. Proceedings of the 1999 Congress. 1, 320–324 (1999).

10. R. C. Eberhart, “Comparing inertia weights and constriction factors in particle swarm optimization.” Proceedings of the 2000 IEEE Congress on Evolutionary Computation, La Jolla, CA IEEE, (2000). [CrossRef]  

11. H. Qin, “Aberration correction of a single aspheric lens with particle swarm algorithm,” Opt. Commun. 285(13–14), 2996–3000 (2012).

12. H. Qin, “Particle swarm optimization applied to automatic lens design,” Opt. Commun. 284(12), 2763–2766 (2011). [CrossRef]  

13. M. Clerc and J. Kennedy, “The particle swarm explosion, stability, and convergence in a multidimensional complex space,” IEEE Trans. Evol. Comput. 6(1), 58–73 (2002). [CrossRef]  

14. H. Ajdad, F Baba, A. Al Mers, O. Merroun, A. Bouatem, and N Boutammachte, “Particle swarm optimization algorithm for Optical-geometric optimization of Linear Fresnel solar concentrators,” Renew. Energy 130, 992–1001 (2018).

15. Z. H. Ruan, Y. Yuan, X.-X. Zhang, Y. Shuai, and H.-P. Tan, “Determination of optical properties and thickness of optical thin film using stochastic particle swarm optimization,” Sol. Energy 127, 147–158 (2016). [CrossRef]  

16. C. Yue, Z Qin, Y. Lang, and Q Liu, “Determination of thin metal film’s thickness and optical constants based on SPR phase detection by simulated annealing particle swarm optimization,” Opt. Commun. 430, 238–245 (2018).

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (19)

Fig. 1
Fig. 1 The flow chart of PSO
Fig. 2
Fig. 2 Relative relationship between particle position and solution space
Fig. 3
Fig. 3 Refractive index and Abbe number distribution of glass Storage
Fig. 4
Fig. 4 The flow chart of optimized PSO.
Fig. 5
Fig. 5 Specification of optical system. EFFL = 55mm, Paraxial Image H = 20.018.
Fig. 6
Fig. 6 Optical design system layout and parameters of the system 1
Fig. 7
Fig. 7 Optical design system 1 performance
Fig. 8
Fig. 8 Distortion of optical system 1
Fig. 9
Fig. 9 Optical design system layout and parameters of the system 2
Fig. 10
Fig. 10 Optical design system 2 performance
Fig. 11
Fig. 11 Distortion of optical system 2
Fig. 12
Fig. 12 Optical design system layout and parameters of the system 3
Fig. 13
Fig. 13 Optical design system 3 performance
Fig. 14
Fig. 14 Distortion of optical system 3
Fig. 15
Fig. 15 Optical design system layout and parameters of the system 4
Fig. 16
Fig. 16 Optical design system 4 performance
Fig. 17
Fig. 17 Distortion of optical system 4
Fig. 18
Fig. 18 Error function progress.
Fig. 19
Fig. 19 Error function value vs run time.

Tables (6)

Tables Icon

Table 1 The Characteristics and Material of Glass

Tables Icon

Table 2 Initial focus distribution of optical system

Tables Icon

Table 3 System 1 parameters obtained by PSO

Tables Icon

Table 4 System 2 parameters obtained by PSO

Tables Icon

Table 5 System 3 parameters obtained by PSO

Tables Icon

Table 6 System 4 parameters obtained by PSO

Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.