Introduction

In terms of designing optical lenses, there are many constraints and requirements, including restrictions like assembly, potential cost, manufacturing, procurement, and personal decision making [1]. Typical parameters include surface profile types such as spherical, aspheric, diffractive, or holographic. Usually, the design space for optical systems consists of multi-dimensional parameter space. Moreover, the radius of curvature, distance to the next surface, material type and optionally tilt, and decenter are necessary for lens design [2].

The most important aspects for designing optical lenses are optical performance or image quality, manufacturing, and environmental requisitions. Optical performance is determined by encircled energy, the modulation transfer function (MTF), ghost reflection control, pupil performance, and the Strehl ratio [3, 4]. Manufacturing requirements include weight, available types of materials, static volume, dynamic volume, center of gravity, and configuration requirements. Furthermore, environmental requirements encompass electromagnetic shielding, pressure, vibration, and temperature. Additional constraints comprise lens element center and edge thickness, and minimum and maximum air spaces between lenses. Other important design constraints are maximum constraints on entrance and exit angles, the physically realizable glass index of refraction and dispersion properties [5].

Optical designers manufacture a lens system, with all the design requirements for optical lenses, in one place. The most important part of lens design is called optimization. In the process of optimization, the values of independent variables (e.g., material between surfaces) are used to realize dependent variables such as imaging magnification [6]. Furthermore, the optimization process contains local and global minima. Global optimization is needed to find the most stable solution.

Traditionally, the most effective optimization tool is the Levenberg–Marquardt algorithm or damped least squares (DLS) method which solves nonlinear least squares problems. A disadvantage of DLS is that the designer has to tackle with the local minimum. Therefore, global optimization tools were introduced [1, 7]. Usually, an optical engineer starts from a global search algorithm with a rough initial configuration of lens design (initial glass selection, number of surfaces, field of view, a wavelength, and an exact stop position). An automatic optimization algorithm is applied to alter the configuration and to find the best or adequate solution. An initial configuration could be parallel plates of glass to control the surface curvature.

By defining many variables and a merit function, the global search algorithms, combined with computer-aided design (CAD) tools, can find design forms with inadequate and many possible solutions. The optical designer needs to examine one or more optical systems by improving the adjustments and optimizations with algorithms like the Hammer algorithm [8] or by hand calculation. In contrast to traditional optimization tools, the optimization problem of lens design can be solved by the use of a genetic algorithm (GA). This specific kind of algorithm is capable of imitating the principles of biological evolution. A GA is based on repeating the modification of an individual population similar to biological reproduction. Its random nature is utilized to improve the search for a global solution [9].

Since 2015, several researchers have applied the hybrid GA to lens design [10,11,12]. These kinds of GAs can be effectively applied to real-world problems and contain other techniques within their frameworks. It can be argued that hybrid GAs are more efficient than other types of optimization strategies in the field of lens design. Studies have shown that hybrid GAs can be usefully applied for correcting and eliminating chromatic aberrations.

The purpose of this review is to provide an overview about GAs used in lens design, starting with the background, the optimization problem, and specific requirements of GAs. We then discuss the use of GAs in lens design.

Background

Optical lens system

A search space for lens design encompasses a multi-dimensional space including several peaks, nonlinearity, and a strong correlation between parameters [13]. The search for local minima is dependent on the initial point solution. Only adjacent points of the initial solution are investigated [1]. Hence, diverse applications of global search methods can be inserted in optical design. Optical software includes special algorithms to investigate beyond optima [14,15,16].

A typical two-element air-spaced lens with nine variables would consist of 4 radii of curvature, 2 glass types, 2 thicknesses, and 1 airspace thickness. Apart from that, a multi-configuration lens includes corrections over the field of view and over a wide spectral band as well as over realistic temperature ranges and over a range of focal lengths. This kind of configuration indicates a complex design volume with many dimensions [5].

Predetermined constraints and parameters are necessary to create an optical lens design. Parameters would include the curvature of spherical surfaces, type of material, and element position. In addition, constraints include magnification, numerical aperture, and field of view. Economic factors incorporate cost, size, and the weight of the system elements. Moreover, the image quality depends on aberrations. The lower the aberrations, the better the image quality and the better the optical lens system [17].

Lens optimization

Typically, there are independent and dependent variables in lens design. Examples for independent variables are such as total surface number, material between surfaces, or the curvature of the surface and dependent variables such as effective focal length, back focal length, or distance from the object surface to the image surface. The most crucial part of lens design is the process of optimization. Optimization deals with receiving independent variables to discover the target values of dependent variables. If the amount of dependent variables is bigger than the amount of independent variables, it is not possible to achieve the target values of the dependent variables at the same time, and the problem becomes a least squares problem [6].

Problem areas in optimization

Optimization problems have to find the minimum solution of any dimensional problem (e.g., MinMax algorithm and least squares estimation). In the process of optimization, the global minimum or maximum solution is estimated. The global extremum is defined as a point where the function value is smaller or larger than at any other point in the search space.

The local minimum in optimization returns a function value which is smaller than at nearby points in the search space. This value should be greater than at a distant point in the search space [18]. It is necessary to find as many local minima as possible, because the merit function does not always precisely determine the lens quality. Hence, the designer should select the optimal solution among the local minima [6]. Typically, finding a global optimum within a search space of many local optima is a challenging problem for all systems which adapt and learn. A genetic algorithm can be used with the right setup to overcome this deficiency [9]. It is the task for the designer to choose a feasible design for an optical system and perform appropriate refinements through numerical modeling [4]. Moreover, the designer is in charge of fulfilling all necessary requirements and adjustments of the optimized lens design or must to restart the entire process again [5].

Since the 1940s, Baker [19], Feder [20], Wynne and Wormell [21] and Grey [22] have investigated lens optimization techniques which can overcome this problem in multi-dimensional space. Before the era of digital computers, lens design was calculated manually by the use of trigonometry and logarithmic tables to obtain 2D cuts through multi-dimensional spaces. Computerized ray tracing was introduced to facilitate quick lens modeling and the search of design space.

Optimization strategies

Usually, in nonlinear optimization problems the state-of-the-art technique is called the Broyden–Fletcher–Goldfarb–Shanno algorithm [23]. This iterative method is only feasible with available derivatives. Methods like DLS, Newton methods, and variants are common algorithms [24]. Generally, a quasi-Newton method is required to find the local minima and maxima of functions.

A GA, or metaheuristic, belongs to a class of evolutionary algorithms (EAs) [25] and is used to simulate and solve optimization problems by applying a population of solutions [26, 27]. In other words, the GA solves a problem which is encoded in a series of bit strings that are manipulated by the algorithm [28]. Furthermore, a GA copes with hard nonlinear, multimodal functions, as well as multi-objective optimization [1].

Genetic algorithms

GAs are both optimization algorithms and heuristic search methods for populations. They are inspired by natural processes, and in particular natural selection and genetic evolution.

Charles Darwin introduced the terminology of natural selection for the first time in his book On the Origin of Species in 1859 [29]. Every living organism is related and has a common ancestor. The theory assumes that complex creatures have gradually descended from oversimplified ancestors. Certain random mutation processes occur in the genetic organism’s code, and particular mutations are kept alive to aid in survival, with follow on generations receiving the last preserved mutations. With time, advantageous mutations will increase and cumulate to produce an entire new generation.

The term genetic algorithm was inspired by Darwin’s theory of evolution and first devised by Holland and Goldberg [30, 31]. It shows similarities to Rechenberg’s [32] Evolutionsstrategien (evolutionary strategies ESs) of 1973. Holland’s and Goldberg’s first approach to this kind of algorithm was theoretical. They used a binary code to describe individuals in a population. This work was later improved by Rechenberg [33].

GAs are applied to practical problems to assess the solution for a desired outcome, but to also improve the best solution. Examples for practical problems are image processing, prediction protein structures with three dimensions, or in very-large-scale integration. By applying a GA, instead of a specific solution to a problem, the characteristics of the solution are well known. In addition, restrictions of the solutions are used to reject possible and potential solutions. GAs are mostly applied in the field with many large complex problems where conventional algorithms cannot succeed. For example, the GA can be applied in combinatorial optimization, or parameter estimation [34].

Ordinarily, a population of individuals is preserved in a certain search space for a GA. The population represents a possible solution for a given specified problem. Each individual is coded with a finite length vector of variables in the binary alphabet \(\left\{ {0,1}\right\} \). In the genetic analogy, the individuals would resemble chromosomes and variables can be compared to genes. Chromosomes consist of various genes or variables, and each chromosome is composed of a binary string. Each bit in the string is characteristic of the solution [9].

When a GA is applied to find a solution in very large problems, it looks into millions of samples from the search space and creates small changes after recombining the best parts of the solution. Then, the resultant fitness value is compared with the current best solution, and the best solution is taken. The entire process is iterative until a stop condition is met (Fig. 1).

Fig. 1
figure 1

Procedure of a GA, modified from [35]

There are several benefits of using a GA over other optimization strategies. An important aspect is the use of optimization with a systematized set of continuous or discrete parameters for global optimization scenarios. It works with a large number of parameters. The result of applying a GA gives a set of solutions and is not a single solution [36]. On the other hand, high computational cost is required to look into billions of solutions which impede the optimization of hard problems. Fine-tuning of all parameters for the GA is associated with trials and errors [1, 37].

Procedure of a GA

Generally, a basic genetic algorithm includes five phases: 1. initialization, 2. selection, 3. crossover, 4. mutation, and 5. termination [38].

  1. 1.

    Initialization A gene set is built out of a population of candidate solutions. The algorithm generates random strings from the individual solutions to form an initial population. The initialization is done randomly to cover the total range of possible solutions in the search space. Normally, the population size is not depending on the nature of the problem, but has a reasonable size of about 100–1000 optimal solutions.

  2. 2.

    Selection and fitness value Individual genomes are selected from an existing population to breed the new generation. Individual solutions are selected through a fitness function within a fitness-based process and are named fitter solutions. Selection methods are chosen to rate the fitness of each solution. The fitness value is generated to give feedback so the GA can find the best solution. Most fitness functions are stochastic methods in order to select small proportions of less fitness solutions and maintain a variety of large populations. Furthermore, these functions prohibit premature convergence on poor solutions. Additional selection methods include roulette and tournament wheel selection.

    • Roulette Wheel Selection The fitness level is the requirement that each individual solution is linked with a probability of selection. In this method, the fitness value for each input is calculated and depicted on the wheel in portions of percentage (Fig. 2a). The wheel is rotated and has a search space of n-chromosomes. A chromosome with a high fitness value will be selected more than once.

    • Tournament Wheel Selection This method takes two solutions out of the pool of possible solutions. Then their fitness is compared, and the better solution will be replicated. Hence, the tournament selection chooses the best individual in each process. This approach is capable of looking at parallel architecture (Fig. 2b).

  3. 3.

    Crossover This genetic operator takes more than one parent solution and generates a child solution. Genes from parent chromosomes are taken, and a new offspring is produced. In detail, the operator selects a random crossover point (\(\vert\)). Everything in the binary string from the first chromosome before this point is copied and everything after this point from the second chromosome is copied to generate a new offspring (Table 1). It is possible to take several crossover points and ameliorate the performance of the GA by applying specific crossover on specific problems. Crossover also permits the exchange of information in solutions, similar to natural organism reproduction [34].

  4. 4.

    Mutation This operator changes a single bit randomly in the current generated offspring from the crossover operator, e.g., from 0 to 1 or from 1 to 0 (Table 2). The engine needs a way to produce a new guess by mutation the current one. The parent string is converted into an array with of parent strings, list(parent). After replacing 1 letter in this array with a random selected letter from the gene set, the result is recombined into a new string. The reason for mutation is to prevent that not all solutions of the population occur in the local optimum of the solved problem.

  5. 5.

    Termination The entire process is iterative until either the known solution has been found, the population of n-iterations has not changed, or a certain amount of time and generations have passed [9].

Fig. 2
figure 2

Selection methods [39]. a Roulette wheel selection, b tournament selection

Table 1 Single-point crossover operator
Table 2 Mutation operator

Genetic algorithms in lens system design

First studies of GA in lens design

In 1990, research into the application of EAs for the monochromatic quartet was proposed at the International Lens Design Conference, now IODC [40]. Constraints of the four-element lens design included only spherical surfaces, gradient-index (GRIN) optics elements, and Fresnel lenses.

Betensky successfully applied a GA to a Gaussian optics system design to correct aberrations, but mainly astigmatism. This algorithm was set with almost zero power operators including optimized structural changes in order to develop a lens system. To apply a GA to the zoom lens, problem is arduous due to the complex requirements for each operator [41]. A few years later, van Leijenhorst et al. investigated the GA as a tool for the automatic optimization and design of an optical lens system. Results showed fast and simultaneous corrected aberrations, even on less powerful computers. Further, they said it was possible that optical industries could use the GA for larger and more sophisticated optical systems [42].

Chen and Yamamoto applied a GA and a combined algorithm, including a GA and the DLS method, to lens design in order to correct lens aberrations and determine differences between these two methods. They found out that the GA is a useful algorithm for the global search and a beneficial starting point to perform the DLS method. Moreover, with the GA it is possible to avoid the local minima in gradient-based algorithms because the GA is based on a merit function of a population [26].

In the 2000s, Ono et al. [43] proposed a new lens optimization method by including real-coded GAs to small- and large-scale problems. They applied their technique successfully for global and multi-objective optimization. It worked very effective in finding good lens designs for both small- and large-scale problems. It was possible to analyze the lens design problem by optimizing a single criterion and with the two criteria such as distortion and resolution. The proposed GA utilizes unimodal normal distribution crossover (UNDX) and minimal generation gap (MGG) for an optimal lens design.

In terms of practical use, the proposed GA by Ono et al. could not be applied for several reasons. By changing the thickness and curvature, the GAs are not able to improve chromatic aberration. Due to this disadvantage, the algorithms are restricted to a single wavelength when designing optical systems such as IR cameras. Furthermore, the proposed GAs are not included in commercial CAD programs, which are essential for lens designers to use and do not provide an user interface that is easy to handle. A newer study by Fontana et al. [44] showed the possible implementation of a GA into a CAD tool they had developed for optimization and design.

Banerjee and Hazra studied the application of a GA on a structural lens design. They effectively accomplished the search for a global solution within utilitarian local optima. It is not possible to ascertain all values for the various parameters in a GA all at once. Alterations can probably affect the efficiency of the GA. The results could be used to improve the GA for optimization problems in real-life lens design [45].

Gagné et al. [46] applied EAs to an optimization criterion with complex mechanical constraints. Their results showed that EAs are comparable to those obtained by humans.

Thibault et al. from the Gagnés research group [46] discovered that on a real-life imaging problem the EA lens showed better results by a factor of almost two and was four times more sensitive than the expert lens design for the 1990 monochromatic quartet [40]. Moreover, an EA can explore a lens system, which is similar to a design performed by experts. Thibault et al. [1] did not incorporate sensitivity with regard to lens bending and lens shape.

Cuevas et al. applied the GA to solve the closed-fringe demodulation problem in 2006. The population of chromosomes in a GA is linked to the coefficients of polynomials to calculate the local phase of an interferogram window. Specifically, they used the multi-polynomial fitting (MPF) because the phase field is estimated and interpolated to any resolution size to assess the polynomial coefficients. In a second application, a GA was used on the nesting problem of finite materials. The nesting problem is based on the optimization of items which are nested in a valid place with the least wasted material [36].

Chen et al. used the GA in order to optimize Fresnel lenses which were inserted in light-emitting diode (LED) sources. It is not feasible to guarantee sufficient flux with a single LED, but with numerous LEDs it is possible. Chen et al. proposed an optimal design of a Fresnel lens with several LEDs to provide white light. The GA, including a fitness function with the appropriate illuminance and uniformity, was employed to search for the optimal groove angles of the Fresnel lens. They figured out that the generated optimal Fresnel lens showed more of an augmented light guidance than with typical Fresnel lenses for a multiple-LED reading light system. The problem is the intrinsically restricted execution speed while performing the nonimaging optical tool for the optimal design procedure because it is not designed to create an optimal design with more numbers of source light rays [47].

Similar results were achieved by Chen and Uang [48] with their hierarchical GA (HGA) in order to optimize a large-scale Fresnel lens for a multiple-LED reading light system.

Chen et al. [50] suggested another method to optimize the optical LED design. Taguchi method [49] is well-functioning in the discontinuous region but poor for the use of an optimal optical design because of immoderate time consumption during the analyses. Angle and average illuminance were observed and indicated that the evolved system is applicable to the optical design of different LED lenses [50].

Fang et al. used a GA to effectively eliminate both axial and lateral chromatic aberrations of two Gauss-type lens designs and to find the appropriate glass combination of two different Gauss-type lenses. These two Gauss lens designs can remove primary chromatic aberrations. A telephoto lens design was used due to its sensitivity to axial aberration; in addition, a wide-angle Gauss design was used to deal with lateral chromatic aberrations. In comparison with the DLS method, the proposed method to search for a two lens-type combination was more successful [51].

The lens designer has to deal with obstacles such as the variable nature of chromatic aberrations and influence. Fang et al. used the GA for lens design and optimization of the liquid lens element. The GA could be efficiently applied to replace the conventional least damping square (LDS) method to search for the optimal solution, including the chosen optical lens element, but also to quickly select the best glass combination. They achieved promising results in searching for the nest optical layout with liquid lenses and the best glass set to remove chromatic aberrations. This research took into account only the first-order aberrations of thin lenses. Hence, the results were satisfactory [52].

Other research by Fang et al. was focused on a new digital zoom layout and optimization using an altered GA. They successfully developed an optical design and optimization of digital zoom optics which includes the liquid aspheric lens surface and improved significantly the performance of zoom optics. They noted that the MTF resembles the conventional DLS method in terms of approaching the optical diffraction limit [35].

State of the art technologies

Bajpai and Kumar [9] applied the GA to achieve global optimization by using the Rastrigin’s function [53]. They determined with the Rastrigin’s function many local minima function and only one global minimum. Further, they investigated the reasons why a GA is a good optimization tool. One of the main benefits is its intrinsic parallelity and therefore the ability to assess various schemas at once [9].

Furthermore, a hybrid GA is more effective and efficient than a traditional GA and is achieved if the GA includes other techniques in its framework. These kinds of algorithms are inserted to solve real-world problems rapidly, precisely, and reliably, without any manual help [9].

The application of hybrid GAs in lens system design was studied by several authors [10, 12, 54]. Fang et al. proposed a hybrid Taguchi GA to eliminate chromatic aberrations more effectively than with the conventional DLS method. This algorithm was applied to zoom optics with a diffractive optical element (DOE). Compared with the DLS method, they found that chromatic aberration for optical lenses could be significantly reduced with the hybrid technology [54]. Also, Tsai et al. [55] successfully applied the hybrid GA to zoom optics to specify the best position for DOE and to remove chromatic aberrations of the zoom optics with a DOE.

In 2015, Tsai et al. investigated the effect of a GA with DLS optimization on a projector lens to ameliorate the field curvature aberration (FCA) and image resolution. Often optical software is not able to simultaneously optimize the FCA and image resolution of lens design. The software works either for global or for local optimization and can only give out results of local optimization. The combination of a hybrid GA and DLS could be an optimal optimization approach for commercial software and has the capability to improve both image quality and various aberrations [12].

Yen and Jin applied efficiently a GA on aspherical lens design to reduce aberrations in multi-focal artificial intraocular lenses (IOL) [10, 11]. They inserted a GA by mimicking the variation of thickness and curvature of the human eye into the optical software CODE V to create an IOL design. By comparing the built-in software algorithm with the GA, the suggested GA for IOL design showed more improvements of the spot size in root mean square (RMS), tangential coma (TCO), and the MTF.

Conclusion

In this paper, we have reviewed various results on the use of GAs in optical system design. A GA is applied to lens design to find the best global and stable solution within an optimization problem. Optimization is needed to improve the performance of a design. Compared to conventional optimization strategies (e.g., DLS), the GA is a powerful tool because it uses a coded parameter set, searches a population of points, and applies objective function information and probabilistic transition rules [56]. Specific studies have proven that GAs are perfect for finding the optimal groove angles of the Fresnel lens and are useful in finding the proper glass combination of two different Gauss-type lens designs. Several cutting edge studies successfully show that a hybrid GA can be useful in lens design to correct and eliminate chromatic aberrations in the axial and lateral view. Fast and simultaneous corrections were applied to zoom optics with certain DOEs. The missing availability of the GA in commercial CAD programs has been resolved.

However, there still exist some limitations on the use of GAs. Limitations of GAs include time consumption for convergence which can be improved by a proper sized population and many generations. Trial and error is connected with the fine-tuning of all indispensable parameters for a GA. Defining the right definition of the MF for a GA is another crucial issue in lens design. Moreover, an inappropriate fitness function design may lead to unintelligible solutions. Having said this, there is considerable scope for further research and exploration of GAs in optical engineering.