3.2. Programming and initial conditions setting.
The SIMION simulation program is coded to estimate the ions trajectories in the MRTOF model. An algorithm, named NMS simplex algorithm, is applied to control the iterative simulation. It works by repeatedly evaluating different values of the objective function. It starts by evaluating the function at a given starting point and various surrounding points generating by the given step value. The NMS optimization module provided by SIMION requires at least three inputs: a starting point, a step size, and an object function.
The starting point for the optimization process is an essential algorithm parameter that determines the initial searching point. In our simulations, the voltage configuration from the similar device [4] has been used, which provides one feasible parameter. The step size value is another important input parameter that requires careful consideration because it determines the shape of the simplex at startup. Parameter selection of the step size is described in more detail in the subsequent section. The objective of the search is to find the optimal voltage configurations, which entails minimizing the spatial distribution and energy distribution at each test plane in the radial direction while adhering to the voltage value limits. Here, we define the objective function f to be optimized.
f = (α*py_mean + β*pz_mean + γ*vy_mean + η*vz_mean) vy_mean = Stat.array_mean(vy _plane)
vz_mean = Stat.array_mean(vz _plane)
py_mean = Stat.array_mean(py _plane)
pz_mean = Stat.array_mean(pz _plane)
where the py_mean, pz_mean, vy_mean, vz_mean are the average value of radial position and velocity distributions of each test-plane, respectively, α, β, γ, η are coefficients. The ‘y’ and ‘z’ present orthogonal components in the radial direction. Stat.array_mean is the averaging operation over an array of numbers, which is available in SIMION’s LUA library. Some other parameters can be optionally used to tune performance in simulations, such as maxcalls and minradius, both of which affect when the optimization process stops. In this study, we utilized the default values for both parameters.
In the initialization phase, 39K+ions are created in the FLT using a Gaussian 3d distribution filling a space larger than the ejection aperture of the trap, so that the maximum possible beam diameter is taken into account. The initial cloud spans over about 1 mm around the center of the trap. The thermal energy distribution of the ion cloud in the trap is set to zero in this test, where the kinetic energy distribution of ions after leaving the trap is defined by the axial position inside the ejection field. Coulomb interactions between the different ions and between ions and image charges on the electrodes are not taken into account as only up to a few ions are transported at the same time in the experiment. The trajectory calculation setting was chosen with the default value. Potential arrays are arranged in a specific order.
As mentioned above, ions must be injected as an excellent ion pulse in order to achieve sustained flight over a long period of time. In the MRTOF setup, eight parameters have been iteratively optimized, including three accelerators, three drift tubes, and two lenses in the MRTOF analyzer.
Optimization method
4.1. Nelder–Mead simplex algorithm with constraints.
The Nelder–Mead simplex algorithm is a straightforward strategy with a small number of function calls, and it produces a fast initial decrease in function values [11] leading to time-efficient performance. The NMS algorithm utilizes the concept of a simplex, which is a special polytope of N + 1 vertices in N dimensions of the variable space. It moves the point of worst performance by means of geometrical reflection, expansion, contraction, or reduction [12] (as shown in Fig. 2). Note the following definitions: Xwst is the point of worst performance; Xwsd is the second-worst performance point; Xbst is the point of best performance; and Xcen the center of gravity. The possible procedures of the Nelder–Mead downhill simplex algorithm for the two variables case is shown in Fig. 2.