[go: up one dir, main page]

CN111474297B - An online drift compensation method for sensors in a bionic olfactory system - Google Patents

An online drift compensation method for sensors in a bionic olfactory system Download PDF

Info

Publication number
CN111474297B
CN111474297B CN202010158546.5A CN202010158546A CN111474297B CN 111474297 B CN111474297 B CN 111474297B CN 202010158546 A CN202010158546 A CN 202010158546A CN 111474297 B CN111474297 B CN 111474297B
Authority
CN
China
Prior art keywords
samples
batch
sample
above formula
olfactory system
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.)
Active
Application number
CN202010158546.5A
Other languages
Chinese (zh)
Other versions
CN111474297A (en
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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202010158546.5A priority Critical patent/CN111474297B/en
Publication of CN111474297A publication Critical patent/CN111474297A/en
Application granted granted Critical
Publication of CN111474297B publication Critical patent/CN111474297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0001Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00 by organoleptic means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0004Gaseous mixtures, e.g. polluted air
    • G01N33/0006Calibrating gas analysers
    • 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/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • 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/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24147Distances to closest patterns, e.g. nearest neighbour classification

Landscapes

  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Biochemistry (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Pathology (AREA)
  • General Engineering & Computer Science (AREA)
  • Medicinal Chemistry (AREA)
  • Evolutionary Computation (AREA)
  • Analytical Chemistry (AREA)
  • Food Science & Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Combustion & Propulsion (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to an online drift compensation method for a sensor in a bionic olfactory system, and belongs to the technical field of sensors. The method comprises the following steps: step 1) performing source domain reconstruction according to an input sample batch number; and 2) constructing a classification model by using the reconstructed source domain and target domain samples and storing a prediction result. The method comprises the steps of utilizing output response samples of sensors in a bionic olfactory system in two successive batches, namely performing source domain reconstruction on samples of a previous batch which are predicted through a classification model and samples of an initial batch which are artificially marked, and then building a classification model through condition distribution self-adaption and manifold regularization to realize online drift compensation of the sensors in the bionic olfactory system. The gas identification model can be continuously updated along with the drift of the sensor, so that the method is more suitable for actual production and use scenes of the bionic olfactory system in a real scene, and the service life of equipment can be prolonged.

Description

一种仿生嗅觉系统中传感器的在线漂移补偿方法An online drift compensation method for sensors in a bionic olfactory system

技术领域technical field

本发明属于传感器技术领域,涉及一种仿生嗅觉系统中传感器的在线漂移补偿方法。The invention belongs to the technical field of sensors, and relates to an online drift compensation method of a sensor in a bionic olfactory system.

背景技术Background technique

仿生嗅觉系统由气体传感器阵列、信号预处理单元和模式识别算法组成,可用于气体识别。当气体通入系统后,传感器阵列根据气体特性产生相应的电信号响应,并通过模式识别算法将预处理后的信号转换为气体识别结果。The bionic olfactory system consists of a gas sensor array, a signal preprocessing unit and a pattern recognition algorithm, which can be used for gas recognition. When the gas is passed into the system, the sensor array generates corresponding electrical signal responses according to the gas characteristics, and converts the preprocessed signals into gas recognition results through a pattern recognition algorithm.

传感器由于自身老化或气体中毒等原因会发生漂移。漂移问题伴随仿生嗅觉系统的使用长期存在且无法被避免。漂移会改变传感器的输出响应,进而导致初始构建的分类模型无法对后期采集到的样本进行准确预测。The sensor drifts due to its own aging or gas poisoning. Drift problems have long existed with the use of bionic olfactory systems and cannot be avoided. Drift will change the output response of the sensor, which will lead to the failure of the initially constructed classification model to accurately predict the samples collected later.

近年来许多针对传感器漂移补偿的算法被提出,主要分为信号预处理、成分校正和机器学习三类,这些算法虽然能够在一定程度上实现传感器的漂移补偿,但大多属于离线方法,需要定期回收设备以完成人工校正,不适合应用于实际应用场景。此外,传感器漂移前后输出响应样本的特征分布存在差异,以往漂移补偿的相关工作均集中于减小边缘分布差异,未考虑条件分布差异带来的影响。In recent years, many algorithms for sensor drift compensation have been proposed, mainly divided into three categories: signal preprocessing, component correction and machine learning. Although these algorithms can achieve sensor drift compensation to a certain extent, most of them are offline methods and need to be recycled regularly. equipment to complete manual correction, which is not suitable for practical application scenarios. In addition, there is a difference in the characteristic distribution of the output response samples before and after sensor drift, and the related work of drift compensation in the past has focused on reducing the edge distribution difference, without considering the influence of the conditional distribution difference.

因此,如何减小因传感器漂移所造成的条件分布差异并实现分类模型的有效在线更新对仿生嗅觉系统气体判别结果的正确性影响很大。本专利所公开的一种仿生嗅觉系统中传感器的在线漂移补偿方法能够通过条件分布自适应和流形正则化构建分类模型,同时利用源域重构实现模型的在线更新,完成对仿生嗅觉系统中已发生漂移的传感器所采集到样本的补偿,在现实使用场景下更具有合理性。Therefore, how to reduce the difference in conditional distribution caused by sensor drift and achieve effective online update of the classification model has a great influence on the correctness of the gas discrimination results of the bionic olfactory system. The online drift compensation method for sensors in a bionic olfactory system disclosed in this patent can build a classification model through conditional distribution adaptation and manifold regularization, and at the same time utilize source domain reconstruction to realize online update of the model, and complete the analysis of the bionic olfactory system. Compensation for samples collected by sensors that have drifted is more reasonable in real-world usage scenarios.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种仿生嗅觉系统中传感器的在线漂移补偿方法,利用先后两批次仿生嗅觉系统中传感器的输出响应样本,即前一批次已通过分类模型预测完成的样本与初始批次人工标注后的样本进行源域重构,而后通过条件分布自适应和流形正则化搭建分类模型,实现从而实现仿生嗅觉系统中传感器的在线漂移补偿。In view of this, the purpose of the present invention is to provide an online drift compensation method for sensors in a bionic olfactory system. The samples and the initial batch of manually labeled samples are reconstructed in the source domain, and then a classification model is built through conditional distribution adaptation and manifold regularization, so as to realize the online drift compensation of sensors in the bionic olfactory system.

为达到上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:

一种仿生嗅觉系统中传感器的在线漂移补偿方法,该方法包括以下步骤:An online drift compensation method for a sensor in a bionic olfactory system, the method includes the following steps:

步骤1)依据输入样本批次号进行源域重构;Step 1) Perform source domain reconstruction according to the input sample batch number;

步骤2)使用重构完成的源域与目标域样本构建分类模型并保存预测结果。Step 2) Use the reconstructed source domain and target domain samples to construct a classification model and save the prediction results.

可选的,所述步骤1)包括以下几个步骤:Optionally, the step 1) includes the following steps:

步骤11)输入样本的批次号a;Step 11) input the batch number a of the sample;

步骤12)根据批次号a进行源域重构,当a=1时,源域Ds选择为传感器未发生漂移时所采集到的初始批次有标签样本集

Figure RE-GDA0002487699360000021
n1为初始批次样本数,否则,Ds由当前目标域的前一批次已完成分类预测的样本集
Figure RE-GDA0002487699360000022
与D1共同构造,即 Ds=D1∪Da,其中na为a批次样本数,当a=1时,由于是首次模型构建,不存在上一批次的分类预测结果,故此时Ds=D1,重构后的源域样本数为:Step 12) Reconstruct the source domain according to the batch number a. When a=1, the source domain D s is selected as the initial batch of labeled sample sets collected when the sensor does not drift
Figure RE-GDA0002487699360000021
n 1 is the number of samples in the initial batch, otherwise, D s is the set of samples that have been classified and predicted by the previous batch of the current target domain
Figure RE-GDA0002487699360000022
It is constructed together with D 1 , that is, D s = D 1 ∪ D a , where n a is the number of samples in batch a. When a = 1, because it is the first model construction, there is no classification prediction result of the previous batch, so When D s = D 1 , the number of reconstructed source domain samples is:

Figure RE-GDA0002487699360000023
Figure RE-GDA0002487699360000023

可选的,所述步骤2)包括以下几个步骤:Optionally, the step 2) includes the following steps:

步骤21)输入无标签的a+1批次目标域样本

Figure RE-GDA0002487699360000024
nt为目标域样本数;Step 21) Input unlabeled a+1 batches of target domain samples
Figure RE-GDA0002487699360000024
n t is the number of samples in the target domain;

步骤22)使用主成分分析法将Xs与Xt降维至p维以生成子空间Ss和St,Gd×p为所有p维子空间的集合,每个子空间视作格拉斯曼流形空间Gd×p上的一点,令Φ(t)为Gd×p上的一条测地线,其中t∈[0,1],Φ(0)=Ss和Φ(1)=St作为测地线的两端,zi和zj为xi与xj在无限维空间上投影后的特征向量,其内积表示为:Step 22) Use principal component analysis to reduce the dimensions of X s and X t to p dimensions to generate subspaces S s and S t , G d×p is the set of all p-dimensional subspaces, and each subspace is regarded as a Grassmannian A point on the manifold space G d×p , let Φ(t) be a geodesic on G d×p , where t∈[0,1], Φ(0)=S s and Φ(1)= S t is used as the two ends of the geodesic line, z i and z j are the eigenvectors of x i and x j projected on the infinite-dimensional space, and the inner product is expressed as:

Figure RE-GDA0002487699360000025
Figure RE-GDA0002487699360000025

上式中xi,xj∈Ds∪Dt,G表示测地线核:In the above formula, x i ,x j ∈D s ∪D t , and G represents the geodesic kernel:

Figure RE-GDA0002487699360000026
Figure RE-GDA0002487699360000026

上式中Rs由Xs经PCA提取p维特征后所剩余的d-p维特征组成,U1和U2互为正交矩阵,通过奇异值分解求出,Λ12及Λ3为对角矩阵,矩阵中的元素值分别为:In the above formula, R s is composed of the remaining dp-dimensional features after the p-dimensional features are extracted from X s by PCA. U 1 and U 2 are mutually orthogonal matrices, which are obtained by singular value decomposition. Λ 1 , Λ 2 and Λ 3 are Diagonal matrix, the element values in the matrix are:

Figure RE-GDA0002487699360000027
Figure RE-GDA0002487699360000027

将Xs与Xt投影后所得的样本特征空间使用

Figure RE-GDA0002487699360000028
Figure RE-GDA0002487699360000029
表示,其中
Figure RE-GDA00024876993600000210
The sample feature space obtained by projecting X s and X t is used
Figure RE-GDA0002487699360000028
and
Figure RE-GDA0002487699360000029
said, of which
Figure RE-GDA00024876993600000210

步骤23)使用Zs通过k=1的k近邻算法训练分类器,而后将Zt带入到该分类器中以获得伪标签

Figure RE-GDA00024876993600000211
Step 23) Use Z s to train a classifier through the k-nearest neighbor algorithm with k=1, and then bring Z t into the classifier to obtain pseudo-labels
Figure RE-GDA00024876993600000211

步骤24)使用Zs和Zt选择高斯核以构造核函数

Figure RE-GDA0002487699360000031
Step 24) Use Z s and Z t to select a Gaussian kernel to construct the kernel function
Figure RE-GDA0002487699360000031

步骤25)通过k近邻算法确定Zs和Zt中各点的邻居关系以获得相似度矩阵W:Step 25) Determine the neighbor relationship of each point in Z s and Z t through the k-nearest neighbor algorithm to obtain the similarity matrix W:

Figure RE-GDA0002487699360000032
Figure RE-GDA0002487699360000032

Figure RE-GDA0002487699360000033
Figure RE-GDA0002487699360000033

上式中r(zi,zj)=1表示zi和zj互为邻居关系;获得W后即算出拉普拉斯矩阵L:In the above formula, r(z i , z j )=1 indicates that zi and z j are neighbors to each other; after obtaining W, the Laplacian matrix L is calculated:

Figure RE-GDA0002487699360000034
Figure RE-GDA0002487699360000034

上式中D为对角矩阵,由

Figure RE-GDA0002487699360000035
计算获得,此时流形正则约束项表示为:In the above formula, D is a diagonal matrix, by
Figure RE-GDA0002487699360000035
The calculation is obtained, and the manifold regular constraint term is expressed as:

Figure RE-GDA0002487699360000036
Figure RE-GDA0002487699360000036

步骤26)对Zs和Zt进行条件分布自适应,条件分布差异通过最大均值差异在再生希尔伯特空间上进行度量,使用经验估计式近似统计估计:Step 26) Conditional distribution adaptation is performed on Z s and Z t , and the conditional distribution difference is measured on the regenerated Hilbert space by the maximum mean difference, and approximate statistical estimation is performed using the empirical estimation formula:

Figure RE-GDA0002487699360000037
Figure RE-GDA0002487699360000037

上式中C表示样本内所含标签的类别总数,

Figure RE-GDA0002487699360000038
由两个对角矩阵组成,其中:In the above formula, C represents the total number of categories of labels contained in the sample,
Figure RE-GDA0002487699360000038
consists of two diagonal matrices, where:

Figure RE-GDA0002487699360000039
Figure RE-GDA0002487699360000039

Figure RE-GDA00024876993600000310
Figure RE-GDA00024876993600000310

Figure RE-GDA00024876993600000311
表示Zs和Zt中标签为l的nl个样本的分类结果集合,f表示Gd×p下的分类预测函数:
Figure RE-GDA00024876993600000311
Represents the classification result set of n l samples with label l in Z s and Z t , and f represents the classification prediction function under G d × p :

Figure RE-GDA00024876993600000312
Figure RE-GDA00024876993600000312

上式中α=[α12,...,αN]T为系数向量,条件分布自适应项的最终计算式为:In the above formula, α=[α 12 ,...,α N ] T is the coefficient vector, and the final calculation formula of the conditional distribution adaptive term is:

MMD2(HK,Qs,Qt)=tr(fTMf)MMD 2 (H K , Q s , Q t )=tr(f T Mf)

上式中M中各元素由下式直接算出:Each element in M in the above formula is directly calculated by the following formula:

Figure RE-GDA0002487699360000041
Figure RE-GDA0002487699360000041

根据结构风险最小化原则,结合流形正则化项和条件分布自适应项,分类器f的最终优化目标为:According to the principle of structural risk minimization, combined with the manifold regularization term and the conditional distribution adaptation term, the final optimization objective of the classifier f is:

Figure RE-GDA0002487699360000042
Figure RE-GDA0002487699360000042

上式中U为样本所在域的指示矩阵,即:In the above formula, U is the indicator matrix of the domain where the sample is located, namely:

Figure RE-GDA0002487699360000043
Figure RE-GDA0002487699360000043

令优化式中α的偏导数为0以解出α:Set the partial derivative of α in the optimization equation to 0 to solve for α:

α=(λ1I+(λ2M+λ3L+U)K)-1UYT α=(λ 1 I+(λ 2 M+λ 3 L+U)K) -1 UY T

使用f完成对

Figure RE-GDA0002487699360000044
的更新,重复步骤26)e次以迭代更新M和α;Use f to complete the pair
Figure RE-GDA0002487699360000044
update, repeat step 26) e times to iteratively update M and α;

步骤27)获得本批次样本的预测标签

Figure RE-GDA0002487699360000045
并保存,等待下一批次样本输入。Step 27) Obtain the predicted label of this batch of samples
Figure RE-GDA0002487699360000045
and save it, waiting for the next batch of samples to be input.

本发明的有益效果在于:该方法能够随传感器的漂移不断更新气体识别模型,更加符合现实场景下仿生嗅觉系统的生产实际与使用场景,并能够延长设备的使用寿命。The beneficial effect of the invention is that the method can continuously update the gas identification model with the drift of the sensor, which is more in line with the actual production and usage scenarios of the bionic olfactory system in real scenarios, and can prolong the service life of the equipment.

本发明的其他优点、目标和特征在某种程度上将在随后的说明书中进行阐述,并且在某种程度上,基于对下文的考察研究对本领域技术人员而言将是显而易见的,或者可以从本发明的实践中得到教导。本发明的目标和其他优点可以通过下面的说明书来实现和获得。Other advantages, objects and features of the present invention will be set forth in the description which follows, to the extent that will be apparent to those skilled in the art based on a study of the following, or may be learned from is taught in the practice of the present invention. The objectives and other advantages of the present invention may be realized and attained by the following description.

附图说明Description of drawings

为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作优选的详细描述,其中:In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be preferably described in detail below with reference to the accompanying drawings, wherein:

图1为本发明流程图。Fig. 1 is a flow chart of the present invention.

具体实施方式Detailed ways

以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。需要说明的是,以下实施例中所提供的图示仅以示意方式说明本发明的基本构想,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。The embodiments of the present invention are described below through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in the following embodiments are only used to illustrate the basic idea of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

其中,附图仅用于示例性说明,表示的仅是示意图,而非实物图,不能理解为对本发明的限制;为了更好地说明本发明的实施例,附图某些部件会有省略、放大或缩小,并不代表实际产品的尺寸;对本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的。Among them, the accompanying drawings are only for illustrative description, and represent only schematic diagrams, not physical drawings, and should not be construed as limitations of the present invention; in order to better illustrate the embodiments of the present invention, some parts of the accompanying drawings will be omitted, The enlargement or reduction does not represent the size of the actual product; it is understandable to those skilled in the art that some well-known structures and their descriptions in the accompanying drawings may be omitted.

本发明实施例的附图中相同或相似的标号对应相同或相似的部件;在本发明的描述中,需要理解的是,若有术语“上”、“下”、“左”、“右”、“前”、“后”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此附图中描述位置关系的用语仅用于示例性说明,不能理解为对本发明的限制,对于本领域的普通技术人员而言,可以根据具体情况理解上述术语的具体含义。The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms "upper", "lower", "left" and "right" , "front", "rear" and other indicated orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the indicated device or element must be It has a specific orientation, is constructed and operated in a specific orientation, so the terms describing the positional relationship in the accompanying drawings are only used for exemplary illustration, and should not be construed as a limitation of the present invention. situation to understand the specific meaning of the above terms.

本发明提供的一种仿生嗅觉系统中传感器的在线漂移补偿方法,如图1所示该方法包括以下步骤:The present invention provides a method for online drift compensation of a sensor in a bionic olfactory system. As shown in FIG. 1 , the method includes the following steps:

步骤1)依据输入样本批次号进行源域重构;Step 1) Perform source domain reconstruction according to the input sample batch number;

进一步,步骤1)包括以下几个步骤:Further, step 1) includes the following steps:

步骤11)输入样本的批次号a;Step 11) input the batch number a of the sample;

步骤12)根据批次号a进行源域重构,当a=1时,Ds选择为传感器未发生漂移时所采集到的初始批次有标签样本集

Figure RE-GDA0002487699360000051
n1为初始批次样本数,否则,Ds由当前目标域的前一批次已完成分类预测的样本集
Figure RE-GDA0002487699360000052
与D1共同构造,即Ds=D1∪Da,其中na为a批次样本数,当a=1时,由于是首次模型构建,不存在上一批次的分类预测结果,故此时Ds=D1,重构后的源域样本数为:Step 12) Reconstruct the source domain according to the batch number a. When a=1, D s is selected as the initial batch of labeled samples collected when the sensor does not drift
Figure RE-GDA0002487699360000051
n 1 is the number of samples in the initial batch, otherwise, D s is the set of samples that have been classified and predicted by the previous batch of the current target domain
Figure RE-GDA0002487699360000052
It is constructed together with D 1 , that is, D s = D 1 ∪ D a , where n a is the number of samples in batch a. When a = 1, because it is the first model construction, there is no classification prediction result of the previous batch, so When D s = D 1 , the number of reconstructed source domain samples is:

Figure RE-GDA0002487699360000053
Figure RE-GDA0002487699360000053

步骤2)使用重构完成的源域与目标域样本构建分类模型并保存预测结果;Step 2) use the reconstructed source domain and target domain samples to construct a classification model and save the prediction result;

进一步,步骤2)包括以下几个步骤:Further, step 2) comprises the following steps:

步骤21)输入无标签的a+1批次目标域样本

Figure RE-GDA00024876993600000612
nt为目标域样本数;Step 21) Input unlabeled a+1 batches of target domain samples
Figure RE-GDA00024876993600000612
n t is the number of samples in the target domain;

步骤22)使用主成分分析法将Xs与Xt降维至p维以生成子空间Ss和St,Gd×p为所有p维子空间的集合,每个子空间均可视作格拉斯曼流形空间Gd×p上的一点,令Φ(t)为Gd×p上的一条测地线,其中t∈[0,1],Φ(0)=Ss和Φ(1)=St作为测地线的两端,zi和zj为xi与xj在无限维空间上投影后的特征向量,其内积可表示为:Step 22) Use principal component analysis to reduce the dimensions of X s and X t to p dimensions to generate subspaces S s and S t , G d×p is the set of all p-dimensional subspaces, and each subspace can be regarded as a gram A point on the Smanian manifold space G d×p , let Φ(t) be a geodesic on G d×p , where t∈[0,1], Φ(0)=S s and Φ(1 )=S t as the two ends of the geodesic line, z i and z j are the eigenvectors of x i and x j projected on the infinite-dimensional space, and their inner product can be expressed as:

Figure RE-GDA0002487699360000061
Figure RE-GDA0002487699360000061

上式中xi,xj∈Ds∪Dt,G表示测地线核:In the above formula, x i ,x j ∈D s ∪D t , and G represents the geodesic kernel:

Figure RE-GDA0002487699360000062
Figure RE-GDA0002487699360000062

上式中Rs由Xs经PCA提取p维特征后所剩余的d-p维特征组成,U1和U2互为正交矩阵,可通过奇异值分解求出,Λ12及Λ3为对角矩阵,矩阵中的元素值分别为:In the above formula, R s is composed of the remaining dp-dimensional features after the p-dimensional features are extracted from X s by PCA. U 1 and U 2 are mutually orthogonal matrices, which can be obtained by singular value decomposition, Λ 1 , Λ 2 and Λ 3 is a diagonal matrix, and the element values in the matrix are:

Figure RE-GDA0002487699360000063
Figure RE-GDA0002487699360000063

将Xs与Xt投影后所得的样本特征空间使用

Figure RE-GDA0002487699360000064
Figure RE-GDA0002487699360000065
表示,其中
Figure RE-GDA0002487699360000066
The sample feature space obtained by projecting X s and X t is used
Figure RE-GDA0002487699360000064
and
Figure RE-GDA0002487699360000065
said, of which
Figure RE-GDA0002487699360000066

步骤23)使用Zs通过k=1的k近邻算法训练分类器,而后将Zt带入到该分类器中以获得伪标签

Figure RE-GDA0002487699360000067
Step 23) Use Z s to train a classifier through the k-nearest neighbor algorithm with k=1, and then bring Z t into the classifier to obtain pseudo-labels
Figure RE-GDA0002487699360000067

步骤24)使用Zs和Zt选择高斯核以构造核函数

Figure RE-GDA0002487699360000068
Step 24) Use Z s and Z t to select a Gaussian kernel to construct the kernel function
Figure RE-GDA0002487699360000068

步骤25)通过k近邻算法确定Zs和Zt中各点的邻居关系以获得相似度矩阵W:Step 25) Determine the neighbor relationship of each point in Z s and Z t through the k-nearest neighbor algorithm to obtain the similarity matrix W:

Figure RE-GDA0002487699360000069
Figure RE-GDA0002487699360000069

Figure RE-GDA00024876993600000610
Figure RE-GDA00024876993600000610

上式中r(zi,zj)=1表示zi和zj互为邻居关系。获得W后即可算出拉普拉斯矩阵L:In the above formula, r(z i , z j )=1 indicates that zi and z j are neighbors to each other. After obtaining W, the Laplace matrix L can be calculated:

Figure RE-GDA00024876993600000611
Figure RE-GDA00024876993600000611

上式中D为对角矩阵,由

Figure RE-GDA0002487699360000071
计算获得,此时流形正则约束项可表示为:In the above formula, D is a diagonal matrix, by
Figure RE-GDA0002487699360000071
The calculation is obtained, and the manifold regular constraint term can be expressed as:

Figure RE-GDA0002487699360000072
Figure RE-GDA0002487699360000072

步骤26)对Zs和Zt进行条件分布自适应,条件分布差异通过最大均值差异在再生希尔伯特空间上进行度量,使用经验估计式近似统计估计:Step 26) Conditional distribution adaptation is performed on Z s and Z t , and the conditional distribution difference is measured on the regenerated Hilbert space by the maximum mean difference, and approximate statistical estimation is performed using the empirical estimation formula:

Figure RE-GDA0002487699360000073
Figure RE-GDA0002487699360000073

上式中C表示样本内所含标签的类别总数,

Figure RE-GDA0002487699360000074
由两个对角矩阵组成,其中:In the above formula, C represents the total number of categories of labels contained in the sample,
Figure RE-GDA0002487699360000074
consists of two diagonal matrices, where:

Figure RE-GDA0002487699360000075
Figure RE-GDA0002487699360000075

Figure RE-GDA0002487699360000076
Figure RE-GDA0002487699360000076

Figure RE-GDA0002487699360000077
表示Zs和Zt中标签为l的nl个样本的分类结果集合,f表示Gd×p下的分类预测函数:
Figure RE-GDA0002487699360000077
Represents the classification result set of n l samples with label l in Z s and Z t , and f represents the classification prediction function under G d × p :

Figure RE-GDA0002487699360000078
Figure RE-GDA0002487699360000078

上式中α=[α12,...,αN]T为系数向量,条件分布自适应项的最终计算式为:In the above formula, α=[α 12 ,...,α N ] T is the coefficient vector, and the final calculation formula of the conditional distribution adaptive term is:

MMD2(HK,Qs,Qt)=tr(fTMf)MMD 2 (H K , Q s , Q t )=tr(f T Mf)

上式中M中各元素可由下式直接算出:Each element in M in the above formula can be directly calculated by the following formula:

Figure RE-GDA0002487699360000079
Figure RE-GDA0002487699360000079

根据结构风险最小化原则,结合流形正则化项和条件分布自适应项,分类器f的最终优化目标为:According to the principle of structural risk minimization, combined with the manifold regularization term and the conditional distribution adaptation term, the final optimization objective of the classifier f is:

Figure RE-GDA0002487699360000081
Figure RE-GDA0002487699360000081

上式中U为样本所在域的指示矩阵,即:In the above formula, U is the indicator matrix of the domain where the sample is located, namely:

Figure RE-GDA0002487699360000082
Figure RE-GDA0002487699360000082

令优化式中α的偏导数为0以解出α:Set the partial derivative of α in the optimization equation to 0 to solve for α:

α=(λ1I+(λ2M+λ3L+U)K)-1UYT α=(λ 1 I+(λ 2 M+λ 3 L+U)K) -1 UY T

使用f完成对

Figure RE-GDA0002487699360000083
的更新,重复步骤26)e次以迭代更新M和α;Use f to complete the pair
Figure RE-GDA0002487699360000083
update, repeat step 26) e times to iteratively update M and α;

步骤27)获得本批次样本的预测标签

Figure RE-GDA0002487699360000084
并保存,等待下一批次样本输入。Step 27) Obtain the predicted label of this batch of samples
Figure RE-GDA0002487699360000084
and save it, waiting for the next batch of samples to be input.

最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本技术方案的宗旨和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent replacements, without departing from the spirit and scope of the technical solution, should all be included in the scope of the claims of the present invention.

Claims (1)

1. An on-line drift compensation method of a sensor in a bionic olfactory system is characterized in that: the method comprises the following steps:
step 1) performing source domain reconstruction according to an input sample batch number;
step 2) constructing a classification model by using the reconstructed source domain and target domain samples and storing a prediction result;
the step 1) comprises the following steps:
step 11) inputting the batch number a of the sample;
step 12) carrying out source domain reconstruction according to the batch number a, and when a is 1, DsSelecting an initial lot of labeled sample sets collected when the sensor is not drifting
Figure FDA0003568088060000011
n1Is the number of initial batch samples, otherwise, DsSample set with class prediction completed by previous batch of current target domain
Figure FDA0003568088060000012
And D1Common construction, i.e. Ds=D1∪DaWherein n isaFor the number of samples in batch a, when a is 1, there is no classification prediction result of the previous batch due to the first model construction, so Ds=D1The number of reconstructed source domain samples is:
Figure FDA0003568088060000013
the step 2) comprises the following steps:
step 21) inputting unlabeled a +1 batch target domain samples
Figure FDA0003568088060000014
ntIs the number of samples in the target domain;
step 22) analysis of X using principal ComponentssAnd XtDimension reduction to p dimension to generate subspace SsAnd St,Gd×pFor the set of all p-dimensional subspaces, each subspace is considered as the Grassman manifold space Gd×pAt one point above, let Φ (t) be Gd×pA geodesic line of (1), wherein t ∈ [0,1 ]],Φ(0)=SsAnd Φ (1) is StAs ends of a geodesic line, ziAnd zjIs xiAnd xjThe inner product of the projected feature vector in the infinite dimensional space is expressed as:
Figure FDA0003568088060000015
in the above formula xi,xj∈Ds∪DtAnd G denotes a geodesic core:
Figure FDA0003568088060000016
in the above formula RsFrom XsThe d-p dimensional feature composition, U, remaining after the P dimensional feature extraction by PCA1And U2Are orthogonal matrices and are solved by singular value decomposition12And Λ3For a diagonal matrix, the element values in the matrix are respectively:
Figure FDA0003568088060000017
mixing XsAnd XtSample feature space usage after projection
Figure FDA0003568088060000018
And
Figure FDA0003568088060000019
is shown in which
Figure FDA00035680880600000110
Step 23) Using ZsTraining a classifier by a k nearest neighbor algorithm with k equal to 1, and then converting Z into ZtBrought into the classifier to obtain pseudo labels
Figure FDA0003568088060000021
Step 24) Using ZsAnd ZtSelecting Gaussian kernels to construct kernel functions
Figure FDA0003568088060000022
Step 25) determining Z by k-nearest neighbor algorithmsAnd ZtThe neighbor relation of each point in the similarity matrix W is obtained:
Figure FDA0003568088060000023
Figure FDA0003568088060000024
in the above formula r (z)i,zj) 1 represents ziAnd zjAre in a mutual neighbor relationship; after obtaining W, calculating a Laplace matrix L:
Figure FDA0003568088060000025
in the above formula, D is a diagonal matrix consisting of
Figure FDA0003568088060000026
And calculating to obtain, wherein the manifold regular constraint term is expressed as:
Figure FDA0003568088060000027
step 26) for ZsAnd ZtPerforming conditional distribution self-adaptation, measuring the conditional distribution difference on a regeneration Hilbert space through the maximum mean difference, and approximating statistical estimation by using an empirical estimation formula:
Figure FDA0003568088060000028
where C represents the total number of classes of labels contained within the sample,
Figure FDA0003568088060000029
consists of two diagonal matrices, wherein:
Figure FDA00035680880600000210
Figure FDA00035680880600000211
Figure FDA00035680880600000212
represents ZsAnd ZtN with the middle label being llSet of classification results for individual samples, f denotes Gd×pThe following classification prediction function:
Figure FDA0003568088060000031
in the above formula, alpha ═ alpha12,...,αN]TFor coefficient vectors, the final calculation formula of the conditional distribution adaptive term is:
MMD2(HK,Qs,Qt)=tr(fTMf)
in the above formula, each element in M is directly calculated by the following formula:
Figure FDA0003568088060000032
according to the structure risk minimization principle, combining a manifold regularization term and a condition distribution self-adaptive term, and finally optimizing a target of a classifier f as follows:
Figure FDA0003568088060000033
in the above equation, U is an indication matrix of the domain where the sample is located, that is:
Figure FDA0003568088060000034
let the partial derivative of α in the optimization equation be 0 to solve for α:
α=(λ1I+(λ2M+λ3L+U)K)-1UYT
using f to complete pairs
Figure FDA0003568088060000035
Repeating step 26) e times to iteratively update M and α;
step 27) obtaining the prediction label of the sample of the batch
Figure FDA0003568088060000036
And storing the samples to wait for the input of the next batch of samples.
CN202010158546.5A 2020-03-09 2020-03-09 An online drift compensation method for sensors in a bionic olfactory system Active CN111474297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010158546.5A CN111474297B (en) 2020-03-09 2020-03-09 An online drift compensation method for sensors in a bionic olfactory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010158546.5A CN111474297B (en) 2020-03-09 2020-03-09 An online drift compensation method for sensors in a bionic olfactory system

Publications (2)

Publication Number Publication Date
CN111474297A CN111474297A (en) 2020-07-31
CN111474297B true CN111474297B (en) 2022-05-03

Family

ID=71747245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010158546.5A Active CN111474297B (en) 2020-03-09 2020-03-09 An online drift compensation method for sensors in a bionic olfactory system

Country Status (1)

Country Link
CN (1) CN111474297B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113030197B (en) * 2021-03-26 2022-11-04 哈尔滨工业大学 A kind of gas sensor drift compensation method
CN115808504B (en) * 2022-12-01 2024-06-04 哈尔滨工业大学 Online drift compensation method for gas sensor for concentration prediction

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5177994A (en) * 1991-05-22 1993-01-12 Suntory Limited And Tokyo Institute Of Technology Odor sensing system
CN1514239A (en) * 2003-07-23 2004-07-21 西安交通大学 A method for suppressing drift of a gas sensor
CN102507676A (en) * 2011-11-01 2012-06-20 重庆大学 On-line drift compensation method of electronic nose based on multiple self-organizing neural networks
CN103544392A (en) * 2013-10-23 2014-01-29 电子科技大学 Deep learning based medical gas identifying method
WO2015127085A1 (en) * 2014-02-19 2015-08-27 Ino Therapeutics Llc Methods for compensating long term sensitivity drift of electrochemical gas sensors exposed to nitric oxide
CN105891422A (en) * 2016-04-08 2016-08-24 重庆大学 Electronic nose gas identification method based on source domain migration extreme learning to realize drift compensation
CN109472303A (en) * 2018-10-30 2019-03-15 浙江工商大学 A Gas Sensor Drift Compensation Method Based on Self-Encoding Network Decision-Making
CN110146655A (en) * 2019-05-31 2019-08-20 重庆大学 An Anti-Drifting Method of Electronic Nose Based on Adaptive Subspace Learning Paradigm
CN110222785A (en) * 2019-06-13 2019-09-10 重庆大学 Self-adapting confidence degree Active Learning Method for gas sensor drift correction

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5177994A (en) * 1991-05-22 1993-01-12 Suntory Limited And Tokyo Institute Of Technology Odor sensing system
CN1514239A (en) * 2003-07-23 2004-07-21 西安交通大学 A method for suppressing drift of a gas sensor
CN102507676A (en) * 2011-11-01 2012-06-20 重庆大学 On-line drift compensation method of electronic nose based on multiple self-organizing neural networks
CN103544392A (en) * 2013-10-23 2014-01-29 电子科技大学 Deep learning based medical gas identifying method
WO2015127085A1 (en) * 2014-02-19 2015-08-27 Ino Therapeutics Llc Methods for compensating long term sensitivity drift of electrochemical gas sensors exposed to nitric oxide
CN105891422A (en) * 2016-04-08 2016-08-24 重庆大学 Electronic nose gas identification method based on source domain migration extreme learning to realize drift compensation
CN109472303A (en) * 2018-10-30 2019-03-15 浙江工商大学 A Gas Sensor Drift Compensation Method Based on Self-Encoding Network Decision-Making
CN110146655A (en) * 2019-05-31 2019-08-20 重庆大学 An Anti-Drifting Method of Electronic Nose Based on Adaptive Subspace Learning Paradigm
CN110222785A (en) * 2019-06-13 2019-09-10 重庆大学 Self-adapting confidence degree Active Learning Method for gas sensor drift correction

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Domain Adaptation Extreme Learning Machines for Drift Compensation in E-Nose Systems;Zhang Lei等;《IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT》;20150731;第64卷(第7期);1790-1801 *
基于域校正的电子鼻传感器漂移抑制方法研究;徐娟;《中国优秀博硕士学问论文全文数据库(硕士) 信息科技辑》;20200215(第6期);I140-343 *
基于堆栈自编码网络的气体传感器漂移补偿方法;宋艳玲;《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》;20190615(第6期);I140-139 *

Also Published As

Publication number Publication date
CN111474297A (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN109492822B (en) Temporal and spatial correlation prediction method of air pollutant concentration
CN109190537B (en) A multi-person pose estimation method based on mask-aware deep reinforcement learning
WO2022083624A1 (en) Model acquisition method, and device
CN109886066B (en) Rapid target detection method based on multi-scale and multi-layer feature fusion
CN109490814B (en) Metering automation terminal fault diagnosis method based on deep learning and support vector data description
CN111899254A (en) A method for automatic labeling of industrial product appearance defect images based on semi-supervised learning
CN109635763B (en) Crowd density estimation method
CN108563624A (en) A kind of spatial term method based on deep learning
CN111914085A (en) Text fine-grained sentiment classification method, system, device and storage medium
CN114693942A (en) Multimode fault understanding and auxiliary labeling method for intelligent operation and maintenance of instruments and meters
CN111046961B (en) Fault classification method based on bidirectional long short-term memory unit and capsule network
CN114863348A (en) Video target segmentation method based on self-supervision
US20210124982A1 (en) Method for rating a state of a three-dimensional test object, and corresponding rating system
CN111047078B (en) Traffic characteristic prediction method, system and storage medium
CN111474297B (en) An online drift compensation method for sensors in a bionic olfactory system
CN117851921B (en) Equipment life prediction method and device based on transfer learning
CN116826734B (en) Photovoltaic power generation prediction method and device based on multi-input model
CN116403042A (en) A method and device for defect detection of lightweight sanitary products
CN118962852B (en) A method and system for predicting marine weather based on neural network
CN114266301A (en) Intelligent prediction method of power equipment fault based on graph convolutional neural network
CN110263808B (en) An Image Sentiment Classification Method Based on LSTM Network and Attention Mechanism
CN112816616A (en) Blind-field-self-adaptive-based electronic nose drift compensation method
CN117610884A (en) A power dispatching system and method based on data management platform
CN117154256B (en) Electrochemical repair method of lithium battery
RU135434U1 (en) DEVICE FOR AUTOMATED SIGNAL IDENTIFICATION BASED ON NEURAL NETWORK

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
GR01 Patent grant
GR01 Patent grant