Fig. 3. The image of Nelder–Mead downhill simplex algorithm procedures in two dimensions on a generalized triangle. The modified simplex is shown with a dashed line.
The optimization problem can be written as:
\(\underset{x}{\min F}(x),\ x\in R^{n}\) ,
where \(F(x)\) is a scalar function of the variables \(x\), and \(x\) is a vector or a matrix with no explicit limitation of the components, where we assume each element is a real number.
The algorithm works by repeatedly evaluating \(F(x)\) for different input values \(x\), while replacing the ”worst” vertex for producing the largest value for \(F(x)\) with a new vertex. A sequence of triangles (in the 2D example) is formed, and the function values at the vertices continuously become smaller. The size of triangles is automatically reduced, and the coordinates of the local minimum point in the vicinity of the initial triangle are found.
For the actual situation of the MRTOF-MS, wherein the variable parameters always have bounds due to high-voltage power supply limitations (or to avoid electric discharges), optimization problems can be rewritten to avoid such parameter values. In order to account for limitations, we aim to solve the following bound-constrained variable optimization problem:
\(\underset{x\in R^{n}}{\min F}(x),\ subject\ to\ x_{k}^{l}\leq x_{k}\leq x_{k}^{u}\),
where F (x ) is the same scalar functions of the variablesx , where \(x_{k}^{l}\) and \(x_{k}^{u}\) are lower and upper scalar bounds, respectively, and k is the parameter index (in this case one of the voltages).
Although the NMS algorithm is not designed to solve constrained optimization problem in general, it is still a good choice to use this derivative-free algorithm with some modification for the optimum voltage configurations within a given solution space.
Nelder and Mead suggested two ways for handling constraints: (A) transforming the scale of the variables and (B) modifying the function value so that it takes a high positive value in case any constraint is violated[8, 13]. Various constraint handling strategies [14] have been proposed later, like reset the vertices outside the constraints by certain rules.
In our MRTOF situation, for our boundaries, the penalty method frequently gave an unsatisfactory outcome, where the penalty function receives a high merit number for trials outside of the boundaries, and the simplex appears to oscillate around this unfortunate configuration. To improve on such situation, it is a reasonable choice if a proper initial simplex is given [15]. However, this problem can be avoided by defining a periodic function to transform the original variable, whereby the simplex algorithm cannot exceed the boundary for the variables. The variables entering the objective function are replaced by a different value, which is transformed. This leads to a limitation of the space where the simplex algorithm moves. After that, the inverse transform on the initial variable is performed to obtain the original value of the voltage. A typical transforming method [16] is as follows: Let V denote the vector of search variables of sizeN . Let \(V_{i}^{\text{ub}}\) and \(V_{i}^{\text{lb}}\)denote the upper bound and lower bound on the i -th search variable, respectively, and let denotex the new search variable vector.
We obtain the initial transformed variables from
\begin{equation} x_{i}=\operatorname{}{(\frac{V_{i}-V_{i}^{\text{lb}}}{V_{i}^{\text{ub}}-V_{i}^{\text{lb}}}\times 2\ -\ 1)+2\pi}\nonumber \\ \end{equation}
And do the inverse transform by:
\begin{equation} V_{i}=\frac{\left(V_{i}^{\text{ub}}-V_{i}^{\text{lb}}\right)\times\left(\sin x_{i}+1\right)}{2}+V_{i}^{\text{lb}}\nonumber \\ \end{equation}
from which follows that\(V_{i}^{\text{lb}}\leq V_{i}\leq V_{i}^{\text{ub}}\), since the values of the function\(\frac{f\left(x_{i}\right)=\left(\sin x_{i}+1\right)}{2}\) are always inside of the interval 0 ~ 1 as shown in Fig. 4 and \(V_{i}\) is therefore bound due to the nature of trigonometric functions.
This modified Nelder–Mead simplex (MNMS) algorithm will be utilized as a solver for ion transport optimization problem.