Fault diagnosis method and device, electronic device and storage medium
Through feature extraction and Fourier transform of two-dimensional image of load-displacement curve, combined with neural network model, the problems of large amount of calculation and fewer recognition types in oil pumping power diagram diagnosis are solved, and fast and accurate fault recognition and High diagnostic rate.
Patent Information
- Application Number
- CN202110278573.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-15
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-03-15
AI Technical Summary
The existing oil pump power diagram diagnosis methods have problems such as large calculation volume, few recognition types, and need to improve the structure. In particular, manual diagnosis is easily restricted by subjective and objective factors, and the intelligent diagnosis model has a large calculation volume and limited recognition types.
By obtaining the two-dimensional image of the load-displacement curve of the oil pump, the moment feature sequence of multiple invariant moments is determined, and the Fourier descriptor is used for transformation, the feature parameters of the instruction diagram are obtained, and combined with the preset neural network model for Troubleshooting.
It realizes the rapid and accurate identification of the power diagrams of different working conditions of the oil pump, improves the fault diagnosis rate, reduces errors, and has high versatility and adaptability.
Smart Images

Figure CN112884068B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of fault diagnosis, and in particular to a fault diagnosis method and device, an electronic device, and a storage medium. Background Art
[0002] Driven by current technologies such as artificial intelligence, big data, and the Internet of Things, automated, digital, and intelligent oil fields are the inevitable trend of future oil field development. In the research of intelligent oil production technology, the working condition diagnosis of pumping wells has become one of the key hot topics for domestic and foreign petroleum scholars. Among the results of pumping unit indicator diagram diagnosis, there are five main fault diagnosis methods: manual diagnosis and analysis, expert system, fuzzy theory, gray theory, and neural network. Among the above methods, the manual diagnosis and analysis method is easily restricted by subjective and objective factors such as human experience and technical level; the expert system is overly dependent on the knowledge base, the knowledge base is not updated in time, and the parallel work ability is lacking, and the applicability is poor; the feature extraction membership function method and theory established by the fuzzy theory method have not been clearly unified; the gray theory method requires a large amount of calculation, takes a long time, occupies a large amount of memory, and its application is subject to certain restrictions; the neural network method is currently widely used, but the individual neural network models established have poor nonlinear fitting prediction ability and few recognition types, and corresponding improvements need to be made.
[0003] The existing manual analysis method of pumping unit dynamometer diagram diagnosis is easily restricted by subjective and objective factors. The current intelligent diagnosis model has the disadvantages of large amount of calculation, few identification types, and the need for structural improvement. Summary of the invention
[0004] The present disclosure proposes a fault diagnosis method and device, an electronic device and a storage medium technical solution, which can perform fault diagnosis on an oil pumping unit based on a two-dimensional image of a load-displacement curve of the oil pumping unit.
[0005] According to one aspect of the present disclosure, a fault diagnosis method is provided, comprising:
[0006] Obtain a two-dimensional image of the load-displacement curve;
[0007] Determine a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image;
[0008] Determining characteristic parameters of the indicator diagram according to the moment characteristic sequences of the plurality of invariant moments;
[0009] Fault diagnosis is completed based on the characteristic parameters of the indicator diagram and the preset classification model.
[0010] Preferably, the method for determining a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image comprises:
[0011] Determine the multi-order moments corresponding to the two-dimensional image of the load-displacement curve according to the two-dimensional image of the load-displacement curve;
[0012] Determine a first center of gravity in the horizontal direction and a second center of gravity in the vertical direction of the two-dimensional image of the load-displacement curve according to the multi-order moment;
[0013] Determine a multi-order central moment corresponding to the two-dimensional image of the load-displacement curve according to the two-dimensional image of the load-displacement curve, the first center of gravity, and the second center of gravity;
[0014] A moment feature sequence of the plurality of invariant moments is determined based on the central moment.
[0015] Preferably, the method for determining the moment feature sequence of the plurality of invariant moments based on the central moment comprises:
[0016] Normalizing the central moment to obtain a normalized central moment;
[0017] According to the normalized central moment, a moment characteristic sequence of multiple invariant moments of the load-displacement curve two-dimensional image that is stable in orientation, position and scale is determined.
[0018] Preferably, the method for determining characteristic parameters of the dynamometer diagram according to the moment characteristic sequences of the multiple invariant moments comprises:
[0019] Get Fourier descriptor;
[0020] Fourier transform is performed on the moment characteristic sequences of the plurality of invariant moments according to the Fourier descriptors respectively to obtain characteristic parameters of the dynamometer diagram.
[0021] Preferably, before obtaining the Fourier descriptor, determining the Fourier descriptor to be obtained, the method includes:
[0022] Take a closed curve on the two-dimensional image of the load-displacement curve, and take any point on the curve as the starting point;
[0023] Taking a plurality of points in sequence along a clockwise or counterclockwise direction to obtain coordinates representing the closed curve;
[0024] obtaining a complex variable based on the coordinates;
[0025] Performing Fourier transform on the complex variable to obtain a Fourier descriptor;
[0026] and / or,
[0027] The method of performing Fourier transform on the moment characteristic sequences of the plurality of invariant moments according to the Fourier descriptors to obtain characteristic parameters of the dynamometer diagram comprises:
[0028] Normalizing the Fourier descriptor to obtain a normalized Fourier descriptor;
[0029] Performing Fourier transform on the plurality of moment feature sequences of invariant moments according to the normalized Fourier descriptors respectively to obtain a plurality of moment feature sequences of invariant moments in the frequency domain;
[0030] Gaussian normalization is performed on the moment characteristic sequences of the multiple frequency domain invariant moments to obtain characteristic parameters of the dynamometer diagram.
[0031] Preferably, the method for completing fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model includes:
[0032] Obtaining a preset classification model, wherein the preset classification model is a neural network model, and the neural network model at least includes: an input layer and an output layer;
[0033] The plurality of neurons in the output layer have preset fault diagnosis types;
[0034] Based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis types of the plurality of neurons, the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is determined to complete the fault diagnosis.
[0035] Preferably, before acquiring the load-displacement curve two-dimensional image, the load-displacement curve two-dimensional image is determined, and the determination method thereof includes:
[0036] Obtain the pumping unit indicator diagram data through the crank position sensor and the load sensor;
[0037] The load-displacement curve two-dimensional image is determined based on the pumping unit indicator diagram data.
[0038] According to one aspect of the present disclosure, there is provided a fault diagnosis device, comprising:
[0039] An acquisition unit, used for acquiring a two-dimensional image of a load-displacement curve;
[0040] A first determining unit, configured to determine a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image;
[0041] A second determining unit, configured to determine characteristic parameters of the indicator diagram according to the moment characteristic sequences of the plurality of invariant moments;
[0042] The diagnosis unit is used to complete fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model.
[0043] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0044] processor;
[0045] a memory for storing processor-executable instructions;
[0046] Wherein, the processor is configured to: execute the above-mentioned fault diagnosis method.
[0047] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned fault diagnosis method is implemented.
[0048] In the embodiments of the present disclosure, a fault diagnosis method and device, electronic device and storage medium technical solution proposed in the present disclosure can diagnose faults of the oil pump based on the two-dimensional image of the load-displacement curve of the oil pump, which is conducive to the rapid and accurate identification of the oil pump indicator diagram under different working conditions, and has a high fault diagnosis rate, so as to solve the current problems of large calculation amount and few identification types.
[0049] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0050] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0052] Figure 1 A flowchart showing a method for fault diagnosis according to an embodiment of the present disclosure;
[0053] Figure 2 A two-dimensional array structure diagram of a SOM neural network model according to an embodiment of the present disclosure is shown;
[0054] Figure 3 The topological structure of the SOM neural network according to the embodiment of the present disclosure is shown;
[0055] Figure 4 The classification result of each neuron obtained after the SOM neural network training and learning according to the embodiment of the present disclosure is shown;
[0056] Figure 5 is a block diagram of an electronic device 800 according to an exemplary embodiment;
[0057] Figure 6 is a block diagram of an electronic device 1900 according to an exemplary embodiment. DETAILED DESCRIPTION
[0058] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0059] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0060] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0061] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0062] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not go into details.
[0063] In addition, the present disclosure also provides a fault diagnosis device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any fault diagnosis method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.
[0064] Figure 1 A flow chart showing a method for fault diagnosis according to an embodiment of the present disclosure is shown as follows: Figure 1As shown, the fault diagnosis method includes: step S101: obtaining a two-dimensional image of a load-displacement curve; step S102: determining a plurality of moment characteristic sequences of invariant moments according to the two-dimensional image of the load-displacement curve; step S103: determining characteristic parameters of the indicator diagram according to the plurality of moment characteristic sequences of invariant moments; step S104: completing fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model. The fault diagnosis of the pumping unit can be performed based on the two-dimensional image of the load-displacement curve of the pumping unit, which is conducive to the rapid and accurate recognition of the indicator diagram of the pumping unit under different working conditions, and has a high fault diagnosis rate, so as to solve the existing problems of large amount of calculation and few identification types.
[0065] Step S101: Acquire a two-dimensional image of a load-displacement curve.
[0066] In the embodiments of the present disclosure and in the art, the load-displacement curve two-dimensional image is also called an indicator diagram. At the same time, before obtaining the load-displacement curve two-dimensional image, the load-displacement curve two-dimensional image is determined, and the determination method thereof includes: obtaining the pumping unit indicator diagram data through the crank position sensor and the load sensor; and determining the load-displacement curve two-dimensional image based on the pumping unit indicator diagram data.
[0067] For example, 12 different working condition indicator diagram sample data including suspension point displacement and load are selected from a field test of an oil field, the pumping unit indicator diagram data is obtained through a crank position sensor and a load sensor, and the measured data is uploaded to a database through a remote RTU (remote terminal unit) module. The pumping unit indicator diagram data can be obtained by reading the database, and a two-dimensional image of the load-displacement curve can be drawn based on the pumping unit indicator diagram data.
[0068] Step S102: determining a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image.
[0069] In an embodiment of the present disclosure, the method for determining a moment characteristic sequence of multiple invariant moments based on the load-displacement curve two-dimensional image includes: determining multi-order moments corresponding to the load-displacement curve two-dimensional image based on the load-displacement curve two-dimensional image; determining a first center of gravity in the horizontal direction and a second center of gravity in the vertical direction of the load-displacement curve two-dimensional image based on the multi-order moments; determining multi-order central moments corresponding to the load-displacement curve two-dimensional image based on the load-displacement curve two-dimensional image, the first center of gravity and the second center of gravity; and determining the moment characteristic sequence of the multiple invariant moments based on the central moments.
[0070] In an embodiment of the present disclosure, the method for determining the moment feature sequence of the plurality of invariant moments based on the central moment comprises: normalizing the central moment to obtain a normalized central moment;
[0071] According to the normalized central moment, a moment characteristic sequence of multiple invariant moments of the load-displacement curve two-dimensional image that is stable in orientation, position and scale is determined.
[0072] In the specific embodiment of the present disclosure and other possible embodiments, the moment feature sequences of multiple invariant moments are actually moment feature sequences composed of multiple invariant moment eigenvalues.
[0073] A specific embodiment of determining the multi-order moments corresponding to the two-dimensional image of the load-displacement curve according to the two-dimensional image of the load-displacement curve.
[0074] For any non-negative integers p and q, the grayscale distribution f(x,y) is the (p+q)-order moment m of the two-dimensional image of the load-displacement curve pq for:
[0075]
[0076] Where (x, y) is the pixel coordinate of the two-dimensional image, and f(x, y) is the grayscale of the image.
[0077] A specific embodiment of determining the first center of gravity in the horizontal direction and the second center of gravity in the vertical direction of the two-dimensional image of the load-displacement curve according to the multi-order moments, and determining the multi-order central moments corresponding to the two-dimensional image of the load-displacement curve according to the two-dimensional image of the load-displacement curve, the first center of gravity and the second center of gravity.
[0078] (p+q)-order central moment μ pq for:
[0079]
[0080] According to the (p+q) order moment m pq The first-order moment and the zero-order moment when p and q are 1 and 0 respectively obtain the first center of gravity of the grayscale of the two-dimensional image in the horizontal direction and the second center of gravity in the vertical direction.
[0081] Right now, x0, y0 are the first centroid of the image grayscale in the horizontal direction and the second centroid in the vertical direction respectively.
[0082] Determining the moment characteristic sequences of the multiple invariant moments based on the central moment includes: normalizing the central moment to obtain a normalized central moment; and determining the moment characteristic sequences of the multiple invariant moments of the load-displacement curve two-dimensional image that are stable in orientation, position and scale according to the normalized central moment. Specific embodiments thereof.
[0083] The central moment is normalized to obtain a normalized central moment. The normalized (p+q)-order central moment η pq Defined as:
[0084]
[0085] In the formula,
[0086] According to the normalized central moment, a moment characteristic sequence of multiple invariant moments of the load-displacement curve two-dimensional image under the orientation, position and scale is determined. Wherein, the load-displacement curve two-dimensional image under the above orientation, position and scale can be the rotation, translation and scaling of the load-displacement curve two-dimensional image; specifically, the method for determining the moment characteristic sequence of multiple invariant moments of the load-displacement curve two-dimensional image under the orientation, position and scale specifically includes: respectively determining multiple groups of eigenvalues of the load-displacement curve two-dimensional image under the orientation, position and scale; selecting the same eigenvalue from the multiple groups of eigenvalues as the invariant moment eigenvalue. For example, the load-displacement curve two-dimensional image can be rotated at a set angle to obtain multiple groups of rotation eigenvalues under rotation conditions; the load-displacement curve two-dimensional image can be translated left and right or up and down according to the set lateral translation step and / or the set longitudinal translation step; to obtain multiple groups of translation eigenvalues; the load-displacement curve two-dimensional image can be scaled according to different set scales to obtain multiple groups of scaling eigenvalues under scaling conditions.
[0087] That is to say, multiple groups of eigenvalues, including: multiple groups of rotation eigenvalues, multiple groups of translation eigenvalues and multiple groups of scaling eigenvalues; if the same eigenvalue is selected from the multiple groups of rotation eigenvalues, multiple groups of translation eigenvalues and multiple groups of scaling eigenvalues, it has the characteristics of rotation, translation and scaling invariance, and is therefore called a stable invariant moment eigenvalue.
[0088] For example, through the normalized central moment, we can obtain 7 invariant moment eigenvalues that are stable to the rotation, translation and scaling of the image: The calculation formula is as follows:
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096] Step S103: determining characteristic parameters of the dynamometer diagram according to the moment characteristic sequences of the plurality of invariant moments.
[0097] In an embodiment of the present disclosure, the method for determining characteristic parameters of the dynamometer diagram based on the moment characteristic sequences of the multiple invariant moments includes: obtaining a Fourier descriptor; performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain characteristic parameters of the dynamometer diagram.
[0098] In an embodiment of the present disclosure, before obtaining the Fourier descriptor, determining the Fourier descriptor, the method includes: taking a closed curve on the two-dimensional image of the load-displacement curve, and taking any point on the curve as the starting point; taking multiple points in a clockwise or counterclockwise direction to obtain coordinates representing the closed curve; obtaining a complex variable based on the coordinates; and performing Fourier transform on the complex variable to obtain the Fourier descriptor.
[0099] For example, take a closed curve on the xoy plane (a two-dimensional image of the load-displacement curve), take any point on the curve as the starting point (x0, y0), and take N+1 points in the clockwise direction to (x N ,y N ), get a coordinate x, y representing the curve boundary; assign N+1 horizontal and vertical coordinates to U:
[0100] U(n)=x(n)+jy(n).
[0101] Where n=0, 1, …N, U(n) is a complex variable, x represents the real part, and y represents the imaginary part.
[0102] Performing fast Fourier transform on the above equation can obtain the Fourier descriptor a(k):
[0103]
[0104] In the formula, k=0,1,…,N.
[0105] In an embodiment of the present disclosure, the method of performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptor respectively to obtain characteristic parameters of the dynamometer diagram includes: normalizing the Fourier descriptor to obtain a normalized Fourier descriptor; performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the normalized Fourier descriptor respectively to obtain moment characteristic sequences of multiple frequency domain invariant moments; and performing Gaussian normalization on the moment characteristic sequences of the multiple frequency domain invariant moments to obtain characteristic parameters of the dynamometer diagram.
[0106] For example, the normalized Fourier descriptor e(k) is:
[0107]
[0108] In the formula, k=0,1,…,N.
[0109] The characteristic sequence is Fourier transformed using the Fourier descriptor method, and the final characteristic parameters of the dynamometer diagram are calculated through Gaussian normalization.
[0110] In summary, the present invention utilizes the composite method of moment feature sequence of invariant moment and Fourier descriptor to extract characteristic parameters of the pumping unit indicator diagram (two-dimensional image of load-displacement curve). First, the moment feature sequences of seven invariant moments of the two-dimensional image of the load-displacement curve are calculated, and then the Fourier descriptor method is used to perform Fourier transform on the feature sequence. Through Gaussian normalization, the final characteristic parameters of the indicator diagram are calculated.
[0111] The present invention adopts a shape recognition method combining Fourier descriptors and invariant moments to extract features from the pumping unit dynamometer diagram (a two-dimensional image of a load-displacement curve). When the dynamometer diagram is rotated, translated, and scaled, the shape change of the two-dimensional image of the load-displacement curve does not affect the diagnosis result, thereby reducing the error and improving the accuracy of dynamometer diagram fault diagnosis. The feature extraction method is universal in dynamometer diagram fault identification.
[0112] Step S104: completing fault diagnosis based on the characteristic parameters of the dynamometer diagram and a preset classification model.
[0113] In an embodiment of the present disclosure, the method for completing fault diagnosis based on the characteristic parameters of the dynamometer diagram and a preset classification model includes: obtaining a preset classification model, the preset classification model is a neural network model, the neural network model includes at least: an input layer and an output layer; multiple neurons in the output layer preset fault diagnosis types; based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis types of the multiple neurons, determining the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve, to complete the fault diagnosis.
[0114] Figure 2 A two-dimensional array structure diagram of a SOM neural network model according to an embodiment of the present disclosure is shown. Figure 3 The SOM neural network topology structure according to the embodiment of the present disclosure is shown. Figure 2 and Figure 3 In the specific embodiment of the present disclosure and other possible embodiments, the preset classification model may be a SOM neural network (self-organizing map neural network), including an input layer and a competition layer (output layer). The established SOM neural network topology structure is shown in Figure 3As shown in the figure, it is an 8×8 hexagonal structure function. The SOM neural network can learn the distribution characteristics of the training sample input vector, and can also learn the topological structure of the training data input vector. It has a fast clustering speed and has good adaptability and effectiveness in the classification and recognition of pumping unit indicator diagram faults.
[0115] The following is a detailed description based on the SOM neural network (self-organizing map neural network). Compared with the manual diagnosis and analysis method and the complex redundant intelligent diagnosis model, the SOM neural network method for fault diagnosis of the pumping unit indicator diagram has significantly improved the fault identification accuracy and efficiency of the pumping unit indicator diagram under different working conditions.
[0116] Before the preset classification model is used, the preset classification model needs to be trained, and its training method includes: obtaining the input vector corresponding to the input layer of the diagnostic network model; determining the weights between the neurons between the output layer and the input layer of the diagnostic network model; determining multiple distances between the input vector and the weights, and determining the minimum distance of the multiple distances; and determining the winning neuron of the output layer neuron based on the minimum distance.
[0117] For example, in the process of network learning and training, it is necessary to calculate the Euclidean distance d between the weight vector of each neuron and the input vector in the competition layer. j , and its calculation formula is:
[0118]
[0119] In the formula, the input vector X=(x1,x2,x3,...,x m ) T ,ω ij is the i neuron in the input layer and the j neuron in the competition layer W j The weights between them are calculated, and the neuron with the smallest distance is the winning neuron.
[0120] In the specific embodiment of the present disclosure and other possible embodiments, there are N types of faults corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve, and the number of winning neurons is N.
[0121] During the training process of the SOM neural network, the SOM neural network will continuously adjust the weights according to the Kohonen rule. The weights of the corrected output neuron j* and its "adjacent neurons" are calculated as follows:
[0122] Δω ij =ω ij (t+1)-ω ij (t) = η(t)(x i (t)-ω ij (t)).
[0123] In the formula, η is a constant and 0<η<1, which gradually decreases to 0 with time t;
[0124] or
[0125] Calculate the output value O k The expression is as follows:
[0126]
[0127] In the formula, f(*) is generally a 0~1 function or other nonlinear function.
[0128] Based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis types of the multiple neurons of the output layer, the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is determined to complete the fault diagnosis.
[0129] For example, the characteristic parameters of the dynamometer diagram are input into a preset classification model, and the preset classification model classifies the characteristic parameters of the dynamometer diagram by clustering method, determines the position of the classification result in the output layer, and presets the fault diagnosis type of the neuron at the position, and finally determines the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve, and completes the fault diagnosis.
[0130] Figure 4 The classification results of each neuron obtained after the SOM neural network training and learning according to the embodiment of the present disclosure are shown. Before the SOM neural network training, the weights of the SOM neural network are initialized, and the characteristic parameters of the standard dynamometer diagram obtained after preprocessing are input into the SOM neural network model for learning. After the learning is completed, the winning neurons in the competition layer are marked with the corresponding fault numbers, that is, each standard dynamometer diagram fault sample will output a category label, such as Figure 4 As shown in the figure, the neuron with value 1 is the winning neuron in the competition layer.
[0131] The data is input into the trained SOM neural network model for dynamometer fault diagnosis and identification. During the fault diagnosis and identification process, the weights are continuously adjusted according to the Kohonen rule, and the learning rate and topology structure are also updated accordingly.
[0132] When the convergence conditions are met and the number of system iterations reaches the preset value, the fault diagnosis ends, the dynamometer sample to be tested corresponds to an excited neuron, and the corresponding diagnosis result is output until the conditions are met to output the diagnosis result.
[0133] In short, the SOM neural network model is a two-dimensional topological structure, including two layers of networks: input layer and competition layer (output layer). The input neurons and output neurons are connected by weights. The number of neurons, learning rate, and number of iterations of the neural network can be set by yourself. The more neurons there are, the more detailed the classification results are. The network is initialized by using random numbers to set the initial values of the weights between the input layer and the competition layer, and assigning a smaller weight to the connection weights from the input neurons to the output neurons.
[0134] The execution subject of the fault diagnosis method may be any processing device, for example, the fault diagnosis method may be executed by a terminal device or a server or other processing device, wherein the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the fault diagnosis method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0135] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0136] The present disclosure also proposes a fault diagnosis device, which includes: an acquisition unit, used to acquire a two-dimensional image of a load-displacement curve; a first determination unit, used to determine a plurality of moment characteristic sequences of invariant moments based on the two-dimensional image of the load-displacement curve; a second determination unit, used to determine characteristic parameters of an indicator diagram based on the plurality of moment characteristic sequences of invariant moments; and a diagnosis unit, used to complete fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model.
[0137] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0138] The embodiment of the present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0139] The embodiment of the present disclosure also provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method. The electronic device can be provided as a terminal, a server or other forms of equipment.
[0140] The embodiment of the present disclosure selects 12 different working condition dynamometer diagram sample data including suspension point displacement and load from a field test in an oil field, with a total of 1960 sets of data, 1220 sets of training samples, and 740 sets of test samples.
[0141] The pumping unit indicator diagram data is obtained through the crank position sensor and load sensor, and the measured data is uploaded to the database through the remote RTU module.
[0142] The suspension point displacement-load data of 1220 sets of dynamometer diagrams provided on site were preprocessed, and the characteristic parameters of the pumping unit dynamometer diagram (two-dimensional image of load-displacement curve) were extracted using the composite method of invariant moments and Fourier descriptors. First, the moment feature sequences of 7 invariant moments of the two-dimensional image of the load-displacement curve were calculated, and then the Fourier transform of the feature sequence was performed using the Fourier descriptor method. After Gaussian normalization, the final characteristic parameters of the dynamometer diagram were calculated.
[0143] The average calculation results of characteristic parameters of standard dynamometer diagrams (including normal dynamometer diagrams) of 12 working conditions of the pumping unit are as follows:
[0144] Table 1 Characteristic parameters of standard dynamometer diagrams for 12 common pumping unit operating conditions
[0145]
[0146] Through the self-organizing feature mapping network, the neural network model adopts a two-dimensional topological structure, including two layers of networks: input layer and competition layer (output layer). The input neurons and output neurons are connected by weights. The learning step size of the classification stage is 1000, the learning rate of the classification stage is 0.9, the neighborhood distance of the tuning stage is 1, the learning rate of the tuning stage is 0.02, and the competition layer is 8×8=64 neurons.
[0147] The standard dynamometer sample of each working condition is learned, and the number of network training is 10, 30, 50, 100, 200, 500 and 1000 times respectively. After the learning is completed, the neurons around the adjacent neurons compete for calculation, and the neuron with the maximum output is marked with the fault mark.
[0148] The characteristic parameters of the dynamometer diagram to be tested are extracted and input into the trained SOM neural network for dynamometer diagram fault diagnosis and identification. This dynamometer diagram to be tested takes five working conditions as an example, and the corresponding characteristic parameter values are extracted as follows:
[0149] Table 2 Characteristic parameter values of the dynamometer diagram to be tested
[0150]
[0151]
[0152] When the convergence condition is met, the system runs for a maximum of 1000 iterations and outputs the visual diagnosis results. The established SOM neural network topology is shown in Figure 3 , is an 8×8 hexagonal structure function, and there are 8×8=64 neurons in the competition layer. The classification of each neuron in the competition calculation result is as follows Figure 4 As shown in Figure 3, dark neurons represent neurons that win the competition. The classification results of the SOM neural network under different training times are shown in Table 3.
[0153] Table 3 Classification results of SOM neural network under different training times
[0154]
[0155] Table 4 Characteristic parameter values of the dynamometer diagram to be tested
[0156]
[0157] Specifically, when the number of training steps is 1000, the clustering results (classification results) corresponding to T1-T12 are:
[0158] 36 24 8 48 30 55 59 33 64 53 5 1
[0159] Combination Figure 4 To explain, Figure 4 The neurons whose value is 1 represent different preset fault diagnosis types, namely, 12 preset fault diagnosis types. The method for determining the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis type of the winning neuron among the multiple neurons in the output layer specifically includes: obtaining the structure of the output layer; determining the positions of the multiple neurons in the output layer according to the structure of the output layer; wherein the winning neuron among the multiple neurons has the preset fault diagnosis type; determining the position of the neuron corresponding to the value of the clustering result (classification result); if the neuron at the position is the winning neuron, then the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is the preset fault diagnosis type of the winning neuron.
[0160] Among them, the method for determining the positions of multiple neurons in the output layer according to the structure of the output layer includes: determining the structure of the output layer; and numbering the multiple neurons in the output layer according to the structure of the output layer to obtain the positions of the multiple neurons in the output layer.
[0161] Among them, the method for numbering multiple neurons of the output layer according to the structure of the output layer to obtain the positions of multiple neurons of the output layer includes: determining the first maximum value of the output layer in the Y-axis direction and the second maximum value in the X-axis direction according to the structure of the output layer; initializing the first loop variable in the Y-axis direction obtained to 1 and initializing the second loop variable in the X-axis direction obtained to 1; if the first loop variable is less than or equal to the first maximum value, and the second loop variable is less than or equal to the second maximum value, then numbering the multiple neurons of the output layer from 1 to the total number of neurons in the X-axis direction and the Y-axis direction in sequence to obtain the positions of the multiple neurons of the output layer; if the first loop variable is greater than the first maximum value, or the second loop variable is greater than the second maximum value, it means that the positions of the multiple neurons of the output layer have been completed, and the first loop variable and the second loop variable are cleared.
[0162] For example, in the present disclosure, the structure of the output layer is 8×8, the first maximum value of the output layer in the Y-axis direction and the second maximum value in the X-axis direction are both 8, and the total number of neurons is 64. First, the 8 neurons in the first layer of the output layer are numbered to obtain neurons 1#-8#; then, the 8 neurons in the second layer of the output layer are numbered to obtain neurons 9#-16#; and so on, finally, the 8 neurons in the 8th layer of the output layer are numbered to obtain neurons 57#-64#.
[0163] and then, Figure 4 The neurons at the following positions on are winning neurons, and the fault diagnosis types are preset respectively;
[0164] 36 24 8 48 30 55 59 33 64 53 5 1
[0165] Obviously, the winning neurons in the plurality of neurons in the output layer described above are respectively preset with fault diagnosis types, for example Figure 4 The dark neurons (with a value of 1) represent neurons that win the competition, and the winning neurons have preset fault diagnosis types. In Table 4, the corresponding classification output value (clustering result or classification result) is 5, and the position of the neuron corresponding to the value 5 of the clustering result (classification result) is the winning neuron, and its preset winning neuron is insufficient fluid supply.
[0166] It can be seen from Table 3 that with the increase of training steps, the clustering results become more refined. When the training steps are 200 times, each sample is divided into one category. When the training steps are 500 or 1000, the classification results are also divided into one category. Therefore, increasing the number of training steps is obviously meaningless. Table 4 shows the characteristic parameter values of the dynamometer diagram to be tested, and the corresponding classification output value is the corresponding diagnosis result. After verification of the test samples, the accuracy of using the SOM neural network to diagnose 12 different working conditions dynamometer diagrams is above 90%, and each operation time is only 9s.
[0167] Figure 5 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
[0168] Reference Figure 5 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0169] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0170] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0171] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0172] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0173] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0174] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0175] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0176] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0177] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0178] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above method.
[0179] Figure 6 1 is a block diagram of an electronic device 1900 according to an exemplary embodiment. For example, the electronic device 1900 may be provided as a server. Figure 6, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0180] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0181] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0182] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0183] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0184] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0185] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0186] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0187] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0188] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0189] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0190] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A fault diagnosis method, characterized in that: include: Obtain a two-dimensional image of the load-displacement curve; Determine a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image; Determine the characteristic parameters of the dynamometer diagram according to the moment characteristic sequences of the multiple invariant moments; wherein, the method for determining the characteristic parameters of the dynamometer diagram according to the moment characteristic sequences of the multiple invariant moments comprises: obtaining Fourier descriptors; performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain the characteristic parameters of the dynamometer diagram; wherein, the method for performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain the characteristic parameters of the dynamometer diagram comprises: performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain the moment characteristic sequences of the multiple invariant moments in the frequency domain; performing Gaussian normalization on the moment characteristic sequences of the multiple invariant moments in the frequency domain to obtain the characteristic parameters of the dynamometer diagram; Fault diagnosis is completed based on the characteristic parameters of the dynamometer diagram and a preset classification model; wherein the method for completing fault diagnosis based on the characteristic parameters of the dynamometer diagram and a preset classification model comprises: obtaining the structure of the output layer of the preset classification model; determining the positions of multiple neurons of the output layer according to the structure of the output layer; wherein a winning neuron among the multiple neurons presets a fault diagnosis type; determining the position of the neuron corresponding to the classification result output by the preset classification model; if the neuron at the position is the winning neuron, the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is the preset fault diagnosis type of the winning neuron; wherein the method for determining the positions of multiple neurons of the output layer according to the structure of the output layer comprises: numbering the multiple neurons of the output layer respectively according to the structure of the output layer, and obtaining the positions of the multiple neurons of the output layer ; Wherein, the method for numbering the multiple neurons of the output layer according to the structure of the output layer to obtain the positions of the multiple neurons of the output layer includes: determining the first maximum value of the output layer in the Y-axis direction and the second maximum value in the X-axis direction according to the structure of the output layer; initializing the first loop variable in the Y-axis direction obtained to 1 and initializing the second loop variable in the X-axis direction obtained to 1; if the first loop variable is less than or equal to the first maximum value, and the second loop variable is less than or equal to the second maximum value, then numbering the multiple neurons of the output layer from 1 to the total number of neurons in the X-axis direction and the Y-axis direction in sequence to obtain the positions of the multiple neurons of the output layer; if the first loop variable is greater than the first maximum value, or the second loop variable is greater than the second maximum value, clearing the first loop variable and the second loop variable.
2. The method according to claim 1, characterized in that The method for determining a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image comprises: Determine the multi-order moments corresponding to the two-dimensional image of the load-displacement curve according to the two-dimensional image of the load-displacement curve; Determine a first center of gravity in the horizontal direction and a second center of gravity in the vertical direction of the two-dimensional image of the load-displacement curve according to the multi-order moment; Determine a multi-order central moment corresponding to the two-dimensional image of the load-displacement curve according to the two-dimensional image of the load-displacement curve, the first center of gravity, and the second center of gravity; A moment feature sequence of the plurality of invariant moments is determined based on the central moment.
3. The method according to claim 2, characterized in that The method for determining the moment feature sequence of the plurality of invariant moments based on the central moment comprises: Normalizing the central moment to obtain a normalized central moment; According to the normalized central moment, a moment characteristic sequence of multiple invariant moments of the load-displacement curve two-dimensional image that is stable in orientation, position and scale is determined.
4. The method according to any one of claims 1 to 3, characterized in that: Before obtaining the Fourier descriptor, determining the Fourier descriptor to be obtained, the method includes: Take a closed curve on the two-dimensional image of the load-displacement curve, and take any point on the curve as the starting point; Taking a plurality of points in sequence along a clockwise or counterclockwise direction to obtain coordinates representing the closed curve; obtaining a complex variable based on the coordinates; Performing Fourier transform on the complex variable to obtain a Fourier descriptor.
5. The method according to any one of claims 1 to 3, characterized in that: The method of performing Fourier transform on the moment characteristic sequences of the plurality of invariant moments according to the Fourier descriptors to obtain characteristic parameters of the dynamometer diagram comprises: Normalizing the Fourier descriptor to obtain a normalized Fourier descriptor; Performing Fourier transform on the plurality of moment feature sequences of invariant moments according to the normalized Fourier descriptors respectively to obtain a plurality of moment feature sequences of invariant moments in the frequency domain; Gaussian normalization is performed on the moment characteristic sequences of the multiple frequency domain invariant moments to obtain characteristic parameters of the dynamometer diagram.
6. The method according to claim 4, characterized in that The method of performing Fourier transform on the moment characteristic sequences of the plurality of invariant moments according to the Fourier descriptors to obtain characteristic parameters of the dynamometer diagram comprises: Normalizing the Fourier descriptor to obtain a normalized Fourier descriptor; Performing Fourier transform on the plurality of moment feature sequences of invariant moments according to the normalized Fourier descriptors respectively to obtain a plurality of moment feature sequences of invariant moments in the frequency domain; Gaussian normalization is performed on the moment characteristic sequences of the multiple frequency domain invariant moments to obtain characteristic parameters of the dynamometer diagram.
7. The method according to any one of claims 1 to 3 and 6, characterized in that: The method for completing fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model includes: Obtaining a preset classification model, wherein the preset classification model is a neural network model, and the neural network model at least includes: an input layer and an output layer; The plurality of neurons in the output layer have preset fault diagnosis types; Based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis types of the plurality of neurons, the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is determined to complete the fault diagnosis.
8. The method according to claim 4, characterized in that The method for completing fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model includes: Obtaining a preset classification model, wherein the preset classification model is a neural network model, and the neural network model at least includes: an input layer and an output layer; The plurality of neurons in the output layer have preset fault diagnosis types; Based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis types of the plurality of neurons, the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is determined to complete the fault diagnosis.
9. The method according to claim 5, characterized in that The method for completing fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model includes: Obtaining a preset classification model, wherein the preset classification model is a neural network model, and the neural network model at least includes: an input layer and an output layer; The plurality of neurons in the output layer have preset fault diagnosis types; Based on the characteristic parameters of the dynamometer diagram of the input layer and the preset fault diagnosis types of the plurality of neurons, the fault type corresponding to the characteristic parameters of the dynamometer diagram or the two-dimensional image of the load-displacement curve is determined to complete the fault diagnosis.
10. The method according to any one of claims 1-3, 6, 8, and 9, characterized in that: Before acquiring the load-displacement curve two-dimensional image, the load-displacement curve two-dimensional image is determined, and the determination method includes: Obtain the pumping unit indicator diagram data through the crank position sensor and the load sensor; The load-displacement curve two-dimensional image is determined based on the pumping unit indicator diagram data.
11. The method according to claim 4, characterized in that Before acquiring the load-displacement curve two-dimensional image, the load-displacement curve two-dimensional image is determined, and the determination method includes: Obtain the pumping unit indicator diagram data through the crank position sensor and the load sensor; The load-displacement curve two-dimensional image is determined based on the pumping unit indicator diagram data.
12. The method according to claim 5, characterized in that Before acquiring the load-displacement curve two-dimensional image, the load-displacement curve two-dimensional image is determined, and the determination method includes: Obtain the pumping unit indicator diagram data through the crank position sensor and the load sensor; The load-displacement curve two-dimensional image is determined based on the pumping unit indicator diagram data.
13. The method according to claim 7, characterized in that Before acquiring the load-displacement curve two-dimensional image, the load-displacement curve two-dimensional image is determined, and the determination method includes: Obtain the pumping unit indicator diagram data through the crank position sensor and the load sensor; The load-displacement curve two-dimensional image is determined based on the pumping unit indicator diagram data.
14. A fault diagnosis device, characterized in that: include: An acquisition unit, used for acquiring a two-dimensional image of a load-displacement curve; A first determining unit, configured to determine a plurality of moment characteristic sequences of invariant moments according to the load-displacement curve two-dimensional image; A second determination unit is used to determine the characteristic parameters of the indicator diagram according to the moment characteristic sequences of the multiple invariant moments; wherein, the determining the characteristic parameters of the indicator diagram according to the moment characteristic sequences of the multiple invariant moments comprises: obtaining Fourier descriptors; performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain the characteristic parameters of the indicator diagram; wherein, performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain the characteristic parameters of the indicator diagram comprises: performing Fourier transform on the moment characteristic sequences of the multiple invariant moments according to the Fourier descriptors respectively to obtain the moment characteristic sequences of the multiple invariant moments in the frequency domain; performing Gaussian normalization on the moment characteristic sequences of the multiple invariant moments in the frequency domain to obtain the characteristic parameters of the indicator diagram; A diagnostic unit, used to complete fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model; wherein the method for completing fault diagnosis based on the characteristic parameters of the indicator diagram and a preset classification model comprises: obtaining the structure of the output layer of the preset classification model; determining the positions of multiple neurons of the output layer according to the structure of the output layer; wherein a winning neuron among the multiple neurons presets a fault diagnosis type; determining the position of the neuron corresponding to the classification result output by the preset classification model; if the neuron at the position is the winning neuron, the fault type corresponding to the characteristic parameters of the indicator diagram or the two-dimensional image of the load-displacement curve is the preset fault diagnosis type of the winning neuron; wherein the method for determining the positions of multiple neurons of the output layer according to the structure of the output layer comprises: numbering the multiple neurons of the output layer according to the structure of the output layer, respectively, to obtain the multiple neurons of the output layer The method of obtaining the positions of the multiple neurons of the output layer by numbering the multiple neurons of the output layer according to the structure of the output layer comprises: determining the first maximum value of the output layer in the Y-axis direction and the second maximum value in the X-axis direction according to the structure of the output layer; initializing the first loop variable in the Y-axis direction obtained to 1 and initializing the second loop variable in the X-axis direction obtained to 1; if the first loop variable is less than or equal to the first maximum value, and the second loop variable is less than or equal to the second maximum value, then numbering the multiple neurons of the output layer from 1 to the total number of multiple neurons along the X-axis direction and the Y-axis direction in sequence to obtain the positions of the multiple neurons of the output layer; if the first loop variable is greater than the first maximum value, or the second loop variable is greater than the second maximum value, clearing the first loop variable and the second loop variable to zero.
15. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the fault diagnosis method described in any one of claims 1 to 13.
16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the fault diagnosis method described in any one of claims 1 to 13 is implemented.
