2.3 Numerical Optimization
2.3.2 GGC Integrated Optimization
The convenience of GGC lies in that it provides a clean and consise notation for repre-senting optical properties. Using GGC, a system of equations describing the relationship between a desired optical property and the various parameters of the optical system can be derived. This system of equations can then be solved to obtain one governing equa-tion that satisfies all of the desired optical properties. This governing equaequa-tion can then be integrated into the optimization algorithm as the kernel, such that the output of the algorithm are always bound by the governing equation.
The idea is that, instead of listing deviation from the desired optical properties as error functions to be optimized along with the imaging aberrations of the optical system, let the optimizer search for solutions on the premise that the desired optical properties are met in the first place. This way, the optimizer of the optical design software can focus its resources on doing what it does best, what it was designed to do, which is reduce
−1
Figure 50: Example of a solution space with two local minima.
aberration and improve imaging quality.
With that said, the optimizer algorithm and procedure is a critical part of commercial optical design software, and is in most cases beyond reach for end users to view, let alone modify. Nevertheless, the incorporation of the governing equation derived with GGC is still possible, however the exact procedure to do so will depend on the software.
Although the optimizer of commercial design software cannot be modified, they can be called upon as the core of a customized optimization program in the form of a sub-routine inside a programmable macro (.seq and .zpl files for Code V and Zemax respec-tively). In this research, a simple Monte Carlo random walk algorithm is used as the base of the customized optimizer, for its simplicity and robustness. The damped least square method often utilized by commercial design software, mentioned previously in Section2.3.1, does an excellent job for finding the local minima, however has a limited capability of escaping it.
A local minima can be visualized as a “dip” in the solution space of the error func-tions, a point in which the error function is the smallest relative to other points in the neighborhood. Figure50 shows an example of the solution space with two minima in
close proximity. The optimizer have but one simple job, and that is to find the point in the error function solution space such that the error function is the smallest.
In general, there are two types of search over the variable parameters, global and local. What a designer hopes to achieve using the design software is to find the globa minimum, however most of the time what the optimizer is feasible of is only finding a local minimum in the neighborhood of the state prior to the optimization. This has to do with the nature of the variable parameters of the optical system. A global search on a parameter is possible only if the range of which the parameter is able (or allowed) to vary over are known explicitly. This is, unfortunately, not true in general for optical design optimization. For example, the range of values for the surface radius of curvature can vary from negative to positive infinity, and the inter-surface thicknesses from zero to positive infinity. As such, the optimizer can only sample over these parameters locally. In terms of the solution space in Figure50, this means that if the algorithm chances upon the left minimum first, subsequent iterations would have trouble excaping it and finding the other lower minimum to the right.
Note that, this is not necessarily a bad thing. In fact, the ability to find the local min-ima is by definition what an optimizer should do in the first place. If the optimization algorithm repetitively tries to find a point in the solution space that yields a smaller er-ror than the current system, it will eventually reach a local minimum. What the design software, or designers ourselves, should consider is how to find the next one with even smaller error.
Again, commercial design software each deals with this issue differently (Global Syn-thesisoption in Code V, Global Search in Zemax), to various degree of effectiveness. The direction this research takes is to take advantage of the ability to find and homes in to the local minima using the optimizer algorithm of a commercial optical design software, and incorporating the ability to escape the local minimum to form a customized optimizer algorithm. The reason for this desicion is that, since commercial design software do not allow end users to inspect or modify the optimizer, there is little choice but to simply ac-cept it as a blackbox that finds the local minima, and that although the optimizer algorithm
cannot be modified, calling on it to act as part of a larger customized optimizer algorithm is completely fine.
Monte Carlo Random Walk Algorithm
The Monte Carlo random walk is an effective and simple method to construct an opti-mization algorithm. Displayed in Figure51is a diagram of the algorithm. The basic steps of this Monte Carlo algorithm are as follows.
• Step 1 Begin with an initial state.
• Step 2 Calculate errcurrent, the current error.
• Step 3 Propose a new state.
• Step 4 Calculate errnew, the new error.
• Step 5 Compare errnew with errcurrent. – Step 5A errnew< errcurrent
Accept the new state as the current state in the next iteration.
– Step 5B errnew> errcurrent
Reject or accept the new state with probability.
• Go back to Step 3
The robustness of the Monte Carlo algorithms lies in its random probabilistic nature (Step 5B). Allowing the algorithm to sometimes accept a “bad call” with a small probabil-ity leads to two important results. First, each iteration of the algorithm now have a small non-zero chance of escaping the current local minimum; and second, since the probability to accept a worse state is small, this is unlikely to cause a significant hinderance to the ability of the optimizer algorithm to find the current local minimum. When the number of iteration is large, this leads to:
errnew >
Figure 51: Flow diagram of the Monte Carlo random walk algorithm.
• Given enough iterations the Monte Carlo algorithm can, in principle, escape any local minima.
• Since the number of iteration is large, small degradations resulting from occasion-ally accepting a worse state is insignificant in the long run.
These two proerties form the fundamental principle behind this Monte Carlo algorithm.