Disclosure of Invention
In order to solve the problems, the invention provides a water pump unit fault diagnosis method based on SGAN on the basis of generating a countercheck network, which aims at the problems of data synthesis and expansion of water pump unit fault data under the condition of a small sample, adopts a secondary countercheck network synthesis mechanism, adds an attention mechanism into a secondary network, improves the stability of the quality of synthesized data on the basis of primary synthesized data, and trains a DBN model by using an expanded data set to realize the fault diagnosis of the water pump unit. The method fully utilizes the attention mechanism to integrate the characteristics of the primary countermeasure network synthesized data and the original data, further improves the quality of the synthesized data by utilizing the secondary countermeasure network, and solves the problems of unstable training and uncontrollable data quality of the traditional GAN data.
In order to solve the technical problems, the invention adopts the following technical scheme:
a water pump unit fault diagnosis method based on SGAN comprises the following steps:
step 1, acquiring various parameters of equipment in normal operation of a water pump unit and various parameters of equipment in various faults to obtain a water pump unit equipment parameter data set;
step 2, constructing a water pump unit equipment parameter matrix Z M ;
Step 3, constructing a secondary attention generation countermeasure network SGAN, carrying out data synthesis processing on a water pump unit equipment parameter data set, and expanding the data set;
and 4, taking the expanded data set as input, calculating a probability value of the fault condition of the expanded data set by adopting a deep belief network DBN, and judging the fault type of the current water pump unit equipment by taking the fault condition with the maximum probability value as a basis.
In step 1, various parameters of the equipment during normal operation of the water pump unit and various faults occur, wherein the various parameters of the equipment comprise water pump temperature, water pump pressure, bearing rotating speed and swing degree.
In step 4, the fault conditions include temperature fault, pressure fault, rotation speed fault and swing degree fault.
The step 2 specifically comprises the following steps:
constructing a water pump unit equipment parameter matrix Z M :
wherein ,em ={ID m ,temperature m ,pressure m ,speed m ,swing m ,L},e m Is the m-th water pump unit equipment parameter vector, ID is the number of the water pump unit equipment, temperature is a temperature parameter, pressure is a pressure parameter, speed is a rotation speed parameter, and swing is a swing parameter;
the water pump unit equipment parameter matrix Z is utilized in the following formula (1) M The out-of-order processing is carried out,
Z noise =Z M gRank(m) (1)
obtaining a noise matrix Z noise ,Z noise =[e no1 ,e no2 ,e no3 ,K,e nom ] T ;
wherein ,enom Is the mth noise vector.
The step 3 specifically comprises the following steps:
step 3.1, constructing a first-level countermeasure network, and forming a noise matrix Z noise As an input of the primary generator S ', the primary generator S' synthesizes new data from the input data; the primary countermeasure network comprises a primary generator S 'and a primary discriminator P';
step 3.2, the parameter matrix Z of the water pump unit equipment M The new data synthesized by the first-stage generator S 'is used as the input of a first-stage discriminator P', and the first-stage discriminator P 'discriminates whether the new data synthesized by the first-stage generator S' is matched with the water pump unit equipment parameter matrix Z or not M Data in (a) are consistent: if yes, executing the step 3.3; otherwise, the primary countermeasure network feeds back to the primary generator S 'according to the result gradient of the primary discriminator P', and repeats steps 3.1 and 3.2Countermeasure training until the synthesized new data is judged by a first-stage judging device P'; water pump unit equipment parameter matrix Z M The data in (a) is original equipment data; finally output first-level composite information matrix Z N ’:
wherein ,en '={ID n ',temperature n ',pressure n ',speed n ',swing n ',L},e n ' is the device parameter vector of the nth first order synthesis; first-order composite information matrix Z N The data in' is the first-order synthesized device data;
step 3.3, introducing an attention mechanism to realize the interactive fusion of the primary synthesized device data and the original device data, and calculating the pair of the primary synthesized device data and the original device data vector by using the formula (3)<e m ,e n ’>Attention coefficient alpha of (a) m,n :
α m,n =e m ge n ' (3)
Further obtaining the attention vector alpha of the nth first-order synthesized equipment parameter by the formula (4) n :
And constructing a first-level synthesized device parameter-original device parameter interaction matrix A:
A=[α 1 ;α 2 ;α 3 ;L;α N ]
wherein N represents N attention vectors;
step 3.4, taking the primary synthesized device parameter-original device parameter interaction matrix A as the input of a secondary generator S' and synthesizing new data; the secondary countermeasure network comprises a secondary generator S "and a secondary arbiter P";
step 3.5, device parameters of the first-order synthesis-originalThe equipment parameter interaction matrix A of the (2) is used as the input of a second-level discriminator P 'for discriminating whether the new data synthesized by the second-level generator S' is matched with the equipment parameter matrix Z of the water pump unit or not as the new data synthesized by the second-level generator S M Data in (a) are consistent: outputting a second-level synthesized data vector if yes; otherwise, the secondary antagonism network feeds back to the secondary generator S ' according to the result gradient of the secondary discriminator P ', and the antagonism training of the step 3.4 and the step 3.5 is repeated until the synthesized new data passes through the discrimination of the secondary discriminator P ';
step 3.6, combining the two-level synthesized device data and the original device data to form an expansion data matrix Z EX :
wherein ,ef EX ={ID f EX ,temperature f EX ,pressure f EX ,speed f EX ,swing f EX ,L},The device expansion parameter vector of the f second-level synthesis is used for obtaining an expansion data set.
The objective function of the primary countermeasure network is as follows (2):
wherein ,the original equipment parameter vector e is judged to be the expectation of a real sample by a first-level judging device P'; />The device parameter vector representing the first order synthesis is determined by the first order arbiter P' as the expectation of a real sample,wherein S' (e) no ) Representative primary generator S' is based on noise matrix parameter vector e no New data synthesized by the input data; p '(S' (e) no ) Representing the new data as input to the first level arbiter P'.
The objective function of the secondary countermeasure network is as follows (5):
where e represents the original device parameter vector, e' represents the first-order synthesized device parameter vector,the second-level discriminator P' judges the original equipment parameter vector e as the expectation of the real sample; e (E) α~A [log(1-P”(S”(α)))]Representing the secondary arbiter P "in combination with the attention mechanism determines that the secondary synthesized device parameter vector is the expectation of a real sample.
The step 4 specifically comprises the following steps: constructing a DBN model, wherein the DBN model comprises a DBN model bottom formed by sequentially superposing a plurality of limited Boltzmann machines RBM and a model top layer for processing calculation results of the limited Boltzmann machines RBM, and the model top layer is a Softmax classifier;
device extension parameter vector e for two-level synthesis EX Visual layer v of input first layer limited boltzmann machine RBM 1 V, i.e 1 =e EX Calculating the visible layer v by equation (6) i Hidden layer l j Probability of activation:
wherein ,wij Representing the visible layer v i Hidden layer l j Is a connection weight of (2); r is (r) i Representing the visible layer v i A bias coefficient;sigmoid (b) is the activation function, b in sigmoid (b) referring to the parenthesis in formula (6);
inputting the final output result of the formula (6) into a Softmax classifier at the top layer of the DBN model, as shown in the formula (7):
and (3) calculating a probability value of a fault condition of the equipment data of the second-level synthesis according to the formula (7), and judging the fault type of the current water pump unit equipment by taking the fault condition with the maximum probability value as a basis.
The limited boltzmann machine RBM is composed of x visible layers v and y hidden layers l;
the hyper-parameter of the limited boltzmann machine RBM is θ= { w, r, u }, where w represents the connection weight of any two visible layers and hidden layers, r represents the visible layer bias coefficient, and u represents the hidden layer bias coefficient.
The invention has the following beneficial effects:
1. aiming at the problem of difficult labeling of fault data of the water pump unit, the invention adopts small sample data as an experimental data set, and can greatly reduce the waste of manpower and time in practical application.
2. The invention provides a water pump unit fault diagnosis method based on SGAN on the basis of generating a contrast network, which aims at the problems of data synthesis and expansion of water pump unit fault data under the condition of a small sample, adopts a secondary contrast network synthesis mechanism, adds an attention mechanism into a secondary network, improves the stability of the quality of synthesized data on the basis of primary synthesized data, and solves the problems of unstable training and uncontrollable data quality of the traditional GAN data.
The invention discloses a fault diagnosis method of a water pump unit based on SGAN (service area network), which aims at the problem that fault samples in monitoring data (including vibration signals, displacement signals, swing signals, temperature signals, rotating speed signals and the like) in the running process of the water pump unit are insufficient, so that equipment faults cannot be accurately and effectively diagnosed in time. According to the invention, the GAN network is introduced to preprocess fault data, so that the problem that the quality of data generated by the traditional GAN model is low, so that a fault diagnosis model cannot be trained more effectively is solved, and the accuracy of a fault diagnosis result can be improved effectively.
Detailed Description
The invention will be explained in further detail below with reference to the drawings and embodiments. The specific embodiments described herein are to be considered in an illustrative sense only and are not intended to limit the invention.
Referring to fig. 1-2, the embodiment provides a water pump unit fault diagnosis method based on SGAN, which comprises the following steps,
and step 1, acquiring various parameters of equipment when the water pump unit normally operates (such as water pump temperature, water pump pressure, bearing rotating speed, swing degree and the like) and acquiring a water pump unit equipment parameter data set when various faults occur.
Step 2, constructing a water pump unit equipment parameter matrix Z M :
wherein ,em ={ID m ,temperature m ,pressure m ,speed m ,swing m ,L},e m Is the m-th device parameter vector, ID is the device number, namely the number of the water pump unit device, temperature is the temperature parameter, pressure is the pressure parameter, speed is the rotation speed parameterSwing is a yaw parameter.
The water pump unit equipment parameter matrix Z is utilized to carry out the operation of (1) M The out-of-order processing is carried out,
Z noise =Z M gRank(m) (1)
wherein (1) uses a water pump unit equipment parameter matrix Z M Based on the result obtained in formula (1) and Z M The dimensions of the matrix are the same and are m;
obtaining a noise matrix Z noise :
Z noise =[e no1 ,e no2 ,e no3 ,K,e nom ] T
wherein ,enom Is the m-th noise vector;
step 3, specifically comprising the following steps:
step 3.1, constructing a primary countermeasure network, and setting a water pump unit equipment parameter matrix Z M Disorder processing to obtain a noise matrix Z noise ,Z noise =[e no1 ,e no2 ,e no3 ,K,e nom ] T As an input of the primary generator S ', the primary generator S' synthesizes new data from the input data; the primary countermeasure network comprises a primary generator S 'and a primary discriminator P';
step 3.2, the parameter matrix Z of the water pump unit equipment M The new data synthesized by the first-stage generator S 'is used as the input of a first-stage discriminator P', and the first-stage discriminator P 'discriminates whether the new data synthesized by the first-stage generator S' is matched with the original data (namely, the water pump unit equipment parameter matrix Z) M ) And (3) coincidence: if yes, executing the step 3.3; otherwise, the primary countermeasure network feeds back to the primary generator S ' according to the result gradient of the primary discriminator P ', and the countermeasure training of the step 3.1 and the step 3.2 is repeated until the composite data passes the discrimination of the primary discriminator P '.
The objective function of the primary countermeasure network is as follows (2):
wherein ,the original equipment parameter vector e is judged to be the expectation of a real sample by a first-level judging device P'; />The device parameter vector representing the first order synthesis is determined by the first order arbiter P 'as the expectation of the real sample, where S' (e no ) Representative primary generator S' is based on noise matrix parameter vector e no New data synthesized by the input data; p '(S' (e) no ) Representing the new data as input to the first level arbiter P'; finally output first-level composite information matrix Z N ’:
wherein ,en '={ID n ',temperature n ',pressure n ',speed n ',swing n ',L},e n ' is the device parameter vector of the nth first order synthesis;
step 3.3, equipment data for achieving first order Synthesis by attention-directing mechanism (i.e. Z N ' data) and raw water pump equipment data (i.e. Z M Data in (3) and calculating the first-order synthesized device data and the original water pump device data vector pair by using the formula (3)<e m ,e n ’>Attention coefficient alpha of (a) m,n :
α m,n =e m ge n ' (3)
Further obtaining the attention vector alpha of the nth first-order synthesized equipment parameter by the formula (4) n :
And constructing a first-level synthesized device parameter-original device parameter interaction matrix A:
A=[α 1 ;α 2 ;α 3 ;L;α N ]
wherein N represents N attention vectors; alpha n An attention vector representing the device parameters of the nth order synthesis;
step 3.4, taking the primary synthesized device parameter-original device parameter interaction matrix A as the input of a secondary generator S' and synthesizing new data; the secondary countermeasure network comprises a secondary generator S "and a secondary arbiter P";
step 3.5, using the first-stage synthesis equipment parameter-original equipment parameter interaction matrix A as the input of a second-stage discriminator P 'for discriminating whether the new data synthesized by the second-stage generator S' is identical to the original data (i.e. the water pump unit equipment parameter matrix Z) M ) And (3) coincidence: outputting a second-level synthesized data vector if yes; otherwise, the secondary antagonism network feeds back to the secondary generator S ' according to the result gradient of the secondary discriminator P ', and the antagonism training of the steps 3.4 and 3.5 is repeated until the synthesized data passes the discrimination of the secondary discriminator P '.
The objective function of the secondary countermeasure network is as follows (5):
where e represents the original water pump's device data vector, i.e., the original device parameter vector, e' represents the first-order synthesized device parameter vector,the second-level discriminator P' judges the original equipment parameter vector e as the expectation of the real sample; e (E) α~A [log(1-P”(S”(α)))]The second-level discriminator P' is combined with an attention mechanism to judge that the second-level synthesized device parameter vector is the expectation of a real sample;
step 3.6, the two-stage synthesized equipment data and the equipment data of the raw water pump unit are combined into an expansion data matrix Z EX :
wherein ,ef EX ={ID f EX ,temperature f EX ,pressure f EX ,speed f EX ,swing f EX ,L},Is the equipment expansion parameter vector of the f second-level synthesis;
and 4, constructing a DBN model, wherein the bottom of the DBN model is formed by sequentially superposing 5 limited Boltzmann machines (Restricted Boltzmann Machine, RBM), and finally sending the obtained result into a model top-layer Softmax classifier for judging the fault type. The top-level classifier is a softmax classifier that is used to process the results of the 5 RBM calculations. The RBM is composed of x visible layers v and y hidden layers l. The super parameter of the RBM is θ= { w, r, u }, where w represents the connection weight of any two visible layers and the hidden layer, r represents the visible layer bias coefficient, and u represents the hidden layer bias coefficient.
Device extension parameter vector e for two-level synthesis EX Visual layer v for inputting first layer RBM 1 V, i.e 1 =e EX Calculating the visible layer v by equation (6) i Hidden layer l j Probability of activation:
wherein ,wij Representing the visible layer v i Hidden layer l j Is a connection weight of (2); r is (r) i Representing the visible layer v i A bias coefficient;sigmoid (b) is the activation function, b in sigmoid (b) referring to the parenthesis in formula (6);
inputting the final output result of the formula (6) into a top classifier of the DBN model, as shown in the formula (7):
and (3) calculating a probability value of a certain fault condition (which can comprise temperature fault, pressure fault, rotating speed fault and swing degree fault, specifically, what needs to be determined according to actual conditions) of the two-stage synthesized equipment data according to the formula (7), and further taking the fault condition with the maximum probability value as a basis to judge the fault state of the current equipment.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or groups of devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or groups of embodiments may be combined into one module or unit or group, and furthermore they may be divided into a plurality of sub-modules or sub-units or groups. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the method of the invention in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, computer readable media comprise computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer readable instructions, data structures, program modules, or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of the above description, will appreciate that other embodiments are contemplated within the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is defined by the appended claims.