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 PDF

Info

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
Application number
CN202011544962.5A
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.)
Nanjing Yideguan Electronic Technology Co ltd
Original Assignee
Nanjing Yideguan Electronic Technology Co ltd
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 Nanjing Yideguan Electronic Technology Co ltd filed Critical Nanjing Yideguan Electronic Technology Co ltd
Priority to CN202011544962.5A priority Critical patent/CN112580539A/en
Publication of CN112580539A publication Critical patent/CN112580539A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • G06F2218/04Denoising
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; 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

Long-term drift suppression method for electronic nose signals based on PSVM-LSTM
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
Figure BDA0002855700300000021
Wherein,
Figure BDA0002855700300000022
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 as
Figure BDA0002855700300000023
And
Figure BDA0002855700300000024
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 value
Figure BDA0002855700300000033
The 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:
Figure BDA0002855700300000034
Figure BDA0002855700300000035
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,
Figure BDA0002855700300000036
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 states
Figure BDA0002855700300000037
Standard recurrent neural network module, forgetting gate ftAnd input gate itAnd an output gate otInstant alternate status
Figure BDA0002855700300000038
Obtained 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)
Figure BDA0002855700300000041
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' state
Figure BDA0002855700300000042
Instant alternate status
Figure BDA0002855700300000043
Is activated by the tanh function
Figure BDA0002855700300000044
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 state
Figure BDA0002855700300000045
Jointly determining; and the immediate state output of the LSTM unit in the next time period
Figure BDA0002855700300000046
H 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:
Figure BDA0002855700300000047
ht=ot⊙tanh(ct) (10)
Figure BDA0002855700300000048
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 as
Figure BDA0002855700300000049
Of the form fN,t+1Wherein
Figure BDA00028557003000000410
Input 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:
Figure BDA00028557003000000411
Figure BDA00028557003000000412
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
Figure BDA0002855700300000051
Wherein,
Figure BDA0002855700300000052
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 as
Figure BDA0002855700300000053
And
Figure BDA0002855700300000054
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:
Figure BDA0002855700300000063
Figure BDA0002855700300000064
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,
Figure BDA0002855700300000065
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 states
Figure BDA0002855700300000066
The 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 time
Figure BDA0002855700300000067
How 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 status
Figure BDA0002855700300000068
From 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 status
Figure BDA0002855700300000071
Obtained 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)
Figure BDA0002855700300000072
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' state
Figure BDA0002855700300000073
Instant alternate status
Figure BDA0002855700300000074
Is activated by the tanh function
Figure BDA0002855700300000075
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 state
Figure BDA0002855700300000076
Jointly determining; and the immediate state output of the LSTM unit in the next time period
Figure BDA0002855700300000077
H 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:
Figure BDA0002855700300000078
ht=ot⊙tanh(ct) (10)
Figure BDA0002855700300000079
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 as
Figure BDA00028557003000000710
Shape ofFormula (i) fN,t+1Wherein
Figure BDA00028557003000000711
Input 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:
Figure BDA00028557003000000712
Figure BDA00028557003000000713
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 value
Figure BDA0002855700300000081
The 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
Figure FDA0002855700290000011
Wherein,
Figure FDA0002855700290000012
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 as
Figure FDA0002855700290000013
And
Figure FDA0002855700290000014
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:
Figure FDA0002855700290000021
Figure FDA0002855700290000022
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,
Figure FDA0002855700290000023
to optimize the objective function.
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 states
Figure FDA0002855700290000024
Standard recurrent neural network module, forgetting gate ftAnd input gate itAnd an output gate otInstant alternate status
Figure FDA0002855700290000025
Obtained 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)
Figure FDA0002855700290000026
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' state
Figure FDA0002855700290000027
Instant alternate status
Figure FDA0002855700290000028
Is activated by the tanh function
Figure FDA0002855700290000029
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 state
Figure FDA00028557002900000210
Jointly determining; and the immediate state output of the LSTM unit in the next time period
Figure FDA00028557002900000211
H 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:
Figure FDA00028557002900000212
ht=ot⊙tanh(ct) (10)
Figure FDA0002855700290000031
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 as
Figure FDA0002855700290000032
Of the form fN,t+1Wherein
Figure FDA0002855700290000033
Input 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:
Figure FDA0002855700290000034
Figure FDA0002855700290000035
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.
CN202011544962.5A 2020-12-24 2020-12-24 Long-term drift suppression method for electronic nose signals based on PSVM-LSTM Withdrawn CN112580539A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (4)

* Cited by examiner, † Cited by third party
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