LSTM-based lanthanum bromide detector gamma energy spectrum correction method
Through the LSTM-based method, the gamma energy spectrum data of the lanthanum bromide detector is quickly and stably corrected, which solves the problem of time-consuming and labor-intensive correction of the calibration process in the prior art and requires a large amount of computing resources, and realizes efficient correction of the gamma energy spectrum, improving the accuracy and efficiency of data processing.
Patent Information
- Application Number
- CN202510230308.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The prior art is time-consuming and labor-intensive when correcting the gamma spectrum data of the lanthanum bromide detector, requiring a large amount of computing resources, and requiring adjustments to the gamma spectrum of different detectors, resulting in complex and inefficient correction processes.
The gamma energy spectrum data of the lanthanum bromide detector is corrected by using a long and short-term memory network (LSTM) method. Through the memory and processing capabilities of the LSTM network, the gamma energy spectrum is achieved, including spectral line drift correction, noise correction and background correction.
This method can effectively solve the energy spectrum background, spectral line drift and noise problems in the gamma energy spectrometer data of the lanthanum bromide detector, achieve rapid and stable correction, significantly reduce the interference of human factors in the energy spectrum data processing, and improve the accuracy and efficiency of data processing.
Smart Images

Figure CN119720816A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of gamma spectrum correction, and in particular relates to a gamma spectrum correction method for a lanthanum bromide detector based on LSTM. Background Art
[0002] During the operation of the gamma spectrometer of the lanthanum bromide detector, the acquired gamma energy spectrum data will be abnormal due to the influence of factors such as the instrument operation mode and the environment in which it is located, such as a series of data anomalies including spectral line drift and data noise, which will affect the inversion of the real element content. At the same time, due to the influence of multiple factors such as spectral line superposition caused by the Compton scattering effect, low-energy tailing caused by small-angle scattering of gamma rays in the sensitive volume of the detector, cosmic rays, electronic noise, etc., the collected raw data is mixed with background data of non-measurement targets. The existence of background will make the gamma spectrum line overall higher and will cover up some weak peaks, resulting in a huge difference between the measured value and the true value.
[0003] The prior art usually adopts a step-by-step approach to calibrate the gamma spectrum data collected by the lanthanum bromide detector, that is, first correct the spectral line drift, then perform noise correction, and finally perform background correction. The order of correction and the method used are determined subjectively by the operator. Among them, the correction of spectral line drift adopts a method based on intra-band technology, invariance principle, correlation analysis or characteristic peak energy fixation; noise correction adopts NASVD denoising method, LS-SVM segmented denoising method or CUDA denoising method, etc.; background correction adopts sensitive nonlinear background subtraction method or digital filter background subtraction method, etc. However, this step-by-step correction method is not only time-consuming and labor-intensive, but also requires a lot of computing resources. Moreover, since these methods pursue universality for a variety of gamma energy spectra, when applied to the gamma energy spectra of different detectors, they need to be adjusted and tested before use. Especially for gamma spectrometers using lanthanum bromide crystals as detectors, unlike spectrometers using sodium (titanium) iodide crystals, bismuth germanate crystals and other crystals as detectors, the energy spectrum acquired has the characteristics of high background and high characteristic peaks, which also requires targeted adjustment of the correction method. In view of this, the present invention proposes a gamma spectrum correction method for lanthanum bromide detectors based on a long short-term memory network (Long Short-Term Memory, LSTM). Summary of the invention
[0004] The object of the present invention is to provide a gamma spectrum correction method for a lanthanum bromide detector based on LSTM, aiming to solve the problems raised in the above background technology.
[0005] The purpose of the present invention is achieved through the following technical solutions: A gamma spectrum correction method for a lanthanum bromide detector based on LSTM comprises the following steps: Step S1: Perform data preparation and pre-processing for the lanthanum bromide detector gamma spectrometer, including the following sub-steps: Step S11: preprocessing the measured original energy spectrum of the lanthanum bromide detector gamma spectrometer, including spectral line drift correction, noise correction and background correction, to obtain the corresponding measured nuclide energy spectrum; Step S12: simulating the nuclide energy spectrum data of the random radioactive element content, and adding the background energy spectrum measured by the lanthanum bromide detector or simulated by the Monte Carlo method to the simulated nuclide energy spectrum, then adding random Gaussian noise to each spectral line, and performing random spectral line drift to obtain the corresponding simulated original energy spectrum; Step S2: construct an LSTM network model, and train and test the LSTM network model; Step S3: Import the unknown measured original energy spectrum data of the lanthanum bromide detector gamma spectrometer into the trained LSTM network model to predict the corresponding nuclide energy spectrum data.
[0006] Furthermore, in step S12, 20% of the data are randomly selected to perform random spectral line drift of about 5 lines before and after.
[0007] Furthermore, the specific process of step S2 is: constructing an LSTM network model, taking the measured original energy spectrum and the simulated original energy spectrum obtained in step S1 as the input of the LSTM network model, and taking the measured nuclide energy spectrum and the simulated nuclide energy spectrum as the output of the LSTM network model, the measured energy spectrum and the simulated energy spectrum both account for 50% of the training set data volume, and the model is trained and tested.
[0008] Furthermore, the LSTM network model includes an LSTM layer, a convolution layer and a regression layer; The LSTM layer saves and transfers the information of the previous time step to the current time step through the recurrent connection of the hidden layer, processing data with time series dependency; The convolution layer is used to integrate the features in the energy spectrum data, perform local connections and weight sharing; The Regression layer is used to define the loss function layer of the regression problem, compare the predicted nuclide energy spectrum with the true nuclide energy spectrum, and calculate the loss value to update the network weights and biases to optimize the model performance.
[0009] Furthermore, the hidden state length of the LSTM layer is 100; the learning rate is 0.001, and the learning rate is adjusted according to the number of learning times. After every 10 rounds of training, the learning rate is selectively multiplied by 0.5 according to the training effect; and the regularization parameter is 0.001.
[0010] Furthermore, the Regression layer uses the root mean square error as the loss function.
[0011] Furthermore, the specific structure of the tth neuron in the LSTM layer is A t , A t The specific working principle of neurons is expressed by the following mathematical equation: ; ; ; ; ; ; In the formula, f t A t The forget gate of the neuron, W f and b f are all learnable parameters of the forget gate; σ is the Sigmoid function; a t-1 is the output value of the previous neuron; i t A t The input gate of the neuron, W i and b i These are all learnable parameters of the input gate; The new candidate value vector created for the tanh layer, W c and b c are all learnable parameters; x t is the input value of the network at time t; o t A t The output gate of the neuron, W o and b o are all learnable parameters of the output gate; c t-1 is the long-term memory information output by the previous neuron, c t For passing A t Long-term memory information after neurons are updated; a t A t The output value of the neuron.
[0012] Compared with the prior art, the present invention has the following beneficial effects: The LSTM-based gamma spectrum correction method for lanthanum bromide detectors effectively solves the problems of spectral background, spectral line drift and noise in the data collected by the gamma spectrometer of the lanthanum bromide detector. The method uses the memory and processing capabilities of the LSTM network to achieve fast and stable correction of the gamma spectrum, including spectral line drift correction, noise correction and background correction. Through this process, the nuclide spectral lines used to determine the characteristic peaks and peak areas of radioactive nuclides can be quickly obtained, thereby significantly reducing the interference of human factors in spectral data processing and improving the accuracy and efficiency of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 Flow chart of the method of the present invention.
[0014] Figure 2 It is a framework flow chart of the method of the present invention.
[0015] Figure 3 This is a comparison chart between the predicted nuclide energy spectrum of the LSTM network model and the actual nuclide energy spectrum after actual correction.
[0016] Figure 4 This is a diagram of the preprocessing process of the measured original energy spectrum.
[0017] Figure 5 This is a comparison chart of the measured original energy spectrum and the measured nuclide energy spectrum before and after preprocessing.
[0018] Figure 6 This is a diagram of the preprocessing process for simulating the nuclide energy spectrum.
[0019] Figure 7 This is a comparison chart between the simulated nuclide energy spectrum and the simulated original spectrum after preprocessing.
[0020] Figure 8 This is a schematic diagram of the basic framework of the LSTM network model.
[0021] Fig. 9 This is a schematic diagram of the specific structure of the neural network of the LSTM layer.
[0022] Fig.10 This is the loss curve of the LSTM network model training process.
[0023] Fig.11 This is the RMSE curve of the LSTM network model training process. DETAILED DESCRIPTION
[0024] In order to have a clearer understanding of the technical features, purposes and beneficial effects of the present invention, the technical solution of the present invention is now described in detail below, but it should not be construed as limiting the applicable scope of the present invention.
[0025] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments.
[0026] An embodiment of the present invention provides a LSTM-based gamma spectrum correction method for a lanthanum bromide detector, and its flow chart and framework flow chart are respectively as follows: Figure 1 and Figure 2 As shown, the method comprises the following steps: Step S1: Perform data preparation and pre-processing for the lanthanum bromide detector gamma spectrometer, including the following sub-steps: Step S11: preprocessing the measured original energy spectrum of the lanthanum bromide detector gamma spectrometer, including spectral line drift correction, noise correction and background correction, to obtain the corresponding measured nuclide energy spectrum.
[0027] The original spectral line data collected by the gamma spectrometer of the lanthanum bromide detector consists of two parts: the nuclide energy spectrum and the background energy spectrum. The nuclide energy spectrum is the key data required to obtain the content of radioactive elements, while the background energy spectrum is a natural background caused by the superposition of spectral lines caused by the Compton scattering effect, the low-energy tailing caused by the small-angle scattering of gamma rays in the sensitive volume of the detector, and cosmic rays, electronic noise and other factors. The existence of the background will make the gamma spectrum line overall higher and will cover some weak peaks, resulting in a great difference between the measured value and the true value, so correction is required. At the same time, affected by factors such as the instrument status and the instrument operating environment, the collected original energy spectrum data may have spectral line drift, causing the characteristic peak to deviate from the energy channel to which it belongs, causing a great error in the final result, so drift correction is required. Noise is a measurement error caused by statistical fluctuations during energy spectrum measurement. This error is often unavoidable, so appropriate noise reduction processing is required to reduce its impact on the analysis results. After the above steps, the nuclide energy spectrum in the original energy spectrum can be extracted. The measured original energy spectrum and the measured nuclide energy spectrum are used as the input and output of the LSTM network model training respectively.
[0028] Figure 4 The preprocessing process of the measured original energy spectrum is shown. The spectral line drift correction module in the figure can use spectral line drift correction based on the in-band technology and the invariance principle, spectral line drift correction based on correlation, or spectral line drift correction based on the fixed characteristic peak energy, etc. to identify abnormalities on all acquired energy spectra in turn, and correct the gamma energy spectrum with spectral line drift abnormalities to be the same as the normal spectrum. The spectral line denoising module can use NASVD denoising method, LS-SVM segmented denoising method or CUDA denoising method to perform denoising on all energy spectra after spectral drift correction in turn. The background correction module can use sensitive nonlinear background subtraction method, digital filter background subtraction method or background subtraction method based on multivariate statistical analysis, etc., to estimate and subtract the background of all energy spectra that have completed the denoising process in turn, and the final data obtained is the nuclide energy spectrum corresponding to the original energy spectrum. In the present invention, the spectral line drift correction based on correlation, the NASVD denoising method and the background subtraction method based on multivariate statistical analysis are used. The measured original energy spectrum before and after pretreatment and the measured nuclide energy spectrum are as follows: Figure 5 shown.
[0029] Step S12: simulate the nuclide energy spectrum data of the random radioactive element content, and add the background energy spectrum measured by the lanthanum bromide detector or simulated by the Monte Carlo method to the simulated nuclide energy spectrum, then add random Gaussian noise to each spectral line, and perform random spectral line drift to obtain the corresponding simulated original energy spectrum.
[0030] Since only the objects collected by the gamma spectrometer of the lanthanum bromide detector are used as training samples, the amount of data is relatively small. At the same time, due to the uncertainty of the instrument's operating state, it is difficult to determine the proportion of abnormal data in the original energy spectrum. If there are too few abnormal data in the acquired data, the corresponding abnormal correction information may not be learned during the training of the LSTM network model. Therefore, it is necessary to prepare a simulated energy spectrum with a higher proportion of abnormal data as a training object.
[0031] First, the radioactive element content in various rocks was simulated, including U 238 ,Th 232 , K 40 The nuclide energy spectrum of the main measurement object of the gamma spectrometer is as follows. Since each gamma energy spectrum inevitably has anomalies such as scattering background and environmental background, it is necessary to add the characteristic background data of the lanthanum bromide detector to all simulated nuclide energy spectra. This step can use the environmental background actually detected by the instrument or the instrument background simulated by the Monte Carlo method. On this basis, random Gaussian noise is added to simulate the noise generated by the instrument due to factors such as temperature changes, electronic equipment interference and cosmic rays. Finally, 20% of the data are randomly selected for random spectral line drift of about 5 lines before and after, simulating the spectral line drift caused by temperature effects, component aging, and measurement instability in the measurement of the gamma spectrometer of the lanthanum bromide detector. The simulated original energy spectrum finally obtained is used as the input for LSTM network model training, and the simulated nuclide energy spectrum is used as the output.
[0032] Figure 6 The preprocessing process of simulating the nuclide energy spectrum is shown. In the figure, the background simulation module obtains the environmental background actually detected by the instrument or simulates the background spectrum line by the Monte Carlo method and adds it to the energy spectrum line. The energy spectrum adds a random noise module by adding a random noise signal to the simulated nuclide energy spectrum after adding the background. Since the gamma energy spectrum data consists of a pure signal and a Gaussian white noise signal, in which the noise signal is not related to the intensity of the sampling signal, the gamma energy spectrum can be simulated by adding random Gaussian noise. The random spectral line drift simulation module aims to artificially increase the proportion of spectral line drift anomalies in the test data set and enhance the LSTM network model's ability to identify and process spectral line drift. By randomly selecting 20% of the spectral lines, a random +5 to -5 spectral line drift process is performed to achieve spectral line drift simulation. The data set obtained after the above steps is the original energy spectrum corresponding to the simulated nuclide energy spectrum. In the simulation process of the present invention, the measured environmental background and Gaussian noise are added, and a spectral line drift process of 1 channel is performed. The simulated nuclide energy spectrum and the simulated original energy spectrum obtained after preprocessing are as follows Figure 7 shown.
[0033] Step S2: construct an LSTM network model, train and test the LSTM network model, and adjust the model parameters to ensure that it can accurately correct the original energy spectrum.
[0034] The specific process of step S2 is: constructing an LSTM network model, taking the measured original energy spectrum and the simulated original energy spectrum obtained in step S1 as the input of the LSTM network model, taking the measured nuclide energy spectrum and the simulated nuclide energy spectrum as the output of the LSTM network model, the measured energy spectrum and the simulated energy spectrum both account for 50% of the training set data volume, and training and testing the model; adjusting the learnable parameters and hyperparameters of the model according to the training results to ensure that the model can accurately correct the original energy spectrum.
[0035] The LSTM network model includes LSTM layer, convolution layer and regression layer. Figure 8 The figure is a basic framework diagram of the LSTM network model. The LSTM layer saves and transfers the information of the previous time step to the current time step through the cyclic connection of the hidden layer, thereby processing data with time series dependency. The hidden state length of the LSTM layer is set to 100; the learning rate is set to 0.001, and the learning rate is adjusted according to the number of learning times. After every 10 rounds of training, the learning rate is selectively multiplied by 0.5 according to the training effect (you can also choose not to change the learning rate or terminate early to shorten the training time of the model); to avoid overfitting, the regularization parameter is set to 0.001. The convolution layer is used to integrate the features in the energy spectrum data, perform local connections and weight sharing, which can reduce the number of parameters and improve training efficiency. The regression layer is used to define the loss function layer of the regression problem. It compares the predicted nuclide energy spectrum with the output nuclide energy spectrum and calculates the loss value. It is used to update the weights and biases of the network to optimize the model performance. The regression layer uses the root mean square error (RMSE) as the loss function.
[0036] Fig. 9The figure is a schematic diagram of the specific structure of the neural network of the LSTM layer in the LSTM network model. The LSTM network is a special recurrent neural network (RNN). The goal of RNN design is to process and analyze sequence data. Unlike traditional feedforward neural networks, RNN has a recurrent connection, allowing information to be transmitted cyclically in the network. Its characteristic is that it can use the previous input information to affect the current output information, thereby capturing the temporal relationship in the sequence data. It can use the output of the previous time step as the input of the current time step, thereby introducing a memory mechanism for the neural network, so that RNN can process sequence data of any length and can predict or generate each element in the sequence. However, RNN is prone to gradient disappearance or gradient explosion problems when processing long sequences, resulting in the model being unable to effectively learn long-term information. LSTM is designed to avoid long-term dependency problems. It is different from the simple structure of RNN where each neuron is composed of only one layer of tanh activation function, but has a four-layer neural structure (forget gate, input gate, candidate value vector and output gate).
[0037] Fig. 9 Middle A t is the specific structure of the tth neuron in the LSTM layer, A t-1 and A t+1 are the previous and next neurons respectively, and A t They have exactly the same structure, so they will not be shown repeatedly. In the neurons of the LSTM layer, σ1 represents the Sigmoid neural network layer of the forget gate, which is used to decide what information to discard from the previous input and the current input; σ2 represents the Sigmoid neural network layer of the input gate, which decides what information to update for the current module, and then creates a new candidate value vector through the tanh neural network layer, and finally multiplies the output of the Sigmoid with the output of the tanh to decide which information is important and needs to be retained; σ3 represents the Sigmoid neural network layer of the output gate, which determines what information the current neuron outputs. In addition, the memory unit running through the top of the LSTM is used to store and update long-term memory information. It controls the flow of information through the forget gate, input gate, and output gate mechanism, thereby capturing long-term dependencies. Through the above structure, LSTM can overcome the problem that traditional RNN cannot have long-term memory, making it more suitable for the correction of gamma spectrum data with irregular abnormal information. A t The specific working principle of neurons can be expressed by the following mathematical equation: ; ; ; ; ; ; In the formula, f t A t The forget gate of the neuron, W f and b f are all learnable parameters of the forget gate; σ is the Sigmoid function; a t-1 is the output value of the previous neuron; i t A t The input gate of the neuron, W i and b i These are all learnable parameters of the input gate; The new candidate value vector created for the tanh layer, W c and b c are all learnable parameters; x t is the input value of the network at time t; o t A t The output gate of the neuron, W o and b o are all learnable parameters of the output gate; c t-1 is the long-term memory information output by the previous neuron, c t For passing A t Long-term memory information after neurons are updated; a t A t The output value of the neuron.
[0038] Fig.10 and Fig.11 They are the loss curve and RMSE curve of the LSTM network model training process. It can be seen from the figure that after 15,000 iterations, the prediction results of the model are relatively stable, the loss number is close to 0, and the RMSE value is stable at around 1, indicating that the prediction results of the model are relatively accurate.
[0039] Step S3: Import the unknown measured original energy spectrum data of the lanthanum bromide detector gamma spectrometer into the trained LSTM network model to predict the corresponding nuclide energy spectrum data.
[0040] The trained LSTM network model is deployed in practical applications. The trained LSTM network model is used to correct any unprocessed measured original energy spectrum with noise and spectral line drift problems. The obtained predicted nuclide energy spectrum is compared with the nuclide energy spectrum after artificial spectral line drift correction, background correction and noise correction (i.e., the real nuclide energy spectrum). The results are as follows: Figure 3As shown, it can be seen that the predicted nuclide energy spectrum of the LSTM network model is highly consistent with the actual nuclide energy spectrum after actual correction, indicating that it can complete the tasks of gamma energy spectrum fast line drift correction, background correction and noise correction.
[0041] The above are only preferred embodiments of the present invention. It should be pointed out that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention. These should also be regarded as the protection scope of the present invention. These will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A gamma spectrum correction method for lanthanum bromide detector based on LSTM, characterized in that: The following steps are involved: Step S1: Perform data preparation and pre-processing for the lanthanum bromide detector gamma spectrometer, including the following sub-steps: Step S11: preprocessing the measured original energy spectrum of the lanthanum bromide detector gamma spectrometer, including spectral line drift correction, noise correction and background correction, to obtain the corresponding measured nuclide energy spectrum; Step S12: simulating the nuclide energy spectrum data of the random radioactive element content, and adding the background energy spectrum measured by the lanthanum bromide detector or simulated by the Monte Carlo method to the simulated nuclide energy spectrum, then adding random Gaussian noise to each spectral line, and performing random spectral line drift to obtain the corresponding simulated original energy spectrum; Step S2: construct an LSTM network model, and train and test the LSTM network model; Step S3: Import the unknown measured original energy spectrum data of the lanthanum bromide detector gamma spectrometer into the trained LSTM network model to predict the corresponding nuclide energy spectrum data.
2. The LSTM-based gamma spectrum correction method for lanthanum bromide detectors according to claim 1, characterized in that: In step S12, 20% of the data are randomly selected to perform random spectral line drift of about 5 lines before and after.
3. The LSTM-based gamma spectrum correction method for lanthanum bromide detector according to claim 1, characterized in that: The specific process of step S2 is: constructing an LSTM network model, taking the measured original energy spectrum and the simulated original energy spectrum obtained in step S1 as the input of the LSTM network model, and taking the measured nuclide energy spectrum and the simulated nuclide energy spectrum as the output of the LSTM network model, the measured energy spectrum and the simulated energy spectrum both account for 50% of the training set data volume, and training and testing the model.
4. The LSTM-based gamma spectrum correction method for lanthanum bromide detector according to claim 3, characterized in that: The LSTM network model includes an LSTM layer, a convolution layer and a regression layer; The LSTM layer saves and transfers the information of the previous time step to the current time step through the recurrent connection of the hidden layer, processing data with time series dependency; The convolution layer is used to integrate the features in the energy spectrum data, perform local connections and weight sharing; The Regression layer is used to define the loss function layer of the regression problem, compare the predicted nuclide energy spectrum with the true nuclide energy spectrum, and calculate the loss value to update the network weights and biases to optimize the model performance.
5. The LSTM-based gamma spectrum correction method for lanthanum bromide detector according to claim 4, characterized in that: The hidden state length of the LSTM layer is 100; the learning rate is 0.001, and the learning rate is adjusted according to the number of learning times. After every 10 rounds of training, the learning rate is selectively multiplied by 0.5 according to the training effect; the regularization parameter is 0.
001.
6. The gamma spectrum correction method for lanthanum bromide detector based on LSTM according to claim 4, characterized in that: The Regression layer uses the root mean square error as the loss function.
7. The gamma spectrum correction method for lanthanum bromide detector based on LSTM according to claim 4, characterized in that: The specific structure of the tth neuron in the LSTM layer is A t , A t The specific working principle of neurons is expressed by the following mathematical equation: ; ; ; ; ; ; In the formula, f t A t The forget gate of the neuron, W f and b f are all learnable parameters of the forget gate; σ is the Sigmoid function; a t-1 is the output value of the previous neuron; i t A t The input gate of the neuron, W i and b i These are all learnable parameters of the input gate; The new candidate value vector created for the tanh layer, W c and b c are all learnable parameters; x t is the input value of the network at time t; o t A t The output gate of the neuron, W o and b o are all learnable parameters of the output gate; c t-1 is the long-term memory information output by the previous neuron, c t For passing A t Long-term memory information after neurons are updated; a t A t The output value of the neuron.
Citation Information
Patent Citations
Energy spectrum analysis method based on Hilbert curve transformation and depth learning
CN109063741A
Nuclide identification method
CN111308543A
Nuclide content prediction method based on IGS
CN118098419A
Cited By
Nickel-based alloy element spectrum library construction method based on neural network, equipment and medium
CN120656601A