# A Monge–Ampère Problem with Non-quadratic Cost Function to Compute Freeform Lens Surfaces

- 120 Downloads

## Abstract

In this article, we present a least-squares method to compute freeform surfaces of a lens with parallel incoming and outgoing light rays, which is a transport problem corresponding to a *non-quadratic* cost function. The lens can transfer a given emittance of the source into a desired illuminance at the target. The freeform lens design problem can be formulated as a Monge–Ampère type differential equation with transport boundary condition, expressing conservation of energy combined with the law of refraction. Our least-squares algorithm is capable to handle a non-quadratic cost function, and provides two solutions corresponding to either convex or concave lens surfaces.

## Keywords

Monge–Ampère equation Transport boundary conditions Non-quadratic cost function Least-squares method Freeform lens surfaces Optical design Inverse problem## Mathematics Subject Classification

35A15 35J15 35J20 35J96 4900 65N08 65N21 78A05## 1 Introduction

The optical design problem involving freeform surfaces is a challenging problem, even for a single mirror/lens surface which transfers a given intensity/emittance distribution of the source into a desired intensity/illuminance distribution at the target [1, 2, 3]. More specifically, the freeform design problem is an *inverse problem*: “Find an optical system containing freeform refractive/reflective surfaces that provides the desired target light distribution for a given source distribution”. Inverse optical design has a wide range of applications from LED based optical products for street lighting and car headlights to applications in medical science, image processing and lithography [1, 4].

There are several numerical methods which can be employed to compute freeform surfaces of optical systems characterized by a quadratic cost function. However, to the best of our knowledge, this paper is the first to describe a numerical method for the MA-equation with non-quadratic cost function. Froese et al. [11, 12, 13] solve the standard MA-equation within the framework of optimal mass transport (OMT). Applying the theory of viscosity solutions, they refine the solution using an iterative Fourier-transform algorithm with overcompensation. In recent publications [5, 14, 15], the authors obtain freeform optical surfaces by solving the standard MA-equation using Newton iteration. These numerical methods require an initial guess which is obtained through the OMT problem. Brix et al. [3, 16] solve the standard inverse design problem using a collocation method with a tensor-product B-spline basis. Glimm and Oliker [8, 17] show that the illuminance control problem can be solved using an optimization approach instead of solving a MA-type differential equation. Further, a similar approach to design freeform surfaces of a lens is developed by Rubinstein and Wolansky [18].

A least-squares (LS) method [2, 7] has been presented to solve the standard MA-equation to compute single reflector/lens or double reflector freeform surfaces optical systems. The method provides the optical mapping which transfers the given emittance of the source into the desired illuminance at the target, and the freeform surfaces are obtained via this mapping.

However, the coupled freeform lens surfaces design problem corresponds to a non-quadratic cost function. The goal of this paper is to present a numerical method which is applicable to design an optical system corresponding to a non-quadratic cost function. Here, we present a fast and effective extended least-squares (ELS) method to construct the freeform surfaces of the lens. The ELS-method is a two-stage procedure like the LS-method: first we determine an optimal mapping by minimizing three functionals iteratively, next, we compute the freeform surfaces from the converged mapping. In the first stage, there are two nonlinear minimization steps, which can be performed point-wise, like in the LS-method. In the third step two elliptic partial differential equations have to be solved. For the LS-method, these are decoupled Poisson equations. However, in the ELS-method these are coupled elliptic equations.

Our least-squares method is quite generally applicable since it can handle arbitrary twice differentiable cost functions \(c(\texttt {x}, \texttt {y})\), also in other fields of science and engineering such as optimal transport theory, shape optimization, compression modeling, relativistic theory, incompressible fluid flow, economics, astrophysics, atmospheric sciences etc. For the interested reader, we refer to the following: Evans’ survey notes [19], articles of Bouchittè-Buttazzo [20, 21], Gangbo’s lecture notes [22], and paper of Benamou–Brenier [23]. However, we restrict ourselves to the computation of freeform optical systems.

This paper is structured as follows. In Sect. 2 we explain the geometrical structure of the optical system and formulate the mathematical model. The detailed procedure of the proposed least-squares method is shown in Sect. 3. We apply the numerical method to four test problems in Sect. 4 and verify the solutions using a ray tracing algorithm [2]. Finally, a brief discussion and concluding remarks are given in Sect. 5.

## 2 Formulation of the Problem

*z*the horizontal coordinate and \(\texttt {x} = (x_1, x_2)\in \mathbb {R}^2\) the coordinates in the plane \( z = 0\), denoted by \(\alpha _1\), and let \(\mathcal {S}\) be a bounded source domain in the plane \(\alpha _1\). The source \(\mathcal {S}\) emits parallel light rays which propagate in the positive

*z*-direction. The emittance, i.e., luminous flux per unit area (for an introduction to photometry quantities see e.g. [24, p. 7–9]), of the source is given by \(f(\texttt {x})~ [{\mathrm {lm/m}}^{2}],~ \texttt {x}\in \mathcal {S} \), where

*f*is a non-negative integrable function on the domain \(\mathcal {S}\). The target at a distance \(\ell >0\) from the plane \(\alpha _1\) is denoted by \(\mathcal {T}\).

The incoming light rays are refracted at the first lens surface \(\mathcal {L}_1\), propagate through the lens and are refracted again at the second lens surface \(\mathcal {L}_2\), to create a parallel bundle of light rays in the positive *z*-direction. The index of refraction of the lens \(n>1\) and the surrounding medium is air with refractive index of unity. The lens surfaces are defined as \(z \equiv u_1(\texttt {x})\), \(\texttt {x} \in \mathcal {S}\) and \( w \equiv \ell -z = u_2(\texttt {y})\), \(\texttt {y}\in \mathcal {T}\), respectively, where \(\texttt {y} = (y_1, y_2)\in \mathbb {R}^2\) are the Cartesian coordinates of the target plane \(\alpha _2\).

The goal is to design a lens system such that after two refractions the refracted rays must form a parallel beam, propagating in the positive *z*-direction, and provide a prescribed illuminance \(g(\texttt {y}) ~ [{\mathrm {lm/m}}^{2}]\) at the plane \( \alpha _2 : z = \ell \), where \(g>0\) is a positive integrable function on the domain \(\mathcal {T}\). It is assumed that both \(\mathcal {L}_1\) and \(\mathcal {L}_2\) are perfect lens surfaces and no energy is lost in the refraction.

### 2.1 Geometrical Formulation of the Freeform Lens

In this section, we first give an expression for the ray-trace map, and secondly we derive a mathematical formulation for the location of the freeform surfaces using the laws of geometrical optics.

*z*-direction, let \({\hat{\varvec{s}}}\) be the unit direction of the incident ray. The ray strikes the first lens surface \(\mathcal {L}_1\), refracts off in direction \({\hat{\varvec{t}}}\), strikes the second lens surface \(\mathcal {L}_2\), and reflects off, again in the direction \({\hat{\varvec{s}}}\). The unit surface normal of the first lens surface \(\mathcal {L}_1\), directed towards the light source, is given by

*n*the refractive index of the lens and

*d*reads

*d*from Eq. (11), the expression becomes

*d*from relation (9), the above expression becomes

To conclude, we have derived a mathematical formulation representing the freeform lens optical system which is given in (19). Also, we obtained the expression (13) for the ray-trace mapping \(\varvec{m}\). Next, we formulate a second order partial differential equation for the freeform lens.

### 2.2 Energy Conservation for the Freeform Lens

*c*depends on \(|\texttt {x}-\texttt {y}|\). This can be verified as follows: let us rewrite the cost function (19) as

In the following section, we give a detailed description of the ELS-algorithm to solve the MA-equation (34) with the boundary condition (23) and constraints (35). The method presented here is based on [7]. Compared to [7] we deal with a non-quadratic cost function that results in the presence of the matrix \(\varvec{C}\) in (34).

## 3 Numerical Algorithm

Prins et al. [7] introduced a least-squares method to compute single freeform surfaces governed a quadratic cost function. Further, we applied the method to design a two-reflector optical system [2], which is also a quadratic cost problem. Our version of the least-squares method was inspired by publications by Caboussat et al. [30, 31], who developed a least-squares method for the Monge–Ampère–Dirichlet problem. An extension of their method to the three-dimensional equation is presented in [32].

In this section, we extend the least-squares method to compute the freeform surfaces of a lens characterized by a non-quadratic cost function. The ELS-method is a two-stage procedure. In the first stage we calculate the optimal mapping by minimizing three functionals iteratively, and in the second stage we compute the freeform surfaces from the mapping in the least squares sense.

### 3.1 First Stage: Calculation of the Mapping

*C*at every iteration. In this article, we give a detailed description of the minimization steps (41b) and (41c). The minimization step first (41a) is simple and direct, and performed point-wise because no derivative of \(\varvec{b}\) with respect to \(\texttt {x}\) appears in the functional, more details can be found in [7].

Finally, from the converged mapping \(\varvec{m}\), we compute the first lens surface \(u_1\) via relation (26) in a least-squares sense, and the second lens surface \(u_2\) from relation (19), see Sect. 3.2.

**Minimizing procedure for** \(\varvec{P}\)

*H*. For each grid point \(\texttt {x}_{ij} = (x_{1,i}, x_{2,j})\in \mathcal {S}\) we have the following quadratic minimization problem

*f*/

*g*there exist at least one and at most four real solutions, see “Appendix A”. From these we have to select the ones that give rise to a negative semi-definite matrix \(\varvec{P}\), and we will also show that this is always possible. Finally, we compare the values of \(H_\mathrm {S}(p_{11}, p_{22}, p_{12})\) to find the global minimum.

**Minimizing procedure for** \(\varvec{m}\)

*n*and \(n+1\), for ease of notation. In the calculations that follow, we use the identity for the Frobenius norm of matrices, i.e.,

*J*with respect to \(\varvec{m}\) in the direction \(\varvec{\eta }\in [C^2(\mathcal {S})]^2\) is given by

### 3.2 Second Stage: Calculation of the Freeform Surfaces

*I*in (67) in a direction

*v*is given by

## 4 Numerical Results

### 4.1 From a Square to a Circle

### 4.2 From an Ellipse to Another Ellipse

### 4.3 From a Square to a Non-convex (Flower) Target

*J*after 250 iterations is \(2.73\times 10^{-7}\), \(7.05\times 10^{-6}\), \(3.93\times 10^{-5}\) and \(9.99\times 10^{-5}\), respectively. The convergence problem arises for target domains which strongly deviate from a convex shape, but if the shape deviates mildly from convex, the algorithm performs satisfactorily, see Fig. 4a–d.

### 4.4 From a Square to a Picture

Note that the picture is converted into grayscale and contains some black regions, which results in \(g(y_1, y_2) =0\) for some \((y_1, y_2)\in \mathcal {T}\). This would give division by 0 in the least-squares algorithm. Therefore, we have increased the illuminance to \(5\%\) of the maximum value if it is less than this threshold value. We discretized the source \(\mathcal {S}\) on a \(500\times 500\) grid, with 1000 boundary points. The convergence history of the algorithm is shown in Fig. 6b for \(\alpha = 0.70\). We stopped the algorithm after 150 iterations, because \(J_\mathrm {I}\) and \(J_\mathrm {B}\) did no longer seem to decrease. The resulting mapping is shown in Fig. 6a, the image details can be recognized in the grid. The optical system is verified using the ray tracing algorithm [2]. We ran our ray tracing algorithm for 10 million uniformly distributed random points on the source to compute the actual illumination pattern produced on the target. The target illuminance for 10 million rays is plotted in the Fig. 5. The output images is very close to the corresponding original image, although the image is slightly blurred, but even complex details can be identified. The functions \(u_1(\texttt {x})\) and \(u_2(\texttt {y})\) representing the freeform surfaces \(\mathcal {L}_1\) and \(\mathcal {L}_2\) of the lens, respectively, are shown in Fig. 7. The lens surfaces are convex on their respective domains and an alternative representation of the mapping can be seen as contour of grids on the second lens surface.

## 5 Discussion and Conclusion

We introduced a least-squares method to compute freeform surfaces of an optical system corresponding to a non-quadratic cost function. The method is an extended version of the least-squares method, earlier introduced in [7]. Furthermore, we presented a new generic (in term of cost function) minimization procedure of \(\varvec{P}\) for the functional \(J_\mathrm {I}\). Moreover, we have shown that the minimization procedure of the mapping \(\varvec{m}\) for the total functional *J* consists of coupled elliptic PDEs.

We presented the extended least-squares method to compute coupled freeform surfaces of a lens. Our method can compute freeform surfaces of any optical system corresponding to a twice continuously differential cost function, which demonstrates the wider applicability of the method. The ELS-method also shows good performance for a non-convex target domain: as long as the domain does not deviate too much from a convex shape.

The algorithm is very time and memory efficient, and provides both convex and concave optical surfaces which makes it very suitable to use for these type of problems. Furthermore, we have applied the method to a very challenging problem containing the details of the costumes of the Indian classical dance Bharatanatyam and obtained a high resolution, preserving details of the original picture.

In future work we would like to apply the algorithm to more complex cost functions, e.g., point light sources and far-field problems. Also, we would to explore the applicability of the Monge–Ampère solver in other fields of science and engineering.

## Notes

## Supplementary material

## References

- 1.Adrien, B., Axel, B., Rolf, W., Jochen, S., Peter, L.: High resolution irradiance tailoring using multiple freeform surfaces. Opt. Express
**21**(9), 10563–10571 (2013)CrossRefGoogle Scholar - 2.Yadav, N.K., ten Thije Boonkkamp, J.H.M., IJzerman, W.L.: A least-squares method for the design of two-reflector optical system. J. Phys. Photonics (accepted)Google Scholar
- 3.Brix, K., Hafizogullari, Y., Platen, A.: Designing illumination lenses and mirrors by the numerical solution of Monge–Ampère equations. J. Opt. Soc. Am. A
**32**(10), 803–837 (2015)zbMATHGoogle Scholar - 4.Fang, F.Z., Zhang, X.D., Weckenmann, A., Zhang, G.X., Evans, C.: Manufacturing and measurement of freeform optics. CIRP Ann. Manuf. Technol.
**62**(2), 823–846 (2013)CrossRefGoogle Scholar - 5.Chang, S., Wu, R., Zheng, Z.: Design beam shapers with double freeform surfaces to form a desired wavefront with prescribed illumination pattern by solving a Monge–Ampère type equation. J. Opt.
**18**, 125602 (2016)CrossRefGoogle Scholar - 6.Oliker, V.: Differential equations for design of a freeform single lens with prescribed irradiance properties. Opt. Eng.
**53**(3), 031302 (2013)CrossRefGoogle Scholar - 7.Prins, C.R., Beltman, R., ten Thije Boonkkamp, J.H.M., IJzerman, W.L., Tukker, T.W., : A least-squares method for optimal transport using the Monge–Ampère equation. SIAM J. Sci. Comput.
**37**(6), B937–B961 (2015)Google Scholar - 8.Glimm, T., Oliker, V.: Optical design of two-reflector systems, the Monge–Kantorovich mass transfer problem and Fermat’s principle. Indiana Univ. Math. J.
**53**(5), 11070–11078 (2004)MathSciNetCrossRefzbMATHGoogle Scholar - 9.Oliker, V.: On design of free-form refractive beam shapers, sensitivity to figure error, and convexity of lenses. J. Opt. Soc. Am. A
**25**(12), 3067–3076 (2008)MathSciNetCrossRefGoogle Scholar - 10.Oliker, V.: Designing freeform lenses for intensity and phase control of coherent light with help from geometry and mass transport. Arch. Ration. Mech. Anal.
**201**(3), 1013–1045 (2011)MathSciNetCrossRefzbMATHGoogle Scholar - 11.Froese, B.D.: A numerical method for the elliptic Monge–Ampère equation with transport boundary conditions. SIAM J. Sci. Comput.
**34**, A1432–A1459 (2012)CrossRefzbMATHGoogle Scholar - 12.Benamou, J.D., Froese, B.D., Oberman, A.M.: A viscosity solution approach to the Monge–Ampère formulation of the optimal transportation problem. arXiv:1208.4873 (2013)
- 13.Benamou, J.D., Froese, B.D., Oberman, A.M.: Numerical solution of the optimal transportation problem using the Monge–Ampère equation. J. Comput. Phys.
**260**, 107–126 (2014)MathSciNetCrossRefzbMATHGoogle Scholar - 14.Bösel, C., Gross, H.: Single freeform surface design for prescribed input wavefront and target irradiance. J. Opt. Soc. Am. A
**34**(9), 1490–1499 (2017)CrossRefGoogle Scholar - 15.Wu, R., Xu, L., Liu, P., Zhang, Y., Zheng, Z., Li, H., Liu, X.: Freeform illumination design: a nonlinear boundary problem for the elliptic Monge–Ampère equation. Opt. Lett.
**38**(2), 229–231 (2013)CrossRefGoogle Scholar - 16.Brix, K., Hafizogullari, Y., Platen, A.: Solving the Monge–Ampère equation for the inverse reflector problem. Math. Models Methods Appl. Sci.
**25**, 803–837 (2015)MathSciNetCrossRefzbMATHGoogle Scholar - 17.Glimm, T., Oliker, V.: Optical design of single-reflector systems and the Monge–Kantorovich mass transfer problem. J. Math. Sci.
**117**(3), 4096–4108 (2003)MathSciNetCrossRefzbMATHGoogle Scholar - 18.Rubinstein, J., Wolansky, G.: Intensity control with a free-form lens. J. Opt. Soc. Am. A
**24**(2), 463–469 (2007)MathSciNetCrossRefGoogle Scholar - 19.Evans, L.C.: Partial differential equations and Monge–Kantorovich mass transfer. In: Current Developments in Mathematics, Cambridge (1997), International Press, Boston, pp. 65–126 (1999)Google Scholar
- 20.Bouchittè, G., Buttazzo, G., Seppecher, P.: Shape optimization solutions via Monge–Kantorovich equation. C. R. Acad. Sci. Paris Ser. I Math.
**324**(10), 1185–1191 (1997)MathSciNetCrossRefzbMATHGoogle Scholar - 21.Bouchittè, G., Buttazzo, G.: Characterization of optimal shapes and masses through Monge–Kantorovich equation. J. Eur. Math. Soc.
**3**(2), 139–168 (2001)MathSciNetCrossRefzbMATHGoogle Scholar - 22.Gangbo, W.: An Introduction to the Mass Transportation Theory and Its Applications. Lecture Notes: School of Mathematics Georgia Institute of Technology Atlanta, USA (2004)Google Scholar
- 23.Benamou, J.D., Brenier, Y.: A computational fluid mechanics solution to the Monge–Kantorovich mass transfer problem. Numer. Math.
**84**(3), 375–393 (2000)MathSciNetCrossRefzbMATHGoogle Scholar - 24.Prins, C.R.: Inverse Methods for Illumination optics. Ph.d. thesis, Eindhoven University of Technology (2014)Google Scholar
- 25.Glassner, A.S.: An Introduction to Ray Tracing. Academic Press Ltd, London (1991)zbMATHGoogle Scholar
- 26.Born, M., Wolf, E.: Principles of Optics, 5th edn. Pergamon Press, Oxford (1975)Google Scholar
- 27.Villani, C.: Topics in Optimal Transportation. Graduate Studies in Mathematics, vol. 58. American Mathematical Society, Providence (2003)zbMATHGoogle Scholar
- 28.Ries, H., Rabl, A.: Edge-ray principle of nonimaging optics. J. Opt. Soc. Am. A
**11**(10), 2627–2632 (1994)MathSciNetCrossRefGoogle Scholar - 29.Villani, C.: Optimal Transport Old and New, vol. 338. Springer, Berlin (2009)CrossRefzbMATHGoogle Scholar
- 30.Caboussat, A., Glowinski, R., Sorensen, D.C.: A least-squares method for the numerical solution of the Dirichlet problem for the elliptic Monge–Ampère equation in dimension two, ESAIM. J. Control Optim. Calc. Var.
**19**(3), 780–810 (2013)CrossRefzbMATHGoogle Scholar - 31.Glowinski, R.: Variational Methods for the Numerical Solution of Nonlinear Elliptic Problems. SIAM, Philadelphia (2015)CrossRefzbMATHGoogle Scholar
- 32.Caboussat, A., Glowinski, R., Gourzoulidis, D.: A least-squares/relaxation method for the numerical solution of the three-dimensional elliptic Monge–Ampère equation. J. Sci. Comput
**77**(1), 53–78 (2018)MathSciNetCrossRefzbMATHGoogle Scholar - 33.Adams, R.A., Essex, C.: A Complete Course Calculus, 8th edn. Pearson, Toronto (2013)Google Scholar
- 34.Mesterton-Gibbons, M.: A Primer on the Calculus of Variations and Optimal Control Theory, 1st edn. American Mathematical Society, Providence (2009)zbMATHGoogle Scholar
- 35.Mattheij, R.M.M., Rienstra, S.W., ten Thije Boonkkamp, J.H.M.: Partial Differential Equations. Society for Industrial and Applied Mathematics, Philadelphia (2005)CrossRefzbMATHGoogle Scholar
- 36.Tignol, J.: Galois’s Theory of Algebraic Equations. Longman Scientific and Technical, Harlow (1988)Google Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.