Fig. 7. Flowchart of the MNMS algorithm. Red notes are parts for revision, the blue arrow shows the schematic of the double minimum check, a perturb point is randomly put to adjacent domain.
Fig. 8 shows the changes in function value with the re-checks for the global minimum. After comparing the values of the random points next to the search area with the values of the simplex points numerous times, no superior configuration has been discovered. Thus, we can ensure the validity of the minima. It should be noted that this is not a true global minimum, the globality of the result has not been proven strictly.
Fig. 8. Function value and various electrodes voltages as functions of the iteration number of the algorithm.
4.4. Parameter setting of MNMS algorithm
Correctly setting algorithm parameters is critical as it ensures the correctness of the solutions and the robustness of the optimization procedure. A number of parameters influence the optimization process. To decide the optimal values for these parameters, the performance with different parameter choices was investigated. Four basic algorithm parameters (consisting of coefficients of reflection, expansion, contraction, and shrinkage) that define a complete NMS algorithm are chosen to use the default values. Other optional parameters in simulations, such as maxcalls and minradius, are also set to use the default values. Because the default values of the parameters are suitable for most of the general problems, changing the values did not show much benefit but instead affected algorithm stability.
A problem encountered in this procedure was that the size of the initial simplex had an impact on the speed of convergence and globality of the searching process. The step size is a crucial algorithm parameter that requires careful consideration as it determines the shape of the simplex at startup. Therefore, several simulations are performed to explore the relationship between the step value and the effect of optimizations.
Fig. 9 shows the changes in the searching range in two variable dimensions with the step value increasing from 0.5 to 20. A tendency towards a larger searching area for the two variables was observed as the step value increased until 13, after which an opposite trend was observed. As previously indicated, a variable transformation was introduced to the NMS algorithm. This transformation imposes a periodic change on the variables, making excessively large variable values meaningless. To avoid the optimization result getting trapped in a local minimum prematurely, broad search range for the solution space and a big starting simplex are required. Taking into account the periodicity of the variables, the optimal step value might be selected from 5 to 13. In the following simulation, a step value of 5 is adopted considering the time-consuming of the calculations.
Fig. 9. Distribution in two dimensions under different Step value setting, variable 1 and 4 are first and third drift tube voltages, respectively.
Results and discussion
In this study, we focus on optimizing ion transport in an MRTOF-MS. By utilizing an MNMS algorithm in the simulation analysis, we optimized eight electrodes with significant influence on the transportation of ion beams starting from the flat ion trap. After a series of iterative optimizations, the ion trajectories have been improved, and the objective function value has been reduced from the tens level to 10–2.
In applications, MRTOF works either in straight mode (Fig. 10) for full spectral or in reflection mode (Fig. 11, reflected with 50 laps) for high resolution. The ion trajectory simulation after extraction from the FTL is presented in Figs. 10 and 11. is the optimizations in straight mode, and Fig. 11 is the reflection flight optimizations with 50 laps. The objective of these simulations is to minimize spatial and energy distributions in the radial direction. For each of the figures, the screenshots marked A to D, from top to bottom, show the changes in simulation results during the optimization process. Herein, A1, A2, A3, DT1, DT2, DT3, and two lens electrodes in MRTOF were optimized. Comparing the trajectories of the ions, we can see that constant optimizations produce good results, whether in the full spectral mode or high-resolution mode. The algorithm has apparent optimization effects compared to the initial state. Trajectories become so accordant that they almost overlap in a line. This situation keeps similar in a reflective state. Moreover, in reflection mode, the transmission efficiency also improves. Ion losses before optimization can be clearly observed in Fig. 11(A), where ions are lost due to collision on the lens. While a well-adjusted ion beam appears with the use of appropriate electrical parameters for optimization and a 100% transmission efficiency is achieved as shown in Figs. 11(B), (C), and (D).
Significant improvements in ion transmission were observed after running the MNMS algorithm, indicating that the new MNMS algorithm is effective in MRTOF simulation. It is quite efficient in quickly finding the optimal solution (within a few hours for each optimization). Moreover, it requires very little storage and information for execution. Because of its simplicity and robustness, it seldom fails in the optimization process.