A method for separating overlapping peak curves and a method for measuring metal ions

By using sharpening and snake optimization algorithms to separate overlapping peak curves, the problem of separating overlapping voltammetric peaks in electrochemical methods was solved, and high-precision metal ion determination was achieved.

CN117291831BActive Publication Date: 2025-11-04OCEANOGRAPHIC INSTR RES INST SHANDONG ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311053440.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-11-04
Estimated Expiration
2043-08-21

AI Technical Summary

Technical Problem

In existing technologies for determining metal ions using electrochemical methods, overlapping voltammetric peaks make qualitative and quantitative analysis difficult. Traditional overlapping peak fitting methods cannot effectively identify the number of sub-peaks and the parameter value range is too large, affecting the separation accuracy and convergence speed.

Method used

A sharpening algorithm is used to increase the separation of overlapping peak curves. The number of sub-peaks is identified by Gaussian model fitting and snake optimization algorithm. The parameter value range is determined by peak points and valley points. The snake optimization algorithm is used to search for the global optimal Gaussian model set for separation.

Benefits of technology

It improves the separation accuracy and speed of overlapping peak curves, can accurately identify the type of metal ions, and enhances the accuracy of metal ion determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117291831B_ABST
    Figure CN117291831B_ABST
Patent Text Reader

Abstract

The application discloses an overlapping peak curve separation method and a metal ion determination method, and comprises the following steps: fitting an overlapping peak curve by using a Gaussian model; performing sharpening on the original overlapping peak curve by using a sharpening algorithm, and identifying the number of sub-peaks; taking the peak points and valley points in the sharpened overlapping peak curve as the basis, calculating the value interval of the peak height, the peak position and the peak width in the Gaussian model; initializing a snake group based on the value interval of the three parameters, searching for a global optimal Gaussian model set by using a snake optimization algorithm; and determining the curve of each sub-peak by using the peak height, the peak position and the peak width corresponding to each Gaussian model in the optimal Gaussian model set, so as to complete the separation of the overlapping peak curve. The application increases the separation degree of the overlapping peak by using the sharpening algorithm, so that the number of sub-peaks of the overlapping peak can be effectively identified, and then the parameter value space of the simulation sub-peak model is calculated based on the peak points and the valley points of the sharpened overlapping peak, so as to accelerate the convergence speed of the snake optimization algorithm and guarantee the separation precision of the overlapping peak.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of metal ion determination, and particularly relates to a method for separating overlapping voltammetric peaks generated in the process of determining metal ions by using electrochemical method. BACKGROUND

[0002] There are various methods for determining metal ions, and in recent years, electrochemical method is relatively fast-developing. Based on classic polarography, electrochemical method has developed into various methods such as oscillopolarography and anodic stripping voltammetry. Among them, anodic stripping voltammetry is an electrochemical analysis method combining voltammetric determination and constant potential electrolytic enrichment. This method has high sensitivity, can determine 10 -7 ~ 10 -9 mol / L of metal ions, and can continuously determine various metal ions.

[0003] When anodic stripping voltammetry is used to determine metal ions, the following two processes are mainly involved:

[0004] Electrolysis process: under a constant potential, the measured ions are electrolytically deposited and enriched on the working electrode, and chemically react with mercury on the working electrode to form amalgam. For a given metal ion, if the stirring speed is constant and the pre-electrolysis time is fixed, the amount of metal deposited is proportional to the concentration of the measured metal ion.

[0005] Stripping process: after enrichment, a reverse voltage is generally applied to the working electrode after 30s to 60s of static state, and the metal in the amalgam is re-oxidized to ions and returned to the solution by negative to positive scanning, generating an oxidation current, and recording the voltage-current curve, i.e. the voltammetric curve. The voltammetric curve is peak-shaped, and the peak current is proportional to the concentration of the measured metal ion in the solution, which can be used as the basis for quantitative analysis; the peak voltage can be used as the basis for qualitative analysis to determine the type of metal ion.

[0006] When using electrochemical method to determine metal ions, if the stripping potentials of different metal ions are similar and the concentrations are too high, multiple ions may be adsorbed on the electrode surface at the same time, resulting in overlapping voltammetric peaks, which brings difficulties to further qualitative and quantitative analysis of the stripping voltammetric curve.

[0007] In recent years, methods for separating overlapping peaks by fitting include genetic algorithm, difference algorithm, simulated annealing algorithm and neural network algorithm. These methods cannot effectively identify the number of sub-peaks in the overlapping peaks, and cannot narrow down the value range of the parameters, so the fitting effect is not ideal. SUMMARY

[0008] The present application aims to provide an overlapping peak curve separation method based on a sharpening algorithm and a snake optimization algorithm, so as to solve the problem that the traditional separation algorithm based on overlapping peak fitting cannot obtain the number of sub-peaks in the overlapping peak, so that the parameter value interval of the simulated sub-peak model is too large, which seriously affects the convergence speed of the subsequent optimization algorithm and the separation precision of the overlapping peak.

[0009] To solve the above technical problems, the present application adopts the following technical solutions:

[0010] In one aspect, the present application provides an overlapping peak curve separation method, comprising:

[0011] Obtaining an original overlapping peak curve y(x) to be separated;

[0012] Fitting the overlapping peak curve g(x) by using a Gaussian model;

[0013] Sharpening the original overlapping peak curve y(x) by using a sharpening algorithm, so as to identify the number N of sub-peaks in the overlapping peak;

[0014] Based on the peak points and valley points in the sharpened overlapping peak curve, the value interval of three parameters, i.e., the peak height A, the peak position B and the peak width C, in the Gaussian model is calculated;

[0015] Initializing a snake population based on the value interval of the three parameters, and searching for a global optimal Gaussian model set by using a snake optimization algorithm;

[0016] Determining the curve of each sub-peak by using the peak height, the peak position and the peak width corresponding to each Gaussian model in the optimal Gaussian model set, so as to complete the separation of the original overlapping peak curve y(x);

[0017] The determination method of the value interval of the three parameters, i.e., the peak height A, the peak position B and the peak width C, comprises:

[0018] According to the sharpened overlapping peak curve, the points with a slope of zero are calculated, so as to determine the peak points and the valley points;

[0019] The peak position value corresponding to each peak point is substituted into the original overlapping peak curve y(x), so as to calculate the peak height, and the peak height is taken as the middle value to determine an interval as the value interval of the peak height A parameter;

[0020] The valley position values corresponding to the two valley points adjacent to each peak point on the left and right are respectively taken as the lower boundary and the upper boundary of the value interval of the peak position B parameter;

[0021] The distance between the valley position of two valley positions adjacent to each peak point is taken as the lower boundary of the value interval of the peak width C parameter, and the maximum horizontal axis distance of the waveform with the vertical axis value of the original overlapping peak curve y(x) being greater than e continuously is taken as the upper boundary of the value interval of the peak width C parameter; the e is a positive number close to zero.

[0022] In some embodiments of the present application, the process of fitting the overlapping peak curve by using the Gaussian model can include:

[0023] The overlapping peak curve is regarded as a linear superposition of a plurality of Gaussian models, the overlapping peak curve is fitted by using N Gaussian models, and a mathematical expression of the fitted overlapping peak curve is obtained.

[0024]

[0025] wherein A i represents the peak height of the i-th sub-peak; B i represents the peak position of the i-th sub-peak; and C i represents the peak width of the i-th sub-peak.

[0026] In some embodiments of the present application, the process of sharpening the original overlapping peak curve by using the sharpening algorithm can include:

[0027] The original overlapping peak curve y(x) is sharpened by using the following sharpening formula:

[0028] Y(x) = y(x) - ky"(x);

[0029] wherein Y(x) represents the sharpened overlapping peak curve; y"(x) represents the second derivative of the original overlapping peak curve; and k is a sharpening factor, preferably a value greater than 1000, so as to achieve an ideal sharpening effect.

[0030] In some embodiments of the present application, for the number N of sub-peaks, the number of Gaussian models can be

[0031] determined according to the number of peak points.

[0032] In some embodiments of the present application, when searching for the global optimal Gaussian model set by using the snake optimization algorithm, the following process can be adopted:

[0033] Initialize the snake population in the value interval of the three parameters of the peak height A, the peak position B and the peak width C, and each snake corresponds to 3N parameters of N Gaussian models;

[0034] Calculate the two-norm between the vertical axis value of the fitted overlapping peak curve and the vertical axis value of the original overlapping peak curve as the fitness value of each snake;

[0035] The snake population is divided into male and female groups, and the two groups are affected by food quantity and temperature to perform foraging, fighting and breeding activities to generate a new generation of population;

[0036] The snake individual with the minimum fitness value is selected as the optimal result, and the result is gradually converged to the global optimum through multiple iterations;

[0037] The global optimal Gaussian model set, i.e., the sub-peak set, is determined according to the snake individual corresponding to the global optimal solution. Since each snake corresponds to N Gaussian models, each Gaussian model fits a sub-peak curve, and therefore, the peak height A, the peak position B and the peak width C corresponding to N sub-peak curves are included in the sub-peak set, i.e., N groups of peak height A, peak position B and peak width C parameters. Each group of parameters A, B and C can be used to draw a sub-peak curve, so that N sub-peak curves are formed, and the separation of the overlapping peak curve is completed.

[0038] In some embodiments of the present application, the calculation formula of the fitness value f can be configured as:

[0039]

[0040] wherein n is the length of the horizontal coordinate data of the original overlapping peak curve; y(j) represents the vertical axis value of the point with horizontal axis coordinate j in the original overlapping peak curve; and g(j) represents the vertical axis value of the point with horizontal axis coordinate j in the fitted overlapping peak curve.

[0041] In another aspect, the present application also provides a metal ion determination method, comprising:

[0042] An anodic stripping voltammetry method is used to perform anodic stripping and dissolution process on the metal ion to obtain a voltammogram;

[0043] A Gaussian model is used to fit the overlapping peak curve to obtain a fitted overlapping peak model;

[0044] The voltammogram is taken as the original overlapping peak curve, and a sharpening algorithm is used to perform sharpening processing on the original overlapping peak curve to identify the number N of sub-peaks in the overlapping peak;

[0045] Based on the peak points and valley points in the sharpened overlapping peak curve, the value range of the three parameters of peak height A, peak position B and peak width C in the Gaussian model is calculated;

[0046] A snake population is initialized in the value range of the three parameters, and a swarm intelligence search technology of the snake optimization algorithm is used to search for a global optimal Gaussian model set;

[0047] The peak height, the peak position and the peak width corresponding to each Gaussian model in the optimal Gaussian model set are used to determine the curve of each sub-peak, so that the voltammogram is separated into N sub-peak curves.

[0048] According to the peak voltage of each sub-peak curve, the type of metal ion is determined.

[0049] In some embodiments of the present application, in order to improve the separation precision, the following purification treatment is performed on the volt-ampere curve to obtain the original overlapping peak curve y(x):

[0050] The detected volt-ampere curve is smoothed by using a five-point cubic smoothing algorithm.

[0051] The background noise in the volt-ampere curve is deducted by using an asymmetric least squares baseline correction algorithm.

[0052] Compared with the prior art, the advantages and positive effects of the present application mainly lie in:

[0053] 1. The present application regards the overlapping peak curve as a linear superposition of a series of Gaussian models, and uses a sharpening algorithm to increase the separation degree of the overlapping peak curve, so as to effectively identify the number of sub-peaks in the overlapping peak curve.

[0054] 2. The value range of the three parameters of peak height, peak position and peak width is determined according to the peak points and valley points of the sharpened overlapping peak curve, which is not only reasonable, but also greatly reduces the value range compared with the traditional method, so as to accelerate the convergence speed of the snake optimization algorithm and improve the separation precision of the overlapping peak curve.

[0055] 3. When the overlapping peak curve separation method of the present application is applied in the determination process of metal ions, the volt-ampere curve generated in the determination process can be separated to obtain the sub-peak curve corresponding to different metal ions, and the type of metal ion can be determined according to the peak voltage of each sub-peak curve, thereby improving the accuracy of the determination result of metal ions.

[0056] Other features and advantages of the present application will become more apparent after reading the detailed description of the embodiments of the present application in combination with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0058] Figure 1 is a flow chart of an embodiment of the metal ion determination method proposed by the present application;

[0059] Figure 2 is a waveform comparison diagram of an embodiment of the original overlapping peak curve and the sharpened overlapping peak curve.

[0060] Figure 3 is a waveform comparison diagram of an embodiment of the original overlapping peak curve and the separated sub-peak curve. DETAILED DESCRIPTION

[0061] The specific embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0062] The overlapping peak curve separation method of the present embodiment takes the Gaussian model as the basis, uses the sharpening algorithm to increase the separation degree of the original overlapping peak curve, so as to accurately identify the number of sub-peaks in the overlapping peak; then, based on the peak points and valley points of the sharpened overlapping peak, reasonable and moderate value intervals for the parameters involved in the Gaussian model are determined; thereafter, the population searching ability of the snake optimization algorithm is used to initialize the snake population in the determined parameter value interval, so as to quickly obtain the best Gaussian model (sub-peak) set fitting the overlapping peak, thereby realizing the accurate separation of the overlapping peak curve.

[0063] The present embodiment takes the voltammogram collected in the process of measuring metal ions by electrochemical method as an example to elaborate the specific separation process of the overlapping peak curve.

[0064] As shown in Figure 1 , the metal ion measurement method of the present embodiment mainly includes the following processes:

[0065] S110, using anodic stripping voltammetry to perform anodic process and dissolution process on the metal ion to be measured, to obtain a voltammogram.

[0066] This process is prior art, and the present embodiment will not be described in detail.

[0067] When the metal ion to be measured contains multiple metal ions with similar potentials and high concentrations, the voltammogram obtained by using anodic stripping voltammetry for detection often has overlapping voltammetric peaks, such as the solid line waveform in Figure 2 , which in turn causes difficulties in accurate measurement of metal ions.

[0068] In order to solve the above problem, it is necessary to separate the overlapping voltammetric peaks to restore the sub-peak waveform corresponding to each kind of metal ion, and to create conditions for qualitative analysis of metal ions. In view of this, the present embodiment proposes the subsequent overlapping peak waveform separation process.

[0069] S120, purifying the voltammogram to obtain a net overlapping voltammetric peak curve.

[0070] Before separating the overlapping voltammetric peak curve, in order to improve the separation precision, the detected voltammetric peak curve can be pretreated to obtain a purified overlapping voltammetric peak curve.

[0071] In the embodiment, the volt-ampere curve (the overlapping peak curve) can be firstly smoothed by using a five-point cubic smoothing algorithm; then, the background current (background noise) in the volt-ampere curve is deducted by using an asymmetric least squares baseline correction algorithm, so as to obtain a net overlapping volt-ampere peak curve.

[0072] Suppose that the purified overlapping volt-ampere peak curve is y(x), wherein x is voltage and y is metal ion dissolution current.

[0073] S130, taking the purified overlapping volt-ampere peak curve as a raw overlapping peak curve, performing an overlapping peak curve separation process.

[0074] S140, fitting the overlapping peak curve by using a Gaussian model.

[0075] The overlapping peak curve can be regarded as being linearly superimposed by a plurality of Gaussian models. Suppose that the overlapping peak curve is superimposed by N sub-peak waveforms, then the overlapping peak curve can be fitted by using N Gaussian models, so as to obtain a mathematical expression g(x) of the fitted overlapping peak curve:

[0076]

[0077] wherein A i represents a peak height of the i-th sub-peak; B i represents a peak position of the i-th sub-peak; C i represents a peak width of the i-th sub-peak; and N represents a sub-peak number.

[0078] That is to say, each sub-peak waveform can be fitted by using a Gaussian model, and each Gaussian model has three parameters, namely, a peak height A, a peak position B and a peak width C. After calculating the specific parameter values of the peak height A, the peak position B and the peak width C in each Gaussian model, each sub-peak waveform corresponding to the Gaussian model can be reconstructed, and then the separation of the overlapping peak curve is realized.

[0079] S150, performing a sharpening process on the raw overlapping peak curve by using a sharpening algorithm, so as to identify the sub-peak number N in the overlapping peak.

[0080] In order to accurately identify the sub-peak number N in the raw overlapping peak curve, the sharpening algorithm can be used to increase the separation degree of the overlapping peak curve, and the sharpening formula is as follows:

[0081] Y(x) = y(x) - ky''(x);

[0082] Where Y(x) represents the sharpened overlapping peak curve; y(x) represents the original overlapping peak curve, such as the purified overlapping voltammetric peak curve; y″(x) represents the second derivative of the original overlapping peak curve; and k is the sharpening factor. Different sharpening effects can be achieved by adjusting the sharpening factor k. In this embodiment, k is configured to >1000 to obtain a separation effect sufficient to identify the number of sub-peaks, such as... Figure 2 The dashed part in the text.

[0083] S160. Based on the peaks and valleys in the sharpened overlapping peak curve, calculate the range of values ​​for the three parameters in the Gaussian model: peak height A, peak position B, and peak width C.

[0084] In this embodiment, the points with a slope of zero can be calculated first based on the sharpened overlapping peak curve to determine the peaks and valleys in the curve. For example... Figure 2 The dashed curve in the image represents the peaks of the sharpened overlapping curve, with star-shaped points indicating peaks and circular points indicating valleys. The number of peaks represents the number of sub-peaks N in the overlapping curve.

[0085] Then, based on the determined peak and trough points, the value ranges of the three parameters of the sub-peak model (Gaussian model) – peak height A, peak position B, and peak width C – are calculated. The specific method is as follows:

[0086] (1) The range of values ​​for the peak height parameter A:

[0087] Substitute the peak position value (the x-coordinate of the peak point) corresponding to each peak point into the original overlapping peak curve to calculate the peak height (the y-coordinate of the peak point). Use this peak height as the intermediate value to determine an interval as the value range of the peak height parameter A. For example, 90% of the peak height can be used as the lower boundary of the interval, and 110% of the peak height can be used as the upper boundary of the interval. The value range of the peak height parameter A can be determined based on the upper and lower boundaries.

[0088] This determines the range of values ​​for the peak height parameter A for each sub-peak model (Gaussian model).

[0089] (2) The range of values ​​for the peak position parameter B:

[0090] The valley position values ​​(x-coordinates of the valley points) corresponding to the two adjacent valley points of each peak are used as the lower and upper boundaries of the range of peak position B parameters, respectively. That is, the range of peak position B parameters for a sub-peak is determined by using the x-coordinates of two adjacent valley points.

[0091] This determines the range of values ​​for the peak position B parameter for each sub-peak model (Gaussian model).

[0092] (3) The range of values ​​for the peak width parameter C:

[0093] The valley distance between two valley points adjacent to each peak point (the difference between the abscissa values of the two adjacent valley points) is taken as the lower boundary of the value interval of the peak width C parameter, and the maximum abscissa distance of the waveform with the ordinate value of the original overlapping peak curve being continuously greater than e is taken as the upper boundary of the value interval of the peak width C parameter. The e can be a positive number close to zero, for example, the value interval can be set as (0, 10 -3 ). For the overlapping voltammogram generated in the metal ion determination process, e = 10 -4 μA can be set. That is, the maximum abscissa distance of the waveform with the ordinate current value of the original overlapping voltammogram being continuously greater than 10 -4 μA can be taken as the upper boundary of the value interval of the peak width C parameter.

[0094] Thus, the value interval of the peak height A, peak position B, and peak width C parameters in the Gaussian model corresponding to each sub-peak is determined.

[0095] Thus, the value interval of the peak height A, peak position B, and peak width C parameters in the Gaussian model corresponding to each sub-peak is determined.

[0096] S170, search for a globally optimal Gaussian model set using a snake optimization algorithm.

[0097] The snake optimization algorithm is an algorithm based on the simulation of snake behavior, which simulates the behaviors of snakes in nature such as foraging, fighting, mating, and egg laying. The algorithm is fast and effective, and can efficiently solve the optimal solution of the objective function.

[0098] In this embodiment, the swarm intelligence search technology of the snake optimization algorithm is used, each snake corresponds to 3N parameters of N Gaussian models, and the two-norm between the ordinate values of the overlapping peak curve fitted by the parameters and the original overlapping peak curve is taken as the fitness value of each snake. The algorithm initializes the position of the snake group, divides the group into males and females, and makes the two groups forage, fight, and reproduce under the influence of two environmental factors, food quantity and temperature, to generate a new generation of groups, and selects the individual with the smallest fitness value as the optimal result of this time. Through multiple iterations, the result gradually converges to the global optimum, that is, the fitness value is the smallest, and then the error between the fitted overlapping peak curve and the original overlapping peak curve is the smallest.

[0099] The specific process is as follows:

[0100] S171, generate an initialized snake group.

[0101] In this process, it is assumed that the number of snake groups is M, and based on the value intervals of the peak height A, peak position B, and peak width C parameters determined in process S160, the snake group is initialized, and an initial population with uniform distribution is created, that is, the snake group is uniformly distributed in the 3N-dimensional space position. The population is evenly divided into two groups of males and females.

[0102] S172, calculate the fitness value of each snake.

[0103] The embodiment takes the two-norm between the longitudinal coordinate value of the curve of the Gaussian model fitting overlapping peak and the longitudinal coordinate value of the original overlapping peak curve as the fitness value of each snake, and the calculation formula is:

[0104]

[0105] Wherein, n is the length of the horizontal coordinate data of the original overlapping peak curve; y(j) represents the vertical axis value (vertical coordinate) of the point with horizontal axis coordinate j in the original overlapping peak curve; g(j) represents the vertical axis value of the point with horizontal axis coordinate j in the fitting overlapping peak curve.

[0106] For the overlapping voltammetry peak curve obtained in the process of metal ion determination, n is the length of the voltage interval involved in the x-axis of the overlapping voltammetry peak curve y(x), as shown in Figure 2 The voltage increases by 0.1V, and n increases by 1.

[0107] S173, set the environmental factors.

[0108] The behavior of the snake is mainly affected by the high and low temperature of the environment and the amount of food.

[0109] The environmental temperature Temp is represented by the following formula:

[0110]

[0111] In the formula, t is the current iteration number, and T is the maximum iteration number.

[0112] The amount of food Q is represented by the following formula:

[0113]

[0114] In the formula, c1 is a constant, which can be taken as 0.5.

[0115] S174, search for food.

[0116] If the amount of food Q<Threshold1 (in some embodiments, the threshold value Threshold1 can be set as 0.25), then at this time the amount of food is low, and the snake population searches for food by randomly selecting a position and updates its own position. The random search formula is as follows:

[0117]

[0118] X i,m (t+1)=X rand,m (t)±c2×A m ×((Xmax - X min ) x rand + X min )

[0119] X i,f (t + 1) = X rand,f (t) ± c2 x A f x ((X max - X min ) x rand + X min )

[0120] wherein f rand,m and f rand,f are the fitness values of the positions of the individuals randomly selected from the male group and the female group, respectively; f i,m and f i,f are the fitness values of the positions of the ith individual in the male group and the ith individual in the female group, respectively; A m and A f are the abilities of the males and the females to find food, respectively; X i,m and X i,f are the positions of the ith individual in the male group and the female group, respectively; X rand,m and X rand,f are the positions of the individuals randomly selected from the male group and the female group, respectively; X max and X min are the upper and lower boundaries of the value space of the positions of the individuals, respectively; rand is a random number in the range of [0, 1]; and c2 is a constant, which can be c2 = 0.05.

[0121] S175, approaching food.

[0122] When Q ≥ Threshold1 and the environmental temperature Temp > Threshold2 (in some embodiments, the threshold value Threshold2 can be set as 0.6), it is a state of high food quantity and high temperature, and the snake population will approach the food, and the position updating formula is as follows:

[0123] X i,j (t + 1) = X food ± c3 x Temp x rand x (X food - X i,j (t))

[0124] wherein X i,j is the position of the individual (male or female) of the snake; X food is the position of the food, which is represented by the optimal position in the snake population; and c3 is a constant, which can be 2.

[0125] S176, fighting or mating.

[0126] When Q≥Thresholdl and Temp≤Threshold2, the environment is in a state of abundant food and low temperature. Both male and female groups will enter the fighting mode or mating mode.

[0127] The probability of fighting is set to 40% and the probability of mating is set to 60%.

[0128] The fighting mode formula is as follows:

[0129]

[0130] X i,m (t+1) = X i,m (t) + c3 x FM x rand x (Q x X best,f (t) - X i,m (t))

[0131] X i,f (t+1) = X i,f (t) + c3 x FF x rand x (Q x X best,m (t) - X i,f (t))

[0132] In the formula, f best,m and f best,f are the fitness values of the optimal positions in the male group and the female group respectively; f i,m and f i,f are the fitness values of the positions of the ith individual in the male group and the ith individual in the female group respectively; FM and FF are the fighting abilities of the male and the female respectively; X i,m and X i,f are the positions of the ith individual in the male group and the ith individual in the female group respectively; X best,m and X best,f are the optimal positions in the male group and the female group respectively.

[0133] The mating mode is as follows:

[0134]

[0135] X i,m (t+1) = X i,m (t) + c3 x M m x rand x (Q x X i,f (t) - X i,m (t))

[0136] X i,f (t+1) = X i,f (t) + c3 x M f x rand x (Q x X i,m (t) - X i,f(t))

[0137] where f i,m and f i,f are the fitness values of the i-th individual in the male group and the i-th individual in the female group, respectively; M m and M f are the mating abilities of the male and the female, respectively; X i,m and X i,f are the positions of the i-th individual in the male group and the i-th individual in the female group, respectively.

[0138] If there are hatched snake eggs, the worst individuals in the male and female groups are selected for replacement, respectively, and the formulas are as follows:

[0139] X worst,m = X min + rand × (X max - X min )

[0140] X worst,f = X min + rand × (X max - X min )

[0141] where X worst,m and X worst,f are the worst individuals in the male group and the female group, respectively.

[0142] S177, when the termination condition is met, ending the iteration process, and finding the global optimal Gaussian model set.

[0143] When the iteration number is full (t = T) or the fitness value f is unchanged for many times, the algorithm is terminated; otherwise, returning to S172 to continue running, and iteratively looping until the global optimal solution is obtained, i.e., the global optimal Gaussian model set is found.

[0144] S180, using the peak height, peak position and peak width corresponding to each Gaussian model in the optimal Gaussian model set to determine the curve of each sub-peak, and completing the separation of the overlapping peak curve.

[0145] After running the snake optimization algorithm, the optimal values of the three parameters of peak height A, peak position B and peak width C in each Gaussian model are found. The three parameters of peak height A, peak position B and peak width C can be used to restore the sub-peak curve, i.e., N separated sub-peak curves generated by the optimal individual parameters can be obtained, thereby completing the separation of the overlapping peak curve, as shown in Figure 3 .

[0146] S190, determining the type of metal ion according to the peak position voltage of each sub-peak curve.

[0147] In the separated N sub-peak curves (volt-ampere curves), according to the peak voltage of each sub-peak curve, that is, the horizontal axis voltage value corresponding to the peak point, the type of metal ion can be determined.

[0148] The method for identifying the type of metal ion according to the peak voltage is prior art, and the embodiment will not be described.

[0149] Thus, the determination process of the metal ion is completed.

[0150] Since the existing overlapping peak separation method often does not have an algorithm for determining the number of sub-peaks of the overlapping peak, and the parameter value space is too large, it is not conducive to the convergence of the optimization algorithm, and the separation precision is poor. The overlapping peak separation method of the embodiment uses a sharpening algorithm to increase the separation degree of the overlapping peak, so that the positions of the peak point and the valley point are more obvious, thereby effectively identifying the number of sub-peaks of the overlapping peak, and calculating the value range of the three parameters of the peak height, the peak position and the peak width of the sub-peak model based on the peak point position and the valley point position.

[0151] According to the conditions obtained above, the group intelligence search technology of the snake optimization algorithm is used to separate the overlapping peak, and the fitness value represented by the two norms between the overlapping peak ordinate value fitted by the Gaussian model and the original overlapping peak ordinate value is used, thereby ensuring the optimal separation in the global sense.

[0152] The snake optimization algorithm of the embodiment has a fast iteration optimization convergence speed, high separation precision, and an error usually within 2%, and has high practicability.

[0153] Of course, the above only describes one preferred embodiment of the present application, and it should be noted that for ordinary skilled persons in the art, several improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method for determining metal ions, characterized in that, include: The electrolysis and dissolution process of metal ions was investigated using anodic stripping voltammetry, and voltammetric curves were obtained. The current-voltage curve is used as the original overlapping peak curve y(x); The overlapping peak curve g(x) is fitted using a Gaussian model; The original overlapping peak curve y(x) is sharpened using a sharpening algorithm to identify the number N of sub-peaks in the overlapping peaks; Based on the peaks and valleys in the sharpened overlapping peak curve, the range of values ​​for the three parameters A (peak height), B (peak position), and C (peak width) in the Gaussian model are calculated. The snake population is initialized based on the value range of the three parameters, and the snake optimization algorithm is used to search for the globally optimal Gaussian model set. By using the peak height, peak position, and peak width corresponding to each Gaussian model in the optimal Gaussian model set, the curve of each sub-peak is determined to complete the separation of the original overlapping peak curve y(x). The type of metal ion is determined based on the peak voltage of each sub-peak curve; The method for determining the value ranges of the three parameters, peak height A, peak position B, and peak width C, includes: Based on the sharpened overlapping peak curves, calculate the points with zero slope to determine the peak and valley points; Substitute the peak position value corresponding to each peak point into the original overlapping peak curve y(x) to calculate the peak height. Use this peak height as the intermediate value to determine an interval as the range of values ​​for the peak height parameter A. The valley values ​​corresponding to the two valleys adjacent to each peak are respectively used as the lower and upper boundaries of the range of peak position B parameter. The valley distance between two adjacent valleys of each peak is taken as the lower boundary of the range of values ​​for the peak width C parameter, and the maximum horizontal distance of the waveform whose vertical axis value of the original overlapping peak curve y(x) is continuously greater than e is taken as the upper boundary of the range of values ​​for the peak width C parameter; where e is a positive number close to zero.

2. The method for determining metal ions according to claim 1, characterized in that, The process of fitting the overlapping peak curve using a Gaussian model includes: The overlapping peak curve is viewed as a linear superposition of multiple Gaussian models. By fitting the overlapping peak curve with N Gaussian models, the mathematical expression for the fitted overlapping peak curve is obtained: Among them, A i B represents the peak height of the i-th sub-peak; i C represents the position of the i-th sub-peak; i This represents the peak width of the i-th sub-peak.

3. The method for determining metal ions according to claim 2, characterized in that, The process of sharpening the original overlapping peak curve y(x) using a sharpening algorithm includes: The original overlapping peak curve is sharpened using the following sharpening formula: Y(x) = y(x) - ky″(x); Where Y(x) represents the sharpened overlapping peak curve; y″(x) represents the second derivative of the original overlapping peak curve; and k is the sharpening factor.

4. The method for determining metal ions according to claim 3, characterized in that, The sharpening factor k > 1000.

5. The method for determining metal ions according to claim 1, characterized in that, After performing the following purification process on the current-voltage curve, the original overlapping peak curve y(x) is obtained: The detected volt-ampere curve is smoothed using a five-point cubic smoothing algorithm; The background noise in the current-voltage curve is removed using an asymmetric least squares baseline correction algorithm.

6. The method for determining metal ions according to claim 1, characterized in that, The number of sub-peaks N is determined based on the number of peak points.

7. The method for determining metal ions according to claim 1, characterized in that, The range of values ​​for the peak height parameter A is defined by 90% of the peak height value calculated by substituting the peak position value corresponding to each peak point into the original overlapping peak curve y(x) as the lower boundary, and 110% of the peak height value as the upper boundary. The value range of e is (0, 10). -3 ).

8. The method for determining metal ions according to any one of claims 1 to 7, characterized in that, The process of searching for the globally optimal Gaussian model set using the snake optimization algorithm includes: Initialize the snake population within the determined range of values ​​for the three parameters: peak height A, peak position B, and peak width C. Each snake corresponds to 3N parameters of N Gaussian models. The L2 norm between the ordinate value of the fitted overlapping peak curve g(x) and the ordinate value of the original overlapping peak curve y(x) is calculated and used as the fitness value for each snake. The snake population was divided into male and female groups, and the two groups were subjected to foraging, fighting and breeding activities under the influence of two environmental factors: food availability and temperature, to generate a new generation of snakes. The snake with the smallest fitness value is selected as the optimal result for this iteration. After multiple iterations, the result gradually converges to the global optimum. The set of global optimal Gaussian models, i.e., the sub-peak set, is determined based on the individual snakes corresponding to the global optimal solution.

9. The method for determining metal ions according to claim 8, characterized in that, The formula for calculating the fitness value f is: Where n is the length of the abscissa data of the original overlapping peak curve; y(j) represents the ordinate value of the point with abscissa j in the original overlapping peak curve; g(j) represents the ordinate value of the point with abscissa j in the fitted overlapping peak curve.

Citation Information

Patent Citations

  • ICP-AES multi-peak spectral line separation method based on particle swarm algorithm

    CN112395803A

  • Mixed gas photoacoustic spectrum recognition method and device based on deep learning

    CN112595672A