Movatterモバイル変換


[0]ホーム

URL:


CN114358164A - A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket Motor - Google Patents

A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket Motor
Download PDF

Info

Publication number
CN114358164A
CN114358164ACN202111622537.8ACN202111622537ACN114358164ACN 114358164 ACN114358164 ACN 114358164ACN 202111622537 ACN202111622537 ACN 202111622537ACN 114358164 ACN114358164 ACN 114358164A
Authority
CN
China
Prior art keywords
model
parameter
value
variational
dirichlet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111622537.8A
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 University of Aeronautics and Astronautics
Original Assignee
Nanjing University of Aeronautics and Astronautics
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 University of Aeronautics and AstronauticsfiledCriticalNanjing University of Aeronautics and Astronautics
Priority to CN202111622537.8ApriorityCriticalpatent/CN114358164A/en
Publication of CN114358164ApublicationCriticalpatent/CN114358164A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明公开了一种液体火箭发动机稳态阶段的分层贝叶斯变分推理故障诊断方法,首先根据液体火箭发动机稳态工作阶段选择故障类型和属性变量,使用最小描述长度离散化方法对连续型数值进行离散化处理,将非数值型数据转换为数值型,然后构建液体火箭发动机TAN结构故障分类模型,基于传统多项式‑狄利克雷模型,建立分层多项式‑狄利克雷模型,引入变分推理算法进一步优化,对液体火箭动机稳态工作状态故障进行分类;本发明提供的故障诊断方法,通过引入超先验,构建分层多项式‑狄利克雷模型,用于贝叶斯网络的参数估计,同时引入变分推理算法用于分层多项式‑狄利克雷模型的优化,计算联合后验分布,减少训练时间,提高参数估计的精度。

Figure 202111622537

The invention discloses a fault diagnosis method for hierarchical Bayesian variational reasoning in the steady-state stage of a liquid rocket motor. First, fault types and attribute variables are selected according to the steady-state working stage of the liquid rocket motor, and a minimum description length discretization method is used to analyze the continuous The non-numeric data is converted into numerical data, and then a liquid rocket engine TAN structural fault classification model is constructed. Based on the traditional polynomial-Dirichlet model, a hierarchical polynomial-Dirichlet model is established, and the variational model is introduced. The reasoning algorithm is further optimized to classify the steady-state working state faults of the liquid rocket motor; the fault diagnosis method provided by the present invention constructs a hierarchical polynomial-Dirichlet model by introducing a super-priority, which is used for parameter estimation of the Bayesian network At the same time, the variational inference algorithm is introduced to optimize the hierarchical polynomial-Dirichlet model, calculate the joint posterior distribution, reduce the training time, and improve the accuracy of parameter estimation.

Figure 202111622537

Description

Translated fromChinese
液体火箭发动机稳态阶段的分层贝叶斯变分推理故障诊断 方法Hierarchical Bayesian Variational Inference Fault Diagnosis Method for Steady-State Stage of Liquid Rocket Motor

技术领域technical field

本发明涉及液体火箭发动机故障诊断技术领域,主要涉及一种液体火箭发动机稳态阶段的分层贝叶斯变分推理故障诊断方法。The invention relates to the technical field of fault diagnosis of liquid rocket engines, and mainly relates to a fault diagnosis method for hierarchical Bayesian variational reasoning in a steady state stage of a liquid rocket engine.

背景技术Background technique

火箭发动机作为运载火箭推进动力的核心,其运行的高可靠性是航天发射任务顺利进行的重要保障。液体火箭发动机是在极端物理条件下运行的复杂热力学系统,其发生故障具有极端的快速性,并会造成极大的破坏性。采取高可靠性的发动机故障诊断系统,可以对发动机工作过程中出现的故障予以警示和判断,并能及时采取有效的措施,保证液体火箭和载荷的安全,确保发射任务的顺利进行。As the core of the propulsion power of the launch vehicle, the high reliability of the rocket engine is an important guarantee for the smooth progress of the space launch mission. Liquid rocket engines are complex thermodynamic systems operating under extreme physical conditions, and their failures are extremely rapid and destructive. Adopting a high-reliability engine fault diagnosis system can warn and judge the faults that occur during the engine operation, and take effective measures in time to ensure the safety of the liquid rocket and the payload, and ensure the smooth progress of the launch mission.

稀疏数据场景下,传统的多项式-狄利克雷模型存在一定的分类精度问题,是由于多项式分布和狄利克雷分布的共轭性,参数估计非常有效,但是在一个节点上需要估计的条件分布的数量呈指数级大小,即使在具有中等规模变量的贝叶斯网络中,参数估计的精度也不高。通过马尔科夫链蒙特卡罗(MCMC)方法对模型优化,计算联合后验分布,在处理大型数据时,MCMC方法需要大量的计算时间。In the sparse data scenario, the traditional polynomial-Dirichlet model has a certain classification accuracy problem. Due to the conjugation of the polynomial distribution and the Dirichlet distribution, the parameter estimation is very effective, but the conditional distribution that needs to be estimated on a node The numbers are exponentially large, and even in Bayesian networks with moderately large variables, the accuracy of parameter estimates is not high. The model is optimized by the Markov Chain Monte Carlo (MCMC) method to calculate the joint posterior distribution. When dealing with large data, the MCMC method requires a lot of computational time.

发明内容SUMMARY OF THE INVENTION

发明目的:针对上述背景技术中存在的问题,本发明提供了一种液体火箭发动机稳态阶段的分层贝叶斯变分推理故障诊断方法,通过引入超先验,构建分层多项式-狄利克雷模型,用于贝叶斯网络的参数估计,显著提升参数估计的精度。同时引入变分推理算法用于分层多项式-狄利克雷模型的优化,计算联合后验分布,减少训练时间,提高参数估计的精度,大大提高液体火箭发动机稳态工作阶段故障诊断过程中的效率以及故障诊断的准确性。Purpose of the invention: In view of the problems existing in the above background technology, the present invention provides a hierarchical Bayesian variational inference fault diagnosis method in the steady-state stage of a liquid rocket engine. By introducing a super-prior, a hierarchical polynomial-Dirich Ray model, used for parameter estimation of Bayesian network, significantly improves the accuracy of parameter estimation. At the same time, the variational inference algorithm is introduced to optimize the hierarchical polynomial-Dirichlet model, calculate the joint posterior distribution, reduce the training time, improve the accuracy of parameter estimation, and greatly improve the efficiency of the fault diagnosis process of the liquid rocket engine in the steady working stage. and the accuracy of fault diagnosis.

技术方案:为实现上述目的,本发明采用的技术方案为:Technical scheme: In order to realize the above-mentioned purpose, the technical scheme adopted in the present invention is:

一种液体火箭发动机稳态阶段的分层贝叶斯变分推理故障诊断方法,包括以下步骤:A fault diagnosis method for hierarchical Bayesian variational reasoning in the steady-state stage of a liquid rocket engine, comprising the following steps:

步骤S1、根据液体火箭发动机稳态工作阶段选择故障类型和属性变量,使用最小描述长度离散化方法对连续型数值进行离散化处理,将非数值型数据转换为数值型,且数据样本不含缺失值;Step S1, select the fault type and attribute variable according to the steady-state working stage of the liquid rocket engine, use the minimum description length discretization method to discretize the continuous numerical value, convert the non-numerical data into numerical type, and the data samples do not contain missing data value;

步骤S2、构建液体火箭发动机TAN结构故障分类模型;Step S2, constructing a liquid rocket engine TAN structural fault classification model;

步骤S3、基于传统多项式-狄利克雷模型,建立分层多项式-狄利克雷模型,引入变分推理算法进一步优化,对液体火箭动机稳态工作状态故障进行分类;Step S3, establishing a hierarchical polynomial-Dirichlet model based on the traditional polynomial-Dirichlet model, introducing a variational inference algorithm for further optimization, and classifying the steady-state working state faults of the liquid rocket motor;

步骤S4、从液体火箭发动机故障样本中抽取若干个实例构成训练集,估计TAN网络的参数,另外抽取不包括训练集样本的测试集,对测试集进行故障分类。Step S4, extracting several instances from the liquid rocket engine fault samples to form a training set, estimating the parameters of the TAN network, and extracting a test set excluding the training set samples, and classifying the faults on the test set.

进一步地,所述步骤S2中构建TAN结构故障分类模型的具体方法包括:Further, the specific method for constructing the TAN structural fault classification model in the step S2 includes:

步骤S2.1、基于步骤S1选择的属性变量,计算条件互信息:Step S2.1, based on the attribute variable selected in step S1, calculate the conditional mutual information:

Figure BDA0003438608810000021
Figure BDA0003438608810000021

其中,Xi与Xj代表两种属性变量,,C代表数据集,这里指训练集。将步骤S1中选择的属性变量作为树的节点,将各属性变量间的条件互信息作为节点间的边的权重,构建最大生成树;Among them, Xi and Xj represent two attribute variables, and C represents the data set, here refers to the training set. The attribute variable selected in step S1 is used as the node of the tree, the conditional mutual information between each attribute variable is used as the weight of the edge between the nodes, and the maximum spanning tree is constructed;

步骤S2.2、设置每条边的方向,将最上层类节点插入生成树中,使类节点指向每个属性节点,由此构成TAN结构故障分类模型。Step S2.2: Set the direction of each edge, insert the top-level class node into the spanning tree, and make the class node point to each attribute node, thereby forming a TAN structure fault classification model.

进一步地,所述步骤S3具体包括:Further, the step S3 specifically includes:

步骤S3.1、建立分层多项式-狄利克雷模型如下:Step S3.1, establish a hierarchical polynomial-Dirichlet model as follows:

设定α是一个隐随机向量,服从狄利克雷先验:Let α be a latent random vector obeying the Dirichlet prior:

α|s,α0~s·Dirichlet(α0)α|s,α0 ~s·Dirichlet(α0 )

Figure BDA0003438608810000022
Figure BDA0003438608810000022

Figure BDA0003438608810000023
Figure BDA0003438608810000023

其中等效样本量s和参数向量α0是模型的超参量,且元素和满足:where the equivalent sample size s and the parameter vector α0 are the hyperparameters of the model, and the element sum satisfies:

Figure BDA0003438608810000024
Figure BDA0003438608810000024

θX|Y的先验是狄利克雷混合分布:The prior for θX|Y is a Dirichlet mixture distribution:

Figure BDA0003438608810000025
Figure BDA0003438608810000025

上式中先验值不能对y进行因式分解,不同的条件分布的参数不再是先验独立的;The prior value in the above formula cannot factorize y, and the parameters of different conditional distributions are no longer independent a priori;

步骤S3.2、基于变分推理算法进一步优化求解参数的联合后验分布;Step S3.2, further optimizing the joint posterior distribution of the solution parameters based on the variational inference algorithm;

由n个独立同分布的观测值(xk,yk)组成的数据集,其中k=1,...,n,则参数的后验分布是狄利克雷混合分布:A dataset consisting of n independent and identically distributed observations (xk , yk ), where k=1,...,n, then the posterior distribution of the parameters is a Dirichlet mixture:

Figure BDA0003438608810000031
Figure BDA0003438608810000031

根据α的后验期望

Figure BDA0003438608810000032
定义上式的解;Posterior expectation according to α
Figure BDA0003438608810000032
Define the solution of the above formula;

θx|y的后验均值为:The posterior mean of θx|y is:

Figure BDA0003438608810000033
Figure BDA0003438608810000033

其中nxy表示θx|y的估计量的充分统计值,即X=x和Y=y条件下的观测数,

Figure BDA0003438608810000034
ny=∑x∈Xnxy表示变量Y的统计数。α的后验分布无法被解析地计算,表示如下:where nxy represents the sufficient statistics of the estimator of θx|y , that is, the number of observations under the conditions of X=x and Y=y,
Figure BDA0003438608810000034
ny =∑x∈X nxy represents the statistics of the variable Y. The posterior distribution of α cannot be computed analytically and is expressed as follows:

Figure BDA0003438608810000035
Figure BDA0003438608810000035

采用变分推理算法进行快速求解θX|Y和α的后验分布;具体地,The variational inference algorithm is used to quickly solve the posterior distribution of θX|Y and α; specifically,

步骤S3.2.1、通过分解分布估算p(θX|Y,α|D)如下:Step S3.2.1, estimate p(θX|Y , α|D) by decomposing the distribution as follows:

Figure BDA0003438608810000036
Figure BDA0003438608810000036

其中,θX|y和α为独立的随机变量;当

Figure BDA0003438608810000037
时,
Figure BDA0003438608810000038
Figure BDA0003438608810000039
且∑x∈χκx=1,为变分推理模型的参数,满足:Among them, θX|y and α are independent random variables; when
Figure BDA0003438608810000037
hour,
Figure BDA0003438608810000038
and
Figure BDA0003438608810000039
And ∑x∈χ κx =1, is the parameter of the variational inference model, which satisfies:

α|s,τ,κ~s·Dirichlet(τκ)α|s,τ,κ~s·Dirichlet(τκ)

Figure BDA00034386088100000310
Figure BDA00034386088100000310

Figure BDA00034386088100000311
Figure BDA00034386088100000311

令q(θX|y)=q(θX|y|vy)且q(α)=q(α|τ,κ);联合变分分布q(θX|y,α)是变分参数τ,κ和vy的函数,其中

Figure BDA00034386088100000312
Let q(θX|y )=q(θX|y |vy ) and q(α)=q(α|τ,κ); the joint variational distribution q(θX|y ,α) is the variation a function of the parameters τ, κ and vy , where
Figure BDA00034386088100000312

步骤S3.2.2、最小化后验分布p(θX|Y,α|D)和变分估计q(θX|y,α)之间的KL散度,求解变分推理模型参数τ,κ和vyStep S3.2.2. Minimize the KL divergence between the posterior distribution p(θX|Y ,α|D) and the variational estimation q(θX|y ,α), and solve the variational inference model parameters τ, κ and vy ;

最小化KL散度即为最大化边际似然log(p(D))的变分下限

Figure BDA0003438608810000041
Minimizing the KL divergence is maximizing the lower variational bound of the marginal likelihood log(p(D))
Figure BDA0003438608810000041

Figure BDA0003438608810000042
Figure BDA0003438608810000042

其中

Figure BDA0003438608810000043
表示变分分布q的均值;所述变分分布和后验分布之间的KL散度等于log(p(D))和
Figure BDA0003438608810000044
之间的差值,表示如下:in
Figure BDA0003438608810000043
represents the mean of the variational distribution q; the KL divergence between the variational distribution and the posterior is equal to log(p(D)) and
Figure BDA0003438608810000044
The difference between , expressed as follows:

Figure BDA0003438608810000045
Figure BDA0003438608810000045

特定情况下,在与变分推理模型近似的分层多项式-狄利克雷模型中,无法将

Figure BDA0003438608810000046
写为变分参数的解析函数,因此,对
Figure BDA0003438608810000047
的变分下限估算为
Figure BDA0003438608810000048
Figure BDA0003438608810000049
是参数的解析函数,满足:In certain cases, in a hierarchical polynomial-Dirichlet model approximated by a variational inference model, it is not possible to convert
Figure BDA0003438608810000046
An analytic function written as a variational argument, therefore, for
Figure BDA0003438608810000047
The lower bound of the variation is estimated as
Figure BDA0003438608810000048
Figure BDA0003438608810000049
is the analytic function of the parameter, satisfying:

Figure BDA00034386088100000410
Figure BDA00034386088100000410

Figure BDA00034386088100000411
Figure BDA00034386088100000411

其中vxy是参数向量vy的元素χ;通过计算

Figure BDA00034386088100000412
关于vxy的偏导数,并置为0,得到:where vxy is the element χ of the parameter vector vy ; by computing
Figure BDA00034386088100000412
The partial derivatives of vxy , juxtaposed to 0, yield:

Figure BDA00034386088100000413
Figure BDA00034386088100000413

其中,ψ(·)是digamma函数,代表log Gamma函数的导数;令上式等于0,则在给定参数向量κ的值时,可以求出参数vxy的估计值

Figure BDA00034386088100000414
Among them, ψ( ) is the digamma function, which represents the derivative of the log Gamma function; if the above formula is equal to 0, when the value of the parameter vector κ is given, the estimated value of the parameter vxy can be obtained
Figure BDA00034386088100000414

Figure BDA00034386088100000415
Figure BDA00034386088100000415

通过导出牛顿法求出τ值;使

Figure BDA0003438608810000051
最大化,需要计算
Figure BDA0003438608810000052
关于τ的一阶和二阶偏导数;
Figure BDA0003438608810000053
对τ求偏导如下:Find the value of τ by deriving Newton's method; let
Figure BDA0003438608810000051
to maximize, need to calculate
Figure BDA0003438608810000052
the first and second partial derivatives with respect to τ;
Figure BDA0003438608810000053
The partial derivative with respect to τ is as follows:

Figure BDA0003438608810000054
Figure BDA0003438608810000054

Figure BDA0003438608810000055
对τ求二阶偏导如下:
Figure BDA0003438608810000055
The second-order partial derivative with respect to τ is as follows:

Figure BDA0003438608810000056
Figure BDA0003438608810000056

由于参数τ总是正值,推导出更新log(τ)的牛顿算法;定义Since the parameter τ is always positive, derive Newton's algorithm for updating log(τ); define

Figure BDA0003438608810000057
Figure BDA0003438608810000057

Figure BDA0003438608810000058
Figure BDA0003438608810000058

则:but:

Figure BDA0003438608810000059
Figure BDA0003438608810000059

Figure BDA00034386088100000510
Figure BDA00034386088100000510

设定已知参数向量κ为固定值,则步骤κ处的牛顿更新如下:Set the known parameter vector κ as a fixed value, then the Newton update at step κ is as follows:

Figure BDA0003438608810000061
Figure BDA0003438608810000061

更新后的参数τk+1为:The updated parameter τk+1 is:

τk+1=τk exp(Δlog(τk))τk+1k exp(Δlog(τk ))

上式即为参数τ的迭代公式;The above formula is the iterative formula of the parameter τ;

通过导出牛顿法求出κ值;使

Figure BDA0003438608810000062
最大化,需要计算
Figure BDA0003438608810000063
关于κx'的一阶和二阶偏导数;
Figure BDA0003438608810000064
关于κx'的偏导数为:Obtain the κ value by deriving Newton's method; let
Figure BDA0003438608810000062
to maximize, need to calculate
Figure BDA0003438608810000063
the first and second partial derivatives with respect to κx' ;
Figure BDA0003438608810000064
The partial derivative with respect to κx' is:

Figure BDA0003438608810000065
Figure BDA0003438608810000065

Figure BDA0003438608810000066
关于κx'的二阶偏导数为:
Figure BDA0003438608810000066
The second order partial derivative with respect to κx' is:

Figure BDA0003438608810000067
Figure BDA0003438608810000067

其中所有二阶混合导数

Figure BDA0003438608810000068
都等于0;由于∑x∈χκx=1,使用约束牛顿法优化
Figure BDA0003438608810000069
在步骤k中,需要获得牛顿更新Δκk,使
Figure BDA0003438608810000071
因此求解系统:where all second-order mixed derivatives
Figure BDA0003438608810000068
are equal to 0; since ∑x∈χ κx =1, the constrained Newton method is used to optimize
Figure BDA0003438608810000069
In step k, the Newton update Δκk needs to be obtained so that
Figure BDA0003438608810000071
So solve the system:

Figure BDA0003438608810000072
Figure BDA0003438608810000072

其中u的元素是有约束的对偶变量,Hk是步骤k的hessian矩阵,1是恒等矩阵,gk是步骤k的梯度向量;定义:where the elements of u are constrained dual variables, Hk is the hessian matrix of step k, 1 is the identity matrix, and gk is the gradient vector of step k; definition:

Figure BDA0003438608810000073
Figure BDA0003438608810000073

Figure BDA0003438608810000074
Figure BDA0003438608810000074

给定参数τ和v的值,梯度向量的元素x表达如下:Given the values of the parameters τ and v, the element x of the gradient vector is expressed as:

Figure BDA0003438608810000075
Figure BDA0003438608810000075

在特定情况下,hessian矩阵的元素

Figure BDA0003438608810000076
是对角阵,即H=diag(hk);因此,向量元素x的约束牛顿步骤是In a specific case, the elements of the hessian matrix
Figure BDA0003438608810000076
is a diagonal matrix, that is, H=diag(hk ); therefore, the constrained Newton step for vector element x is

Figure BDA0003438608810000077
Figure BDA0003438608810000077

所以参数κ的迭代公式为:

Figure BDA0003438608810000078
So the iterative formula of parameter κ is:
Figure BDA0003438608810000078

步骤S3.2.3、不断迭代,获取变分推理模型参数vy,τ和κ的值;具体地,Step S3.2.3, iterate continuously to obtain the values of the variational inference model parameters vy , τ and κ; specifically,

步骤L1、指定参数vy,τ和κ的初始值

Figure BDA0003438608810000079
其中
Figure BDA00034386088100000710
指定外部优化的最大迭代次数maxiter1和最大误差tol1;Step L1, specify the initial values of parameters vy , τ and κ
Figure BDA0003438608810000079
in
Figure BDA00034386088100000710
Specify the maximum number of iterations maxiter1 and the maximum error tol1 for external optimization;

步骤L2、当迭代次数K<maxiter1或相邻两次更新差值tolerance>tol1时,更新vy的估计值,即计算在

Figure BDA00034386088100000711
Figure BDA00034386088100000712
时,
Figure BDA00034386088100000713
的值;Step L2, when the number of iterations K < maxiter1 or the difference tolerance of two adjacent updates > tol1 , update the estimated value of vy , that is, calculate in
Figure BDA00034386088100000711
and
Figure BDA00034386088100000712
hour,
Figure BDA00034386088100000713
the value of;

步骤L3、指定内部优化的初始值,即

Figure BDA00034386088100000714
指定内部优化的最大迭代次数maxiter2和最大误差tol2;Step L3, specify the initial value of the internal optimization, that is
Figure BDA00034386088100000714
Specify the maximum number of iterations maxiter2 and the maximum error tol2 for internal optimization;

步骤L4、当迭代次数k<maxiter2或相邻两次更新差值tolerance>tol2时,更新τ的估计值,即计算

Figure BDA0003438608810000081
Figure BDA0003438608810000082
时,
Figure BDA0003438608810000083
的值;同时更新κ的估计值,即计算在
Figure BDA0003438608810000084
Figure BDA0003438608810000085
时,
Figure BDA0003438608810000086
的值;增加迭代次数k;Step L4, when the number of iterations k < maxiter2 or the difference tolerance between two adjacent updates > tol2 , update the estimated value of τ, that is, calculate
Figure BDA0003438608810000081
and
Figure BDA0003438608810000082
hour,
Figure BDA0003438608810000083
; at the same time update the estimated value of κ, that is, calculate the
Figure BDA0003438608810000084
and
Figure BDA0003438608810000085
hour,
Figure BDA0003438608810000086
The value of ; increase the number of iterations k;

步骤L5、将

Figure BDA0003438608810000087
Figure BDA0003438608810000088
定义为内循环中获得的τ和κ的估计值,增加迭代次数K;外循环中获得的vy,τ和κ的值即为
Figure BDA0003438608810000089
Figure BDA00034386088100000811
Figure BDA00034386088100000810
Step L5, will
Figure BDA0003438608810000087
and
Figure BDA0003438608810000088
Defined as the estimated values of τ and κ obtained in the inner loop, increasing the number of iterations K; the values of vy , τ and κ obtained in the outer loop are
Figure BDA0003438608810000089
Figure BDA00034386088100000811
and
Figure BDA00034386088100000810

有益效果:Beneficial effects:

本发明提供的液体火箭发动机稳态阶段的分层贝叶斯变分推理故障诊断方法,可以针对离散动态系统进行故障诊断,采用的分层模型与传统模型相比,能够显著提高参数估计的精度,且训练样本越少,分层模型的优势越明显。通过构建虚拟节点,将底层贝叶斯网络的推理结果作为不确定性证据,输入到对应的上层网络节点中,可以代替该底层贝叶斯网络,改进了分类分布的估计。引入变分推理算法优化模型,因为参数的后验分布没有解析解,分解分布得到变分模型的参数,通过对变分参数之间的依赖性来重构参数之间的依赖性,通过最小化后验分布和变分估计之间的KL散度对这些参数进行求解。与传统的马尔科夫链-蒙特卡洛方法相比,变分推理算法训练时间和参数估计精度都优于后者。The layered Bayesian variational reasoning fault diagnosis method in the steady state stage of the liquid rocket engine provided by the invention can perform fault diagnosis for discrete dynamic systems, and the layered model adopted can significantly improve the accuracy of parameter estimation compared with the traditional model. , and the fewer training samples, the more obvious the advantage of the hierarchical model. By constructing virtual nodes, the inference results of the underlying Bayesian network are used as uncertainty evidence and input to the corresponding upper-level network nodes, which can replace the underlying Bayesian network and improve the estimation of the classification distribution. The variational inference algorithm is introduced to optimize the model, because the posterior distribution of the parameters has no analytical solution, the parameters of the variational model are obtained by decomposing the distribution, and the dependence between the parameters is reconstructed by the dependence between the variational parameters. These parameters are solved for by the KL divergence between the posterior distribution and the variational estimate. Compared with the traditional Markov chain-Monte Carlo method, the variational inference algorithm has better training time and parameter estimation accuracy than the latter.

附图说明Description of drawings

图1是本发明提供的分层模型结合贝叶斯网络的有向图;Fig. 1 is the directed graph of the layered model provided by the present invention in conjunction with the Bayesian network;

图2是本发明实施例中液体火箭发动机故障分类的TAN结构图;Fig. 2 is the TAN structure diagram of liquid rocket engine fault classification in the embodiment of the present invention;

图3是本发明实施例中分层模型与传统模型的ROC曲线比较。FIG. 3 is a comparison of the ROC curves of the hierarchical model and the traditional model in the embodiment of the present invention.

图4是本发明实施例中分层模型与传统模型的KL散度箱型图比较;Fig. 4 is the KL divergence box plot comparison of the hierarchical model and the traditional model in the embodiment of the present invention;

图5是本发明实施例中分层模型与传统模型的ROC面积箱型图比较。FIG. 5 is a comparison of the ROC area box plot of the layered model and the traditional model in the embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明作更进一步的说明。显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The present invention will be further described below in conjunction with the accompanying drawings. Obviously, the described embodiments are some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

步骤S1、根据液体火箭发动机稳态工作阶段选择故障类型和属性变量,从试车数据中选择7类易发生的故障类型,共包含22个属性变量。故障类型和属性变量如下表1和表2所示。使用最小描述长度离散化方法对连续型数值进行离散化,将非数值型数据转换为数值型,且数据样本不含缺失值。Step S1 , selecting fault types and attribute variables according to the steady-state working stage of the liquid rocket engine, and selecting 7 types of fault types that are prone to occur from the test data, including a total of 22 attribute variables. The fault type and attribute variables are shown in Tables 1 and 2 below. Use the minimum description length discretization method to discretize continuous numeric values, convert non-numeric data to numeric, and the data samples do not contain missing values.

表1液体火箭发动机易发生故障类型Table 1 Liquid rocket engine prone to failure types

Figure BDA0003438608810000091
Figure BDA0003438608810000091

表2特征属性变量选择情况Table 2 Feature attribute variable selection

Figure BDA0003438608810000092
Figure BDA0003438608810000092

步骤S2、构建液体火箭发动机TAN结构故障分类模型。具体地,Step S2, constructing a liquid rocket engine TAN structural fault classification model. specifically,

步骤S2.1、基于步骤S1选择的属性变量,计算条件互信息:Step S2.1, based on the attribute variable selected in step S1, calculate the conditional mutual information:

Figure BDA0003438608810000093
Figure BDA0003438608810000093

其中,Xi与Xj代表两种属性变量,C代表数据集,这里指训练集。将从上表2中选择的属性变量作为树的节点,将各属性变量间的条件互信息作为节点间的边的权重,构建最大生成树;Among them, Xi and Xj represent two attribute variables, C represents the data set, here refers to the training set. The attribute variables selected from the above table 2 are used as the nodes of the tree, and the conditional mutual information between the attribute variables is used as the weight of the edges between the nodes to construct a maximum spanning tree;

步骤S2.2、设置每条边的方向,将最上层类节点插入生成树中,使类节点指向每个属性节点,由此构成TAN结构故障分类模型如图2所示。除了类节点外,每个节点至多只有一个属性节点作为该节点的父节点。各节点之间的依赖关系也反应出在实际情况下,属性之间的相互关系。Step S2.2: Set the direction of each edge, insert the top-level class node into the spanning tree, and make the class node point to each attribute node, thus forming a TAN structure fault classification model as shown in Figure 2. Except for class nodes, each node has at most one attribute node as the parent node of the node. The dependencies between nodes also reflect the interrelationships between attributes in actual situations.

步骤S3、基于传统多项式-狄利克雷模型,建立分层多项式-狄利克雷模型,引入变分推理算法进一步优化,对液体火箭动机稳态工作状态故障进行分类。具体地,Step S3, based on the traditional polynomial-Dirichlet model, establish a hierarchical polynomial-Dirichlet model, introduce a variational inference algorithm for further optimization, and classify the steady-state working state faults of the liquid rocket motor. specifically,

步骤S3.1、建立分层多项式-狄利克雷模型如下:Step S3.1, establish a hierarchical polynomial-Dirichlet model as follows:

设定α是一个隐随机向量,服从狄利克雷先验:Let α be a latent random vector obeying the Dirichlet prior:

α|s,α0~s·Dirichlet(α0)α|s,α0 ~s·Dirichlet(α0 )

Figure BDA0003438608810000101
Figure BDA0003438608810000101

Figure BDA0003438608810000102
Figure BDA0003438608810000102

其中等效样本量s和参数向量α0是模型的超参量,且元素和满足:where the equivalent sample size s and the parameter vector α0 are the hyperparameters of the model, and the element sum satisfies:

Figure BDA0003438608810000103
Figure BDA0003438608810000103

θX|Y的先验是狄利克雷混合分布:The prior for θX|Y is a Dirichlet mixture distribution:

Figure BDA0003438608810000104
Figure BDA0003438608810000104

上式中先验值不能对y进行因式分解,不同的条件分布的参数不再是先验独立的;The prior value in the above formula cannot factorize y, and the parameters of different conditional distributions are no longer independent a priori;

步骤S3.2、基于变分推理算法进一步优化求解参数的联合后验分布;Step S3.2, further optimizing the joint posterior distribution of the solution parameters based on the variational inference algorithm;

由n个独立同分布的观测值(xk,yk)组成的数据集,其中k=1,...,n,则参数的后验分布是狄利克雷混合分布:A dataset consisting of n independent and identically distributed observations (xk , yk ), where k=1,...,n, then the posterior distribution of the parameters is a Dirichlet mixture:

Figure BDA0003438608810000105
Figure BDA0003438608810000105

α的值在确定θX|Y的后验分布时具有较高的权重。上式没有封闭形式的解,因此,将其表示为后验期望。这些量是根据α的后验期望定义的,表示为

Figure BDA0003438608810000106
The value of α has a higher weight in determining the posterior distribution of θX|Y . There is no closed-form solution to the above equation, so it is expressed as the posterior expectation. These quantities are defined in terms of the posterior expectation of α, expressed as
Figure BDA0003438608810000106

θx|y的后验均值为:The posterior mean of θx|y is:

Figure BDA0003438608810000107
Figure BDA0003438608810000107

其中nxy表示θx|y的估计量的充分统计值,即X=x和Y=y条件下的观测数,

Figure BDA0003438608810000108
ny=∑x∈Xnxy表示变量Y的统计数。α的后验分布无法被解析地计算,表示如下:where nxy represents the sufficient statistics of the estimator of θx|y , that is, the number of observations under the conditions of X=x and Y=y,
Figure BDA0003438608810000108
ny =∑x∈X nxy represents the statistics of the variable Y. The posterior distribution of α cannot be computed analytically and is expressed as follows:

Figure BDA0003438608810000111
Figure BDA0003438608810000111

采用变分推理算法进行快速求解θX|Y和α的后验分布;具体地,The variational inference algorithm is used to quickly solve the posterior distribution of θX|Y and α; specifically,

步骤S3.2.1、通过分解分布估算p(θX|Y,α|D)如下:Step S3.2.1, estimate p(θX|Y , α|D) by decomposing the distribution as follows:

Figure BDA0003438608810000112
Figure BDA0003438608810000112

其中,θX|y和α为独立的随机变量;当

Figure BDA0003438608810000113
时,
Figure BDA0003438608810000114
Figure BDA0003438608810000115
且∑x∈χκx=1,为变分推理模型的参数,满足:Among them, θX|y and α are independent random variables; when
Figure BDA0003438608810000113
hour,
Figure BDA0003438608810000114
and
Figure BDA0003438608810000115
And ∑x∈χ κx =1, is the parameter of the variational inference model, which satisfies:

α|s,τ,κ~s·Dirichlet(τκ)α|s,τ,κ~s·Dirichlet(τκ)

Figure BDA0003438608810000116
Figure BDA0003438608810000116

Figure BDA0003438608810000117
Figure BDA0003438608810000117

令q(θX|y)=q(θX|y|vy)且q(α)=q(α|τ,κ);联合变分分布q(θX|y,α)是变分参数τ,κ和vy的函数,其中

Figure BDA0003438608810000118
Let q(θX|y )=q(θX|y |vy ) and q(α)=q(α|τ,κ); the joint variational distribution q(θX|y ,α) is the variation a function of the parameters τ, κ and vy , where
Figure BDA0003438608810000118

步骤S3.2.2、最小化后验分布p(θX|Y,α|D)和变分估计q(θX|y,α)之间的KL散度,求解变分推理模型参数τ,κ和vyStep S3.2.2. Minimize the KL divergence between the posterior distribution p(θX|Y ,α|D) and the variational estimation q(θX|y ,α), and solve the variational inference model parameters τ, κ and vy ;

最小化KL散度即为最大化边际似然log(p(D))的变分下限

Figure BDA0003438608810000119
Minimizing the KL divergence is maximizing the lower variational bound of the marginal likelihood log(p(D))
Figure BDA0003438608810000119

Figure BDA00034386088100001110
Figure BDA00034386088100001110

其中

Figure BDA00034386088100001111
表示变分分布q的均值;所述变分分布和后验分布之间的KL散度等于log(p(D))和
Figure BDA00034386088100001112
之间的差值,表示如下:in
Figure BDA00034386088100001111
represents the mean of the variational distribution q; the KL divergence between the variational distribution and the posterior is equal to log(p(D)) and
Figure BDA00034386088100001112
The difference between , expressed as follows:

Figure BDA00034386088100001113
Figure BDA00034386088100001113

特定情况下,在与变分推理模型近似的分层多项式-狄利克雷模型中,无法将

Figure BDA00034386088100001114
写为变分参数的解析函数,因此,对
Figure BDA00034386088100001115
的变分下限估算为
Figure BDA00034386088100001116
Figure BDA00034386088100001117
是参数的解析函数,满足:In certain cases, in a hierarchical polynomial-Dirichlet model approximated by a variational inference model, it is not possible to convert
Figure BDA00034386088100001114
An analytic function written as a variational argument, therefore, for
Figure BDA00034386088100001115
The lower bound of the variation is estimated as
Figure BDA00034386088100001116
Figure BDA00034386088100001117
is the analytic function of the parameter, satisfying:

Figure BDA0003438608810000121
Figure BDA0003438608810000121

Figure BDA0003438608810000122
Figure BDA0003438608810000122

其中vxy是参数向量vy的元素χ;通过计算

Figure BDA0003438608810000123
关于vxy的偏导数,并置为0,得到:where vxy is the element χ of the parameter vector vy ; by computing
Figure BDA0003438608810000123
The partial derivatives of vxy , juxtaposed to 0, yield:

Figure BDA0003438608810000124
Figure BDA0003438608810000124

其中,ψ(·)是digamma函数,代表log Gamma函数的导数;令上式等于0,则在给定参数向量κ的值时,可以求出参数vxy的估计值

Figure BDA0003438608810000125
Among them, ψ( ) is the digamma function, which represents the derivative of the log Gamma function; if the above formula is equal to 0, when the value of the parameter vector κ is given, the estimated value of the parameter vxy can be obtained
Figure BDA0003438608810000125

Figure BDA0003438608810000126
Figure BDA0003438608810000126

通过导出牛顿法求出τ值;使

Figure BDA0003438608810000127
最大化,需要计算
Figure BDA0003438608810000128
关于τ的一阶和二阶偏导数;
Figure BDA0003438608810000129
对τ求偏导如下:Find the value of τ by deriving Newton's method; let
Figure BDA0003438608810000127
to maximize, need to calculate
Figure BDA0003438608810000128
the first and second partial derivatives with respect to τ;
Figure BDA0003438608810000129
The partial derivative with respect to τ is as follows:

Figure BDA00034386088100001210
Figure BDA00034386088100001210

Figure BDA00034386088100001211
对τ求二阶偏导如下:
Figure BDA00034386088100001211
The second-order partial derivative with respect to τ is as follows:

Figure BDA0003438608810000131
Figure BDA0003438608810000131

由于参数τ总是正值,推导出更新log(τ)的牛顿算法;定义Since the parameter τ is always positive, derive Newton's algorithm for updating log(τ); define

Figure BDA0003438608810000132
Figure BDA0003438608810000132

Figure BDA0003438608810000133
Figure BDA0003438608810000133

则:but:

Figure BDA0003438608810000134
Figure BDA0003438608810000134

Figure BDA0003438608810000135
Figure BDA0003438608810000135

设定已知参数向量κ为固定值,则步骤κ处的牛顿更新如下:Set the known parameter vector κ as a fixed value, then the Newton update at step κ is as follows:

Figure BDA0003438608810000136
Figure BDA0003438608810000136

更新后的参数τk+1为:The updated parameter τk+1 is:

τk+1=τk exp(Δlog(τk))τk+1k exp(Δlog(τk ))

上式即为参数τ的迭代公式;The above formula is the iterative formula of the parameter τ;

通过导出牛顿法求出κ值;使

Figure BDA0003438608810000137
最大化,需要计算
Figure BDA0003438608810000138
关于κx一阶和二阶偏导数;Obtain the κ value by deriving Newton's method; let
Figure BDA0003438608810000137
to maximize, need to calculate
Figure BDA0003438608810000138
with respect to the first and second partial derivatives of κx ;

Figure BDA0003438608810000139
关于κx'的偏导数为:
Figure BDA0003438608810000139
The partial derivative with respect to κx' is:

Figure BDA0003438608810000141
Figure BDA0003438608810000141

Figure BDA0003438608810000142
关于κx'的二阶偏导数为:
Figure BDA0003438608810000142
The second order partial derivative with respect to κx' is:

Figure BDA0003438608810000143
Figure BDA0003438608810000143

其中所有二阶混合导数

Figure BDA0003438608810000144
都等于0;由于∑x∈χκx=1,使用约束牛顿法优化
Figure BDA0003438608810000145
在步骤k中,需要获得牛顿更新Δκk,使
Figure BDA0003438608810000146
因此求解系统:where all second-order mixed derivatives
Figure BDA0003438608810000144
are equal to 0; since ∑x∈χ κx =1, the constrained Newton method is used to optimize
Figure BDA0003438608810000145
In step k, the Newton update Δκk needs to be obtained so that
Figure BDA0003438608810000146
So solve the system:

Figure BDA0003438608810000147
Figure BDA0003438608810000147

其中u的元素是有约束的对偶变量,Hk是步骤k的hessian矩阵,1是恒等矩阵,gk是步骤k的梯度向量;定义:where the elements of u are constrained dual variables, Hk is the hessian matrix of step k, 1 is the identity matrix, and gk is the gradient vector of step k; definition:

Figure BDA0003438608810000148
Figure BDA0003438608810000148

Figure BDA0003438608810000149
Figure BDA0003438608810000149

给定参数τ和v的值,梯度向量的元素x表达如下:Given the values of the parameters τ and v, the element x of the gradient vector is expressed as:

Figure BDA0003438608810000151
Figure BDA0003438608810000151

在特定情况下,hessian矩阵的元素

Figure BDA0003438608810000152
是对角阵,即H=diag(hk);因此,向量元素x的约束牛顿步骤是In a specific case, the elements of the hessian matrix
Figure BDA0003438608810000152
is a diagonal matrix, i.e. H=diag(hk ); therefore, the constrained Newton step for the vector element x is

Figure BDA0003438608810000153
Figure BDA0003438608810000153

所以参数κ的迭代公式为:

Figure BDA0003438608810000154
So the iterative formula of parameter κ is:
Figure BDA0003438608810000154

步骤S3.2.3、不断迭代,获取变分推理模型参数vy,τ和κ的值;具体地,Step S3.2.3, iterate continuously to obtain the values of the variational inference model parameters vy , τ and κ; specifically,

步骤L1、指定参数vy,τ和κ的初始值

Figure BDA0003438608810000155
其中
Figure BDA0003438608810000156
指定外部优化的最大迭代次数maxiter1和最大误差tol1;Step L1, specify the initial values of parameters vy , τ and κ
Figure BDA0003438608810000155
in
Figure BDA0003438608810000156
Specify the maximum number of iterations maxiter1 and the maximum error tol1 for external optimization;

步骤L2、当迭代次数K<maxiter1或相邻两次更新差值tolerance>tol1时,更新vy的估计值,即计算在

Figure BDA0003438608810000157
Figure BDA0003438608810000158
时,
Figure BDA0003438608810000159
的值;Step L2, when the number of iterations K < maxiter1 or the difference tolerance of two adjacent updates > tol1 , update the estimated value of vy , that is, calculate in
Figure BDA0003438608810000157
and
Figure BDA0003438608810000158
hour,
Figure BDA0003438608810000159
the value of;

步骤L3、指定内部优化的初始值,即

Figure BDA00034386088100001510
指定内部优化的最大迭代次数maxiter2和最大误差tol2;Step L3, specify the initial value of the internal optimization, that is
Figure BDA00034386088100001510
Specify the maximum number of iterations maxiter2 and the maximum error tol2 for internal optimization;

步骤L4、当迭代次数k<maxiter2或相邻两次更新差值tolerance>tol2时,更新τ的估计值,即计算

Figure BDA00034386088100001511
Figure BDA00034386088100001512
时,
Figure BDA00034386088100001513
的值;同时更新κ的估计值,即计算在
Figure BDA00034386088100001514
Figure BDA00034386088100001515
时,
Figure BDA00034386088100001516
的值;增加迭代次数k;Step L4, when the number of iterations k < maxiter2 or the difference tolerance between two adjacent updates > tol2 , update the estimated value of τ, that is, calculate
Figure BDA00034386088100001511
and
Figure BDA00034386088100001512
hour,
Figure BDA00034386088100001513
; at the same time update the estimated value of κ, that is, calculate the
Figure BDA00034386088100001514
and
Figure BDA00034386088100001515
hour,
Figure BDA00034386088100001516
The value of ; increase the number of iterations k;

步骤L5、将

Figure BDA00034386088100001517
Figure BDA00034386088100001518
定义为内循环中获得的τ和κ的估计值,增加迭代次数K;外循环中获得的vy,τ和κ的值即为
Figure BDA00034386088100001519
Figure BDA00034386088100001521
Figure BDA00034386088100001520
Step L5, will
Figure BDA00034386088100001517
and
Figure BDA00034386088100001518
Defined as the estimated values of τ and κ obtained in the inner loop, increasing the number of iterations K; the values of vy , τ and κ obtained in the outer loop are
Figure BDA00034386088100001519
Figure BDA00034386088100001521
and
Figure BDA00034386088100001520

步骤S4、对液体火箭发动机稳态工作状态故障进行分类,验证不同样本量对传统模型和分层模型的影响。从液体火箭发动机故障样本中随机抽取n行数据构成训练集进行实验,其中n∈{20,40,80,160,320}。对于每个不同的n值,重复10次以下过程:Step S4 , classifying the liquid rocket engine steady-state working state faults, and verifying the influence of different sample sizes on the traditional model and the layered model. Randomly select n rows of data from liquid rocket engine failure samples to form a training set for experiments, where n ∈ {20, 40, 80, 160, 320}. For each different value of n, repeat the following process 10 times:

步骤1、从液体火箭发动机故障样本中抽取n个实例构成训练集。Step 1. Extract n instances from the liquid rocket engine failure samples to form a training set.

步骤2、从训练集中估计TAN网络的参数。Step 2. Estimate the parameters of the TAN network from the training set.

步骤3、从液体火箭发动机故障样本中随机抽取不包含训练集的1000个实例,构成测试集。Step 3. Randomly select 1000 instances from the liquid rocket engine failure samples that do not contain the training set to form a test set.

步骤4、对测试集进行分类。Step 4. Classify the test set.

对于传统的BDeu先验,设置

Figure BDA0003438608810000161
进行参数估计。对于分层模型,设置
Figure BDA0003438608810000162
Figure BDA0003438608810000163
设置变分推理算法迭代的终止条件为迭代次数大于1000次或相邻两次迭代的差值小于10-6。另外,除了均方误差MSE,将KL散度也作为衡量参数估计精度的指标,同时使用ROC曲线下的面积衡量分类器的分类性能。For traditional BDeu priors, set
Figure BDA0003438608810000161
Perform parameter estimation. For hierarchical models, set
Figure BDA0003438608810000162
and
Figure BDA0003438608810000163
The termination condition of the iteration of the variational inference algorithm is set as the number of iterations is greater than 1000 or the difference between two adjacent iterations is less than 10-6 . In addition, in addition to the mean square error MSE, the KL divergence is also used as an indicator to measure the accuracy of parameter estimation, and the area under the ROC curve is used to measure the classification performance of the classifier.

以n=20为例,分层模型下训练集的分类结果分别如下表3-4所示。Taking n=20 as an example, the classification results of the training set under the hierarchical model are shown in Table 3-4 below.

表3液体火箭发动机的故障数据的混淆矩阵Table 3 Confusion matrix of failure data for liquid rocket engines

Figure BDA0003438608810000164
Figure BDA0003438608810000164

表4故障分类评价指标Table 4 Fault classification evaluation index

Figure BDA0003438608810000165
Figure BDA0003438608810000165

将n=20时,分层模型和传统模型对训练集的分类结果绘制成ROC曲线,如图3所示。When n=20, the classification results of the hierarchical model and the traditional model on the training set are drawn as ROC curves, as shown in Figure 3.

尽管训练样本集的实例数仅有20个,但是建立的分层模型对实例数为1000的测试集进行分类,ROC曲线下面积仍然达到0.939,而传统模型仅有0.732。对比发现,当样本实例较少,相比于传统模型,分层模型对于贝叶斯网络参数估计的提升是巨大的。这也表明,分层模型用于贝叶斯网络的参数估计十分有效。Although the number of instances in the training sample set is only 20, the established hierarchical model classifies the test set with 1000 instances, and the area under the ROC curve still reaches 0.939, while the traditional model is only 0.732. The comparison shows that when there are few sample instances, compared with the traditional model, the hierarchical model can greatly improve the parameter estimation of the Bayesian network. It also shows that the hierarchical model is very effective for parameter estimation of Bayesian network.

为了比较两种模型各方面性能的差异,针对不同的样本数量,还绘制了KL散度和ROC曲线面积图,如图4-5所示。In order to compare the performance differences of the two models in various aspects, KL divergence and ROC curve area graphs are also drawn for different sample sizes, as shown in Figure 4-5.

从KL散度的计算结果来看,分层模型在参数估计精度上优于传统模型,且当样本中包含实例数量越少,这种优势越明显。尽管随着样本实例n不断增大,两者之前的参数估计精度的差异越来越小,但是分层模型的表现仍然优于传统模型。从ROC曲线的面积来看,分层模型具有较高的分类精度,且样本实例数量越少,差距越明显。随着训练集样本实例数不断增加,分层模型的ROC曲线下的面积接近于1,且分类结果较为稳定。From the calculation results of KL divergence, the hierarchical model is superior to the traditional model in parameter estimation accuracy, and when the sample contains fewer instances, the advantage is more obvious. Although the difference between the two previous parameter estimation accuracies becomes smaller as the sample instance n increases, the hierarchical model still outperforms the traditional model. From the area of the ROC curve, the hierarchical model has higher classification accuracy, and the smaller the number of sample instances, the more obvious the gap is. As the number of sample instances in the training set increases, the area under the ROC curve of the hierarchical model is close to 1, and the classification results are relatively stable.

以上所述仅是本发明的优选实施方式,应当指出:对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only the preferred embodiment of the present invention, it should be pointed out that: for those skilled in the art, without departing from the principle of the present invention, several improvements and modifications can also be made, and these improvements and modifications are also It should be regarded as the protection scope of the present invention.

Claims (3)

1. A layered Bayes variational reasoning fault diagnosis method for a steady-state stage of a liquid rocket engine is characterized by comprising the following steps:
s1, selecting a fault type and an attribute variable according to a steady-state working stage of the liquid rocket engine, discretizing a continuous numerical value by using a minimum description length discretization method, converting non-numerical data into a numerical value, wherein a data sample does not contain a missing value;
s2, constructing a TAN structure fault classification model of the liquid rocket engine;
step S3, establishing a layered polynomial-Dirichlet model based on the traditional polynomial-Dirichlet model, introducing a variational inference algorithm for further optimization, and classifying the steady-state working state faults of the liquid rocket engine;
and S4, extracting a plurality of examples from the liquid rocket engine fault samples to form a training set, estimating parameters of the TAN network, extracting a test set without the training set samples, and performing fault classification on the test set.
2. The method for fault diagnosis of layered Bayesian variational inference in the steady-state stage of a liquid rocket engine according to claim 1, wherein the specific method for constructing the TAN structural fault classification model in the step S2 comprises:
step S2.1, calculating condition mutual information based on the attribute variables selected in step S1:
Figure FDA0003438608800000011
wherein, XiAnd XjRepresenting two attribute variables, C representing a data set, here a training set; constructing a maximum spanning tree by taking the attribute variables selected in the step S1 as nodes of the tree and taking condition mutual information among the attribute variables as weights of edges among the nodes;
and S2.2, setting the direction of each edge, inserting the uppermost-layer class node into the spanning tree, and enabling the class node to point to each attribute node, thereby forming a TAN structure fault classification model.
3. The method for diagnosing the fault of the hierarchical Bayesian variational inference of the liquid rocket engine in the steady-state stage as claimed in claim 2, wherein said step S3 specifically comprises:
step S3.1, establishing a hierarchical polynomial-Dirichlet model as follows:
setting alpha as a hidden random vector, obeying Dirichlet priors:
α|s,α0~s·Dirichlet(α0)
Figure FDA0003438608800000012
Figure FDA0003438608800000013
wherein the equivalent sample size s and the parameter vector alpha0Is a hyper-parameter of the model, and the sum of the elements satisfies:
Figure FDA0003438608800000021
θX|Yis the dirichlet mixture distribution:
Figure FDA0003438608800000022
in the formula, the prior value can not factor y, and parameters distributed under different conditions are not independent in a prior way;
s3.2, further optimizing and solving the combined posterior distribution of the parameters based on a variational inference algorithm;
from n independent identically distributed observations (x)k,yk) A data set of compositions, wherein k 1.., n, the posterior distribution of the parameters is a dirichlet mixture distribution:
Figure FDA0003438608800000023
a posteriori expectation according to a
Figure FDA0003438608800000024
Defining a solution of the above formula;
θx|ythe posterior mean of (a) is:
Figure FDA0003438608800000025
wherein n isxyDenotes thetax|yI.e., the number of observations under the condition of X and Y,
Figure FDA0003438608800000026
ny=∑x∈Xnxyrepresents the statistics of variable Y; the posterior distribution of α cannot be calculated analytically, and is expressed as follows:
Figure FDA0003438608800000027
rapid solution of theta by using variational reasoning algorithmX|YAnd a posterior distribution of α; in particular, the amount of the solvent to be used,
step S3.2.1, estimating p (θ) by decomposing the distributionX|Yα | D) is as follows:
Figure FDA0003438608800000028
wherein, thetaX|yAnd α is an independent random variable; when in use
Figure FDA0003438608800000029
When the temperature of the water is higher than the set temperature,
Figure FDA00034386088000000210
Figure FDA00034386088000000211
and
Figure FDA00034386088000000212
and is
Figure FDA00034386088000000213
The parameters of the variational inference model satisfy the following conditions:
α|s,τ,κ~s·Dirichlet(τκ)
Figure FDA0003438608800000031
Figure FDA0003438608800000032
let q (theta)X|y)=q(θX|y|vy) And q (α) ═ q (α | τ, κ); joint variational distribution q (theta)X|yAnd alpha) are the variation parameters tau, kappa and vyA function of wherein
Figure FDA0003438608800000033
Step S3.2.2 minimizing the posterior distribution p (θ)X|Yα | D) and a variance estimate q (θ)X|yAnd alpha) and solving variational inference model parameters tau, kappa and vy
Minimizing the KL divergence is the lower variation limit of the maximum marginal likelihood log (p (D))
Figure FDA0003438608800000034
Figure FDA0003438608800000035
Wherein
Figure FDA0003438608800000036
Represents the mean of the variational distribution q; the KL divergence between the variation distribution and the posterior distribution is equal to log (p (D)) and
Figure FDA0003438608800000037
the difference between them, is expressed as follows:
Figure FDA0003438608800000038
in a specific case, in a hierarchical polynomial dirichlet model similar to a variational inference model, it is impossible to approximate
Figure FDA0003438608800000039
Written as an analytical function of the variation parameter, hence, for
Figure FDA00034386088000000310
Is estimated as
Figure FDA00034386088000000311
Figure FDA00034386088000000312
Is an analytic function of the parameter, and satisfies:
Figure FDA00034386088000000313
Figure FDA00034386088000000314
wherein v isxyIs a parameter vector vyX; by calculation of
Figure FDA0003438608800000041
About vxyThe partial derivatives of (a) are juxtaposed to 0, yielding:
Figure FDA0003438608800000042
where ψ (·) is a digamma function representing the derivative of the log Gamma function; by making the above equation equal to 0, the parameter v can be found given the value of the parameter vector kxyIs estimated value of
Figure FDA0003438608800000043
Figure FDA0003438608800000044
Calculating a tau value by deriving a Newton method; make it
Figure FDA0003438608800000045
Maximization, requiring calculation
Figure FDA0003438608800000046
First and second partial derivatives with respect to τ;
Figure FDA0003438608800000047
bias-derivative τ as follows:
Figure FDA0003438608800000048
Figure FDA0003438608800000049
the second order partial derivative is calculated for τ as follows:
Figure FDA00034386088000000410
deriving a newton's algorithm that updates log (τ) since parameter τ is always positive; definition of
Figure FDA00034386088000000411
Figure FDA00034386088000000412
Then:
Figure FDA00034386088000000413
Figure FDA0003438608800000051
setting the known parameter vector κ to a fixed value, newton updates at step κ are as follows:
Figure FDA0003438608800000052
updated parameter τk+1Comprises the following steps:
τk+1=τkexp(Δlog(τk))
the above formula is an iterative formula of the parameter tau;
calculating a kappa value by deriving a Newton method; make it
Figure FDA0003438608800000053
Maximization, requiring calculation
Figure FDA0003438608800000054
With respect to kappax'First and second partial derivatives of;
Figure FDA0003438608800000055
with respect to kappax'The partial derivatives of (a) are:
Figure FDA0003438608800000056
Figure FDA0003438608800000057
with respect to kappax'The second partial derivative of (c) is:
Figure FDA0003438608800000061
wherein all second order mixed derivatives
Figure FDA0003438608800000062
Are all equal to 0; due to the fact that
Figure FDA0003438608800000063
Optimization using constrained newton method
Figure FDA0003438608800000064
In step k, a Newton update Δ κ needs to be obtainedkTo make
Figure FDA0003438608800000065
The solution system therefore:
Figure FDA0003438608800000066
where the elements of u are dual variables with constraints, HkIs the hessian matrix of step k, 1 is the identity matrix, gkIs the gradient vector of step k; defining:
Figure FDA0003438608800000067
Figure FDA0003438608800000068
given the values of the parameters τ and v, the element x of the gradient vector is expressed as follows:
Figure FDA0003438608800000069
in a particular case, the elements of the hessian matrix
Figure FDA00034386088000000610
Is a diagonal matrix, i.e. H ═ diag (H)k) (ii) a Thus, the constraint Newton step for vector element x is
Figure FDA00034386088000000611
The iterative formula for parameter κ is:
Figure FDA00034386088000000612
s3.2.3, continuously iterating to obtain variational inference model parameter vyThe values of τ and κ; in particular, the amount of the solvent to be used,
step L1, specifying parameter vyInitial values of τ and κ
Figure FDA0003438608800000071
Wherein
Figure FDA0003438608800000072
Maximum iteration number maximum of specified external optimization1And maximum error tol1
Step L2, when the iteration number K is less than maximum1Or updating the difference value tolerance & gt tol for two adjacent times1When v is updatedyIs calculated at
Figure FDA0003438608800000073
And
Figure FDA0003438608800000074
when the temperature of the water is higher than the set temperature,
Figure FDA0003438608800000075
a value of (d);
step L3, specify the initial value of the internal optimization, i.e.
Figure FDA0003438608800000076
Specifying maximum number of iterations maximum of internal optimization2And maximum error tol2
Step L4, when the iteration number k is less than maximum2Or updating the difference value tolerance & gt tol for two adjacent times2While updating the estimated value of τ, i.e. calculating
Figure FDA0003438608800000077
And
Figure FDA0003438608800000078
when the temperature of the water is higher than the set temperature,
Figure FDA0003438608800000079
a value of (d); while updating the estimated value of k, i.e. calculated at
Figure FDA00034386088000000710
And
Figure FDA00034386088000000711
when the temperature of the water is higher than the set temperature,
Figure FDA00034386088000000712
a value of (d); increasing iteration times k;
step L5, will
Figure FDA00034386088000000713
And
Figure FDA00034386088000000714
defined as the estimated values of tau and kappa obtained in the inner loop, and the iteration number K is increased; v obtained in the external circulationyThe values of τ and κ are
Figure FDA00034386088000000715
Figure FDA00034386088000000717
And
Figure FDA00034386088000000716
CN202111622537.8A2021-12-282021-12-28 A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket MotorPendingCN114358164A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111622537.8ACN114358164A (en)2021-12-282021-12-28 A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket Motor

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111622537.8ACN114358164A (en)2021-12-282021-12-28 A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket Motor

Publications (1)

Publication NumberPublication Date
CN114358164Atrue CN114358164A (en)2022-04-15

Family

ID=81103267

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111622537.8APendingCN114358164A (en)2021-12-282021-12-28 A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket Motor

Country Status (1)

CountryLink
CN (1)CN114358164A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118378460A (en)*2024-06-252024-07-23北京航空航天大学 A planning method and device for reliability test of reusable rocket engine

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20170364404A1 (en)*2016-06-212017-12-21EMC IP Holding Company LLCFault processing method, system, and computer program product
CN109447236A (en)*2018-09-282019-03-08重庆邮电大学A kind of method for diagnosing faults of hybrid vehicle heat management system
CN111259927A (en)*2020-01-082020-06-09西北工业大学Rocket engine fault diagnosis method based on neural network and evidence theory
US20210373544A1 (en)*2020-05-272021-12-02Jiangnan UniversityEstimation Methods of Actuator Faults based on Bayesian Learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20170364404A1 (en)*2016-06-212017-12-21EMC IP Holding Company LLCFault processing method, system, and computer program product
CN109447236A (en)*2018-09-282019-03-08重庆邮电大学A kind of method for diagnosing faults of hybrid vehicle heat management system
CN111259927A (en)*2020-01-082020-06-09西北工业大学Rocket engine fault diagnosis method based on neural network and evidence theory
US20210373544A1 (en)*2020-05-272021-12-02Jiangnan UniversityEstimation Methods of Actuator Faults based on Bayesian Learning

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
LAURA AZZIMONTI等: "Hierarchical estimation of parameters in Bayesian networks", 《COMPUTATIONAL STATISTICS & DATA ANALYSIS》, vol. 137, 19 February 2019 (2019-02-19), pages 1*
刘久富等: "液体火箭发动机的分层贝叶斯变分推理故障诊断方法", 《北京理工大学学报》, vol. 42, no. 3, 26 January 2022 (2022-01-26)*
谢红卫: "《多阶段小样本数据条件下装备试验评估》", 30 September 2016, 国防工业出版社, pages: 7*
郝志峰: "《数据科学与数学建模》", 31 January 2019, 华中科技大学出版社, pages: 125*

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118378460A (en)*2024-06-252024-07-23北京航空航天大学 A planning method and device for reliability test of reusable rocket engine

Similar Documents

PublicationPublication DateTitle
Kang et al.Rawlsgcn: Towards rawlsian difference principle on graph convolutional network
Malinsky et al.Causal structure learning from multivariate time series in settings with unmeasured confounding
Ravikumar et al.High-dimensional Ising model selection using ℓ 1-regularized logistic regression
CN105530122B (en)A kind of network fault diagnosis method based on the hidden Naive Bayes Classifier of selectivity
US7844449B2 (en)Scalable probabilistic latent semantic analysis
Luu et al.Sampling from non-smooth distributions through Langevin diffusion
Gu et al.Learning big Gaussian Bayesian networks: Partition, estimation and fusion
CN118468208B (en)Fault diagnosis method and system for light electric propulsion system
Li et al.Constraint-based causal structure learning with consistent separating sets
Chiu et al.Discrete probabilistic inverse optimal transport
CN113987195B (en) A Differentiable Method for Mining Constant Rules
VanDerHorn et al.Bayesian model updating with summarized statistical and reliability data
CN117454224A (en)Chemical process fault detection method based on deep semi-non-negative matrix factorization
Wang et al.Inference for sparse conditional precision matrices
Castelletti et al.Objective Bayes model selection of Gaussian interventional essential graphs for the identification of signaling pathways
CN114358164A (en) A Hierarchical Bayesian Variational Inference Fault Diagnosis Method for the Steady-State Stage of Liquid Rocket Motor
Ragavan et al.Adaptive Sampling line search for local stochastic optimization with integer variables
Xiang et al.Understanding propagation error and its effect on collective classification
Liang et al.Advanced voltage abnormality detection in real-vehicle battery systems using self-organizing map neural networks and adaptive threshold
Cunegatti et al.Understanding sparse neural networks from their topology via multipartite graph representations
Wang et al.An efficient causal discovery algorithm for linear models
Nagano et al.Phase transition in compressed sensing with horseshoe prior
CN107682193A (en)A kind of common communication multi-business flow method of estimation
Melville et al.Methods for data-centric small satellite anomaly detection and fault prediction
Yang et al.Federated multi-task Bayesian network learning in the presence of overlapping and distinct variables

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp