CN113960090A - LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method - Google Patents

LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method Download PDF

Info

Publication number
CN113960090A
CN113960090A CN202111205364.XA CN202111205364A CN113960090A CN 113960090 A CN113960090 A CN 113960090A CN 202111205364 A CN202111205364 A CN 202111205364A CN 113960090 A CN113960090 A CN 113960090A
Authority
CN
China
Prior art keywords
neural network
soil
lstm neural
network algorithm
analysis method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111205364.XA
Other languages
Chinese (zh)
Inventor
赵彦春
李福生
杨婉琪
李铁山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yangtze River Delta Research Institute of UESTC Huzhou
Original Assignee
Yangtze River Delta Research Institute of UESTC Huzhou
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yangtze River Delta Research Institute of UESTC Huzhou filed Critical Yangtze River Delta Research Institute of UESTC Huzhou
Priority to CN202111205364.XA priority Critical patent/CN113960090A/en
Publication of CN113960090A publication Critical patent/CN113960090A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/22Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by measuring secondary emission from the material
    • G01N23/223Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by measuring secondary emission from the material by irradiating the sample with X-rays or gamma-rays and by measuring X-ray fluorescence

Abstract

The invention discloses a soil Cd element spectrum qualitative analysis method based on an LSTM neural network algorithm, which is characterized by qualitatively judging whether cadmium element is contained in soil or not by adopting the LSTM neural network algorithm, taking spectrogram data actually measured by an XRF spectrum analyzer as a training matrix, then constructing an LSTM neural network model by utilizing Matlab software, establishing a relation between peak information of coherent elements and Cd element concentration, and carrying out example verification through a test sample to obtain a qualitative judgment result of the Cd element. Research shows that the qualitative trace element prediction method based on the LSTM neural network algorithm has important application value in the field of soil component detection.

Description

LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method
[ technical field ] A method for producing a semiconductor device
The invention belongs to the technical field of heavy metal element detection, and particularly relates to a soil Cd element spectrum qualitative analysis method based on an LSTM neural network algorithm.
[ background of the invention ]
In recent years, the heavy metal pollution condition of soil in China is great. Through investigation, the content of heavy metal elements in soil in China is continuously increased, the soil pollution area reaches five million mu, and particularly, elements such as Cadmium (cadnium, Cd), lead (Plumbum, Pb), Chromium (Chromium, Cr), Zinc (Zn), copper (Cuprum, Cu), mercury (Hydrargyrum, Hg) and the like have great influence on the soil. The heavy metal pollution of soil generally refers to the phenomenon that the content of heavy metal elements exceeds the standard value which can be borne by the soil. The detection problem of the heavy metal elements in the soil is closely related to human health, and how to simply and quickly determine the types of the heavy metals is very critical.
The essence of the solution spectrum algorithm is to analyze the different element types and the yields involved by the total spectrum based on the spectrum information of a standard spectrum database with a large amount of data information. The artificial neural network is a mathematical algorithm model capable of processing information, and is good at simulating the behavior characteristics of a biological neural network. Because the network has a self-learning function, the correct response can be directly output to the completely new input data according to the known information. The Duber Ministry of Du who was Mi, Youguie, the institute of Artificial Intelligence, Dalle Molle, 1997, proposed a long-term memory artificial neural network (LSTM) in the paper "vanishing gradient problem in recurrent neural networks and its solution", which is more efficient than the traditional Recurrent Neural Network (RNN). The LSTM algorithm can avoid long-term dependence, not only considers influence factors on time, but also solves the problem of long-sequence information loss, and is widely applied to the fields of mobile scenes, fault diagnosis, power dispatching and the like. Therefore, the invention provides a qualitative judgment method for Cd element in soil based on LSTM neural network algorithm by taking a national standard soil sample as an example, so as to realize the purpose of efficiently and accurately resolving spectrum.
[ summary of the invention ]
The invention provides a soil Cd element spectrum qualitative analysis method based on an LSTM neural network algorithm, which comprises the following specific technical scheme:
(1) detecting the content of soil elements in a sample by using an ED-XRF fluorescence spectrometer, sequentially putting the prepared soil sample into the ED-XRF, pressing an analysis sample key, and entering a sample determination window to obtain a spectrum chart;
(2) analyzing data by using an LSTM neural network algorithm, and establishing a relation between peak information of a plurality of coherent elements and the concentration of a target Cd element;
(3) inputting energy spectrum data measured by X-ray fluorescence spectroscopy, and extracting data points among alpha peak regions of six elements in the energy spectrum data as input information;
(4) randomly selecting part of samples as training data, and using the rest samples as test data;
(5) and (3) calculating by an LSTM neural network, combining long-term and short-term memories through gate control, continuously updating the cell state, and finally obtaining a qualitative judgment output result of the Cd element, wherein if the output is 1, the Cd element is contained, and if the output is-1, the Cd element is not contained.
Further, the sample described in step (1) was 59 parts.
Further, the test conditions for detecting the content of the soil elements in the sample by using the ED-XRF fluorescence spectrometer in the step (1) are as follows: the acquisition time is 90s, the light pipe voltage is 45kV, and the light pipe voltage is 25 uA.
Further, the content of the soil elements of the samples in the step (1) is measured under the same experimental conditions.
Further, the peak information in step (2) is normalized count rate.
Further, the six elements in the step (3) are V, Zn, Ag, Cd, Sb and Pb.
Further, in the step (4), 45 samples are randomly selected as training data, and the remaining 12 samples are used as test data.
The invention has the following beneficial effects:
the method adopts an LSTM neural network algorithm to qualitatively judge whether the soil contains cadmium elements, uses spectrogram data actually measured by an XRF spectrum analyzer as a training matrix, then utilizes Matlab software to construct an LSTM neural network model, establishes a relation between peak information of coherent elements and Cd element concentration, and performs example verification through a test sample to obtain a qualitative judgment result of Cd elements. Research shows that the qualitative trace element prediction method based on the LSTM neural network algorithm has important application value in the field of soil component detection.
[ description of the drawings ]
FIG. 1 is a block diagram of a door;
FIG. 2 is a LSTM forgetting gate diagram;
FIG. 3 is a diagram of an LSTM input gate;
FIG. 4 is a state diagram of an LSTM update unit;
FIG. 5 is a diagram of an LSTM output gate;
FIG. 6 is a graph of soil sample energy spectrum information;
FIG. 7 is a diagram of a concept framework based on the LSTM neural network algorithm;
FIG. 8 is a diagram of qualitative judgments of six groups of random samples based on the LSTM neural network.
Wherein (a) is a qualitative judgment result graph of a first group of samples; (b) a qualitative judgment result graph of a second group of samples is obtained; (c) a third group of samples is taken as a qualitative judgment result graph; (d) a qualitative judgment result chart for the fourth group of samples; (e) a qualitative judgment result graph of a fifth group of samples; (f) and a qualitative judgment result graph of the sixth group of samples.
[ detailed description ] embodiments
In order to facilitate a better understanding of the invention, the following examples are given to illustrate, but not to limit the scope of the invention.
LSTM neural network algorithm
At time t, there are three inputs to the LSTM: input value X of the network at the present momenttLast time LSTM output value ht-1Last cell state Ct-1. The output of the LSTM is two: current time LSTM output value htAnd cell state C at the current timet. The LSTM removes or adds information to the cell is implemented by a "gate" structure. The gate is composed of a sigmoid neural network layer and a dot product, and is a selective information passing method, and the structure is shown in figure 1.
The gate is equivalent to a fully connected layer with the vector as input and the real vector between 0 and 1 as output. Assuming W is the weight vector of the gate, b is the bias term, and gate expression (1) is:
g(x)=σ(Wx+b) (1)
the value between 0 and 1 of the sigmoid layer output represents how much of each part can pass through. 0 means no passage of any amount, 1 means passage of any amount, and LSTM protects and controls the state of the cell using three "gates" structure.
(1) Forget the door: cell state C at time t-1 is determinedt-1How much to keep current time CtForget the gate expression, see equation 2. The structure of the forgetting door is shown in fig. 2.
ft=σ(Wf·[ht-1,xt]+bf) (2)
In the formula, WfIs a weight matrix, [ h ]t-1,xt]Meaning that the hidden layer output of the previous unit and the current input are spliced into a vector, bfFor the bias term, σ is the sigmoid function.
(2) An input gate: it is decided how much new information to add to the cell state. First, the sigmoid layer decides what value we are going to update, and then each tanh layer creates a new candidate vector to be added to the state, and the input gate structure is shown in fig. 3, and its expressions are shown in equations 3 and 4.
it=σ(Wi·[ht-1,xt]+bi) (3)
Figure BDA0003306665280000041
In the formula itIndicating the partial value to be updated for the current input,
Figure BDA0003306665280000042
representing a new candidate vector in the cell state, WiAnd WCAre respectively a weight matrix, biAnd bcRespectively, the bias terms, and sigma is a sigmoid function.
(3) Updating the cell state of the cell: ct-1Is updated to Ct. C, taking the old state with ftMultiplication is performed to discard useless information, and a new candidate value is added, and the cell state is updated according to the update degree of each state, as shown in fig. 4, and the expression is shown in formula 5.
Figure BDA0003306665280000043
In the formula, CtIs the current cell state, Ct-1The cell state at the previous time.
(4) An output gate: an output value is determined. Firstly, a sigmoid layer is operated to determine the part of the cell which needs to be output, and then the state of the cell is processed by tanh to obtain a value between-1 and 1. The value is multiplied by the output of the sigmoid gate, which is shown in fig. 5 and whose expression is shown in equation 6, to finally output the portion that we determined the output.
ot=σ(Wo·[ht-1,xt]+bo) (6)
In the formula otRepresents the output value, WoAs a weight matrix, boIs the bias term.
(5) The LSTM unit finally outputs the expression, see equation 7.
ht=ot*tanh(Ct) (7)
(II) instruments and experiments
To meet the experimental requirements, a TS-XH4000-P model hand-held X-fluorescence analyzer (using a DPX acquisition plate) from Taikelong energy technology, Zhejiang was used in the experiment. The test conditions were: an SDD probe and a silver anode X-ray tube are adopted to install an Ag target, the collection time is 90s, the light tube voltage is 45kV, and the light tube voltage is 25uA, and 59 soil standard samples are respectively tested. The content of soil elements in 59 samples is measured by an ED-XRF fluorescence spectrometer under the same experimental conditions, the prepared soil samples are sequentially placed into the ED-XRF, an analysis sample key is pressed, a sample measuring window is entered, and the obtained spectrum is shown in figure 6.
(III) analysis of the results of the experiment
The data are analyzed by using an LSTM neural network algorithm, the relation between the peak information (normalized counting rate) of a plurality of coherent elements and the concentration of a target element (Cd) is established, and an idea frame based on the LSTM neural network algorithm is shown in FIG. 7. Firstly, energy spectrum data measured by X-ray fluorescence spectrum are input, and alpha peak region data points of six elements of V, Zn, Ag, Cd, Sb and Pb in the energy spectrum data are extracted as input information.
The total number of samples is 57, 45 samples are randomly selected as training data, and the rest 12 samples are used as test data. And through calculation of an LSTM neural network, long-term and short-term memory is combined through gate control, the cell state is continuously updated, and finally the qualitative judgment output result of the Cd element is obtained. If the output is 1, this element is indicated, otherwise it is-1.
The number of nodes of the network, the number of network layers, the loss function and the threshold value are set first. The LSTM neural network is a three-layer network, specifically: the number of input gate nodes and the number of nodes for updating the cell state of the LSTM layer are both 47, the number of output gate nodes is 12, and the outputmode selects sequence to one. Since the research is used for qualitatively judging whether Cd element exists or not, belongs to classification research and is defined as-1 or 1, the parameter of the full connection layer is selected to be 2. Because classification is performed, and regression is not performed, the softmax layer is mainly responsible for outputting the probability of each type of discrimination. The loss function adopts RMSE root mean square loss error to carry out error calculation of data prediction, and the proportion is adjusted to adapt to the network by continuously updating the weights of the input gate, the forgetting gate and the output gate, thereby finally achieving the best prediction effect.
The input layer is alpha peak information of six neurons corresponding to six elements, and the output layer is one neuron corresponding to Cd element. The LSTM neural network is used to analyze the energy spectrum data, and six sets of qualitative judgment results are arbitrarily selected as shown in fig. 8.
The dots with solid lines represent that the judgment result is consistent with the actual result, namely the judgment is correct; the dot with the dotted line represents that the judgment result is inconsistent with the actual judgment result, i.e. the judgment is wrong. After 100 experiments, the accuracy rate is about 96%, and the calculation time is about 6 seconds. The LSTM algorithm incorporates a "processor cell" that determines whether the information is useful or not. An input gate, a forgetting gate and an output gate are arranged in one cell, and the number of the input gates, the forgetting gates and the output gates is three. The LSTM algorithm effectively solves the problem of long-term dependence, has very high universality and has the highest prediction precision.
(IV) conclusion
The invention mainly develops research aiming at the application of the LSTM long-time memory neural network in spectral analysis, because the cell state is updated when the LSTM algorithm trains the network each time, a gate structure mode is adopted to remove or add information to the cell, and different weight values and threshold values can generate different network prediction results. And (3) constructing an LSTM neural network by utilizing Matlab software, and performing experimental simulation by writing program codes to finally output whether the element Cd exists or not. The qualitative judgment model of the Cd element in the soil based on the LSTM neural network shows a very good judgment effect through example verification. Therefore, the LSTM neural network algorithm is applied to qualitative judgment of the Cd element in the soil, and has great significance.
While the invention has been described in further detail with reference to specific preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (7)

1. A soil Cd element spectrum qualitative analysis method based on an LSTM neural network algorithm is characterized by comprising the following steps:
(1) detecting the content of soil elements in a sample by using an ED-XRF fluorescence spectrometer, sequentially putting the prepared soil sample into the ED-XRF, pressing an analysis sample key, and entering a sample determination window to obtain a spectrum chart;
(2) analyzing data by using an LSTM neural network algorithm, and establishing a relation between peak information of a plurality of coherent elements and the concentration of a target Cd element;
(3) inputting energy spectrum data measured by X-ray fluorescence spectroscopy, and extracting data points among alpha peak regions of six elements in the energy spectrum data as input information;
(4) randomly selecting part of samples as training data, and using the rest samples as test data;
(5) and (3) calculating by an LSTM neural network, combining long-term and short-term memories through gate control, continuously updating the cell state, and finally obtaining a qualitative judgment output result of the Cd element, wherein if the output is 1, the Cd element is contained, and if the output is-1, the Cd element is not contained.
2. The LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method according to claim 1, wherein the sample in step (1) is 59 parts.
3. The LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method according to claim 1, wherein the test conditions of detecting the soil element content of the sample by using an ED-XRF fluorescence spectrometer in the step (1) are as follows: the acquisition time is 90s, the light pipe voltage is 45kV, and the light pipe voltage is 25 uA.
4. The LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method according to claim 1, wherein in the step (1), the sample is used for measuring the content of the soil element under the same experimental conditions.
5. The LSTM neural network algorithm-based soil Cd element spectral qualitative analysis method according to claim 1, wherein the peak information in step (2) is normalized count rate.
6. The LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method according to claim 1, wherein the six elements in the step (3) are V, Zn, Ag, Cd, Sb, Pb.
7. The LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method according to claim 1, wherein 45 samples are randomly selected as training data in the step (4), and the remaining 12 samples are used as test data.
CN202111205364.XA 2021-10-15 2021-10-15 LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method Pending CN113960090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111205364.XA CN113960090A (en) 2021-10-15 2021-10-15 LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111205364.XA CN113960090A (en) 2021-10-15 2021-10-15 LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method

Publications (1)

Publication Number Publication Date
CN113960090A true CN113960090A (en) 2022-01-21

Family

ID=79464189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111205364.XA Pending CN113960090A (en) 2021-10-15 2021-10-15 LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method

Country Status (1)

Country Link
CN (1) CN113960090A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116539647A (en) * 2023-04-10 2023-08-04 电子科技大学 Trace element content prediction method based on hierarchical deep neural network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190294758A1 (en) * 2018-03-26 2019-09-26 Uchicago Argonne, Llc Identification and localization of rotational spectra using recurrent neural networks
CN112231621A (en) * 2020-10-13 2021-01-15 电子科技大学 Method for reducing element detection limit based on BP-adaboost
CN112733725A (en) * 2021-01-12 2021-04-30 西安电子科技大学 Hyperspectral image change detection method based on multistage cyclic convolution self-coding network
CN113168890A (en) * 2018-12-10 2021-07-23 生命科技股份有限公司 Deep base recognizer for Sanger sequencing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190294758A1 (en) * 2018-03-26 2019-09-26 Uchicago Argonne, Llc Identification and localization of rotational spectra using recurrent neural networks
CN113168890A (en) * 2018-12-10 2021-07-23 生命科技股份有限公司 Deep base recognizer for Sanger sequencing
CN112231621A (en) * 2020-10-13 2021-01-15 电子科技大学 Method for reducing element detection limit based on BP-adaboost
CN112733725A (en) * 2021-01-12 2021-04-30 西安电子科技大学 Hyperspectral image change detection method based on multistage cyclic convolution self-coding network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
沈沁梅;周卫东;李科学;: "基于遗传神经网络的激光诱导击穿光谱元素定量分析技术", 中国激光, no. 03 *
王春宇;徐珊珊;郭茂祖;车凯;刘晓燕;: "基于Convolutional-LSTM的蛋白质亚细胞定位研究", 计算机科学与探索, no. 06 *
莫堃 等: "基于LSTM神经网络算法的大型筒体原材料钛元素定性分析", 数字技术与应用, vol. 39, no. 8, pages 93 - 98 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116539647A (en) * 2023-04-10 2023-08-04 电子科技大学 Trace element content prediction method based on hierarchical deep neural network
CN116539647B (en) * 2023-04-10 2024-01-23 电子科技大学 Trace element content prediction method based on hierarchical deep neural network

Similar Documents

Publication Publication Date Title
CN101915753B (en) Method for laser induced breakdown spectroscopy based on genetic neural network
CN108268935B (en) PM2.5 concentration value prediction method and system based on time sequence recurrent neural network
CN112687374B (en) Psychological crisis early warning method based on text and image information joint calculation
Bongiorno et al. Exploring the use of machine learning for interpreting electrochemical impedance spectroscopy data: evaluation of the training dataset size
CN113011796B (en) Edible oil safety early warning method based on' analytic hierarchy process-neural network
CN107844870B (en) Soil heavy metal content prediction method based on Elman neural network model
CN113960090A (en) LSTM neural network algorithm-based soil Cd element spectrum qualitative analysis method
CN114166509A (en) Motor bearing fault prediction method
CN114330815A (en) Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)
CN113989550A (en) Electric vehicle charging pile operation state prediction method based on CNN and LSTM hybrid network
CN117391463A (en) River pollution tracing method
Hoomod et al. Temperature Prediction Using Recurrent Neural Network for Internet of Things Room Controlling Application
CN114839210A (en) XRF element quantitative analysis method based on SSA-BP neural network
CN114492199A (en) Method and system for analyzing performance of voltage transformer, electronic equipment and medium
Tran-Quang et al. Aquaculture environment prediction based on improved lstm deep learning model
CN113567375A (en) Self-adaptive multi-metal ion concentration regression prediction method and system based on linear feature separation
Alrubaie Cascade-Forward neural network for volterra integral equation solution
Bi et al. Multi-indicator Water Time Series Imputation with Autoregressive Generative Adversarial Networks
Sulaiman et al. Classification of healthy and white root disease infected rubber trees based on relative permittivity and capacitance input properties using LM and SCG artificial neural network
Xianjiang et al. Quantitative detection for gas mixtures based on the adaptive genetic algorithm and BP network
CN111160419B (en) Deep learning-based electronic transformer data classification prediction method and device
CN116428129B (en) Fan blade impact positioning method and system based on attention mixing neural network
CN117334334B (en) Health risk prediction method, device, equipment and medium
CN112070761B (en) Prawn freshness nondestructive testing method based on deep learning
Xie et al. Minimal cost device calibration in spectral analysis via meta learning: Towards efficient deployment of deep neural networks in industry

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination