A fault diagnosis method for rotary drilling rig hydraulic system based on convolutional neural network-ensemble classifier

By using a convolutional neural network-ensemble classifier model, combined with multiple classifiers and classification entropy combination strategies, the problem of insufficient feature utilization in fault diagnosis of rotary drilling rig hydraulic systems is solved, the accurate location and cause analysis of faults are achieved, the fault identification accuracy is improved, and the maintenance cost is reduced.

CN115879026BActive Publication Date: 2025-09-16JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211560142.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2025-09-16
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

The existing fault diagnosis method for rotary drilling rig hydraulic system based on convolutional neural network has deficiencies in feature extraction and fault classification. It cannot fully utilize data features, resulting in difficulty in accurately locating the fault location and cause, and insufficient classification accuracy.

Method used

A convolutional neural network-ensemble classifier model is adopted to monitor the hydraulic system signals online. The CNN network is used to extract data features, which are then fed into the support vector machine, random forest and K-nearest neighbor classifiers. Combined with the classification entropy combination strategy, accurate fault location and cause analysis can be achieved.

Benefits of technology

It achieves precise location and cause analysis of hydraulic system failures in rotary drilling rigs, improves fault identification accuracy, and reduces maintenance time and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115879026B_ABST
    Figure CN115879026B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for diagnosing faults in the hydraulic system of a rotary drilling rig based on a CNN-integrated classifier, and belongs to the technical field of diagnosing faults in the hydraulic system of a rotary drilling rig. The method comprises: extracting raw data reflecting the fault state of the hydraulic system of the rotary drilling rig, processing the data into an image suitable for input of a convolutional neural network through continuous wavelet transform, training the convolutional neural network through forward transfer and error back propagation, feeding the feature maps output by each pooling layer and fully connected layer of the convolutional neural network into a support vector machine, a K-nearest neighbor, and a random forest classifier respectively, determining the fault type and outputting the corresponding fault cause through a classification entropy combination strategy. This solves the problems of insufficient classification accuracy and insufficient utilization of shallow fault features that exist in the current single-use convolutional neural network for fault feature extraction and fault classification. The method of the present invention maximizes the feature extraction capability of the convolutional neural network and improves the accuracy of fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of mechanical fault diagnosis and the field of computer application, and particularly relates to a rotary drilling rig hydraulic system fault diagnosis method based on a CNN-ensemble classifier. Background Art

[0002] Rotary drilling rigs are large-scale pile-driving machinery used in foundation construction projects. They are widely used in the construction of pile foundation projects such as high-rise buildings, urban and rural road traffic construction, railways, highways and bridges.

[0003] The main operating conditions of a rotary drilling rig include mast inversion, drill lifting, and drilling, all of which require the participation of the hydraulic system. With the advancement of science and technology, the increasing intelligence and functional integration of rotary drilling rigs, the hydraulic system of rotary drilling rigs has become increasingly complex. Because all components and working fluids in the system operate within closed oil circuits, unlike mechanical components, which are intuitive, or electrical equipment, which can be easily measured using various testing instruments, the root causes of common faults are numerous. All of these characteristics pose challenges to hydraulic system fault diagnosis and maintenance.

[0004] Existing fault diagnosis methods based on convolutional neural networks have shortcomings. In terms of feature extraction, convolutional neural networks only utilize the fault information contained in high-level features, but lose the fault information contained in shallow features. In terms of fault classification, existing fault diagnosis methods based on convolutional neural networks use the classification layer of convolutional neural networks for fault classification. However, the classification layer of convolutional neural networks cannot fully utilize the fault information contained in data features, resulting in insufficient classification accuracy. Summary of the Invention

[0005] The method of the present invention utilizes the features of the shallow and deep outputs of the convolutional neural network as training samples and feeds them into multiple classifiers, including support vector machines, random forests, and K-nearest neighbor classifiers. This method is then applied to the hydraulic system of a rotary drilling rig. By online monitoring of the oil pressure, oil flow, oil temperature, and other signals of each part of the hydraulic system of the rotary drilling rig, the state changes of the hydraulic system can be monitored in real time. When a fault occurs, the fault location and the corresponding cause of the fault can be accurately fed back. This can solve the current problem of being unable to accurately locate the fault location and determine the cause of the fault when a fault occurs in the hydraulic system of a rotary drilling rig, and can greatly reduce the time and economic costs of maintenance.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In one aspect, the present invention provides a method for diagnosing a rotary drilling rig fault based on a convolutional neural network-ensemble classifier model, comprising the following steps:

[0008] Step 1, data acquisition: respectively obtain the hydraulic pressure signal, hydraulic flow signal, hydraulic temperature signal, motor vibration signal and motor power signal of the rotary drilling rig hydraulic system in normal state and fault state;

[0009] Step 2: Data preprocessing: Normalize the raw signals collected from the rotary drilling rig in normal and fault states, increase the number of samples through overlapping sampling, convert the collected raw hydraulic system state signals into time-frequency spectra using continuous wavelet transform, and display the time-frequency spectra as grayscale images.

[0010] Step 3: Divide the preprocessed data into training set and validation set;

[0011] Step 4: Build a CNN network model to extract data features.

[0012] The CNN network model consists of an input layer, a hidden layer and an output layer, wherein the hidden layer is composed of a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a third convolutional layer, a third pooling layer, a fourth convolutional layer, a fourth pooling layer and a fully connected layer connected in sequence, and the output layer is a Softmax classification layer;

[0013] First, the CNN network model parameters are randomly initialized. Then, in the offline process, the network model is pre-trained using the training set obtained in step 3. During the training process, the loss function of the softmax classification layer is calculated, and the loss function is minimized using the Adam optimization algorithm to update the CNN network model parameters. After repeated training several times, the model is verified using the validation set. When the accuracy meets the requirements, the pre-trained CNN network model is obtained.

[0014] Step 5: Input the data of each part of the online monitored rotary drilling rig hydraulic system into the pre-trained CNN network model to extract data features, and extract the calculation results of the first pooling layer, the second pooling layer, the third pooling layer, the fourth pooling layer and the fully connected layer in the network model; the results of each layer are respectively sent to the support vector machine classifier (SVM), the random forest classifier (RF) and the K nearest neighbor classifier (KNN), and the final diagnosis result and fault cause are obtained through the classification entropy combination strategy;

[0015] The execution steps of the classification entropy combination strategy are as follows:

[0016] Compute the confusion matrix of the base classifier,

[0017]

[0018] Where M i represents the i-th classifier; represents the probability that the i-th classifier classifies a sample with label j into a sample with label k; L is the number of labels;

[0019] Calculate the overall accuracy and local accuracy,

[0020]

[0021]

[0022]

[0023] Calculate the weight of each classifier,

[0024] W ij =exp(2(Lac ij -β))TAC i

[0025] is a constant

[0026] Calculating classification entropy

[0027]

[0028]

[0029]

[0030] s i represents the classification result of the i-th classifier,

[0031] Get ensemble classification results

[0032]

[0033] j=1,2,…L

[0034] Step 6: Output the diagnosis results and the corresponding fault causes.

[0035] Furthermore, in step 1, there are 12 types of fault states, and each of the 12 types of faults corresponds to multiple fault causes.

[0036] Among them, the causes of the drill bit falling off X1 during normal operation were high hydraulic oil viscosity y1, low hydraulic oil cleanliness y2, solenoid valve stagnation y3, deviation in the main reel pressure value y4, and unsatisfactory oil supply pipe position y5.

[0037] The drill rod sometimes slips during unloading. The causes of the failure X2 are damage to the brake cylinder y6 and insufficient oil replenishment in the main reel y7.

[0038] The main winch only lowers when it is in the lowering position (X3). The causes are: the motor relief valve is stuck, preventing the valve core from returning to its original position (y8), and the motor relief valve pressure is adjusted too low (y9).

[0039] The mast is not vertical X4. The cause of the fault is that the mast hydraulic lock is damaged. 10 Mast hydraulic cylinder is damaged or leaking 11 ;

[0040] The cause of the mast out of sync X5 is the inconsistent size of the damping hole of the oil cylinder large cavity bolt. 12 , balancing valve problem 13 There is internal leakage in the oil cylinder itself 14 ;

[0041] The cause of the X6 power head torque failure is the hydraulic oil circuit problem. 15 , Sequence valve problem 16 , relief valve on the oil supply valve 17 The main oil pipe pressure value is not enough 18 ;

[0042] There is no action when pressurizing. The cause of the pressure X7 failure is that the balance valve is damaged or the valve core is stuck. 19 And the M4 valve core is stuck 20 ;

[0043] The reason for the failure of the pressurized oil cylinder to automatically fall X8 is that the balance valve is damaged and cannot be locked. 21

[0044] The reason for the failure of the whole vehicle to move X9 is that the hydraulic oil tank is insufficient and the main pump is empty. 22 ; Oil suction filter is blocked 23 ; Main pump damaged 24 ; Servo system pressure is too low or no pressure 25 ; The safety valve is set to too low a pressure or is stuck 26 The main pump oil suction pipe bursts or is pulled off 27 ;

[0045] The whole car moves slowly and weakly 10 The cause of the failure is insufficient oil level in the hydraulic oil tank. 28 ; Pilot system pressure is too low 29 ; System safety valve pressure is too low 30 ; The main pump is not supplying enough oil, so the variable y is advanced 31 ; Hydraulic oil deterioration 32 And the main pump has serious internal leakage 33

[0046] Slow rotation and weakness 11 The cause of the failure is serious leakage of hydraulic oil pipe 34 Servo valve internal leakage is large, and the pressure is lower than the specified value y35 ; Multi-way valve rotation overload pressure is low y 36 And the rotary motor has serious internal leakage 37 ;

[0047] The oil pump system does not supply oil or the oil supply is insufficient. 12 The cause of the failure is that the main pump is faulty 38 、Insufficient fuel in the fuel tank 39 And the pilot valve pressure is insufficient 40 .

[0048] Furthermore, in step 2, the original signals of the rotary drilling rig in normal state and fault state are normalized, and the formula for the normalization is:

[0049]

[0050] Where: x max is the maximum value of the sample data, x min is the minimum value of the sample data, It is the normalized result, and the value range is [0, 1].

[0051] In step 2, overlapping sampling means that when training samples are collected from the original signal, there is overlap between each signal segment and the subsequent signal segment. This is achieved by window sliding. When collecting samples, the sample length is selected and the offset step size is s. If the collected original time series contains a total of n data points, then the time series can generate [n-(ls)] training samples.

[0052] In step 2, the continuous wavelet transform uses the Morlet continuous wavelet function, and its formula is:

[0053] ψ(t)=exp(-β 2 t 2 / 2)cos(πt)

[0054] Where t represents time; β represents waveform parameters, which is used to control wavelet parameters;

[0055] The similarity equation between the time series signal function and the wavelet function is:

[0056]

[0057] Where f(t) represents the time series signal function; a represents the scale factor; b represents the translation factor;

[0058] Furthermore, the source domain data in step 3 is composed of data of 40 fault causes in normal state and 12 fault states;

[0059] Furthermore, in the CNN network model in step 4, the convolution layer activation function can select the Relu activation function or the Tanh activation function; the pooling layer can select the maximum pooling and the average pooling;

[0060] When the number of layers in the constructed convolutional network model is large, a batch normalization layer is added between the convolutional layer and the pooling layer to speed up the convergence of the algorithm and improve the generalization ability of the model;

[0061] The loss function adopts an improved cross entropy loss function, that is, clustering distance is added as part of the loss function to achieve better clustering and improve the separability between each diagnostic category.

[0062] The improved cross entropy loss function formula is:

[0063] J=J enttopy +λ1·J norm +λ2·J cluster

[0064] Among them, j entropy is the cross entropy loss function, J norm is the regularization loss, j cluster is the clustering distance loss, λ1 and λ2 are hyperparameters;

[0065] The formula of the Adam optimization algorithm is:

[0066] θ * =arg min θ L(f(x i ;θ))

[0067] Among them, L(·), f(·) are the objective function value and output value, θ is all the parameters of the convolutional neural network; θ * is the optimal parameter of the convolutional neural network, x i is the input of the convolutional neural network.

[0068] Furthermore, in step 5, the kernel function of the support vector machine (SVM) can be selected from one of a linear kernel function, a polynomial kernel function, and a Gaussian kernel function, and the formulas thereof are:

[0069] K(x, y) = x·y

[0070] K(x,y)=(x.y+1) p

[0071]

[0072] The K value of the K-nearest neighbor classifier (KNN) needs to be optimized and adjusted according to the quality of the fitting accuracy after training. The distance metric can be selected from one of the Euclidean distance, Manhattan distance and Chebyshev distance. The formulas are:

[0073]

[0074]

[0075] d 12 =max(|x 1i -x 2i |)

[0076] The random forest classifier (RF) adopts the CART node partitioning method. The number of decision trees is optimized and adjusted according to the fitting accuracy after each training. The Gini coefficient is used as the basis for judging the importance of features. The formula is:

[0077]

[0078] In a second aspect, the present invention provides a rotary drilling rig fault diagnosis system based on a convolutional neural network-ensemble classifier model, comprising:

[0079] Data acquisition module: used to collect signals from various parts of the rotary drilling rig hydraulic system;

[0080] Data conversion module: used to normalize the collected original signals, convert the one-dimensional time series signals into grayscale images, and divide the data into training sets and test sets;

[0081] Model building module: used to build a convolutional neural network-ensemble classifier fault diagnosis model, input training data into the built convolutional neural network model, update network parameters through forward propagation and error back propagation, and save the trained fault diagnosis model;

[0082] Fault diagnosis module: inputs online monitoring data into the trained fault diagnosis model, outputs the diagnosis results, and gives corresponding explanations for the output results.

[0083] Compared with the prior art, the present invention has the following beneficial effects:

[0084] The advantage of the present invention is that it can monitor the state changes of the hydraulic system in real time by online monitoring of the oil pressure, oil flow, oil temperature and other signals of each part of the hydraulic system of the rotary drilling rig, and can accurately feedback the fault location and the corresponding fault cause when a fault occurs. It can solve the problem that the fault location cannot be accurately located and the cause of the fault cannot be known when a fault occurs in the hydraulic system of the rotary drilling rig. The method of the present invention utilizes the powerful feature extraction ability of the convolutional neural network to extract data features, and comprehensively utilizes the shallow features and deep features extracted by the convolutional neural network to maximize the use of the fault information contained in the data. The extracted features are sent to multiple classifiers for fault classification, and the classification entropy combination strategy is used to select the final diagnosis result. Compared with the traditional method of using convolutional neural networks for fault classification, the method of the present invention proposes to use an integrated classifier for fault classification, which can fully utilize the advantages of each classifier in fault feature recognition and improve the fault identification accuracy of the hydraulic system of the rotary drilling rig. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 This is a flow chart of the rotary drilling rig hydraulic system fault diagnosis method using a convolutional neural network-ensemble classifier as described in the present invention.

[0086] Figure 2 This is a structural diagram of the convolutional neural network used in the examples of the present invention.

[0087] Figure 3 Grayscale image conversion of oil flow signal.

[0088] Figure 4 Grayscale image conversion of oil pressure signal.

[0089] Figure 5 Diagram of iterative training of a convolutional neural network model.

[0090] Figure 6 Schematic diagram of the hydraulic system of a rotary drilling rig.

[0091] Figure 7 Rotary drilling rig hydraulic system fault diagnosis system structure diagram

[0092] In the figure, 1- oil suction filter; 2- oil tank; 3- plunger pump; 4- motor; 5- check valve; 6- pressure relay; 7- pressure gauge; 8- multi-way reversing valve; 9- pressure reducing valve; 10- solenoid reversing valve; 11- variable motor; 12- manual pilot valve; 13- pressure sensor; 14- throttle valve; 15- solenoid reversing valve; 16- balancing valve; 17- two-way hydraulic lock; 18- manual reversing valve; 19- overflow valve; 20- check valve; 21- double vane pump; 22- motor; 23- oil cooler; 24- return oil filter; 25- temperature sensor; 26- air filter; 27- oil level sensor; 28- contamination sensor; 29- flow sensor; 30- motor power sensor; 31- vibration sensor. DETAILED DESCRIPTION

[0093] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0094] A method for fault diagnosis of rotary drilling rig hydraulic system based on convolutional neural network-ensemble classifier, the flow chart is as follows Figure 1 The specific steps are as follows:

[0095] (1) Collect hydraulic pressure signals, hydraulic flow signals, hydraulic temperature signals, vibration signals and motor power signals of various parts of the rotary drilling rig; Figure 3 As shown in the schematic diagram of the rotary drilling rig hydraulic system, the sensors used to collect signals include a pressure sensor 13, a flow sensor 29, a temperature sensor 25, a motor power sensor 30, and a vibration sensor 31;

[0096] The collected signal data includes normal status and 12 fault statuses. Each fault type corresponds to multiple fault causes, as shown in Table 1 below.

[0097] Table 1 Fault types and causes of hydraulic system of rotary drilling rig

[0098]

[0099] (2) Data preprocessing

[0100] (2.1) The data matrix composed of the fault characteristic parameters of each signal point in the signal is normalized. The processing formula is as follows:

[0101]

[0102] Where: x max is the maximum value of the sample data, x min is the minimum value of the sample data, is the normalized result, and the value range is [0,1];

[0103] (2.2) In order to increase the number of samples, overlapping sampling is performed on the data. That is, when collecting training samples from the original signal, each signal segment overlaps with the next signal segment. This is achieved by window sliding. When collecting samples, the sample length l and the offset step length s are selected. If the original time series collected contains a total of n data points, then the time series can generate training samples;

[0104] (2.3) The data is converted into a time-frequency graph that is more suitable for convolutional neural network input through continuous wavelet transform.

[0105] The method of the present invention adopts the Morlet continuous wavelet function, and its formula is:

[0106] ψ(t)=exp(-β 2 t 2 / 2cos(πt)

[0107] Where t represents time; β represents waveform parameters, which is used to control wavelet parameters;

[0108] The similarity equation between the time series signal function and the wavelet function is:

[0109]

[0110] In order to avoid the influence of image color on feature extraction and final diagnosis results, the time-frequency image needs to be converted into grayscale image;

[0111] (3) Divide the training set and validation set

[0112] The pre-processed data is divided into a training set and a validation set according to a certain ratio. The ratio can be 7:3 or 6:4, ensuring that the training set occupies a larger proportion. The source domain data consists of data in normal state and 12 fault states;

[0113] (4) Build and train a convolutional neural network

[0114] (4.1) Constructing a convolutional neural network model

[0115] The convolutional neural network model consists of an input layer, a hidden layer, and an output layer. The basic structure of the hidden layer includes a convolutional layer, a pooling layer, and a fully connected layer. The output layer uses the softmax function. The activation function can be either the Relu activation function or the Tanh activation function. The formulas for the two activation functions are:

[0116]

[0117]

[0118] When the number of layers in the constructed convolutional network model is large, a batch normalization layer can be added to speed up the convergence of the algorithm and improve the generalization ability of the model. The pooling layer can choose average pooling or maximum pooling.

[0119] (4.2) Cross Entropy Loss Function

[0120] The minimization loss function adopts an improved cross entropy loss function, that is, cluster distance is added as part of the loss function to achieve better clustering and improve the separability between each diagnostic category.

[0121] The improved cross entropy loss function formula is:

[0122] J=J entropy +λ1·J norm +λ2·J cluster

[0123] Among them, J entropy is the cross entropy loss function, J norm is the regularization loss, J cluster is the clustering distance loss, λ1 and λ2 are hyperparameters;

[0124] The formula of the Adam optimization algorithm is:

[0125] θ * =arg min θ L(f(x i ;θ))

[0126] Among them, L(·), f(·) are the objective function value and output value, θ is all the parameters of the convolutional neural network; θ * is the optimal parameter of the convolutional neural network, x i is the input of the convolutional neural network;

[0127] (5) The data of each part of the online monitored rotary drilling rig hydraulic system are input into the pre-trained CNN network model to extract data features, and the outputs of the pooling layer and the fully connected layer are respectively sent to SVM, RF and KNN, and the final diagnosis results are obtained through the classification entropy combination strategy;

[0128] Specific case: The hydraulic system status assessment data collected by the University of Saarbrucken in Germany is used as experimental data to illustrate the feasibility of this method. It should be noted that the example of the present invention only uses the oil flow time series signal and oil pressure time series signal to characterize the leakage state of the hydraulic pump. The sampling frequencies of the oil flow signal and the oil pressure signal are 10Hz and 100Hz respectively. The data includes 2205 samples, and each sample has 6600 sampling points. First, in order to improve the accuracy and convergence speed of the model, the data is normalized and the numerical range is converted to between [0,1]. Secondly, the time series data is converted into a time spectrum by continuous wavelet transform and the time spectrum is grayed and converted into a grayscale image, such as Figure 4 They are the preprocessing of oil flow signals and oil pressure signals respectively. The convolutional neural network structure adopted in the example of the present invention is shown in Table 2. Conv(5×5×32) / Relu means that the convolution layer has 32 convolution kernels of size 5×5 and the activation function is the Relu function. Maxpool(2×2) means that the pooling window size is 2×2, and the pooling layer selects maximum value pooling. The output channel of Softmax is 3, corresponding to the three fault states of the hydraulic pump in the embodiment of the present invention, namely no leakage, slight leakage and severe leakage. The batch normalization scale is selected as 50, the maximum number of iterations is 100, the initialization learning rate is 0.0001, the division ratio of the training set and the test set is 7:3, then the number of training samples is 1544, and the number of test samples is 661. The attribute settings of the classifier are shown in Table 3.

[0129] Table 2 Convolutional neural network structure

[0130]

[0131]

[0132] Table 3 Classifier attributes

[0133]

[0134] The constructed convolutional neural network has a total of 4 pooling layers and 1 fully connected layer, and the corresponding KNN, SVM, and RF classifiers have 5 each.

[0135] The training process of convolutional neural network is as follows Figure 6 As shown in Table 4, after 100 iterations, the fitting accuracy reached 93.73%, meeting the requirements. The convolutional neural network training was completed and the model was saved. The outputs of the convolutional neural network pooling layer and the fully connected layer were fed into the corresponding KNN, SVM, and RF classifiers, respectively. The classification accuracy is shown in Table 4.

[0136] Table 4 Recognition accuracy of each classifier

[0137] <![CDATA[KNN1]]> <![CDATA[KNN2]]> <![CDATA[KNN3]]> <![CDATA[KNN4]]> <![CDATA[KNN5]]> 94.4% 93.7% 97.5% 88.6% 97.2% <![CDATA[SVM1]]> <![CDATA[SVM2]]> <![CDATA[SVM3]]> <![CDATA[SVM4]]> <![CDATA[SVM5]]> 86.9% 88.3% 87.2% 90.1% 89.9% <![CDATA[RF1]]> <![CDATA[RF2]]> <![CDATA[RF3]]> <![CDATA[RF4]]> <![CDATA[RF5]]> 95.3% 92.7% 89.7% 84.2% 90.3%

[0138] After the classifiers corresponding to each layer are trained, a classification entropy combination strategy is used to assign weights to each classifier. This strategy then combines the diagnostic results of each classifier to produce a final diagnostic result. After optimizing the output using the classification entropy combination strategy, the diagnostic accuracy reached 98.6%, exceeding the diagnostic accuracy of the individual classifiers listed in Table 4. Therefore, this method is feasible for application in hydraulic system fault diagnosis.

Claims

1. A method for diagnosing faults in a rotary drilling rig based on a convolutional neural network-ensemble classifier model, comprising the following steps: Step 1, data acquisition: respectively obtain the hydraulic pressure signal, hydraulic flow signal, hydraulic temperature signal, motor vibration signal and motor power signal of the rotary drilling rig hydraulic system in normal state and fault state; Step 2: Data preprocessing: Normalize the raw signals collected from the rotary drilling rig in normal and fault states, increase the number of samples through overlapping sampling, convert the collected raw hydraulic system state signals into time-frequency spectra using continuous wavelet transform, and display the time-frequency spectra as grayscale images. Step 3: Divide the preprocessed data into training set and validation set; Step 4: Build a CNN network model to extract data features. The CNN network model consists of an input layer, a hidden layer and an output layer, wherein the hidden layer is composed of a first convolutional layer, a first pooling layer, a second convolutional layer, a second pooling layer, a third convolutional layer, a third pooling layer, a fourth convolutional layer, a fourth pooling layer and a fully connected layer connected in sequence, and the output layer is a Softmax classification layer; First, the CNN network model parameters are randomly initialized. Then, in the offline process, the network model is pre-trained using the training set obtained in step 3. During the training process, the loss function of the softmax classification layer is calculated, and the loss function is minimized using the Adam optimization algorithm to update the CNN network model parameters. After repeated training, the model is verified using the validation set. When the accuracy meets the requirements, the pre-trained CNN network model is obtained. Step 5: Input the data of each part of the online monitored rotary drilling rig hydraulic system into the pre-trained CNN network model to extract data features, and extract the calculation results of the first pooling layer, second pooling layer, third pooling layer, fourth pooling layer and fully connected layer in the network model; the results of each layer are respectively sent to the support vector machine classifier, random forest classifier and K nearest neighbor classifier, and the final diagnosis result and fault cause are obtained through the classification entropy combination strategy; The execution steps of the classification entropy combination strategy are as follows: Compute the confusion matrix of the base classifier, Where M i represents the i-th classifier; represents the probability that the i-th classifier classifies a sample with label j into a sample with label k; L is the number of labels; Calculate the overall accuracy and local accuracy, Calculate the weight of each classifier, IN ij =exp(2(Lac ij -β))TAC i β is a constant Calculating classification entropy s i represents the classification result of the i-th classifier, Get ensemble classification results Step 6: Output the diagnosis results and the corresponding fault causes.

2. The rotary drilling rig fault diagnosis method based on the convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: In step 1, there are 12 types of fault states. Each of the 12 types of faults corresponds to multiple fault causes. Among them, the causes of the drill bit falling off X1 during normal operation were high hydraulic oil viscosity y1, low hydraulic oil cleanliness y2, solenoid valve stagnation y3, deviation in the main reel pressure value y4, and unsatisfactory oil supply pipe position y5. The drill rod sometimes slips during unloading. The causes of the failure X2 are damage to the brake cylinder y6 and insufficient oil replenishment in the main reel y7. The main winch only lowers when it is in the lowering position (X3). The causes are: the motor relief valve is stuck, preventing the valve core from returning to its original position (y8), and the motor relief valve pressure is adjusted too low (y9). The mast is not vertical X4. The cause of the fault is that the mast hydraulic lock is damaged. 10 Mast hydraulic cylinder is damaged or leaking 11 ; The cause of the mast out of sync X5 is the inconsistent size of the damping hole of the oil cylinder large cavity bolt. 12 , balancing valve problem 13 There is internal leakage in the oil cylinder itself 14 ; The cause of the X6 power head torque failure is the hydraulic oil circuit problem. 15 , Sequence valve problem 16 , relief valve on the oil supply valve 17 The main oil pipe pressure value is not enough 18 ; There is no action when pressurizing. The cause of the pressure X7 failure is that the balance valve is damaged or the valve core is stuck. 19 And the M4 valve core is stuck 20 ; The reason for the failure of the pressurized oil cylinder to automatically fall X8 is that the balance valve is damaged and cannot be locked. 21 The reason for the failure of the whole vehicle to move X9 is that the hydraulic oil tank is insufficient and the main pump is empty. 22 ; Oil suction filter is blocked 23 ; Main pump damaged 24 ; Servo system pressure is too low or no pressure 25 ; The safety valve is set to too low a pressure or is stuck 26 The main pump oil suction pipe bursts or is pulled off 27 ; The whole car moves slowly and weakly 10 The cause of the failure is insufficient oil level in the hydraulic oil tank. 28 ; Pilot system pressure is too low 29 ; System safety valve pressure is too low 30 ; The main pump is not supplying enough oil, so the variable y is advanced 31 ; Hydraulic oil deterioration 32 And the main pump has serious internal leakage 33 Slow rotation and weakness 11 The cause of the failure is serious leakage of hydraulic oil pipe 34 Servo valve leakage is large, the pressure is lower than the specified value y 35 ; Multi-way valve rotation overload pressure is low y 36 The rotary motor has serious internal leakage. 37 ; The oil pump system does not supply oil or the oil supply is insufficient. 12 The cause of the failure is that the main pump is faulty 38 、Insufficient fuel in the fuel tank 39 And the pilot valve pressure is insufficient 40 .

3. The rotary drilling rig fault diagnosis method based on convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: In step 2, the original signals of the rotary drilling rig in normal state and fault state are normalized, and the formula for the normalization is: Where: x max is the maximum value of the sample data, x min is the minimum value of the sample data, It is the normalized result, and the value range is [0,1].

4. The rotary drilling rig fault diagnosis method based on convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: In step 2, overlapping sampling means that when training samples are collected from the original signal, there is overlap between each signal segment and the subsequent signal segment. This is achieved by window sliding. When collecting samples, the sample length is selected and the offset step size is s. If the collected original time series contains a total of n data points, then the time series can generate [n-(ls)] training samples.

5. The rotary drilling rig fault diagnosis method based on convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: In step 2, the continuous wavelet transform uses the Morlet continuous wavelet function, and its formula is: ψ(t)=exp(-β 2 t 2 / 2)cos(πt) Where t represents time; β represents waveform parameters, which is used to control wavelet parameters; The similarity equation between the time series signal function and the wavelet function is: Where f(t) represents the time series signal function; a represents the scale factor; and b represents the translation factor.

6. The rotary drilling rig fault diagnosis method based on convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: The source domain data in step 3 consists of data of 40 fault causes in normal state and 12 fault states.

7. The rotary drilling rig fault diagnosis method based on convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: In the CNN network model in step 4, the convolution layer activation function can select the Relu activation function or the Tanh activation function; the pooling layer can select the maximum pooling or the average pooling; When the number of layers in the constructed convolutional network model is large, a batch normalization layer is added between the convolutional layer and the pooling layer to speed up the convergence of the algorithm and improve the generalization ability of the model; The loss function adopts an improved cross entropy loss function, that is, adding cluster distance as part of the loss function to achieve better clustering and improve the separability between each diagnostic category; The improved cross entropy loss function formula is: J=J entropy +λ1·J norm +λ2·J cluster Among them, J entropy is the cross entropy loss function, J norm is the regularization loss, J cluster is the clustering distance loss, λ1 and λ2 are hyperparameters; The formula of the Adam optimization algorithm is: i * =argmin θ L(f(x i ;i)) Among them, L(·), f(·) are the objective function value and output value, θ is all the parameters of the convolutional neural network; θ * is the optimal parameter of the convolutional neural network, x i is the input of the convolutional neural network.

8. The rotary drilling rig fault diagnosis method based on convolutional neural network-ensemble classifier model according to claim 1 is characterized in that: In step 5, the kernel function of the support vector machine can be selected from one of a linear kernel function, a polynomial kernel function and a Gaussian kernel function, and the formulas thereof are: K(x,y)=x·y K(x,y)=(x·y+1) p The K value of the K-nearest neighbor classifier needs to be optimized and adjusted according to the quality of the fitting accuracy after training. The distance metric can be selected from one of the Euclidean distance, Manhattan distance and Chebyshev distance, and the formulas are: d 12 =max(|x 1i -x 2i |) The random forest classifier adopts the CART node partitioning method. The number of decision trees is optimized and adjusted according to the fitting accuracy after each training. The Gini coefficient is used as the basis for judging the importance of features. The formula is:

9. A rotary drilling rig fault diagnosis system based on the method of claim 1, characterized in that: The system includes: The data acquisition module is used to collect the hydraulic pressure signal, hydraulic flow signal, hydraulic temperature signal, motor vibration signal and motor power signal of the rotary drilling rig hydraulic system. A data conversion module used to normalize the collected original signals, convert the one-dimensional time series signals into grayscale images, and divide the data into training sets and test sets. A model building module used to build a convolutional neural network-ensemble classifier fault diagnosis model, input training data into the built convolutional neural network model, update network parameters through forward propagation and error backpropagation, and save the trained fault diagnosis model; And a fault diagnosis module that inputs online monitoring data into a trained fault diagnosis model, outputs diagnosis results, and gives corresponding explanations for the output results.