CN112580539A - Long-term drift suppression method for electronic nose signals based on PSVM-LSTM - Google Patents
Long-term drift suppression method for electronic nose signals based on PSVM-LSTM Download PDFInfo
- Publication number
- CN112580539A CN112580539A CN202011544962.5A CN202011544962A CN112580539A CN 112580539 A CN112580539 A CN 112580539A CN 202011544962 A CN202011544962 A CN 202011544962A CN 112580539 A CN112580539 A CN 112580539A
- Authority
- CN
- China
- Prior art keywords
- psvm
- lstm
- long
- electronic nose
- network
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000007774 longterm Effects 0.000 title claims abstract description 26
- 230000001629 suppression Effects 0.000 title claims abstract description 20
- 238000012549 training Methods 0.000 claims abstract description 16
- 238000011478 gradient descent method Methods 0.000 claims abstract description 14
- 238000007781 pre-processing Methods 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 35
- 239000011159 matrix material Substances 0.000 claims description 24
- 239000002245 particle Substances 0.000 claims description 18
- 230000004044 response Effects 0.000 claims description 16
- 238000004364 calculation method Methods 0.000 claims description 8
- 230000015654 memory Effects 0.000 claims description 8
- 238000005457 optimization Methods 0.000 claims description 8
- 230000004913 activation Effects 0.000 claims description 6
- 230000007787 long-term memory Effects 0.000 claims description 5
- 230000006403 short-term memory Effects 0.000 claims description 5
- 238000013528 artificial neural network Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 claims description 4
- 239000012491 analyte Substances 0.000 claims description 3
- 238000012706 support-vector machine Methods 0.000 claims description 3
- 230000000306 recurrent effect Effects 0.000 claims description 2
- 238000012545 processing Methods 0.000 abstract description 6
- 230000015572 biosynthetic process Effects 0.000 abstract 1
- 238000012360 testing method Methods 0.000 description 11
- 230000001052 transient effect Effects 0.000 description 9
- CSCPPACGZOOCGX-UHFFFAOYSA-N Acetone Chemical compound CC(C)=O CSCPPACGZOOCGX-UHFFFAOYSA-N 0.000 description 4
- LFQSCWFLJHTTHZ-UHFFFAOYSA-N Ethanol Chemical compound CCO LFQSCWFLJHTTHZ-UHFFFAOYSA-N 0.000 description 4
- 238000012937 correction Methods 0.000 description 4
- 239000000126 substance Substances 0.000 description 4
- YXFVVABEGXRONW-UHFFFAOYSA-N Toluene Chemical compound CC1=CC=CC=C1 YXFVVABEGXRONW-UHFFFAOYSA-N 0.000 description 3
- 238000010801 machine learning Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 238000000513 principal component analysis Methods 0.000 description 3
- 238000001179 sorption measurement Methods 0.000 description 3
- VGGSQFUCUMXWEO-UHFFFAOYSA-N Ethene Chemical compound C=C VGGSQFUCUMXWEO-UHFFFAOYSA-N 0.000 description 2
- 239000005977 Ethylene Substances 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000033228 biological regulation Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000003795 desorption Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- QGZKDVFQNNGYKY-UHFFFAOYSA-N Ammonia Chemical compound N QGZKDVFQNNGYKY-UHFFFAOYSA-N 0.000 description 1
- 241000005398 Figaro Species 0.000 description 1
- IKHGUXGNUITLKF-XPULMUKRSA-N acetaldehyde Chemical compound [14CH]([14CH3])=O IKHGUXGNUITLKF-XPULMUKRSA-N 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000002790 cross-validation Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000002401 inhibitory effect Effects 0.000 description 1
- 230000005764 inhibitory process Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/02—Preprocessing
- G06F2218/04—Denoising
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- 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
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
-
- 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
- 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
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; Matching
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses an electronic nose signal long-term drift suppression method based on PSVM-LSTM, which comprises the following steps: 1. data preprocessing to obtain St(ii) a 2. Training data at time t to obtain PSVM classifier ft(x) Extracting f fromt(x) Parameter formation fN,t(ii) a 3. Repeating the first step and the second step, and carrying out the same treatment on the data sets of the electronic nose in the k time periods; 4. constructing an LSTM prediction model; 5. training the network model by adopting a momentum random gradient descent method; the PSVM classifier parameters trained in each short period are regarded as a moment signal of a long-period time sequence, and the state of the PSVM classifier at a certain future moment is implemented according to the current time sequence data and the previous time sequence dataThe time prediction and update are carried out, the LSTM network keeps useful parameter information such as long-term and stable parameters, and forgets that inconsistent information such as deviation caused by drift along with time is forgotten, so that the problems that the existing learner does not have long-period time sequence signal processing, cannot carry out real-time update along with the increase of long-term data, and is weak in adaptability and long-term stability are solved.
Description
Technical Field
The invention relates to the field of electronic nose signal and information processing, in particular to a PSVM-LSTM-based electronic nose signal long-term drift suppression method.
Background
The electronic nose is an intelligent device simulating a biological olfactory system, and can realize the identification of simple or complex odor by using signal characteristics such as a response spectrum of a gas sensor array. The method is simple to operate, quick and effective, and is suitable for field detection, so that the method is widely applied to the fields of environment, food, medical treatment and the like. Theoretically, the same concentration response of the electronic nose to the same gas under the same measurement conditions should be the same. However, in practical applications, the sensor of the electronic nose is continuously aged, degraded, poisoned, etc. with the increase of the usage time, so that the response signal gradually deviates from the value it should have, i.e. the time drift. This greatly reduces the performance of the electronic nose, not only the recognition accuracy is greatly reduced, but even the system becomes unreliable.
For the problem of electronic nose signal drift, existing suppression or compensation techniques can be summarized in three categories: component correction methods, adjustment compensation methods, and machine learning methods. The component correction method is the earliest method, which mainly finds the direction of signal drift through the space mapping transformation of response data and removes the components of the part, typically represented as Principal Component Analysis (PCA) and the variation KPCA thereof; however, the compensation concept of this method needs to be established when all data drifts are stable and consistent, which is greatly different from the actual drift situation. The second type is called regulation compensation method, which carries out differentiation regulation according to the signal characteristics (transient adsorption, steady-state response and transient desorption) of the electronic nose sensor at different stages; however, this method is easy to falsely determine the transient response as the drift of the sensor of the electronic nose which is changing sharply, and disturbs the original matching pattern characteristics of the electronic nose, so that the originally accurate measurement cannot be correctly identified after being compensated.
The third category is a machine learning method which is more concerned in recent years, and unlike the first two categories, the method does not calculate or explicitly describe the signal drift problem, but directly adjusts by means of a classifier obtained by training and learning of a large number of samples; the method overcomes the defects of a signal correction method or an adjustment compensation method, and has wider adaptability. In the prior art, ZL201110340596.6 and ZL201110340338.8 disclose an electronic nose drift suppression method and an online drift compensation method based on a multiple self-organizing neural network, respectively, which are learning methods for adaptively changing neural network parameters and structures by automatically searching for internal rules in a sample; zl201610245615.x discloses an electronic nose signal error adaptive learning method of a subband-space projection; ZL201610218450.7 and ZL201610216768.1 respectively disclose an electronic nose gas identification method based on source domain migration limit learning and target domain migration limit learning, and compensation and inhibition can be carried out on heterogeneous or drift data of an electronic nose; ZL201610120715.X also discloses an electronic nose drift compensation method based on deep belief network feature extraction, which is a network architecture and a method adopting large sample deep learning.
However, these methods still have significant drawbacks in practical electronic nose applications: these learners are trained by only building a mathematical relationship model between the "undisloated data set (or source domain)" and the "drifted data set (or target domain)" or building a correlation model after mapping the two data sets. 1) In the data sets, most of the processing or extracted features of the signals are static and discrete, and are rarely updated along with the increase of time, particularly the processing of long-period time series signals; 2) the learners with compensation capability cannot update in real time along with the increase of long-term data, namely, the newly acquired data set is difficult to be subjected to drift suppression; 3) in practical applications, these learners have better compensation effect in the current period, but have worse effect as time increases, and usually need to be retrained at intervals, and the time adaptivity and long-term stability are weak.
Disclosure of Invention
In order to solve the problems, the invention provides a PSVM-LSTM-based electronic nose long-term drift suppression method, which considers the PSVM classifier parameters or characteristics trained in each short time period as a time signal of a long-period time sequence, predicts and updates the state of the PSVM classifier at a certain time in the future in real time according to current and previous time sequence data, trains an LSTM network by using a momentum stochastic gradient descent method, so that the LSTM network retains useful parameter information such as long-term and stability, and forgets inconsistent information such as deviation caused by time drift, thereby achieving the purpose of suppressing the electronic nose signal drift, improving the long-term stability of the electronic nose, and having stronger real-time property and adaptability.
In order to achieve the above purpose, the invention adopts a technical scheme that:
the long-term drift suppression method for the electronic nose based on the PSVM-LSTM network comprises the following steps:
the method comprises the following steps: preprocessing the electronic nose data in the current time period, extracting the characteristics of the data set as input, and recording the label corresponding to the data set, namely the complete data set of the time period t can be represented as
Wherein,the ith electronic nose sample pair of the data set in the current t time period is shown, m is the number of the electronic nose samples, t belongs to {1,2, … k }, and k represents the total number of the time periods; at this time, the characteristic matrix and the label of the m electronic nose sensors in the time period t can be respectively recorded asAnd
step two: optimizing a vector machine by using a PSO particle swarm optimization algorithm to form a PSVM classifier, namely obtaining a penalty factor C and a radial basis function G in the vector machine classifier according to the PSO particle swarm optimization algorithm; data set S for current t time periodtTraining and learning to obtain PSVM scoreClass device ft(x) Extract the PSVM classifier ft(x) As a new feature matrix fN,t;
Step three: repeating the first step and the second step, and carrying out the same treatment on the data sets of the electronic nose in the k time periods;
step four: constructing a long-short term memory network prediction model, and obtaining the feature matrix f of each time period t from the step threeN,tAs characteristic input I of the long-short term memory networkn=[fN,1,fN,2,…fN,k]Delaying the feature matrix f by a time periodN,t+1As output O of the networkut=[fN,2,fN,3,…fN,k+1];
Step five: and (5) training the network model in the fourth step by adopting a momentum random gradient descent method until stable convergence is obtained.
Further, the penalty factor C and the radial basis function G in the second step are obtained by the following formulas:
Vi ω=θ·Vi ω+P1×τ×(Cω-μi ω)+P2×τ×(Gω-μi ω) (2)
where i is the number of particles (500 are used herein), ω is the number of iterations, θ is the inertia factor (non-negative), ViIs the particle velocity, P1And P2As a learning factor, muiτ is a random number in the range of (0, 1) for the current position of the particle.
Further, the data preprocessing in the first step mainly comprises noise reduction and normalization processing of a raw signal measured by the electronic nose sensor, wherein the raw signal comprises steady-state response characteristics and transient response characteristics of the sensor, and a processed signal characteristic valueThe method is in an n multiplied by 1 vector form, a certain time period t is a stable constant, the number m of samples is not less than 100, and the detected analyte, namely a label corresponding to a data set, adopts binary coding.
Further, the PSVM classifier f in the second stept(x) Adopting a multi-classification support vector machine based on a Gaussian kernel function, and the PSVM classifier ft(x) The model parameter is weight wtAnd bias btSo that the new feature matrix can be written as fN,t=[wt,bt]The weight value wtAnd bias btObtained by the following formula:
wherein alpha isiIs a Lagrangian multiplier, and alphai≥0;δiIs a relaxation variable; c is PSVM classifier ft(x) A penalty factor of (2); g is PSVM classifier ft(x) A radial basis function of; l (w)t,btAnd alpha) is an unconstrained Lagrangian function,to optimize the objective function.
Further, the long-short term memory network prediction model in the fourth step is constructed as follows: the feature matrix f of each time period t obtained in the third stepN,tAccessing an LSTM cell to form a feature input In=[fN,1,fN,2,…fN,k]Simultaneously, k LSTM units are designed into a double-layer structure to form a double-layer LSTM network, then a full connection layer is accessed to the LSTM layer 2, and the full connection layer outputs Out=[fN,2,fN,3,…fN,k+1]。
Furthermore, each LSTM unit of the PSVM-LSTM network comprises a forgetting gate ftAnd input gate itAnd an output gate otTimely alternative statesStandard recurrent neural network module, forgetting gate ftAnd input gate itAnd an output gate otInstant alternate statusObtained by the following formula:
ft=σ(Wf·[xt,ht-1]+bf) (5)
it=σ(Wi·[xt,ht-1]+bi) (6)
ot=σ(Wo·[xt,ht-1]+bo) (7)
wherein, WfAnd bfWeight and offset, W, representing a forgetting gateiAnd biWeight and offset, W, representing input gateoAnd boWeight and offset, W, representing output gatescAnd bcRepresenting the weight and the bias of the instant alternative state; sigma is an activation function, and sigmoid function is adopted for activation of the 'gate' stateInstant alternate statusIs activated by the tanh function
Hidden layer output h of current time interval LSTM unittFrom an output gate otAnd the current cell state ctCommon determination, current state ctCan be output by a forgetting gate ftLast moment state ct-1And input gate itImmediate alternate stateJointly determining; and the immediate state output of the LSTM unit in the next time periodH can be output from the hidden layertThe PSVM-LSTM overall network output layer weight matrix W and the bias item b are jointly determined, and the calculation formula is as follows:
ht=ot⊙tanh(ct) (10)
wherein the symbol [ ] indicates multiplication by element, the outputs of the fully connected layers of the long and short term memory network are independent of each other at each time t, and the outputs thereof can also be represented asOf the form fN,t+1WhereinInput from the previous layer i.e. fN,tW and b initialize the range to (0, 1).
Further, the weight matrix W and the bias term b are obtained by iteration through a momentum random gradient descent method, and the calculation formula is as follows:
Vdw=β·Vdw+(1-β)·dw (12)
Vdb=β·Vdb+(1-β)·db (13)
W=W-αVdw,b=b-αVdb (14)
wherein dw and db are the differential of the weight, the offset, respectively, VdwAnd VdbThe weight momentum factor and the offset momentum factor are respectively the vector sum of the gradient descent quantity and the gradient updating quantity; α and β are consecutive hyper-parameters, typically β is set to 0.9 and α is the learning rate.
Further, in the training of the PSVM-LSTM network in the fifth step, a loss function adopted in an iteration process of a momentum random gradient descent method is an average absolute error function, and a calculation formula is as follows:
wherein, YtiIs YtMedium single predicted output value, TtiAnd (4) a label corresponding to the data set in the step one, wherein m is the number of samples of the electronic nose, and k is the total time period.
Further, in the momentum stochastic gradient descent method, the initial learning rate α is 0.01, and the initial maximum number of iterations is 250.
The invention has the beneficial effects that: the method has the advantages that important parameters in the vector machine are optimized by using the particle group algorithm in the PSVM, and the method has the advantages of few parameters, fast search, high robustness, easiness in engineering realization and the like; using PSVM classifier ft(x) Obtaining a new feature matrix fN,tThe PSVM classifier parameters or characteristics trained in each short period are regarded as a time signal of a long-period time sequence as input of the LSTM network, the state of the PSVM classifier at a certain future time is predicted and updated in real time according to current and previous time sequence data, the LSTM network is trained by using a momentum random gradient descent method, the LSTM network is enabled to keep useful parameter information such as long-term and stable parameters and forget inconformity information such as deviation caused by time drift, the purpose of inhibiting signal drift of the electronic nose is achieved, the long-term stability of the electronic nose is improved, and the LSTM network has strong real-time performance and self-timeliness and is capable of automatically predicting and updating the state of the PSVM classifier at a certain future time inAnd (4) adaptability.
Drawings
FIG. 1 is a flowchart of an algorithm of a PSVM-LSTM-based long-term drift suppression method for an electronic nose signal in one embodiment;
FIG. 2 is a network model of PSVM-LSTM in one embodiment;
FIG. 3 is a block diagram of an LSTM network element in one implementation;
FIG. 4 is a schematic diagram of a gas sensitive response curve of an electronic nose sensor in accordance with an embodiment;
FIG. 5 is a comparison of results from an electronic nose data set test in accordance with one embodiment;
FIG. 6 is a flow chart of a particle population optimization algorithm in one implementation;
FIG. 7 is a graph comparing the error of an electronic nose data set test result in one embodiment.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
The long-term drift suppression method for the electronic nose based on the PSVM-LSTM network, as shown in FIG. 1 and FIG. 2, comprises the following steps:
the method comprises the following steps: preprocessing the electronic nose data in the current time period, extracting the characteristics of the data set as input, and recording the label corresponding to the data set, namely the complete data set of the time period t can be represented as
Wherein,the ith electronic nose sample pair of the data set in the current t time period is shown, m is the number of the electronic nose samples, t belongs to {1,2, … k }, and k represents the total number of the time periods; at this time, the characteristic matrix and the label of the m electronic nose sensors in the time period t can be respectively recorded asAnd
step two: optimizing a vector machine by using a PSO particle swarm optimization algorithm to form a PSVM classifier, namely obtaining a penalty factor C and a radial basis function G in the vector machine classifier according to the PSO particle swarm optimization algorithm; data set S for current t time periodtTraining and learning to obtain PSVM classifier ft(x) Extract the PSVM classifier ft(x) As a new feature matrix fN,t;
As shown in fig. 6, the penalty factor C and the radial basis function G in step two are obtained by the following formulas:
Vi ω=θ·Vi ω+P1×τ×(Cω-μi ω)+P2×τ×(Gω-μi ω) (2)
where i is the number of particles, ω is the number of iterations, θ is the inertia factor (non-negative), ViIs the particle velocity, P1And P2As a learning factor, muiτ is a random number in the range of (0, 1) for the current position of the particle, ω can be defined by a number threshold, or an error threshold, and a learning factor P1And P2Is generally set to 2;
PSVM classifier f in the second stept(x) Adopting a multi-classification support vector machine based on a Gaussian kernel function, and the PSVM classifier ft(x) The model parameter is weight wtAnd bias btSo that the new feature matrix can be written as fN,t=[wt,bt]The weight value wtAnd bias btObtained by the following formula:
wherein alpha isiIs a Lagrangian multiplier, and alphai≥0;δiIs a relaxation variable; c is PSVM classifier ft(x) A penalty factor of (2); g is PSVM classifier ft(x) A radial basis function of; l (w)t,btAnd alpha) is an unconstrained Lagrangian function,is an optimization objective function;
step three: repeating the first step and the second step, and carrying out the same treatment on the data sets of the electronic nose in the k time periods;
step four: constructing a long-short term memory network prediction model, and obtaining the feature matrix f of each time period t from the step threeN,tAs characteristic input I of the long-short term memory networkn=[fN,1,fN,2,…fN,k]Delaying the feature matrix f by a time periodN,t+1As output O of the networkut=[fN,2,fN,3,…fN,k+1];
The long-short term memory network prediction model in the fourth step is constructed as follows: the feature matrix f of each time period t obtained in the third stepN,tAccessing an LSTM cell to form a feature input In=[fN,1,fN,2,…fN,k]Simultaneously, k LSTM units are designed into a double-layer structure to form a double-layer LSTM network, then a full connection layer is accessed to the LSTM layer 2, and the full connection layer outputs Out=[fN,2,fN,3,…fN,k+1];
As shown in FIG. 3, each LSTM unit of the PSVM-LSTM network comprises a forgetting gate ftAnd input gate itAnd an output gate otTimely alternative statesThe LSTM unit may be based onThe rule is used for judging whether the input information is useful, and the core lies in that the state c of the gate control unit is used: at the current time t, forget the door ftResponsible for controlling the last moment ct-1How much information is saved to the current moment ct(ii) a Input door itSelecting a time candidate state at a current timeHow much information is input to the current cell; output gate otControlling the current state ctHow much information is output as hidden layer h at the momentt(ii) a Instant alternate statusFrom the input x of the network at the present moment ttAnd hidden layer output h of last momentt-1Jointly decide, forget the door ftAnd input gate itAnd an output gate otInstant alternate statusObtained by the following formula:
ft=σ(Wf·[xt,ht-1]+bf) (5)
it=σ(Wi·[xt,ht-1]+bi) (6)
ot=σ(Wo·[xt,ht-1]+bo) (7)
wherein, WfAnd bfWeight and offset, W, representing a forgetting gateiAnd biWeight and offset, W, representing input gateoAnd boWeight and offset, W, representing output gatescAnd bcRepresenting the weight and the bias of the instant alternative state; sigma is an activation function, and sigmoid function is adopted for activation of the 'gate' stateInstant alternate statusIs activated by the tanh function
Hidden layer output h of current time interval LSTM unittFrom an output gate otAnd the current cell state ctCommon determination, current state ctCan be output by a forgetting gate ftLast moment state ct-1And input gate itImmediate alternate stateJointly determining; and the immediate state output of the LSTM unit in the next time periodH can be output from the hidden layertThe PSVM-LSTM overall network output layer weight matrix W and the bias item b are jointly determined, and the calculation formula is as follows:
ht=ot⊙tanh(ct) (10)
wherein the symbol [ ] indicates multiplication by element, the outputs of the fully connected layers of the long and short term memory network are independent of each other at each time t, and the outputs thereof can also be represented asShape ofFormula (i) fN,t+1WhereinInput from the previous layer i.e. fN,tW and b initialize the range to (0, 1).
Step five: and (5) training the network model in the fourth step by adopting a momentum random gradient descent method until stable convergence is obtained.
In the training of the PSVM-LSTM network in the fifth step, a loss function adopted in the iteration process of the momentum random gradient descent method is an average absolute error function, and a calculation formula is as follows:
wherein, YtiIs YtMedium single predicted output value, TtiAnd (3) a label corresponding to the data set in the step one, wherein m is the number of samples of the electronic nose, k is the total number of time periods, and the threshold of the average absolute error function can be set according to actual requirements.
In an embodiment, the data preprocessing in the first step mainly comprises noise reduction and normalization processing of a raw signal measured by an electronic intranasal sensor, wherein the raw signal comprises a steady-state response characteristic and a transient response characteristic of the sensor, and a processed signal characteristic valueThe method is in an n multiplied by 1 vector form, a certain time period t is a stable constant, the number m of samples is not less than 100, and the detected analyte, namely a label corresponding to a data set, adopts binary coding.
In one embodiment, the electronic nose is an array of four gas sensors, selected from TGS series sensors from Figaro inc, TGS2600, TGS2602, TGS2610, and TGS2620, and a single gas sensorThe response signals of the TGS sensor are shown in FIG. 4 using the references Vergara A, Vembu S, Ayhan T, et al Chemical gas sensor drift compensation using sensors and Actuators B Chemical 2012,166:320-]The exponential moving average method of (1) performs feature extraction, including 8 features of transient adsorption, steady state peak, transient falling interval for each sensor response in the array, respectively steady state feature values Δ R and | Δ R |, transient feature value for adsorption rising period [ max |)ema0.001,maxema0.01,maxema0.1]And transient characteristic value [ min ] of desorption falling periodema0.001,minema0.01,minema0.1]A single measurement can be denoted as xi=[x11,x12…,x18;x21,x22…,x28;…;x41,x42…,x48]32 eigenvalues in total; setting the period of time to one month, and selecting the analytes to be detected, namely ethylene, ethanol and acetone, which correspond to yiThe category labels are respectively (0,0,1), (0,1,0) and (1,0, 0). The LSTM network algorithm model architecture can realize the construction of a long-term and short-term memory network based on a Matlab environment Deep Learning Toolbox, and the super-parameter adjustment setting comprises the following steps: the characteristic dimensionality of an original input signal is 32, an Adam optimizer is adopted for responding to a momentum random gradient, a gradient threshold value is set to be 1, the number of implicit units of an LSTM network is 200, the characteristic number and the response number of parameters of a single PSVM classifier are the same, the updating and the prediction of the next time step are realized by adopting a predictAndUpdateState function, the number i of particles in a PSO algorithm is 500, and an adopted portable hardware platform is provided with a Central Processing Unit (CPU) of Intel (R) core (TM) i7-7700, the main frequency is 3.60GHz, and a cache RAM (random access memory) is 16.0GB, so that the training requirement can be met.
In one embodiment, a part of data disclosed in a UCI Machine Learning reproducibility database (http:// chips. ics. UCI. edu/ml/datasets/Gas + Sensor + Array + Drift) is selected for test verification, 13910 samples are collected in 3 years, and 6 analytes including acetone, ethanol, acetaldehyde, ethylene, ammonia Gas and toluene are collected; using this database, the test was comparatively analyzed for four test methods given in the literature [ Vergara A, Vembu S, Ayhan T, et al.chemical gas sensor drift compensation using a classificator instruments and actors B: Chemical,2012,166: 320-: test 1-Test the current month with the classifier trained with the previous month's data; test 2-train an ensemble classifier with all data for the previous month to Test the current month; test 3-similar to Test2 but with the same weights train the ensemble classifier; test 4-similar to Test1 but with the addition of a principal component analysis-based component correction. As shown in fig. 5, Test5 is the method provided by the present invention, and a ten-fold cross validation method is selected for calibration, it can be observed that the accuracy of the original classifier (Reference) is lower and lower as the time batch increases, while the calibration method of Test5 always maintains higher classifier accuracy and the performance is better than the other methods. As shown in fig. 7, the error of the training result is obtained by using the momentum stochastic gradient descent method, where the initial learning rate α is 0.01, the initial maximum iteration number is 250, the error (loss) in the training process is continuously reduced to 0, and the difference between the training error (train loss) and the test error (val loss) is controlled in a specific interval, so that the error and variance of the model are low, and the applicability of the model is improved.
The above description is only a few of the preferred embodiments of the present application and is not intended to limit the present application, which may be modified and varied by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (9)
1. A long-term drift suppression method for an electronic nose based on a PSVM-LSTM network is characterized by comprising the following steps:
the method comprises the following steps: preprocessing the electronic nose data in the current time period t, extracting the characteristics of a data set as input, and recording a label corresponding to the data set, namely the complete data set in the time period t can be represented as
Wherein,the ith electronic nose sample pair of the data set in the current t time period is shown, m is the number of the electronic nose samples, t belongs to {1,2, … k }, and k represents the total number of the time periods; at this time, the characteristic matrix and the label of the m electronic nose sensors in the time period t can be respectively recorded asAnd
step two: optimizing a vector machine by using a PSO particle swarm optimization algorithm to form a PSVM classifier, namely obtaining a penalty factor C and a radial basis function G in the vector machine classifier according to the PSO particle swarm optimization algorithm; data set S for current t time periodtTraining and learning to obtain PSVM classifier ft(x) Extract the PSVM classifier ft(x) As a new feature matrix fN,t;
Step three: repeating the first step and the second step, and carrying out the same treatment on the data sets of the electronic nose in the k time periods;
step four: constructing a long-short term memory network prediction model, and obtaining the feature matrix f of each time period t from the step threeN,tAs characteristic input I of the long-short term memory networkn=[fN,1,fN,2,…fN,k]Delaying the feature matrix f by a time periodN,t+1As output O of the networkut=[fN,2,fN,3,…fN,k+1];
Step five: and (5) training the network model in the fourth step by adopting a momentum random gradient descent method until stable convergence is obtained.
2. The PSVM-LSTM network-based electronic nose long-term drift suppression method as in claim 1, wherein the penalty factor C and the radial basis function G in the second step are obtained by the following formula:
Vi ω=θ·Vi ω+P1×τ×(Cω-μi ω)+P2×τ×(Gω-μi ω) (2)
where i is the number of particles, ω is the number of iterations, θ is the inertia factor (non-negative), ViIs the particle velocity, P1And P2As a learning factor, muiτ is a random number in the range of (0, 1) for the current position of the particle.
3. The PSVM-LSTM network-based long-term drift suppression method for the electronic nose as recited in claim 1, wherein the data preprocessing in the first step mainly comprises denoising and normalizing the raw signal measured by the electronic nose sensor, the raw signal comprises the steady-state response characteristic and the transient-state response characteristic of the sensor, and the processed signal characteristic value x isi tThe method is in an n multiplied by 1 vector form, a certain time period t is a stable constant, the number m of samples is not less than 100, and the detected analyte, namely a label corresponding to a data set, adopts binary coding.
4. The PSVM-LSTM network-based electronic nose long-term drift suppression method as recited in claim 1 or 2, wherein the PSVM classifier f in the second stept(x) Adopting a multi-classification support vector machine based on a Gaussian kernel function, and the PSVM classifier ft(x) The model parameter is weight wtAnd bias btSo that the new feature matrix can be written as fN,t=[wt,bt]The weight value wtAnd bias btObtained by the following formula:
5. The PSVM-LSTM-based electronic nose long-term drift suppression method according to claim 1, wherein the long-term and short-term memory network prediction model in the fourth step is constructed as follows: the feature matrix f of each time period t obtained in the third stepN,tAccessing an LSTM cell to form a feature input In=[fN,1,fN,2,…fN,k]Simultaneously, k LSTM units are designed into a double-layer structure to form a double-layer LSTM network, then a full connection layer is accessed to the LSTM layer 2, and the full connection layer outputs Out=[fN,2,fN,3,…fN,k+1]。
6. The PSVM-LSTM network-based electronic nose long-term drift suppression method as in claim 1 or 5, wherein each LSTM unit of the PSVM-LSTM network is a PSVM-LSTM network with a forgetting gate ftAnd input gate itAnd an output gate otTimely alternative statesStandard recurrent neural network module, forgetting gate ftAnd input gate itAnd an output gate otInstant alternate statusObtained by the following formula:
ft=σ(Wf·[xt,ht-1]+bf) (5)
it=σ(Wi·[xt,ht-1]+bi) (6)
ot=σ(Wo·[xt,ht-1]+bo) (7)
wherein, WfAnd bfWeight and offset, W, representing a forgetting gateiAnd biWeight and offset, W, representing input gateoAnd boWeight and offset, W, representing output gatescAnd bcRepresenting the weight and the bias of the instant alternative state; sigma is an activation function, and sigmoid function is adopted for activation of the 'gate' stateInstant alternate statusIs activated by the tanh function
Hidden layer output h of current time interval LSTM unittFrom an output gate otAnd the current cell state ctCommon determination, current state ctCan be output by a forgetting gate ftLast moment state ct-1And input gate itImmediate alternate stateJointly determining; and the immediate state output of the LSTM unit in the next time periodH can be output from the hidden layertThe PSVM-LSTM overall network output layer weight matrix W and the bias item b are jointly determined, and the calculation formula is as follows:
ht=ot⊙tanh(ct) (10)
wherein the symbol [ ] indicates multiplication by element, the outputs of the fully connected layers of the long and short term memory network are independent of each other at each time t, and the outputs thereof can also be represented asOf the form fN,t+1WhereinInput from the previous layer i.e. fN,tW and b initialize the range to (0, 1).
7. The PSVM-LSTM network-based electronic nose long-term drift suppression method according to claim 6, wherein the weight matrix W and the bias term b are obtained by iteration through a momentum stochastic gradient descent method, and the calculation formula is as follows:
Vdw=β·Vdw+(1-β)·dw (12)
Vdb=β·Vdb+(1-β)·db (13)
W=W-αVdw,b=b-αVdb (14)
wherein dw and db are the differential of the weight, the offset, respectively, VdwAnd VdbAre respectively the weight momentum causeThe sub-offset momentum factor is the vector sum of the gradient descending quantity and the gradient updating quantity; α and β are consecutive hyper-parameters, typically β is set to 0.9 and α is the learning rate.
8. The PSVM-LSTM network-based electronic nose long-term drift suppression method as recited in claim 7, wherein in the PSVM-LSTM network training of the fifth step, a loss function adopted in an iteration process of a momentum stochastic gradient descent method is an average absolute error function, and a calculation formula is as follows:
wherein, YtiIs YtMedium single predicted output value, TtiAnd (4) a label corresponding to the data set in the step one, wherein m is the number of samples of the electronic nose, and k is the total time period.
9. The PSVM-LSTM network-based electronic nose long-term drift suppression method as recited in claim 7, wherein an initial learning rate α in the momentum stochastic gradient descent method is 0.01, and an initial maximum number of iterations is 250.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011544962.5A CN112580539A (en) | 2020-12-24 | 2020-12-24 | Long-term drift suppression method for electronic nose signals based on PSVM-LSTM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011544962.5A CN112580539A (en) | 2020-12-24 | 2020-12-24 | Long-term drift suppression method for electronic nose signals based on PSVM-LSTM |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112580539A true CN112580539A (en) | 2021-03-30 |
Family
ID=75139246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011544962.5A Withdrawn CN112580539A (en) | 2020-12-24 | 2020-12-24 | Long-term drift suppression method for electronic nose signals based on PSVM-LSTM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112580539A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113740381A (en) * | 2021-08-12 | 2021-12-03 | 西南大学 | Cross-domain subspace learning electronic nose drift compensation method based on manifold learning |
CN114129175A (en) * | 2021-11-19 | 2022-03-04 | 江苏科技大学 | LSTM and BP based motor imagery electroencephalogram signal classification method |
CN117649579A (en) * | 2023-11-20 | 2024-03-05 | 南京工业大学 | Multi-mode fusion ground stain recognition method and system based on attention mechanism |
-
2020
- 2020-12-24 CN CN202011544962.5A patent/CN112580539A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113740381A (en) * | 2021-08-12 | 2021-12-03 | 西南大学 | Cross-domain subspace learning electronic nose drift compensation method based on manifold learning |
CN113740381B (en) * | 2021-08-12 | 2022-08-26 | 西南大学 | Cross-domain subspace learning electronic nose drift compensation method based on manifold learning |
CN114129175A (en) * | 2021-11-19 | 2022-03-04 | 江苏科技大学 | LSTM and BP based motor imagery electroencephalogram signal classification method |
CN117649579A (en) * | 2023-11-20 | 2024-03-05 | 南京工业大学 | Multi-mode fusion ground stain recognition method and system based on attention mechanism |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112580539A (en) | Long-term drift suppression method for electronic nose signals based on PSVM-LSTM | |
CN111103325B (en) | Electronic nose signal drift compensation method based on integrated neural network learning | |
Najafi et al. | Statistical downscaling of precipitation using machine learning with optimal predictor selection | |
CN103544392B (en) | Medical science Gas Distinguishing Method based on degree of depth study | |
Feng et al. | Gas identification with drift counteraction for electronic noses using augmented convolutional neural network | |
CN111144542A (en) | Oil well productivity prediction method, device and equipment | |
ur Rehman et al. | Heuristic random forests (HRF) for drift compensation in electronic nose applications | |
CN110880369A (en) | Gas marker detection method based on radial basis function neural network and application | |
CN111340132B (en) | Machine olfaction mode identification method based on DA-SVM | |
CN112418395B (en) | Gas sensor array drift compensation method based on generation countermeasure network | |
Rehman et al. | Multi-classifier tree with transient features for drift compensation in electronic nose | |
CN109143408B (en) | Dynamic region combined short-time rainfall forecasting method based on MLP | |
Koeppl et al. | Accounting for extrinsic variability in the estimation of stochastic rate constants | |
Wilson et al. | Identification of metallic objects using spectral magnetic polarizability tensor signatures: Object classification | |
CN113642231A (en) | CNN-GRU landslide displacement prediction method based on compression excitation network and application | |
CN112541526A (en) | Electronic nose gas concentration prediction method based on PSO-ABC-ELM | |
CN113740381A (en) | Cross-domain subspace learning electronic nose drift compensation method based on manifold learning | |
ur Rehman et al. | Shuffled frog-leaping and weighted cosine similarity for drift correction in gas sensors | |
CN114897103A (en) | Industrial process fault diagnosis method based on neighbor component loss optimization multi-scale convolutional neural network | |
De Wiljes et al. | An adaptive Markov chain Monte Carlo approach to time series clustering of processes with regime transition behavior | |
CN112926251B (en) | Landslide displacement high-precision prediction method based on machine learning | |
CN115221520A (en) | Open set identification-based unknown attack detection method for industrial control network | |
CN115525697A (en) | Process optimization method based on traditional Chinese medicine production data mining | |
Faqih et al. | Multi-Step Ahead Prediction of Lorenz's Chaotic System Using SOM ELM-RBFNN | |
CN114970674A (en) | Time sequence data concept drift adaptation method based on relevance alignment |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210330 |