Water pump operation fault detection method and system based on artificial intelligence
By improving the K-mean clustering model and feature-enhanced bidirectional long and short-term memory network model, the shortcomings of traditional water pump fault detection methods in capturing time-dependent and nonlinear modes are solved, and the accuracy and adaptability of fault detection are improved.
Patent Information
- Application Number
- CN202411877620.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional water pump operation fault detection methods are difficult to capture the time dependence, local timing offset and periodic changes in the data, resulting in classification errors, and easily lead to overfitting or underfitting of the model when facing dynamically changing operating data, affecting the accuracy of fault detection.
The improved K-mean clustering model is used for preliminary fault classification, and nonlinear changes and local time changes in the running data are captured, and fault detection is carried out through feature enhancement of the two-way long and short-term memory network model, which improves feature expression capabilities and captures deep-level information in time series data.
It improves the accuracy of fault detection, can better identify fault modes and abnormal conditions in the operation of the water pump, avoid classification errors caused by the data timeline being out of synchronization, and adapt to dynamically changing fault modes.
Smart Images

Figure CN119337292B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water pump operation fault data processing, and in particular to a water pump operation fault detection method and system based on artificial intelligence. Background Art
[0002] Water pump operation fault detection refers to the timely detection of possible faults or abnormal conditions of the water pump through monitoring and analysis of various parameters during the operation of the water pump, so as to ensure the normal operation of the system; through accurate water pump operation fault detection, potential problems can be warned in advance, equipment downtime can be reduced, maintenance costs can be reduced, the service life and operating efficiency of the equipment can be improved, and the stability and safety of key infrastructure such as water supply systems and fire protection systems can be guaranteed.
[0003] However, when traditional water pump operation fault detection has preliminary classification, it often ignores factors such as time dependence, local timing offset and periodic change in the water pump operation data, resulting in classification errors. In the face of dynamically changing operation data, it is easy to cause model overfitting or underfitting, thereby affecting the accuracy of fault detection. Traditional water pump operation fault detection has the technical problem of difficulty in learning complex nonlinear patterns in operation data, poor performance when processing high-dimensional and time-correlated operation data, and inability to adapt to dynamically changing fault modes, resulting in false detection or missed detection. Summary of the invention
[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a water pump operation fault detection method and system based on artificial intelligence. In view of the technical problem that the time dependence, local timing offset and periodic change in the water pump operation data are often ignored during the preliminary classification of the traditional water pump operation fault detection, resulting in classification errors, and when facing dynamically changing operation data, it is easy to cause model overfitting or underfitting, thereby affecting the accuracy of fault detection, this solution creatively adopts an improved K-means clustering model for preliminary fault classification, which can capture the nonlinear changes and local time changes in the operation data, and avoid the classification due to the asynchronous time axis of the operation data. The negative impact of classification results can be better identified in the fault modes and abnormal conditions of water pump operation; the traditional water pump operation fault detection has the problem that it is difficult to learn the complex nonlinear patterns in the operation data, performs poorly when processing high-dimensional and time-correlated operation data, and cannot adapt to dynamically changing fault modes, resulting in false detection or missed detection. This scheme creatively adopts a feature-enhanced bidirectional long short-term memory network model for fault detection, which improves the expressive power of features and can more accurately capture the features that are crucial to fault identification, especially in extracting deep information in time series data, thereby more comprehensively capturing the fault modes in water pump operation.
[0005] The technical solution adopted by the present invention is as follows: The present invention provides a method for detecting pump operation faults based on artificial intelligence, the method comprising the following steps:
[0006] Step S1: data collection;
[0007] Step S2: data preprocessing;
[0008] Step S3: fault classification model construction;
[0009] Step S4: fault detection model construction;
[0010] Step S5: Detection of water pump operation failure.
[0011] Further, in step S1, the data acquisition is used to acquire the original data required for detecting the water pump operation failure, specifically, to obtain the water pump operation original data set through data acquisition;
[0012] The water pump operation original data set specifically includes water pump operation vibration data, water pump current data, water pump voltage data, water pump operation temperature data, water pump pressure data, water pump flow data, water pump speed data, environmental data and water pump operation cycle data. The environmental data specifically includes ambient temperature and ambient humidity. The water pump operation cycle data specifically includes the number of times the water pump is started and stopped and the working time of the water pump.
[0013] Furthermore, in step S2, the data preprocessing is used to preprocess the collected raw data, and specifically includes the following steps:
[0014] Step S21: data cleaning, which is used to clean the original data, specifically to remove missing values and duplicate values in the original data set of the water pump operation to obtain a roughly processed data set;
[0015] Step S22: data encoding, which is used to encode the roughly processed data, specifically, using a one-hot encoding method to encode the roughly processed data set to obtain an encoded data set;
[0016] Step S23: data normalization, which is used to normalize the coded data, specifically, using the minimum-maximum method to normalize the coded data set to obtain a normalized data set;
[0017] Step S24: preprocessing, specifically obtaining a normalized data set through the data cleaning, data encoding and data normalization.
[0018] Further, in step S3, the fault classification model is constructed to construct a model required for preliminary classification of water pump operation faults, specifically to construct an improved K-means clustering model, and to perform preliminary classification of the normalized data set based on the type of operation faults. The fault classification model construction specifically includes the following steps:
[0019] Step S31: initialization, specifically initializing the cluster center and determining the iteration termination condition;
[0020] The initialization of cluster centers is specifically to randomly select K data as initial cluster centers, where K represents the number of classification types;
[0021] The iteration termination condition specifically includes that the change of the cluster center is less than a threshold value and the maximum number of iterations is reached;
[0022] Step S32: Allocating clusters, the steps include:
[0023] Step S321: Calculate the distance from the data to the cluster center, specifically, calculate the distance from the data to the cluster center based on dynamic time warping, and the formula used is as follows:
[0024] ;
[0025] Where Dis represents a matrix of size Tp×Tp, whose elements are the distances between the data and the cluster center at a time point, Tp is the time step length, is the initial condition, Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Indicates the hth data at time point The value of Indicates the kth cluster center at time point The value of Indicates the calculation of Euclidean distance, represents the minimum value function, Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the element of the Tp-th row and Tp-th column of the matrix Dis, which is the distance between the data and the cluster center at time point Tp. Represents the distance from the hth data to the kth cluster center;
[0026] Step S322: Allocate data to clusters using the following formula:
[0027] ;
[0028] In the formula, represents the cluster label of the h-th data, Indicates the distance from the hth data to the kth cluster center The smallest value of k;
[0029] Step S33: Update the cluster center. The formula used is as follows:
[0030] ;
[0031] In the formula, represents the updated cluster center of the kth cluster, represents the total number of data in the kth cluster, represents the kth cluster in the kth cluster based on dynamic time warping calculation The distance between the data and the cluster center of the kth cluster before the update, represents the kth cluster individual data;
[0032] Step S34: iterative updating, specifically continuously iteratively updating and improving the K-means clustering model until the iteration termination condition is reached;
[0033] Step S35: preliminary classification, specifically, constructing an improved K-means clustering model through the initialization, the cluster allocation, the cluster center update and the iterative update, and performing preliminary classification of the normalized data set based on the type of operation faults to obtain a preliminary classification data set of operation faults.
[0034] Further, in step S4, the fault detection model is constructed to construct a model required for water pump operation fault detection, specifically to construct a feature-enhanced bidirectional long short-term memory network model, and use it as a fault detection model. The feature-enhanced bidirectional long short-term memory network model specifically includes a feature enhancement module, a forward long short-term memory module, a reverse long short-term memory module and an output module;
[0035] The fault detection model construction specifically includes the following steps:
[0036] Step S41: data set segmentation, specifically segmenting the preliminary classification data set of operation faults into an operation fault training set and an operation fault test set;
[0037] Step S42: constructing a feature enhancement module, the steps include:
[0038] Step S421: The particle swarm optimization algorithm is used to optimize the feature importance score, specifically, a particle unit set is constructed, each particle unit represents a feature importance score combination, and the particle unit fitness is the model accuracy obtained by training the support vector machine with the feature importance score combination represented by the particle unit as input, and the particle swarm optimization algorithm is used for processing to obtain the optimal feature importance score combination, and the particle position is updated. The formula used is as follows:
[0039] ;
[0040] In the formula, represents the velocity of the cth particle unit at the ts+1th iteration, represents the inertia weight, represents the velocity of the cth particle unit at the tsth iteration, It represents the parameter used to control the degree of learning of the optimal solution of the particle swarm optimization algorithm itself. represents the parameter used to control the degree of learning of the global optimal solution of the particle swarm optimization algorithm, Represents a random number in the range [0,1]. Represents a random number in the range [0,1]. represents the optimal position of the c-th particle unit itself, Gb represents the global optimal position of the particle swarm optimization algorithm, represents the position of the cth particle unit at the tsth iteration, Indicates the position of the cth particle unit at the ts+1th iteration;
[0041] Step S422: optimizing the feature importance scores by using a bat optimization algorithm, specifically constructing a bat unit set, each bat unit represents a feature importance score combination, the bat unit fitness is the model accuracy obtained by training a support vector machine with the feature importance score combination represented by the bat unit as input, and processing with a bat optimization algorithm to obtain the optimal feature importance score combination, the steps include:
[0042] Step S4221: The bat unit position and speed are updated, and the formula used is as follows:
[0043] ;
[0044] In the formula, Indicates The frequency of bats, represents the minimum frequency, represents the maximum frequency, represents a random number uniformly distributed in [0,1]. Indicates that at the tb+1th iteration The speed of a bat, Indicates the tbth iteration. The speed of each bat, Xb represents the global optimal position of the bat optimization algorithm, Indicates the tbth iteration. The position of the bat. Indicates that at the tb+1th iteration The location of the bats;
[0045] Step S4222: local search based on impulse loudness, the formula used is as follows:
[0046] ;
[0047] In the formula, Indicates that at the tb+1th iteration The impulse loudness of a bat, represents the pulse loudness attenuation factor, Indicates the tbth iteration. The impulse loudness of a bat, Represents a random number in the range [0,1]. represents the fitness calculation function of the bat optimization algorithm, Indicates that at the tb+1th iteration The pulse rate of a bat, Indicates the tbth iteration. The pulse rate of a bat, represents the constant used to control the pulse rate change, and tb represents the current iteration number;
[0048] Step S423: Calculate the feature enhancement module output, using the following formula:
[0049] ;
[0050] In the formula, represents the output feature of the feature enhancement module, Fe represents the input feature of the feature enhancement module, represents the normalized feature importance score obtained by the particle swarm optimization algorithm, represents the normalized feature importance score obtained by the bat optimization algorithm;
[0051] Step S43: construct a positive long short-term memory module, the formula used is as follows:
[0052] ;
[0053] In the formula, represents the output of the forget gate at time t, represents the sigmoid function, represents the forward forget gate weight matrix, represents the forward hidden state at time t-1, represents the input at time t, represents the forward forget gate bias term, represents the output of the positive input gate at time t, represents the forward input gate weight matrix, represents the forward input gate bias term, represents the candidate unit state at time t, represents the weight matrix used to calculate the positive candidate unit state, represents the bias term used to calculate the positive candidate unit state, represents the unit state at the positive time t, represents the unit state at time t-1 in the forward direction, Indicates the output of the positive output gate at time t, represents the forward output gate weight matrix, represents the forward output gate bias term, represents the hidden state at the positive time t;
[0054] Step S44: construct a reverse long short-term memory module, the formula used is as follows:
[0055] ;
[0056] In the formula, Represents the output of the forget gate at the reverse time t, represents the reverse forget gate weight matrix, represents the reverse hidden state at time t-1, represents the reverse forget gate bias term, Represents the output of the input gate at time t, represents the reverse input gate weight matrix, represents the reverse input gate bias term, represents the state of the candidate unit at the reverse time t, represents the weight matrix used to calculate the reverse candidate unit state, represents the bias term used to calculate the reverse candidate cell state, represents the state of the unit at the reverse time t, Represents the state of the unit at the reverse time t-1, Represents the output of the output gate at time t in the reverse direction, represents the reverse output gate weight matrix, represents the reverse output gate bias term, Represents the hidden state at the reverse time t;
[0057] Step S45: construct an output module, specifically using a softmax classifier as the output module, and the formula used is as follows:
[0058] ;
[0059] In the formula, represents the prediction result of the feature-enhanced bidirectional long short-term memory network model for the g-th sample, represents the output weight of the feature-enhanced bidirectional long short-term memory network model, represents the output bias term of the feature-enhanced bidirectional long short-term memory network model, represents the concatenation function;
[0060] Step S46: constructing a model and training it, specifically, constructing a feature-enhanced bidirectional long short-term memory network model through the data set segmentation, the construction of the feature enhancement module, the construction of the forward long short-term memory module, the construction of the reverse long short-term memory module and the construction of the output module, training the model based on the running fault training set, verifying the model performance based on the running fault test set, using the cross entropy loss function as the model loss function, obtaining the feature-enhanced bidirectional long short-term memory network model, and using it as the fault detection model.
[0061] Further, in step S5, the water pump operation fault detection is specifically to detect the water pump operation fault through the fault detection model to obtain water pump operation fault reference data, and based on the water pump operation fault reference data, comprehensively detect and troubleshoot the water pump operation fault.
[0062] The artificial intelligence-based water pump operation fault detection system provided by the present invention comprises a data acquisition module, a data preprocessing module, a fault classification model construction module, a fault detection model construction module and a water pump operation fault detection module;
[0063] The data acquisition module is used for data acquisition, and obtains the original data set of water pump operation through data acquisition, and sends the original data set of water pump operation to the data preprocessing module;
[0064] The data preprocessing module is used for data preprocessing, obtaining a normalized data set through data preprocessing, and sending the normalized data set to the fault classification model building module;
[0065] The fault classification model building module is used to build a fault classification model, obtain a preliminary classification data set of operating faults by building an improved K-means clustering model, and send the preliminary classification data set of operating faults to the fault detection model building module;
[0066] The fault detection model building module is used to build a fault detection model, obtain the fault detection model by building a feature-enhanced bidirectional long short-term memory network model, and send the fault detection model to the water pump operation fault detection module;
[0067] The water pump operation fault detection module is used for water pump operation fault detection, and obtains water pump operation fault reference data by performing water pump operation fault detection using a fault detection model.
[0068] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0069] (1) In view of the technical problem that the traditional water pump operation fault detection has a preliminary classification, it often ignores factors such as time dependence, local timing offset and periodic change in the water pump operation data, resulting in classification errors. In addition, when faced with dynamically changing operation data, it is easy to cause model overfitting or underfitting, thereby affecting the accuracy of fault detection. This scheme creatively adopts an improved K-means clustering model for preliminary fault classification, which can capture the nonlinear changes and local time changes in the operation data, avoid the negative impact of the classification results due to the asynchronous time axis of the operation data, and better identify the fault modes and abnormal conditions in the operation of the water pump.
[0070] (2) In view of the technical problems that traditional water pump operation fault detection has, such as difficulty in learning the complex nonlinear patterns in the operation data, poor performance in processing high-dimensional and time-correlated operation data, and inability to adapt to dynamically changing fault modes, resulting in false detection or missed detection, this scheme creatively adopts a feature-enhanced bidirectional long short-term memory network model for fault detection, which improves the feature expression ability and can more accurately capture the features that are crucial to fault identification, especially in extracting deep information from time series data, thereby more comprehensively capturing the fault modes in water pump operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 A schematic diagram of the process of the water pump operation fault detection method based on artificial intelligence provided by the present invention;
[0072] Figure 2 A schematic diagram of a module of a water pump operation fault detection system based on artificial intelligence provided by the present invention;
[0073] Figure 3 This is a schematic diagram of the process of data preprocessing in step S2;
[0074] Figure 4 A schematic diagram of the process of constructing the fault classification model in step S3;
[0075] Figure 5 Schematic diagram of the process of building the fault detection model in step S4.
[0076] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0077] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0078] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0079] Example 1, see Figure 1 The technical solution adopted by the present invention is as follows: The method for detecting pump operation faults based on artificial intelligence provided by the present invention comprises the following steps:
[0080] Step S1: data collection;
[0081] Step S2: data preprocessing;
[0082] Step S3: fault classification model construction;
[0083] Step S4: fault detection model construction;
[0084] Step S5: Detection of water pump operation failure.
[0085] Example 2, see Figure 1 and Figure 2 In step S1, the data acquisition is used to acquire the original data required for detecting the water pump operation failure, specifically, to obtain the water pump operation original data set through data acquisition;
[0086] The water pump operation original data set specifically includes water pump operation vibration data, water pump current data, water pump voltage data, water pump operation temperature data, water pump pressure data, water pump flow data, water pump speed data, environmental data and water pump operation cycle data. The environmental data specifically includes ambient temperature and ambient humidity. The water pump operation cycle data specifically includes the number of times the water pump is started and stopped and the working time of the water pump.
[0087] Example 3, see Figure 1 , Figure 2 and Figure 3 This embodiment is based on the above embodiment. In step S2, the data preprocessing is used to preprocess the collected raw data, and specifically includes the following steps:
[0088] Step S21: data cleaning, which is used to clean the original data, specifically to remove missing values and duplicate values in the original data set of the water pump operation to obtain a roughly processed data set;
[0089] Step S22: data encoding, which is used to encode the roughly processed data, specifically, using a one-hot encoding method to encode the roughly processed data set to obtain an encoded data set;
[0090] Step S23: data normalization, which is used to normalize the coded data, specifically, using the minimum-maximum method to normalize the coded data set to obtain a normalized data set;
[0091] Step S24: preprocessing, specifically obtaining a normalized data set through the data cleaning, data encoding and data normalization.
[0092] Example 4, see Figure 1 , Figure 2 and Figure 4 This embodiment is based on the above embodiment. In step S3, the fault classification model is constructed to construct a model required for preliminary classification of water pump operation faults, specifically to construct an improved K-means clustering model, and to perform preliminary classification of the normalized data set based on the type of operation faults. The fault classification model is constructed, specifically including the following steps:
[0093] Step S31: initialization, specifically initializing the cluster center and determining the iteration termination condition;
[0094] The initialization of cluster centers is specifically to randomly select K data as initial cluster centers, where K represents the number of classification types;
[0095] The iteration termination condition specifically includes that the change of the cluster center is less than a threshold value and the maximum number of iterations is reached;
[0096] Step S32: Allocating clusters, the steps include:
[0097] Step S321: Calculate the distance from the data to the cluster center, specifically, calculate the distance from the data to the cluster center based on dynamic time warping, and the formula used is as follows:
[0098] ;
[0099] Where Dis represents a matrix of size Tp×Tp, whose elements are the distances between the data and the cluster center at a time point, Tp is the time step length, is the initial condition, Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Indicates the hth data at time point The value of Indicates the kth cluster center at time point The value of Indicates the calculation of Euclidean distance, represents the minimum value function, Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the element of the Tp-th row and Tp-th column of the matrix Dis, which is the distance between the data and the cluster center at time point Tp. Represents the distance from the hth data to the kth cluster center;
[0100] Step S322: Allocate data to clusters using the following formula:
[0101] ;
[0102] In the formula, represents the cluster label of the h-th data, Indicates the distance from the hth data to the kth cluster center The smallest value of k;
[0103] Step S33: Update the cluster center. The formula used is as follows:
[0104] ;
[0105] In the formula, represents the updated cluster center of the kth cluster, represents the total number of data in the kth cluster, represents the kth cluster in the kth cluster based on dynamic time warping calculation The distance between the data and the cluster center of the kth cluster before the update, represents the kth cluster individual data;
[0106] Step S34: iterative updating, specifically continuously iteratively updating and improving the K-means clustering model until the iteration termination condition is reached;
[0107] Step S35: preliminary classification, specifically, constructing an improved K-means clustering model through the initialization, the cluster allocation, the cluster center update and the iterative update, and performing preliminary classification of the normalized data set based on the type of operation faults to obtain a preliminary classification data set of operation faults.
[0108] By performing the above operations, the traditional water pump operation fault detection often ignores factors such as time dependence, local timing offset and periodic changes in the water pump operation data during preliminary classification, resulting in classification errors. In the face of dynamically changing operation data, it is easy to cause model overfitting or underfitting, thereby affecting the accuracy of fault detection. This technical problem is solved. This scheme creatively adopts an improved K-means clustering model for preliminary fault classification, which can capture nonlinear changes and local time changes in the operation data, avoid the negative impact of the classification results due to the asynchronous time axis of the operation data, and better identify fault modes and abnormal conditions in the operation of the water pump.
[0109] Example 5, see Figure 1 , Figure 2 and Figure 5 , this embodiment is based on the above embodiment. In step S4, the fault detection model is constructed to construct a model required for pump operation fault detection, specifically to construct a feature-enhanced bidirectional long short-term memory network model, and use it as a fault detection model. The feature-enhanced bidirectional long short-term memory network model specifically includes a feature enhancement module, a forward long short-term memory module, a reverse long short-term memory module and an output module;
[0110] The fault detection model construction specifically includes the following steps:
[0111] Step S41: data set segmentation, specifically segmenting the preliminary classification data set of operation faults into an operation fault training set and an operation fault test set;
[0112] Step S42: constructing a feature enhancement module, the steps include:
[0113] Step S421: The particle swarm optimization algorithm is used to optimize the feature importance score, specifically, a particle unit set is constructed, each particle unit represents a feature importance score combination, and the particle unit fitness is the model accuracy obtained by training the support vector machine with the feature importance score combination represented by the particle unit as input, and the particle swarm optimization algorithm is used for processing to obtain the optimal feature importance score combination, and the particle position is updated. The formula used is as follows:
[0114] ;
[0115] In the formula, represents the velocity of the cth particle unit at the ts+1th iteration, represents the inertia weight, represents the velocity of the cth particle unit at the tsth iteration, It represents the parameter used to control the degree of learning of the optimal solution of the particle swarm optimization algorithm itself. represents the parameter used to control the degree of learning of the global optimal solution of the particle swarm optimization algorithm, Represents a random number in the range [0,1]. Represents a random number in the range [0,1]. represents the optimal position of the c-th particle unit itself, Gb represents the global optimal position of the particle swarm optimization algorithm, represents the position of the cth particle unit at the tsth iteration, Indicates the position of the cth particle unit at the ts+1th iteration;
[0116] Step S422: optimizing the feature importance scores by using a bat optimization algorithm, specifically constructing a bat unit set, each bat unit represents a feature importance score combination, the bat unit fitness is the model accuracy obtained by training a support vector machine with the feature importance score combination represented by the bat unit as input, and processing with a bat optimization algorithm to obtain the optimal feature importance score combination, the steps include:
[0117] Step S4221: The bat unit position and speed are updated, and the formula used is as follows:
[0118] ;
[0119] In the formula, Indicates The frequency of bats, represents the minimum frequency, represents the maximum frequency, represents a random number uniformly distributed in [0,1]. Indicates that at the tb+1th iteration The speed of a bat, Indicates the tbth iteration. The speed of each bat, Xb represents the global optimal position of the bat optimization algorithm, Indicates the tbth iteration. The position of the bat. Indicates that at the tb+1th iteration The location of the bats;
[0120] Step S4222: local search based on impulse loudness, the formula used is as follows:
[0121] ;
[0122] In the formula, Indicates that at the tb+1th iteration The impulse loudness of a bat, represents the pulse loudness attenuation factor, Indicates the tbth iteration. The impulse loudness of a bat, Represents a random number in the range [0,1]. represents the fitness calculation function of the bat optimization algorithm, Indicates that at the tb+1th iteration The pulse rate of a bat, Indicates the tbth iteration. The pulse rate of a bat, represents the constant used to control the pulse rate change, and tb represents the current iteration number;
[0123] Step S423: Calculate the feature enhancement module output, using the following formula:
[0124] ;
[0125] In the formula, represents the output feature of the feature enhancement module, Fe represents the input feature of the feature enhancement module, represents the normalized feature importance score obtained by the particle swarm optimization algorithm, represents the normalized feature importance score obtained by the bat optimization algorithm;
[0126] Step S43: construct a positive long short-term memory module, the formula used is as follows:
[0127] ;
[0128] In the formula, represents the output of the forget gate at time t, represents the sigmoid function, represents the forward forget gate weight matrix, represents the forward hidden state at time t-1, represents the input at time t, represents the forward forget gate bias term, represents the output of the positive input gate at time t, represents the forward input gate weight matrix, represents the forward input gate bias term, represents the candidate unit state at time t, represents the weight matrix used to calculate the positive candidate unit state, represents the bias term used to calculate the positive candidate unit state, represents the unit state at the positive time t, represents the unit state at time t-1 in the forward direction, Indicates the output of the positive output gate at time t, represents the forward output gate weight matrix, represents the forward output gate bias term, represents the hidden state at the positive time t;
[0129] Step S44: construct a reverse long short-term memory module, the formula used is as follows:
[0130] ;
[0131] In the formula, Represents the output of the forget gate at the reverse time t, represents the reverse forget gate weight matrix, represents the reverse hidden state at time t-1, represents the reverse forget gate bias term, Represents the output of the input gate at time t, represents the reverse input gate weight matrix, represents the reverse input gate bias term, represents the state of the candidate unit at the reverse time t, represents the weight matrix used to calculate the reverse candidate unit state, represents the bias term used to calculate the reverse candidate cell state, represents the state of the unit at the reverse time t, Represents the state of the unit at the reverse time t-1, Represents the output of the output gate at time t in the reverse direction, represents the reverse output gate weight matrix, represents the reverse output gate bias term, Represents the hidden state at the reverse time t;
[0132] Step S45: construct an output module, specifically using a softmax classifier as the output module, and the formula used is as follows:
[0133] ;
[0134] In the formula, represents the prediction result of the feature-enhanced bidirectional long short-term memory network model for the g-th sample, represents the output weight of the feature-enhanced bidirectional long short-term memory network model, represents the output bias term of the feature-enhanced bidirectional long short-term memory network model, represents the concatenation function;
[0135] Step S46: constructing a model and training it, specifically, constructing a feature-enhanced bidirectional long short-term memory network model through the data set segmentation, the construction of the feature enhancement module, the construction of the forward long short-term memory module, the construction of the reverse long short-term memory module and the construction of the output module, training the model based on the running fault training set, verifying the model performance based on the running fault test set, using the cross entropy loss function as the model loss function, obtaining the feature-enhanced bidirectional long short-term memory network model, and using it as the fault detection model.
[0136] By performing the above operations, the traditional water pump operation fault detection has the problem of difficulty in learning the complex nonlinear patterns in the operation data, poor performance in processing high-dimensional and time-correlated operation data, and inability to adapt to dynamically changing fault modes, resulting in false detection or missed detection. This solution creatively adopts a feature-enhanced bidirectional long short-term memory network model for fault detection, which improves the expressive power of features and can more accurately capture the features that are crucial to fault identification, especially in extracting deep information in time series data, thereby more comprehensively capturing the fault modes in water pump operation.
[0137] Example 6, see Figure 1 and Figure 2 This embodiment is based on the above embodiment. In step S5, the water pump operation fault detection is specifically to detect the water pump operation fault through the fault detection model to obtain water pump operation fault reference data, and based on the water pump operation fault reference data, comprehensively detect and troubleshoot the water pump operation fault.
[0138] Embodiment 7, see Figure 1 and Figure 2, this embodiment is based on the above embodiment, and the artificial intelligence-based water pump operation fault detection system provided by the present invention includes a data acquisition module, a data preprocessing module, a fault classification model construction module, a fault detection model construction module and a water pump operation fault detection module;
[0139] The data acquisition module is used for data acquisition, and obtains the original data set of water pump operation through data acquisition, and sends the original data set of water pump operation to the data preprocessing module;
[0140] The data preprocessing module is used for data preprocessing, obtaining a normalized data set through data preprocessing, and sending the normalized data set to the fault classification model building module;
[0141] The fault classification model building module is used to build a fault classification model, obtain a preliminary classification data set of operating faults by building an improved K-means clustering model, and send the preliminary classification data set of operating faults to the fault detection model building module;
[0142] The fault detection model building module is used to build a fault detection model, obtain the fault detection model by building a feature-enhanced bidirectional long short-term memory network model, and send the fault detection model to the water pump operation fault detection module;
[0143] The water pump operation fault detection module is used for water pump operation fault detection, and obtains water pump operation fault reference data by performing water pump operation fault detection using a fault detection model.
[0144] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0145] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0146] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A pump operation fault detection method based on artificial intelligence, characterized in that: The method comprises the following steps: Step S1: data collection, through data collection, the original data set of water pump operation is obtained; Step S2: data preprocessing, preprocessing the collected raw data of the water pump operation to obtain a normalized data set; Step S3: constructing a fault classification model, specifically constructing an improved K-means clustering model, and preliminarily classifying the normalized data set based on the type of operating faults; Step S4: constructing a fault detection model, specifically constructing a feature-enhanced bidirectional long short-term memory network model as a fault detection model; Step S5: water pump operation fault detection, specifically using a fault detection model to perform water pump operation fault detection to obtain water pump operation fault reference data; In step S3, the fault classification model is constructed to construct a model required for preliminary classification of water pump operation faults, specifically to construct an improved K-means clustering model, and to perform preliminary classification of the normalized data set based on the type of operation faults. The fault classification model is constructed, specifically including the following steps: Step S31: initialization, specifically initializing the cluster center and determining the iteration termination condition; The initialization of cluster centers is specifically to randomly select K data as initial cluster centers, where K represents the number of classification types; The iteration termination condition specifically includes that the change of the cluster center is less than a threshold value and the maximum number of iterations is reached; Step S32: Allocating clusters, the steps include: Step S321: Calculate the distance from the data to the cluster center, specifically, calculate the distance from the data to the cluster center based on dynamic time warping, and the formula used is as follows: ; Where Dis represents a matrix of size Tp×Tp, whose elements are the distances between the data and the cluster center at a time point, Tp is the time step length, is the initial condition, Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Indicates the hth data at time point The value of Indicates the kth cluster center at time point The value of Indicates the calculation of Euclidean distance, represents the minimum value function, Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the matrix Dis Line The elements of the column are the data and cluster centers at the time points and The distance Represents the element of the Tp-th row and Tp-th column of the matrix Dis, which is the distance between the data and the cluster center at time point Tp. Represents the distance from the hth data to the kth cluster center; Step S322: Allocate data to clusters using the following formula: ; In the formula, represents the cluster label of the h-th data, Indicates the distance from the hth data to the kth cluster center The smallest value of k; Step S33: Update the cluster center. The formula used is as follows: ; In the formula, represents the updated cluster center of the kth cluster, represents the total number of data in the kth cluster, represents the kth cluster in the kth cluster based on dynamic time warping calculation The distance between the data and the cluster center of the kth cluster before the update, represents the kth cluster individual data; Step S34: iterative updating, specifically continuously iteratively updating and improving the K-means clustering model until the iteration termination condition is reached; Step S35: preliminary classification, specifically, constructing an improved K-means clustering model through the initialization, the cluster allocation, the updating of cluster centers and the iterative updating, and performing preliminary classification of the normalized data set based on the types of operation faults to obtain a preliminary classification data set of operation faults; In step S4, the fault detection model is constructed to construct the model required for pump operation fault detection, specifically to construct a feature-enhanced bidirectional long short-term memory network model, and use it as a fault detection model. The feature-enhanced bidirectional long short-term memory network model specifically includes a feature enhancement module, a forward long short-term memory module, a reverse long short-term memory module and an output module.
2. The method for detecting pump operation failure based on artificial intelligence according to claim 1 is characterized in that: The fault detection model construction specifically includes the following steps: Step S41: data set segmentation, specifically segmenting the preliminary classification data set of operation faults into an operation fault training set and an operation fault test set; Step S42: constructing a feature enhancement module, the steps include: Step S421: The particle swarm optimization algorithm is used to optimize the feature importance score, specifically, a particle unit set is constructed, each particle unit represents a feature importance score combination, and the particle unit fitness is the model accuracy obtained by training the support vector machine with the feature importance score combination represented by the particle unit as input, and the particle swarm optimization algorithm is used for processing to obtain the optimal feature importance score combination, and the particle position is updated. The formula used is as follows: ; In the formula, represents the velocity of the cth particle unit at the ts+1th iteration, represents the inertia weight, represents the velocity of the cth particle unit at the tsth iteration, It represents the parameter used to control the degree of learning of the optimal solution of the particle swarm optimization algorithm itself. represents the parameter used to control the degree of learning of the global optimal solution of the particle swarm optimization algorithm, Represents a random number in the range [0,1]. Represents a random number in the range [0,1]. represents the optimal position of the c-th particle unit itself, Gb represents the global optimal position of the particle swarm optimization algorithm, represents the position of the cth particle unit at the tsth iteration, Indicates the position of the cth particle unit at the ts+1th iteration; Step S422: optimizing the feature importance scores by using a bat optimization algorithm, specifically constructing a bat unit set, each bat unit represents a feature importance score combination, the bat unit fitness is the model accuracy obtained by training a support vector machine with the feature importance score combination represented by the bat unit as input, and processing with a bat optimization algorithm to obtain the optimal feature importance score combination, the steps include: Step S4221: The bat unit position and speed are updated, and the formula used is as follows: ; In the formula, Indicates The frequency of bats, represents the minimum frequency, represents the maximum frequency, represents a random number uniformly distributed in [0,1]. Indicates that at the tb+1th iteration The speed of a bat, Indicates the tbth iteration. The speed of each bat, Xb represents the global optimal position of the bat optimization algorithm, Indicates the tbth iteration. The position of the bat. Indicates that at the tb+1th iteration The location of the bats; Step S4222: local search based on impulse loudness, the formula used is as follows: ; In the formula, Indicates that at the tb+1th iteration The impulse loudness of a bat, represents the pulse loudness attenuation factor, Indicates the tbth iteration. The impulse loudness of a bat, Represents a random number in the range [0,1]. represents the fitness calculation function of the bat optimization algorithm, Indicates that at the tb+1th iteration The pulse rate of a bat, Indicates the tbth iteration. The pulse rate of a bat, represents the constant used to control the pulse rate change, and tb represents the current iteration number; Step S423: Calculate the feature enhancement module output, using the following formula: ; In the formula, represents the output feature of the feature enhancement module, Fe represents the input feature of the feature enhancement module, represents the normalized feature importance score obtained by the particle swarm optimization algorithm, represents the normalized feature importance score obtained by the bat optimization algorithm; Step S43: construct a positive long short-term memory module, the formula used is as follows: ; In the formula, represents the output of the forget gate at time t, represents the sigmoid function, represents the forward forget gate weight matrix, represents the forward hidden state at time t-1, represents the input at time t, represents the forward forget gate bias term, represents the output of the positive input gate at time t, represents the forward input gate weight matrix, represents the forward input gate bias term, represents the state of the candidate unit at time t, represents the weight matrix used to calculate the positive candidate unit state, represents the bias term used to calculate the positive candidate unit state, represents the unit state at the positive time t, represents the unit state at time t-1 in the forward direction, Indicates the output of the positive output gate at time t, represents the forward output gate weight matrix, represents the forward output gate bias term, represents the hidden state at the positive time t; Step S44: construct a reverse long short-term memory module, the formula used is as follows: ; In the formula, Represents the output of the forget gate at the reverse time t, represents the reverse forget gate weight matrix, represents the reverse hidden state at time t-1, represents the reverse forget gate bias term, Represents the output of the input gate at the reverse time t, represents the reverse input gate weight matrix, represents the reverse input gate bias term, represents the state of the candidate unit at the reverse time t, represents the weight matrix used to calculate the reverse candidate unit state, represents the bias term used to calculate the reverse candidate cell state, represents the state of the unit at the reverse time t, Represents the state of the unit at the reverse time t-1, Represents the output of the output gate at time t in the reverse direction, represents the reverse output gate weight matrix, represents the reverse output gate bias term, Represents the hidden state at the reverse time t; Step S45: construct an output module, specifically using a softmax classifier as the output module, and the formula used is as follows: ; In the formula, represents the prediction result of the feature-enhanced bidirectional long short-term memory network model for the g-th sample, represents the output weight of the feature-enhanced bidirectional long short-term memory network model, represents the output bias term of the feature-enhanced bidirectional long short-term memory network model, represents the concatenation function; Step S46: constructing a model and training it, specifically, constructing a feature-enhanced bidirectional long short-term memory network model through the data set segmentation, the construction of the feature enhancement module, the construction of the forward long short-term memory module, the construction of the reverse long short-term memory module and the construction of the output module, training the model based on the running fault training set, verifying the model performance based on the running fault test set, using the cross entropy loss function as the model loss function, obtaining the feature-enhanced bidirectional long short-term memory network model, and using it as the fault detection model.
3. The method for detecting pump operation failure based on artificial intelligence according to claim 1 is characterized in that: In step S1, the data acquisition is used to acquire the original data required for detecting the water pump operation failure, specifically, to obtain the water pump operation original data set through data acquisition; The water pump operation original data set specifically includes water pump operation vibration data, water pump current data, water pump voltage data, water pump operation temperature data, water pump pressure data, water pump flow data, water pump speed data, environmental data and water pump operation cycle data. The environmental data specifically includes ambient temperature and ambient humidity. The water pump operation cycle data specifically includes the number of times the water pump is started and stopped and the working time of the water pump.
4. The method for detecting pump operation failure based on artificial intelligence according to claim 1 is characterized in that: In step S2, the data preprocessing is used to preprocess the collected raw data, and specifically includes the following steps: Step S21: data cleaning, which is used to clean the original data, specifically to remove missing values and duplicate values in the original data set of the water pump operation to obtain a roughly processed data set; Step S22: data encoding, which is used to encode the roughly processed data, specifically, using a one-hot encoding method to encode the roughly processed data set to obtain an encoded data set; Step S23: data normalization, which is used to normalize the coded data, specifically, using the minimum-maximum method to normalize the coded data set to obtain a normalized data set; Step S24: preprocessing, specifically obtaining a normalized data set through the data cleaning, data encoding and data normalization.
5. The method for detecting pump operation failure based on artificial intelligence according to claim 1 is characterized in that: In step S5, the water pump operation fault detection is specifically to detect the water pump operation fault through the fault detection model to obtain water pump operation fault reference data, and based on the water pump operation fault reference data, comprehensively detect and troubleshoot the water pump operation fault.
6. A water pump operation fault detection system based on artificial intelligence, used to implement the water pump operation fault detection method based on artificial intelligence as described in any one of claims 1 to 5, characterized in that: It includes a data acquisition module, a data preprocessing module, a fault classification model building module, a fault detection model building module and a water pump operation fault detection module.
7. The artificial intelligence-based water pump operation fault detection system according to claim 6 is characterized in that: The data acquisition module is used for data acquisition, and obtains the original data set of water pump operation through data acquisition, and sends the original data set of water pump operation to the data preprocessing module; The data preprocessing module is used for data preprocessing, obtaining a normalized data set through data preprocessing, and sending the normalized data set to the fault classification model building module; The fault classification model building module is used to build a fault classification model, obtain a preliminary classification data set of operating faults by building an improved K-means clustering model, and send the preliminary classification data set of operating faults to the fault detection model building module; The fault detection model building module is used to build a fault detection model, obtain the fault detection model by building a feature-enhanced bidirectional long short-term memory network model, and send the fault detection model to the water pump operation fault detection module; The water pump operation fault detection module is used for water pump operation fault detection, and obtains water pump operation fault reference data by performing water pump operation fault detection using a fault detection model.
Citation Information
Patent Citations
Motor bearing fault diagnosis method based on time domain and time-frequency domain fusion
CN115758083A
Intelligent fault diagnosis method for vertical water pump unit
CN117574057A