An underwater LIBS spectral quantitative analysis method and system
By using the CNN model in the quantitative analysis of underwater LIBS spectral and updating parameters, the quantitative model failure caused by inconsistent with the environmental water body of the sample to be tested is solved, and a more accurate and flexible quantitative analysis of underwater LIBS spectral is achieved.
Patent Information
- Application Number
- CN202410761539.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2044-06-13
AI Technical Summary
The existing underwater LIBS spectral quantitative analysis method is inconsistent with the environmental water body in which the training sample is to be tested, and the quantitative model is prone to failure, resulting in large errors in the quantitative results.
Convolutional neural network (CNN) is used to build a quantitative model of LIBS spectroscopy and element content, and initialize training through artificial simulation of seawater data. Then, the model is updated with natural seawater sample data to enhance the model's analysis ability in facing natural seawater.
Through the model migration method, the quantitative model can adapt to different environmental water conditions, reduce the error of quantitative results, and improve the flexibility and accuracy of underwater LIBS spectral quantitative analysis.
Smart Images

Figure CN118731001B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of spectral quantitative analysis, and in particular relates to an underwater LIBS spectral quantitative analysis method and system. Background Art
[0002] In recent years, due to the decreasing land resources, the exploration and development of marine resources has gradually become the focus of attention of all countries. Improving the ability to develop marine resources is also a requirement of my country's marine power strategy. With the continuous advancement of science and technology, underwater robots, seabed observation networks, remote-controlled submersibles and other platforms related to marine exploration have also been substantially developed, providing a solid hardware foundation for the installation of detection equipment. At present, the detection of marine chemical composition or seabed minerals mainly relies on laboratory analysis after sampling. Commonly used technical means include inductively coupled plasma atomic emission spectroscopy (ICP-AES), inductively coupled plasma mass spectrometry (ICP-MS) and X-ray fluorescence spectroscopy (XRF). Although these technologies can accurately analyze the physical and chemical information of sample substances, they require complex sample preparation and long analysis time, and the information obtained has great lag and limitations in time and space. This will lead to a lack of real-time and rapid feedback and scientific regulation in the actual detection process, which seriously affects the detection efficiency. Therefore, it has become an urgent need to develop a fast, in-situ and accurate marine detection technology.
[0003] Laser-induced breakdown spectroscopy (LIBS) is a spectral technique based on the interaction between high-power pulsed laser and matter, which generates transient plasma by breakdown and achieves qualitative and quantitative analysis of elements by studying the radiation spectrum of plasma. LIBS technology has the characteristics of no need for sample pretreatment, simultaneous detection of multiple elements, simple equipment and operation, and fast detection speed. It has unique advantages in online or in-situ detection under extreme environments. It has been successfully used for underwater in-situ detection and has achieved effective results in seawater composition detection, cultural relics archaeology, and hydrothermal deposit composition detection.
[0004] However, when performing LIBS detection underwater, the water body is both the target for generating plasma and the environmental field for LIBS analysis, and the matrix effect of LIBS spectrum is more obvious. The generation of laser-induced plasma involves complex nonlinear physical processes and is highly sensitive to experimental conditions. Any changes in environmental parameters will affect the physical process of underwater LIBS, and then affect the LIBS spectrum. At present, most quantitative methods for underwater LIBS use multivariate analysis, that is, first obtain a series of sample LIBS spectra with concentration gradients, then extract the corresponding multiple wavelengths or bands, and use the multivariate analysis algorithm to comprehensively utilize the composite relationship between multiple variables, and finally establish a quantitative analysis model. In addition, the premise of the application of the model is that the training set data and the test data have common features, and then the training set data is used to establish a quantitative model to predict the prediction set data. If the characteristics of the training set data and the test set data are very different, the quantitative model will not be able to perform as expected.
[0005] When the environmental water bodies of the training samples and the predicted samples are different, the matrix effect caused by the change of the environmental water body will cause the LIBS spectra of the same element concentration to be greatly different, thus causing the quantitative model to fail. And due to the limitations of experimental conditions, in order to ensure the quality and quantity of the training set, the quantitative model is often pre-trained using laboratory data. It is usually difficult to use the water conditions at the actual detection location to prepare the samples required for model training, which will seriously affect the flexibility of LIBS technology in underwater in-situ quantitative detection. Therefore, how to update the model according to the water characteristics of the detection location is a key issue in achieving accurate quantification of marine LIBS.
[0006] Currently, there is a lack of LIBS spectral quantitative analysis methods for different environmental water bodies, and there are no reports on how to correct the matrix effects caused by changes in environmental water bodies.
[0007] Through the above analysis, the problems and defects of the existing technology are as follows: At present, most of the quantitative analysis methods for underwater LIBS spectra are to prepare a series of concentration gradient samples and obtain their LIBS spectra, then extract the corresponding multiple wavelengths or bands and combine machine learning or deep learning methods to train the quantitative model, and finally perform quantitative analysis on the LIBS spectra of the samples to be tested. Most of these methods assume that the training set data and the test data have common features. In actual ocean exploration, most of the training set samples are artificially prepared using deionized water or simulated seawater and other solvents, which have certain differences in composition from the environmental water bodies in which the samples are located in actual exploration. The matrix effect caused by changes in the environmental water bodies will cause the LIBS spectra of the same element concentration to be greatly different, thereby causing the quantitative model to fail and resulting in large errors in the quantitative results. Summary of the invention
[0008] In order to overcome the problems existing in the related art, the disclosed embodiments of the present invention provide an underwater LIBS spectral quantitative analysis method and system, specifically relating to a LIBS spectral quantitative analysis method suitable for environmental water changes.
[0009] The technical solution is as follows: Underwater LIBS spectral quantitative analysis method, including:
[0010] S1, using high-energy pulsed laser to focus on the sample to be tested, the laser interacts with the sample to generate transient plasma, and the emission spectrum information of the plasma is recorded by a spectrometer; and the spectrum intensity is related to the corresponding element content. The higher the element content, the stronger the intensity of the corresponding element characteristic spectrum line;
[0011] S2, build a quantitative model of LIBS spectrum and element content based on convolutional neural network, and use artificial simulated seawater data to initialize and train the model parameters;
[0012] S3, using natural seawater sample data to update the parameters of the quantitative model, to enhance the analytical capability of the quantitative model for LIBS spectra in natural seawater.
[0013] In step S1, the sample to be tested includes:
[0014] Using simulated seawater and natural seawater as solvents, solution samples with different concentrations of Mn and Li elements were prepared, the simulated seawater samples were used as source domain data, and the natural seawater samples were used as target domain data;
[0015] Solution samples with different concentrations of Mn and Li elements, including: 10 groups of solutions are prepared, and the concentrations of Mn and Li elements in each group of solutions are: 100, 100; 200, 90; 400, 80; 600, 70; 800, 60; 1000, 50; 1200, 40; 1400, 30; 1600, 20; 1800, 10; the unit is ppm;
[0016] The emission spectrum information of the plasma is recorded by a spectrometer, including: optimizing experimental parameters and collecting original LIBS spectrum data of samples under different environmental water conditions.
[0017] In step S2, a quantitative model of LIBS spectrum and element content is built based on a convolutional neural network, including:
[0018] (301) The spectra were screened according to their integrated intensity, and the abnormal spectra that deviated from the average value of the spectral integrated intensity by more than 20% were removed. The simulated seawater samples were divided into training set samples and prediction set samples in a ratio of 7:3;
[0019] (302) The number of convolutional layers, the number of convolutional kernels, the activation function and the step size in the CNN network structure are adjusted, and the generated CNN network structure after each adjustment is used for model training. The optimal values of each part of the network structure are determined using the REC and REP of the model. The optimal values are the number of convolutional layers, the number of convolutional kernels, the activation function and the step size in the CNN network structure corresponding to the minimum REC and REP. The CNN model corresponding to the optimal values is the initial CNN quantitative model.
[0020] In step (301), screening is performed according to the integrated intensity of the spectrum, including:
[0021] (1) Averaging the 100 spectra of each sample to obtain a standard spectrum, and calculating the integrated intensity value I of the standard spectrum;
[0022] (2) Let p = 1 and calculate the integrated intensity of the pth spectrum ,judge( ) / I≤±20%, if yes, keep the spectrum, otherwise, discard the spectrum, p=p+1, judge p≤100, if yes, return to step (2), otherwise, go to step (302).
[0023] In step (302), the CNN network structure consists of 4 convolutional layers and 2 fully connected layers; the output of each convolutional layer is passed to the maximum pooling layer; among them, the first convolutional layer contains 32 convolution kernels, the size of the convolution kernel is 10, the padding is equal padding, the step size is 2, and the activation function uses the ReLU function.
[0024] In step S3, the parameters of the quantitative model are updated using the natural seawater sample data, including:
[0025] (401) Let i = 0, randomly extract samples from the natural seawater training set, the number of samples extracted is i, add the spectra corresponding to the extracted samples to the CNN quantitative training set, retrain the CNN quantitative model, and predict the natural seawater prediction set samples to obtain the quantitative results, i = i + 1;
[0026] (402) Determine if i≤n, where n is the total number of samples in the prediction set. If so, return to step (401). Otherwise, calculate the REC and REP of the model using the quantitative results obtained, and select the number of samples corresponding to the minimum sum of REC and REP as the number of samples in the prediction set participating in model training.
[0027] (403) After determining the natural seawater samples to be involved in the training, the simulated seawater samples in the training set are optimized, and the simulated seawater samples in the training set are screened using a cyclic algorithm with replacement. The REP of the prediction results of the natural seawater samples is used to determine whether the samples should be retained, and only the samples that improve the quantitative model are retained as the final training samples;
[0028] (404) The initial CNN quantitative model was trained using the screened simulated seawater sample training set, and then all convolutional layers of the CNN model were frozen using the Fine-Tune method;
[0029] (405) The natural seawater samples selected for training are used to update the parameters of the unfrozen fully connected layer to obtain the final CNN quantitative model;
[0030] (406) The natural seawater prediction set was input into the final CNN quantitative model for quantitative analysis, and the quantitative results were output.
[0031] In step (402), the REC and REP of the model are calculated, including: REC represents the relative error between the predicted value of the training set and the true value, and the calculation formula is:
[0032] |(predicted value of training set - true value)| / true value;
[0033] REP represents the relative error between the predicted value and the true value of the prediction set, and the calculation formula is:
[0034] |(prediction set predicted value - true value)| / true value.
[0035] In step (403), the simulated seawater samples in the training set are screened using a cyclic algorithm with replacement, including:
[0036] There are multiple simulated seawater samples in the training set. First, all samples are added to the training set as the input of the model to obtain a quantitative model; then, the prediction set spectrum of the natural seawater sample is used as the input of the quantitative model, the prediction result is output, and REP1 is calculated; then the first sample of the multiple samples is removed, and the remaining samples are added to the training set as the input of the model to obtain a quantitative model; the prediction set spectrum of the natural seawater sample is used as the input of the quantitative model, the prediction result is output, and REP2 is calculated; if REP2 is less than REP1, the first sample should be removed, otherwise the first sample will be retained; assuming that the first sample is retained, the next step is to remove the second sample, and the remaining samples are added to the training set as the input of the model, and so on; assuming that the first sample is not retained, the next step is to remove the second sample and add the remaining samples to the training set;
[0037] In step (404), all convolutional layers of the CNN model are frozen using the Fine-Tune method, including:
[0038] Traverse the CNN neural network structure and check whether each layer is of Conv1D type; if so, set the trainable attribute of the layer to 0, and the weight of this layer will not be updated during the subsequent model training process; the final result is that all structures containing convolutional layers do not participate in the subsequent model training.
[0039] After step S3, the predicted set spectrum in the natural seawater sample is input into the quantitative model, and the quantitative result is output.
[0040] Another object of the present invention is to provide an underwater LIBS spectral quantitative analysis system, which implements the underwater LIBS spectral quantitative analysis method, and the system comprises:
[0041] The pulses emitted by the digital pulse delay generator are sent to the laser in one path and to the spectrometer in the other path;
[0042] The laser sends laser pulses to a half-wave plate, a polarizing prism, and a beam splitter in sequence, and one beam splitter of the beam splitter is sent to a photodiode and an oscilloscope in sequence;
[0043] The other beam splitting path of the beam splitter is sent to a reflector, a beam expander, a focusing lens group, and a quartz water tank in sequence;
[0044] The spectrometer receives the plasma emission spectrum signal from the quartz water tank through the first lens, the second lens and the optical fiber.
[0045] In combination with all the above-mentioned technical solutions, the beneficial effects possessed by the present invention are as follows: the present invention discloses an underwater LIBS spectral quantitative analysis method. The technical problem to be solved is that when the sample used to train the quantitative model is inconsistent with the environmental water body where the sample to be tested is located, that is, there is a difference in the characteristics of the training set data and the test set data, the quantitative model fails. The present invention is applicable to the situation where the environmental water body changes in ocean exploration, the training sample of the quantitative model is inconsistent with the environmental water body where the sample to be tested is located, and it is difficult to have enough data sets to retrain the quantitative model. The present invention updates the parameters of the existing quantitative model through a small amount of samples to be tested, so that the quantitative model re-learns the characteristics of the samples to be tested, overcomes the influence of the matrix effect on the spectral quantification caused by the change of the environmental water body, and realizes accurate quantitative analysis of the samples to be tested.
[0046] LIBS technology is an emerging detection technology. It is still in the scientific research stage in the field of deep-sea in-situ detection, and there are no mature commercial products. The problem solved by the present invention is an inevitable key problem in LIBS underwater quantitative analysis. Successful transformation can greatly promote the development of marine detection equipment based on LIBS technology. At present, there is still a lack of LIBS spectral quantitative analysis methods for different environmental water bodies, and there is no report on how to correct the matrix effect caused by changes in environmental water bodies. When the present invention uses LIBS technology for quantitative detection of water bodies, it is often necessary to use laboratory data to pre-establish a quantitative model, and when the environmental water bodies where the training samples and the samples to be tested are inconsistent will cause the quantitative model to fail, which adds great difficulties to the practical application of LIBS technology. The present invention successfully solves such problems. For underwater LIBS quantification, it is usually necessary to ensure that the characteristics of the training samples are consistent with those of the predicted samples, so the samples for training the model should be re-prepared according to the environmental water bodies where the samples to be tested are located, and model training usually requires a large number of samples. The present invention uses a model migration method, which does not require the re-preparation of a large number of training samples. Only a small number of samples are needed to update the existing model, thereby solving the problem of poor quantitative results caused by inconsistencies between the characteristics of the training samples and the predicted samples, overcoming technical bias, and being innovative. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure;
[0048] Figure 1 is a flow chart of the underwater LIBS spectral quantitative analysis method provided by an embodiment of the present invention;
[0049] Figure 2 is a flow chart of establishing a quantitative model provided by an embodiment of the present invention;
[0050] Figure 3 is a typical spectrum provided by an embodiment of the present invention;
[0051] Figure 4 Schematic diagram of an underwater LIBS experimental system provided by an embodiment of the present invention;
[0052] Figure 5 It is a diagram of relevant parameters and training flow of the classic CNN model provided by an embodiment of the present invention;
[0053] Figure 6 is a flow chart of model migration training based on a CNN model provided by an embodiment of the present invention;
[0054] Figure 7 It is a calibration curve diagram for predicting the Mn element in natural seawater samples using a CNN model provided in an embodiment of the present invention;
[0055] Figure 8 It is a calibration curve diagram for predicting the Li element in natural seawater samples using a CNN model provided in an embodiment of the present invention;
[0056] Fig. 9 It is a calibration curve diagram for predicting the Mn element in natural seawater samples using the model migration method provided by an embodiment of the present invention;
[0057] Fig.10 It is a calibration curve diagram for predicting the Li element in a natural seawater sample using a model migration method provided in an embodiment of the present invention;
[0058] In the figure: 1. Laser; 2. Digital pulse delay generator; 3. Spectrometer; 4. Half-wave plate; 5. Polarization prism; 6. Beam splitter; 7. Reflector; 8. Beam expander; 9. Focusing lens group; 10. Quartz water tank; 11. First lens; 12. Second lens; 13. Optical fiber; 14. Photodiode; 15. Oscilloscope. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present invention, so the present invention is not limited by the specific implementation disclosed below.
[0060] The innovation of the present invention is that when the environmental water body in which the sample is located changes, its LIBS spectrum will also change accordingly, which will cause the quantitative model constructed based on spectral information to no longer be applicable. And limited by experimental conditions, in order to ensure the quality and quantity of the training set, the quantitative model is often pre-trained using laboratory data, and it is usually difficult to use the water conditions of the actual detection location to prepare the samples required for model training. The present invention applies the model migration method to correct the adverse effects of environmental water changes on underwater LIBS quantitative analysis. First, by freezing some parameters in the pre-trained model, the overall stability of the model is retained, and then the model parameters of the unfrozen part of the model are updated using the sample to be tested, so that the quantitative model re-learns the characteristics of the sample to be tested, increasing the applicability of the quantitative model in the detection of different environmental water bodies.
[0061] Embodiment 1, as Figure 1 As shown, an embodiment of the present invention provides an underwater LIBS spectral quantitative analysis method, comprising:
[0062] S1, using high-energy pulsed laser to focus on the sample to be tested, the laser interacts with the sample to generate transient plasma, and the emission spectrum information of the plasma is recorded by a spectrometer; and the spectral intensity is directly related to the corresponding element content. The higher the element content, the stronger the intensity of the corresponding element characteristic spectral line;
[0063] S2, build a quantitative model of LIBS spectrum and element content based on convolutional neural network, and use artificial simulated seawater data to initialize and train the model parameters;
[0064] S3, using natural seawater sample data to update the parameters of the quantitative model, to enhance the analytical capability of the quantitative model for LIBS spectra in natural seawater.
[0065] Example 2, as another embodiment of the present invention, the underwater LIBS spectral quantitative analysis method provided by the embodiment of the present invention includes:
[0066] (1) Sample preparation: Using simulated seawater and natural seawater as solvents, a series of solution samples with different concentrations of Mn and Li elements were prepared. The simulated seawater samples were used as source domain data, and the natural seawater samples were used as target domain data.
[0067] Wherein, a series of solution samples with different concentrations of Mn and Li elements are prepared, including: preparing 10 groups of solutions, and the concentrations (ppm) of Mn and Li elements in each group of solutions are: 100, 100; 200, 90; 400, 80; 600, 70; 800, 60; 1000, 50; 1200, 40; 1400, 30; 1600, 20; 1800, 10;
[0068] (2) Obtaining spectral data: Optimizing experimental parameters and collecting raw LIBS spectral data of samples under different environmental water conditions;
[0069] (3) Building a convolutional neural network (CNN) quantitative model: A CNN quantitative model was established by using a portion of the LIBS spectral data of the simulated seawater sample in the solution sample in step (2) as a training set and a prediction set respectively;
[0070] (4) Update the parameters of the quantitative model based on the model transfer method: determine the number of natural seawater samples involved in model training, freeze the convolutional layer in the CNN network structure, and use part of the LIBS spectrum data of the natural seawater samples to update the parameters of the fully connected layer in the CNN network structure; reconnect the optimized fully connected layer to the convolutional layer to complete the parameter update of the CNN quantitative model;
[0071] (5) Input the predicted set spectra of natural seawater samples into the above quantitative model and output the quantitative results.
[0072] In the embodiment of the present invention, Figure 5 As shown, the step (3) of building a convolutional neural network (CNN) quantitative model specifically includes the following steps:
[0073] (301) Screening was performed based on the integrated intensity of the spectrum, and abnormal spectra that deviated from the average value of the integrated intensity of the spectrum by more than 20% were removed. The simulated seawater samples were divided into training set samples and prediction set samples in a ratio of 7:3;
[0074] (302) Adjust the number of convolutional layers, the number of convolutional kernels, the activation function and the step size in the CNN network structure, take the generated CNN network structure after each adjustment for model training, and use the REC and REP of the model to determine the optimal values of each part of the network structure. The CNN model corresponding to the optimal value is the initial CNN quantitative model;
[0075] Exemplarily, adjusting the number of convolution layers, the number of convolution kernels, the activation function and the step size in the CNN network structure includes: manually changing the model structure based on experience, and obtaining a prediction result after each change, the prediction result including the predicted value of the training set and the predicted value of the prediction set; REC represents the relative error between the predicted value of the training set and the true value, and REP represents the relative error between the predicted value of the prediction set and the true value. If REC and REP decrease after the structure is changed, it proves that this parameter adjustment is effective, and the final model structure is determined after several operations.
[0076] In an embodiment of the present invention, the step (4) updates the parameters of the quantitative model based on the model migration method, and specifically includes the following steps:
[0077] (401) Let i = 0, randomly extract samples from the natural seawater training set, the number of samples extracted is i, add the spectra corresponding to the extracted samples to the CNN quantitative training set, retrain the CNN quantitative model, and predict the natural seawater prediction set samples to obtain the quantitative results, i = i + 1;
[0078] Exemplarily, retraining the CNN quantitative model includes:
[0079] The updated training set is used as the input of the CNN model to obtain a new CNN model. The calculation parameters in the CNN model will change as the input changes.
[0080] Predicting the natural seawater prediction set samples includes: using the spectrum of the natural seawater prediction set samples as the input of the CNN model, and for each spectrum the model will output a predicted concentration value.
[0081] (402) Determine if i≤n, where n is the total number of samples in the prediction set. If so, return to step (401). Otherwise, calculate the REC and REP of the model using the quantitative results obtained, and select the number of samples corresponding to the minimum sum of REC and REP as the number of samples in the prediction set participating in model training.
[0082] Exemplarily, calculating the REC and REP of the model includes: REC represents the relative error between the predicted value of the training set and the true value, and the calculation formula is: |(predicted value of the training set - true value)| / true value; REP represents the relative error between the predicted value of the prediction set and the true value, and the calculation formula is: |(predicted value of the prediction set - true value)| / true value.
[0083] (403) After determining the natural seawater samples to be involved in the training, the simulated seawater samples in the training set are optimized, and the simulated seawater samples in the training set are screened using a cyclic algorithm with replacement. The REP of the prediction results of the natural seawater samples is used to determine whether the samples should be retained, and only the samples that can improve the quantitative model are retained as the final training samples;
[0084] Exemplarily, the use of a cyclic algorithm with replacement to screen the simulated seawater samples in the training set includes: there are 7 simulated seawater samples in the training set, first, all 7 samples are added to the training set as the input of the model to obtain a quantitative model, then the prediction set spectrum of the natural seawater sample is used as the input of the quantitative model, the prediction result is output, and REP1 is calculated; then the first sample of the 7 samples is removed, and the remaining 6 samples are added to the training set as the input of the model to obtain a quantitative model, then the prediction set spectrum of the natural seawater sample is used as the input of the quantitative model, the prediction result is output, and REP2 is calculated; if REP2 is less than REP1, the first sample should be removed, otherwise the first sample will be retained; assuming that the first sample is retained, the next step is to remove the second sample, and the remaining 6 samples are added to the training set as the input of the model, and so on; assuming that the first sample is not retained, the next step is to remove the second sample and add the remaining 5 samples to the training set;
[0085] (404) The initial CNN quantitative model was trained using the screened simulated seawater sample training set, and then all convolutional layers of the CNN model were frozen using the Fine-Tune method;
[0086] Exemplarily, freezing all convolutional layers of a CNN model using the Fine-Tune method includes:
[0087] Traverse the CNN neural network structure and check whether each layer is of Conv1D type (one-dimensional convolution layer). If so, set the trainable attribute of the layer to 0, which means that the weight of this layer will not be updated during the subsequent model training process. The final result is that all structures containing convolution layers will not participate in the subsequent model training;
[0088] (405) The natural seawater samples selected for training were used to update the parameters of the unfrozen fully connected layer to obtain the final CNN quantitative model.
[0089] Exemplarily, updating the parameters includes: using the spectral data of the natural seawater sample selected for training as the input of the CNN model, because the structure containing the convolution layer has been frozen, the weight parameters in the convolution layer will not be updated during the training process, and only the weight parameters in the unfrozen fully connected layer will be updated to obtain the final quantitative model;
[0090] (406) The natural seawater prediction set was input into the final CNN quantitative model for quantitative analysis, and the quantitative results were output.
[0091] It can be seen from the above embodiments that there is currently a lack of quantitative methods for LIBS spectra of different environmental water bodies. The existing LIBS spectrum quantitative methods do not consider the impact of environmental water bodies on the spectrum. When the water conditions of the training samples of the quantitative model and the water conditions of the samples to be tested are different, the error of the prediction result is large.
[0092] The present invention will solve the problem that the quantitative model is difficult to perform as expected when the water conditions of the training sample of the quantitative model and the sample to be tested are different. The transfer learning method is used to enable the quantitative model to complete the parameter update of the model with the help of a small amount of natural seawater sample data. When the natural seawater data is too small to meet the requirements of model retraining, this method can complete the prediction of natural seawater samples by updating the existing model parameters.
[0093] Example 3: As another possible implementation method, the CNN model used to establish the quantitative model can be replaced by other models with regression capabilities, such as (BP neural network).
[0094] When updating the parameters of the quantitative model, all convolutional layers are frozen. This part can also freeze some convolutional layers or any other network structure. For example: freeze the first convolutional layer, freeze the first two convolutional layers, etc.
[0095] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0096] The underwater LIBS spectral quantitative analysis method provided by the embodiment of the present invention includes:
[0097] 1. Sample preparation.
[0098] A total of 10 solution samples were prepared in this experiment. The solvents of the solution samples were artificial simulated seawater and natural seawater. The artificial simulated seawater contained Na + , K + , Ca 2+ Mg 2+ The concentrations of the four elements were configured according to standard natural seawater, namely 11039 mg / L, 409 mg / L, 422 mg / L, and 1322 mg / L. The solutes were chlorides corresponding to the two elements Mn and Li, and a total of 10 different concentration gradients were set, as shown in Table 1.
[0099] Table 1 Reference concentrations of Mn and Li in two different water bodies (ppm):
[0100]
[0101] 2. Experiment and data processing.
[0102] 2.1 Collect LIBS spectral data of all samples under two environmental water conditions. Figure 3 A typical spectrum is shown in the figure. Figure 3 The middle shows the LIBS spectra of the sample in two different environmental water bodies. The spectral peaks of the two target elements (Mn and Li) contained in the sample can be clearly seen, and there are obvious differences in the spectra under different environmental water conditions.
[0103] The optimized experimental parameters include laser energy and detection delay. Laser 1 uses the Radium Dawa-200 solid-state Nd:YAG laser with a wavelength of 1064nm and a pulse width of 10ns. Taking the signal-to-noise ratio (SNR) of the target element spectrum peak as the optimization goal, the highest SNR is obtained by adjusting the laser energy and detection delay. The optimal laser energy of the experiment is determined to be 25mJ and the optimal detection delay is 200ns. A spectrometer 3 (Avantes, AvaSpec-ULS2048) with a wavelength range of 260 to 820nm is used, and the gate width is 1.05ms. 100 spectra are collected for each sample, and each spectrum is the average of 100 laser pulses. The schematic diagram of the underwater LIBS experimental system is shown in the figure. Figure 4 shown.
[0104] Including: laser 1, digital pulse delay generator (DG645) 2, spectrometer 3, half-wave plate 4, polarization prism 5, beam splitter 6, reflector 7, beam expander 8, focusing lens group 9, quartz water tank 10, first lens 11, second lens 12, optical fiber 13, photodiode 14, oscilloscope 15.
[0105] The pulses emitted by the digital pulse delay generator (DG645) 2 are sent to the laser 1 in one way and to the spectrometer 3 in another way;
[0106] The laser 1 sends the received laser pulse to the half-wave plate 4, the polarization prism 5, and the beam splitter 6 in sequence, and one beam splitter of the beam splitter 6 sends the beam to the photodiode 14 and the oscilloscope 15 in sequence;
[0107] The other beam split by the beam splitter 6 is sent to the reflector 7, beam expander 8, focusing lens group 9, and quartz water tank 10 in sequence;
[0108] The spectrometer 3 receives the plasma emission spectrum signal from the quartz water tank 10 through the first lens 11 , the second lens 12 and the optical fiber 13 .
[0109] 2.2 Build a convolutional neural network (CNN) quantitative model, select the spectral data of samples 3, 6 and 9 as the prediction set, and select samples 1, 2, 4, 5, 7, 8 and 10 as the training set.
[0110] (1) Averaging the 100 spectra of each sample to obtain a standard spectrum, and calculating the integrated intensity value I of the standard spectrum;
[0111] (2) Let p = 1 and calculate the integrated intensity of the pth spectrum ,judge( ) / I≤±20%, if yes, keep the spectrum, otherwise, discard the spectrum, p=p+1, judge p≤100, if yes, return to step (2), otherwise, go to step (3);
[0112] (3) Adjust the number of convolutional layers, convolutional kernels, activation function and step size in the CNN network structure, take the generated CNN network structure after each adjustment for model training, and use the model's REC and REP to determine the optimal values of each part of the network structure. The CNN model corresponding to the optimal value is the initial CNN quantitative model. In this example, the CNN network structure consists of 4 convolutional layers and 2 fully connected layers. The output of each convolutional layer is passed to the maximum pooling layer, where the first convolution layer contains 32 convolutional kernels, the size of the convolutional kernel is 10, the padding is equal padding, the step size is 2, and the activation function uses the ReLU function. The network architecture is as follows: Figure 5 The relevant parameters and training flow chart of the CNN model are shown in the figure.
[0113] 2.3 Update the parameters of the quantitative model based on the model migration method.
[0114] (1) Let i = 0, randomly extract samples from the natural seawater training set, the number of samples extracted is i, add the spectra corresponding to the extracted samples to the simulated seawater sample training set, retrain the CNN quantitative model, and predict the natural seawater prediction set samples to obtain the quantitative results, i = i + 1;
[0115] (2) Determine whether i≤n, where n is the total number of samples in the prediction set. If so, return to step (1). Otherwise, calculate the REC and REP of the model using the quantitative results obtained, and select the number of samples corresponding to the minimum sum of REC and REP as the number of samples in the prediction set for model training. In this example, the number of samples in the prediction set for model training is 4.
[0116] (3) After determining the natural seawater samples to be trained, optimize the simulated seawater samples in the training set, and use a cyclic algorithm with replacement to screen the simulated seawater samples in the training set. Use the REP of the natural seawater sample prediction results to determine whether the sample should be retained, and only retain samples that can improve the quantitative model as the final training samples. In this example, simulated seawater sample No. 1 is removed, and natural seawater samples No. 2, 4, 7, and 10 are selected as additional training samples. The calibration curve for directly using the CNN model to predict the Mn element in natural seawater samples is shown in Figure 2. Figure 7 , the calibration curve for predicting the Li element in natural seawater samples is as follows Figure 8 As shown; this result is the prediction result of the existing technology, and the REP values are 88.79% and 58.40% respectively.
[0117] (4) Using the training set of simulated seawater samples, the initial CNN quantitative model is trained, and then all convolutional layers of the CNN model are frozen using the Fine-Tune method. In this example, all 4 convolutional layers are frozen, and only the fully connected layer is retained;
[0118] (5) The selected natural seawater samples for training are used to train the parameters of the unfrozen fully connected layer. In this example, the natural seawater samples for training are samples 2, 4, 7, and 10;
[0119] (6) Combine all frozen convolutional layers with the retrained fully connected layers to obtain the final CNN quantitative model;
[0120] (7) Input the natural seawater prediction set into the final CNN quantitative model for quantitative analysis and output the quantitative results. The model migration training flow chart is as follows: Figure 6 The calibration curve for predicting the Mn element in natural seawater samples using the model migration method is shown in Fig. 9 , the calibration curve for predicting the Li element in natural seawater samples using the model migration method is as follows Fig.10 shown.
[0121] From the quantitative results, the REPs of Mn and Li elements in the natural seawater prediction set are 8.48% and 13.67%, respectively. Compared with the direct use of the CNN method, the quantitative results have been greatly improved.
[0122] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the protection scope of the present invention.
Claims
1. An underwater LIBS spectral quantitative analysis method, characterized in that: The method includes: S1, using high-energy pulsed laser to focus on the sample to be tested, the laser interacts with the sample to generate transient plasma, and the emission spectrum information of the plasma is recorded by a spectrometer; and the spectrum intensity is related to the corresponding element content. The higher the element content, the stronger the intensity of the corresponding element characteristic spectrum line; S2, build a quantitative model of LIBS spectrum and element content based on convolutional neural network, and use artificial simulated seawater data to initialize and train the model parameters; S3, using natural seawater sample data to update the parameters of the quantitative model, and enhancing the analytical capability of the quantitative model for LIBS spectra in natural seawater; In step S1, the sample to be tested includes: Using simulated seawater and natural seawater as solvents, solution samples with different concentrations of Mn and Li elements were prepared, the simulated seawater samples were used as source domain data, and the natural seawater samples were used as target domain data; Solution samples with different concentrations of Mn and Li elements, including: 10 groups of solutions are prepared, and the concentrations of Mn and Li elements in each group of solutions are: 100, 100; 200, 90; 400, 80; 600, 70; 800, 60; 1000, 50; 1200, 40; 1400, 30; 1600, 20; 1800, 10; the unit is ppm; Record the emission spectrum information of the plasma through a spectrometer, including: optimizing experimental parameters and collecting original LIBS spectrum data of samples under different environmental water conditions; In step S3, the parameters of the quantitative model are updated using the natural seawater sample data, including: (401) Let i = 0, randomly extract samples from the natural seawater training set, the number of samples extracted is i, add the spectra corresponding to the extracted samples to the CNN quantitative training set, retrain the CNN quantitative model, and predict the natural seawater prediction set samples to obtain the quantitative results, i = i + 1; (402) Determine if i≤n, where n is the total number of samples in the prediction set. If so, return to step (401). Otherwise, calculate the REC and REP of the model using the quantitative results obtained, and select the number of samples corresponding to the minimum sum of REC and REP as the number of samples in the prediction set participating in model training. (403) After determining the natural seawater samples to be involved in the training, the simulated seawater samples in the training set are optimized, and the simulated seawater samples in the training set are screened using a cyclic algorithm with replacement. The REP of the prediction results of the natural seawater samples is used to determine whether the samples should be retained, and only the samples that improve the quantitative model are retained as the final training samples; (404) The initial CNN quantitative model was trained using the screened simulated seawater sample training set, and then all convolutional layers of the CNN model were frozen using the Fine-Tune method; (405) The natural seawater samples selected for training are used to update the parameters of the unfrozen fully connected layer to obtain the final CNN quantitative model; (406) The natural seawater prediction set is input into the final CNN quantitative model for quantitative analysis, and the quantitative results are output; In step (403), the simulated seawater samples in the training set are screened using a cyclic algorithm with replacement, including: There are multiple simulated seawater samples in the training set. First, all samples are added to the training set as the input of the model to obtain a quantitative model; then, the prediction set spectrum of the natural seawater sample is used as the input of the quantitative model, the prediction result is output, and REP1 is calculated; then the first sample of the multiple samples is removed, and the remaining samples are added to the training set as the input of the model to obtain a quantitative model; the prediction set spectrum of the natural seawater sample is used as the input of the quantitative model, the prediction result is output, and REP2 is calculated; if REP2 is less than REP1, the first sample should be removed, otherwise the first sample will be retained; assuming that the first sample is retained, the next step is to remove the second sample, and the remaining samples are added to the training set as the input of the model, and so on; assuming that the first sample is not retained, the next step is to remove the second sample and add the remaining samples to the training set; In step (404), all convolutional layers of the CNN model are frozen using the Fine-Tune method, including: Traverse the CNN neural network structure and check whether each layer is of Conv1D type; if so, set the trainable attribute of the layer to 0, and the weight of this layer will not be updated during the subsequent model training process; the final result is that all structures containing convolutional layers do not participate in the subsequent model training.
2. The underwater LIBS spectral quantitative analysis method according to claim 1, characterized in that: In step S2, a quantitative model of LIBS spectrum and element content is built based on a convolutional neural network, including: (301) The spectra were screened according to their integrated intensity, and the abnormal spectra that deviated from the average value of the spectral integrated intensity by more than 20% were removed. The simulated seawater samples were divided into training set samples and prediction set samples in a ratio of 7:3; (302) The number of convolutional layers, the number of convolutional kernels, the activation function and the step size in the CNN network structure are adjusted, and the generated CNN network structure after each adjustment is used for model training. The optimal values of each part of the network structure are determined using the REC and REP of the model. The optimal values are the number of convolutional layers, the number of convolutional kernels, the activation function and the step size in the CNN network structure corresponding to the minimum REC and REP. The CNN model corresponding to the optimal values is the initial CNN quantitative model.
3. The underwater LIBS spectral quantitative analysis method according to claim 2, characterized in that: In step (301), screening is performed according to the integrated intensity of the spectrum, including: (1) Averaging the 100 spectra of each sample to obtain a standard spectrum, and calculating the integrated intensity value I of the standard spectrum; (2) Let p = 1 and calculate the integrated intensity of the pth spectrum ,judge If yes, keep the spectrum, otherwise, discard the spectrum, p=p+1, judge p≤100, if yes, return to step (2), otherwise, enter step (302).
4. The underwater LIBS spectral quantitative analysis method according to claim 2, characterized in that: In step (302), the CNN network structure consists of 4 convolutional layers and 2 fully connected layers; the output of each convolutional layer is passed to the maximum pooling layer; among them, the first convolutional layer contains 32 convolution kernels, the size of the convolution kernel is 10, the padding is equal padding, the step size is 2, and the activation function uses the ReLU function.
5. The underwater LIBS spectral quantitative analysis method according to claim 1, characterized in that: In step (402), the REC and REP of the model are calculated, including: REC represents the relative error between the predicted value of the training set and the true value, and the calculation formula is: |(predicted value of training set - true value)| / true value; REP represents the relative error between the predicted value and the true value of the prediction set, and the calculation formula is: |(prediction set predicted value - true value)| / true value.
6. The underwater LIBS spectral quantitative analysis method according to claim 1, characterized in that: After step S3, the predicted set spectrum in the natural seawater sample is input into the quantitative model, and the quantitative result is output.
7. An underwater LIBS spectral quantitative analysis system, characterized in that: The system implements the underwater LIBS spectral quantitative analysis method according to any one of claims 1 to 6, and the system comprises: The pulses emitted by the digital pulse delay generator (2) are sent to the laser (1) in one path and to the spectrometer (3) in another path; The laser (1) sends laser pulses in sequence to a half-wave plate (4), a polarizing prism (5), and a beam splitter (6); one beam splitter of the beam splitter (6) is sent in sequence to a photodiode (14) and an oscilloscope (15); The other beam splitting path of the beam splitter (6) is sent in sequence to a reflector (7), a beam expander (8), a focusing lens group (9), and a quartz water tank (10); The spectrometer (3) receives a plasma emission spectrum signal from a quartz water tank (10) through a first lens (11), a second lens (12) and an optical fiber (13).
Citation Information
Patent Citations
To-be-measured element content LIBS measurement method and system based on CNN model
CN112051256A
Seawater salinity in-situ measurement method and device based on photoacoustic information fusion and application
CN115656144A