Electric valve fault diagnosis method, device, equipment and medium
By obtaining the vibration signal of the electric valve drive motor, using the backward gradual regression method and the PELT algorithm to segment the signals, combined with the improved particle swarm algorithm to optimize the vector machine model parameters, the real-time problem of electric valve fault diagnosis is solved, the diagnostic efficiency and accuracy are improved, and the safety risks are reduced.
Patent Information
- Application Number
- CN202311840791.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
AI Technical Summary
In the prior art, the fault diagnosis of electric valves lacks real-time performance, resulting in high risk of safety accidents, and it takes a long time to identify and judge faults.
By obtaining the vibration signal of the driving motor of the electric valve, the backward gradual regression method is used to screen the signal characteristics, and the vibration signal is divided by PELT algorithm, energy entropy is calculated, and the parameters of the vector machine model are optimized by the improved particle swarm algorithm to achieve the fault diagnosis of the electric valve.
It improves the efficiency and accuracy of fault diagnosis of electric valves, reduces the probability of safety accidents, and enhances the generalization ability of fault diagnosis models.
Smart Images

Figure CN120234679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and more specifically, it relates to a method, device, equipment and medium for fault diagnosis of an electric valve. Background Art
[0002] With the expansion of the scale and the increase in complexity of modern industrial processes, the safety of industrial equipment has become the focus of high attention. As the key to ensuring the safe and continuous production of industrial processes, the fault diagnosis of industrial equipment also needs to be carried out in real time. For example, in a modern industrial process, the operating state of an electric actuator directly affects the working performance of the entire electric valve. Therefore, it is of great significance to carry out real-time fault diagnosis on the electric valve actuator.
[0003] However, in daily maintenance, when an electric valve fails, it takes a long time to analyze the problem and check item by item for the identification and judgment of the fault, lacking real-time performance, resulting in the problem of delayed fault diagnosis and being prone to causing safety accidents. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, device, equipment and medium for fault diagnosis of an electric valve, which can improve the efficiency and accuracy of electric valve fault diagnosis, thereby reducing the probability of safety accidents occurring in the electric valve.
[0005] The above technical purpose of the present invention is achieved through the following technical solutions:
[0006] In the first aspect of the present invention, a method for fault diagnosis of an electric valve is provided. The method includes:
[0007] Obtain the vibration signal of the drive motor collected by the electric actuator of the electric valve;
[0008] Use the backward stepwise regression method to screen the vibration signal to extract the signal characteristics of the drive motor in different operating states;
[0009] Based on the signal characteristics, use the PELT algorithm to segment the vibration signals in different operating states to obtain the segmentation results of the amplitude change of the vibration signals of the electric valve in different operating states, where the segmentation results refer to the amplitude fluctuation signals of each time frequency band of the vibration signals;
[0010] Calculate the energy entropy of the amplitude fluctuation signals of each time frequency band;
[0011] Create a training set using the energy entropy, and use the training set and the improved particle swarm algorithm to optimize the penalty factor and the parameters of the kernel function of the support vector machine model to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function;
[0012] Use the data to be detected during the operation of the electric actuator of the electric valve as the input data of the vector machine model after training to diagnose the operating state of the electric valve.
[0013] In one implementation, the different operating states include three operating states: normal valve operation, unbalanced phase fault of the drive motor, and damaged valve packing.
[0014] In one implementation, the signal features include amplitude threshold features and signal shape features.
[0015] In one implementation, the improved particle swarm optimization algorithm includes:
[0016] In each iteration of the particle, calculate the distance between the particle and the remaining particles in the population one by one. If the distance ratio between any particle and the remaining particles is less than the ratio threshold, then update the velocity and position of the particle according to the historical optimal value of the particle, the optimal value of the particles in the adjacent area of the particle, and the global optimal value of the population; and
[0017] Introduce a control coefficient to adjust the inertia weight value of the particle swarm optimization algorithm.
[0018] In one implementation, the update formula for velocity is: v ij (t + 1) = ω(t) × v ij (t) + c1 × rand() × (p bj (t) - x ij (t)) + c2 × rand() × (g bj (t) - x ij (t)) + c3 × rand() × (l bj (t) - x ij (t));
[0019] The update formula for position is: x ij (t + 1) = x ij (t) + v ij (t + 1); where t is the number of iterations, ω is the inertia weight value, c1, c2, and c3 are all learning factors, rand() is a random number uniformly distributed in the interval [0, 1], p bj (t) is the historical optimal value of the particle, l bj (t) is the optimal value of the particles in the adjacent area of the particle, g bj (t) is the global optimal value of the population, v ij (t) is the velocity vector of the i-th particle in the j-th dimensional search space, x ij (t) is the position vector of the i-th particle in the j-th dimensional search space.
[0020] In one implementation, the calculation formula for the inertia weight value is: Among them, ω max is the maximum inertia weight value, ω min is the minimum inertia weight value, e is the control coefficient, and t is the number of iterations.
[0021] In one implementation, if the distance ratio between any particle and the remaining particles is greater than the ratio threshold, the velocity and position of the particle are updated with the velocity and position update strategy of the standard particle swarm algorithm.
[0022] In a second aspect of the present invention, an electric valve fault diagnosis device is provided. The device includes:
[0023] A signal acquisition module, configured to acquire the vibration signal of the drive motor collected by the electric actuator of the electric valve;
[0024] A feature extraction module, configured to screen the vibration signal by using the backward stepwise regression method to extract the signal features of the drive motor in different operating states;
[0025] A feature segmentation module, configured to segment the vibration signals in different operating states by using the PELT algorithm based on the signal features to obtain the segmentation result of the amplitude change of the vibration signal of the electric valve in different operating states, where the segmentation result refers to the amplitude fluctuation signal of each time frequency band of the vibration signal;
[0026] An energy entropy calculation module, configured to calculate the energy entropy of the amplitude fluctuation signal of each time frequency band;
[0027] A parameter optimization module, configured to create a training set by using the energy entropy, and optimize the penalty factor and kernel function parameters of the support vector machine model by using the training set and the improved particle swarm algorithm to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function;
[0028] A fault diagnosis module, configured to use the data to be detected during the operation of the electric actuator of the electric valve as the input data of the trained support vector machine model to diagnose the operating state of the electric valve.
[0029] In a third aspect of the present invention, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for diagnosing faults of an electric valve provided in the first aspect of the present invention is implemented.
[0030] In a fourth aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for diagnosing faults of an electric valve provided in the first aspect of the present invention is implemented.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] In a method for diagnosing faults of an electric valve provided by the present invention, by acquiring the vibration signals of the driving motor during the opening and closing of an electric actuator in different operating states, the vibration signals are screened by the backward stepwise regression method to extract the signal characteristics of the driving motor in different operating states. Then, based on these signal characteristics, the PELT algorithm is used to segment the vibration signals in different operating states, so as to segment the amplitude fluctuation signals of each time frequency band of the vibration signals of the electric valve in different operating states. Then, the energy entropy of the amplitude fluctuation signals of each time frequency band is calculated. Using the energy entropy as the training parameter, it is possible to effectively distinguish between the normal and faulty operating states of the valve. Further, based on the training set and the improved particle swarm optimization algorithm, the penalty factor of the support vector machine model and the parameters of the kernel function are optimized, solving the defects of difficult determination of the parameters of the support vector machine model and the easy entrapment of the particle swarm optimization algorithm in local optimal values, improving the generalization ability of the fault diagnosis model, and ultimately improving the efficiency and accuracy of the electric valve fault diagnosis and reducing the probability of safety accidents of the electric valve. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, form a part of this application, and do not limit the embodiments of the present invention. In the drawings:
[0034] Figure 1 Shows a schematic flow chart of a method for diagnosing faults of an electric valve provided by an embodiment of the present invention;
[0035] Figure 2 Shows a schematic block diagram of a device for diagnosing faults of an electric valve provided by an embodiment of the present invention;
[0036] Figure 3 Shows a schematic structural diagram of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the embodiments and the drawings. The illustrative embodiments and descriptions thereof of the present invention are only used to explain the present invention and do not limit the present invention.
[0038] It should be noted that the term "comprising" or "may comprise" that can be used in various embodiments of the present application indicates the presence of the claimed functions, operations or elements, and does not limit the addition of one or more functions, operations or elements. In addition, as used in various embodiments of the present application, the terms "comprising", "having" and their cognates are only intended to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0039] In addition, terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more, unless otherwise specifically defined.
[0040] First, the technical terms involved in the embodiments of the present application will be introduced.
[0041] An electric valve is a valve that uses an electric actuator to control the valve and can adjust the flow rate of the pipeline medium. The electric valve can be divided into two parts: the upper part is the electric actuator, and the lower part is the valve. The electric valve is a high-end product among automatic control valves. It can not only achieve the on-off function, but also the regulating electric valve can achieve the valve position regulation function.
[0042] The support vector machine (SVM) is a binary classification model. Its basic algorithm principle is to transform the linear classifier with the largest margin in the feature space into a non-linear classifier through the regularized hinge loss function and kernel trick. The decision boundary of the SVM is the maximum margin hyperplane solved for the learning samples. At the same time, the SVM can also be used for the segmentation of linearly separable data. By using the Lagrange multiplier method and the gradient descent method, the data is segmented into multiple support vectors, and these support vectors are used to predict unknown labels.
[0043] The Particle Swarm Optimization (PSO) algorithm is a population-based stochastic optimization technique proposed by computer scientists James Kennedy and Russell Eberhart in 1995. This algorithm initially originated from the simulation and observation of the collective behaviors of bird flocks and fish schools. PSO mimics the swarming behaviors of insects, herds, bird flocks, and fish schools, where these groups search for food in a cooperative manner, and each member in the group continuously changes its search pattern by learning from its own experience and the experiences of other members. Additionally, PSO is also an efficient optimization algorithm and is widely used to solve high-dimensional optimization problems.
[0044] Please refer to Figure 1 , Figure 1 which shows a schematic flowchart of a method for diagnosing faults in an electric valve provided by an embodiment of the present invention. As Figure 1 shown, as Figure 1 shown, the method includes:
[0045] S110, obtaining the vibration signal of the drive motor collected by the electric actuator of the electric valve.
[0046] In the embodiments of the present disclosure, the acquisition of the vibration signal is a well-known technique in the technical field, so this embodiment will not provide redundant elaboration.
[0047] S120, using the backward stepwise regression method to screen the vibration signal to extract the signal characteristics of the drive motor under different operating states.
[0048] In the embodiments of the present disclosure, the different operating states include three operating states: normal valve operation, drive motor phase imbalance fault, and valve packing damage. In the embodiments of the present disclosure, the signal characteristics include amplitude threshold characteristics and signal shape characteristics. Among them, the amplitude threshold characteristic is the core anchor quantity for segmenting different operating states and is an important index for segmentation. The signal shape characteristics include the fluctuation amplitude, trend, and intensity of the signal, etc., and these signal characteristics provide an important basis for subsequent segmentation.
[0049] The backward stepwise regression method is a method used to screen variables in regression analysis. Its basic practices include forward selection and backward selection. Forward selection is to introduce independent variables into the model one by one. After introducing an independent variable, it is necessary to check whether the introduction of this variable causes a significant change in the model (F-test). If there is a significant change, then this variable is introduced into the model; otherwise, this variable is ignored until all variables have been considered. The backward selection method is the opposite of forward selection. In this method, all variables are first put into the model, and then an attempt is made to remove a certain variable and check whether there is a significant change in the entire model after removal (F-test). If there is no significant change, it is removed; if there is, it is retained until all factors that have a significant impact on the model are left.
[0050] S130, based on the signal characteristics, use the PELT algorithm to segment the vibration signals in different operating states to obtain the segmentation results of the amplitude changes of the vibration signals of the electric valve in different operating states, where the segmentation results refer to the amplitude fluctuation signals of each time frequency band of the vibration signals.
[0051] In the embodiments of the present disclosure, the PELT algorithm is used to perform inflection point detection, mutation point detection, and trend detection on the vibration signals in different operating states respectively to obtain the detection results. Based on the inflection points, mutation points, and trends that appear in the time series of the detection results, and combined with the amplitude threshold characteristics and signal shape characteristics for segmentation, the segmentation results of the amplitude changes of the vibration signals of the electric valve in different operating states are obtained. The PELT algorithm is a method for time series analysis, and its main function is to detect mutation points in the data. The main working principle of this algorithm is to segment the entire time series into multiple sub-segments. The data points within each sub-segment have a high degree of similarity, while there are mutation points at the junctions between different sub-segments.
[0052] S140, calculate the energy entropy of the amplitude fluctuation signals of each time frequency band.
[0053] In the embodiments of the present disclosure, entropy represents the degree of complexity and chaos of the system. The concept of entropy is extended from the physical field. Information entropy, also called Shannon entropy, is used to measure the amount of information in the system. The amount of information in a system reflects the degree of chaos of the system. The more chaotic the system, the higher the information entropy value. In vibration signals, the magnitude of the entropy value can reflect the magnitude of the signal amplitude fluctuation, and the amplitude is an embodiment of energy. Therefore, the entropy value can be used for fault detection. The normal and fault state samples can be relatively accurately distinguished through the energy entropy value. In order to obtain a more obvious detection effect, in this embodiment, the energy entropy values of each time frequency band in each operating state are calculated respectively.
[0054] S150. Create a training set using energy entropy, and use the training set and an improved particle swarm optimization algorithm to optimize the penalty factor and kernel function parameters of the support vector machine model, so as to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function.
[0055] In the embodiments of the present disclosure, the standard particle swarm optimization algorithm PSO belongs to a global algorithm because its velocity update is based on its own historical optimal value and the global optimal value of the particle population. The velocity update of the local PSO is based on its own historical optimal value and the optimal value of the particles within the neighborhood. The global PSO algorithm converges relatively fast, but it is easy to fall into the local optimum first, while the local PSO algorithm converges slower than the global PSO algorithm, but it is not easy to fall into the local optimum first. Therefore, an improved particle swarm optimization algorithm (IPSO) is constructed by integrating the global PSO algorithm and the local PSO algorithm to solve problems such as the standard PSO algorithm being prone to falling into the local optimum and tending to be homogenized, and to enhance the generalization performance of the support vector machine (SVM) model.
[0056] Therefore, in this embodiment, an improved particle swarm optimization algorithm is used to optimize the penalty factor and kernel function parameters of the support vector machine model, so as to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function. The penalty factor and the kernel function are parameters well-known to those skilled in the art, so they will not be elaborated in this embodiment.
[0057] In some embodiments, the improved particle swarm optimization algorithm includes: in each iteration process of the particle, calculate the distance between the particle and the remaining particles in the population one by one. If the distance ratio between any particle and the remaining particles is less than the ratio threshold, then update the velocity and position of the particle according to the historical optimal value of the particle, the optimal value of the particles in the adjacent area of the particle, and the global optimal value of the population; and introduce a control coefficient to adjust the inertia weight value of the particle swarm optimization algorithm.
[0058] Further, the velocity update formula is: v ij (t + 1) = ω(t) × v ij (t) + c1 × rand() × (p bj (t) - xijt + c2 × rand() × gbjt - xijt + c3 × rand() × lbjt - xijt (1); the position update formula is: x ij (t + 1) = x ij (t) + v ij (t + 1) (2); where t is the number of iterations, ω is the inertia weight value, c1, c2, and c3 are all learning factors, rand() is a random number uniformly distributed in the interval [0, 1], p bj (t) is the historical optimal value of the particle, l bj (t) is the optimal value of the particles in the adjacent area of the particle, g bj (t) is the global optimal value of the population, vij (t) is the velocity vector of the i-th particle in the j-th dimensional search space, and x ij (t) is the position vector of the i-th particle in the j-th dimensional search space.
[0059] Specifically, in this embodiment, based on the integration of the global PSO algorithm and the local PSO algorithm, the standard PSO algorithm is improved. During iteration, the distance between a particle and other particles in the population is calculated. If the ratio of their distance to the maximum distance is less than the threshold, it indicates that the particle belongs to the neighborhood range, and then the improved algorithm is used to update the velocity and position of the particle; if the distance ratio of the particle to the other particles does not meet the above situation, the standard PSO algorithm is adopted. The specific improvement strategy is as follows: If the distance ratio between the current particle and other particles is less than the threshold, then let the particle update its velocity according to the following three factors: the historical best value p bj (t) of the particle itself; the best value l bj (t) of the particles in the adjacent area of the particle; the global best value g bj (t) of the population.
[0060] In each iteration, the distance between a particle and the other particles is calculated one by one. Let the distance between any two particles a and b be d ab , and the maximum distance be d max , and the calculated ratio be d ab / d max . The ratio threshold changes according to the number of iterations, and its expression is: where t is the number of iterations. When the ratio threshold is less than 0.9, if d ab / d max <ξ, it is considered that particle b belongs to the neighborhood of particle a, and at this time, the velocity and position of the particle are updated according to formulas (1) and (2) described in the above embodiment.
[0061] If d ab / d max >ξ, the velocity and position of the particle are updated according to the velocity and position update of the standard particle swarm algorithm. Here, it can be understood that the update method of the velocity and position of the standard particle algorithm is common knowledge for those skilled in the art, so this embodiment will not be elaborated.
[0062] The standard PSO algorithm uses the method of linearly decreasing the weight ω to gradually reduce the search step size and make the iteration gradually converge to the extreme point. The disadvantage of this method is that the algorithm is prone to falling into local extreme points, increasing the difficulty of searching for the global optimal value. To overcome the above disadvantages, the weight ω is now decreased in an S-shaped function to ensure that the population searches at a faster speed in the initial stage of the search. The search speed drops rapidly in the middle stage, making it easier for the particles to converge to the global optimal value. In the later stage, the particles continue to converge at a certain speed until the final convergence. The calculation formula for the inertia weight value is: where ω max is the maximum inertia weight value, ω min is the minimum inertia weight value, e is the control coefficient, and t is the number of iterations.
[0063] Different combinations of parameter values have a great impact on the performance of the support vector machine model. The performance of the support vector machine model changes with the change of parameter values. Good parameters can improve the generalization performance of the support vector machine model and increase the classification accuracy of the model for unknown samples. However, it is very difficult to determine the support vector machine parameters through experience or calculation formulas. Therefore, the improved particle swarm optimization algorithm of this application embodiment is used to optimize the parameters of the support vector machine model, so as to determine the optimal values of the support vector machine model in terms of the penalty factor and the kernel function.
[0064] Specifically, for the optimization of the penalty factor and the kernel function of the support vector machine model, the following steps are included:
[0065] Step 1: Take the parameters to be optimized in the support vector machine model as the values of each element of the particle position vector, and initialize the parameters of the support vector machine model, including the parameter Y of the RBF kernel function and the penalty factor C. Set the parameters of the improved particle swarm optimization algorithm, such as the learning factor, the number of iterations, and the population size.
[0066] Step 2: Initialize the position of the particle individual extreme value, the corresponding extreme value, the global extreme value position, and the global extreme value corresponding to the global extreme value position.
[0067] Step 3: Calculate the fitness values of all particles.
[0068] Step 4: Compare the position, the corresponding extreme value, the global extreme value position, and the global extreme value.
[0069] Step 5: Update the speed and position of the particles, and make the speed and position within the limited range.
[0070] Step 6: If the number of iterations or the cut-off accuracy is reached, end the iteration; otherwise, return to Step 2.
[0071] S160: Take the data to be detected during the operation of the electric actuator of the electric valve as the input data of the support vector machine model after training, and diagnose the operation state of the electric valve.
[0072] In this embodiment, it should be noted that for the trained support vector machine model, its classification performance also needs to be tested. Therefore, this embodiment can be tested through a test set created by energy entropy. The output result is compared with the label of the true classification, and the classification accuracy is calculated to obtain the performance of the model. For a model with a relatively high accuracy rate, the data to be detected during the operation of the electric actuator of the electric valve can be used as the input data of the trained support vector machine model to diagnose the operating state of the electric valve.
[0073] In some embodiments, if the distance ratio between any one particle and the remaining particles is greater than the ratio threshold, the velocity and position of the particle are updated using the update strategy of the velocity and position of the standard particle swarm optimization algorithm.
[0074] In this embodiment, since the number of iterations is more than once, the ratio calculated in each iteration is not less than the ratio threshold. Therefore, if the distance ratio between any one particle and the remaining particles is greater than the ratio threshold, the velocity and position of the particle are updated using the update strategy of the velocity and position of the standard particle swarm optimization algorithm.
[0075] Please refer to Figure 2 , Figure 2 which shows the principle block diagram of a fault diagnosis device for an electric valve provided by an embodiment of the present invention. As Figure 2 shown, the device includes:
[0076] A signal acquisition module 210, configured to acquire the vibration signal of the drive motor collected by the electric actuator of the electric valve;
[0077] A feature extraction module 220, configured to screen the vibration signal by using the backward stepwise regression method to extract the signal features of the drive motor in different operating states;
[0078] A feature segmentation module 230, configured to use the PELT algorithm to segment the vibration signals in different operating states based on the signal features to obtain the segmentation result of the amplitude change of the vibration signal of the electric valve in different operating states, where the segmentation result refers to the amplitude fluctuation signal of each time frequency band of the vibration signal;
[0079] An energy entropy calculation module 240, configured to calculate the energy entropy of the amplitude fluctuation signal of each time frequency band;
[0080] A parameter optimization module 250, configured to create a training set using energy entropy, and use the training set and the improved particle swarm optimization algorithm to optimize the penalty factor and the parameters of the kernel function of the support vector machine model to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function;
[0081] The fault diagnosis module 260 is configured to use the data to be detected during the operation of the electric actuator of the electric valve as the input data of the vector machine model after training to diagnose the operating state of the electric valve.
[0082] The electric valve fault diagnosis device provided in this embodiment can be used to execute each step of the electric valve fault diagnosis method in the above embodiment. The implementation principle and technical effect are similar, and will not be elaborated here.
[0083] Correspondingly, an electric valve fault diagnosis device disclosed in an embodiment of the present application obtains vibration signals of a drive motor during opening and closing of an electric actuator in different operating states, screens the vibration signals by a backward stepwise regression method, extracts signal characteristics of the drive motor in different operating states, and then, based on this signal characteristic, uses the PELT algorithm to segment the vibration signals in different operating states, so as to segment the amplitude fluctuation signals of each time frequency band of the vibration signals of the electric valve in different operating states. Then, the energy entropy of the amplitude fluctuation signals of each time frequency band is calculated, and the energy entropy is used as a training parameter, which can effectively distinguish the normal and faulty operating states of the valve. Further, based on the training set and the improved particle swarm optimization algorithm, the penalty factor and the parameters of the kernel function of the support vector machine model are optimized, which solves the defects of difficult determination of the parameters of the support vector machine model and the easy trapping of the particle swarm optimization algorithm in local optimal values, improves the generalization ability of the fault diagnosis model, and finally improves the efficiency and accuracy of the electric valve fault diagnosis and reduces the probability of safety accidents of the electric valve.
[0084] An embodiment of the present disclosure also provides a terminal device. Please refer to Figure 3 , Figure 3 which shows a schematic structural diagram of an electronic device provided in an embodiment of the present application. Among them, the electronic device 300 includes a processor 310, a memory 320, a communication interface 330, and at least one communication bus for connecting the processor 310, the memory 320, and the communication interface 330. The memory 320 includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (PROM), or a portable read-only memory (CD-ROM), and the memory 320 is used for relevant instructions and data.
[0085] The communication interface 330 is used to receive and send data. The processor 310 can be one or more CPUs. In the case where the processor 310 is a single CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor 310 in the computer device 300 is configured to read one or more programs 321 stored in the memory 320 and execute each method step of the user natural gas consumption prediction method described in the above embodiment.
[0086] It should be noted that the specific implementation of each operation can be based on the corresponding description of the method embodiments shown above Figure 1 The terminal device 300 can be used to execute each step of the method for diagnosing faults of an electric valve in the above method embodiments of the present application, and will not be elaborated here specifically.
[0087] In another embodiment of the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and this storage space stores the operating system of the terminal. And, in this storage space, one or more instructions suitable for being loaded and executed by the processor are also stored. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the method for diagnosing faults of an electric valve in the above embodiments. Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) that contain computer-usable program codes.
[0088] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for diagnosing faults of an electric valve, characterized in that the method Including: Obtain the vibration signal of the drive motor collected by the electric actuator of the electric valve; Use the backward stepwise regression method to screen the vibration signal to extract the signal characteristics of the drive motor under different operating states; Based on the signal characteristics, use the PELT algorithm to segment the vibration signals under different operating states to obtain the segmentation results of the amplitude change of the vibration signal of the electric valve under different operating states, where the segmentation results refer to the amplitude fluctuation signals of each time frequency band of the vibration signal; Calculate the energy entropy of the amplitude fluctuation signals of each time frequency band; Create a training set using the energy entropy, and use the training set and the improved particle swarm optimization algorithm to optimize the penalty factor and the parameters of the kernel function of the support vector machine model to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function; Use the data to be detected when the electric actuator of the electric valve is working as the input data of the trained support vector machine model to diagnose the operating state of the electric valve.
2. The electric valve fault diagnosis method according to claim 1, wherein The different operating states include three operating states: normal valve operation, drive motor phase imbalance fault, and valve packing damage.
3. The method for diagnosing faults of an electric valve according to claim 1, wherein The signal characteristics include amplitude threshold characteristics and signal shape characteristics.
4. A method for diagnosing faults of an electric valve according to claim 1, characterized in that, The improved particle swarm optimization algorithm includes: In each iteration of the particle, calculate the distance between the particle and the remaining particles in the population one by one. If the distance ratio between any particle and the remaining particles is less than the ratio threshold, then update the velocity and position of the particle according to the historical optimal value of the particle, the optimal value of the particles in the adjacent area of the particle, and the global optimal value of the population; and Introduce a control coefficient to adjust the inertia weight value of the particle swarm optimization algorithm.
5. The method for diagnosing faults of an electric valve according to claim 4, characterized in that The update formula for speed is: v ij (t + 1) = ω(t) × v ij (t) + c1 × rand() × (p bj (t) - x ij (t)) + c2 × rand() × (g bj (t) - x ij (t)) + c3 × rand() × (l bj (t) - x ij (t)); The update formula for the position is: x ij (t + 1) = x ij (t) + v ij (t + 1); where t is the number of iterations, ω is the inertia weight value, c1, c2, and c3 are all learning factors, rand() is a random number uniformly distributed in the interval [0, 1], and p bj (t) is the historical optimal value of the particle, and l bj (t) is the optimal value of the particles in the adjacent area of the particle, and g bj (t) is the global optimal value of the population, and v ij (t) is the velocity vector of the i-th particle in the j-th dimensional search space, and x ij (t) is the position vector of the i-th particle in the j-th dimensional search space.
6. The electric valve fault diagnosis method according to claim 4, characterized in that The calculation formula for the inertia weight value is as follows: where ω max is the maximum inertia weight value, ω min is the minimum inertia weight value, e is the control coefficient, and t is the number of iterations.
7. A method for diagnosing faults of an electric valve according to claim 4, characterized in that, If the distance ratio between any particle and the remaining particles is greater than the ratio threshold, then update the velocity and position of the particle with the update strategy of the velocity and position of the standard particle swarm optimization algorithm.
8. An electric valve fault diagnosis device, characterized in that, The device includes: A signal acquisition module for acquiring the vibration signal of the drive motor collected by the electric actuator of the electric valve; A feature extraction module for using the backward stepwise regression method to screen the vibration signal to extract the signal characteristics of the drive motor under different operating states; A feature segmentation module for segmenting the vibration signals under different operating states based on the signal characteristics using the PELT algorithm to obtain the segmentation results of the amplitude change of the vibration signal of the electric valve under different operating states, where the segmentation results refer to the amplitude fluctuation signals of each time frequency band of the vibration signal; An energy entropy calculation module for calculating the energy entropy of the amplitude fluctuation signals of each time frequency band; A parameter optimization module for creating a training set using the energy entropy, and using the training set and the improved particle swarm optimization algorithm to optimize the penalty factor and the parameters of the kernel function of the support vector machine model to obtain the optimal penalty factor of the support vector machine model and the optimal parameters of the kernel function; A fault diagnosis module for using the data to be detected when the electric actuator of the electric valve is working as the input data of the trained support vector machine model to diagnose the operating state of the electric valve.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for diagnosing faults of an electric valve according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements a method for diagnosing faults of an electric valve as described in any one of claims 1 to 7.