CN110705700A - Drift prediction method of soil temperature sensor - Google Patents
Drift prediction method of soil temperature sensor Download PDFInfo
- Publication number
- CN110705700A CN110705700A CN201910998346.8A CN201910998346A CN110705700A CN 110705700 A CN110705700 A CN 110705700A CN 201910998346 A CN201910998346 A CN 201910998346A CN 110705700 A CN110705700 A CN 110705700A
- Authority
- CN
- China
- Prior art keywords
- soil temperature
- neural network
- temperature sensor
- data
- layer
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Testing Or Calibration Of Command Recording Devices (AREA)
Abstract
The invention discloses a drift prediction method of a soil temperature sensor. The soil temperature has strong randomness and is influenced by various factors, so that the soil temperature sensor can generate drift, and the soil temperature prediction accuracy is high. According to the phenomenon, the prediction of future soil temperature values by using a recurrent neural network-long short-term memory (RecurrentNeralNet-Long short-term-TermMemory) model is provided aiming at the characteristics of sensor drift and the requirements on the accuracy and the real-time performance of soil temperature prediction. The method uses the RNN-LSTM deep neural network to predict the soil temperature basically consistent with the actual soil temperature, shows that the prediction method of the RNN-LSTM model has the characteristics of very high prediction precision and easy realization, and has ideal prediction effect.
Description
Technical Field
The invention relates to the technical field of sensor temperature drift prediction, in particular to a drift prediction method of a soil temperature sensor.
Background
At the present stage, with the great trend of artificial intelligence development in China, the soil temperature sensors in industries such as industry and agriculture influence the efficiency and benefit of enterprise development in the aspects of energy conservation, environmental protection, time saving and labor saving. In order to solve the problems of remote and severe environments and the convenience, high efficiency and economy of technical means, enterprises try to establish various new deep learning models and find the change rule of data and the internal quantity relationship, and the temperature drift problem of the soil temperature sensor is as follows:
(1) as the self parts of the sensor are used for a long time, the aging of the self components changes the performance parameters, the relation between input and output causes larger errors, the final result is influenced, the efficiency is reduced, the precision is improved, and the real-time problem is solved. There is also a certain external risk under certain extreme environmental conditions.
(2) In some particularly harsh environments, sensor maintenance or replacement is uneconomical and time consuming. Has direct connection to enterprise production.
Disclosure of Invention
In order to solve the problems, the invention provides a drift prediction method of a soil temperature sensor with small error, high efficiency and high precision, which comprises the following steps
Acquiring historical data of a soil temperature sensor;
carrying out normalization processing on the historical data;
dividing historical data into a training data set and a testing data set according to a proportion;
constructing an RNN-LSTM neural network by using a python platform;
training an RNN-LSTM neural network using the test data set;
and predicting the temperature drift of the soil temperature sensor by using the trained neural network.
Further, in the above-mentioned case,
the history data is processedThe normalization step uses the following formula for normalization, xk=(x-xmean)/xvarWherein x ismeanIs the mean of the data sequence, xvarIs the variance of the data, xkIs normalized data.
Further, in the above-mentioned case,
the RNN-LSTM neural network includes,
input layer x ═ x1,···,xt-1,xtSectional, h) and a hidden layer h (h)1,···,ht-1,htV, output layer o ═ o (o)1,···,ot-1,ot,···);
Wherein o ist=g(V*ht),
ht=f(U*xt+W*ht-1),
The input value of time t is xtT represents the time parameter of the time sequence, the second layer is a hidden layer, and the hidden layer state at the time point t is htWhere f is a nonlinear activation function, the last layer is the output layer, the output layer o at time tt;
The forgetting gate model is expressed by the following formula,
ft=σ(Wf·[ht-1,xt]+bf),
wherein Wf、bfRespectively representing the weight and bias of a forgetting gate;
the input gate and candidate gate models are represented using the following formulas,
it=σ(Wi·[ht-1,xt]+bi),
wherein Wi、WCRepresenting the respective weight, bi、bCRepresents the corresponding bias;
the model function of the memory cell is expressed by the following formula,
wherein C istIndicating the value of the status cell;
the output gate model is represented using the following formula:
ot=σ(Wo[ht-1,xt]+bo),
the final time-series output is expressed using the following equation:
ht=ot*tanh(Ct),
wherein Wo、boRepresenting the weight and bias of the output gate, respectively.
Further, in the above-mentioned case,
the LSTM neural network forgets to remember the gate according to reading ht-1And xtOutputs a value of 0 to 1 and feeds back the value to each in-cell state Ct-1The number in (1) indicates "completely retained" when the number is 1, and indicates "completely discarded" when the number is 0.
Further, in the above-mentioned case,
the neural network model uses a softmax activation function, a classification cross entropy loss function and an Adam optimization function to update model parameters, and the expression is as follows:
softmax activation function expression:
cross entropy loss function expression:
wherein y isiRepresenting the true classification result, aiRepresenting the ith output value of softmax.
Further, in the above-mentioned case,
the input data of the neural network input layer is normalized temperature, and the output data of the neural network is normalized temperature.
The invention has the beneficial effects that:
the technical scheme of the invention has the characteristics of very high prediction precision and easy realization, and the prediction effect is more ideal.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The invention discloses a drift prediction method of a soil temperature sensor. The soil temperature has strong randomness and is influenced by various factors, so that the soil temperature sensor can generate drift, and the soil temperature prediction accuracy is high. According to the phenomenon, the prediction of future soil temperature values by using a recurrent neural network-long short-term memory (RecurrentNeralNet-Long short-term-TermMemory) model is provided aiming at the characteristics of sensor drift and the requirements on the accuracy and the real-time performance of soil temperature prediction. The method comprises the steps of taking certain soil temperature historical data as input, preprocessing the historical data, establishing a drift prediction model of a soil temperature sensor, and realizing soil temperature prediction in one step in advance.
The technical scheme adopted by the invention is as follows: a drift prediction method of a soil temperature sensor is provided, the soil temperature sensor prediction method based on an RNN-LSTM neural network is provided, the neural network is established through a python platform, a training data set is input, and a network autonomously learns a drift prediction network model for predicting the temperature sensor.
As shown in fig. 1, the present invention provides a drift prediction method of a soil temperature sensor, the method comprising the steps of:
historical data of the soil temperature sensor is acquired.
And carrying out standard processing on the historical data.
The historical data is divided into a training data set and a testing data set according to a certain proportion.
The RNN-LSTM neural network is constructed using the python platform.
The RNN-LSTM neural network is trained with the data set.
And predicting the temperature drift of the soil temperature sensor by using the trained neural network.
In an embodiment of the present invention, the normalization process of the historical data includes;
the decimal between [0,1] is represented by the following formula;
xk=(x-xmean)/xvar
xmeanis the mean of the data sequence, xvarIs the variance of the data, xkIs normalized data.
In one embodiment of the present invention, the neural network includes an input layer x ═ x (x)1,···,xt-1,xtSectional, h) and a hidden layer h (h)1,···,ht-1,htV, output layer o ═ o (o)1,···,ot-1,ot,···)。
ot=g(V*ht)
ht=f(U*xt+W*ht-1)
Wherein the first layer is the input layer between the input layer and the hidden layer (denoted by U), the hidden layer and the output layer (denoted by V), the hidden layer and the hidden layer (denoted by W), and the input value at time t is xtT represents a time parameter of the time series; the second layer is a hidden layer with a hidden layer state h at time ttWherein f is a non-linear activation function; the last layer is an output layer, an output layer o at time tt。
The concrete relational expression of the forgetting door model is as follows:
ft=σ(Wf·[ht-1,xt]+bf)
wherein Wf、bfRepresenting the weight and bias of the forgetting gate, respectively.
The input gate and candidate gate models have specific relations:
it=σ(Wi·[ht-1,xt]+bi)
wherein Wi、WCRepresenting the respective weight, bi、bCRepresenting the corresponding bias.
Model function of memory cell:
wherein C istThe value of the status cell is indicated.
The output door model has the following specific relational expression:
ot=σ(Wo[ht-1,xt]+bo)
final output in time series:
ht=ot*tanh(Ct)
wherein Wo、boRepresenting the weight and bias of the output gate, respectively.
In one embodiment of the present invention, the LSTM neural network forgetting to remember the gate is based on reading ht-1And xtTo output a value of between 0 and 1 to each of the at-cell states Ct-1The numbers in (1). If the number is 1, it means "completely retained", and if the number is 0, it means "completely discarded".
In an embodiment of the present invention, the selection of the hyper-parameter includes a learning rate, a training batch, and a neuron number.
The learning rate is between 0 and 1, the training batch is 2800, and the number of neurons is 32.
In one embodiment of the invention, the model uses a softmax activation function, a classification cross entropy loss function (logarithmic loss function), and an Adam optimization function to update model parameters, and the expression is as follows:
softmax activation function expression:
cross entropy loss function expression:
wherein y isiRepresenting the true classification result. a isiRepresenting the ith output value of softmax.
In an embodiment of the present invention, the input data of the input layer of the neural network is a normalized temperature, and the output data of the neural network is a normalized temperature.
Although the present invention has been described in detail by way of the general description and the specific examples, the present invention solves the problem of the influence of the drift of the soil temperature sensor on the measurement, makes the data acquisition more convenient, solves the problem of the influence of the drift of the soil temperature sensor on the data, greatly improves the efficiency of the data acquisition, reduces the cost, and improves the data acquisition precision, but on the basis of the present invention, some modifications or improvements can be made, which will be obvious to those skilled in the art. Therefore, it is intended that the present invention cover such modifications and variations as fall within the true spirit of the invention.
Claims (6)
1. A method for predicting drift of a soil temperature sensor, the method comprising the steps of:
acquiring historical data of a soil temperature sensor;
carrying out normalization processing on the historical data;
dividing historical data into a training data set and a testing data set according to a proportion;
constructing an RNN-LSTM neural network by using a python platform;
training an RNN-LSTM neural network using the test data set;
and predicting the temperature drift of the soil temperature sensor by using the trained neural network.
2. The drift prediction method of a soil temperature sensor according to claim 1, wherein said step of normalizing said historical data uses the following formula for normalization,
xk=(x-xmean)/xvarwherein x ismeanIs the mean of the data sequence, xvarIs the variance of the data, xkIs normalized data.
3. The method of claim 2, wherein the RNN-LSTM neural network comprises,
input layer x ═ x1,…,xt-1,xt…), hidden layer h ═ h (h)1,…,ht-1,ht…), output layer o ═ o (o)1,…,ot-1,ot…); wherein o ist=g(V*ht),
ht=f(U*xt+W*ht-1),
The input value of time t is xtT represents the time parameter of the time sequence, the second layer is a hidden layer, and the hidden layer state at the time point t is htWhere f is a nonlinear activation function, the last layer is the output layer, the output layer o at time tt;
The forgetting gate model is expressed by the following formula,
ft=σ(Wf·[ht-1,xt]+bf),
wherein Wf、bfRespectively representing the weight and bias of a forgetting gate;
the input gate and candidate gate models are represented using the following formulas,
it=σ(Wi·[ht-1,xt]+bi),
wherein Wi、WCRepresenting the respective weight, bi、bCRepresents the corresponding bias;
the model function of the memory cell is expressed by the following formula,
wherein C istIndicating the value of the status cell;
the output gate model is represented using the following formula:
ot=σ(Wo[ht-1,xt]+bo),
the final time-series output is expressed using the following equation:
ht=ot*tanh(Ct),
wherein Wo、boRepresenting the weight and bias of the output gate, respectively.
4. The method of claim 3, wherein the LSTM neural network forgetting to gate is based on reading ht-1And xtOutputs a value of 0 to 1 and feeds back the value to each in-cell state Ct-1The number in (1) indicates "completely retained" when the number is 1, and indicates "completely discarded" when the number is 0.
5. The drift prediction method for the soil temperature sensor as claimed in claim 4, wherein the neural network model uses a softmax activation function, a classification cross entropy loss function, and an Adam optimization function to update model parameters, and the expression is as follows:
softmax activation function expression:
cross entropy loss function expression:
wherein y isiRepresenting the true classification result, aiRepresenting the ith output value of softmax.
6. The method of claim 5, wherein the input data to the neural network input layer is normalized temperature and the neural network output data is normalized temperature.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910998346.8A CN110705700A (en) | 2019-10-21 | 2019-10-21 | Drift prediction method of soil temperature sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910998346.8A CN110705700A (en) | 2019-10-21 | 2019-10-21 | Drift prediction method of soil temperature sensor |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110705700A true CN110705700A (en) | 2020-01-17 |
Family
ID=69201835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910998346.8A Pending CN110705700A (en) | 2019-10-21 | 2019-10-21 | Drift prediction method of soil temperature sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110705700A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111829693A (en) * | 2020-07-30 | 2020-10-27 | 成都运达科技股份有限公司 | Bearing temperature detection method and system based on LSTM model of time and space dimensions |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238900A (en) * | 2008-10-03 | 2011-11-09 | 拜尔健康护理有限责任公司 | System and method for predicting ambient temperature in a fluid analyte meter |
CN103063880A (en) * | 2012-12-21 | 2013-04-24 | 浙江大学 | Method of temperature drift estimating and compensating in scanning probe microscopy |
CN108803576A (en) * | 2018-07-24 | 2018-11-13 | 广东工业大学 | A kind of fault early warning method and relevant apparatus of temperature control system |
CN109685676A (en) * | 2018-10-11 | 2019-04-26 | 上海交通大学 | Intelligent liquid manure management method and system |
CN110210174A (en) * | 2019-06-21 | 2019-09-06 | 西南交通大学 | A kind of EMU axle box bearing temperature predicting method based on multilayer LSTM |
-
2019
- 2019-10-21 CN CN201910998346.8A patent/CN110705700A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238900A (en) * | 2008-10-03 | 2011-11-09 | 拜尔健康护理有限责任公司 | System and method for predicting ambient temperature in a fluid analyte meter |
CN103063880A (en) * | 2012-12-21 | 2013-04-24 | 浙江大学 | Method of temperature drift estimating and compensating in scanning probe microscopy |
CN108803576A (en) * | 2018-07-24 | 2018-11-13 | 广东工业大学 | A kind of fault early warning method and relevant apparatus of temperature control system |
CN109685676A (en) * | 2018-10-11 | 2019-04-26 | 上海交通大学 | Intelligent liquid manure management method and system |
CN110210174A (en) * | 2019-06-21 | 2019-09-06 | 西南交通大学 | A kind of EMU axle box bearing temperature predicting method based on multilayer LSTM |
Non-Patent Citations (1)
Title |
---|
付宇: "航空发动机进气道静电传感器理论与实验研究", 《中国优秀博硕士学位论文全文数据库(博士)工程科技II辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111829693A (en) * | 2020-07-30 | 2020-10-27 | 成都运达科技股份有限公司 | Bearing temperature detection method and system based on LSTM model of time and space dimensions |
CN111829693B (en) * | 2020-07-30 | 2021-10-22 | 成都运达科技股份有限公司 | Bearing temperature detection method and system based on LSTM model of time and space dimensions |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110414788B (en) | Electric energy quality prediction method based on similar days and improved LSTM | |
CN108764539B (en) | Upstream and downstream water level prediction method for cascade power station | |
CN111260136A (en) | Building short-term load prediction method based on ARIMA-LSTM combined model | |
CN110210993B (en) | Urban short-term gas load prediction method based on cyclic neural network model | |
CN111310965A (en) | Aircraft track prediction method based on LSTM network | |
CN111027772A (en) | Multi-factor short-term load prediction method based on PCA-DBILSTM | |
WO2021093362A1 (en) | Precision compensation method for discharge caustic alkali concentration measurement device during evaporation process | |
CN111638707B (en) | Intermittent process fault monitoring method based on SOM clustering and MPCA | |
CN111241755A (en) | Power load prediction method | |
CN114282443B (en) | Residual service life prediction method based on MLP-LSTM supervised joint model | |
CN112182954B (en) | LSTM-based fluid simulation data prediction model | |
CN113537469B (en) | Urban water demand prediction method based on LSTM network and Attention mechanism | |
CN114218872A (en) | Method for predicting remaining service life based on DBN-LSTM semi-supervised joint model | |
CN112330027A (en) | Search engine index-based power load prediction method | |
CN113722997A (en) | New well dynamic yield prediction method based on static oil and gas field data | |
CN113139605A (en) | Power load prediction method based on principal component analysis and LSTM neural network | |
CN115860177A (en) | Photovoltaic power generation power prediction method based on combined machine learning model and application thereof | |
CN114862032B (en) | XGBoost-LSTM-based power grid load prediction method and device | |
CN112508286A (en) | Short-term load prediction method based on Kmeans-BilSTM-DMD model | |
CN114595861A (en) | MSTL (modeling, transformation, simulation and maintenance) and LSTM (least Square TM) model-based medium-and-long-term power load prediction method | |
CN116703644A (en) | Attention-RNN-based short-term power load prediction method | |
CN110705700A (en) | Drift prediction method of soil temperature sensor | |
CN108710966B (en) | Photovoltaic power generation power prediction method based on multi-cluster ESN neural network | |
CN114239796A (en) | Power system state estimation method based on extended Kalman filtering | |
CN117113086A (en) | Energy storage unit load prediction method, system, electronic equipment and medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200117 |