Three-cylinder slurry pump fluid end cross-rotating-speed working condition migration diagnosis method
By building a three-cylinder mud pump fault diagnosis network based on Transformer, the problem of low accuracy of mud pump fault diagnosis under cross-speed operating conditions is solved, and high accuracy diagnosis under different operating conditions is achieved.
Patent Information
- Application Number
- CN202311731977.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-16
- Publication Date
- 2025-07-25
AI Technical Summary
The prior art cannot effectively diagnose mud pump faults under cross-speed operating conditions, resulting in a decrease in diagnostic accuracy and increasing non-production time and well construction costs.
A three-cylinder mud pump fault diagnosis network based on Transformer is adopted. By collecting and preprocessing vibration signals, a fault diagnosis network for cross-speed operation is constructed and trained. The signal processing technology is used to reduce the distribution differences under different operating conditions, and a subdomain adaptation module is designed to measure the gap between the source domain and the target domain.
It improves the accuracy of transfer learning under different operating conditions, realizes the fault diagnosis of mud pumps under cross-speed operating conditions, reduces distribution differences, and improves the accuracy of diagnosis.
Smart Images

Figure CN120367789A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mud pump fault diagnosis, and in particular to a cross-rotational speed condition migration diagnosis method for the hydraulic end of a three-cylinder mud pump. Background Art
[0002] A mud pump is an important device to ensure the required flow rate in the circulation system during the drilling process. It extracts the drilling fluid from the mud tank, injects it into the bottom of the well through the drill pipe, and removes the debris generated during the drilling process to the ground. Due to the usually large amount of sediment in the mud and the high pressure of the mud pump, the intake valve, exhaust valve, piston, etc. of the mud pump are prone to failure, resulting in fluid leakage, reducing the pressure generated by the mud pump, and thus affecting the normal progress of the drilling work.
[0003] However, although the mud pump is a key drilling device, the current health monitoring of it still relies on manual observation. This method often fails to detect the damage of the pump at an early stage, resulting in an extended non-production time and increasing the well construction cost when the pump has an accidental catastrophic shutdown. Therefore, the intelligent fault diagnosis of the mud pump is of great significance for improving the production efficiency and reducing the accident rate of complex mechanical systems. However, traditional intelligent diagnosis methods can only perform fault diagnosis for a certain fixed working condition, and the diagnosis accuracy will drop sharply under cross-rotational speed conditions.
[0004] Therefore, a cross-rotational speed condition migration diagnosis method for the hydraulic end of a three-cylinder mud pump is proposed. Summary of the Invention
[0005] (1) Technical Problems to be Solved Aiming at the deficiencies of the prior art, the present invention provides a cross-rotational speed condition migration diagnosis method for the hydraulic end of a three-cylinder mud pump to achieve the fault diagnosis of the mud pump under cross-rotational speed conditions.
[0006] (2) Technical Solutions The present invention is implemented by the following technical solutions: A cross-rotational speed condition migration diagnosis method for the hydraulic end of a three-cylinder mud pump, comprising the following steps: S1. Collect the running vibration signals of the three-cylinder mud pump; S2. Data standardization preprocessing of the acceleration vibration signals; S3. Construct a cross-rotational speed condition fault diagnosis network for the three-cylinder mud pump based on Transformer; S4. Train the constructed cross-rotational speed condition fault diagnosis network model for the three-cylinder mud pump based on Transformer; S5. Fault diagnosis of the three-cylinder mud pump under cross-rotational speed conditions.
[0007] Preferably, in step S1, the running vibration signals of the three-cylinder mud pump are collected, and a number of vibration signal samples in the normal state, piston fault state, and valve fault state of the mud pump at the driving motor speeds of 600 r / min, 800 r / min, and 1000 r / min are collected by using acceleration sensors.
[0008] Preferably, the data standardization preprocessing of the acceleration vibration signals in step S2 includes the following specific steps: (a) Resampling; (b) Phase alignment and signal clipping; (c) Short-time Fourier transform and dataset construction.
[0009] Preferably, during resampling in step (a), first calculate the number of sampling points within one cycle under the condition of the driving motor speed of 600 r / min, and then use formula 1 to calculate the number of sampling points that should be in one cycle after resampling under the conditions of the driving motor speeds of 800 r / min and 1000 r / min. Formula 1 is expressed as: (1); Wherein, represents the expected number of sampling points after resampling under the conditions of the driving motor speeds of 800 r / min or 1000 r / min, represents the number of sampling points within one cycle under the condition of the driving motor speed of 600 r / min, , respectively represent the rotational speeds of different working conditions; Subsequently, use formula 2 to interpolate the data collected under the conditions of the driving motor speeds of 800 r / min and 1000 r / min. Denote the data collected under a certain working condition as , where is the sampling point position, is the sampling value at this position, represents different rotational speed working conditions; Then, the new dataset after resampling under the conditions of the driving motor speeds of 800 r / min or 1000 r / min can be calculated as: (2); In step (b) of phase alignment and signal clipping, first find the maximum value within the previous cycle of the mud pump vibration signal, and take the position where the maximum value is located as the first impact position of the vibration signal. Subsequently, based on this impact position, window the signal, and the window length should be slightly greater than the number of sampling points in one cycle of the signal; calculate the autocorrelation function of the windowed signal using Equation 3, and obtain the distance between the middle maximum peak of the autocorrelation function and its adjacent peak on the left. On the basis of the first impact position, add the calculated distance, which is the position of the impact in the next cycle. After finding all the impact positions in the vibration signal, take a signal sample with a length of one cycle centered on the impact position and intercepted to the left and right, and so on to obtain other signal samples; Equation 3 is expressed as: (3); where, represents the autocorrelation function of the windowed signal, represents the windowed vibration signal, k is the delay value, representing the time difference between the signal and itself; if k >0, it means the signal has moved to the right on the time axis by k units; if k <0, it means the signal has moved to the left by − k units; In step (c) of short-time Fourier transform and dataset construction, the method of short-time Fourier transform is used to convert the intercepted signal samples into time-frequency diagrams. Equation 4 is expressed as: (4); where, is the result of the short-time Fourier transform, is the intercepted signal sample, is the window function, C is the length of the window, f and t are the frequency and time indices respectively; plot the result obtained from the short-time Fourier transform with the time index as the horizontal axis and the frequency index as the vertical axis to form a time-frequency diagram; Use the time-frequency diagram data at a certain rotational speed as the source domain for training, and the time-frequency diagram data at another rotational speed as the target domain for testing, and label each time-frequency diagram data with the corresponding fault label. Make the pictures and the corresponding fault labels into a dataset for subsequent network training.
[0010] Preferably, in step S3, the constructed Transformer network includes an embedding layer, two normalization layers, a multi-head attention mechanism layer, a multi-layer perceptron layer, and a sub-domain adaptation module; Among them, the embedding layer is used to cut the image into a series of patches, then flatten each patch into a feature vector, and pass the flattened feature vector and the relative position information of the corresponding patch to the first normalization layer. The formula of the normalization layer is expressed as formula (5): (5); Wherein, is the input feature vector, represents the expected value of the input feature, represents the variance of the input feature, is a very small constant used to prevent the denominator from being zero, and are learnable scaling factor and translation factor, which are obtained through training; The result output by the first normalization layer will be passed to the multi-head attention mechanism layer. This layer will first perform three linear transformations on the input sequence, corresponding to the linear transformations of query, key, and value respectively; this is to map the input to different representation spaces in order to capture relationships in different contexts, as shown in formula (6), formula (7) and formula (8); Formula (6) is expressed as: (6); Formula (7) is expressed as: (7); Formula (8) is expressed as: (8); Wherein, , , are weight matrices learned by the network; Subsequently, the result of each linear transformation is divided into p heads, where p is a hyperparameter set by humans. The obtained multiple groups of Query, Key, and Value combinations will be used for parallel attention calculations respectively. The attention calculation is formula (9), and formula (9) is expressed as: (9); Wherein, is the dimension of the query (Query) or key (Key) of each head in the multi-head attention mechanism; After the calculation of each head is completed, a multi-head merging operation will be performed, that is, the attention outputs of each head will be concatenated and then integrated through a linear transformation. The calculation formula is formula (10), and formula (10) is expressed as: (10); Wherein, h is the number of heads set; The output of the multi-head attention mechanism will be passed to the second normalization layer. After processing, the result will be passed to the multi-layer perceptron layer, which will pass the feature vector at each position through a fully connected layer, then apply the ReLU activation function and Dropout respectively, and finally add the result to the original feature vector and output the calculated feature vector; The role of the subdomain adaptation module is to calculate the domain loss of deep learning across different rotational speed conditions. The domain loss used in the present invention is the local maximum mean discrepancy, and the calculation formula is Formula 11, which is expressed as: (11); Where, is the source domain sample at a certain rotational speed, is the number of source domain samples, is the target domain sample at another rotational speed, is the number of target domain samples, represents a function that maps the input sample to the feature space, is the default kernel function.
[0011] Preferably, step S4 of training and constructing a cross-rotational speed condition three-cylinder mud pump fault diagnosis network model based on Transformer includes the following specific steps: A. Set the maximum number of iterations to , and initialize the current iteration number ; Given the desired model training error as ; B. In the th iteration, extract images from the preprocessed source domain data, and extract N images from the target domain as the single batch input of the Transformer network; C. After the images are input, first cut the images into small pieces through the embedding layer and flatten them into feature vectors. Subsequently, perform normalization processing through the first normalization layer, and use the processed result as the input of the multi-head attention layer. The multi-head attention layer learns the multi-dimensional features of the input through the linear transformation of query, key, and value, and passes the result to the second normalization layer for processing; the second normalization layer passes the result to the multi-layer perceptron layer, which passes the feature vector at each position through a fully connected layer, then applies the ReLU activation function and Dropout respectively, and finally adds the result to the original feature vector and outputs the calculated feature vector; D. Use the subdomain adaptation module to calculate the distance loss LMMD between the source domain and the target domain, and use the cross-entropy loss function to calculate the fault classification loss of the network. The calculation formula is Formula 12, which is expressed as: (12); Where, represents the fault classification loss, represents the th sample data in the training data, and the true probability value of the corresponding fault category, represents the th sample data in the training data, and the predicted probability value of the corresponding fault category; the total loss of the network is expressed as Formula 13, and Formula 13 is expressed as: (13); After the loss calculation is completed, judge the current iteration number or If it is satisfied, stop the iterative training; otherwise, perform the next round of training.
[0012] Preferably, in step S5, the running vibration signals of the three-cylinder mud pump with unknown fault types under various rotational speed conditions are collected, and then input into the trained Transformer network model in step (4) to judge the fault type of the three-cylinder mud pump.
[0013] (III) Beneficial Effects Compared with the prior art, the present invention provides a cross-rotational speed condition migration diagnosis method for the hydraulic end of a three-cylinder mud pump, having the following beneficial effects: (1) Before network domain adaptation, signal processing technology is used to extract signal features under different operating conditions, reducing the distribution difference between data under different operating conditions; (2) Based on the Transformer network, a sub-domain adaptation module is designed to measure the gap between the source domain and the target domain; (3) Experimental verification shows that under different operating conditions, this method can effectively improve the accuracy of transfer learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a flow chart of the cross-rotational speed condition migration diagnosis method for the hydraulic end of the three-cylinder mud pump of the present invention.
[0015] Figure 2 is a structural diagram of the cross-rotational speed condition three-cylinder mud pump fault diagnosis network based on Transformer proposed by the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0016] Next, in combination with the drawings and specific embodiments, the present invention will be further described. It should be noted that, on the premise of no conflict, the following described embodiments or technical features can be combined arbitrarily to form new embodiments.
[0017] Example 1: Please refer to Figure 1-2 , a method for diagnosing the cross - speed condition migration of the hydraulic end of a three - cylinder mud pump in this embodiment, includes the following steps: S1. Collect the running vibration signals of the three - cylinder mud pump; S2. Data standardization pre - processing of the acceleration vibration signals; S3. Construct a fault diagnosis network for a three - cylinder mud pump with cross - speed conditions based on Transformer; S4. Train the fault diagnosis network model of the three - cylinder mud pump with cross - speed conditions based on Transformer; S5. Fault diagnosis of the three - cylinder mud pump under cross - speed conditions.
[0018] In step S1, when collecting the running vibration signals of the three - cylinder mud pump, use an acceleration sensor to collect a number of vibration signal samples in the normal state, piston fault state, and valve fault state of the mud pump at the driving motor speeds of 600 r / min, 800 r / min, and 1000 r / min.
[0019] The data standardization pre - processing of the acceleration vibration signals in step S2 includes the following specific steps: (a). Resampling; (b). Phase alignment and signal clipping; (c). Short - time Fourier transform and dataset construction.
[0020] When performing resampling in step (a), first calculate the number of sampling points in one cycle under the condition of the driving motor speed of 600 r / min, and then use formula 1 to calculate the number of sampling points that should be in one cycle after resampling under the conditions of the driving motor speeds of 800 r / min and 1000 r / min. Formula 1 is expressed as: (1); Among them, represents the expected number of sampling points after resampling under the conditions of the driving motor speeds of 800 r / min or 1000 r / min, represents the number of sampling points in one cycle under the condition of the driving motor speed of 600 r / min, , respectively represent the rotational speeds of different conditions; Subsequently, use formula 2 to interpolate the data collected under the conditions of the driving motor speeds of 800 r / min and 1000 r / min. Denote the data collected under a certain condition as , where is the sampling point position, is the sampling value at this position, represents different rotational speed conditions; The new data set after resampling under the conditions of the driving motor speed of 800 r / min or 1000 r / min Can be calculated as: (2); In step (b) of phase alignment and signal clipping, first find the maximum value within the previous cycle of the mud pump vibration signal, and take the position where the maximum value is located as the first impact position of the vibration signal. Subsequently, based on this impact position, window the signal, and the window length should be slightly greater than the number of sampling points in one cycle of the signal; calculate the autocorrelation function of the windowed signal using formula 3, and obtain the distance between the middle maximum peak of the autocorrelation function and its adjacent peak on the left. On the basis of the first impact position, add the calculated distance, which is the position where the impact is located in the next cycle. After finding all the impact positions in the vibration signal, take a signal sample with a length of one cycle on both the left and right sides centered on the impact position, and so on to obtain other signal samples; Formula 3 is expressed as: (3); Among them, Represents the autocorrelation function of the windowed signal, Represents the windowed vibration signal, k Is the delay value, representing the time difference between the signal and itself; if k >0, it means the signal has moved to the right on the time axis by k Units; if k <0, it means the signal has moved to the left by − k Units; In step (c) of short-time Fourier transform and data set construction, the short-time Fourier transform method is used to convert the intercepted signal samples into time-frequency diagrams. Formula 4 is expressed as: (4); Among them, Is the result of the short-time Fourier transform, Is the intercepted signal sample, Is the window function, C Is the length of the window, f And t Are the frequency and time indices respectively; plot the result obtained by the short-time Fourier transform with the time index as the horizontal axis and the frequency index as the vertical axis as a time-frequency diagram; Use the time-frequency diagram data at a certain rotational speed as the source domain for training, use the time-frequency diagram data at another rotational speed as the target domain for testing, and label each time-frequency diagram data with the corresponding fault label. Make the pictures and the corresponding fault labels into a data set for subsequent network training.
[0021] In step S3, the constructed Transformer network includes an embedding layer, two normalization layers, a multi-head attention mechanism layer, a multi-layer perceptron layer, and a sub-domain adaptation module; Among them, the embedding layer is used to cut the image into a series of patches, then flatten each patch into a feature vector, and pass the flattened feature vector and the relative position information of the corresponding patch to the first normalization layer. The formula of the normalization layer is expressed as formula 5: (5); Among them, is the input feature vector, represents the expected value of the input feature, represents the variance of the input feature, is a very small constant used to prevent the denominator from being zero, and are learnable scaling factor and translation factor, which are obtained through training; The result output by the first normalization layer will be passed to the multi-head attention mechanism layer. This layer will first perform three linear transformations on the input sequence, corresponding to the linear transformations of query, key, and value respectively; this is to map the input to different representation spaces in order to capture relationships in different contexts, such as formula 6, formula 7, and formula 8; Formula 6 is expressed as: (6); Formula 7 is expressed as: (7); Formula 8 is expressed as: (8); Among them, , , are weight matrices learned by the network; Subsequently, the result of each linear transformation will be divided into p heads, where p is a hyperparameter set by humans. The multiple groups of Query, Key, and Value combinations obtained in this way will be used for parallel attention calculations respectively. The attention calculation is formula 9, and formula 9 is expressed as: (9); Among them, is the dimension of the query (Query) or key (Key) of each head in the multi-head attention mechanism; After the calculation of each head is completed, a multi-head merging operation will be performed, that is, the attention outputs of each head will be concatenated and then integrated through a linear transformation. The calculation formula is formula 10, and formula 10 is expressed as: (10); where h is the number of heads set; The output of the multi-head attention mechanism will be passed to the second normalization layer, and the processed result will be passed to the multi-layer perceptron layer. This layer will pass the feature vector at each position through a fully connected layer, then apply the ReLU activation function and Dropout respectively, and finally add the result to the original feature vector and output the calculated feature vector; The role of the subdomain adaptation module is to calculate the domain loss of deep learning across rotational speed conditions. The domain loss used in the present invention is the local maximum mean discrepancy, and the calculation formula is Formula 11, which is expressed as: (11); where is the source domain sample at a certain rotational speed, is the number of source domain samples, is the target domain sample at another rotational speed, is the number of target domain samples, represents the function that maps the input sample to the feature space, is the default kernel function.
[0022] Step S4 for training and constructing a three-cylinder mud pump fault diagnosis network model based on Transformer across rotational speed conditions includes the following specific steps: A. Set the maximum number of iterations to , and initialize the current iteration number ; Given the expected model training error as ; B. In the th iteration, extract pictures from the preprocessed source domain data, and extract N pictures from the target domain as a single batch input to the Transformer network; C. After the pictures are input, first cut the pictures into small pieces through the embedding layer and flatten them into feature vectors. Subsequently, perform normalization processing through the first normalization layer, and use the processed result as the input to the multi-head attention layer. The multi-head attention layer learns the multi-dimensional features of the input through the linear transformation of query, key, and value, and passes the result to the second normalization layer for processing; the second normalization layer passes the result to the multi-layer perceptron layer, passes the feature vector at each position through a fully connected layer, then applies the ReLU activation function and Dropout respectively, and finally adds the result to the original feature vector and outputs the calculated feature vector; D. Use the sub-domain adaptation module to calculate the distance loss LMMD between the source domain and the target domain, and use the cross-entropy loss function to calculate the fault classification loss of the network. The calculation formula is Formula 12, and Formula 12 is expressed as: (12); where, represents the fault classification loss, represents the true probability value of the fault category corresponding to the th sample data in the training data, represents the predicted probability value of the fault category corresponding to the th sample data in the training data; The total loss of the network is expressed as Formula 13, and Formula 13 is expressed as: (13); After the loss calculation is completed, judge the current iteration number or If it is satisfied, stop the iterative training; otherwise, perform the next round of training.
[0023] In step S5, collect the running vibration signals of the three-cylinder mud pump with unknown fault types under various rotational speed conditions, and then input them into the trained Transformer network model in step (4) to judge the fault type of the three-cylinder mud pump.
[0024] Embodiment 2: In this embodiment, the equipment used is an F1600 type mud pump. The vibration data at three different rotational speeds of 600 r / min, 800 r / min, and 1000 r / min under normal conditions, valve failure conditions, and piston failure conditions of the diesel engine are collected respectively. Among them, the valve and piston failures are artificially set. In order to fully extract the fault information in the signal, a longer sampling frequency and duration are set, which are 25600 Hz and 300 seconds respectively. The selected vibration sensor is a piezoelectric acceleration sensor, model KISTLER8763. Three types of vibration data are obtained at different speeds of normal operation, valve failure, and piston failure. After the data standardization preprocessing of the acceleration vibration signal, the data used for training are 300 time-frequency domain pictures in the normal state and two fault states under three rotational speed conditions, a total of 2700 picture data.
[0025] The computer configuration for model training is an Intel Core i7-12850HX processor with a clock speed of 2.10 GHz, 32 GB of RAM, an NVIDIA RTX A1000 laptop GPU, running on the Windows 11 operating system and the Pytorch framework. The Python version used is 3.7, and the Pytorch version is 1.13.1.
[0026] This embodiment has a total of six transfer tasks, which are defined as a, b, c, d, e, and f respectively, representing the operating conditions of 600 r / min to 800 r / min, 600 r / min to 1000 r / min, 800 r / min to 600 r / min, 800 r / min to 1000 r / min, 1000 r / min to 600 r / min, and 1000 r / min to 800 r / min. The source domain data is used as the training set, and the target domain data is used as the validation set. The ratio of the training set to the validation set is 1:1. The input image resolution is 3×224×224, the batch size is 32, and the number of iterations is 200.
[0027] The experimental accuracy is shown in Table 1. It can be seen from Table 1 that the proposed method has achieved good results under various transfer tasks. Moreover, by comparing the proposed method with other advanced methods, it can be seen that the proposed method performs better than the comparative methods in each task, which reflects the effectiveness of the proposed method.
[0028] Table 1. Experimental accuracy under six transfer tasks A method for diagnosing the hydraulic end of a three-cylinder mud pump across rotational speed conditions according to the present invention first obtains the vibration signals of the mud pump under three rotational speed conditions, and then preprocesses the signals, including three steps: resampling, phase alignment and signal cropping, and short-time Fourier transform. Subsequently, a fault diagnosis network for a three-cylinder mud pump across rotational speed conditions based on Transformer is constructed and the network model is trained. After the model training is completed, the running vibration signals of the three-cylinder mud pump with unknown fault types under various rotational speed conditions are collected and input into the trained model to achieve the fault diagnosis of the mud pump across rotational speed conditions.
[0029] Meanwhile, a method for diagnosing the hydraulic end of a three-cylinder mud pump across rotational speed conditions according to the present invention also has the following beneficial effects: (1) Before performing network domain adaptation, signal processing technology is used to extract the signal features under different operating conditions, reducing the distribution differences between the data under different operating conditions; (2) Based on the Transformer network, a sub-domain adaptation module is designed to measure the gap between the source domain and the target domain; (3) Experimental verification shows that under different operating conditions, this method can effectively improve the accuracy of transfer learning.
[0030] The above-mentioned implementation manners are only the preferred implementation manners of the present invention, and the scope of protection of the present invention cannot be limited thereby. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention belong to the scope of protection required by the present invention.
Claims
1. A diagnostic method for the migration of a three-cylinder mud pump hydraulic end across rotational speed operating conditions, characterized in that, It includes the following steps: S1. Collect the running vibration signals of the three-cylinder mud pump; S2. Perform data standardization preprocessing on the acceleration vibration signals; S3. Construct a fault diagnosis network for the three-cylinder mud pump under cross-rotational speed conditions based on Transformer; S4. Train and construct a fault diagnosis network model for the three-cylinder mud pump under cross-rotational speed conditions based on Transformer; S5. Fault diagnosis of the three-cylinder mud pump under cross-rotational speed conditions.
2. A diagnostic method for the cross - speed - condition migration of the hydraulic end of a three - cylinder mud pump according to claim 1, characterized in that, In step S1, when collecting the running vibration signals of the three-cylinder mud pump, use an acceleration sensor to collect a number of vibration signal samples of the mud pump in the normal state, piston fault state, and valve fault state at the driving motor speeds of 600 r / min, 800 r / min, and 1000 r / min.
3. A diagnostic method for the cross - speed - condition migration of the hydraulic end of a three - cylinder mud pump according to claim 2, characterized in that, The data standardization preprocessing of the acceleration vibration signals in step S2 includes the following specific steps: (a) Resampling; (b) Phase alignment and signal clipping; (c) Short-time Fourier transform and dataset construction.
4. A diagnostic method for the cross - speed - condition migration of the hydraulic end of a three - cylinder mud pump as described in claim 3, characterized in that, When performing resampling in step (a), first calculate the number of sampling points in one cycle under the condition of the driving motor speed of 600 r / min, and then use formula 1 to calculate the number of sampling points that should be in one cycle after resampling under the conditions of the driving motor speeds of 800 r / min and 1000 r / min. Formula 1 is expressed as: (1); Among them, represents the expected number of sampling points in the later stage of resampling under the conditions of the driving motor speed of 800 r / min or 1000 r / min, represents the number of sampling points in one cycle under the condition of the driving motor speed of 600 r / min, , respectively represent the rotational speeds under different conditions; Subsequently, interpolation is performed on the data collected under the conditions of the driving motor speed of 800 r / min and the driving motor speed of 1000 r / min using Equation 2. Denote the data collected under a certain condition as , where is the sampling point position, is the sampling value at this position, represents different speed conditions; The new data set after resampling under the condition that the driving motor speed is 800 r / min or 1000 r / min can be calculated as follows: , (2); When performing phase alignment and signal clipping in step (b), first find the maximum value in the previous cycle of the mud pump vibration signal, and use the position where the maximum value is located as the first impact position of the vibration signal. Subsequently, based on this impact position, window the signal, and the window length should be slightly larger than the number of sampling points in one cycle of the signal; calculate the autocorrelation function of the windowed signal using formula 3, and obtain the distance between the middle maximum peak of the autocorrelation function and its adjacent peak on the left. On the basis of the first impact position, add the calculated distance, which is the position where the impact is located in the next cycle. After finding all the impact positions in the vibration signal, take the impact position as the center, and intercept a signal sample with a length of one cycle to the left and right as a signal sample, and so on to obtain other signal samples; Formula 3 is expressed as: (3) ; Among them, represents the autocorrelation function of the windowed signal, represents the windowed vibration signal, k is the delay value, representing the time difference between the signal and itself; if k > 0, it means the signal has moved k units to the right on the time axis; if k < 0, it means the signal has moved k units to the left; When performing short-time Fourier transform and dataset construction in step (c), use the method of short-time Fourier transform to convert the intercepted signal samples into time-frequency diagrams. Formula 4 is expressed as: (4); Among them, is the result of the short-time Fourier transform, is the intercepted signal sample, is the window function, C is the length of the window, f and t are the frequency and time indices respectively; the result obtained by the short-time Fourier transform is plotted as a time-frequency diagram with the time index as the horizontal axis and the frequency index as the vertical axis.
5. A diagnostic method for the cross - speed - condition migration of the hydraulic end of a three - cylinder mud pump according to claim 4, characterized in that, In step S3, the constructed Transformer network includes an embedding layer, two normalization layers, a multi-head attention mechanism layer, a multi-layer perceptron layer, and a sub-domain adaptation module; Among them, the embedding layer is used to cut the image into a series of patches, then flatten each patch into a feature vector, and pass the flattened feature vector and the relative position information of the corresponding patch to the first normalization layer. The formula 5 of the normalization layer is expressed as: (5); Among them, is the input feature vector, represents the expected value of the input feature, represents calculating the variance of the input feature, is a very small constant used to prevent the denominator from being zero, and are learnable scaling factor and translation factor, obtained through training; The result output by the first normalization layer will be passed to the multi-head attention mechanism layer, which will first perform three linear transformations on the input sequence, corresponding to the linear transformations of query, key, and value respectively; this is to map the input to different representation spaces in order to capture relationships in different contexts, as shown in Equation 6, Equation 7, and Equation 8; Equation 6 is expressed as: (6); Equation 7 is expressed as: (7); Equation 8 is expressed as: (8); Among them, , , is the weight matrix learned by the network; Subsequently, the result of each linear transformation is divided into p heads, where p is a hyperparameter set by humans. In this way, multiple groups of Query, Key, and Value combinations obtained will be used for parallel attention calculations respectively. The attention calculation is shown in Equation 9, and Equation 9 is expressed as: (9); Among them, is the dimension of the query or key of each head in the multi-head attention mechanism; After the calculation of each head is completed, a multi-head merging operation will be performed, that is, the attention outputs of each head are concatenated, and then integrated through a linear transformation. The calculation formula is Equation 10, and Equation 10 is expressed as: (10); Among them, h is the number of heads set; The output of the multi-head attention mechanism will be passed to the second normalization layer. After processing, the result will be passed to the multi-layer perceptron layer, which will pass the feature vector at each position through a fully connected layer, and then apply the ReLU activation function and Dropout respectively. Finally, the result will be added to the original feature vector and the calculated feature vector will be output; The role of the sub-domain adaptation module is to calculate the domain loss of deep learning across different rotational speed conditions. The domain loss used in the present invention is the local maximum mean discrepancy, and the calculation formula is Equation 11, and Equation 11 is expressed as: (11); Among them, is the source domain sample at a certain rotational speed, is the number of source domain samples, is the target domain sample at another rotational speed, is the number of target domain samples, represents the function that maps the input sample to the feature space, is the default kernel function.
6. A diagnostic method for migrating across rotational speed conditions of the hydraulic end of a three-cylinder mud pump according to claim 5, characterized in that, Step S4 for training and constructing a three-cylinder mud pump fault diagnosis network model based on Transformer includes the following specific steps: A. Set the maximum number of iterations to , and initialize the current iteration number = 1; Given the desired model training error as ; B. In the th iteration, extract images from the preprocessed source domain data, and extract N images from the target domain as the single batch input of the Transformer network; C. After the picture is input, it is first sliced into small pieces through the embedding layer and pulled into a feature vector. Subsequently, it is normalized through the first normalization layer, and the processed result is used as the input of the multi-head attention layer. The multi-head attention layer learns the multi-dimensional features of the input through the linear transformations of query, key, and value, and passes the result to the second normalization layer for processing; the second normalization layer passes the result to the multi-layer perceptron layer, which passes the feature vector at each position through a fully connected layer, and then applies the ReLU activation function and Dropout respectively. Finally, the result will be added to the original feature vector and the calculated feature vector will be output; D. Use the sub-domain adaptation module to calculate the distance loss LMMD between the source domain and the target domain, and use the cross-entropy loss function to calculate the fault classification loss of the network. The calculation formula is Equation 12, and Equation 12 is expressed as: (12); where, represents the fault classification loss, represents the th sample data in the training data, and is the true probability value of the corresponding fault category, represents the th sample data in the training data, and is the predicted probability value of the corresponding fault category; the total loss of the network is expressed as Equation 13, and Equation 13 is expressed as: (13); After the loss calculation is completed, judge the current iteration number or , if satisfied, stop the iterative training; otherwise, proceed to the next round of training.
7. A diagnostic method for the cross - speed - condition migration of the hydraulic end of a three - cylinder mud pump according to claim 6, characterized in that, In step S5, collect the running vibration signals of the three-cylinder mud pump with unknown fault types under various rotational speed conditions, and then input them into the Transformer network model trained in step (4) to determine the fault type of the three-cylinder mud pump.