CN112949035A - Fault diagnosis method and device for sensor - Google Patents

Fault diagnosis method and device for sensor Download PDF

Info

Publication number
CN112949035A
CN112949035A CN202110125164.7A CN202110125164A CN112949035A CN 112949035 A CN112949035 A CN 112949035A CN 202110125164 A CN202110125164 A CN 202110125164A CN 112949035 A CN112949035 A CN 112949035A
Authority
CN
China
Prior art keywords
sensor
fault
fault diagnosis
vector
sequence
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
CN202110125164.7A
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.)
State Grid Corp of China SGCC
Jinan Power Supply Co of State Grid Shandong Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Jinan Power Supply Co of State Grid Shandong Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Jinan Power Supply Co of State Grid Shandong Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202110125164.7A priority Critical patent/CN112949035A/en
Publication of CN112949035A publication Critical patent/CN112949035A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention provides a fault diagnosis method and a fault diagnosis device of a sensor, wherein the method comprises the steps of constructing a fault diagnosis model based on a coding and decoding network, adding a data attention mechanism into a coder of the fault diagnosis model, and adding a time attention mechanism and a fusion module into a decoder; and training the fault diagnosis model, determining a fault threshold value of the sensor, and performing fault diagnosis on the sensor based on the fault threshold value. The novel data-time attention network (DAN) for diagnosing the fault of the sensor of the air conditioning unit is provided on the basis of the traditional encoder-decoder network (EDN), and the problems that the reading of the sensor shows dynamic data time dependence and is easily influenced by external factors and control parameters due to the operation mechanism of an air conditioning unit system are solved. When fault diagnosis is carried out based on the model, the model is more sensitive to deviation faults, and the fault diagnosis performance of the sensor is greatly improved.

Description

Fault diagnosis method and device for sensor
Technical Field
The invention relates to the technical field of fault detection and diagnosis of building air conditioning systems, in particular to a fault diagnosis method and device of a sensor.
Background
In industrial and commercial buildings, Heating, Ventilation and Air Conditioning (HVAC) systems are a significant portion of energy consumption. Specifically, the air conditioning unit consumes more than 40% of the total energy of the air conditioner. The precision measuring sensors are responsible for real-time data recording and performance monitoring, which plays a crucial role in optimal control and energy management. However, during long-term operation, it is not guaranteed that most sensors are always in a normal state. Using the readings of the faulty sensor as feedback information can lead to improper control strategy, resulting in wasted energy, shortened equipment life, and decreased comfort of the indoor environment. Therefore, it is highly desirable to establish an effective method for detecting and diagnosing faults of air conditioning unit sensors to ensure that a proper control strategy is implemented.
The EDN (embedded data network) model is now a hot topic in the fields of deep learning and artificial intelligence, and can be used to learn meaningful representations of complex time series, and also to map inputs to correct reconstructed outputs. However, Fault Detection and Diagnosis (FDD) by EDN method in hvac systems still lacks attention.
In the existing fault diagnosis process of the sensor, during the normal operation period of the air-cooled refrigerator system, the data characteristics reflected in the time sequence of the sensor are still difficult to extract fully.
Disclosure of Invention
The invention provides a fault diagnosis method of a sensor, which is used for solving the problem that the data characteristics reflected in a sensor time sequence are difficult to fully extract in the normal operation period of an air-cooled refrigerator system.
In order to achieve the purpose, the invention adopts the following technical scheme:
a first aspect of the present invention provides a method for diagnosing a failure of a sensor, the method including the steps of:
constructing a fault diagnosis model based on a coding and decoding network, wherein a data attention mechanism is added into an encoder of the fault diagnosis model, and a time attention mechanism and a fusion module are added into a decoder;
and training the fault diagnosis model, determining a fault threshold value of the sensor, and performing fault diagnosis on the sensor based on the fault threshold value.
Further, the determination process of the encoder input is as follows:
acquiring a training sample of a sensor, and carrying out normalization processing on the training sample to obtain a normalized sensor time sequence;
adaptively assigning an impact weight to the normalized value for each sensor based on the historical dataset;
the normalized value of the current time of the sensor is multiplied by its influence weight, and the representation vector formed by the product values is used as the input sequence of the encoder.
Further, the input sequence is the sum of a forward input sequence and a reverse input sequence.
Further, the impact weight satisfies:
Figure BDA0002923727210000021
wherein the content of the first and second substances,
Figure BDA0002923727210000022
and
Figure BDA0002923727210000023
representing the weight of influence of sensor j in the forward and backward directions, NSIndicating the number of sensors;
Figure BDA0002923727210000024
Figure BDA0002923727210000025
Figure BDA0002923727210000026
and
Figure BDA0002923727210000027
are weight matrices learned in the forward and reverse directions, respectively;
Figure BDA0002923727210000028
represents a previous time series corresponding to sensor j;
Figure BDA0002923727210000029
representing the hidden state of the forward encoder,
Figure BDA00029237272100000210
representing the backward encoder hidden state.
Further, the decoder inputComprising a content vector ctInfluence vector ptAnd a reconstruction sequence
Figure BDA00029237272100000211
The content vector ctIntroducing a temporal attention mechanism, said influence vector ptIntroducing a fusion module.
Further, the content vector ctSatisfies the following conditions:
Figure BDA0002923727210000031
wherein h isiA characterization sequence for the encoder output;
αt,iis a weight vector, is the t target sequence and the normalized sensor sequence at the i time
Figure BDA0002923727210000032
Probability of alignment, in particular
Figure BDA0002923727210000033
Time attention mechanism dt,iIs calculated as
Figure BDA0002923727210000034
Wherein
Figure BDA0002923727210000035
Is the weight matrix to be learned.
Further, the training process of the fault diagnosis model is as follows:
calculating a reconstruction error vector through an original time sequence input into the coding and decoding network and a reconstruction time sequence output from the coding and decoding network;
and determining a target loss function based on the reconstruction error vector, and training the target loss function until the target loss function meets a preset threshold condition.
Further, the method for determining the fault threshold value comprises the following steps:
respectively training an normal data set and each type of sensor fault data set based on the fault diagnosis model to obtain absolute reconstruction errors of the corresponding data sets;
comparing the absolute reconstruction error of each sensor sample under a normal data set, selecting a maximum value, and recording as a first error value;
comparing absolute reconstruction errors of the samples of the sensor without faults under the fault data set, selecting a maximum value, and recording as a second error value;
and for the same sensor, taking the larger value of the corresponding first error value and the second error value as the fault threshold value of the current sensor, wherein the fault threshold values of all the sensors form a fault threshold value vector.
Further, the performing of the fault diagnosis of the sensor based on the fault threshold specifically includes:
training the test data set to obtain a reconstruction error vector of the test data set;
and identifying each sensor sample in the test time sequence one by one based on the fault threshold vector, wherein when the absolute reconstruction error of the sensor sample is greater than the corresponding side fault threshold, the current sensor is a fault sensor.
A second aspect of the present invention provides a failure diagnosis apparatus of a sensor, the apparatus including:
the model building unit is used for building a fault diagnosis model based on a coding and decoding network, a data attention mechanism is added into a coder of the fault diagnosis model, and a time attention mechanism and a fusion module are added into a decoder;
and the fault diagnosis unit is used for training the fault diagnosis model, determining a fault threshold value of the sensor and carrying out fault diagnosis on the sensor based on the fault threshold value.
The failure diagnosis device for a sensor according to the second aspect of the present invention can realize the methods according to the first aspect and the respective implementation forms of the first aspect, and achieves the same effects.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
1. the invention constructs a fault diagnosis model based on an encoding and decoding network, introduces a data attention mechanism into an encoder, introduces a time attention mechanism and a fusion module into a decoder, fully considers the dynamic correlation of sensor reading data, the dynamic correlation of time and the influence of external factors and control parameters on sensor reading, is more sensitive to deviation faults when fault diagnosis is carried out based on the model, and greatly improves the fault diagnosis performance of the sensor.
2. The fault diagnosis model constructed by the invention has stronger robustness to the interference of the fault sensor in the reconstruction of the fault-free sensor, lays a foundation for obtaining the minimum fault threshold of each sensor, and improves the sensitivity of fault prediction.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of the process of the present invention;
FIG. 2 is a schematic diagram of the operation of the bidirectional GRU of the present invention;
FIG. 3 is a block diagram of the structure of the fault diagnosis model of the present invention;
FIG. 4 is a schematic diagram of the structure of the fault diagnosis strategy of the present invention;
FIG. 5 is a flow chart illustrating fault threshold determination and diagnosis in accordance with the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, the sensor fault diagnosis method provided by the present invention includes the following steps:
s1, constructing a fault diagnosis model based on the coding and decoding network, coding and decoding the original sample based on the fault diagnosis model, and generating a corresponding reconstruction time sequence matrix. A data attention mechanism is added into an encoder of the fault diagnosis model, and a time attention mechanism and a fusion module are added into a decoder;
and S2, training a fault diagnosis model based on the DAN air conditioning unit sensor fault diagnosis strategy, determining a fault threshold value of the sensor, and performing fault diagnosis of the sensor based on the fault threshold value. Specifically, a normal sequence is used for training and learning, and normal time sequence behaviors are reconstructed; then determining a fault threshold value of each air conditioning unit sensor; and finally, identifying the fault sensor by comparing the absolute reconstruction error vector with the fault threshold vector.
The principle of the encoder-decoder network (EDN) is explained first:
GRU (gated round Unit) -based EDN model in an encoder-decoder framework where the encoder reads input samples
Figure BDA0002923727210000051
Into a fixed-length representation vector c.
Wherein
Figure BDA0002923727210000061
Figure BDA0002923727210000062
Representing correlation information corresponding to a normalized sensor time series at time t
Figure BDA0002923727210000063
Since it sequentially encodes the input time sequence for each time step, the encoder hidden state is constantly updated according to the following formula:
Figure BDA0002923727210000064
wherein g represents a group of a group selected from GRU,
Figure BDA0002923727210000065
is the encoder hidden state at time t, n represents the number of hidden nodes. In the present invention, the number n of hidden nodes is selected to be 128. Reading input sequences at an encoder
Figure BDA0002923727210000066
After the end of (c), the last hidden state of the encoder will be the entire input sample
Figure BDA0002923727210000067
Represents the vector c, i.e. c ═ hT
Given a representation vector c, the decoder conceals state St+1Sum of reconstructed sequence
Figure BDA0002923727210000068
At the (t +1) th time step, the decoder builds in reverse order to generate its current concealment state. Thus, the decoder hidden state at time t
Figure BDA0002923727210000069
Obtained by the following formula:
Figure BDA00029237272100000610
the reconstructed time series is then calculated by using the linear layer on top of the GRU decoder:
Figure BDA00029237272100000611
wherein
Figure BDA00029237272100000612
And
Figure BDA00029237272100000613
respectively representing the weight matrix and the deviation vector of the linear layer. And performing joint training on the two components of the GRU encoder and the GRU decoder, and reconstructing a sensor time sequence, wherein the target time sequence is the normalized sensor time sequence.
Conventional GRUsOne disadvantage of (a) is that they only read a series of input sequences in a single direction. In order to overcome the traditional GRUsThe encoder employs a bi-directional GRU network to handle both forward and backward input information.
In a two-way GRU network,
Figure BDA00029237272100000614
reading the input sequence in the forward layer (from)
Figure BDA00029237272100000615
To
Figure BDA00029237272100000616
) Computing a series of forward encoder hidden states
Figure BDA00029237272100000617
As shown in fig. 2. In a similar manner to that described above,
Figure BDA0002923727210000071
reading the input sequence from behind (from
Figure BDA0002923727210000072
To
Figure BDA0002923727210000073
) Computing a series of inverse encoder hidden states
Figure BDA0002923727210000074
According to equation (2), the encoder concealment states forward and backward at time instant are obtained by the following formula:
Figure BDA0002923727210000075
Figure BDA0002923727210000076
hiding states by tandem forward encoder
Figure BDA0002923727210000077
And backward encoder hidden state
Figure BDA0002923727210000078
Obtaining each input sequence
Figure BDA0002923727210000079
The characterization sequence of (a), i.e.,
Figure BDA00029237272100000710
it summarizes
Figure BDA00029237272100000711
Information that is useful in the past and in the future.
The reconstruction time series matrix generated in step S1 is specifically:
and acquiring a reconstruction sequence of each normalized training sample, and preparing for implementing a fault diagnosis strategy of the air conditioning unit sensor. The reconstruction sequence corresponding to the sam-time normalized training sample is
Figure BDA00029237272100000712
Wherein
Figure BDA00029237272100000713
Representation normalized sensor
Figure BDA00029237272100000714
Reconstructed value at time t, obviously, reconstructed sample
Figure BDA00029237272100000715
Is the same as the normalized training sample χ (sam), which matches the "end-to-end" network structure.
The specific implementation process of step S1 is as follows:
step 1.1: acquiring environmental information of an air conditioning unit through a sensor to obtain an original data set;
step 1.2: normalizing the original data set to obtain a training sample, and determining the input of an encoder;
the input to the encoder includes two parts, normalized training samples and a historical data set:
(1) normalized training sample
Given a time window of length T and a set of raw training data
Figure BDA00029237272100000716
The training data set consists of N normal samples, each containing T sensor time series. For example, sam training samples are represented as:
Figure BDA0002923727210000081
wherein
Figure BDA0002923727210000082
Indicates the t-th time NSThe reading of each sensor. Because the readings of the sensors of the air conditioning units are different in unit and magnitude, the original training data set is subjected to Chi DEGtrainNormalising to a new matrix χ using the Z-Score normalisation methodtrain. The sam normalized training samples are represented as:
Figure BDA0002923727210000083
wherein
Figure BDA0002923727210000084
Normalized values corresponding to all sensor readings at time t are described.
(2) Historical data set
Historical data set taking into account the effects of sensor lag
Figure BDA0002923727210000085
Record NSThe normalized value of the readings of each sensor over the past τ time steps is noted as:
Figure BDA0002923727210000086
wherein
Figure BDA0002923727210000087
Representing a previous time series corresponding to sensor j.
Since the refrigeration cycle process needs to follow the energy conservation law, the readings of the sensors perform a dynamic data correlation. In order to characterize data correlations and eliminate interference of irrelevant information between different sensors over time, the present invention proposes a novel data attention mechanism embedded in the encoder.
Step 1.3: establishing an encoder with a data attention mechanism, and further processing input data to obtain a sequence
Figure BDA0002923727210000091
As input sequence to the encoder.
In the normalized sensor time series, the data attention mechanism proposed by the invention refers to the historical data set
Figure BDA0002923727210000092
An impact weight is adaptively assigned to the corresponding normalized value for each sensor reading. The normalized value for each sensor reading at the current time is then multiplied by its impact weight. Finally, the expression vector formed by the product values in series
Figure BDA0002923727210000093
As input sequence to the encoder. Influenced by the bidirectional GRU network, inputting sequences
Figure BDA0002923727210000094
Is a forward input sequence
Figure BDA0002923727210000095
And reverse input sequence
Figure BDA0002923727210000096
Is a sum of
Figure BDA0002923727210000097
The calculation formula of the forward and reverse input sequences is:
Figure BDA0002923727210000098
Figure BDA0002923727210000099
Figure BDA00029237272100000910
and
Figure BDA00029237272100000911
the influence weights representing the sensor j in the forward direction and the reverse direction can be obtained by the following formulas:
Figure BDA00029237272100000912
Figure BDA00029237272100000913
wherein
Figure BDA00029237272100000914
And
Figure BDA00029237272100000915
is a data attention mechanism built from a soft attention model score (·), which is computed under the initiation of the soft attention model by considering the hidden state of the encoder and the previous time series of each sensor, in equations (19) and (20),
Figure BDA00029237272100000916
and
Figure BDA00029237272100000917
are weight matrices that are learned in the forward and reverse directions, respectively.
Step 1.4: the output of the encoder, the token sequence, is obtained, then the input of the decoder is determined, and the decoder with the time attention mechanism and the fusion module is established.
Dynamic response characteristics exist in all sensors, and sensor readings at adjacent times can influence the current time reading, and dynamic time correlation is displayed in the sensor time sequence. The time attention mechanism proposed by the present invention is used to solve the problem of how to select important information of adjacent time series to reconstruct the sensor series of the current time.
In addition, there are many external factors and control parameters that affect sensor readings, and the present invention designs a fusion module to cope with these factors from different fields.
In a two-way GRU network,
Figure BDA0002923727210000101
reading the input sequence in the forward layer (from)
Figure BDA0002923727210000102
To
Figure BDA0002923727210000103
) Computing a series of forward encoder hidden states
Figure BDA0002923727210000104
As shown in fig. 2. In a similar manner to that described above,
Figure BDA0002923727210000105
reading the input sequence from behind (from
Figure BDA0002923727210000106
To
Figure BDA0002923727210000107
) Computing a series of inverse encoder hidden states
Figure BDA0002923727210000108
Hiding states by tandem forward encoder
Figure BDA0002923727210000109
And backward encoder hidden state
Figure BDA00029237272100001010
Obtaining each input sequence
Figure BDA00029237272100001011
The characterization sequence of (a), i.e.,
Figure BDA00029237272100001012
it summarizes
Figure BDA00029237272100001013
Information that is useful in the past and in the future.
The input to the decoder comprises a content vector ctInfluence vector ptAnd a reconstruction sequence
Figure BDA00029237272100001014
Three parts:
(1) content vector ct
Since all sensors have dynamic response characteristics, the variation of the sensor time series with time presents dynamic time dependency. On the basis of this, the content vector c is converted into a content vectortThe temporal attention mechanism presented in (a) is built into the decoder. Content vector ctRelying on a token sequence (h) containing information about the entire input sequence1 ... ht-1,ht,ht+1 ... hT) The calculation of the weighted sum of these characterizations can be done:
Figure BDA00029237272100001015
weight vector alphat,iIs the t-th target sequence at the i-th time instant and the normalized sensor sequence
Figure BDA00029237272100001016
Probability of alignment ofCalculated by the following equation:
Figure BDA00029237272100001017
similar to the data attention mechanism, the time attention mechanism dt,iThe calculation is as follows:
Figure BDA0002923727210000111
wherein
Figure BDA0002923727210000112
Is the weight matrix to be learned. According to the representation vector hiAnd decoder hidden state st+1Time attention mechanism dt,iAnd scoring the matching degree of the normalized sensor time sequence near the position i and the target sequence at the moment t.
(2) Influence vector pt
In air conditioning unit systems, the sensor time series has strong data and time correlation. In addition, there are many external factors and control parameters that affect the sensor readings, such as outdoor ambient temperature TenvFrequency f of scroll compressorcomAnd electronic expansion valve openingv. Therefore, a simple and effective element is designed to cope with these influence factors from different fields. As shown in the fused block section of FIG. 3, these three influencing factors are combined into one influencing vector ptExpressed as:
Figure BDA0002923727210000113
then, the influence vector is compared with the content vector ctTogether as the input to the decoder.
Step 1.5: determining the output of a decoder-the reconstructed sequence
Figure BDA0002923727210000114
And will be
Figure BDA0002923727210000115
And the influence vector ptAnd a content vector ctConnected as the input of the decoder to prepare for the implementation of the air conditioning unit sensor fault diagnosis strategy.
A key component of the decoder is the use of a stacked GRU architecture, which is capable of building up the content vector c step by steptAnd the influence vector ptHigher in the figure. In an embodiment of the invention we develop a stacked GRU network by overlaying 3 GRU concealment layers, where the output sequence of one layer constitutes the input sequence of the next layer, as shown in the decoder part of fig. 3.
Calculating a first layer decoder concealment state by referring to equation (9)
Figure BDA0002923727210000116
Figure BDA0002923727210000117
Wherein
Figure BDA0002923727210000118
Indicating that the sequence is to be reconstructed
Figure BDA0002923727210000119
And the influence vector ptAnd a content vector ctThe concatenated input represents a vector. Iteratively calculating the decoder hidden states of the remaining 2 layers from T-1 to T-T
Figure BDA00029237272100001110
Figure BDA0002923727210000121
Wherein, gmThe GRU representing the mth decoder concealment layer.
The specific implementation process included in the step S2 is as follows:
step 2.1: training a DAN model;
most of the normal operating data used as the training data set is used to learn the DAN reconstruction model. In the sam training samples, the reconstructed error vector at time t is obtained by:
Figure BDA0002923727210000122
wherein
Figure BDA0002923727210000123
For the reconstruction error of the sam training sample of the jth sensor at time t,
Figure BDA0002923727210000124
reconstructing the sensor time sequence for inverse normalization, corresponding to the original training sensor sequence
Figure BDA0002923727210000125
Both illustrated in equation (28) and in the "model training" of FIG. 4, by taking the original normal sensor time series
Figure BDA0002923727210000126
And the reconstructed time series of the denormalization process
Figure BDA0002923727210000127
The difference between them to calculate a reconstruction error vector
Figure BDA0002923727210000128
Target loss function for training the DAN model:
Figure BDA0002923727210000129
wherein | is a 2-norm. It can be seen that the target loss function penalty is expressed in the form of a Mean Square Error (MSE). In the training process, an Adam optimizer is introduced, the proposed DAN model is trained by minimizing MSE, and the denormalized reconstruction time series is infinitely close to its corresponding original sensor time series at each time step until the loss function value is less than or equal to a predetermined threshold, which is set to ξ ═ 1e-3 in the embodiment.
Step 2.2: the failure threshold determination is illustrated in fig. 4 "failure threshold determination" and fig. 5.
Respectively training a normal data set and each type of sensor fault data set based on a fault diagnosis model, and calculating a reconstruction error vector by referring to an equation (28) to obtain an absolute reconstruction error of the corresponding data set
Figure BDA00029237272100001210
Comparing the absolute reconstruction error of each sensor sample under the normal data set, selecting the maximum value, and recording as a first error value
Figure BDA0002923727210000131
Comparing absolute reconstruction errors of the samples of the sensor without faults under the fault data set, selecting a maximum value, and recording as a second error value; an erroneous reading of a faulty sensor can adversely affect the reconstructed value of a non-faulty sensor. Therefore, when a sensor fails, the maximum absolute reconstruction error other than the failed sensor is considered, and the failure threshold of the non-failed sensor is determined. Taking the s-th faulty sensor as an example, the remaining sensors (N) can be founds-1) maximum absolute reconstruction error
Figure BDA0002923727210000132
Similar to the normal operating conditions.
For the same sensor, the larger value of the corresponding first error value and the second error value is taken as the fault threshold e of the current sensors(again taking the s-th sensor failure as an example), junctionIn the case of NsFault threshold value of each sensor, establishing fault threshold value vector ethre _f
Step 2.3: diagnosing sensor faults;
the sensor failure diagnostic process is shown in the "failure diagnosis" section of fig. 4. Before the sensor fault diagnosis, similar to model training, a reconstruction error matrix of a new test sample is generated. In the fault diagnosis process, a fault threshold vector e is utilizedthre_fTo identify the particular faulty sensor in each test time series. For a faulty sensor, the absolute error of the reconstruction exceeds the corresponding fault threshold. While in the same test time sequence, the rest (N) must be guaranteeds-1) the absolute reconstruction error of the sensor is within the normal range.
The invention also provides a fault diagnosis device of the sensor, which comprises a model building unit and a fault diagnosis unit.
The model building unit is used for building a fault diagnosis model based on a coding and decoding network, a data attention mechanism is added into a coder of the fault diagnosis model, and a time attention mechanism and a fusion module are added into a decoder; the fault diagnosis unit is used for training the fault diagnosis model, determining a fault threshold value of the sensor and carrying out fault diagnosis on the sensor based on the fault threshold value.
The device can realize each step in the fault diagnosis method and obtain the same effect.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. A method for diagnosing a failure of a sensor, the method comprising the steps of:
constructing a fault diagnosis model based on a coding and decoding network, wherein a data attention mechanism is added into an encoder of the fault diagnosis model, and a time attention mechanism and a fusion module are added into a decoder;
and training the fault diagnosis model, determining a fault threshold value of the sensor, and performing fault diagnosis on the sensor based on the fault threshold value.
2. The method of diagnosing a failure in a sensor according to claim 1, wherein the encoder input is determined by:
acquiring a training sample of a sensor, and carrying out normalization processing on the training sample to obtain a normalized sensor time sequence;
adaptively assigning an impact weight to the normalized value for each sensor based on the historical dataset;
the normalized value of the current time of the sensor is multiplied by its influence weight, and the representation vector formed by the product values is used as the input sequence of the encoder.
3. The method of diagnosing a failure in a sensor according to claim 2, wherein the input sequence is a sum of a forward input sequence and a reverse input sequence.
4. The method of diagnosing a failure in a sensor according to claim 3, wherein the influence weight satisfies:
Figure FDA0002923727200000011
wherein the content of the first and second substances,
Figure FDA0002923727200000012
and
Figure FDA0002923727200000013
representing the weight of influence of sensor j in the forward and backward directions, NSIndicating the number of sensors;
Figure FDA0002923727200000014
Figure FDA0002923727200000015
Figure FDA0002923727200000016
and
Figure FDA0002923727200000017
are weight matrices learned in the forward and reverse directions, respectively;
Figure FDA0002923727200000018
represents a previous time series corresponding to sensor j;
Figure FDA0002923727200000021
representing the hidden state of the forward encoder,
Figure FDA0002923727200000022
representing the backward encoder hidden state.
5. The method of fault diagnosis of a sensor of claim 1, wherein said decoder input comprises a content vector ctInfluence vector ptAnd a reconstruction sequence
Figure FDA0002923727200000023
The content vector ctIntroducing a temporal attention mechanism, said influence vector ptIntroducing a fusion module.
6. The method of diagnosing a failure in a sensor according to claim 5, wherein the content vector c istSatisfies the following conditions:
Figure FDA0002923727200000024
wherein h isiA characterization sequence for the encoder output;
αt,iis a weight vector, is the t target sequence and the normalized sensor sequence at the i time
Figure FDA0002923727200000025
Probability of alignment, in particular
Figure FDA0002923727200000026
Time attention mechanism dt,iIs calculated as
Figure FDA0002923727200000027
Wherein
Figure FDA0002923727200000028
Is the weight matrix to be learned.
7. The method for diagnosing the failure of the sensor according to claim 1, wherein the training process of the failure diagnosis model is as follows:
calculating a reconstruction error vector through an original time sequence input into the coding and decoding network and a reconstruction time sequence output from the coding and decoding network;
and determining a target loss function based on the reconstruction error vector, and training the target loss function until the target loss function meets a preset threshold condition.
8. The method for diagnosing a failure in a sensor according to claim 7, wherein the failure threshold is determined by:
respectively training an normal data set and each type of sensor fault data set based on the fault diagnosis model to obtain absolute reconstruction errors of the corresponding data sets;
comparing the absolute reconstruction error of each sensor sample under a normal data set, selecting a maximum value, and recording as a first error value;
comparing absolute reconstruction errors of the samples of the sensor without faults under the fault data set, selecting a maximum value, and recording as a second error value;
and for the same sensor, taking the larger value of the corresponding first error value and the second error value as the fault threshold value of the current sensor, wherein the fault threshold values of all the sensors form a fault threshold value vector.
9. The method for diagnosing a failure of a sensor according to claim 8, wherein the diagnosing a failure of a sensor based on the failure threshold value is specifically:
training the test data set to obtain a reconstruction error vector of the test data set;
and identifying each sensor sample in the test time sequence one by one based on the fault threshold vector, wherein when the absolute reconstruction error of the sensor sample is greater than the corresponding side fault threshold, the current sensor is a fault sensor.
10. A failure diagnosis apparatus for a sensor, comprising:
the model building unit is used for building a fault diagnosis model based on a coding and decoding network, a data attention mechanism is added into a coder of the fault diagnosis model, and a time attention mechanism and a fusion module are added into a decoder;
and the fault diagnosis unit is used for training the fault diagnosis model, determining a fault threshold value of the sensor and carrying out fault diagnosis on the sensor based on the fault threshold value.
CN202110125164.7A 2021-01-29 2021-01-29 Fault diagnosis method and device for sensor Pending CN112949035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110125164.7A CN112949035A (en) 2021-01-29 2021-01-29 Fault diagnosis method and device for sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110125164.7A CN112949035A (en) 2021-01-29 2021-01-29 Fault diagnosis method and device for sensor

Publications (1)

Publication Number Publication Date
CN112949035A true CN112949035A (en) 2021-06-11

Family

ID=76239521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110125164.7A Pending CN112949035A (en) 2021-01-29 2021-01-29 Fault diagnosis method and device for sensor

Country Status (1)

Country Link
CN (1) CN112949035A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114484732A (en) * 2022-01-14 2022-05-13 南京信息工程大学 Air conditioning unit sensor fault diagnosis method based on novel voting network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DINGLI,ET AL: "A novel data-temporal attention network based strategy for fault diagnosis of chiller sensors", 《ENERGY AND BUILDINGS》, 15 June 2019 (2019-06-15), pages 377 - 394 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114484732A (en) * 2022-01-14 2022-05-13 南京信息工程大学 Air conditioning unit sensor fault diagnosis method based on novel voting network

Similar Documents

Publication Publication Date Title
US11507049B2 (en) Method for detecting abnormity in unsupervised industrial system based on deep transfer learning
CN112131760B (en) CBAM model-based prediction method for residual life of aircraft engine
Wang et al. A data-driven aero-engine degradation prognostic strategy
CN110942101B (en) Rolling bearing residual life prediction method based on depth generation type countermeasure network
CN109948117A (en) A kind of satellite method for detecting abnormality fighting network self-encoding encoder
Navone et al. Predicting Indian monsoon rainfall: a neural network approach
CN107657250B (en) Bearing fault detection and positioning method and detection and positioning model implementation system and method
CN107544904B (en) Software reliability prediction method based on deep CG-LSTM neural network
Ragab et al. Attention-based sequence to sequence model for machine remaining useful life prediction
CN112033463B (en) Nuclear power equipment state evaluation and prediction integrated method and system
Huang et al. Transfer dictionary learning method for cross-domain multimode process monitoring and fault isolation
CN108960063A (en) It is a kind of towards event relation coding video in multiple affair natural language description algorithm
CN109543743B (en) Multi-sensor fault diagnosis method for refrigerating unit based on reconstructed prediction residual error
CN115903741B (en) Industrial control system data anomaly detection method
CN111723925B (en) Fault diagnosis method, device, equipment and medium for on-road intelligent train air conditioning unit
CN114297918A (en) Aero-engine residual life prediction method based on full-attention depth network and dynamic ensemble learning
CN113434970A (en) Health index curve extraction and service life prediction method for mechanical equipment
CN115455746B (en) Nuclear power device operation monitoring data anomaly detection and correction integrated method
CN109697304A (en) A kind of construction method of refrigeration unit multi-sensor data prediction model
CN115169430A (en) Cloud network end resource multidimensional time sequence anomaly detection method based on multi-scale decoding
CN112949035A (en) Fault diagnosis method and device for sensor
Senanayaka et al. Autoencoders and recurrent neural networks based algorithm for prognosis of bearing life
CN114897103A (en) Industrial process fault diagnosis method based on neighbor component loss optimization multi-scale convolutional neural network
Xu et al. Anomaly detection with gru based bi-autoencoder for industrial multimode process
CN116992380A (en) Satellite multidimensional telemetry sequence anomaly detection model construction method and device, anomaly detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611

RJ01 Rejection of invention patent application after publication