技术领域Technical field
本发明涉及故障诊断技术领域,尤其涉及一种基于RNN的互补双残差生成器的故障监测方法和系统。The present invention relates to the technical field of fault diagnosis, and in particular to a fault monitoring method and system based on an RNN-based complementary dual residual generator.
背景技术Background technique
循环神经网络(Recurrent Neural Network,RNN)是一类以序列(sequence)数据为输入,在序列的演进方向进行递归(recursion)且所有节点(循环单元)按链式连接的递归神经网络(recursive neural network)。Recurrent Neural Network (RNN) is a type of recursive neural network that takes sequence data as input, performs recursion in the evolution direction of the sequence, and has all nodes (cyclic units) connected in a chain. network).
循环神经网络RNN作为一种特殊结构的深度神经网络,它将序列当前时刻的输出与前期的信息相关联,类似于人的现有认知受以往的知识、经验和记忆影响,故障信号在时间上的相关性及深层特征,有效提取时间和空间特征,进一步提高故障智能诊断的准确度、可靠性。Recurrent Neural Network RNN is a deep neural network with a special structure. It associates the output of the current moment of the sequence with previous information. It is similar to how people's existing cognition is affected by past knowledge, experience and memory. Fault signals are affected by time. The correlation and deep features on the system can effectively extract time and space features to further improve the accuracy and reliability of intelligent fault diagnosis.
现有技术存在的问题及缺陷为:The problems and defects existing in the existing technology are:
1.大多数方法假设噪声是已知的,而生成的残差不一定符合高斯分布,是否满足高斯分布对T2统计量和确定相应阈值是非常重要的。1. Most methods assume that the noise is known, and the generated residuals do not necessarily conform to the Gaussian distribution. Whether the Gaussian distribution is satisfied is very important for the T2 statistic and determining the corresponding threshold.
2.使用基于非高斯分布残差的T2统计量进行故障检测时,即使用核密度估计,仍然有一些故障无法被检测到。2. When usingT2 statistics based on non-Gaussian distribution residuals for fault detection, even with kernel density estimation, there are still some faults that cannot be detected.
3.基于RNN的框架监测由于复杂的内部机构和激活函数的存在,很难在最小回归误差学习的时候生成高斯残差。3. RNN-based framework monitoring Due to the existence of complex internal mechanisms and activation functions, it is difficult to generate Gaussian residuals during minimum regression error learning.
4.基于RNN的方法能提高故障检测率,但是其故障报警率也高于其他基于数据驱动的过程监测方法。4. The RNN-based method can improve the fault detection rate, but its fault alarm rate is also higher than other data-driven process monitoring methods.
发明内容Contents of the invention
针对现有技术中的部分或全部问题,本发明提供一种基于RNN的互补双残差生成器的故障监测方法,该方法包括以下步骤:To address some or all of the problems in the prior art, the present invention provides a fault monitoring method based on an RNN-based complementary dual residual generator. The method includes the following steps:
将故障检测的过程输入到前残差生成器中;Input the fault detection process into the pre-residual generator;
在所述前残差生成器中,通过RNN网络得到过程输出预测值,与真实值比较得到残差向量;In the former residual generator, the process output prediction value is obtained through the RNN network, and the residual vector is obtained by comparing it with the real value;
将所述残差向量输入到高斯性检查器中,通过所述高斯性检查器将残差分成高斯残差部分和非高斯残差部分;The residual vector is input into a Gaussianity checker, and the residual is divided into a Gaussian residual part and a non-Gaussian residual part by the Gaussianity checker;
保留所述高斯残差部分为前高斯残差;The Gaussian residual part is retained as the former Gaussian residual;
提取所述非高斯残差部分的相应过程输入索引,将所述索引和所述非高斯残差部分输入后到残差生成器中,通过所述后残差生成器将所述非高斯残差部分修正为后高斯残差;The corresponding process of extracting the non-Gaussian residual part inputs the index, the index and the non-Gaussian residual part are input into the residual generator, and the non-Gaussian residual is generated by the post-residual generator. Partially corrected to post-Gaussian residuals;
将所述前高斯残差和所述后高斯残差汇总得到总残差;Summarize the pre-Gaussian residual and the post-Gaussian residual to obtain a total residual;
将所述总残差输入结果诊断器,通过T2统计量进行故障的诊断。The total residual is input into the result diagnostic device, and the fault is diagnosed through the T2 statistic.
进一步地,所述前残差生成器产生的残差rpre表示为,Further, the residual rpre generated by the pre-residual generator is expressed as,
其中,ypre是前残差生成器的过程输出,是真实过程输出;where ypre is the process output of the pre-residual generator, It is the real process output;
用于训练所述前残差生成器的损失函数Lpre(y)定义为生成的残差向量的和,The loss function Lpre (y) used to train the pre-residual generator is defined as the sum of the generated residual vectors,
其中KB是批大小,KT是一批时间序列数据的长度。Where KB is the batch size and KT is the length of a batch of time series data.
进一步地,所述高斯性检查器通过设置高斯阈值,用残差高斯指标来判断高斯性;用于计算残差的高斯指标G(z)表示为,Further, the Gaussianity checker sets the Gaussian threshold and uses the residual Gaussian index to determine the Gaussianity; the Gaussian index G(z) used to calculate the residual is expressed as,
G(z)≈||E{H(z)}-E{H(znor)}||2G(z)≈||E{H(z)}-E{H(znor )}||2
其中,znor是零均值单位方差高斯变量的向量,残差向量的负熵H(·)表示为,Among them,znor is a vector of zero-mean unit-variance Gaussian variables, and the negative entropy H(·) of the residual vector is expressed as,
其中,1≤h1≤2;Among them, 1≤h1≤2;
前残差rpre包含高斯部分和非高斯部分/>所述前残差rpre可以表示为,The pre-residual rpre contains the Gaussian part and non-Gaussian part/> The pre-residual error rpre can be expressed as,
高斯部分为前高斯残差;Gaussian part is the former Gaussian residual;
通过设置阈值Gth来衡量残差的高斯性,By setting the threshold Gth to measure the Gaussianity of the residual,
其中,表示高斯残差,/>表示非高斯残差。in, represents the Gaussian residual, /> Represents non-Gaussian residuals.
进一步地,所述后残差生成器产生的残差rpOS表示为,Further, the residual rpOS generated by the post-residual generator is expressed as,
其中,ypos是后残差生成器的过程输出,是真实过程输出;where ypos is the process output of the post-residual generator, It is the real process output;
rpos为后高斯残差前残差生成器的非高斯部分/>用/>修正;rpos is the post-Gaussian residual Non-Gaussian part of the former residual generator/> Use/> Correction;
用于训练所述后残差生成器的损失函数Lpos(y)由残差高斯指标得到,The loss function Lpos (y) used to train the post-residual generator is given by the residual Gaussian index get,
其中KB是批大小。where KB is the batch size.
进一步地,所述总残差r表示,Further, the total residual r represents,
其中,为前高斯残差,/>为后高斯残差。in, is the former Gaussian residual,/> is the post-Gaussian residual.
进一步地,所述T2统计量表示为,Further, the T2 statistic Expressed as,
其中,r为所述总残差,∑r为所述总残差的协方差矩阵;Among them, r is the total residual error, and ∑r is the covariance matrix of the total residual error;
用于判断的阈值Jth表示为,The threshold Jth used for judgment is expressed as,
其中,m、N-m是自由度,α是显著性水平,F1-α(m,N-m)是自由度分别是m和N-m的F分布;Among them, m and Nm are the degrees of freedom, α is the significance level, and F1-α (m, Nm) is the F distribution with the degrees of freedom m and Nm respectively;
若T2统计量大于或等于阈值Jth,则认为过程存在故障,即故障诊断的标准为,If the T2 statistic is greater than or equal to the threshold Jth , it is considered that there is a fault in the process, that is, the standard for fault diagnosis is,
若T2统计量小于阈值Jth,则认为过程不存在故障。If the T2 statistic If it is less than the threshold Jth , it is considered that there is no fault in the process.
本发明还提供一种基于RNN的互补双残差生成器的故障监测系统,该系统包括以下模块:The present invention also provides a fault monitoring system based on RNN-based complementary double residual generator, which system includes the following modules:
过程输入模块,用于将故障检测的过程输入前残差生成器中;The process input module is used to input the fault detection process into the pre-residual generator;
前高斯残差产生模块,用于产出前高斯残差;The former Gaussian residual generation module is used to produce the former Gaussian residual;
后高斯残差产生模块,用于产出后高斯残差;Post-Gaussian residual generation module, used to generate post-Gaussian residuals;
结果产出模块,用于汇总前高斯残差和后高斯残差,并通过T2统计量进行故障的诊断。The result output module is used to summarize the pre-Gaussian residuals and post-Gaussian residuals, and diagnose faults through T2 statistics.
进一步地,所述前高斯残差产生模块包括前残差生成器和高斯性检查器,所述后高斯残差产生模块包括后残差生成器。Further, the pre-Gaussian residual generation module includes a pre-residual generator and a Gaussianity checker, and the post-Gaussian residual generation module includes a post-residual generator.
本发明还提供一种计算机系统,其特征在于,包括:The invention also provides a computer system, which is characterized in that it includes:
处理器,其被配置为执行机器可读指令;以及a processor configured to execute machine-readable instructions; and
存储器,其被存储有机器可读指令,所述机器可读指令在被处理器执行时执行所述的诊断方法的步骤。A memory storing machine-readable instructions that, when executed by a processor, perform the steps of the diagnostic method.
本发明还提供一种计算机可读存储介质,其特征在于,其上存储有机器可读指令,所述机器可读指令在被处理器执行时执行所述的诊断方法的步骤。The present invention also provides a computer-readable storage medium, which is characterized in that machine-readable instructions are stored thereon, and the machine-readable instructions perform the steps of the diagnostic method when executed by a processor.
与现有技术相比,本发明具有以下优点:Compared with the prior art, the present invention has the following advantages:
1.通过集成互补双残差生成器和负熵损失函数提供了一种新的故障监测方法,这在以往未出现过;1. Provides a new fault monitoring method by integrating the complementary dual residual generator and the negative entropy loss function, which has not appeared before;
2.即使在动态过程的噪声统计未知的情况下,生成的残差也满足高斯分布;高斯分布结果使得动态过程可以简单地通过T2统计量来监测,并且阈值可以在没有核密度估计的情况下通过F分布来容易地确定;2. Even when the noise statistics of the dynamic process are unknown, the generated residuals satisfy the Gaussian distribution; the Gaussian distribution result allows the dynamic process to be monitored simply by theT statistic, and the threshold can be determined without kernel density estimation. can be easily determined by the F distribution;
3.所提出的故障诊断方法可以将RNN替换为其他网络结构,如可以推广到基于LSTM和基于GRU的双残差生成器。3. The proposed fault diagnosis method can replace RNN with other network structures, such as it can be extended to LSTM-based and GRU-based dual residual generators.
附图说明Description of the drawings
为进一步阐明本发明的各实施例的以上和其它优点和特征,将参考附图来呈现本发明的各实施例的更具体的描述。可以理解,这些附图只描绘本发明的典型实施例,因此将不被认为是对其范围的限制。在附图中,为了清楚明了,相同或相应的部件将用相同或类似的标记表示。To further elucidate the above and other advantages and features of embodiments of the invention, a more specific description of embodiments of the invention will be presented with reference to the accompanying drawings. It will be understood that the drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. In the drawings, the same or corresponding parts will be labeled with the same or similar reference numerals, for purposes of clarity and clarity.
图1为本发明一个实施例的基于RNN的互补双残差生成器的故障监测方法的流程示意图;Figure 1 is a schematic flow chart of a fault monitoring method for an RNN-based complementary dual residual generator according to one embodiment of the present invention;
图2为本发明一个实施例的基于RNN的残差生成器的网络结构示意图;Figure 2 is a schematic diagram of the network structure of an RNN-based residual generator according to an embodiment of the present invention;
图3为本发明一个实施例的故障监测系统示意图。Figure 3 is a schematic diagram of a fault monitoring system according to an embodiment of the present invention.
具体实施方式Detailed ways
以下的描述中,参考各实施例对本发明进行描述。然而,本领域的技术人员将认识到可在没有一个或多个特定细节的情况下或者与其它替换和/或附加方法或组件一起实施各实施例。在其它情形中,未示出或未详细描述公知的结构或操作以免模糊本发明的发明点。类似地,为了解释的目的,阐述了特定数量和配置,以便提供对本发明的实施例的全面理解。然而,本发明并不限于这些特定细节。In the following description, the present invention is described with reference to various embodiments. However, one skilled in the art will recognize that various embodiments may be practiced without one or more specific details or with other alternative and/or additional methods or components. In other instances, well-known structures or operations have not been shown or described in detail so as not to obscure the inventive aspects of the invention. Likewise, for purposes of explanation, specific numbers and configurations are set forth in order to provide a thorough understanding of embodiments of the invention. However, the invention is not limited to these specific details.
在本说明书中,对“一个实施例”或“该实施例”的引用意味着结合该实施例描述的特定特征、结构或特性被包括在本发明的至少一个实施例中。在本说明书各处中出现的短语“在一个实施例中”并不一定全部指代同一实施例。Reference in this specification to "one embodiment" or "the embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase "in one embodiment" in various places in this specification are not necessarily all referring to the same embodiment.
需要说明的是,本发明的实施例以特定顺序对方法步骤进行描述,然而这只是为了阐述该具体实施例,而不是限定各步骤的先后顺序。相反,在本发明的不同实施例中,可根据实际需求的调节来调整各步骤的先后顺序。It should be noted that the embodiments of the present invention describe the method steps in a specific order. However, this is only to illustrate the specific embodiment and does not limit the order of each step. On the contrary, in different embodiments of the present invention, the sequence of each step can be adjusted according to actual needs.
在本发明中,根据本发明的系统的各模块可以使用软件、硬件、固件或其组合来实现。当模块使用软件来实现时,可以通过计算机程序流程来实现模块的功能,例如模块可以通过存储在存储设备(如硬盘、内存等)中的代码段(如C、C++等语言的代码段)来实现,其中当所述代码段被处理器执行时能够实现模块的相应功能。当模块使用硬件来实现时,可以通过设置相应硬件结构来实现模块的功能,例如通过对现场可编程逻辑门阵列(FPGA)等可编程器件进行硬件编程来实现模块的功能,或者通过设计包括多个晶体管、电阻和电容等电子器件的专用集成电路(ASIC)来实现模块的功能。当模块使用固件来实现时,可以将模块的功能以程序代码形式写入设备的诸如EPROM或EEPROM之类的只读存储器中,并且当所述程序代码被处理器执行时能够实现模块的相应功能。另外,模块的某些功能可能需要由单独的硬件来实现或者通过与所述硬件协作来实现,例如检测功能通过相应传感器(如接近传感器、加速度传感器、陀螺仪等)来实现,信号发射功能通过相应通信设备(如蓝牙设备、红外通信设备、基带通信设备、Wi-Fi通信设备等)来实现,输出功能通过相应输出设备(如显示器、扬声器等)来实现,以此类推。In the present invention, each module of the system according to the present invention can be implemented using software, hardware, firmware or a combination thereof. When the module is implemented using software, the functions of the module can be realized through computer program flow. For example, the module can be implemented through code segments (such as code segments in languages such as C and C++) stored in storage devices (such as hard disks, memory, etc.) Implementation, wherein the corresponding function of the module can be realized when the code segment is executed by the processor. When the module is implemented using hardware, the function of the module can be realized by setting the corresponding hardware structure, for example, by hardware programming of programmable devices such as field programmable logic gate arrays (FPGA), or by designing multiple An application-specific integrated circuit (ASIC) of electronic devices such as transistors, resistors, and capacitors is used to implement the functions of the module. When the module is implemented using firmware, the functions of the module can be written into a read-only memory such as EPROM or EEPROM of the device in the form of program code, and when the program code is executed by the processor, the corresponding functions of the module can be realized . In addition, some functions of the module may need to be implemented by separate hardware or by cooperating with the hardware. For example, the detection function is implemented by corresponding sensors (such as proximity sensors, acceleration sensors, gyroscopes, etc.), and the signal transmitting function is implemented by The corresponding communication equipment (such as Bluetooth device, infrared communication equipment, baseband communication equipment, Wi-Fi communication equipment, etc.) is realized, and the output function is realized by the corresponding output device (such as display, speaker, etc.), and so on.
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。图1为本发明一个实施例的基于RNN的互补双残差生成器的故障监测方法的流程示意图。如图所示,诊断方法包括以下步骤:The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Figure 1 is a schematic flowchart of a fault monitoring method for an RNN-based complementary dual residual generator according to an embodiment of the present invention. As shown in the figure, the diagnostic method includes the following steps:
首先,将故障检测的过程输入前残差生成器中,通过过程输入模块执行。过程输入指的是输入已经收集的过程数据,比如系统在运行工艺过程时收集到的数据,或其他的过程数据。如图1所示,过程输入的数据索引为1,2,...,p,p为大于2的正整数,p的大小依据过程输入的数据大小而定。First, the fault detection process is input into the pre-residual generator and executed through the process input module. Process input refers to the input of process data that has been collected, such as data collected by the system when running a process, or other process data. As shown in Figure 1, the data index of the process input is 1, 2,..., p, p is a positive integer greater than 2, and the size of p depends on the size of the data input by the process.
接下来,在所述前残差生成器中,通过RNN网络得到过程输出预测值,与真实值比较得到残差向量。图2为本发明一个实施例的基于RNN的残差生成器的网络结构示意图。如图2所示,过程输入的数据索引为1,2,…,n,n为大于2的正整数,n的大小依据过程输入的数据大小而定。如图2所示,通过RNN网络得到过程输出预测值,与真实值比较得到残差向量。所述前残差生成器产生的残差rpre表示为,Next, in the pre-residual generator, the process output predicted value is obtained through the RNN network, and the residual vector is obtained by comparing it with the true value. Figure 2 is a schematic diagram of the network structure of an RNN-based residual generator according to an embodiment of the present invention. As shown in Figure 2, the data index of the process input is 1, 2,...,n, n is a positive integer greater than 2, and the size of n depends on the size of the data input by the process. As shown in Figure 2, the process output predicted value is obtained through the RNN network, and the residual vector is obtained by comparing it with the real value. The residual rpre generated by the pre-residual generator is expressed as,
其中,ypre是前残差生成器的过程输出,是真实过程输出。如图1所示,所述前残差生成器产生的残差rpre的索引为1,2,…,q,q为大于2的正整数,q的大小依据所述前残差生成器产生的残差的数据大小而定。where ypre is the process output of the pre-residual generator, is the real process output. As shown in Figure 1, the index of the residual rpre generated by the pre-residual generator is 1, 2,..., q, q is a positive integer greater than 2, and the size of q is generated according to the pre-residual generator. depends on the data size of the residuals.
用于训练所述前残差生成器的损失函数Lpre(y)定义为生成的残差向量的和,The loss function Lpre (y) used to train the pre-residual generator is defined as the sum of the generated residual vectors,
其中KB是批大小,表示每个批次的数据大小,即选取多少的数据为一个批次;KT是一批时间序列数据的长度,序列每个序列点为k,总长度为KT。where KB is the batch size, indicating the data size of each batch, that is, how much data is selected as a batch; KT is the length of a batch of time series data, each sequence point of the sequence is k, and the total length is KT .
接下来,将所述残差向量输入高斯性检查器中,通过所述高斯性检查器将残差分成高斯残差部分和非高斯残差部分。前残差生成器捕捉潜在的动力学和非线性关系,将产生的残差送入高斯性检查器中,得到高斯残差和非高斯残差部分。负熵是一种可以用于估计随机变量高斯性的定量度量,负熵越接近于0,则分布越接近于高斯分布。所述高斯性检查器通过设置高斯阈值,用残差高斯指标来判断高斯性;用于计算残差的高斯指标G(Z)表示为,Next, the residual vector is input into a Gaussianity checker, which divides the residual into a Gaussian residual part and a non-Gaussian residual part. The pre-residual generator captures the underlying dynamics and nonlinear relationships and feeds the generated residuals into a Gaussianity checker to obtain Gaussian and non-Gaussian residual parts. Negentropy is a quantitative measure that can be used to estimate the Gaussianness of a random variable. The closer the negentropy is to 0, the closer the distribution is to a Gaussian distribution. The Gaussianity checker determines Gaussianity by setting a Gaussian threshold and using the residual Gaussian index; the Gaussian index G(Z) used to calculate the residual is expressed as,
G(z)≈||E{H(z)}-E{H(znor)}||2G(z)≈||E{H(z)}-E{H(znor )}||2
其中,znor是零均值单位方差高斯变量的向量,残差向量的负熵H(·)表示为,Among them,znor is a vector of zero-mean unit-variance Gaussian variables, and the negative entropy H(·) of the residual vector is expressed as,
其中,1≤h1≤2;Among them, 1≤h1≤2;
前残差rpre包含高斯部分和非高斯部分/>所述前残差rpre可以表示为,The pre-residual rpre contains the Gaussian part and non-Gaussian part/> The pre-residual error rpre can be expressed as,
通过设置阈值Gth来衡量残差的高斯性,By setting the threshold Gth to measure the Gaussianity of the residual,
其中,表示高斯残差,/>表示非高斯残差。如图1所示,所述高斯残差的索引为1,…,m,m为小于q且大于1的正整数。如图1所示,所述非高斯残差的索引为m+1,…,q。in, represents the Gaussian residual, /> Represents non-Gaussian residuals. As shown in Figure 1, the index of the Gaussian residual is 1,...,m, where m is a positive integer less than q and greater than 1. As shown in Figure 1, the index of the non-Gaussian residual is m+1,...,q.
接下来,保留所述高斯残差部分为前高斯残差,即高斯部分为前高斯残差。Next, retain the Gaussian residual part as the former Gaussian residual, that is, the Gaussian part is the former Gaussian residual.
接下来,提取所述非高斯残差部分相应的过程输入索引,将所述索引和所述非高斯残差部分输入后残差生成器中,通过所述后残差生成器将所述非高斯残差部分修正为后高斯残差。后残差生成器通过负熵损失函数进行训练,使得输出残差为高斯残差,替换前残差生成器非高斯残差的部分。所述后残差生成器产生的残差rpos表示为,Next, extract the process input index corresponding to the non-Gaussian residual part, input the index and the non-Gaussian residual part into the post-residual generator, and use the post-residual generator to convert the non-Gaussian The residual part is corrected to the post-Gaussian residual. The post-residual generator is trained with a negative entropy loss function so that the output residual is a Gaussian residual, replacing the non-Gaussian residual of the pre-residual generator. The residual rpos generated by the post-residual generator is expressed as,
其中,ypos是后残差生成器的过程输出,是真实过程输出。where ypos is the process output of the post-residual generator, is the real process output.
rpos为后高斯残差前残差生成器的非高斯部分/>用/>修正。如图1所示,所述后残差的索引为所述非高斯残差的索引,即m+1,…,q。rpos is the post-Gaussian residual Non-Gaussian part of the former residual generator/> Use/> Correction. As shown in Figure 1, the index of the post-residual is the index of the non-Gaussian residual, that is, m+1,...,q.
用于训练所述后残差生成器的损失函数Lpos(y)由残差高斯指标得到,The loss function Lpos (y) used to train the post-residual generator is given by the residual Gaussian index get,
其中KB是批大小。where KB is the batch size.
接下来,将所述前高斯残差和所述后高斯残差汇总得到总残差。所述总残差r表示,Next, the pre-Gaussian residual and the post-Gaussian residual are summed to obtain the total residual. The total residual r represents,
其中,为前高斯残差,/>为后高斯残差。如图1所示,所述总残差r的索引为1,2,…,q,q为大于2的正整数,q的大小依据所述前残差生成器产生的残差的数据大小而定。in, is the former Gaussian residual,/> is the post-Gaussian residual. As shown in Figure 1, the index of the total residual r is 1, 2,..., q, q is a positive integer greater than 2, and the size of q is based on the data size of the residual generated by the former residual generator. Certainly.
由于双残差生成器的存在,在未知噪声统计的情况下,依然可以输出高斯残差。Due to the existence of the dual residual generator, Gaussian residuals can still be output when the noise statistics are unknown.
最后,将所述总残差输入结果诊断器,通过T2统计量进行故障的诊断。产生高斯残差,意味着动态过程可以简单地通过T2统计量来监测,并且阈值可以在没有核密度估计的情况下通过F分布来确定。Finally, the total residual is input into the result diagnostician, and the fault is diagnosed through the T2 statistic. Gaussian residuals are produced, meaning that the dynamic process can be monitored simply by theT statistic and the threshold can be determined by the F distribution without kernel density estimation.
本发明中将符合高斯分布的残差简称为高斯残差,反之为非高斯残差。高斯分布也称之为正态分布,若随机变量X服从一个数学期望为μ,方差为σ的正态分布,就记为X~N(μ,σ)。In the present invention, the residuals that conform to the Gaussian distribution are simply called Gaussian residuals, and vice versa are called non-Gaussian residuals. The Gaussian distribution is also called the normal distribution. If the random variable X obeys a normal distribution with a mathematical expectation of μ and a variance of σ, it is recorded as X~N(μ, σ).
对于随机变量X1,X2,…Xn~N(0,1),令则称X是自由度为n的卡方分布χ2记为/>For random variables X1 , X2 ,…Xn ~N(0,1), let Then X is said to be a chi-square distribution with n degrees of freedom. χ2 is recorded as/>
对于随机变量且X与Y独立,则自由度分别是m和n的F变量为,其分布称为自由度分别是m和n的F分布,记为F~Fm,n。for random variables And X and Y are independent, then the F variable with degrees of freedom m and n respectively is, Its distribution is called the F distribution with degrees of freedom m and n respectively, denoted as F~Fm,n .
所述满足霍特林T2分布的的统计量表示为,The statistic that satisfies the Hotelling T2 distribution Expressed as,
其中,r为所述总残差,∑r为所述总残差的协方差矩阵;Among them, r is the total residual error, and ∑r is the covariance matrix of the total residual error;
用于判断的阈值Jth表示为,The threshold Jth used for judgment is expressed as,
其中,m、N-m是自由度,α是显著性水平,F1-α(m,N-m)是自由度分别是m和N-m的F分布。Among them, m and Nm are the degrees of freedom, α is the significance level, and F1-α (m, Nm) is the F distribution with the degrees of freedom m and Nm respectively.
若T2统计量大于或等于阈值Jth,则认为过程存在故障,即故障诊断的标准为,If the T2 statistic is greater than or equal to the threshold Jth , it is considered that there is a fault in the process, that is, the standard for fault diagnosis is,
若T2统计量小于阈值Jth,则认为过程不存在故障。If the T2 statistic If it is less than the threshold Jth , it is considered that there is no fault in the process.
下面举例说明运用本发明提供的基于RNN的互补双残差生成器的故障监测方法对故障诊断的影响。The following examples illustrate the impact of the fault monitoring method on fault diagnosis using the RNN-based complementary dual residual generator provided by the present invention.
本发明所提出的方法可以将RNN替换为其他网络结构,如可以推广到基于LSTM和基于GRU的双残差生成器。长短期记忆网络LSTM(Long Short-Term Memory)是一种时间循环神经网络,是为了解决一般的RNN存在的长期依赖问题而专门设计出来的。相比普通的RNN,LSTM能够在更长的序列中有更好的表现。门控循环单元GRU(Gate Recurrent Unit)是RNN的一种。和LSTM一样,也是为了解决长期记忆和反向传播中的梯度等问题而提出来的。相比LSTM,使用GRU能够达到相当的效果,并且相比之下更容易进行训练。将本发明基于RNN的互补双残差生成器的方法拓展到基于LSTM和基于GRU的方法,分别表示为D-RNN、D-LSTM、D-GRU,其中D是dual的缩写,指的是双残差生成器。The method proposed by this invention can replace RNN with other network structures, such as it can be extended to LSTM-based and GRU-based dual residual generators. The long short-term memory network LSTM (Long Short-Term Memory) is a time-cyclic neural network, which is specially designed to solve the long-term dependency problem of general RNN. Compared with ordinary RNN, LSTM can perform better in longer sequences. GRU (Gate Recurrent Unit) is a type of RNN. Like LSTM, it was also proposed to solve problems such as long-term memory and gradients in backpropagation. Compared with LSTM, using GRU can achieve comparable results and is easier to train. The RNN-based complementary dual residual generator method of the present invention is extended to LSTM-based and GRU-based methods, which are respectively represented as D-RNN, D-LSTM, and D-GRU, where D is the abbreviation of dual, which refers to dual Residual generator.
以田纳西-伊斯曼过程(TE process)数据集为例,TE过程数据集包含1个正常数据集和21个故障数据集,每个故障数据集均包含960样本,并且在第161个样本处引入故障。将80%的无故障数据集用于模型训练,其余用于模型验证。因此,用于训练、验证和测试的样本数分别为768、192和20160。由于样本有限,只用两层50个神经元的隐藏层,并用概率为0.2的dropout技术避免过拟合。dropout是指在神经网络的训练过程中,对于神经网络单元,按照一定的概率将其暂时从网络中丢弃。这里的概率0.2,表示每次的dropout保留百分之20的神经网络单元不再向后传递。过拟合是指机器学习模型或者是深度学习模型在训练样本中表现得过于优越,导致在验证数据集以及测试数据集中表现不佳。过拟合一般是由于特征提取过度造成,因此采用dropout来减少神经网络单元可以一定程度上防止过拟合。前残差生成器和后残差生成器的学习率设置分别为0.1和0.01,超参数通过反向传播优化,损失函数Lpre和Lpos通过Adam优化。学习率是优化算法中的调谐参数,该参数可确定每次迭代中的步长,使损失函数收敛到最小值。学习率过大会导致待优化的参数在最小值附近进行波动,学习率过小会导致待优化参数收敛的速度慢。超参数是指机器学习算法中的调优参数,需要人为设定。Adam优化是一种自适应动量的随机优化方法,是一种可以替代传统随机梯度下降过程的一阶优化算法,它能基于训练数据迭代地更新神经网络权重。其他参数设定为:批大小KB=50,序列长度KT=50,训练总轮数epoch设置为200,每个epoch中的批数设定为19,高斯阈值Gth=0.015,显著性水平α=0.99。Taking the Tennessee-Eastman process (TE process) data set as an example, the TE process data set contains 1 normal data set and 21 fault data sets. Each fault data set contains 960 samples, and at the 161st sample Introduce glitches. Use 80% of the fault-free dataset for model training and the rest for model validation. Therefore, the number of samples used for training, validation and testing are 768, 192 and 20160 respectively. Due to limited samples, only two hidden layers of 50 neurons are used, and dropout technology with a probability of 0.2 is used to avoid overfitting. Dropout refers to the temporary discarding of neural network units from the network according to a certain probability during the training process of the neural network. The probability here is 0.2, which means that each dropout retains 20% of the neural network units and does not pass them backward. Overfitting means that the machine learning model or deep learning model performs too well in the training samples, resulting in poor performance in the validation data set and test data set. Overfitting is generally caused by excessive feature extraction, so using dropout to reduce neural network units can prevent overfitting to a certain extent. The learning rates of the pre-residual generator and post-residual generator are set to 0.1 and 0.01 respectively, the hyperparameters are optimized by backpropagation, and the loss functions Lpre and Lpos are optimized by Adam. The learning rate is a tuning parameter in an optimization algorithm that determines the step size in each iteration that causes the loss function to converge to a minimum. An excessive learning rate will cause the parameters to be optimized to fluctuate near the minimum value, and a learning rate that is too small will cause the parameters to be optimized to converge slowly. Hyperparameters refer to tuning parameters in machine learning algorithms and need to be set manually. Adam optimization is a stochastic optimization method with adaptive momentum. It is a first-order optimization algorithm that can replace the traditional stochastic gradient descent process. It can iteratively update the neural network weights based on training data. Other parameters are set as follows: batch size KB=50, sequence length KT=50, total number of training rounds epoch is set to 200, number of batches in each epoch is set to 19, Gaussian threshold Gth=0.015, significance level α= 0.99.
表1为TE过程中21个故障数据集上不同方法的比较。这些方法包括:DPCA(dynamicprincipal component analysis)动态主成分分析,DKPCA(dynamic kernel PCA)动态核主成分分析,SAM(subspace-aided method)子空间辅助方法,LQ-SAM(combined SAM with LQdecomposition-based)集合子空间辅助和LQ分解的方法,RNN,D-RNN,D-LSTM和D-GRU。D是dual的缩写,指的是双残差生成器,D-RNN、D-LSTM、D-GRU即为基于RNN、LSTM、GRU的互补双残差生成器的方法。表1比较不同方法在TE过程中21个故障数据集上的FDR及FAR差别。其中,每个故障数据集最好的结果以粗体标注。FDR(fault detection rate)为故障检测率,FAR(fault alarm rate/false alarm rate)为故障虚警率(误报率)。Table 1 shows the comparison of different methods on 21 fault data sets in the TE process. These methods include: DPCA (dynamicprincipal component analysis) dynamic principal component analysis, DKPCA (dynamic kernel PCA) dynamic kernel principal component analysis, SAM (subspace-aided method) subspace auxiliary method, LQ-SAM (combined SAM with LQdecomposition-based) Ensemble subspace-aided and LQ decomposition methods, RNN, D-RNN, D-LSTM and D-GRU. D is the abbreviation of dual, which refers to the dual residual generator. D-RNN, D-LSTM, and D-GRU are complementary dual residual generator methods based on RNN, LSTM, and GRU. Table 1 compares the differences in FDR and FAR of different methods on 21 fault data sets in the TE process. Among them, the best results for each fault dataset are marked in bold. FDR (fault detection rate) is the fault detection rate, and FAR (fault alarm rate/false alarm rate) is the fault false alarm rate (false alarm rate).
表1TE过程中21个故障数据集上不同方法的比较Table 1 Comparison of different methods on 21 fault data sets during TE
如表1所示,可得出以下结论:本发明提出的方法包括D-RNN,及拓展的D-LSTM和D-GRU,这些方法在FDR高、FAR可接受的情况下都能获得更好的性能;D-RNN的FDR值平均比DPCA、DKPCA、SAM、LQ-SAM和RNN分别高16.41%、17.63%、7.19%、6.09%和7.02%;在大多数选定的故障中,本发明提出的D-RNN优于拓展的D-LSTM和D-GRU,因为D-LSTM和D-GRU在对TE过程建模时引入了门控结构,增加了网络参数的数量(分别接近D-RNN的3倍和4倍),然而TE过程的数据集拥有相对较少的变量和数据,使得D-LSTM和D-GRU会被过拟合,从而导致性能不如D-RNN;虽然D-RNN的FAR值高于DPCA和DKPCA,但在显著性水平α=0.99的条件下可以接受;与RNN相比,D-RNN的FAR值要小很多。As shown in Table 1, the following conclusions can be drawn: The methods proposed by this invention include D-RNN, and extended D-LSTM and D-GRU. These methods can achieve better results when FDR is high and FAR is acceptable. performance; the FDR value of D-RNN is on average 16.41%, 17.63%, 7.19%, 6.09% and 7.02% higher than DPCA, DKPCA, SAM, LQ-SAM and RNN respectively; in most selected faults, the present invention The proposed D-RNN is better than the extended D-LSTM and D-GRU because D-LSTM and D-GRU introduce a gating structure when modeling the TE process and increase the number of network parameters (respectively close to D-RNN 3 times and 4 times), however, the data set of the TE process has relatively few variables and data, so that D-LSTM and D-GRU will be overfitted, resulting in performance that is not as good as D-RNN; although D-RNN's The FAR value is higher than DPCA and DKPCA, but it is acceptable under the condition of significance level α = 0.99; compared with RNN, the FAR value of D-RNN is much smaller.
本发明通过互补双残差生成器提出了一种新的基于RNN的故障监测方法,用于处理具有未知噪声统计的非线性动态过程。前残差生成器捕捉潜在的动力学和非线性关系,将产生的残差送入高斯性检查器中。高斯性检查器通过设置高斯阈值,用残差向量的负熵来近似判断高斯性,得到高斯残差和非高斯残差部分。保留高斯残差部分,提取非高斯残差部分的索引,通过后残差生成器将非高斯残差的部分修正为高斯残差。后残差生成器通过负熵损失函数进行训练。本发明提出的基于RNN的互补双残差生成器解决了在噪声统计是未知的情况下,传统RNN难以输出满足高斯分布的残差的问题。利用本发明提供的方法可以在未知噪声的情况下输出高斯残差,最终可以通过T2统计量进行故障的诊断。在保证较低故障报警率的同时提高了故障检测率。最后该发明可以推广到基于LSTM和GRU的双残差生成器。The present invention proposes a new RNN-based fault monitoring method through a complementary double residual generator for processing nonlinear dynamic processes with unknown noise statistics. The pre-residual generator captures underlying dynamics and nonlinear relationships, and the resulting residuals are fed into a Gaussianity checker. The Gaussianity checker sets the Gaussian threshold and uses the negative entropy of the residual vector to approximately judge the Gaussianity, and obtains the Gaussian residual and non-Gaussian residual parts. The Gaussian residual part is retained, the index of the non-Gaussian residual part is extracted, and the non-Gaussian residual part is corrected into a Gaussian residual through the post-residual generator. The post-residual generator is trained with a negentropic loss function. The complementary dual residual generator based on RNN proposed by the present invention solves the problem that it is difficult for traditional RNN to output residuals that satisfy Gaussian distribution when the noise statistics are unknown. The method provided by the invention can be used to output the Gaussian residual under the condition of unknown noise, and finally the fault can be diagnosed through the T2 statistic. It improves the fault detection rate while ensuring a lower fault alarm rate. Finally, the invention can be generalized to dual residual generators based on LSTM and GRU.
本发明还提供一种基于RNN的互补双残差生成器的故障监测系统。图3为本发明一个实施例的故障监测系统示意图,如图3所示,该系统包括以下模块:The present invention also provides a fault monitoring system based on the complementary double residual generator of RNN. Figure 3 is a schematic diagram of a fault monitoring system according to an embodiment of the present invention. As shown in Figure 3, the system includes the following modules:
过程输入模块,用于将故障检测的过程输入前残差生成器中;The process input module is used to input the fault detection process into the pre-residual generator;
前高斯残差产生模块,用于产出前高斯残差;所述前高斯残差产生模块包括前残差生成器和高斯性检查器;A pre-Gaussian residual generation module, used to generate a pre-Gaussian residual; the pre-Gaussian residual generation module includes a pre-residual generator and a Gaussian checker;
后高斯残差产生模块,用于产出后高斯残差;所述后高斯残差产生模块包括后残差生成器;a post-Gaussian residual generation module, used to generate a post-Gaussian residual; the post-Gaussian residual generation module includes a post-residual generator;
结果产出模块,用于汇总前高斯残差和后高斯残差,并通过T2统计量进行故障的诊断。The result output module is used to summarize the pre-Gaussian residuals and post-Gaussian residuals, and diagnose faults through T2 statistics.
在一个实施例中,本发明还提供一种计算机系统,包括存储器和处理器,存储器存储有机器可读指令,处理器执行机器可读指令时实现如下处理步骤:将故障检测的过程输入前残差生成器中;在所述前残差生成器中,通过RNN网络得到过程输出预测值,与真实值比较得到残差向量;将所述残差向量输入高斯性检查器中,通过所述高斯性检查器将残差分成高斯残差部分和非高斯残差部分;保留所述高斯残差部分为前高斯残差;提取所述非高斯残差部分相应的过程输入索引,将所述索引和所述非高斯残差部分输入后残差生成器中,通过所述后残差生成器将所述非高斯残差部分修正为后高斯残差;将所述前高斯残差和所述后高斯残差汇总得到总残差;将所述总残差输入结果诊断器,通过T2统计量进行故障的诊断。In one embodiment, the present invention also provides a computer system, including a memory and a processor. The memory stores machine-readable instructions. When the processor executes the machine-readable instructions, it implements the following processing steps: input the fault detection process into the pre-processor. In the difference generator; in the pre-residual generator, the process output prediction value is obtained through the RNN network, and the residual vector is obtained by comparing it with the real value; the residual vector is input into the Gaussian checker, and the Gaussian The property checker divides the residual into a Gaussian residual part and a non-Gaussian residual part; retains the Gaussian residual part as the former Gaussian residual; extracts the corresponding process input index of the non-Gaussian residual part, and combines the index and The non-Gaussian residual part is input into the rear residual generator, and the non-Gaussian residual part is modified into a rear Gaussian residual through the rear residual generator; the front Gaussian residual and the rear Gaussian residual are The residuals are summarized to obtain the total residual; the total residual is input into the result diagnostic device, and the fault is diagnosed through the T2 statistic.
可以理解,上述计算机系统除上述述及的存储器和处理器外,还包括其他本说明书未列出的软硬件组成部分,具体可以根据不同应用场景下的具体数据处理设备的型号确定,本说明书不再一一列出详述。It can be understood that, in addition to the above-mentioned memory and processor, the above-mentioned computer system also includes other software and hardware components not listed in this specification. The details can be determined according to the model of the specific data processing equipment in different application scenarios. This specification does not List the details one by one.
在一个实施例中,还提供一种计算机可读存储介质,其上存储有机器可读指令,所述机器可读指令在被处理器执行时实现如下处理步骤:将故障检测的过程输入前残差生成器中;在所述前残差生成器中,通过RNN网络得到过程输出预测值,与真实值比较得到残差向量;将所述残差向量输入高斯性检查器中,通过所述高斯性检查器将残差分成高斯残差部分和非高斯残差部分;保留所述高斯残差部分为前高斯残差;提取所述非高斯残差部分相应的过程输入索引,将所述索引和所述非高斯残差部分输入后残差生成器中,通过所述后残差生成器将所述非高斯残差部分修正为后高斯残差;将所述前高斯残差和所述后高斯残差汇总得到总残差;将所述总残差输入结果诊断器,通过T2统计量进行故障的诊断。In one embodiment, a computer-readable storage medium is also provided, on which machine-readable instructions are stored. When executed by the processor, the machine-readable instructions implement the following processing steps: input the process of fault detection into the pre-processor. In the difference generator; in the pre-residual generator, the process output prediction value is obtained through the RNN network, and the residual vector is obtained by comparing it with the real value; the residual vector is input into the Gaussian checker, and the Gaussian The property checker divides the residual into a Gaussian residual part and a non-Gaussian residual part; retains the Gaussian residual part as the former Gaussian residual; extracts the corresponding process input index of the non-Gaussian residual part, and combines the index and The non-Gaussian residual part is input into the rear residual generator, and the non-Gaussian residual part is modified into a rear Gaussian residual through the rear residual generator; the front Gaussian residual and the rear Gaussian residual are The residuals are summarized to obtain the total residual; the total residual is input into the result diagnostic device, and the fault is diagnosed through the T2 statistic.
尽管上文描述了本发明的各实施例,但是,应该理解,它们只是作为示例来呈现的,而不作为限制。对于相关领域的技术人员显而易见的是,可以对其做出各种组合、变型和改变而不背离本发明的精神和范围。因此,此处所公开的本发明的宽度和范围不应被上述所公开的示例性实施例所限制,而应当仅根据所附权利要求书及其等同替换来定义。Although various embodiments of the present invention are described above, it should be understood that they are presented by way of example only and not by way of limitation. It is obvious to those skilled in the relevant art that various combinations, modifications and changes can be made without departing from the spirit and scope of the invention. Accordingly, the breadth and scope of the invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should be defined solely in accordance with the appended claims and their equivalents.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311165435.7ACN117194880B (en) | 2023-09-11 | 2023-09-11 | Fault monitoring method and system based on RNN complementary double residual generator |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311165435.7ACN117194880B (en) | 2023-09-11 | 2023-09-11 | Fault monitoring method and system based on RNN complementary double residual generator |
| Publication Number | Publication Date |
|---|---|
| CN117194880Atrue CN117194880A (en) | 2023-12-08 |
| CN117194880B CN117194880B (en) | 2025-02-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311165435.7AActiveCN117194880B (en) | 2023-09-11 | 2023-09-11 | Fault monitoring method and system based on RNN complementary double residual generator |
| Country | Link |
|---|---|
| CN (1) | CN117194880B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107357275A (en)* | 2017-07-27 | 2017-11-17 | 中南大学 | Non-gaussian industrial process fault detection method and system |
| CN109507972A (en)* | 2018-12-19 | 2019-03-22 | 中国计量大学 | Industrial processes fault monitoring method based on layer-stepping non-gaussian monitoring algorithm |
| CN111122811A (en)* | 2019-12-14 | 2020-05-08 | 北京工业大学 | A fault monitoring method for sewage treatment process based on OICA and RNN fusion model |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107357275A (en)* | 2017-07-27 | 2017-11-17 | 中南大学 | Non-gaussian industrial process fault detection method and system |
| CN109507972A (en)* | 2018-12-19 | 2019-03-22 | 中国计量大学 | Industrial processes fault monitoring method based on layer-stepping non-gaussian monitoring algorithm |
| CN111122811A (en)* | 2019-12-14 | 2020-05-08 | 北京工业大学 | A fault monitoring method for sewage treatment process based on OICA and RNN fusion model |
| Title |
|---|
| 丁英涛等: "IFA 和 FA 联合方法在化工过程监控中的应用", 《华东理工大学学报(自然科学版》, vol. 43, no. 5, 30 October 2017 (2017-10-30), pages 684 - 690* |
| Publication number | Publication date |
|---|---|
| CN117194880B (en) | 2025-02-11 |
| Publication | Publication Date | Title |
|---|---|---|
| Gopali et al. | A comparison of TCN and LSTM models in detecting anomalies in time series data | |
| WO2020220544A1 (en) | Unbalanced data classification model training method and apparatus, and device and storage medium | |
| CN108535635B (en) | EEMD and HMM based analog circuit intermittent fault diagnosis method | |
| CN106803101B (en) | Odometer Fault Diagnosis Method Based on Hidden Markov Model | |
| CN109327480B (en) | A Multi-Step Attack Scenario Mining Method | |
| CN115221930A (en) | Fault diagnosis method for rolling bearing | |
| CN111241673A (en) | Health state prediction method for industrial equipment in noisy environment | |
| CN116956197B (en) | Deep learning-based energy facility fault prediction method and device and electronic equipment | |
| CN114492533A (en) | A Construction Method and Application of a Bearing Fault Diagnosis Model under Variable Working Conditions | |
| WO2023078243A1 (en) | Intrusion detection method and system for can bus of in-vehicle network | |
| CN108919059A (en) | A kind of electric network failure diagnosis method, apparatus, equipment and readable storage medium storing program for executing | |
| Gopali et al. | A comparative study of detecting anomalies in time series data using LSTM and TCN models | |
| CN109145516A (en) | A kind of analog circuit fault recognition methods based on modified extreme learning machine | |
| CN114037877B (en) | Method and system for improving global anomaly detection performance based on local anomaly data | |
| CN113655341B (en) | Fault positioning method and system for power distribution network | |
| Collier et al. | Transfer and marginalize: Explaining away label noise with privileged information | |
| CN109726770A (en) | A kind of analog circuit fault test and diagnosis method | |
| CN117421667A (en) | Attention-CNN-LSTM industrial process fault diagnosis method based on improved gray wolf algorithm optimization | |
| CN114742115A (en) | Rolling bearing fault diagnosis model and diagnosis method based on fusion of temperature and vibration characteristics | |
| CN115062542A (en) | Prediction method of polymerization process quality based on 2D robust LSTM | |
| WO2025167430A1 (en) | Battery cell open-circuit voltage detection method based on gaussian mixture model | |
| CN116303786B (en) | Block chain financial big data management system based on multidimensional data fusion algorithm | |
| CN116048036B (en) | Fault Detection Method Based on Dynamic Non-Stationary Projection Structure | |
| CN109726736A (en) | The method and system of training elevator internal contracting brake fault diagnosis model, band-type brake fault diagnosis | |
| Lu et al. | MIM-GAN-based anomaly detection for multivariate time series data |
| 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 |