An online monitoring method for drilling pump motor status based on LSTM neural network

Through the method based on LSTM neural network, the feature extraction and motor status monitoring are used to use sensor data to solve the problem of insufficient timeliness and accuracy of drilling pump motor status monitoring in the prior art, real-time and accurate monitoring of drilling pump motor status is achieved, and production efficiency and safety are improved.

CN116680607BActive Publication Date: 2025-04-04SOUTHWEST PETROLEUM UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310503363.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2025-04-04
Estimated Expiration
2043-05-06

AI Technical Summary

Technical Problem

The existing technology cannot quickly and accurately monitor the status of the drilling pump motor online, resulting in failures not being discovered in time, affecting production efficiency and progress.

Method used

Using the LSTM neural network-based method, the motor speed, voltage and current parameters are obtained through sensors, the power factor and input power are calculated, the characteristics of the speed and power signals are extracted, and the improved LSTM network based on hyperparameter optimization is input to obtain the motor running status.

Benefits of technology

Real-time and accurate monitoring of the drilling pump motor status is realized, abnormal states are discovered in a timely manner, production efficiency is improved, and production quality and safety are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680607B_ABST
    Figure CN116680607B_ABST
Patent Text Reader

Abstract

The present invention discloses an online monitoring method for the state of a drilling pump motor based on an LSTM neural network, which belongs to the technical field of drilling pump motor state monitoring, and includes the following steps: S1, obtaining the speed, voltage and current parameters of the motor through a sensor; S2, calculating the power factor through the obtained parameters; S3, calculating the input power of the motor through the power factor; S4, extracting features from the motor speed signal and the input power signal; S5, substituting the features into an improved LSTM network based on hyperparameter optimization, and then deriving the motor operation state. Through the above-mentioned method, the present invention can monitor the operation state of the drilling pump motor online during the drilling site operation, can timely warn of abnormal states, provide judgment and maintenance basis for the on-site operators, improve the production efficiency of drilling, reduce production costs, and maximize the guarantee of production progress.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drilling pump motor status monitoring, and in particular to an online drilling pump motor status monitoring method based on LSTM neural network. Background Art

[0002] Drilling automation is an inevitable trend in the development of the oil industry. The operation process of automated motors is complex, the on-site environment is harsh, and there are many potential safety hazards and equipment failures. The drilling pump is the key equipment for conveying drilling fluid during the drilling process and is the heart of fluid circulation in the process of oil exploration and development.

[0003] At present, with the continuous progress and development of oil extraction technology, on-site construction personnel and scientific researchers have improved the online monitoring technology and response technology for the status of reciprocating drilling mud pumps. However, due to the extremely harsh working environment of the drilling pump, uninterrupted operation, and the complex internal components of the drilling pump itself, there are many unstable excitation sources during its operation, resulting in complex fault information attributes of the drilling pump, and the accuracy of online monitoring of the drilling pump status is also low, so that the occurrence of faults cannot be avoided in time, resulting in drilling pump failures on site and seriously affecting production efficiency and production progress.

[0004] The motor is the drive of the electric drilling pump. Whether its running state is normal or not is related to whether the reciprocating fluid transportation in the whole production process is normal or not. The normal operation of its motor is also necessary to ensure production efficiency and production progress. Among the common methods for online monitoring of the motor status of the motor pump, the operation data of the drilling pump motor is used for mathematical and statistical analysis. This method not only requires manpower to perform mathematical analysis, but also its results are not real-time and cannot monitor the running state efficiently. The second method is to use vibration and temperature sensors to obtain the vibration and temperature data of the drilling pump motor for remote monitoring. However, this type of method cannot realize the early warning of drilling pump accidents, and only provides a basis for subsequent maintenance. Therefore, the online monitoring method cannot quickly, efficiently and accurately determine the status of the drilling pump and monitor it online, resulting in frequent drilling pump accidents, which has a serious impact on production efficiency and production progress.

[0005] Based on this, the present invention designs an online monitoring method for the status of a drilling pump motor based on an LSTM neural network to solve the above problems. Summary of the invention

[0006] In view of the above-mentioned shortcomings of the prior art, the present invention provides an online monitoring method for the state of a drilling pump motor based on an LSTM neural network.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0008] A method for online monitoring of drilling pump motor status based on LSTM neural network, comprising the following steps:

[0009] S1, obtain the speed, voltage and current parameters of the motor through the sensor;

[0010] S2. Calculate the power factor through the acquired parameters;

[0011] S3, calculating the input power of the motor through the power factor;

[0012] S4, extracting features from the motor speed signal and the input power signal; wherein, the speed is extracted in the time domain and the frequency domain, and the power signal is extracted only in the time domain;

[0013] S5. Substitute the features into the improved LSTM network based on hyperparameter optimization to obtain the motor operating status.

[0014] Furthermore, S2 specifically includes the following steps:

[0015] A. Calculate the apparent power value using voltage and current data;

[0016] The power calculation of the motor is related to the voltage value, current value, and power factor. The calculation formula of the power factor is:

[0017]

[0018] Among them, P is the input active power, S is the apparent power;

[0019] According to the effective value algorithm of apparent power, the calculation formula is as follows:

[0020] S=UI

[0021] and

[0022] Among them, I is the current signal, U is the voltage signal, I1 is the fundamental current, U1 is the fundamental voltage, I k is the harmonic current, U k is the harmonic voltage, n is the maximum order of harmonics, h=2,3,······,n;

[0023] The calculation formula of the effective value of apparent power is as follows:

[0024]

[0025] Substituting the harmonics, the simplified calculation formula is:

[0026]

[0027] Among them, i, j = 1, 2, ······, n and i ≠ j;

[0028] B. Calculate reactive power. The reactive power is calculated by fast Fourier transform to calculate true reactive power. The calculation formula is as follows:

[0029] or

[0030] Where Q is reactive power, h is harmonic order, h=1 represents fundamental wave, i1 is fundamental wave current, u1 is fundamental wave voltage, i k is the harmonic current, u k is the harmonic voltage, h is the harmonic order, h=1,2,······,n, h=1 represents the fundamental wave, φ h Represents the angle between the voltage and harmonic current of the hth harmonic;

[0031] C. Use the triangle algorithm to calculate the active power. According to the triangular relationship between apparent power, active power and reactive power, when the apparent power and reactive power are determined, the active power can be obtained by calculation; the calculation formula is:

[0032]

[0033] D. Calculate the power factor using the relationship between active power and apparent power; the calculation formula is as follows:

[0034]

[0035] in, is the power factor, is the phase difference between voltage and current, P is the active power, and S is the reactive power.

[0036] Furthermore, the power factor is used to calculate the input power of the motor. The calculation formula is:

[0037]

[0038] Furthermore, S4 specifically includes the following steps:

[0039] A. Extract time domain and frequency domain features from continuous speed time domain signals;

[0040] B. Extract time domain features from continuous power time domain signals, and use wavelet analysis to extract features from time domain signals in the time domain;

[0041] C. Perform time domain feature extraction on the continuous power time domain signal. The time domain features of power mainly extract its root mean square value, standard deviation and peak factor.

[0042] Furthermore, step A, extracting time domain and frequency domain features from the continuous speed time domain signal; the specific steps are:

[0043] (1) For the continuous speed time domain signal, frequency domain feature extraction is performed. First, for the continuous speed time domain, continuous Fourier transform processing is performed:

[0044]

[0045] Wherein, CFT(x(t)) represents continuous Fourier transform of continuous signal x(t), x(t) is a continuous signal in the time domain, X(ω) is the continuous spectrum of signal x(t), ω is the frequency, ω=2πf, f is the sampling frequency, t is the time, and j is an imaginary number;

[0046] The inverse Fourier transform is:

[0047]

[0048] In which, X(ω) is transformed into is the phase-frequency characteristic, then the amplitude-frequency characteristic calculation formula of the signal x(t) is:

[0049]

[0050] Phase-frequency characteristics:

[0051]

[0052] (2) Discretize the signal and process x(t) using discrete Fourier transform. The processing formula is:

[0053]

[0054] After inverse discrete Fourier transform, we get:

[0055]

[0056] (3) After converting the time domain signal into a frequency domain signal, the frequency variance and mean square frequency of the speed signal are extracted as the speed frequency domain features. The frequency variance calculation formula is:

[0057]

[0058] Among them, f i is the frequency, f c is the frequency mean, p i is the amplitude corresponding to the frequency;

[0059] The formula for calculating mean square frequency is:

[0060]

[0061] Among them, f i is the frequency, p i is the amplitude corresponding to the frequency.

[0062] Furthermore, step B, extracting time domain features from the continuous power time domain signal, and extracting features from the time domain signal using wavelet analysis in the time domain, the specific steps are:

[0063] (1) Select the mother wavelet function, let ψ(t)∈L 2 (R) and meets the following requirements:

[0064]

[0065] Then, select ψ(t) as the mother wavelet function;

[0066] (2) Perform a scaling transformation on the mother wavelet function to obtain the basis function. The transformation process is as follows:

[0067]

[0068] Among them, ψ a,τ (t) is the wavelet basis function obtained by scaling transformation of ψ(t), where a and τ are scaling factors and translation factors respectively;

[0069] (3) Reconstruct the time domain signal, and the calculation formula is:

[0070]

[0071] Among them, W f (a,τ) is the wavelet transform coefficient, C ψ is a constant;

[0072] The signal energy values ​​in different frequency bands are:

[0073] E(j,n)=∑[P s ] 2

[0074] Among them, P s is the wavelet coefficient, j is the number of decomposition levels, and n is the frequency;

[0075] When extracting features, first extract the energy ratio P of all frequency bands E (j):

[0076]

[0077] Where j is the position of the frequency band, and E(j) is the energy at the j-frequency band;

[0078] Secondly, calculate the entropy value of each scale, that is, the wavelet scale entropy H j,k (f), and wavelet singular entropy P j,k m :

[0079]

[0080]

[0081] Among them, j is the number of decomposition layers, k is the number of nodes, and λ j,k m is the singular value spectrum;

[0082] Through the above steps, the wavelet scale entropy, wavelet energy ratio and singular entropy characteristics of the continuous speed time domain signal are extracted.

[0083] Furthermore, step C, extracting time domain features from the continuous power time domain signal, the time domain features of the power mainly extract its root mean square value, standard deviation and peak factor; the specific steps are:

[0084] (1) The root mean square value is calculated as follows:

[0085]

[0086] Where: N is the number of signals, x i is the i-th signal;

[0087] (2) The standard deviation is calculated as follows:

[0088]

[0089] in, is the signal average value;

[0090] (3) The peak factor is calculated as follows:

[0091]

[0092] Where X is the RMS value.

[0093] Furthermore, S5 specifically includes the following steps:

[0094] 1. Randomly initialize the population P(t), set the inertia weight, and set the evolutionary generation;

[0095] 2. Solve the values ​​of each objective function;

[0096] 3. Update the population;

[0097] 4. Evaluate the value of each objective function;

[0098] 5. Determine whether the iteration conditions are met. If the iteration conditions are met, output the optimal solution; if the iteration conditions are not met, execute step 3.

[0099] Furthermore, the population is updated by updating the speed and position of each individual. The calculation method is:

[0100] V i,j (t+1)=ωV i,j (t)+c1×rand()×[Pbest i,j -x i,j (t)]+c2×rand()×[Gbest i,j -x i,j (t)]

[0101] x i,j (t+1)=x i,j (t)+V i,j (t+1),j=1,2,···,d

[0102] Where i = 1, 2, ···M, M is the total number of particles in the population; V i,j is the speed of the particle; Gbest i,j and Pbest i,j are the optimal positions of the particle and the population respectively; rand() is a random number between 0 and 1; x i,j is the position of the particle; c1 and c2 are learning factors, usually c1=c2=2.05; ω is the compression factor.

[0103] Furthermore, the obtained optimal solution of hyperparameters is used to initialize the LSTM network. After the initialization is completed, the feature samples extracted in step 4 are substituted into the LSTM network for prediction;

[0104] First, the forget gate f of the LSTM neural network t The specific formula for deciding which input status information needs to be discarded or forgotten is as follows:

[0105] f t =σ(W f ·(h t-1 +x t )+b f )

[0106] Where W f is the weight matrix of the forget gate, b f is the bias of the forget gate, x t is the input data at that moment, h t-1 is the unit state at the previous moment, σ is the sigmoid activation function;

[0107] Secondly, the input gate i of the LSTM neural network t Determines what information will be stored in the memory cell The specific formula is as follows:

[0108] i t =σ(W i ·(h t-1 +x t )+b i )

[0109]

[0110] Where W i is the weight matrix of the input gate, W c is the weight matrix of the cell state, b i is the bias of the input gate, b c is the bias of the cell state, tanh is the hyperbolic tangent function;

[0111] Then, the LSTM neural network updates the state, and the specific formula is as follows:

[0112]

[0113] In the formula, c t is the input state of the memory unit;

[0114] Finally, calculate the output gate o of the LSTM neural network t The specific calculation formula is as follows:

[0115] o t =σ(W o ·(h t-1 +x t )+b o )

[0116] h t =o t ⊙tanh(c t )

[0117] Where W o is the weight matrix of the output gate, b o is the bias of the output gate, h t The unit status at the previous moment.

[0118] Beneficial Effects

[0119] The present invention adopts an improved particle swarm optimization algorithm to optimally calculate the hyperparameters of the LSTM network. Compared with the traditional method, the traditional method needs to rely on prior knowledge and other methods to determine the setting of hyperparameters, and the human factors have a greater impact. The improved particle swarm optimization algorithm is used to calculate the hyperparameters, which can reduce the impact of human factors on the training results, thereby increasing the accuracy of the model, and ultimately monitoring the motor running state more accurately.

[0120] The present invention uses LSTM network to train features and then predict the collected samples. Compared with the traditional recurrent neural network, it adds a forget gate, which can change the retention degree of the unit state at the previous moment, effectively prevent gradient explosion or gradient disappearance caused by long-term state accumulation, conduct long-term training on features, retain long-term information, and prevent irrelevant content from entering the memory. Real-time monitoring of the running status of the motor improves the accuracy of monitoring, improves production efficiency, ensures production quality, and guarantees production safety;

[0121] The present invention proposes to use the power characteristics and speed characteristics of the motor and substitute them into the LSTM network to monitor the running state of the motor, so as to obtain the running state of the motor, solve the problem of insufficient timeliness caused by mathematical and statistical analysis of data, improve production efficiency, ensure production quality, and guarantee production safety;

[0122] The present invention can monitor the operating status of the drilling pump motor online during the drilling site operation, can promptly warn of abnormal conditions, and provide judgment and maintenance basis for on-site operators, thereby improving the drilling production efficiency, reducing production costs, and ensuring production progress to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0123] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0124] Figure 1 It is a flow chart of a method for online monitoring of drilling pump motor status based on LSTM neural network of the present invention;

[0125] Figure 2 This is a flow chart of hyperparameter calculation of particle swarm optimization in an online monitoring method for drilling pump motor status based on LSTM neural network of the present invention.

[0126] Figure 3The present invention is a flowchart of power factor calculation in an online monitoring method for drilling pump motor status based on LSTM neural network. DETAILED DESCRIPTION

[0127] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0128] The present invention will be further described below in conjunction with the embodiments.

[0129] Example 1

[0130] Please refer to the instruction manual Figure 1-3 , a drilling pump motor state online monitoring method based on LSTM neural network, comprising the following steps:

[0131] S1, obtain the speed, voltage and current parameters of the motor through the sensor;

[0132] Among them, the voltage signal u contains the fundamental voltage signal and the harmonic voltage signal, and the relationship between them is:

[0133] u=u1+u k

[0134] Similarly, the current signal i contains the fundamental current signal and the harmonic current signal, and the relationship between them is:

[0135] i=i1+i k ;

[0136] S2. Calculate the power factor through the acquired parameters;

[0137] The specific steps include:

[0138] A. Calculate the apparent power value using voltage and current data;

[0139] The power calculation of the motor is related to the voltage value, current value, and power factor. The calculation formula of the power factor is:

[0140]

[0141] Among them, P is the input active power, S is the apparent power;

[0142] According to the effective value algorithm of apparent power, the calculation formula is as follows:

[0143] S=UI

[0144] and

[0145] Among them, I is the current signal, U is the voltage signal, I1 is the fundamental current, U1 is the fundamental voltage, I k is the harmonic current, U k is the harmonic voltage, n is the maximum order of harmonics, h=2,3,······,n;

[0146] The calculation formula of the effective value of apparent power is as follows:

[0147]

[0148] Substituting the harmonics, the simplified calculation formula is:

[0149]

[0150] Among them, i, j = 1, 2, ······, n and i ≠ j;

[0151] B. Calculate reactive power. The reactive power is calculated by fast Fourier transform to calculate true reactive power. The calculation formula is as follows:

[0152] or

[0153] Where Q is reactive power, h is harmonic order, h=1 represents fundamental wave, i1 is fundamental wave current, u1 is fundamental wave voltage, i k is the harmonic current, u k is the harmonic voltage, h is the harmonic order, h=1,2,······,n, h=1 represents the fundamental wave, φ h Represents the angle between the voltage and harmonic current of the hth harmonic;

[0154] C. Use the triangle algorithm to calculate the active power. According to the triangular relationship between apparent power, active power and reactive power, when the apparent power and reactive power are determined, the active power can be obtained by calculation; the calculation formula is:

[0155]

[0156] D. Calculate the power factor using the relationship between active power and apparent power; the calculation formula is as follows:

[0157]

[0158] in, is the power factor, is the phase difference between voltage and current, P is the active power, and S is the reactive power;

[0159] S3. Calculate the input power of the motor through the power factor; the calculation formula is:

[0160]

[0161] S4, extracting features from the motor speed signal and the input power signal; wherein, the speed is extracted in the time domain and the frequency domain, and the power signal is extracted only in the time domain;

[0162] The specific steps include:

[0163] A. Extract time domain and frequency domain features of continuous speed time domain signals; the specific steps are:

[0164] (1) For the continuous speed time domain signal, frequency domain feature extraction is performed. First, for the continuous speed time domain, continuous Fourier transform processing is performed:

[0165]

[0166] Wherein, CFT(x(t)) represents continuous Fourier transform of continuous signal x(t), x(t) is a continuous signal in the time domain, X(ω) is the continuous spectrum of signal x(t), ω is the frequency, ω=2πf, f is the sampling frequency, t is the time, and j is an imaginary number;

[0167] The inverse Fourier transform is:

[0168]

[0169] In which, X(ω) is transformed into is the phase-frequency characteristic, then the amplitude-frequency characteristic calculation formula of the signal x(t) is:

[0170]

[0171] Phase-frequency characteristics:

[0172]

[0173] (2) Discretize the signal and process x(t) using discrete Fourier transform. The processing formula is:

[0174]

[0175] After inverse discrete Fourier transform, we get:

[0176]

[0177] (3) After converting the time domain signal into a frequency domain signal, the frequency variance and mean square frequency of the speed signal are extracted as the speed frequency domain features. The frequency variance calculation formula is:

[0178]

[0179] Among them, f i is the frequency, f c is the frequency mean, p i is the amplitude corresponding to the frequency;

[0180] The formula for calculating mean square frequency is:

[0181]

[0182] Among them, f i is the frequency, p i is the amplitude corresponding to the frequency;

[0183] B. Extract time domain features from continuous power time domain signals. Use wavelet analysis in the time domain to extract features from time domain signals. The specific steps are as follows:

[0184] (1) Select the mother wavelet function, let ψ(t)∈L 2 (R) and meets the following requirements:

[0185]

[0186] Then, select ψ(t) as the mother wavelet function;

[0187] (2) Perform a scaling transformation on the mother wavelet function to obtain the basis function. The transformation process is as follows:

[0188]

[0189] Among them, ψ a,τ (t) is the wavelet basis function obtained by scaling transformation of ψ(t), where a and τ are scaling factors and translation factors respectively;

[0190] (3) Reconstruct the time domain signal, and the calculation formula is:

[0191]

[0192] Among them, W f (a,τ) is the wavelet transform coefficient, C ψ is a constant;

[0193] The signal energy values ​​in different frequency bands are:

[0194] E(j,n)=∑[P s ] 2

[0195] Among them, P s is the wavelet coefficient, j is the number of decomposition levels, and n is the frequency;

[0196] When extracting features, first extract the energy ratio P of all frequency bands E (j):

[0197]

[0198] Where j is the position of the frequency band, and E(j) is the energy at the j-frequency band;

[0199] Secondly, calculate the entropy value of each scale, that is, the wavelet scale entropy H j,k (f), and wavelet singular entropy P j,k m :

[0200]

[0201]

[0202] Among them, j is the number of decomposition layers, k is the number of nodes, and λ j,k m is the singular value spectrum;

[0203] Through the above steps, the wavelet scale entropy, wavelet energy ratio and singular entropy characteristics of the continuous speed time domain signal are extracted;

[0204] C. Extract the time domain features of the continuous power time domain signal. The time domain features of the power mainly extract its root mean square value, standard deviation and peak factor. The specific steps are as follows:

[0205] (1) The root mean square value is calculated as follows:

[0206]

[0207] Where: N is the number of signals, x i is the i-th signal;

[0208] (2) The standard deviation is calculated as follows:

[0209]

[0210] in, is the signal average value;

[0211] (3) The peak factor is calculated as follows:

[0212]

[0213] Where X is the root mean square value;

[0214] At this point, the feature extraction of the speed signal and the power signal has been completed;

[0215] S5, substituting the features into the improved LSTM network based on hyperparameter optimization to obtain the motor operation status;

[0216] Compared with the recurrent neural network, the LSTM network adds a forget gate, which is used to manage the degree of information forgetting, and can effectively prevent the gradient vanishing and gradient explosion of the recurrent neural network. As a structural parameter that needs to be set manually before training, the hyperparameter needs to be determined by prior knowledge when predicting features, and the human factor has a great influence. The present invention improves the disadvantages of artificially setting hyperparameters, and adopts a particle swarm optimization algorithm to calculate the optimal solution of the hyperparameters.

[0217] Specifically, the features are substituted into the improved LSTM network based on hyperparameter optimization, and the particle swarm optimization algorithm is used to optimally calculate the hyperparameters, including the following steps:

[0218] 1. Randomly initialize the population P(t), set the inertia weight, and set the evolutionary generation;

[0219] 2. Solve the values ​​of each objective function;

[0220] Specifically, the dominance relationships are sorted according to fitness and the exclusion distances between individuals are calculated. At the same time, the optimal positions of appropriate particles and the optimal positions of the population are selected through selection strategies;

[0221] 3. Update the population;

[0222] Specifically, the population is updated by updating the speed and position of each individual. The calculation method is:

[0223] V i,j (t+1)=ωV i,j (t)+c1×rand()×[Pbest i,j -x i,j (t)]+c2×rand()×[Gbest i,j -x i,j (t)]

[0224] x i,j (t+1)=x i,j (t)+V i,j (t+1),j=1,2,···,d

[0225] Where i = 1, 2, ···M, M is the total number of particles in the population; V i,j is the speed of the particle; Gbest i,j and Pbesti,j are the optimal positions of the particle and the population respectively; rand() is a random number between 0 and 1; x i,j is the position of the particle; c1 and c2 are learning factors, usually c1=c2=2.05; ω is the compression factor;

[0226] 4. Evaluate the value of each objective function;

[0227] Specifically, the dominance relationship is sorted according to fitness and the exclusion distance between individuals is calculated. At the same time, the current individual position is compared with the individual's historical best position through the selection strategy to select the best position of the appropriate particle and the best position of the population;

[0228] 5. Determine whether the iteration conditions are met. If the iteration conditions are met, output the optimal solution; if the iteration conditions are not met, execute step 3;

[0229] The obtained optimal solution of hyperparameters is used to initialize the LSTM network. After the initialization is completed, the feature samples extracted in step 4 are substituted into the LSTM network for prediction;

[0230] First, the forget gate f of the LSTM neural network t The specific formula for deciding which input status information needs to be discarded or forgotten is as follows:

[0231] f t =σ(W f ·(h t-1 +x t )+b f )

[0232] Where W f is the weight matrix of the forget gate, b f is the bias of the forget gate, x t is the input data at that moment, h t-1 is the unit state at the previous moment, σ is the sigmoid activation function;

[0233] Secondly, the input gate i of the LSTM neural network t Determines what information will be stored in the memory cell The specific formula is as follows:

[0234] i t =σ(W i ·(h t-1 +x t )+b i )

[0235]

[0236] Where Wi is the weight matrix of the input gate, W c is the weight matrix of the cell state, b i is the bias of the input gate, b c is the bias of the cell state, tanh is the hyperbolic tangent function;

[0237] Then, the LSTM neural network updates the state, and the specific formula is as follows:

[0238]

[0239] In the formula, c t is the input state of the memory unit;

[0240] Finally, calculate the output gate o of the LSTM neural network t The specific calculation formula is as follows:

[0241] o t =σ(W o ·(h t-1 +x t )+b o )

[0242] h t =o t ⊙tanh(c t )

[0243] Where W o is the weight matrix of the output gate, b o is the bias of the output gate, h t is the unit state at the previous moment;

[0244] The result output by the output gate is the prediction of the motor operation status;

[0245] The present invention adopts an improved particle swarm optimization algorithm to optimally calculate the hyperparameters of the LSTM network. Compared with the traditional method, the traditional method needs to rely on prior knowledge and other methods to determine the setting of hyperparameters, and the human factors have a greater impact. The improved particle swarm optimization algorithm is used to calculate the hyperparameters, which can reduce the impact of human factors on the training results, thereby increasing the accuracy of the model, and ultimately monitoring the motor running state more accurately.

[0246] The present invention uses an LSTM network to train features and then predict the collected samples. Compared with the traditional recurrent neural network, a forget gate is added, which can change the retention degree of the unit state at the previous moment, effectively prevent the gradient explosion or gradient disappearance caused by long-term state accumulation, perform long-term training on features, retain long-term information, and prevent irrelevant content from entering the memory; the running state of the motor can be monitored in real time, the accuracy of monitoring is improved, the production efficiency is improved, the production quality is ensured, and the production safety is guaranteed;

[0247] The present invention proposes to use the power characteristics and speed characteristics of the motor and substitute them into the LSTM network to monitor the running state of the motor, so as to obtain the running state of the motor, solve the problem of insufficient timeliness caused by mathematical and statistical analysis of data, improve production efficiency, ensure production quality, and guarantee production safety;

[0248] The present invention can monitor the operating status of the drilling pump motor online during the drilling site operation, can promptly warn of abnormal conditions, and provide judgment and maintenance basis for on-site operators, thereby improving the drilling production efficiency, reducing production costs, and ensuring production progress to the greatest extent.

[0249] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A drilling pump motor status online monitoring method based on LSTM neural network, characterized in that: The following steps are involved: S1, obtain the speed, voltage and current parameters of the motor through the sensor; S2. Calculate the power factor through the acquired parameters; S3, calculating the input power of the motor through the power factor; S4, extracting features from the motor speed signal and the input power signal; wherein, the speed is extracted in the time domain and the frequency domain, and the power signal is extracted only in the time domain; S4 specifically includes the following steps: A. Extract time domain and frequency domain features from continuous speed time domain signals; After converting the time domain signal into the frequency domain signal, the frequency variance and mean square frequency of the speed signal are extracted as the speed frequency domain features; B. Extract time domain features from continuous speed time domain signals, and use wavelet analysis to extract features from time domain signals in the time domain; The wavelet scale entropy, wavelet energy ratio and singular entropy features of the continuous speed time domain signal were extracted; C. Extract time domain features of continuous power time domain signals, and extract the root mean square value, standard deviation and peak factor of the power time domain features; S5. Substitute the features into the improved LSTM network based on hyperparameter optimization to obtain the motor operating status.

2. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 1 is characterized in that: S2 specifically includes the following steps: A. Calculate the apparent power value using voltage and current data; The power calculation of the motor is related to the voltage value, current value, and power factor. The calculation formula of the power factor is: Among them, P is the input active power, S is the apparent power; According to the effective value algorithm of apparent power, the calculation formula is as follows: S=UI and Among them, I is the current signal, U is the voltage signal, I1 is the fundamental current, U1 is the fundamental voltage, I k is the harmonic current, U k is the harmonic voltage, n is the maximum order of harmonics, h=2,3,······,n; The calculation formula of the effective value of apparent power is as follows: Substituting the harmonics, the simplified calculation formula is: Among them, i, j = 1, 2, ······, n and i ≠ j; B. Calculate reactive power. The reactive power is calculated by fast Fourier transform to calculate true reactive power. The calculation formula is as follows: or Where Q is reactive power, h is harmonic order, h=1 represents fundamental wave, i1 is fundamental wave current, u1 is fundamental wave voltage, i k is the harmonic current, u k is the harmonic voltage, h is the harmonic order, h=1,2,······,n, h=1 represents the fundamental wave, φ h Represents the angle between the voltage and harmonic current of the hth harmonic; C. Use the triangle algorithm to calculate the active power. According to the triangular relationship between apparent power, active power and reactive power, when the apparent power and reactive power are determined, the active power can be obtained by calculation; the calculation formula is: D. Calculate the power factor using the relationship between active power and apparent power; the calculation formula is as follows: in, is the power factor, is the phase difference between voltage and current, P is the active power, and S is the reactive power.

3. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 2 is characterized in that: The power factor is used to calculate the input power of the motor. The calculation formula is:

4. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 3 is characterized in that: Step A: extracting time domain and frequency domain features from the continuous speed time domain signal; The specific steps are: (1) For the continuous speed time domain signal, frequency domain feature extraction is performed. First, for the continuous speed time domain, continuous Fourier transform processing is performed: Wherein, CFT(x(t)) represents continuous Fourier transform of continuous signal x(t), x(t) is a continuous signal in the time domain, X(ω) is the continuous spectrum of signal x(t), ω is the frequency, ω=2πf, f is the sampling frequency, t is the time, and j is an imaginary number; The inverse Fourier transform is: In which, X(ω) is transformed into is the phase-frequency characteristic, then the amplitude-frequency characteristic calculation formula of the signal x(t) is: Phase-frequency characteristics: (2) Discretize the signal and process x(t) using discrete Fourier transform. The processing formula is: After inverse discrete Fourier transform, we get: (3) After converting the time domain signal into a frequency domain signal, the frequency variance and mean square frequency of the speed signal are extracted as the speed frequency domain features. The frequency variance calculation formula is: Among them, f i is the frequency, f c is the frequency mean, p i is the amplitude corresponding to the frequency; The formula for calculating mean square frequency is: Among them, f i is the frequency, p i is the amplitude corresponding to the frequency.

5. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 4 is characterized in that: Step B: extracting time domain features from the continuous speed time domain signal, and extracting features from the time domain signal using wavelet analysis in the time domain. The specific steps are: (1) Select the mother wavelet function, let ψ(t)∈L 2 (R) and meets the following requirements: Then, select ψ(t) as the mother wavelet function; (2) Perform a scaling transformation on the mother wavelet function to obtain the basis function. The transformation process is as follows: Among them, ψ a,τ (t) is the wavelet basis function obtained by scaling transformation of ψ(t), where a and τ are scaling factors and translation factors respectively; (3) Reconstruct the time domain signal, and the calculation formula is: Among them, W f (a,τ) is the wavelet transform coefficient, C ψ is a constant; The signal energy values ​​in different frequency bands are: E(j,n)=∑[P s ] 2 Among them, P s is the wavelet coefficient, j is the number of decomposition levels, and n is the frequency; When extracting features, first extract the energy ratio P of all frequency bands E (j): Where j is the position of the frequency band, and E(j) is the energy at the j-frequency band; Secondly, calculate the entropy value of each scale, that is, the wavelet scale entropy H j,k (f), and wavelet singular entropy P j,k m : Among them, j is the number of decomposition layers, k is the number of nodes, and λ j,k m is the singular value spectrum; Through the above steps, the wavelet scale entropy, wavelet energy ratio and singular entropy characteristics of the continuous speed time domain signal are extracted.

6. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 5 is characterized in that: Step C: extracting time domain features of the continuous power time domain signal, extracting the root mean square value, standard deviation and peak factor of the power time domain features; the specific steps are: (1) The root mean square value is calculated as follows: Where: N is the number of signals, x i is the i-th signal; (2) The standard deviation is calculated as follows: in, is the signal average value; (3) The peak factor is calculated as follows: Where X is the RMS value.

7. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 6 is characterized in that: S5 specifically includes the following steps:

1. Randomly initialize the population P(t), set the inertia weight, and set the evolutionary generation; 2. Solve the values ​​of each objective function; 3. Update the population; 4. Evaluate the value of each objective function; 5. Determine whether the iteration conditions are met. If the iteration conditions are met, output the optimal solution; if the iteration conditions are not met, execute step 3.

8. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 7 is characterized in that: By updating the speed and position of each individual, the population is updated. The calculation method is: V i,j (t+1)=ωV i,j (t)+c1×rand()×[Pbest i,j -x i,j (t)]+c2×rand()×[Gbest i,j -x i,j (t)] x i,j (t+1)=x i,j (t)+V i,j (t+1),j=1,2,···,d Where i = 1, 2, ···M, M is the total number of particles in the population; V i,j is the velocity of the particle; Gbest i,j and Pbest i,j are the optimal positions of the particle and the population respectively; rand() is a random number between 0 and 1; x i,j is the position of the particle; c1 and c2 are learning factors, c1=c2=2.05; ω is the compression factor.

9. The method for online monitoring of drilling pump motor status based on LSTM neural network according to claim 8, characterized in that: The obtained optimal solution of hyperparameters is used to initialize the LSTM network. After the initialization is completed, the feature samples extracted in step 4 are substituted into the LSTM network for prediction; First, the forget gate f of the LSTM neural network t The specific formula for deciding which input status information needs to be discarded or forgotten is as follows: f t =σ(W f ·(h t-1 +x t )+b f ) Where W f is the weight matrix of the forget gate, b f is the bias of the forget gate, x t is the input data at that moment, h t-1 is the unit state at the previous moment, σ is the sigmoid activation function; Secondly, the input gate i of the LSTM neural network t Determines what information will be stored in the memory cell The specific formula is as follows: i t =σ(W i ·(h t-1 +x t )+b i ) Where W i is the weight matrix of the input gate, W c is the weight matrix of the cell state, b i is the bias of the input gate, b c is the bias of the cell state, tanh is the hyperbolic tangent function; Then, the LSTM neural network updates the state, and the specific formula is as follows: In the formula, c t is the input state of the memory unit; Finally, calculate the output gate o of the LSTM neural network t The specific calculation formula is as follows: the t =σ(W o ·(h t-1 +x t )+b o ) h t =o t ⊙tanh(c t ) Where W o is the weight matrix of the output gate, b o is the bias of the output gate, h t The unit status at the previous moment.

Citation Information

Patent Citations

  • System and method for monitoring state of wind generator

    CN102620807A

  • Multi-parameter joint diagnosis method for typical faults of asynchronous motor

    CN111650514A