# Constrained optimization of a zoom lens with CMA-ES algorithm

Tristan Marty, Sébastien Héron, Yann Semet

► To cite this version:

Tristan Marty, Sébastien Héron, Yann Semet. Constrained optimization of a zoom lens with CMA-ES algorithm. EOSAM 2025 - 13th European Optical Society Annual Meeting, Aug 2025, Delft, Netherlands. pp.02008, 10.1051/epjconf/202533502008. hal-05469697

HAL Id: hal-05469697

https://inria.hal.science/hal-05469697v1

Submitted on 21 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Constrained optimization of a zoom lens with CMA-ES algorithm

Tristan Marty<fnref n="1" />, <fnref n="2" />, Sébastien Héron<fnref n="1" />*, and Yann Semet<fnref n="1" />

**Abstract.** In the present paper we investigate how optimization algorithm can be tailored to improve the lens design process. We replaced gradient-based optimization methods by the Covariance Matrix Adaptation Evolution Strategy (CMA-ES). This stochastic algorithm is considered more robust and is well suited to avoid local optima often found in optical design. In addition, the algorithm is paired with an augmented Lagrangian method to incorporate constraints handling inside the computation framework. Performances are illustrated on a photographic zoom lens.

Many optical design software are coupled to optimization routines. Most of them rely on gradient-based methods like Levenberg-Marquardt algorithm. Today imaging systems are getting more and more complex either because of the introduction of innovative components such as freeforms, or due to zoom functionalities. Such systems require a large number of variables, exhibit multiple local optima and become overall more challenging to optimize. Thus, it becomes essential to explore new optimization methods such as Evolution Strategy.

## 1 Method

As opposed to gradient-based algorithms often used in lens design, we use a derivative free algorithm. The Covariance Matrix Adaptation Evolution Strategy (CMA-ES) is a stochastic algorithm designed to solve non-convex problems and which has found several applications to optical design [1, 2]. CMA-ES samples random optical systems according to a multivariate normal distribution. After ranking the different systems, it learns the distribution shape that favours most promising search directions [3]. This method is well suited when the number of variable increases and when local optima are expected. When constraints are present, we can inject an Augmented Lagrangian term to the menis function [4]. This handling of constraints is more effective than penalising the merit function with a quadratic term.

## 2 Results

The effectiveness of the method is highlighted through the optimization of a photographic zoom lens. The focal length of these systems can be modified thanks to some mechanical

<footnote n="1">¹Thales Research and Technology, 91120 Palaiseau, France</footnote>

<footnote n="2">²Inria and École Polytechnique, 91120 Palaiseau, France</footnote>

<footnote>* Corresponding author: sebastien.heron@thalesgroup.com</footnote>
motion and image quality must stay good for all focal lengths. Here we optimize specifically the systems for focal lengths of 30mm, 60mm and 90mm. We add an Augmented Lagrangian term to the merit function to satisfy these specifications without impacting convergence. Besides, lens optimization often start from an already adequate optical system. However, to introduce as little bias from the designer as possible, our starting system is only made of glass plates. We choose to optimize four groups of three lens. Groups two and three can move between different zoom configurations. The system is optimized for visible light. The simulation of the rays throughout the system is done with an custom raytracer developed in-house. In addition, the glass selection is done with a mixed-integer version of CMA-ES [5].

The optimized solution is found within $2.5 \times 10^5$ function evaluations and took under 40 minutes to run with an Nvidia GeForce RTX 2060 Mobile GPU. For all focal lengths the spot size RMS is smaller than $6\mu m$ on the axis and smaller than $10\mu m$ for the maximum image height with a diffraction limit of approximately $2\mu m$. In a real application, designer can finalize and tolerance the system with conventional methods.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Optimized zoom system for a focal length of 60mm</figcaption></figure>

## 3 Conclusion

Covariance Matrix Adaptation Evolution Strategy in conjunction with Augmented Lagrangian has proven to find competitive solutions for constrained problems, in particular for systems with variable focal length. This performance has been achieved in only one optimization run and in less than one hour, despite the large number of variables of the system. Future work may investigate the behaviour of the algorithm on freeform surfaces.

## References

1. M.D. Nijkerk, J.M. Gruber, B. Boonacker, Freeform optics design tool for compact spectrometers, in Proceedings of International Conference on Space Optics—ICSO 2018, Vol. 11180, pp. 780-788. (2019). https://doi.org/10.1117/12.2535993

2. S. Héron, Y. Semet, R. Barrère, M.S.L. Lee, B. Loiseaux, Automated design of freeform off-axis three-mirrors-anastigmat, in Imaging Systems and Applications, pp. IW3C-2, (2022). https://doi.org/10.1364/ISA.2022.IW3C.2

3. N. Hansen, The CMA Evolution Strategy: A Tutorial. (2016), ArXiv, abs/1604.00772.

4. P. Dufossé, N. Hansen, Augmented Lagrangian, penalty techniques and surrogate modeling for constrained optimization with CMA-ES, in Proceedings of the Genetic and Evolutionary Computation Conference, pp. 519-527. (2021). https://doi.org/10.1145/3449639.3459340

5. T. Marty, N. Hansen, A. Auger, Y. Semet, S. Héron, LB+ IC-CMA-ES: Two Simple Modifications of CMA-ES to Handle Mixed-Integer Problems, in International Conference on Parallel Problem Solving from Nature, pp. 284-299 (2024). https://doi.org/10.1007/978-3-031-70068-2_18