Deep substance Raman spectrum reconstruction method
By combining Voigt function, spatially offset Raman spectroscopy technology and deep neural network, the problem of complex and relying on expert experience in the existing technology of the Raman spectroscopy reconstruction process of deep matter in the existing technology is solved, and fast and efficient Raman spectroscopy reconstruction is achieved, simplifying the processing process and improving the analysis speed.
Patent Information
- Application Number
- CN202411742439.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-29
AI Technical Summary
When the prior art realizes Raman spectral reconstruction of deep matter, the process is complicated, and it is necessary to select a suitable initial value. It depends on expert experience and has a high threshold, which cannot meet the needs of rapid detection.
A method combining Voigt function, spatially offset Raman spectroscopy technology and deep neural networks is used to generate training data sets and train deep neural networks to realize the reconstruction of spatially offset Raman spectroscopy, eliminate spectral peak interference of packaging materials, and obtain pure Raman spectra of deep matter.
Through the training of deep neural networks, the Raman spectrum of deep samples is quickly and efficiently reconstructed, the spectral processing process is simplified, the limitations of analysis speed and calculation efficiency are reduced, and the pure Raman spectrum of deep samples can be quickly and easily obtained.
Smart Images

Figure CN119574529A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an optical detection method of deep-layer substances, and in particular to a Raman spectrum reconstruction method of deep-layer substances. Background Art
[0002] Raman spectroscopy is a spectroscopic technique used to analyze the structure and composition of matter. It is based on the Raman scattering phenomenon, that is, when light interacts with matter, part of the energy of the photons is absorbed or emitted by the matter, causing the frequency of the scattered light to change. By measuring this frequency change, information about the sample can be obtained, such as chemical composition, crystal structure, molecular vibration, etc.; Raman spectroscopy is widely used in chemistry, materials science, biology and other fields.
[0003] Spatially offset Raman spectroscopy (SORS) is a derivative technology of Raman spectroscopy. By shifting the collection point of Raman scattered light away from the laser incident point, the technology can suppress the fluorescence and Raman spectral interference of the packaging material on the sample surface, thereby improving the detection sensitivity. However, spatially offset Raman spectroscopy can only reduce the interference caused by the packaging, but cannot completely eliminate its influence. Therefore, it is necessary to analyze and process the spatially offset Raman spectrum to obtain the pure Raman spectrum of the deep sample. However, this process is usually complicated to implement and cannot meet the needs of rapid on-site detection, which limits the application of Raman spectroscopy in the fields of hazardous and explosive detection, biomedicine, pesticide residue detection, etc.
[0004] At present, there are many methods for processing spatially offset Raman spectra to obtain pure Raman spectra of deep samples; among them is the proportional subtraction method, such as the Chinese invention patent with publication number: CN113970539A and publication date of January 25, 2022. The proportional subtraction method is used to select an appropriate proportional factor to offset the Raman spectrum of the surface material in the non-zero spatially offset spectrum. This method usually requires spatially offset Raman spectrum collection at the optimal offset distance, and repeated experiments are required to find the proportional factor; in addition, there are self-modeling mixture analysis, target band entropy minimization, independent component analysis and other methods that can be used to reconstruct the spectrum of deep samples; however, the implementation process of the above methods is relatively complicated, and usually requires the selection of appropriate initial values to obtain better performance, and often relies on expert experience, and the implementation threshold is high. Summary of the invention
[0005] The purpose of the present invention is to provide a method for reconstructing Raman spectra of deep materials in order to solve the technical problems that the existing technology has a complicated implementation process, usually requires the selection of appropriate initial values to obtain better performance, often relies on expert experience, and has a high implementation threshold.
[0006] The inventive concept of the present invention is: a method based on the combination of Voigt function, spatial offset Raman spectroscopy technology and deep neural network (DNN) is used to reconstruct the Raman spectrum of deep substances, with the aim of eliminating the spectral peak interference of packaging materials to obtain pure Raman spectral information of deep substances.
[0007] In order to achieve the above purpose and complete the above invention concept, the present invention adopts the following technical solutions:
[0008] A method for reconstructing Raman spectra of deep-layer materials is special in that it comprises the following steps:
[0009] Step 1: Generate training data set
[0010] 1.1. Use the Voigt function to simulate and randomly generate a Raman spectrum peak P. A total of n Raman spectrum peaks P are generated and superimposed to obtain a simulated Raman spectrum R. The simulated Raman spectrum R is recorded as R a is regarded as a sample spectrum, where n is randomly generated in the range of [2, 5] to control the number of generated Raman peaks P;
[0011] 1.2. Use the same method as step 1.1 to obtain another simulated Raman spectrum R b , and R b Think of it as a packaging spectrum;
[0012] 1.3. The sample spectrum R a and package Spectrum R b Add together to get the Raman spectrum R at the simulated zero spatial offset d=0 ; Mix the sample spectrum R according to the preset ratio coefficient a and package Spectrum R b , and obtain the simulated Raman spectrum R at non-zero spatial offset d>0 ; Then we get a set of training data [X1, Y1], where X1 is R d=0 and R d>0 The Raman spectrum sequence is composed of X1 = [R d=0 , R d>0 ], Y1 is the target output, and Y1=R a ;
[0013] 1.4. Repeat steps 1.1 to 1.3 to generate m sets of training data, and obtain the training data set D = {(X k , Y k ), k = 1, 2, ..., m}, used to train deep neural networks, where X k As input data, Y k As the target output, m>100;
[0014] Step 2: Train the deep neural network to obtain the Raman spectrum reconstruction model
[0015] 2.1 Construct a deep neural network as f(X; θ); where X is the input data, θ is the set of all deep neural network parameters, including the weight matrix W and bias vector b of each layer, denoted as θ = {W1, b1, W2, b2, ..., W5, b5}, where W j is the weight matrix of the j-th layer network, b j is the bias vector of the j-th layer network, where j = 1, 2, 3, 4, 5;
[0016] 2.2. Use the training data set D to train the deep neural network f(X; θ) to obtain the Raman spectrum reconstruction model Y pred =f(X input ;θ), where X input is the input data, Y pred The reconstructed pure Raman spectrum is deployed in practical applications for Raman spectrum reconstruction;
[0017] Step 3, collecting the spatially offset Raman spectrum of the double-layer sample;
[0018] Step 4: perform baseline correction on the collected Raman spectrum to obtain a corrected Raman spectrum; and splice the corrected Raman spectrum into input data X input , input to the Raman spectrum reconstruction model Y pred =f(X input ; θ), the reconstructed pure Raman spectrum Y pred .
[0019] Furthermore, in step 1.1, the Voigt function is defined by the following formula:
[0020]
[0021] Where μ is the independent variable of the Voigt function, σ is the standard deviation of the Gaussian distribution part, γ is the half-maximum full width of the Lorentzian distribution part; w(z) is the Faddeeva function, which has the form: in Re[w(z)] is the real part of w(z), i is the imaginary unit;
[0022] The Raman peak P = a·V (μ-l; σ, γ), where l is between 200-2000 cm -1 The Raman peak P position parameter is randomly generated within the wave number range; σ,γ are randomly generated within the interval (0,2); a is the Raman peak P intensity parameter randomly generated within the interval (0,1), which is used to control the intensity of the Raman peak P;
[0023] The Raman spectrum
[0024] Furthermore, in step 1.3, the proportional coefficients are a1, b1 and are randomly generated in the interval (0.5, 1); d>0 =a1R a +a1b1R b .
[0025] Furthermore, in step 1.4, m=10 6 .
[0026] Further, in step 2.1, the deep neural network includes a first hidden layer fc1, a second hidden layer fc2, a third hidden layer fc3, a fourth hidden layer fc4, and an output layer output;
[0027] The first hidden layer fc1: accepts a feature vector of size 512, maps the input to a hidden feature space of 1024 dimensions through a fully connected layer; then applies a ReLU activation function to introduce a nonlinear transformation;
[0028] The second hidden layer fc2: passes the output of the previous layer to the second fully connected layer, reducing the feature from 1024 dimensions to 512 dimensions; continues to apply the ReLU activation function to enhance the nonlinear ability of the network;
[0029] The third hidden layer fc3: The third fully connected layer maintains the 512-dimensional feature size and continues to apply the ReLU activation function. This layer helps the network to further learn and refine features by maintaining the dimension while avoiding the loss of important information;
[0030] The fourth hidden layer fc4: further reduces the feature from 512 dimensions to 256 dimensions; activates through the ReLU function, strengthens the nonlinear representation ability of the network, reduces the number of parameters, and prepares the final features for the output layer;
[0031] The output layer output: The last fully connected layer outputs a 256-dimensional vector, which is the final prediction result; this layer does not use an activation function, and the output is the prediction output of the deep neural network.
[0032] Furthermore, in step 2.2, the process of deep neural network training is:
[0033] 2.2.1 X in the training dataset D k Perform normalization to obtain training samples Used to speed up training and improve network performance, where X kmin For X k The minimum value of X kmaxFor X k The maximum value of
[0034] 2.2.2 The deep neural network parameters θ are randomly initialized with normal distribution, with the mean set to 0 and the standard deviation set to 0.1;
[0035] 2.2.3 Training sample X' k Input the deep neural network for forward propagation to obtain the predicted output PY k ;
[0036] 2.2.4 Output PY based on prediction k and the target output Y k , select mean square error MSE to calculate the loss value of training data set D Used to measure the predicted output PY k With the target output Y k The difference between
[0037] 2.2.5 Back propagation calculates the gradient of the loss value L with respect to the deep neural network parameter θ
[0038] 2.2.6 Based on the calculated gradient Use the gradient descent method to update the deep neural network parameters θ;
[0039] 2.2.7 Repeat steps 2.2.3 to 2.2.6 until the loss value L converges to a gradually stable state and no longer decreases significantly;
[0040] 2.2.8 Output and save the final optimized deep neural network parameter θ to obtain the Raman spectrum reconstruction model Y pred =f(X input ;θ), where X input is the input data, Y pred The reconstructed pure Raman spectrum is deployed in practical applications for Raman spectrum reconstruction.
[0041] Furthermore, in step 2.2.3, the specific process of the forward propagation is:
[0042] Input training sample: X′ k
[0043] After the first hidden layer: H1 = φ(W1X′ k +b1);
[0044] After the second hidden layer: H2 = φ(W2H1 + b2);
[0045] After the third hidden layer: H3 = φ(W3H2 + b3);
[0046] After the 4th hidden layer: H4 = φ(W4H3 + b4);
[0047] After the output layer: PY k =W5H4+b5;
[0048] Where: φ is the ReLu activation function, φ(x) = max(0, x), x is the independent variable of the ReLu activation function; H h is the output of the hth hidden layer, h = 1, 2, 3, 4; the predicted output is recorded as PY k , PY k =f(X′ k ;θ).
[0049] Further, in step 2.2.6, the update is performed by the formula To adjust the weight matrix W and the bias vector b, where η is the learning rate, which is used to control the step size of each deep neural network parameter θ update, usually between 0.001 and 0.1.
[0050] Furthermore, in step three, the acquisition uses a transmission-type spatial offset Raman spectrometer with an excitation wavelength of 785 nm and a resolution of 5 cm; the excitation power is set to 400 mW, the integration time is 4 s, and the Raman spectra of the double-layer sample model at offset distances of 0 mm and 3 mm are collected respectively; the upper layer of the double-layer sample uses polymethyl methacrylate (PMMA) as the packaging material with a thickness of 2 mm, and the lower layer contains the sample to be tested as a deep material with a thickness of 7 mm.
[0051] Furthermore, in step 4, the baseline correction process is as follows: for a collected original Raman spectrum RS, the background signal of the original Raman spectrum RS is approximated by fitting a polynomial function g(x), and then the fitted polynomial function g(x) is subtracted from the original Raman spectrum RS to obtain a corrected Raman spectrum RS′=RS-g(x), wherein RS is the collected original Raman spectrum and g(x) is the fitted background signal.
[0052] Beneficial effects of the present invention:
[0053] 1. A deep material Raman spectrum reconstruction method of the present invention uses a training data set simulated by a Voigt function to better simulate the real Raman spectrum, making the Raman spectrum reconstruction model obtained by training the deep neural network more accurate.
[0054] 2. A deep material Raman spectrum reconstruction method of the present invention uses a deep neural network to reconstruct the spatially offset Raman spectrum, which can quickly and efficiently reconstruct the Raman spectrum of deep samples, and implement automated processing to simplify the spectrum processing process, so that the spectrum processing time is controlled at the millisecond level, solving the problems of complex spectrum processing process, slow analysis speed and low calculation efficiency in the prior art, thereby quickly and easily obtaining pure Raman spectra of deep samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a schematic diagram of a process of an embodiment of a deep material Raman spectrum reconstruction method of the present invention;
[0056] Figure 2 This is a schematic diagram of a deep material Raman spectrum reconstruction method embodiment of the present invention using a deep neural network to reconstruct the Raman spectrum of potassium perchlorate; wherein (a) is a Raman spectrum of potassium perchlorate with packaging; (b) is a Raman spectrum of potassium perchlorate reconstructed using a deep neural network; (c) is a reference Raman spectrum of a pure potassium perchlorate sample;
[0057] Figure 3 This is a schematic diagram of a deep material Raman spectrum reconstruction method embodiment of the present invention using a deep neural network to reconstruct the Raman spectrum of sodium nitrate; wherein (a) is a Raman spectrum of packaged sodium nitrate; (b) is a Raman spectrum of sodium nitrate reconstructed using a deep neural network; (c) is a reference Raman spectrum of a pure sample of sodium nitrate;
[0058] Figure 4 This is a schematic diagram of the deep neural network training process in step 2 of an embodiment of a deep material Raman spectrum reconstruction method of the present invention. DETAILED DESCRIPTION
[0059] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings and embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] Combination Figure 1 and Figure 4 As shown, a deep material Raman spectrum reconstruction method provided by an embodiment of the present invention includes the following steps:
[0061] Step 1: Generate training data set
[0062] 1.1 The peak of Raman spectrum is essentially Lorentzian, but due to factors such as instrument resolution or sample characteristics, the measured Raman spectrum is usually the convolution of Lorentzian distribution and Gaussian distribution. This combination is called Voigt function. Therefore, using Voigt function can better simulate the real Raman spectrum.
[0063] The Voigt function can be defined by the following formula:
[0064]
[0065] Where μ is the independent variable of the Voigt function, σ is the standard deviation of the Gaussian distribution part, γ is the half-maximum full width of the Lorentzian distribution part; w(z) is the Faddeeva function, which has the form: in Re[w(z)] is the real part of w(z), i is the imaginary unit;
[0066] The Voigt function is used to simulate and randomly generate a Raman peak P = a·V(μ-l; σ, γ), where l is between 200-2000cm -1 The position parameter of the Raman peak P is randomly generated within the wavenumber range; σ, γ are randomly generated within the interval (0, 2), and different combinations of σ, γ can produce Voigt peaks of different shapes; a is the intensity parameter of the Raman peak P randomly generated within the interval (0, 1), which is used to control the intensity of the Raman peak P; a total of n Raman peaks P are generated, namely P1, P2, ..., P n , the n generated Raman peaks P are superimposed to obtain a simulated Raman spectrum The simulated Raman spectrum R is denoted as R a and regarded as the sample spectrum, where n is randomly generated in the range of [2, 5] to control the number of generated Raman peaks P;
[0067] 1.2. Use the same method as step 1.1 to obtain another simulated Raman spectrum R b , R b Think of it as a packaging spectrum;
[0068] 1.3. Simulate Raman spectrum at zero spatial offset: R d=0 =R a +R b ; Randomly generate proportional coefficients a1, b1 in the interval (0.5, 1) to obtain the simulated Raman spectrum at the non-zero spatial offset: R d>0 =a1R a +a1b1R b ; Let [X1, Y1] be a set of training data, where X1 is R d=0and R d>0 The Raman spectrum sequence is composed of X1 = [R d=0 , R d>0 ], Y1 is the target output, and Y1=R a ;
[0069] 1.4. Repeat steps 1.1 to 1.3 to generate m sets of training data, and obtain the training data set D = {(X k , Y k ), k = 1, 2, ..., m}, used to train deep neural networks, where X k As input data, Y k As the target output, the number of training data sets is m>100, preferably m=10 6 Can make training more effective;
[0070] Step 2: Train the deep neural network to obtain the Raman spectrum reconstruction model
[0071] 2.1 Construct a deep neural network as f(X; θ); where X is the input data, θ is the set of all deep neural network parameters, including the weight matrix W and bias vector b of each layer, denoted as θ = {W1, b1, W2, b2, ..., W5, b5}, where W j is the weight matrix of the j-th layer network, b j is the bias vector of the j-th layer network, where j = 1, 2, 3, 4, 5;
[0072] Table 1 is a structural configuration table of a deep neural network in an embodiment of a deep material Raman spectrum reconstruction method of the present invention;
[0073] level type Input size Output size Activation Function Hidden layer 1 Fully connected layer 512 1024 ReLU Hidden Layer 2 Fully connected layer 1024 512 ReLU Hidden Layer 3 Fully connected layer 512 256 ReLU 4th hidden layer Fully connected layer 256 256 ReLU Output Layer Fully connected layer 256 256 \
[0074] As shown in Table 1, the deep neural network of this embodiment includes a first hidden layer (fc1), a second hidden layer (fc2), a third hidden layer (fc3), a fourth hidden layer (fc4), and an output layer (output);
[0075] The first hidden layer (fc1): accepts a feature vector of size 512 and maps the input to a hidden feature space of 1024 dimensions through a fully connected layer; then the ReLU activation function is applied to introduce nonlinear transformation;
[0076] Second hidden layer (fc2): The output of the previous layer is passed to the second fully connected layer to reduce the feature from 1024 dimensions to 512 dimensions; the ReLU activation function is continued to be applied to enhance the nonlinear ability of the network;
[0077] 3rd hidden layer (fc3): The third fully connected layer maintains the 512-dimensional feature size and continues to apply the ReLU activation function. This layer helps the network further learn and refine features by maintaining the dimension while avoiding the loss of important information.
[0078] The fourth hidden layer (fc4): further reduces the features from 512 dimensions to 256 dimensions; through the ReLU function activation, the nonlinear representation ability of the network is strengthened, and the number of parameters is reduced to prepare the final features for the output layer;
[0079] Output layer: The last fully connected layer outputs a 256-dimensional vector, which is the final prediction result. This layer does not use an activation function, and the output is the prediction output of the deep neural network.
[0080] 2.2. Obtain training samples: X in the training data set D k Perform normalization and obtain training samples after normalization Among them, X kmin For X k The minimum value of X kmax For X k The maximum value of is used to speed up training and improve network performance;
[0081] 2.3. Initialize the parameters of the deep neural network: The parameters of the deep neural network θ = {W1, b1, W2, b2, ..., W5, b5} are randomly initialized with a normal distribution, with a mean of 0 and a standard deviation of 0.1, where W j is the weight matrix of the j-th layer network, b i The bias vector of the j-th layer network, where j = 1, 2, 3, 4, 5;
[0082] 2.4. Forward propagation: For each normalized training sample X′ k , forward propagation through the deep neural network, calculate the predicted output PY k ;
[0083] The specific process of forward propagation is:
[0084] Input training sample: X′ k
[0085] After the first hidden layer: H1 = φ(W1X′ k +b1);
[0086] After the second hidden layer: H2 = φ(W2H1 + b2);
[0087] After the third hidden layer: H3 = φ(W3H2 + b3);
[0088] After the 4th hidden layer: H4 = φ(W4H3 + b4);
[0089] After the output layer: PY k =W5H4+b5;
[0090] Where: φ is the ReLu activation function, φ(x) = max(0, x), x is the independent variable of the ReLu activation function; H h is the output of the hth hidden layer, h = 1, 2, 3, 4; the predicted output is recorded as PY k , PY k =f(X′ k ;θ);
[0091] 2.5. Calculate the loss value: output PY according to the prediction k and the target output Y k , select mean square error (MSE) to calculate the loss value of training data set D Used to measure the predicted output PY k With the target output Y k The difference between them; where m is the number of groups of training data;
[0092] 2.6. Back propagation gradient calculation: Calculate the gradient of the loss value L to the deep neural network parameter θ
[0093] 2.7. Gradient descent parameter update: According to the calculated gradient L, the gradient descent method is used to update the deep neural network parameter θ, that is, through the formula To adjust the weight matrix W and the bias vector b, where η is the learning rate, which is used to control the step size of each deep neural network parameter θ update, usually between 0.001 and 0.1;
[0094] 2.8. Repeat the training process: Repeat steps 2.4 to 2.7 until the loss value L converges to a gradually stable value and no longer decreases significantly;
[0095] 2.9. Output the optimized model: After training is completed, output and save the final optimized deep neural network parameters θ to obtain the Raman spectrum reconstruction model Y pred =f(X input ; θ), and deploy it in practical applications for Raman spectroscopy reconstruction, where X input is the concatenated input data, Y pred is the reconstructed pure Raman spectrum;
[0096] Step 3: Collect spatially offset Raman spectra of double-layer samples
[0097] A transmission-type spatial offset Raman spectrometer was used for spectrum acquisition, with an excitation wavelength of 785 nm and a resolution of 5 cm. A double-layer sample model was prepared as a test sample, in which the upper layer used polymethyl methacrylate (PMMA) as a packaging material with a thickness of 2 mm, and the lower layer was filled with the sample to be tested as a deep layer material with a thickness of 7 mm. The excitation power was set to 400 mW and the integration time was 4 s, and the Raman spectra of the double-layer sample model at offset distances of 0 mm and 3 mm were collected, respectively. d = 0 and Raman spectrum RS d>0 ;
[0098] Step 4: The baseline correction process is as follows: for the collected original Raman spectrum RS, the background signal of the original Raman spectrum RS is approximated by fitting the polynomial function g(x), and then the fitted polynomial function g(x) is subtracted from the original Raman spectrum RS to obtain the corrected Raman spectrum RS′=RS-g(x), where RS is the collected original Raman spectrum and g(x) is the fitted background signal; the Raman spectrum RS d=0 and Raman spectroscopy RS d>0 The baseline correction is performed through the above process, and finally the corrected Raman spectrum RS' is obtained. d=0 And the corrected Raman spectrum RS' d>0 ; The corrected Raman spectrum RS' d=0 And the corrected Raman spectrum RS' d>0 Splice to input data X input =[RS' d=0 , R.S. d>0 ], X input Input to the Raman spectrum reconstruction model Y pred =f(X input ; θ), the reconstructed pure Raman spectrum Y pred , completing the reconstruction of the Raman spectrum of deep matter.
[0099] Combination Figure 2 and Figure 3 As shown, potassium perchlorate and sodium nitrate with packaging were tested respectively, and the Raman spectra were reconstructed using deep neural networks; it can be seen that the Raman spectrum reconstructed using the deep neural network accurately restored the five characteristic peaks of potassium perchlorate: A, B, C, D, and E; the Raman spectrum reconstructed using the deep neural network accurately restored the three characteristic peaks of sodium nitrate: A, B, and C; the characteristic peaks of potassium perchlorate and sodium nitrate were accurately restored, and the interference peaks caused by the packaging were eliminated.
[0100] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for reconstructing Raman spectra of deep materials, characterized by comprising the following steps: Step 1: Generate training data set 1.
1. Use the Voigt function to simulate and randomly generate a Raman spectrum peak P. A total of n Raman spectrum peaks P are generated and superimposed to obtain a simulated Raman spectrum R. The simulated Raman spectrum R is recorded as R a is regarded as a sample spectrum, where n is randomly generated in the range of [2,5] to control the number of generated Raman peaks P; 1.
2. Use the same method as step 1.1 to obtain another simulated Raman spectrum R b , and R b Think of it as a packaging spectrum; 1.
3. The sample spectrum R a and package Spectrum R b Add together to get the Raman spectrum R at the simulated zero spatial offset d=0 ; Mix the sample spectra R according to the preset ratio coefficient a and package Spectrum R b , and obtain the simulated Raman spectrum R at non-zero spatial offset d>0 ; Then we get a set of training data [X1, Y1], where X1 is R d=0 and R d>0 The Raman spectrum sequence is composed of X1 = [R d=0 ,R d>0 ], Y1 is the target output, and Y1=R a ; 1.
4. Repeat steps 1.1 to 1.3 to generate m sets of training data, and obtain the training data set D = {(X k ,Y k ), k = 1, 2, ..., m}, used to train deep neural networks, where X k As input data, Y k As the target output, m>100; Step 2: Train the deep neural network to obtain the Raman spectrum reconstruction model 2.1 Construct a deep neural network as f(X; θ); where X is the input data, θ is the set of all deep neural network parameters, including the weight matrix W and bias vector b of each layer, denoted as θ = {W1, b1, W2, b2, ..., W5, b5}, where W j is the weight matrix of the j-th layer network, b j is the bias vector of the j-th layer network, where j = 1, 2, 3, 4, 5; 2.
2. Use the training data set D to train the deep neural network f(X; θ) to obtain the Raman spectrum reconstruction model Y pred =f(X input ;θ), where X input is the input data, Y pred The reconstructed pure Raman spectrum is deployed in practical applications for Raman spectrum reconstruction; Step 3, collecting the spatially offset Raman spectrum of the double-layer sample; Step 4: perform baseline correction on the collected Raman spectrum to obtain a corrected Raman spectrum; and splice the corrected Raman spectrum into input data X input , input to the Raman spectrum reconstruction model Y pred =f(X input ; θ), the reconstructed pure Raman spectrum Y pred .
2. The deep material Raman spectrum reconstruction method according to claim 1, characterized in that: In step 1.1, the Voigt function is defined by the following formula: Where μ is the independent variable of the Voigt function, σ is the standard deviation of the Gaussian distribution part, γ is the half-maximum full width of the Lorentzian distribution part; w(z) is the Faddeeva function, which has the form: in Re[w(z)] is the real part of w(z), i is the imaginary unit; The Raman peak P = a·V (μ-l; σ, γ), where l is between 200-2000 cm -1 The Raman peak P position parameter is randomly generated within the wave number range; σ,γ are randomly generated within the interval (0,2); a is the Raman peak P intensity parameter randomly generated within the interval (0,1), which is used to control the intensity of the Raman peak P; The Raman spectrum 3. The deep material Raman spectrum reconstruction method according to claim 2, characterized in that: In step 1.3, the proportional coefficients are a1, b1 and are randomly generated in the interval (0.5, 1); d>0 =a1R a +a1b1R b .
4. The method for reconstructing Raman spectrum of deep-layer materials according to claim 3, characterized in that: In step 1.4, m=10 6 .
5. The deep material Raman spectrum reconstruction method according to claim 4, characterized in that: In step 2.1, the deep neural network includes a first hidden layer fc1, a second hidden layer fc2, a third hidden layer fc3, a fourth hidden layer fc4, and an output layer output; The first hidden layer fc1: accepts a feature vector of size 512, maps the input to a hidden feature space of 1024 dimensions through a fully connected layer; then applies a ReLU activation function to introduce a nonlinear transformation; The second hidden layer fc2: passes the output of the previous layer to the second fully connected layer, reducing the feature from 1024 dimensions to 512 dimensions; continues to apply the ReLU activation function to enhance the nonlinear ability of the network; The third hidden layer fc3: The third fully connected layer maintains the 512-dimensional feature size and continues to apply the ReLU activation function. This layer helps the network to further learn and refine features by maintaining the dimension while avoiding the loss of important information; The fourth hidden layer fc4: further reduces the feature from 512 dimensions to 256 dimensions; activates through the ReLU function, strengthens the nonlinear representation ability of the network, reduces the number of parameters, and prepares the final features for the output layer; The output layer output: The last fully connected layer outputs a 256-dimensional vector, which is the final prediction result; this layer does not use an activation function, and the output is the prediction output of the deep neural network.
6. The method for reconstructing Raman spectrum of deep-layer materials according to claim 5, characterized in that: In step 2.2, the process of deep neural network training is: 2.2.1 X in the training dataset D k Perform normalization to obtain training samples Used to speed up training and improve network performance, where X kmin For X k The minimum value of X kmax For X k The maximum value of 2.2.2 The deep neural network parameters θ are randomly initialized with normal distribution, with the mean set to 0 and the standard deviation set to 0.1; 2.2.3 Training sample X' k Input the deep neural network for forward propagation to obtain the predicted output PY k ; 2.2.4 Output PY based on prediction k and the target output Y k , select mean square error MSE to calculate the loss value of training data set D Used to measure the predicted output PY k With the target output Y k The difference between 2.2.5 Back propagation calculates the gradient of the loss value L with respect to the deep neural network parameter θ 2.2.6 Based on the calculated gradient Use the gradient descent method to update the deep neural network parameters θ; 2.2.7 Repeat steps 2.2.3 to 2.2.6 until the loss value L converges to a gradually stable state and no longer decreases significantly; 2.2.8 Output and save the final optimized deep neural network parameter θ to obtain the Raman spectrum reconstruction model Y pred =f(X input ;θ), where X input is the input data, Y pred The reconstructed pure Raman spectrum is deployed in practical applications for Raman spectrum reconstruction.
7. The method for reconstructing Raman spectrum of deep-layer materials according to claim 6, characterized in that: In step 2.2.3, the specific process of the forward propagation is: Input training sample: X' k After the first hidden layer: h1 = φ(W1x' k +b1); After the second hidden layer: H2 = φ(W2H1 + b2); After the third hidden layer: H3 = φ(W3H2 + b3); After the 4th hidden layer: H4 = φ(W4H3 + hb4); After the output layer: PY k =W5H4+b5; Where: φ is the ReLu activation function, φ(x) = max(0,x), x is the independent variable of the ReLu activation function; H h is the output of the hth hidden layer, h=1,2,3,4; the predicted output is recorded as PY k , PY k =f(X' k ;θ).
8. The method for reconstructing Raman spectrum of deep-layer materials according to claim 7, characterized in that: In step 2.2.6, the update is done by the formula To adjust the weight matrix W and the bias vector b, where η is the learning rate, which is used to control the step size of each deep neural network parameter θ update, usually between 0.001 and 0.
1.
9. A deep material Raman spectrum reconstruction method according to claim 8, characterized in that: In step 3, the acquisition is performed using a transmission spatially offset Raman spectrometer with an excitation wavelength of 785 nm and a resolution of 5 cm -1 ; The excitation power was set to 400 mW and the integration time to 4 s, and the Raman spectra of the double-layer sample model at offset distances of 0 mm and 3 mm were collected respectively; the upper layer of the double-layer sample used polymethyl methacrylate (PMMA) as the packaging material with a thickness of 2 mm, and the lower layer contained the sample to be tested as the deep layer material with a thickness of 7 mm.
10. A deep material Raman spectrum reconstruction method according to claim 9, characterized in that: In step 4, the baseline correction process is as follows: for a collected original Raman spectrum RS, the background signal of the original Raman spectrum RS is approximated by fitting a polynomial function g(x), and then the fitted polynomial function g(x) is subtracted from the original Raman spectrum RS to obtain a corrected Raman spectrum RS'=RS-g(x), wherein RS is the collected original Raman spectrum and g(x) is the fitted background signal.
Citation Information
Patent Citations
Method for detecting brittleness of tilapia meat by using Raman spectrum
CN115326782A
Raman spectrum denoising method based on adaptive sparse decomposition
CN116380869A
Raman spectrum preprocessing model generation method and system, and terminal and storage medium
WO2024078321A1
Cited By
Raman spectrum cross-instrument conversion method and system based on twin neural network
CN120259698A
Wood variety identification method based on spatial displacement Raman spectrum and diffusion model
CN120468114A
Method for identifying wood species based on spatially offset raman spectroscopy and diffusion model
CN120468114B