Method and system for detecting concentration of boric acid solution based on Raman spectrum
Through the Lasso regression algorithm and penalty coefficient adjustment, a high-precision Raman spectrum regression model was established, which solved the problem of large boric acid solution concentration detection errors in the existing technology and achieved high-precision and high-reproducibility detection results.
Patent Information
- Application Number
- CN202411161857.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-08-23
AI Technical Summary
In the existing technology, the detection of boric acid solution concentration based on Raman spectroscopy has problems such as large errors and poor repeatability, making it difficult to apply it in practice for quantitative detection.
The Lasso regression algorithm is used to establish a regression model. By performing data processing on the pixel points and light intensity values in the characteristic peak interval of the Raman spectrum of the boric acid solution, an accurate regression model is constructed. The penalty coefficient adjustment is used to improve the fitting degree and realize the boric acid solution. High-precision detection of concentration.
It significantly improves the accuracy of boric acid solution concentration detection, reduces errors, and improves detection reproducibility, which is suitable for the high-precision requirements in the nuclear power field.
Smart Images

Figure CN118675776A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pressurized water reactor analysis, and in particular to a method and system for detecting the concentration of a boric acid solution based on Raman spectroscopy. Background Art
[0002] When light is irradiated onto a substance, scattering occurs. In addition to the elastic component (Rayleigh scattering) with the same frequency as the excitation light, the scattered light also has components with lower and higher frequencies than the excitation light. The latter phenomenon is collectively referred to as the Raman effect. The inelastic scattering caused by the interaction between molecular vibrations, optical phonons in solids and other elementary excitations and the excitation light is called Raman scattering. Generally, the spectrum formed by combining Rayleigh scattering and Raman scattering is called the Raman spectrum. The Raman spectrum of the detected substance is usually composed of a certain number of Raman peaks, each of which represents the wavelength position and intensity of the corresponding Raman scattered light. Each spectral peak corresponds to a specific molecular bond vibration, and the spectral peak spacing and position information are unique to a specific substance. Therefore, Raman spectra are also often used as fingerprint spectra for material identification.
[0003] Raman spectroscopy signals themselves are weak signal detections, which are affected by factors such as test methods, optical systems, detection instruments, and test environments. As a result, quantitative test errors and poor repeatability of solution concentrations based on Raman spectroscopy have long been the main cause of the difficulty in conducting quantitative tests in practice. Summary of the invention
[0004] In order to address the deficiencies of the prior art, the purpose of the present application is to provide a method and system for detecting the concentration of a boric acid solution based on Raman spectroscopy, which can improve the measurement accuracy of the boric acid solution and has a small measurement error.
[0005] To achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application provides a method for detecting the concentration of a boric acid solution based on Raman spectroscopy, which is applied to a boric acid concentration detector for a pressurized water reactor neutron-free radiation source. The method comprises: Using a boric acid solution with a first preset concentration as a training sample and interacting with the excitation light to form a first Raman spectrum; Selecting a first interval in the first Raman spectrum that covers a characteristic peak representing boric acid, and taking the pixels included in the first interval and the light intensity values corresponding to the pixels as first spectrum data; Using a Lasso regression algorithm, and establishing a regression model according to the first spectral data and the first preset concentration; The regression model is used to detect the boric acid solution of unknown concentration to determine the actual concentration of the boric acid solution.
[0006] Furthermore, before using the regression model to detect the boric acid solution of unknown concentration to determine the actual concentration of the boric acid solution to be tested, the method further includes: A boric acid solution of a second preset concentration is used as a training sample, and interacts with the excitation light to form a second Raman spectrum, wherein the first Raman spectrum and the second Raman spectrum are both Raman spectra that have not been subjected to background subtraction data processing; Selecting a second interval in the second Raman spectrum that covers a characteristic peak representing boric acid, and taking the pixel points included in the second interval and the light intensity values corresponding to the pixel points as second spectrum data; Inputting the second preset concentration as a variable into the regression model, and comparing the calculated data generated by the regression model with the second spectral data to obtain a goodness of fit index of the regression model; The regression model was determined based on the goodness of fit index.
[0007] Furthermore, the regression model is determined according to the goodness of fit index, including: Determine whether the fit index is greater than the fit threshold; If the judgment result is yes, the regression model is output; If the judgment result is no, the penalty coefficient in the Lasso regression algorithm is adjusted and the regression model is updated.
[0008] Furthermore, a Lasso regression algorithm is used to establish a regression model according to the first spectral data and the first preset concentration, including: Acquiring first spectrum data as first input data; Acquire a first preset concentration as second input data; Select a penalty coefficient within a set range as the third input data; The first input data, the second input data and the third input data are processed based on the Lasso regression algorithm, and the regression coefficient corresponding to when the objective function of the regression model reaches the minimum value is obtained through training.
[0009] Furthermore, the penalty coefficient is an integer greater than 0 and less than 300.
[0010] Furthermore, the penalty coefficient in the Lasso regression algorithm is adjusted and the regression model is updated, including: Acquire the first spectrum data and the second spectrum data as the first input data, and extract the number of pixel points included in the first interval or the second interval from the first input data, wherein the number of pixel points included in the first interval and the second interval is the same; Acquire a first preset concentration and a second preset concentration as second input data, and extract the number of concentrations of training samples with different preset concentrations from the second input data; Select a penalty coefficient within a set range as the third input data; The number of concentrations and the number of pixels are used as fourth input data; An updated regression model is obtained according to the first input data, the second input data, the third input data, and the fourth input data, and a regression coefficient corresponding to when the objective function of the updated regression model reaches a minimum value, and the updated objective function satisfies the following relationship: ; Wherein, X represents the first input data, y represents the second input data, α represents the penalty coefficient, β represents the regression coefficient, N represents the number of concentrations of training samples of different concentrations in the second input data, and P represents the number of pixels contained in the characteristic peak interval; Or, the updated objective function satisfies the following relationship: .
[0011] Wherein, X represents the first input data, y represents the second input data, α represents the penalty coefficient, and β represents the regression coefficient.
[0012] Furthermore, the penalty coefficient selected for the training sample of the first preset concentration is different from the penalty coefficient selected for the training sample of the second preset concentration. When the regression model is updated by training samples of different preset concentrations, the penalty coefficient is changed to obtain the regression coefficient corresponding to the minimum value of the objective function.
[0013] Furthermore, the first Raman spectrum and the second Raman spectrum are spectra after data processing, wherein the data processing includes smoothing processing and / or noise reduction processing.
[0014] In a second aspect, the present application also provides a system for detecting the concentration of a boric acid solution based on Raman spectroscopy, which is applied to a boric acid concentration detector for a pressurized water reactor neutron-free radiation source. The system comprises: A data acquisition unit is used to acquire a first Raman spectrum, wherein the first Raman spectrum is formed based on the interaction between a boric acid solution of a first preset concentration and the excitation light, the data acquisition unit selects a first interval in the first Raman spectrum that covers a characteristic peak characterizing boric acid, and uses the pixel points included in the first interval and the light intensity values corresponding to the pixel points as first spectrum data; A model building unit, used to build a regression model according to the first spectral data and a first preset sodium concentration corresponding to the first spectral data, wherein the regression model is a model built based on a Lasso regression algorithm with the first spectral data as an independent variable and the first preset concentration as a dependent variable; A concentration detection unit, used for detecting a boric acid solution of unknown concentration according to a regression model to determine the actual concentration of the boric acid solution; The data acquisition unit is also used to acquire a second Raman spectrum, which is formed based on the interaction between the boric acid solution of the second preset concentration and the excitation light. The data acquisition unit selects a second interval in the second Raman spectrum that covers a characteristic peak of boric acid, and uses the pixels included in the second interval and the light intensity values corresponding to the pixels as second spectrum data; the first Raman spectrum and the second Raman spectrum are both Raman spectra that have not been subjected to background subtraction data processing; The model building unit inputs the second preset concentration as a variable into the regression model, compares the calculated data generated by the regression model with the second spectral data, obtains a fit index of the regression model, and determines the regression model according to the fit index.
[0015] The method for detecting the concentration of boric acid solution based on Raman spectroscopy generates a Raman spectrum by selecting a boric acid solution of a preset concentration and interacting with the excitation light, and generates a regression model through the Lasso regression algorithm by taking the pixel points in the characteristic peak interval and the light intensity values corresponding to the pixel points as input data. Compared with the prior art, the regression model obtained by the technical solution of the present application has higher accuracy and smaller error, and the regression model has higher reproducibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flow chart of a method for detecting the concentration of a boric acid solution based on Raman spectroscopy provided in an embodiment of the present invention; Figure 2 A schematic diagram of the Raman spectrum of the boric acid solution concentration provided by an embodiment of the present invention; Figure 3 A flowchart of determining a regression model provided by an embodiment of the present invention; Figure 4 An experimental data diagram of the relationship between the penalty coefficient and the fit index provided by the embodiment of the present invention; Figure 5 A modeling flow chart provided for an embodiment of the present invention; Figure 6 Another modeling flow chart provided for an embodiment of the present invention; Figure 7 An error measurement diagram of a regression model established based on a Lasso regression algorithm provided in an embodiment of the present invention; Figure 8 A schematic diagram of the model error obtained after training with spectral samples without baseline deduction and after baseline deduction provided in an embodiment of the present application; Fig. 9 A schematic diagram of a system for detecting the concentration of a boric acid solution based on Raman spectroscopy provided in an embodiment of the present invention; Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the specific implementation manner of the present application will be clearly and completely described below in conjunction with the drawings in the implementation manner of the present application.
[0018] The embodiments of the present invention provide a method and system for detecting the concentration of a boric acid solution based on Raman spectroscopy, so as to improve the detection accuracy of the concentration of the boric acid solution and reduce the detection error, which is helpful for carrying out quantitative detection of the concentration of the boric acid solution in practical applications.
[0019] like Figure 1 As shown, the method for detecting the concentration of a boric acid solution based on Raman spectroscopy provided in an embodiment of the present invention is applied to a boric acid concentration detector for a pressurized water reactor neutron-free radiation source, and the method comprises the following steps: S101 . Using a boric acid solution of a first preset concentration as a training sample and interacting with an excitation light to form a first Raman spectrum.
[0020] The excitation light generated by the laser will be scattered when it is irradiated on the boric acid solution. In addition to the elastic component (Rayleigh scattering) with the same frequency as the excitation light, the scattered light also has components with lower and higher frequencies than the excitation light. The latter phenomenon is collectively called the Raman effect. The inelastic scattering caused by the interaction between the molecular vibration, optical phonons in the solid and the excitation light is called Raman scattering. Generally, the spectrum formed by combining Rayleigh scattering and Raman scattering is called Raman spectrum.
[0021] In the examples of this application, boric acid solutions with concentrations of 0 mg / L, 35 mg / L, 60 mg / L, 113 mg / L, 282 mg / L, 517 mg / L, 800 mg / L, 1656 mg / L, 2660 mg / L, and 3990 mg / L are used as training samples to interact with the excitation light to generate Raman spectra of different concentrations. It should be noted that the boric acid solutions with the above concentrations are only examples, and do not mean that only boric acid solutions with the above concentration ranges can be selected as training samples.
[0022] In the first modeling process, any of the above-mentioned boric acid solutions of concentration is selected as a training sample, the Raman spectrum generated by the interaction between the training sample and the excitation light is used as the first Raman spectrum, and the first Raman spectrum is used in the subsequent modeling process.
[0023] Exemplarily, the embodiments of the present invention are mainly for the detection of the concentration of boric acid solution, which is specifically applied in the field of nuclear power, because boric acid controls the speed of uranium nuclear fission in nuclear power plants and affects the power generation of nuclear power plants. As a soluble poison for regulating the reactivity of nuclear power plants, boric acid is widely used in pressurized water reactor coolants, and the changes in long-term reactivity are controlled by adjusting its concentration. It can be seen that for the above-mentioned application scenarios, the concentration control requirements of the boric acid solution are relatively high, especially for the detection accuracy of the boric acid solution concentration. The existing concentration detection method has a low accuracy, which has a great impact on the production capacity of nuclear power plants.
[0024] S102, selecting a first interval in the first Raman spectrum that covers a characteristic peak characterizing boric acid, and taking pixel points included in the first interval and light intensity values corresponding to the pixel points as first spectrum data.
[0025] The first Raman spectrum includes a certain number of Raman peaks, each of which represents the wavelength position and intensity of the corresponding Raman scattered light, and each of which corresponds to a specific molecular bond vibration.
[0026] The embodiment of the present invention selects an interval characterizing a characteristic peak of boric acid, and the interval contains at least one Raman peak. In the prior art, a Raman peak of a single wavelength is generally selected for subsequent modeling. Compared with the prior art, by selecting an interval characterizing a characteristic peak of boric acid for subsequent modeling, it is possible to avoid the influence of the power of the excitation light and other environmental factors that may cause errors in the constructed model.
[0027] Specifically, due to the influence of the fluctuation of the excitation light power and the presence of some impurities in the solution containing specific substances, the model established based on the Raman peak of a single wavelength has a large error in concentration detection. In addition, environmental interference, such as temperature, humidity, electromagnetic field and other factors, may lead to deviations in concentration detection, and due to the above uncertain factors, the model established based on the Raman peak of a single wavelength has poor reproducibility.
[0028] In the example of the present application, the interval characterizing the characteristic peak of boric acid includes a number of pixels, and the number of pixels N is greater than or equal to 450 and less than or equal to 650. This avoids the influence of uncertainty of environmental factors on the accuracy of the model due to the characteristic peak interval being too small, and avoids the existence of too many invalid features due to the characteristic peak interval being too large.
[0029] like Figure 2 The schematic diagram of the Raman spectrum shown in FIG. 1 shows that the horizontal axis represents the pixel point, and the vertical axis represents the light intensity value corresponding to the pixel point. The portion between the two dashed lines is the selected characteristic peak interval, specifically the pixel points with the horizontal axis between 300 and 850.
[0030] It should be noted that the above-mentioned use of the pixel points with a horizontal coordinate between 300 and 850 as the interval for characterizing the characteristic peak of boric acid is only a preferred implementation mode, and in practical applications, the selected interval can be appropriately offset in the horizontal direction.
[0031] S103: Using the Lasso regression algorithm, a regression model is established according to the first spectral data and the first preset concentration.
[0032] The Lasso regression algorithm obtains a more refined model by constructing a penalty function, which compresses some coefficients and sets some coefficients to zero.
[0033] In the specific calculation process, the first preset concentration is used as the independent variable, the first spectral data is used as the dependent variable, the penalty coefficient in the Lasso regression algorithm is adjusted to obtain the regression coefficient, and a regression model is established.
[0034] Since the concentration of the boric acid solution is a known value in each modeling process, the regression model calculated by the above method can be verified by a boric acid solution of known concentration to obtain a final accurate regression model.
[0035] Specifically, the first spectral data includes N pixels, each pixel corresponds to its own light intensity value, and an N*2 data matrix is constructed, the data matrix includes 1 row of N pixels and 1 row of N pixels corresponding to the light intensity values, and the data matrix is used as the first spectral data.
[0036] Exemplarily, when the first preset concentration is 35 mg / L, a 35 mg / L boric acid solution forms a Raman spectrum after being irradiated with excitation light, and pixels between 300 and 800 are extracted therefrom to obtain the light intensity value corresponding to each pixel, and a data matrix as shown in Table 1 is established as the first spectral data.
[0037] Table 1:
[0038] S104, using a regression model to detect the boric acid solution of unknown concentration to determine the actual concentration of the boric acid solution to be tested.
[0039] Through the above settings, the regression model of the functional relationship between the concentration of the boric acid solution and the light intensity value of the interval representing the characteristic peak of boric acid in the spectrum diagram established by the Lasso regression algorithm is used to improve the detection accuracy of the concentration of the boric acid solution. In particular, it is applied to the field of nuclear power and can more accurately control the reaction process. In an embodiment of the present invention, the regression model established by the Lasso regression algorithm has a significant improvement in the detection accuracy of the concentration of the boric acid solution. In a boric acid solution of 1000 mg / L, the detection error is greater than or equal to 12 ppm and less than or equal to 18 ppm, thereby improving the production capacity of nuclear power equipment and extending its service life.
[0040] like Figure 3 As shown, a method for detecting the concentration of a boric acid solution based on Raman spectroscopy provided by an embodiment of the present invention is as follows: Figure 1 Before step S104 of the illustrated embodiment, the method may further include: S301 , using a boric acid solution of a second preset concentration as a training sample, and interacting with the excitation light to form a second Raman spectrum.
[0041] It should be noted that the boric acid solution of the first preset concentration is used to establish a preliminary regression model, and the boric acid solution of the second preset concentration is used to verify the preliminary regression model, and the first preset concentration and the second preset concentration are different.
[0042] Since the principle of generating Raman spectra of training samples with different concentrations under the irradiation of excitation light is the same, it will not be described here in detail.
[0043] S302, selecting a second interval in the second Raman spectrum that covers a characteristic peak characterizing boric acid, and taking the pixels included in the second interval and the light intensity values corresponding to the pixels as second spectrum data.
[0044] The second interval selected from the second Raman spectrum has the same number of pixels as the first interval selected from the first Raman spectrum, and the ranges of the characteristic peaks of the two are consistent. From the above introduction to the characteristic peak interval selected from the first Raman spectrum, it can be seen that the pixels with abscissas between 300 and 850 are used as the interval of the second Raman spectrum. In this way, the variables in the modeling process are controlled to avoid the poor reproducibility of the regression model caused by environmental factors or the power of the excitation light.
[0045] It can be understood that the second spectrum data includes N pixels, each pixel corresponds to its own light intensity value, and an N*2 data matrix is constructed, and the data matrix is used as the second spectrum data.
[0046] Exemplarily, when the first preset concentration is 60 mg / L, a 60 mg / L boric acid solution forms a Raman spectrum after being irradiated with excitation light, and pixels between 300 and 800 are extracted therefrom to obtain the light intensity value corresponding to each pixel, and a data matrix as shown in Table 2 is established as the second spectral data.
[0047] Table 2:
[0048] S303 , inputting the second preset concentration as a variable into the regression model, and comparing the calculated data generated by the regression model with the second spectral data to obtain a fit index of the regression model.
[0049] The second preset concentration is a known quantity. The second preset concentration is input into the regression model as an independent variable. The regression model can be used to calculate the calculation data of the training sample of the second preset concentration, wherein the calculation data includes the pixels included in the second interval and the light intensity values corresponding to the pixels.
[0050] Furthermore, the calculated data is compared with the second spectrum data to obtain a goodness of fit index of the regression model, and the goodness of fit index is used to measure the accuracy of the regression model.
[0051] S304, judging whether the fitting index is greater than the fitting threshold, if the judgment result is yes, executing step S305, if the judgment result is no, executing step S306.
[0052] S305: Output the regression model.
[0053] S306: Adjust the penalty coefficient in the Lasso regression algorithm and update the regression model.
[0054] It should be noted that in the process of building a regression model, if the fit index of the regression model is less than the fit threshold, the regression model is updated by adjusting the penalty coefficient so that the fit index of the updated regression model is closer to or exceeds the fit threshold.
[0055] In the example of the present application, the fitness threshold is greater than or equal to 0.99.
[0056] Through the above settings, the detection accuracy of the boric acid solution concentration can be improved, and the regression model established by the Lasso regression algorithm has smaller error and higher reproducibility.
[0057] On the basis of the above-mentioned updated regression model, a boric acid solution of a third preset concentration can also be selected as a training sample, and interacts with the excitation light to form a third Raman spectrum, a third interval covering the characteristic peak of boric acid is selected in the third Raman spectrum, and the pixels contained in the third interval and the light intensity values corresponding to the pixels are used as third spectral data, and the third preset concentration is input as a variable into the updated regression model, and the calculated data generated by the updated regression model is compared with the third spectral data to obtain the fit index of the updated regression model, and to determine whether the fit index of the updated regression model is greater than the fit threshold, if the judgment result is yes, then the updated regression model is output as the final regression model, and if the judgment result is no, then the above steps S301 to S306 are repeated. In repeating the above steps S301 to S306, boric acid solutions of different concentrations can be selected as training samples to improve the accuracy of the final regression model, so that the final regression model has high reproducibility.
[0058] like Figure 4 As shown, the present application also provides an experimental data diagram of obtaining a higher fit index by adjusting the penalty coefficient during the establishment and update process of the regression model. It can be seen that in the process of obtaining a more accurate model, since there is a nonlinear relationship between the penalty coefficient and the fit index, the accuracy of the regression model obtained by the above method is higher.
[0059] like Figure 5 As shown, a method for detecting the concentration of a boric acid solution provided by an embodiment of the present invention uses a Lasso regression algorithm and establishes a regression model according to first spectral data and a first preset concentration, including: S501: Acquire first spectrum data as first input data.
[0060] S502: Acquire a first preset concentration as second input data.
[0061] S503: Select a penalty coefficient within a set range as the third input data.
[0062] S504: Process the first input data, the second input data, and the third input data based on the Lasso regression algorithm, and obtain, through training, a regression coefficient corresponding to when the objective function of the regression model reaches a minimum value.
[0063] like Figure 6 As shown, a method for detecting the concentration of a boric acid solution based on Raman spectroscopy provided by an embodiment of the present invention adjusts the penalty coefficient in the Lasso regression algorithm and updates the regression model, including: S601 , obtaining first spectral data and second spectral data as first input data, and extracting the number of pixels included in a first interval or a second interval from the first input data, wherein the number of pixels included in the first interval and the second interval is the same.
[0064] S602 : Acquire a first preset concentration and a second preset concentration as second input data, and extract the number of concentrations of training samples with different preset concentrations from the second input data.
[0065] S603: Select a penalty coefficient within a set range as the third input data.
[0066] S604: Use the number of concentration types and the number of pixel points as fourth input data.
[0067] S605. Obtain an updated regression model according to the first input data, the second input data, the third input data, and the fourth input data, and a regression coefficient corresponding to when the objective function of the updated regression model reaches a minimum value, wherein the updated objective function satisfies the following relationship: ; Wherein, X represents the first input data, y represents the second input data, α represents the penalty coefficient, β represents the regression coefficient, N represents the number of concentrations of training samples of different concentrations in the second input data, and P represents the number of pixels contained in the characteristic peak interval.
[0068] Or, the new objective function satisfies the following relationship: ; Wherein, X represents the first input data, y represents the second input data, α represents the penalty coefficient, and β represents the regression coefficient.
[0069] In the example of the present application, the penalty coefficient is greater than or equal to 0 and less than or equal to 300. Any value in the range of 0 to 300 is selected as the penalty coefficient α of the Lasso regression algorithm, and the regression coefficient β of the regression model that meets the fitting threshold is obtained by the Lasso regression algorithm according to the training samples of different concentrations, and the penalty coefficient α is saved, wherein the penalty coefficient is an integer.
[0070] In other examples, any value in the range of 0 to 300 is selected as the penalty coefficient α of the Lasso regression algorithm, and the regression coefficient β of the regression model that meets the fitting threshold is obtained according to different test conditions through the Lasso regression algorithm, and the penalty coefficient α is saved, wherein the different test conditions include at least one of the following test conditions: The power of the excitation light, temperature, humidity, electromagnetic field, etc.
[0071] Optionally, different concentrations and different test conditions can be taken as a variable and incorporated into the calculation process of the Lasso regression algorithm to establish a more accurate regression model and retain the penalty coefficient α of the regression model.
[0072] In the example of the present application, the penalty coefficient selected for the training sample of the first preset concentration is different from the penalty coefficient selected for the training sample of the second preset concentration. When the regression model is updated by training samples of different preset concentrations, the penalty coefficient is changed to obtain the regression coefficient corresponding to when the objective function reaches the minimum value.
[0073] like Figure 7 As shown, an embodiment of the present invention further provides an error comparison diagram of a regression model calculated based on a Lasso regression algorithm and an elastic network (ElaticNet), wherein the horizontal axis represents a boric acid solution of known concentration, and the regression models obtained by the above two regression algorithms respectively input the boric acid solution of known concentration as an independent variable into their respective regression models, and their respective calculation data are obtained by calculating their respective regression models, and their respective calculations include a number of pixel points characterizing boric acid and light intensity values corresponding to the pixel points, and the light intensity values obtained by the above calculations are compared with the light intensity values of the corresponding pixel points in the spectrum diagram to obtain the prediction error represented by the vertical axis.
[0074] When the prediction error value is closer to 0, it means that the accuracy of the regression model is higher. Figure 7 It can be seen that the prediction error of the regression model based on the Lasso regression algorithm varies less, and is closer to 0 than the prediction error of the regression model based on the elastic network.
[0075] In addition, compared with other regression algorithms, such as ridge regression algorithm, linear regression, polynomial regression, etc., the Lasso regression algorithm applied to the detection of boric acid solution concentration has higher detection accuracy, and its regression model has high reproducibility.
[0076] Since the Lasso regression algorithm is generally used to establish classification models, it has better performance than other regression algorithms in the field of concentration detection. Especially in the special scenario of boric acid solution concentration detection in the nuclear power field, a regression algorithm with higher accuracy and better reproducibility is needed.
[0077] As an implementation manner, both the first Raman spectrum and the second Raman spectrum are Raman spectra that have not been subjected to background subtraction processing.
[0078] Optionally, the first Raman spectrum and the second Raman spectrum may be processed to eliminate errors caused by environmental interference and noise, wherein the data processing includes at least one of the following processing methods: Smoothing and noise reduction.
[0079] It should be noted that since the Raman spectrum signal itself belongs to the detection of weak signals, it is affected by factors such as the test method, optical system, detection instrument, and detection environment. Since the information contained in the Raman spectrum is relatively complex, especially the original Raman spectrum contains the most abundant information, simple mathematical processing is very likely to lose some physical information, especially during the test process, the slightest change in the environment will cause errors in the regression model. Therefore, the Raman spectrum that has not been processed by background subtraction is used as a training object, and the interval representing the characteristic peak of boric acid is selected from it, which can retain the original sample data in the machine learning process as much as possible. Thereby improving the detection accuracy of the obtained regression model.
[0080] Specific as Figure 8 As shown in the figure, it shows the model error diagram obtained after training with spectral samples without baseline subtraction and after baseline subtraction, where the horizontal axis represents the predicted sample concentration, and the vertical axis represents the mean value and error range of the sample concentration predicted by the training model. The center point on the line represents the predicted mean concentration, the upper and lower error bars represent the error range of the predicted concentration, and the spacing size represents the size of the error. Figure 8 It can be seen that under low concentration conditions (the concentration of the boric acid solution to be tested is less than 700 mg / L), the predicted concentration error of the model obtained after training with the spectral samples after baseline subtraction is significantly greater than that without baseline subtraction. In the embodiment of the present application, the spectral data of the spectral training samples and the test samples are not subjected to baseline subtraction, thereby reducing the predicted concentration error of the regression model under low concentration conditions and improving the detection accuracy of the regression model.
[0081] In summary, the embodiments of the present invention provide a regression model established based on a method for detecting the concentration of boric acid solution by Raman spectroscopy, which is used to detect the concentration of boric acid solution, improve the detection accuracy of the concentration of boric acid solution, reduce the detection error, and the regression model has high reproducibility when using boric acid solutions of different concentrations as calculation conditions.
[0082] The embodiment of the present application also provides a system for detecting the concentration of boric acid solution based on Raman spectroscopy, which can be a portable device. It should be noted that the system can also be other devices with processing functions; for example, it can be a control module in a portable device; for another example, it can be a central processing unit (CPU), a general-purpose processor network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD) or any combination thereof; for another example, it can be other circuits, devices or software modules, etc.; as long as the system can implement the method for detecting the concentration of boric acid solution based on Raman spectroscopy shown in the embodiment of the present application, other forms of systems are also within the scope of protection of the present application, and the present application does not limit the specific form of the system.
[0083] like Fig. 9 As shown, the system includes: A data acquisition unit 11 is used to acquire a first Raman spectrum, wherein the first Raman spectrum is formed based on the interaction between a boric acid solution of a first preset concentration and the excitation light, and the data acquisition unit selects a first interval in the first Raman spectrum that covers a characteristic peak characterizing boric acid, and uses the pixel points included in the first interval and the light intensity values corresponding to the pixel points as first spectrum data; A model building unit 12, used to build a regression model according to the first spectral data and the first preset sodium concentration corresponding to the first spectral data, wherein the regression model is a model built based on a Lasso regression algorithm with the first spectral data as an independent variable and the first preset concentration as a dependent variable; The concentration detection unit 13 is used to detect the unknown concentration of the boric acid solution to be tested according to the regression model to determine the actual concentration of the boric acid solution to be tested.
[0084] It should be noted that the boric acid solution of the first preset concentration flows through the sample pool, and the first Raman spectrum characterizing the boric acid solution of the first preset concentration is generated by irradiating the boric acid solution of the first preset concentration with excitation light. The sample pool can also be used to hold boric acid solutions of different concentrations. When a boric acid solution of one concentration is irradiated with excitation light to form a Raman spectrum, the concentration of the boric acid solution in the sample pool is increased or decreased, and the Raman spectrum of another concentration is formed after irradiating with excitation light again.
[0085] In the technical solution provided in the embodiments of the present application, and using boric acid solutions of different concentrations as training samples, a regression model with concentration, light intensity value, and penalty coefficient as variables is established through the Lasso regression algorithm to improve the detection accuracy of the boric acid solution concentration, and the model has high reproducibility.
[0086] The present application also provides an electronic device, such as Fig.10 As shown, it includes a processor 21 and a memory 22, the memory 22 stores machine executable instructions that can be executed by the processor 21, and the processor 21 is prompted by the machine executable instructions to implement the steps of any of the above detection methods.
[0087] The memory 22 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory 22 may also be at least one storage device located away from the aforementioned processor.
[0088] The above-mentioned processor 21 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0089] In another embodiment provided by the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above detection methods are implemented.
[0090] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0091] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the claims attached to this application.
Claims
1. A method for detecting the concentration of a boric acid solution based on Raman spectroscopy, applied to a boric acid concentration detector for a pressurized water reactor neutron-free radiation source, characterized in that: The method comprises: Using a boric acid solution with a first preset concentration as a training sample and interacting with the excitation light to form a first Raman spectrum; Selecting a first interval in the first Raman spectrum that covers a characteristic peak representing boric acid, and taking pixel points included in the first interval and light intensity values corresponding to the pixel points as first spectrum data; Using a Lasso regression algorithm, and establishing a regression model according to the first spectral data and the first preset concentration; Using the regression model to detect a boric acid solution of unknown concentration to determine the actual concentration of the boric acid solution to be tested; Before using the regression model to detect a boric acid solution of unknown concentration to determine the actual concentration of the boric acid solution to be tested, the method further includes: A boric acid solution of a second preset concentration is used as the training sample, and interacts with the excitation light to form a second Raman spectrum, wherein the first Raman spectrum and the second Raman spectrum are both Raman spectra that have not been subjected to background subtraction data processing; Selecting a second interval in the second Raman spectrum that covers a characteristic peak representing boric acid, and using pixel points included in the second interval and light intensity values corresponding to the pixel points as second spectrum data; Inputting the second preset concentration as a variable into the regression model, and comparing the calculated data generated by the regression model with the second spectral data to obtain a goodness of fit index of the regression model; The regression model is determined according to the goodness of fit index.
2. The method according to claim 1, characterized in that Determining the regression model according to the fitness index includes: Determine whether the fitness index is greater than a fitness threshold; If the judgment result is yes, then output the regression model; If the judgment result is no, the penalty coefficient in the Lasso regression algorithm is adjusted and the regression model is updated.
3. The method according to claim 1, characterized in that The method of using the Lasso regression algorithm and establishing a regression model according to the first spectral data and the first preset concentration includes: Acquiring the first spectrum data as first input data; Acquire the first preset concentration as second input data; Select a penalty coefficient within a set range as the third input data; The first input data, the second input data and the third input data are processed based on the Lasso regression algorithm, and the regression coefficient corresponding to when the objective function of the regression model reaches the minimum value is obtained through training.
4. The method according to claim 3, characterized in that The penalty coefficient is an integer greater than 0 and less than 300.
5. The method according to claim 1, characterized in that The step of adjusting the penalty coefficient in the Lasso regression algorithm and updating the regression model includes: Acquire the first spectral data and the second spectral data as first input data, and extract the number of pixel points included in the first interval or the second interval from the first input data, wherein the number of pixel points included in the first interval and the second interval is the same; Acquire the first preset concentration and the second preset concentration as second input data, and extract the number of concentrations of the training samples with different preset concentrations from the second input data; Select a penalty coefficient within a set range as the third input data; Taking the number of concentrations and the number of pixels as fourth input data; The updated regression model and the regression coefficient corresponding to the objective function of the updated regression model reaching the minimum value are obtained according to the first input data, the second input data, the third input data and the fourth input data, and the updated objective function satisfies the following relationship: ; Wherein, X represents the first input data, y represents the second input data, α represents the penalty coefficient, β represents the regression coefficient, N represents the number of concentrations of the training samples of different concentrations in the second input data, and P represents the number of pixels contained in the characteristic peak interval; Or, the updated objective function satisfies the following relationship: ; Wherein, X represents the first input data, y represents the second input data, α represents the penalty coefficient, and β represents the regression coefficient.
6. The method according to claim 5, characterized in that The penalty coefficient selected for the training sample of the first preset concentration is different from the penalty coefficient selected for the training sample of the second preset concentration. When the regression model is updated using the training samples of different preset concentrations, the penalty coefficient is changed to obtain the regression coefficient corresponding to when the objective function reaches the minimum value.
7. The method according to claim 1, characterized in that The first Raman spectrum and the second Raman spectrum are spectra that have been processed by data, wherein the data processing includes smoothing processing and / or noise reduction processing.
8. A system for detecting the concentration of boric acid solution based on Raman spectroscopy, applied to a boric acid concentration detector for a pressurized water reactor neutron-free radiation source, characterized in that: The system comprises: A data acquisition unit, configured to acquire a first Raman spectrum, wherein the first Raman spectrum is formed based on the interaction between a boric acid solution of a first preset concentration and an excitation light, the data acquisition unit selects a first interval in the first Raman spectrum that covers a characteristic peak characterizing boric acid, and uses pixels included in the first interval and light intensity values corresponding to the pixels as first spectrum data; a model building unit, configured to build a regression model according to the first spectral data and the first preset sodium concentration corresponding to the first spectral data, wherein the regression model is a model built based on a Lasso regression algorithm with the first spectral data as an independent variable and the first preset concentration as a dependent variable; A concentration detection unit, used for detecting a boric acid solution of unknown concentration according to the regression model to determine the actual concentration of the boric acid solution; The data acquisition unit is further used to acquire a second Raman spectrum, wherein the second Raman spectrum is formed based on the interaction between a boric acid solution of a second preset concentration and the excitation light, wherein the data acquisition unit selects a second interval in the second Raman spectrum that covers a characteristic peak characterizing boric acid, and uses the pixels included in the second interval and the light intensity values corresponding to the pixels as second spectrum data; both the first Raman spectrum and the second Raman spectrum are Raman spectra that have not been subjected to background subtraction data processing; The model building unit inputs the second preset concentration as a variable into the regression model, compares the calculated data generated by the regression model with the second spectral data, obtains a fit index of the regression model, and determines the regression model according to the fit index.
Citation Information
Patent Citations
Method and system for noninvasively detecting blood alcohol content based on Raman scattering
CN104597031A
Quantitative spectrum data analysis and processing method based on depth learning
CN109493287A
Method for predicting hearth oxygen concentration by utilizing regression algorithm based on numerical simulation
CN112036100A
Method and device for analyzing wood component content based on Raman spectrum
CN114002203A
End-to-end deep learning Raman spectrum data classification method based on DRS-VGG
CN114692773A
