Next Article in Journal
Thermal and Stability Outcomes of Different Osteotomy Techniques and Implant Macrogeometries in Type IV Bone: An In Vitro Study
Previous Article in Journal
Stretched Radial Trajectory Design for Efficient MRI with Enhanced K-Space Coverage and Image Resolution
Previous Article in Special Issue
MS-LTCAF: A Multi-Scale Lead-Temporal Co-Attention Framework for ECG Arrhythmia Detection
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Tuning Method for Quadrupole Mass Spectrometer Based on Improved Differential Evolution Algorithm

1
School of Biomedical Engineering (Suzhou), Division of Life Sciences and Medicine, University of Science and Technology of China, Hefei 230026, China
2
Suzhou Institute of Biomedical Engineering and Technology, Chinese Academy of Sciences, Suzhou 215163, China
3
Tianjin Key Laboratory of Medical Mass Spectrometry for Accurate Diagnosis, Tianjin 300399, China
*
Authors to whom correspondence should be addressed.
Bioengineering 2025, 12(11), 1154; https://doi.org/10.3390/bioengineering12111154 (registering DOI)
Submission received: 20 September 2025 / Revised: 20 October 2025 / Accepted: 22 October 2025 / Published: 24 October 2025

Abstract

Quadrupole mass spectrometers are highly sensitive and specific analytical instruments, widely used in pharmaceuticals, clinical diagnostics, and other fields. Their performance depends on a tuning process to optimize key parameters, which has traditionally relied on engineers’ expertise or simple univariate search methods. This paper proposes an automatic tuning method using an improved differential evolution algorithm. This algorithm introduces a ranking and subpopulation classification for individuals, enabling distinct mutation strategies. Validation on the CEC-2017 benchmark functions confirms the superiority of the improved algorithm. In automatic tuning experiments, it achieved a 25.3% performance gain over the univariate search method and also surpassed both the classical differential evolution algorithm and standard particle swarm optimization algorithm. This method proves to be an effective approach for enhancing the performance of quadrupole mass spectrometers.

Graphical Abstract

1. Introduction

Quadrupole mass spectrometers are advanced and sophisticated analytical instruments, recognized for their high sensitivity and strong specificity. They are widely used in fields such as pharmaceuticals, food safety, and clinical diagnosis [1,2,3,4,5,6]. Quadrupole mass spectrometers are relatively complex devices. Instrument tuning is involved in the production, use, and after-sales service. This tuning process may encompass ten or more parameters. The traditional tuning method typically uses univariate search, i.e., optimizing each parameter individually and accepting the resulting set of parameters as optimal. However, the univariate search method does not account for the interactions among parameters, and the result might not be optimized sufficiently. Therefore, it is essential to develop an efficient multi-parameter optimization algorithm.
Most real-world tuning problems are complex, large-scale, and involve nonlinearity and constraints. The search processes of traditional algorithms often struggle to adequately explore the vast parameter space, failing to locate the global optimum or a satisfactory near-optimal result. Inspired by natural phenomena, numerous intelligent optimization algorithms have been developed, including: (1) genetic algorithms and immune algorithms based on the physiological and evolutionary mechanisms; (2) swarm intelligence algorithms based on the competition and cooperation found among natural populations, such as the particle swarm optimization algorithms and ant colony algorithms; (3) simulated annealing algorithms inspired by physical phenomena; (4) other artificial intelligence algorithms such as the artificial neural network algorithms.
The differential evolution (DE) algorithm was proposed by Storn in 1995 to solve the Chebyshev polynomial problem [7]. The DE algorithm is classified as a population-based algorithm (nature-inspired algorithm). The performance of DE was showcased at the First International Contest on Evolutionary Optimization in May 1996. Since then, it has become one of the most popular optimizers for complex optimization problems [8,9,10,11,12]. However, the mutation strategy can sometimes lead to poor performance in terms of diversity of search directions and convergence speed, resulting in low optimization efficiency. Liu and Lampinen introduced the fuzzy adaptive differential evolution (FADE), which employs fuzzy logic controllers to adapt the control parameters F and CR for the mutation and crossover operations, demonstrating better results than the classic DE when problem dimensions are high [13,14,15,16]. To enhance population diversity and improve convergence performance, Zhang and Sanderson proposed an adaptive differential evolution (JADE) [17]. This approach implemented a mutation strategy called “DE/current-to-pbest” with an optional archive and adaptively controlled F and CR. Tests on traditional benchmark functions showed competitive performance regarding convergence rate and reliability compared to other classic and adaptive DE algorithms and the PSO algorithm. Based on the SHADE algorithm, Tanabe and Fukunaga introduced the L-SHADE algorithm, which further extends SHADE with Linear Population Size Reduction (LPSR) and continuously reduces the population size according to a linear function [18,19,20,21,22,23,24,25,26]. Several improved DE algorithms based on L-SHADE performed well in the CEC competition [27,28,29,30]. Duankhan proposed the differentiated creative search (DCS) algorithm, which is similar to the DE algorithm [31]. It utilizes a newly proposed dual-strategy approach that balances divergent and convergent thinking within a team-based framework, along with a unique knowledge-acquisition process.
The particle swarm optimization (PSO) algorithm is another optimization algorithm that exhibits excellent performance. It was proposed in 1995 by James Kennedy and Russell Eberhart, who were inspired by the foraging behavior of birds [32]. Shi introduced the inertia weight into the original particle swarm optimizer [33]. A time decreasing inertia weight can bring in a significant improvement on the PSO performance. This improved PSO algorithm is referred to as the standard PSO algorithm. In most cases, it is recommended that the inertia weight of the standard PSO algorithm linearly decreases from 0.9 to 0.4.
For the automatic tuning of mass spectrometers, existing commercial instruments typically offer simple automatic tuning programs based on the univariate search method. For instance, both the Thermo Scientific iCAP TQ ICP-MS and the SCIEX Triple Quad 5500 system have implemented this method. Additionally, considering the user’s acceptance, the automatic tuning time is usually limited to about three hours. This requires that automatic tuning methods be quick and efficient. Dawson provided a detailed exposition of the stability diagram and mass resolution calculations for quadrupole mass analyzers [34]. The mass resolution in a quadrupole mass spectrometer is usually defined as the full width at half maximum (FWHM). Syed [35] and Liu [36] respectively presented simulation cases and experimental cases of mass resolution adjustment. Automatic tuning of peak intensity is not mentioned in these papers. Zhang utilized the genetic algorithm to perform adaptive optimization tests on voltage parameters for the self-developed MR-TOFMS instrument [37]. Compared to the step-scan method, the adaptive optimization approach completed the global search for five voltage parameters in 2.25 h. The sensitivity and resolution of the mass spectrometer improved by 52.4% and 50.6%, respectively, compared to the step-scan optimization method. However, for general mass spectrometers with numerous parameters, further improvements in algorithm efficiency are necessary. Jia proposed an automatic tuning method for mass spectrometers based on an improved particle swarm optimization algorithm [38]. This method employs four calculation methods for the inertia weight: linear weight, exponential weight, power weight, and random weight, to obtain fitness values separately. It yielded good results, but compared to the single inertia weight method, it incurred higher time costs.
Given the challenges in modeling and the limited optimization time during the tuning process of mass spectrometers, a method utilizing an improved differential evolution algorithm to tackle the multi-parameter optimization is proposed. Compared to traditional manual tuning and the automatic tuning method based on univariate search, it can produce superior optimization results. Regarding the commercial instruments and software, there are two approaches to implement the application of the algorithm. The first approach is similar to the method employed in this paper. The algorithm is an independent program. The algorithm and instrument communicate via text files to exchange tuning parameters and peak intensity results. However, this requires the instrument software to permit manipulation through parameterized script files and the execution of the tuning process. The second approach involves the instrument manufacturer modifying the instrument software and integrating the algorithm into it.

2. Methods

The differential evolution (DE) algorithm is a random heuristic search algorithm. Its operational steps include initialization, mutation, crossover, boundary condition handling, and selection.
The main ideas of the improved differential evolution algorithm are: (1) introducing a factor related to the number of iteration to allow the algorithm to exhibit adaptive search ranges and speeds during the iteration process; (2) applying different mutation strategies based on the performance of the population; (3) ranking the individuals according to the fitness values to guide the next iteration; (4) incorporating a random search strategy to prevent the algorithm from getting stuck in a locally optimal result.
In this paper, three subpopulations are defined: the elite subpopulation (ELS), the middle subpopulation (MIS), and the inferior subpopulation (INS). In the classic DE algorithm, the mutation factor is conventionally considered a constant. Throughout the iterative process, the value of this factor markedly influences the outcomes. A mutation factor that is excessively large may lead the algorithm to perform a random search, thereby reducing search efficiency. Conversely, a mutation factor that is too small can diminish population diversity, increasing the risk of “premature convergence,” which refers to the algorithm becoming trapped in a local optimal result. Consequently, it is advisable to incorporate adaptive mutation factors within the mutation operation process.
The flowchart of DE algorithm (both the classic DE algorithm and the improved DE algorithm) is shown in Figure 1.

2.1. Differential Evolution Algorithm

The population of the DE algorithm consists of N individuals. Each individual is a vector and can be described as xi = (x1,i, x2,i, …, xD,i,), i = 1, 2, …, N, where D is the dimension of the vector and N is the population size. The formula for calculating the mutation vector in the classic differential evolution algorithm is:
vi,g+1 = xr1,g + F × (xr2,gxr3,g)
Here, r1, r2, r3 are integers randomly selected within the range [1, N], and r1 ≠ r2 ≠ r3 ≠ i. The mutation factor F is a real constant within the range [0, 2]. g and g + 1 present the number of iterations.
The mutation strategy includes several other forms, identified by the symbols DE/x/y/z. Here, x determines whether the current mutation vector is random, optimal, or current; y signifies the number of differential vectors utilized; and z indicates the operational strategy during the crossover step, which can include options such as linear or exponential. Other forms of mutation strategies include:
(a) DE/best/1/bin:
vi,g+1 = xbest,g + F × (xr1,gxr2,g)
(b) DE/rand-to-best/1/bin:
vi,g+1 = xi,g + λ × (xbest,gxi,g) + F × (xr1,gxr2,g)
The steps of the DE algorithm are as follow Algorithm 1:
Algorithm 1. Differential Evolution Algorithm
Input: Set the population size N, and the boundaries xub and xlb.
Step 1 (Initialization): Randomly generate the population and obtain the corresponding fitness values.
xj,i,0 = xlbj + rand[0,1] × (xubjxlbj)
Here, rand [0,1] represents the uniformly generated random number within the range [0,1].
Step 2 (Mutation): A mutant vector is generated according to the mutation formula.
Step 3 (Crossover): A trial vector is generated in crossover between the target vector and mutant vector using a crossover probability CR.
If randb(j) ≤ CR or j = rnbr(i), then uj,i,g+1 = vj,i,g+1; if randb(j) > CR and j ≠ rnbr(i), then uj,i,g+1 = xj,i,g+1, (j = 1,2,…,D);
Here, randb(j) represents the j-th value of the random number sequence generated within the range of [0,1]; CR represents the crossover operator, whose range of values is [0,1]; rnbr(i) represents the random number sequence generated from [1, D], thereby achieving the acquisition of at least one parameter value from the parameter vector to the mutated parameter vector, and thereby achieving the update of the parameter vector rather than keeping it unchanged.
Step 4 (Boundary Condition Handling): After the crossover operation, check whether the population exceeds the position boundaries. If it does, set it to the relevant position boundaries.
If uj,i,g+1 > xubj, then uj,i,g+1 = xubj; If uj,i,g+1 < xlbj, then uj,i,g+1 = xlbj. Here, xlbj and xubj are the lower and upper limits of the boundaries respectively, and j is the j-th dimension of the vector.
Step 5 (Selection): Calculate the fitness values and perform the selection operation.
If f(ui,g+1) < f(xi,g), xi,g+1 = ui,g+1; If f(ui,g+1) < f(xi,g), xi,g+1 = xi,g
Step 6: Check whether the iteration termination condition is met. If it is, terminate the iteration. If not, return to Step 2.
Output: The global optimal vector and fitness value.

2.2. Improved Differential Evolution Algorithm

The operational steps of the improved DE algorithm are the same as those of the classic DE algorithm. The primary difference between the improved DE algorithm and the classical DE algorithm lies in the mutation step.
In the mutation step, sort the individuals in ascending order by their fitness values to create a new population. Divide the new population into subpopulations based on the distinct performances of individuals to apply different mutation operations. Additionally, the size of the subpopulations can be adjusted throughout the iteration process.
The classification of subpopulations is as follows: in the initial stage of the iteration process (g ≤ G/3), the ratio of ELS: MIS: INS is 2:5:3; in the middle stage of the iteration process (G/3 < g ≤ 2G/3), the ratio is 4:4:2; and in the final stage of the iteration process (g > 2G/3), the ratio is 6:3:1.
In the early stages of the iteration process, a large mutation factor is maintained to preserve the diversity of individuals and prevent premature convergence. In the later stages of the iteration process, the mutation operator gradually decreases, guiding the algorithm to converge to the optimal result.
Different mutation operations are subsequently adopted for various subpopulations.
(1) For the elite subpopulation, the search occurs close to the current global optimal position, and the DE/best/1/bin strategy is applied. Unlike the velocity of the particle swarm optimization, which is related to the distance from the optimal result, here it does not depend on the distance to the optimal point. The search range can be gradually diminished as the mutation factor F1 decreases.
vi,g+1 = xbest,g + F1 × (xr1,gxr2,g)
F1,g = α1 × rand[0,1] × [(g/G)2 − 2g/G + 1]
(2) For the middle subpopulation, based on its current position, it considers moving toward the global optimal position while also accounting for random search, and executes the modified DE/current-to-best/1/bin strategy. The size of the middle subpopulation will gradually decrease as the iteration process.
vi,g+1 = xi,g + F2 × (xbest,gxi,g) + F3 × (xr1,gxr2,g)
F3,g = α2 + α3 × [1 − sqrt(g/G)]
Here, F2 is a real constant.
(3) For the inferior subpopulation, a random search strategy is employed, and the individuals are randomly generated within the feasible region. This subpopulation will gradually decrease in size during the iteration process.
vj,i,g+1 = xlbj + rand[0,1] × (xubjxlbj)
The parameters in the improved DE algorithm are defined as follows: α1 = 1; F2 = 0.4; α2 = 0.3; α3 = 0.3; CR = 0.75.

2.3. Automatic Tuning Method Based on the Improved Differential Evolution Algorithm

The automatic tuning of a triple quadrupole mass spectrometer involves parameters related to the gas in the ion source and interface, as well as the voltage applied to the ion optical lenses. The goal of tuning and optimization is to achieve the best peak intensity of the mass spectrum while ensuring that the accuracy of the mass axis and resolution meet specific requirements.
A commercial mass spectrometer (LC-HTQ 2030 LC-MS/MS, Tianjin Guoke Medical Science and Technology Development Co., Ltd., Tianjin, China) is selected as the test platform. The software used to drive the instrument is the LCMSMS OS V1.0. The test samples consist of a mixed solution of NaI and CsI (NaI 200 μg/mL and CsI 5 μg/mL).
Figure 2 illustrates a schematic diagram of the ion source and ion optics lens parameters of the test platform. The flowchart of the automatic tuning method based on the improved differential evolution algorithm is shown in Figure 3. The algorithm and instrument communicate via text files to exchange tuning parameters and peak intensity results. Operation on the mass spectrometer encompasses calibration of the mass axis and mass resolution, and peak intensity result output. The calibration of the mass axis and resolution is relatively simple and can be achieved through a linear model with theoretical formulas.
Taking the Q1 mode as an example, the primary parameters involved in the tuning process include gas parameters such as the nebulizer gas (GS1) and curtain gas (CUR), along with voltage parameters like de-clustering voltage (DP), entrance voltage (EP). Parameters like GS1 and CUR, as well as DP and EP, primarily influence the intensity of the mass spectral peak. The mass axis is determined by a series of mass numbers and digital-analog converter (DAC) values that are in a linear relationship. The DAC value corresponds to the magnitudes of both direct voltage and radio-frequency voltage at a specified mass number. DAC impacts the accuracy of the mass axis. The resolution offset voltage (OFFSET) affects the mass resolution. The instrument is factory-set with values of DAC and OFFSET corresponding to a series of mass numbers, which are shown in Figure 4 and Figure 5. Figure 4 illustrates the relationship between mass and DAC for the instrument, and Figure 5 illustrates the relationship between mass and OFFSET.
The linear model for calibration of the mass axis with the voltage DAC is
INT_DACm = INT_DACm−1 + k × (masstargetmassm−1)
Here, INT_DACm and INT_DACm-1 are the voltage values for the mass axis in the m-th and (m − 1)-th iteration; k is the coefficient; masstarget is the target value of the mass axis; massm-1 is the mass axis value in the (m − 1)-th iteration.
The termination condition for the iteration is:
|masstargetmassm| ≤ 0.1
Here, massm is the current value of the mass axis in the m-th iteration.
The linear model for calibration of mass resolution with the voltage OFFSET is
V_RESm = V_RESm−1 + l × (restargetresm−1)
Here, V_RESm and V_RESm−1 are the voltage values for the mass resolution in the m-th and (m − 1)-th iteration; l is the coefficient; restarget is the target value of the mass resolution; resm−1 is the mass resolution value in the (m − 1)-th iteration.
The termination condition for adjusting the mass resolution is:
|restargetresm| ≤ 0.1
Here, resm is the value of the mass resolution in the m-th iteration. Typically, the target value of the mass resolution is set to 0.7.
After calibration of the mass axis and mass resolution, the peak intensity results are output to the algorithm.
A multi-objective evaluation function is required to optimize the intensities of several mass spectral peaks. A function for multi-objective evaluation is defined as follows:
f(x) = λ1/I1 + λ2/I2 + λ3/I3
Here, x is a vector composed of the ion source and ion lens parameters. I1, I2, and I3 represent the intensities of the typical mass spectral peaks in the low, medium, and high mass number. λ1, λ2, and λ3 represent the weight coefficients of three mass spectral peaks.
In the subsequent trials, λ1 = λ2 = λ3 = 106. The improved DE algorithm computes fitness values through the evaluation function and generates the new tuning parameter file according to the internal rules of the algorithm.
After the automatic tuning process, the tuning results including the optimized parameter values and the intensities of the mass spectral peaks are output. The calibration of the mass axis and mass resolution are implicitly carried out during the execution of the automatic tuning method.
It’s critical to note that the automatic tuning time of the mass spectrometer is typically kept within three hours. For example, during the acquisition of mass spectral data, the scanning time for each mass spectral peak is set to 0.6 s. When there are three mass spectral peaks and MCA (Multiple Channel Acquisition) is set to 5, the total time required is about 10 s. Therefore, about 360 mass spectral data can be obtained in one hour. Typically, the automatic tuning process can get 500 to 1000 mass spectral data entries.

3. Results and Discussion

3.1. Benchmark Function Test

The improved DE algorithm (DE-i) was compared with the classic DE algorithm and the standard particle swarm optimization algorithm (PSO). The classic DE algorithm used two mutation methods: DE/best/1/bin and DE/rand-to-best/1/bin.
To evaluate the optimization algorithms, the IEEE Congress on Evolutionary Computation (IEEE CEC) has provided a series of standardized benchmarks. The CEC-2017 test function set developed by Awad was used in this paper [39]. The test function set includes a variety of widely used and recognized functions, such as unimodal, multimodal, mixed, and combined functions. F1 and F3 are unimodal functions with a single global minimum and no local extrema. F4–F10 are multimodal functions with local extrema. F11–F20 are mixed functions that combine three or more benchmark functions. F21–F30 are composite functions made up of at least three mixed or benchmark functions. However, F2 is officially removed due to stability problems.
Considering that actual mass spectrometer test data exhibits certain random fluctuations, the test functions were selected from F4–F30 and are shown in Table 1.
Regarding the limited tuning time and the total iterations in the automatic tuning process, the population size is set to 20, and the maximum number of iterations is set to 25. With these constraints, the performance of the four optimization algorithms is evaluated. The dimension is set to 10. The evaluation of different optimization algorithms is based on statistical data from 30 repeated trials.
After 30 repeated trials, the mean value of the function results obtained through optimization by a specific algorithm is employed to evaluate the optimization performance of the algorithm. A smaller mean value indicates that the algorithm has stronger optimization ability and is closer to the theoretical optimal result Fi* of the function. The standard deviation (std) is employed to assess the consistency of the results from 30 repeated trials, yet it is not directly utilized to evaluate the performance of algorithms. The statistical results of the test functions for different algorithms are shown in Table 2. Some convergence curves, selected from the 30 repeated trials, are shown in Figure 6.
As shown in Table 2, the improved DE algorithm exhibits superior performance in functions F5, F7, F16, and F20. The PSO algorithm demonstrates better performance in function F26. The classic DE algorithm employing the DE/best/1/bin mutation strategy shows superior performance in function F29. The results indicate that under limited optimization conditions, the improved DE algorithm outperforms the classic DE algorithm in optimization performance and provides certain advantages over the standard PSO algorithm. It is expected that the improved DE algorithm will achieve efficient optimization for mass spectrometers.

3.2. Application of Automatic Tuning Method

3.2.1. Optimization of a Single Mass Spectral Peak

The automatic tuning method was used for the intensity optimization of a single mass spectral peak at m/z 172.88. Before tuning, the intensity of the m/z 172.88 mass spectral peak is 2.08 × 107 cps. The mass accuracy and mass resolution are 0.103 u and 1.239 u. Parameters that required optimization include CUR, GS1, DP, and EP. Five methods were employed for tuning.
The first method is univariate search. Ten uniformly distributed parameter values are selected within the feasible interval for each parameter. The process took 5 min to obtain the result, including the time for file reading and writing. Final optimal parameter values obtained were: GS1 =20; CUR = 10; DP = 120; EP = 10. The mass spectrum is displayed in Figure 7. The intensity of the m/z 172.88 mass spectral peak is 2.15 × 107 cps. The mass resolution is 0.786 u. Here and in all subsequent mass spectrum, MCA = 5 is adopted.
The other four tuning methods employed the four optimization algorithms mentioned earlier. The population size is set to 20, and the maximum number of iterations is set to 25. The duration of tuning is primarily determined by the volume of generated mass spectral intensity data. The computational time required by these four intelligent optimization algorithms is largely comparable, all falling within the range of 0.8 to 1 h.
The evaluation function is shown in Equation (15).
f(x) = λ1/I1
All of the results are shown in Table 3. The data from the automatic tuning process are shown as follows. The optimal values of the parameters obtained based on the improved DE algorithm were: CUR = 20.229; GS1 = 15.573; DP = 163.03; EP = 11.413. The peak intensity data were relatively close. The improved DE algorithm gives the best peak intensity data from other methods. The intensity obtained by this algorithm is 25.3% higher than that of the univariate search method. The final mass spectrum is shown in Figure 8. It should be noted that during the automatic tuning process, only intensities of the mass spectral peaks were output, without saving the mass spectrum files. The mass spectrum shown in Figure 8 was generated by re-running the mass spectrometer with the optimized parameters to produce a new mass spectrum file. Consequently, due to random variations between experimental replicates, minor discrepancies may exist between the intensities reported in Table 3 and those displayed in Figure 8. Subsequent mass spectra were generated and output in the same way. The differences do not affect the conclusion. The results indicate that the automatic tuning method based on the improved differential evolution algorithm can achieve better performance for the instrument.

3.2.2. Automatic Tuning of the Ion Source and Lens Parameters

Ten repeated trials of automatic tuning were conducted to verify its repeatability. The performance evaluation involves the intensities of three mass spectral peaks (m/z 172.88, 622.57, 922.36). The evaluation function is defined in Equation (14). The population size is set to 20, and the maximum number of iterations is set to 25. Conducting a single automatic tuning process involving three mass spectrometry peaks requires 2.5 h. This includes the time for storing the data files during the process. The test data are shown in Table 4. Each mass spectral peak met the requirements for mass accuracy and mass resolution. The CV values of the peak (m/z 172.88, 622.57, 922,36) intensities were 5.1%, 6.2%, and 9.6%, respectively. The results indicate that the method achieved calibration of mass accuracy and resolution, successfully completing the tuning of the instrument’s performance. Figure 9 presents the mass spectrum in its initial state, which displays a certain positional offset of the mass spectral peaks along with poor mass resolution and low peak intensities. Figure 10 shows the mass spectrum after applying the automatic tuning method. By comparing the data before and after automatic tuning, it is evident that mass accuracy, mass resolution, and peak intensity have all significantly improved.
For quadrupole mass spectrometers, the terminology employed by instruments from different manufacturers may vary, and design configurations can differ. However, the definitions and adjustment principles for mass accuracy and mass resolution in quadrupole mass analyzers are fundamentally consistent. The tuning parameters for ion sources and ion transmission systems commonly used in quadrupole mass spectrometers are also analogous. Consequently, it is reasonable to anticipate that an automatic tuning method possesses general applicability to quadrupole mass spectrometer systems. The improved DE algorithm, as an intelligent optimization algorithm, exhibits universality in multi-parameter optimization. Nevertheless, experimental validation is required to ascertain its applicability for automatic tuning of other mass spectrometer types.

4. Conclusions

The traditional process of automatic tuning in mass spectrometers typically optimizes each parameter individually and regards the results as the best values. This paper presents an automatic tuning method based on the improved differential evolution algorithm. Comparison tests of standard functions demonstrate that under specific conditions, the improved differential evolution algorithm significantly outperforms the traditional differential evolution algorithm and shows certain advantages over the standard particle swarm optimization algorithm. This algorithm has produced impressive optimization results in the actual tuning of tandem quadrupole mass spectrometers. The algorithm is scheduled to be employed in tuning experiments for other types of mass spectrometers, such as time-of-flight mass spectrometers, ion trap mass spectrometers, and various hybrid mass spectrometers, to evaluate its applicability. Additionally, the ideas within this algorithm are expected to inspire other researchers and improve the traditional optimization algorithms, such as the particle swarm optimization algorithm.

Author Contributions

Conceptualization, Y.Z.; methodology, Y.Z. and L.L.; software, L.F.; validation, Y.Z. and L.F.; formal analysis, Y.Z.; data curation, L.F. and Y.Z.; writing—original draft preparation, Y.Z.; writing—review and editing, B.X. and Y.Z.; supervision, W.C. and Y.T.; project administration, W.C. and Y.T.; funding acquisition, W.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Strategic Priority Research Program of the Chinese Academy of Sciences (grant number XDC0250200), National Key R&D Program of China (grant number 2024YFF0725800), Tianjin Science and Technology Program Project (grant number 24ZXYXSY00070), and Tianjin Science and Technology Program Project (grant number 23YFYSHZ00020).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in the study are included in the article; further inquiries can be directed to the corresponding authors.

Acknowledgments

The authors would like to thank the colleagues from the Suzhou Institute of Biomedical Engineering and Technology for their support.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Liu, X.-G.; Yang, H.; Cheng, X.-L.; Liu, L.; Qin, Y.; Wang, Q.; Qi, L.-W.; Li, P. Direct analysis of 18 flavonol glycosides, aglycones and terpene trilactones in Ginkgo biloba tablets by matrix solid phase dispersion coupled with ultra-high performance liquid chromatography tandem triple quadrupole mass spectrometry. J. Pharm. Biomed. Anal. 2014, 97, 123–128. [Google Scholar] [CrossRef]
  2. Wang, P.; Zhang, N.; Hu, Z.; Wu, P.; Mao, J.; Zhang, J.; Cai, Z.; Wang, Z.; Wang, J. A novel application of ultra-performance liquid chromatography tandem triple quadrupole mass spectrometry for the rapid quantification of acrylamide in coffee. J. Food Compos. Anal. 2025, 141, 107357. [Google Scholar] [CrossRef]
  3. Jensen, J.T.; Waites, B.T.; Boniface, E.R.; McCrimmon, S.; Blue, S.; Erikson, D.W. Development and validation of an expanded panel of progestins using liquid chromatography-tandem triple quadrupole mass spectrometry to monitor protocol compliance in hormonal contraceptive pharmacokinetic/pharmacodynamic studies. Contraception 2023, 126, 110130. [Google Scholar] [CrossRef]
  4. Wei, Y.; Zhang, Y.; Hu, Y.; Shui, F.; Tang, J.; Yu, Y.; Zheng, G.; Zeng, J. Development of a highly sensitive field-amplified capillary electrophoresis tandem triple quadrupole mass spectrometry for the quantification of trace methamphetamine in sewage. J. Chromatogr. A 2025, 1750, 465920. [Google Scholar] [CrossRef]
  5. Sanz Rodriguez, E.; Wood, K.; Haddad, P.R.; Paull, B. Boron quantification using ion chromatography tandem triple quadrupole mass spectrometry. Application to retention analysis in boron-treated wood. Talanta 2024, 268, 125377. [Google Scholar] [CrossRef]
  6. Buckley, C.; MacHale, C.; Bones, J. Quantitative analysis of residual aurintricarboxylic acid in biotherapeutic process streams using liquid chromatography triple quadrupole mass spectrometry. J. Pharm. Biomed. Anal. 2024, 238, 115798. [Google Scholar] [CrossRef]
  7. Storn, R. Differential evolution design of an IIR-filter. In Proceedings of the 1996 IEEE International Conference on Evolutionary Computation (ICEC 96), Nagoya, Japan, 20–22 May 1996; pp. 268–273. [Google Scholar]
  8. Neri, F.; Tirronen, V. Recent advances in differential evolution: A survey and experimental analysis. Artif. Intell. Rev. 2010, 33, 61–106. [Google Scholar] [CrossRef]
  9. Das, S.; Suganthan, P.N. Differential evolution: A survey of the state-of-the-art. IEEE Trans. Evol. Comput. 2010, 15, 4–31. [Google Scholar] [CrossRef]
  10. Bilal; Pant, M.; Zaheer, H.; Garcia-Hernandez, L.; Abraham, A. Differential Evolution: A review of more than two decades of research. Eng. Appl. Artif. Intell. 2020, 90, 103479. [Google Scholar] [CrossRef]
  11. Ahmad, M.F.; Isa, N.A.M.; Lim, W.H.; Ang, K.M. Differential evolution: A recent review based on state-of-the-art works. Alex. Eng. J. 2022, 61, 3831–3872. [Google Scholar] [CrossRef]
  12. Reyes-Davila, E.; Haro, E.H.; Casas-Ordaz, A.; Oliva, D.; Avalos, O. Differential Evolution: A Survey on Their Operators and Variants. Arch. Comput. Method Eng. 2025, 32, 83–112. [Google Scholar] [CrossRef]
  13. Liu, J.; Lampinen, J. A fuzzy adaptive differential evolution algorithm. Soft Comput. 2005, 9, 448–462. [Google Scholar] [CrossRef]
  14. Al-Dabbagh, R.D.; Kinsheel, A.; Mekhilef, S.; Baba, M.S.; Shamshirband, S. System identification and control of robot manipulator based on fuzzy adaptive differential evolution algorithm. Adv. Eng. Softw. 2014, 78, 60–66. [Google Scholar] [CrossRef]
  15. Chamorro, H.R.; Riano, I.; Gerndt, R.; Zelinka, I.; Gonzalez-Longatt, F.; Sood, V.K. Synthetic inertia control based on fuzzy adaptive differential evolution. Int. J. Electr. Power Energy Syst. 2019, 105, 803–813. [Google Scholar] [CrossRef]
  16. Awda, Y.; Alowaifeer, M. Adaptive optimization of virtual synchronous generator based on fuzzy logic control and differential evolution. Ain Shams Eng. J. 2024, 15, 102606. [Google Scholar] [CrossRef]
  17. Zhang, J.; Sanderson, A.C. JADE: Adaptive Differential Evolution with Optional External Archive. IEEE Trans. Evol. Comput. 2009, 13, 945–958. [Google Scholar] [CrossRef]
  18. Tanabe, R.; Fukunaga, A.S. Improving the Search Performance of SHADE Using Linear Population Size Reduction. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC), Beijing, China, 6–11 July 2014; pp. 1658–1665. [Google Scholar]
  19. Piotrowski, A.P.; Napiorkowski, J.J. Step-by-step improvement of JADE and SHADE-based algorithms: Success or failure? Swarm Evol. Comput. 2018, 43, 88–108. [Google Scholar] [CrossRef]
  20. Tran, H.-N.; Phan, G.T.; Tran, V.-P.; Do, Q.B.; Phan, H.; Nguyen, H.T.; Chu, T.-N.; Hoang, V.-K. Influence of problem characteristics on the optimal balance between population size and the number of generations in in-core fuel management using SHADE method. Nucl. Eng. Des. 2025, 443, 114258. [Google Scholar] [CrossRef]
  21. Yousri, D.; Sukanya, V.; Bijukumar, B.; Farag, H.E.Z.; El-Saadany, E. A novel one-time unified configuration strategy with L-SHADE optimizer for enhanced power extraction in thermoelectric generator array. Appl. Therm. Eng. 2024, 257, 124376. [Google Scholar] [CrossRef]
  22. Chen, G.; Shen, Y.; Zhang, Y.; Zhang, W.; Wang, D.; He, B. 2D multi-area coverage path planning using L-SHADE in simulated ocean survey. Appl. Soft Comput. 2021, 112, 107754. [Google Scholar] [CrossRef]
  23. Ji, X.; Lu, X.; Li, H.; Ma, P.; Xu, S. Blade optimization design of Savonius hydraulic turbine based on radial basis function surrogate model and L-SHADE algorithm. Ocean Eng. 2023, 286, 14. [Google Scholar] [CrossRef]
  24. Piotrowski, A.P. L-SHADE optimization algorithms with population-wide inertia. Inf. Sci. 2018, 468, 117–141. [Google Scholar] [CrossRef]
  25. Sohrabian, B.; Soltani-Mohammadi, S.; Bakhtavar, E.; Taherinia, A. Joint simulation through orthogonal factors generated by the L-SHADE optimization method. Spat. Stat. 2021, 43, 100521. [Google Scholar] [CrossRef]
  26. Sallam, K.M.; Alrashdi, I.; Mohamed, R.; Abdel-Basset, M. An enhanced LSHADE-based algorithm for global and constrained optimization in applied mechanics and power flow problems. Swarm Evol. Comput. 2025, 97, 102032. [Google Scholar] [CrossRef]
  27. Guo, S.-M.; Yang, C.-C.; Tsai, J.S.-H.; Hsu, P.-H. A Self-Optimization Approach for L-SHADE Incorporated with Eigenvector-Based Crossover and Successful-Parent-Selecting Framework on CEC 2015 Benchmark Set. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC), Sendai, Japan, 25–28 May 2015; pp. 1003–1010. [Google Scholar]
  28. Awad, N.H.; Ali, M.Z.; Suganthan, P.N.; Reynolds, R.G. An ensemble sinusoidal parameter adaptation incorporated with L-SHADE for solving CEC2014 benchmark problems. In Proceedings of the 2016 IEEE Congress on Evolutionary Computation (CEC), Vancouver, BC, Canada, 24–29 July 2016; pp. 2958–2965. [Google Scholar]
  29. Awad, N.H.; Ali, M.Z.; Suganthan, P.N. Ensemble Sinusoidal Differential Covariance Matrix Adaptation with Euclidean Neighborhood for Solving CEC2017 Benchmark Problems. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC), Donostia, Spain, 5–8 June 2017; pp. 372–379. [Google Scholar]
  30. Akhmedova, S.; Stanovov, V.; Semenkin, E. LSHADE Algorithm with a Rank-based Selective Pressure Strategy for the Circular Antenna Array Design Problem. In Proceedings of the International Conference on Informatics in Control, Automation and Robotic ICINCO (1), Porto, Brazil, 29–31 July 2018; pp. 159–165. [Google Scholar]
  31. Duankhan, P.; Sunat, K.; Chiewchanwattana, S.; Nasa-ngium, P. The Differentiated Creative Search (DCS): Leveraging differentiated knowledge-acquisition and creative realism to address complex optimization problems. Expert Syst. Appl. 2024, 252, 123734. [Google Scholar] [CrossRef]
  32. Eberhart, R.; Kennedy, J. A new optimizer using particle swarm theory. In Proceedings of the MHS95 Sixth International Symposium on Micro Machine and Human Science, Nagoya, Japan, 4–6 October 1995; pp. 39–43. [Google Scholar]
  33. Shi, Y.; Eberhart, R. A modified particle swarm optimizer. In Proceedings of the 1998 IEEE International Conference On Evolutionary Computation Proceedings, IEEE World Congress on Computational Intelligence (Cat. No. 98TH8360); Anchorage, AK, USA, 4–9 May 1998, pp. 69–73.
  34. Dawson, P.H. (Ed.) Quadrupole Mass Spectrometry and Its Applications; Elsevier: Amsterdam, The Netherlands, 1976. [Google Scholar]
  35. Syed, S.U.; Hogan, T.J.; Antony Joseph, M.J.; Maher, S.; Taylor, S. Quadrupole mass filter: Design and performance for operation in stability zone 3. J. Am. Soc. Mass Spectrom. 2013, 24, 1493–1500. [Google Scholar] [CrossRef] [PubMed]
  36. Liu, L.; Jiang, Y.; Liu, M.; Dai, X.; Fang, X.; Chen, D.; Qiu, C.; Huang, Z. Research on Automatic Adjustment of Mass Resolution in Quadrupole Mass Spectrometry. J. Chin. Mass Spectrom. Soc. 2020, 41, 118–124. [Google Scholar]
  37. Zhang, T.; Chen, Y.; Chen, P.; Cao, Y.-X.; Tian, D.; Hua, L.; Li, H.-Y. Adaptive Online Optimization of Multiple-Reflection Time-of-Flight Mass Spectrometer Performance Based on Genetic Algorithm. Chin. J. Anal. Chem. 2023, 51, 1105–1111. [Google Scholar] [CrossRef]
  38. Jia, M.; Li, L.; Xiong, B.; Feng, L.; Cheng, W.; Dong, W.F. Multi-Parameter Auto-Tuning Algorithm for Mass Spectrometer Based on Improved Particle Swarm Optimization. Bioengineering 2023, 10, 1079. [Google Scholar] [CrossRef]
  39. Awad, N.; Ali, M.; Liang, J.; Qu, B.; Suganthan, P. Problem Definitions and Evaluation Criteria for the CEC 2017 Special Session and Competition on Single Objective Bound Constrained Real-Parameter Numerical Optimization; Technical report No. 201311; Nanyang Technological University: Singapore, 2016; pp. 1–34. [Google Scholar]
Figure 1. Flowchart of DE algorithm (the classic DE algorithm and the improved DE algorithm).
Figure 1. Flowchart of DE algorithm (the classic DE algorithm and the improved DE algorithm).
Bioengineering 12 01154 g001
Figure 2. Schematic diagram of the ion source and lens parameters of the triple quadrupole mass spectrometer.
Figure 2. Schematic diagram of the ion source and lens parameters of the triple quadrupole mass spectrometer.
Bioengineering 12 01154 g002
Figure 3. Flowchart of the automatic tuning method based on the improved differential evolution algorithm.
Figure 3. Flowchart of the automatic tuning method based on the improved differential evolution algorithm.
Bioengineering 12 01154 g003
Figure 4. Correspondence of mass to DAC.
Figure 4. Correspondence of mass to DAC.
Bioengineering 12 01154 g004
Figure 5. Correspondence of mass to resolution offset voltage (OFFSET).
Figure 5. Correspondence of mass to resolution offset voltage (OFFSET).
Bioengineering 12 01154 g005
Figure 6. Some convergence curves of CEC-2017 functions for different algorithms among the 30 repeated trials.
Figure 6. Some convergence curves of CEC-2017 functions for different algorithms among the 30 repeated trials.
Bioengineering 12 01154 g006
Figure 7. Mass spectrum obtained after univariate search (intensity: 2.15 × 107 cps; mass resolution: 0.786 u).
Figure 7. Mass spectrum obtained after univariate search (intensity: 2.15 × 107 cps; mass resolution: 0.786 u).
Bioengineering 12 01154 g007
Figure 8. Mass spectrum obtained after the automatic tuning method based on the improved DE algorithm (intensity: 2.87 × 107 cps; mass resolution: 0.675 u).
Figure 8. Mass spectrum obtained after the automatic tuning method based on the improved DE algorithm (intensity: 2.87 × 107 cps; mass resolution: 0.675 u).
Bioengineering 12 01154 g008
Figure 9. The mass spectrum before the tuning process. (a) m/z 172.88 (intensity: 1.91 × 107 cps; mass resolution: 0.814 u). (b) m/z 622.57 (intensity: 1.39 × 107 cps; mass resolution: 1.313 u). (c) m/z 922.36 (intensity: 1.04 × 107 cps; mass resolution: 1.945 u).
Figure 9. The mass spectrum before the tuning process. (a) m/z 172.88 (intensity: 1.91 × 107 cps; mass resolution: 0.814 u). (b) m/z 622.57 (intensity: 1.39 × 107 cps; mass resolution: 1.313 u). (c) m/z 922.36 (intensity: 1.04 × 107 cps; mass resolution: 1.945 u).
Bioengineering 12 01154 g009
Figure 10. The mass spectrum after the tuning process. (a) m/z 172.88 (intensity: 2.64 × 107 cps; mass resolution: 0.675 u). (b) m/z 622.57 (intensity: 2.61 × 107 cps; mass resolution: 0.709 u). (c) m/z 922.36 (intensity: 7.89 × 106 cps; mass resolution: 0.723 u).
Figure 10. The mass spectrum after the tuning process. (a) m/z 172.88 (intensity: 2.64 × 107 cps; mass resolution: 0.675 u). (b) m/z 622.57 (intensity: 2.61 × 107 cps; mass resolution: 0.709 u). (c) m/z 922.36 (intensity: 7.89 × 106 cps; mass resolution: 0.723 u).
Bioengineering 12 01154 g010
Table 1. The CEC-2017 test functions used for performance comparison of different algorithms [39].
Table 1. The CEC-2017 test functions used for performance comparison of different algorithms [39].
Functions TypeFunctions No. of CEC 2017FunctionsFi* = Fi(x*)
Simple Multimodal FunctionsF5Shifted and Rotated Rastrigin’s Function
f 5 ( x ) = i = 1 D ( x i 2 10 c o s ( 2 π x i ) + 10 )
500
F7Shifted and Rotated Lunacek Bi_Rastrigin Function
f 7 ( x ) = m i n ( i = 1 D ( x ^ i μ 0 ) 2 , d D + s i = 1 D ( x ^ i μ 0 ) 2 ) + 10 ( D i = 1 D c o s ( 2 π z ^ i ) )
700
Hybrid FunctionsF16Hybrid Function 6 (N = 4)
F ( x ) = g 1 ( M 1 z 1 ) + g 2 ( M 2 z 2 ) + . . . + g N ( M N z N ) + F * ( x )
1600
F20Hybrid Function 10 (N = 6)
F ( x ) = g 1 ( M 1 z 1 ) + g 2 ( M 2 z 2 ) + . . . + g N ( M N z N ) + F * ( x )
2000
Composition FunctionsF26Composition Function 6 (N = 5)
F ( x ) = i = 1 N { ω i [ λ i g i ( x ) + b i a s i ] } + F * ( x )
2600
F29Composition Function 10 (N = 3)
F ( x ) = i = 1 N { ω i [ λ i g i ( x ) + b i a s i ] } + F * ( x )
2900
Table 2. Statistical results of the CEC-2017 test functions of 30 repeated trials for different algorithms. (D = 10, NP = 20, G = 25, the best result is marked in bold).
Table 2. Statistical results of the CEC-2017 test functions of 30 repeated trials for different algorithms. (D = 10, NP = 20, G = 25, the best result is marked in bold).
Functions-PSODE/Best/1/BinDE/Rand-to-Best/1/BinDE-i
F5Mean562.41564.73583.78553.74
Std10.2527.6219.1419.55
F7Mean819.14844.19834.90803.13
Std18.7277.4334.2833.68
F16Mean2092.592126.742140.462040.02
Std162.08180.25186.85195.05
F20Mean2224.552225.892276.962164.04
Std96.75101.7194.1261.11
F26Mean3307.353694.843785.913443.51
Std432.45595.26572.65323.52
F29Mean3388.663377.263440.263380.73
Std101.20109.16113.2688.80
Table 3. Intensities at m/z 172.88 obtained through automatic tuning using different algorithms.
Table 3. Intensities at m/z 172.88 obtained through automatic tuning using different algorithms.
MethodTest 1
(cps)
Test 2
(cps)
Test 3
(cps)
Mean
(cps)
Univariate search2.15 × 1072.21 × 1072.16 × 1072.17 × 107
PSO2.48 × 1072.63 × 1072.64 × 1072.58 × 107
DE/best/1/bin2.71 × 1072.66 × 1072.70 × 1072.69 × 107
DE/rand-to-best/1/bin2.68 × 1072.64 × 1072.70 × 1072.67 × 107
DE-i2.71 × 1072.71 × 1072.73 × 1072.72 × 107
Table 4. Test data of the automatic tuning experiments.
Table 4. Test data of the automatic tuning experiments.
No.Intensity at m/z 172.88
(cps)
Intensity at m/z 622.57
(cps)
Intensity at m/z 922.36
(cps)
12.44 × 1072.49 × 1078.29 × 106
22.37 × 1072.31 × 1077.60 × 106
32.56 × 1072.57 × 1078.44 × 106
42.42 × 1072.54 × 1078.41 × 106
52.30 × 1072.53 × 1077.62 × 106
62.73 × 1072.41 × 1076.71 × 106
72.65 × 1072.64 × 1078.23 × 106
82.47 × 1072.63 × 1078.42 × 106
92.53 × 1072.20 × 1076.73 × 106
102.54 × 1072.28 × 1076.79 × 106
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, Y.; Xiong, B.; Feng, L.; Li, L.; Cheng, W.; Tang, Y. Automatic Tuning Method for Quadrupole Mass Spectrometer Based on Improved Differential Evolution Algorithm. Bioengineering 2025, 12, 1154. https://doi.org/10.3390/bioengineering12111154

AMA Style

Zhang Y, Xiong B, Feng L, Li L, Cheng W, Tang Y. Automatic Tuning Method for Quadrupole Mass Spectrometer Based on Improved Differential Evolution Algorithm. Bioengineering. 2025; 12(11):1154. https://doi.org/10.3390/bioengineering12111154

Chicago/Turabian Style

Zhang, Yuanqing, Baolin Xiong, Le Feng, Liang Li, Wenbo Cheng, and Yuguo Tang. 2025. "Automatic Tuning Method for Quadrupole Mass Spectrometer Based on Improved Differential Evolution Algorithm" Bioengineering 12, no. 11: 1154. https://doi.org/10.3390/bioengineering12111154

APA Style

Zhang, Y., Xiong, B., Feng, L., Li, L., Cheng, W., & Tang, Y. (2025). Automatic Tuning Method for Quadrupole Mass Spectrometer Based on Improved Differential Evolution Algorithm. Bioengineering, 12(11), 1154. https://doi.org/10.3390/bioengineering12111154

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop