1 Introduction

As stand-alone devices for mass analysis, quadrupole ion traps are capable of storing ions and analyzing their mass-to-charge ratios (m/z) [1, 2], more importantly, performing tandem MS experiments and gas-phase ion chemistry [36]. When combined with other mass analyzers, it has elevated the performances of hybrid instruments [715]. As one of the most critical factors associated with ion trap performance, space charge effect has significant impacts on ion trap dynamic range, mass discrimination, mass accuracy and mass resolution [1620]. With higher trapping capacities thus less space charge effects, the use of linear ion traps has resulted in significant improvements in the performance of commercial ion traps and hybrid mass spectrometers [8, 15, 21, 22]. To advance this progress, a fast and effective method to characterize the space charge effects in ion traps is desired, which would greatly facilitate the instrumentation process.

Extensive efforts have been made in experimental characterization of space charge effects in quadrupole ion traps. Its influence on ion cloud spatial distribution and mass shift in 3D quadrupole ion traps have been studied using laser tomography methods [2325]. The relationships between space charge effects and ion trapping capacity, isolation efficiency, fragmentation efficiency, mass discrimination and MS resolution have also been investigated in linear ion traps [21, 22, 26, 27], as well as in a digital ion trap [28, 29], Fourier transform ion cyclotron resonance (FT-ICR) cells [17, 3032] and Orbitraps [8, 3335].

In addition to the experimental approaches, theoretical modelings and numeric simulations have also been used as powerful tools in the study of space charge effects. Coulombic force has a nonlinear contribution to the ion motion equation (Mathieu's Equation), and it is difficult to use an analytical solution to comprehensively model space charge effects in an ion trap. With approximations at different levels, several theoretical methods have been proposed [18, 3642], while frequently they need to be used with assistance from ion trajectory simulations [4349] to provide meaningful results. The calculation of coulombic force requires excessive amount of computation resources, and it is usually not practical to perform large-scale simulations on personal computers. Methods such as factor repulsion [50] have been used to approximate the space charge effect in the simulation, where the coulombic forces among a small number of ions are amplified by a factor to mimic the effects of large number of ions. With the help of parallel computation techniques, the interactions among 1024 ions in a FT-ICR cell have been simulated [51, 52]. Particle-in-cell approaches have also been introduced to model the coulombic ion-ion interactions and their effect on image charges for relatively large number of ions in FT-ICR cells [46, 53] and Orbitrap [35]. The accuracy of this method was claimed to be limited by the ion density and the cell dimension [53]. Recently, a “hybrid” algorithm, which divides the simulation region into an “active region” and the other region, has been integrated with SIMION (Scientific Instrument Services, Inc., NJ, USA) for the space charge simulation of large number of ions [54]. In the “active region”, two-body ion–ion interactions were calculated directly; in the other region, ions were grouped as “charge diffused clouds” and ion–cloud Coulomb interactions were calculated. Methods using approximations are effective but dependent on the accuracy of the assumption, which is typically based on the knowledge of the ion distribution and the density. Direct simulation without approximation provides accurate information, especially for new devices or ion trapping conditions; however, the associated computation time can also be the longest.

The recent advances in computing technologies, especially parallel computing technologies, have provided us a great opportunity to overcome the computation limitation for simulations. In this work, parallel computing techniques, especially GPU techniques, have been investigated for simulation of space charge effects involving 105 ions using a single desktop computer. GPU has originally been developed for accelerated video decoding while recently been increasingly used for floating point arithmetic computation [55]. GPUs are stream processors, which can operate in parallel by applying one kernel to many elements in a stream at once. With the multi-core hardware configuration, GPUs can be used for parallel computing as a single unit or a cluster, and have been demonstrated to be effective in data analysis, theoretical modeling and numeric simulation [56, 57]. The implementation of the GPU method can benefit the simulation methods both with and without approximation by significantly improving the calculation speed. In our study, we use the direct simulation without implementing any approximation for demonstrating the capability of the GPU for numeric simulation. Powered by GPU techniques, an acceleration of about 390 times has been achieved for simulating 3D coulombic ion-ion interactions in comparison with a simulation using a single-core CPU. The space charge effects in quadrupole ion traps have been characterized, which include ion cloud shape, ion trapping capacities for 3D and linear ion traps, ion motional frequency shift, mass shift and MS resolution. Existing popular simulation programs, such as SIMION and ITSIM, potentially can also benefit from this type of technology; however, some modifications in the software are required to make them compatible, as discussed in the Supplemental Information.

2 Method

In this study, both 3D and linear ion traps are investigated with ideal geometries and pure quadrupole fields. The 3D ion trap has dimensions of r 0 = 5 mm and z 0 = 3.536 mm (center to electrodes). The linear ion trap has dimensions of x0 = y0 = 4 mm (center to electrodes) and an effective length of 30 mm in the z direction [22]. Within the effective length, an ideal situation is also assumed for the DC trapping electric field along the z-axis, where the electric field (RF and DC) in the z direction is set at zero. Ions are confined in the z direction of the linear ion trap by applying mirrored boundary conditions on both ends of the z direction, which assumes ions never outflow in the z direction.

Ion trajectory simulation is performed using the ion trajectory simulation program developed in lab using MatLab [58, 59], which solves the Newton’s second order differential equation using the 4-th order Runge Kutta integration method. The gas dynamic collision model, Langevin’s collision theory, is used to model the ion-neutral collision probabilities. The energy transfer between the ion and neutral molecules during each collision is calculated based on the elastic collision model. Helium is used as the buffer gas (1 mTorr otherwise specified). The simulation time step is set at 50 ns, corresponding to 20 steps in one RF cycle.

The coulombic force (CF) that an ion (labeled as number x) experiences at each time step is calculated using the following equation:

$$ C{F_x} = \sum\nolimits_{{i = 1}}^N {\frac{{{q_i}{q_x}}}{{\varepsilon R_{{ix}}^2}}{{\overrightarrow R }_{{ix}}}} $$
(1)

where N is the total number of ions trapped in the ion trap, q i or q x denotes the charge on the ion, ε is the dielectric constant of air, R ix represents the distance between the ion number x and the ion number i, and \( {\overrightarrow R_{{ix}}} \) is a unit length vector pointing from the ion number i to the ion number x. In the current work, an ideal situation is assumed without considering the physical geometries of the ion traps, such as the higher-order electric field effects and the image currents or charges induced on the ion trap electrodes. The same simulation method can be used for any real device as long as the resolved field is available, which typically can be obtained using commercial program [58, 59]. It is a time-consuming process to calculate Equation (1) for every ion at every time step, especially as the total number of ions increases as shown in Table 1.

Table 1 Time required calculating ion motion for one time step in the ion trajectory simulation using different computing systems: case A: CPU, single core; case B: CPU, eight cores; case C: GPU

To accelerate the simulation process, parallel computing is implemented into the modified ion trajectory simulation program, including both multi-core CPU and GPU techniques. A desktop workstation with 2 CPU (Intel(R) Xeon(R) X5450 @3.00GHZ with 2 CPU and 8 core) and a GPU card [NVIDIA C2050 with 448 compute unified device architecture (CUDA) cores) is used to run the simulation. To calculate/predict the position and velocity of an ion at the next time step, knowledge of the forces it experiences at the current position is required, which include the force from the trapping electric field and the coulombic force resulting from the presence of other ions in the trap. Coulombic force calculation is the most time-consuming process at the operating pressure range of ion traps (mTorr range); therefore, the task of calculating coulombic forces for all ions is evenly distributed to different cores at every time step. For example, with 4480 ions in the trap and 448 computing cores in the GPU, the coulombic forces experienced by every 10 ions are calculated by each computing core in the GPU card (Detailed description of the program provided in Supplemental Information).

Efficiency of the ion trajectory simulation is characterized when using different computing units with results shown in Figure S2 and Table 1. Three computing units are investigated for the space charge modeling, single-core CPU, eight-core CPU and 448-core GPU. Table 1 shows the simulation time required to calculate ion motions for a single time step using different computing units, while Figure S2 shows the simulation time required to calculate ion motions within 1 ms, which corresponds to 20000 time steps. When the total number of ions is relatively small (around 103 or fewer), the use of parallel computing techniques does not have significant advantages over single-core computation; simulation could be even slower for multi-core computation due to the time required for communications between cores. However, a significant acceleration is obtained for simulation with ions of 104 or more, and it is about 8 times and 390 times faster using eight-core CPU and 448-core GPU, respectively. As shown in Figure S2, the simulation time has been reduced from 1.8 year to 1.7 day for a relative realistic simulation case: trajectory simulation of 105 ions within 1 ms. As an efficient and economic method, the 448-core GPU is used in this study to characterize the space charge effects in quadrupole ion traps.

3 Results and Discussion

Previous studies have shown that ions stored in a 3D ion trap forms an ion cloud that has a Gaussian distribution in each direction of the Cartesian coordinate [25]. Under typical operating conditions (room temperature or higher), an ion oscillates within the ion cloud at its secular frequency. The formation of the ion cloud is a result of the balancing among the forces due to the trapping electric field, the ion-molecule collisions and the coulombic repulsion. The size and shape of the ion cloud have a significant impact on mass analysis performance of an ion trap, such as the sensitivity (associated with the trapping capacity), mass discrimination, dynamic mass range or concentration range, mass accuracy and mass resolution [15, 22].

3.1 Space Charge Effects on Ion Trapping

Ions can be generated either internally with ionization methods such as electron impact and photo ionizations [60], or externally with atmosphere pressure ionization methods [61]. The initial distribution of an ion cloud strongly depends on the ion introduction method used in an experiment. Therefore, a cooling period is usually applied to remove the extra kinetic and potential energies from the ion cloud before further manipulations. The shapes and distributions of ion clouds under equilibrium conditions after cooling are studied in this work. In the simulations, a group of ions were placed in the center of the ion trap with a spatial distribution: Gaussian distributions in the r and z directions of the 3D ion trap, while Gaussian distributions in the x and y directions and a uniform distribution in the z direction of the linear ion trap. Initial velocity distributions are Maxwell distributions in all cases. A cooling time of 10 ms is used to allow the ion cloud to reach its equilibrium state, when the shape and dimensions of the cloud have converged.

The effects of the trapping electric field were characterized by placing 104 ions (m/z 500) inside the 3D ion trap at different RF voltages (V RF), thus at different q values. Figure 1 illustrates the sizes and the shapes of the ion cloud at different q values. The normalized standard deviation (STD) was extracted to depict the size of the ion cloud. From Mathieu's Equation, q z is two times the value of q r at a fixed RF voltage for the 3D ion trap. Due to the linear relationship between the pseudo-potential well depth (D) and the q value (D ~ qV RF), the trapping well depth in the z direction is two times deeper than that in the r direction at low q regions (q < 0.4), which accounts for the elliptical shape of the ion cloud with major axis in the r direction at low q z values. As the trapping voltage increases, the pseudo-potential well depth in the r direction keeps increasing, while the trapping well depth in the z direction becomes shallower when q z is approaching the boundary of the stability diagram. The ion cloud is squeezed in the r direction and stretched in the z direction, which results in an elliptical shape with major axis in the z direction as shown in Figure 1b. This is a phenomenon not present for linear ion traps, since q x and q y are normally identical, and ion clouds will have the same dimension in the x and y directions. Without taking the space charge effects into account, ions inside an ion trap will experience the RF trapping field and buffer gas cooling effects and the ion cloud size will be independent of ion number. After cooling, ion thermal energy, which depends on the thermal temperature of the ion trap environment, will balance with the RF trapping potential, and an ion cloud will show similar shape but much smaller dimensions under normal temperature conditions (<300 K).

Figure 1
figure 1

Shapes and sizes of the ion cloud at different RF trapping voltages in an ideal 3D ion trap. Ion trap dimension: r0 =5 mm, z0 = 3.536 mm. Ion cloud: 104 ions, m/z 500

In a typical ion trap operation process, an RF of constant amplitude is applied to the ion trap during the ion injection and cooling periods. Ions within a range of m/z values can be trapped at the same time. Ions with different m/z values are experiencing the same RF voltage but different q values, thus forming ion clouds of different shapes as shown in Figure 2. In Figure 2a, a 400 Vp-p RF voltage is applied on the 3D ion trap, and 104 ions with m/z values ranging from 200 to 2000 were placed in the 3D ion trap, respectively. The size of the cloud is dependent on the potential well depth at which the ions of a particular m/z value are trapped. At low q values, heavy ions generally form bigger ion clouds due to the corresponding lower q values. However, the q z value is twice that of the q r value, and the ion distribution in the z direction begun to increase as the m/z of the trapped ions is reduced and their q z values approach 0.908 as shown in Figure 2a for ions with m/z 200 (q z ~ 0.78). Four types of ions (2500 each) with different m/z values (200, 500, 1000 and 2000, respectively) are placed in the 3D ion trap simultaneously with the radius distribution plotted in Figure 2b. This phenomenon is because ions with lower m/z experience stronger RF trapping forces at low q values. This result explains previous experimental observations [23, 24], where light ions were found to form smaller ion clouds in a quadrupole ion trap [62], and confirms the relationship between mass discrimination and space charge effects [15, 63].

Figure 2
figure 2

Ion clouds in the 3D ion trap for ions of different m/z values and experiencing the same RF voltage. (a) only ions with the same m/z are placed in the ion trap at one time. 104 ions in each ion cloud. (b) when four types of ions trapped at the same time. 2500 ions for each type of ions. VRF = 400 Vp-p, corresponding to q z = 0.312 for ion m/z 500

Besides the trapping electric fields, the buffer gas cooling effect can counteract the expansion effect due to space charge. The relationship between the ion cloud size (in the r direction of the 3D ion trap) and the buffer gas pressure of helium is shown in Figure 3. In this simulation, 104 ions of m/z 500 are placed in the 3D ion trap with an RF voltage of 400 Vp-p. As expected, the ion cloud size decreases by increasing the buffer gas pressure from 0.1 to 5 mTorr [6466]. However, not much change is observed when the pressure was increased from 5 to 10 mTorr. Although the reason is still under investigation, interestingly, measurements of the ion trapping efficiency of externally generated ions are also found to be optimal at ~5 mTorr for linear ion traps [64, 67]. On the other hand, mass analysis resolution of an ion trap depends not only on the ion cloud size but also the ion motion frequency peak width [65]. Buffer gas can cool the ion cloud but also broaden the ion motion frequency peak width. In previous studies, it has been shown that the best resolution can be obtained at 10-4 mTorr regime [67].

Figure 3
figure 3

Pressure effect on the size of ion cloud in the 3D ion trap. Ion cloud of 104 ions m/z 500; VRF = 400 Vp-p; helium as the buffer gas

The trapping capacity of an ion trap relates directly to the space charge effect. It is believed that linear ion traps have much larger trapping capacities when compared with 3D ion traps. However, there has not been a good way to do a direct comparison experimentally in addition to the simple calculations of the trapping volumes [12, 22]. To address this issue, ion clouds with increased number of ions are simulated and characterized in both the 3D and the linear ion traps. Ions (m/z 500) were placed in the ion traps at a q value of 0.156 (q x for the linear ion trap and q z for the 3D ion trap). In reality, ion distribution in the z direction of a linear ion trap is not uniform due to the non-ideal DC electric field distribution close to the end electrodes, and DC end electrode voltage have an effect on the spectral space charge limit by a factor of two [22]. However, an ion distribution in z direction could be close to a uniform distribution at the center (z direction) of a linear ion trap, when the DC voltages are minimized for optimum ion ejection. For an ideal linear ion trap in this study, a uniform ion distribution in z direction is assumed (detailed discussions in Supplemental information). Simulation within a segment of the linear ion trap (20 μm) would be representative, and a linear relationship is assumed between the trapping capacity of the linear ion trap and that of the segment [22].

As shown in Figure 4, the size of the ion cloud increases in the radical direction for a 3D ion trap and x or y direction for a linear ion trap, as the number of ions increases. Plotted in logarithmic scale, Figure 4a gives us a direct comparison of the ion trapping capacities of the 3D ion trap with that of the linear ion trap. For instance, when the ion clouds have a normalized STD of 0.123 in both traps, the number of ions that trapped in the linear ion trap is about 400 times more than that of the 3D ion trap. This value is about 26 times higher than the value calculated by the trapping volume method [22]. Several reasons could contribute to the difference: 1) in the simulation, the ion cloud has a uniform distribution in the z direction of the linear ion trap, while Gaussian distribution in the z direction of the 3D ion trap. However, for a real LIT with electric fields truncated at the ends and the penetration of the trapping DC fields, the real trapping capacity could be lower. 2) The shapes of the ion clouds are different. Cross section (x-y plane) of the ion cloud in the linear ion trap has a round shape, while an elliptical shape in the 3D ion trap at the specific q z value (0.312). 3) Ion trapping in this work is compared at the same ion cloud radial distribution rather than at a fixed charge density in the trapping volume calculation [12, 22]. 4) The fixed charge density assumption is not used in this work [12]. As shown later in Figure 4b, it is found that charge density is a function of the total number of ions trapped as well as the geometry of the ion trap (linear ion trap vs. 3D ion trap).

Figure 4
figure 4

Ion cloud size as a function of number of ions in the 3D and linear ion traps. (a) Log plot. (b) Linear plot. Ion m/z 500; 3D ion trap: q r = 0.078, q z = 0.156; Linear ion trap: q x = q y = 0.156

Figure 4b plots the size of the ion cloud as a function of the number of ions in linear scales. The ion clouds expand rapidly when the STD of the ion cloud size is less than ~0.1, and expand slower after that. The results indicate that the ion density within the ion cloud increases as the number of ions increases in both traps. A possible reason could be: with less number of ions, ion thermal motion is dominant over the space charge effects, and ion thermal motion has a bigger contribution to the ion cloud size than the space charge effects. As the number of ions increases, space charge effects will be dominant and affect the ion cloud size. Intuitively, if we only put several frogs (low density ions) in a big box (ion trap), they will jump within the box (thermo motion) and occupy a big portion of the box without colliding with each other (Coulomb force). As we put many more frogs (high density ions) in the box, they will still occupy the same box but colliding with each other. On the other hand, as the ion trap dimension scales, while keeping other parameters unchanged (RF frequency, electric field distribution, etc.), the ion trapping capacity will decrease nonlinearly. Similar phenomenon has been observed experimentally in a 3D ion trap [23].

3.2 Space Charge Effects on Ion Trajectory

Without considering space charge and ion-molecule collisions, ion trajectory inside an RF quadrupole electric field is the summation of a harmonic motion (secular motion) and high-order motions. At low q region (q < 0.4), the ion secular motion is dominant, and the ion motion can be approximated as a harmonic oscillator. When considering space charge effects, an ion experiences a position dependant coulombic force, which leads to an effective shift in the ion motion frequency. Figure 5 illustrates this effect, where the trajectories of a specific ion [m/z 500, initial position (0, 0, 2.5 mm), initial velocity (0, 0, 0)] are simulated in two cases: with and without considering coulombic forces. Besides the ion under study, an ion cloud consisted of 105 ions (m/z 600) was also placed in the center of the 3D ion trap with Gaussian spatial distributions. An RF voltage of 200 Vp-p is applied on the ion trap. To isolate the space charge effect, ion-molecule collision was ignored in this study. As shown in Figure 5, the space charge effects can effectively lower the ion motion frequency, which induces a mass shift during the mass analysis process, as discussed in the next section. With the presence of an ion cloud of 105 ions, the secular frequency of ion (m/z 500) is shifted from ~55.4 kHz to ~54.1 kHz.

Figure 5
figure 5

The trajectory of one ion of m/z 500 with and without 105 ions of m/z 600 trapped simultaneously.. Ion (m/z 500) initial position (0, 0, 2.5 mm); zero initial velocity in all directions. VRF = 200 Vp-p, no ion-molecule collision

3.3 Space Charge Effects on MS Shift and Resolution

It is known from experimental studies that ion ejection can be delayed when an excessive amount of ions are trapped in the ion trap, which leads to mass shifts in the MS spectra acquired [16, 68]. It is also believed that MS resolution degradation can also attribute to the space charge effects [22]. A series of simulation has been performed to investigate these effects. Different number of ions with m/z 500 and 502 are placed in the 3D ion trap with Gaussian distributions in space. By scanning the RF amplitude at a speed of 105 V/s, ions are ejected out of the ion trap in the order of their m/z values, which is known as ion boundary ejection. As shown in Figure 6, MS shifts and poorer resolutions can be observed by increasing the number of ions. With 5000 or fewer ions of each m/z values, the two peaks (m/z 500 and 502) can be resolved with a ~35 % valley with boundary ejection. Mass shift can be clearly observed when the ion numbers are increased to 104. The valley between these two peaks was elevated to ~65 % with 2*104 ions, while m/z 500 peak merges into the m/z 502 peak completely when the ion numbers are increased to 5*104. As shown in Figure 4b and discussed earlier, ion density will increase faster and the space charge effects will be prominent when the total number of ions is above 104 within the 3D ion trap. Interestingly, mass spectra peak shift and coalescence effects happens after the total number of ion is 2x104 and above, which agrees with the ion cloud size calculations. This is also in agreement with the findings in previous work, which showed that spectral manifestations of space charge became apparent in number regime of 10 k – 50 k [15, 22].

Figure 6
figure 6

Space charge effect on mass shift and mass resolution, ions of m/z 500 and 502, placed in the 3D ion trap with Gaussian distributions, boundary ejection, RF scan speed at 105 V/s

4 Conclusions

Parallel computing technologies have been explored for the ion trajectory simulation involving large number of ions. Simulation of space charge effects for ion clouds containing up to 105 ions have been achieved on a single desktop computer. The space charge effects on ion cloud shape, ion trapping capacity, ion trajectory, mass accuracy and mass resolution have been investigated. Characterization of both 3D and linear ion traps can now be studied with simulations including large number of ions. Interestingly, the number of ions trapped in the linear ion trap (x 0 = y 0 = 4 mm, effective length 30 mm) is found to be ~400 times higher than that of the 3D ion trap (r 0 = 5 mm, z 0 = 3.536 mm) under the same q value (q z of the 3D trap = q x of the linear ion trap = 0.156). This approach provides researchers a rapid, efficient and economic solution to characterize the space charge effects in ion trap instrumentation processes.