Method for on-line diagnosis of solenoid valve failures based on time-frequency domain characterization
The online solenoid valve fault diagnosis method uses time-frequency domain analysis and a random forest model to improve fault identification accuracy and reliability, addressing the limitations of existing methods by integrating time and frequency domain features for real-time and predictive maintenance.
Patent Information
- Application Number
- JP2025002214
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-07
- Filing Date
- 2025-01-07
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-01-07
AI Technical Summary
Current solenoid valve fault diagnosis methods rely heavily on wavelet packet decomposition for signal processing, leading to low reliability, and BP neural networks are sensitive to initial parameter selection, making them unsuitable for practical engineering applications.
An online fault diagnosis method using time-frequency domain analysis integrates time and frequency domain features through a random forest model trained with C4.5 algorithm to accurately identify solenoid valve faults by fusing current data from different states, including normal, spring broken, and valve core stuck conditions.
This method enhances fault diagnosis accuracy and reliability by leveraging time-frequency domain analysis and a random forest model, enabling real-time fault detection, reducing downtime, and optimizing maintenance through predictive strategies.
Smart Images

Figure 2026031339000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to the technical field of fault diagnosis of solenoid valves, and more particularly to an online fault diagnosis method for solenoid valves based on characteristic analysis in the time-frequency domain. [Background technology]
[0002] Due to their advantages of simple structure, low cost, low pollution, and fast response, solenoid valves are widely used in electrohydraulic control devices in important fields such as shipbuilding, petrochemicals, national defense, and industrial equipment. However, due to factors such as long-term wear, corrosion, and electrolysis in the operating environment, solenoid valves are highly susceptible to failure. This can seriously affect the performance of the control system and even cause the system to shut down, endangering its normal operation. Therefore, to improve system safety and reliability, it is necessary to diagnose solenoid valve failures online so that the failure can be detected and corrected in a timely and accurate manner.
[0003] Currently, solenoid valve fault diagnosis methods are mainly divided into model-driven methods and data-driven methods. Model-driven methods mainly use simulation, testing, or actual engineering experience to establish a mapping relationship between the solenoid valve fault type and the solenoid valve model parameters, and then perform fault diagnosis based on this mapping relationship. However, these methods do not form specific fault diagnosis criteria and are heavily influenced by human subjective factors. Data-driven methods extract feature vectors based on multiple measurable data processing, and then use algorithms to achieve fault diagnosis. For example, Kaku Seihashi et al. used sensors to measure the load pressure, inlet and outlet oil port flow rate, and opening value of a solenoid valve, extracted feature vectors based on a physical model, and finally performed online fault diagnosis based on a support vector machine (SVM). However, this method is complex to operate, difficult to obtain the original data, and unlikely to be feasible in engineering. In fact, current signal measurement has the advantages of being low cost, providing a large amount of information, and being easy to obtain, and can also be used for fault diagnosis of electromagnetic directional control valves.
[0004] The existing invention patent application in Patent Document 1 discloses a solenoid valve fault diagnosis method based on current detection, which measures the front end driving current of the solenoid valve based on a sensor, performs wavelet energy decomposition to extract feature vectors, and finally performs fault diagnosis based on a BP neural network.
[0005] The method described in Patent Document 1 above reveals that the limitations of the prior art include at least the following problems. First, only wavelet packet decomposition is used to process signals, resulting in low reliability. Furthermore, the reliability of fault diagnosis based on BP neural networks is highly dependent on the selection of initial parameters, making it difficult to apply to actual engineering. Therefore, to ensure the safety and reliability of systems, it is urgent to propose a method for quickly diagnosing solenoid valve fault types online. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Chinese Patent Application Publication No. 103336189 Summary of the Invention [Problem to be solved by the invention]
[0007] The present invention has been made in consideration of the above-mentioned drawbacks of the prior art, and provides an online fault diagnosis method for solenoid valves based on characteristic analysis in the time-frequency domain, which solves the problems that only wavelet packet decomposition is used for signal processing, resulting in low reliability, and that the reliability of fault diagnosis based on BP neural networks is highly dependent on the selection of initial parameters, making it difficult to apply to actual engineering. [Means for solving the problem]
[0008] In order to achieve the above objectives, the present invention is achieved by the following technical solutions: An online diagnosis method for faults in a solenoid valve based on characteristic analysis in the time-frequency domain, comprising: A step of acquiring current time-series current data on the solenoid valve drive side, valve core normal time-series history current data, spring rupture time-series history current data, valve core non-operation time-series history current data, and valve core slightly stuck time-series history current data, and performing pre-processing on the data; a step of performing time domain analysis and frequency domain analysis on the preprocessed current time series current data on the solenoid valve drive side, the valve core normal time series history current data, the spring broken time series history current data, the valve core non-operation time series history current data, and the valve core slightly stuck time series history current data, to obtain a current time domain feature vector and a frequency domain feature vector, a valve core normal time domain feature vector and a frequency domain feature vector, a spring broken time domain feature vector and a frequency domain feature vector, a valve core non-operation time domain feature vector and a frequency domain feature vector, and a valve core slightly stuck time domain feature vector and a frequency domain feature vector; a fusion process is performed on the current time domain feature vector and frequency domain feature vector, the time domain feature vector and frequency domain feature vector of normal valve core, the time domain feature vector and frequency domain feature vector of broken spring, the time domain feature vector and frequency domain feature vector of non-operating valve core, and the time domain feature vector and frequency domain feature vector of slightly stuck valve core, to obtain a current composite feature vector, a composite feature vector of normal valve core, a composite feature vector of broken spring, a composite feature vector of non-operating valve core, and a composite feature vector of slightly stuck valve core; The method includes the steps of: creating a vector data set based on the composite feature vector of a normal valve core, the composite feature vector of a broken spring, the composite feature vector of a non-operating valve core, and the composite feature vector of a slightly stuck valve core; and using the vector data set to perform model training on a pre-created random forest model, and performing diagnostic identification of the current composite feature vector after the training of the random forest model is completed.
[0009] Furthermore, the current time-series current data on the solenoid valve driving side is specifically current values at a plurality of time points when the solenoid valve driving side is in a current state, the valve core normal time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a valve core normal state, the spring breakage time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a spring breakage state, the valve core non-operation time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a valve core non-operation state, and the valve core mild sticking time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a valve core mild sticking state.
[0010] Furthermore, the specific steps of obtaining the current time domain feature vector, the time domain feature vector of the normal valve core, the time domain feature vector of the broken spring, the time domain feature vector of the non-operating valve core, and the time domain feature vector of the slightly stuck valve core are as follows: The current values at multiple points in time when the preprocessed solenoid valve drive side is in the current state, the historical current values at multiple points in time when the valve core is in a normal state, the historical current values at multiple points in time when the spring is broken, the historical current values at multiple points in time when the valve core is in a non-operating state, and the historical current values at multiple points in time when the valve core is in a slightly stuck state are read, and average value analysis and descending sorting are performed on these, to obtain the average current value in the current state, the effective current value in the current state, the maximum current value in the current state, the minimum current value in the current state, the average current value in the normal state of the valve core, the historical current value in the normal state of the valve core, and the historical current value in the slightly stuck state of the valve core. obtaining the effective current value in the state of the valve core when the valve core is normal, the maximum current value in the state of the valve core when the valve core is normal, the minimum current value in the state of the valve core when the valve core is normal, the average current value in the state of the spring being broken when the valve core is normal, the effective current value in the state of the valve core when the valve core is normal, the maximum current value in the state of the valve core when the valve core is normal, the minimum current value in the state of the valve core when the valve core is normal, the average current value in the state of the valve core when the valve core is not operating, the effective current value in the state of the valve core when the valve core is not operating, the maximum current value in the state of the valve core when the valve core is not operating, the minimum current value in the state of the valve core when the valve core is not operating, and the average current value in the state of the valve core when the valve core is slightly stuck, the effective current value in the state of the valve core when the valve core is slightly stuck, the maximum current value in the state of the valve core when the valve core is slightly stuck, and the minimum current value in the state of the valve core when the valve core is slightly stuck; For the maximum current value and minimum current value in the current state, the maximum current value and minimum current value in the normal state of the valve core, the maximum current value and minimum current value in the spring break state, the maximum current value and minimum current value in the inoperative state of the valve core, and the maximum current value and minimum current value in the light seizure state of the valve core, respectively perform differential analysis to obtain the current range value in the current state, the current range value in the normal state of the valve core, the current range value in the spring break state, the current range value in the inoperative state of the valve core, and the current range value in the light seizure state of the valve core; and based on the current average value in the current state, the current effective value in the current state, the current range value in the current state, the current average value in the normal state of the valve core, the current effective value in the normal state of the valve core, the current range value in the normal state of the valve core, the current average value in the spring break state, the current effective value in the spring break state, the current range value in the spring break state, the current average value in the inoperative state of the valve core, the current effective value in the inoperative state of the valve core, the current range value in the inoperative state of the valve core, and the current average value in the light seizure state of the valve core, the current effective value in the light seizure state of the valve core, and the current range value in the light seizure state of the valve core, respectively create the feature vector in the current time domain, the feature vector in the time domain of the normal valve core, the feature vector in the time domain of the spring break, the feature vector in the time domain of the inoperative valve core, and the feature vector in the time domain of the light seizure of the valve core. including.
[0011] Furthermore, the specific formulas for calculating the current average value, the current effective value, and the current range value in the current state are as follows.
Number
[0012] Furthermore, the specific steps of obtaining the current frequency domain feature vector, the frequency domain feature vector of the normal valve core, the frequency domain feature vector of the broken spring, the frequency domain feature vector of the non-operating valve core, and the frequency domain feature vector of the slightly stuck valve core are as follows: a step of reading current values at multiple points in time when the pre-processed solenoid valve driving side is in a current state, historical current values at multiple points in time when the valve core is in a normal state, historical current values at multiple points in time when the spring is broken, historical current values at multiple points in time when the valve core is in an inoperative state, and historical current values at multiple points in time when the valve core is in a slightly stuck state, and performing second-order derivative analysis on these values to obtain the second-order derivative of the current state, the second-order derivative of the valve core in a normal state, the second-order derivative of the spring is broken, the second-order derivative of the valve core is in an inoperative state, and the second-order derivative of the valve core in a slightly stuck state; performing binary discrete wavelet packet decomposition on the second derivative of the current state, the second derivative of the valve core normal state, the second derivative of the spring broken state, the second derivative of the valve core non-operating state, and the second derivative of the valve core slightly stuck state, to obtain a wavelet function of the current state, a wavelet function of the valve core normal state, a wavelet function of the spring broken state, a wavelet function of the valve core non-operating state, and a wavelet function of the valve core slightly stuck state; performing energy analysis on the wavelet function of the current state, the wavelet function of the valve core normal state, the wavelet function of the spring broken state, the wavelet function of the valve core non-operating state, and the wavelet function of the valve core slightly stuck state, to obtain the energy value of the current state, the energy value of the valve core normal state, the energy value of the spring broken state, the energy value of the valve core non-operating state, and the energy value of the valve core slightly stuck state; and performing normalization processing on the energy value of the current state, the energy value of the valve core normal state, the energy value of the spring broken state, the energy value of the valve core non-operating state, and the energy value of the valve core slightly stuck state, to obtain normalized energy features of the current state, the normalized energy features of the valve core normal state, the normalized energy features of the spring broken state, the normalized energy features of the valve core non-operating state, and the normalized energy features of the valve core slightly stuck state, and recording them as a feature vector in the current frequency domain, a feature vector in the frequency domain of the valve core normal, a feature vector in the frequency domain of the spring broken, a feature vector in the frequency domain of the valve core non-operating, and a feature vector in the frequency domain of the valve core slightly stuck, respectively.
[0013] Furthermore, the specific formulas for calculating the wavelet function of the current state, the energy value of the current state, and the normalized energy feature of the current state are as follows:
number
[0014] Furthermore, the vector dataset is used to perform model training on a pre-built random forest model, specifically, the training is performed using the C4.5 algorithm, specifically, the vector dataset is sampled to generate multiple decision trees and construct the random forest model.
[0015] Furthermore, the specific steps of generating multiple decision trees include: reading a vector dataset, randomly extracting multiple groups of data, and separately creating random vector datasets; respectively dividing the random vector dataset of each group of data into a vector training dataset and a vector validation dataset; starting from the root node of the vector training dataset and dividing each group of data using the feature with the highest information gain rate, this division process is repeated for each subset generated by the division, and recursively constructing a tree; stopping the tree construction operation when a preset stopping condition is reached; and adopting a post-pruning strategy for the constructed tree, which is performed after the tree is fully generated, and evaluating and adjusting the tree before and after pruning using the vector validation dataset until the tree meets a predetermined criterion.
[0016] Furthermore, in the current diagnosis identification of the composite feature vector after the training of the random forest model is completed, the means of fault diagnosis by the random forest model uses majority voting to obtain the final result. [Effects of the Invention]
[0017] The present invention has the following beneficial effects. (1) The online fault diagnosis method for solenoid valves based on the characteristic analysis of the time-frequency domain can more accurately identify and distinguish different fault types of solenoid valves by integrating current data of multiple states and the integrated feature vector obtained by time-frequency domain analysis, which not only improves the feature characterization ability but also improves the accuracy and reliability of fault diagnosis by comprehensively utilizing the information in the time domain and the frequency domain. (2) This online fault diagnosis method for solenoid valves, based on time-frequency domain characteristic analysis, monitors and analyzes the solenoid valve's current characteristics in real time, and uses an efficient random forest model for online fault diagnosis. This method can provide immediate fault warnings and maintenance advice, allowing for timely resolution of faults and reducing equipment downtime, as well as preventing more serious equipment damage, thereby reducing maintenance costs and extending the equipment's lifespan. (3) This online solenoid valve fault diagnosis method, based on time-frequency domain characteristic analysis, uses a random forest model based on the C4.5 algorithm for training. Combined with post-hoc pruning, this effectively avoids overfitting and improves the model's generalization ability. Random forests integrate multiple decision trees to reduce the variance of a single decision tree, and the majority voting method improves overall judgment accuracy. This allows the model to maintain efficient diagnostic performance even when faced with changes in the working environment and various types of faults. Of course, a product embodying the present invention need not necessarily achieve all of the above advantages simultaneously. [Brief explanation of the drawings]
[0018] [Figure 1] 2 is a flowchart of an online fault diagnosis method for a solenoid valve based on time-frequency domain characteristic analysis according to the present invention; [Figure 2] 1 is a flowchart illustrating an example of a method for online diagnosis of a fault in a solenoid valve based on time-frequency domain characteristic analysis according to the present invention; [Figure 3] FIG. 10 is a diagram illustrating a random forest training and evaluation method for the online diagnosis method for solenoid valve faults based on the time-frequency domain characteristics of multidimensional drive-side current according to the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0019] The embodiments of the present application use an online fault diagnosis method for solenoid valves based on characteristic analysis in the time-frequency domain to solve the problem that only wavelet packet decomposition is used to process signals, resulting in low reliability, and the reliability of fault diagnosis based on BP neural networks is highly dependent on the selection of initial parameters, making it difficult to apply to practical engineering.
[0020] The overall approach to the problem in the embodiment of this application is as follows.
[0021] First, time-series current data of the solenoid valve in various operating states, including normal, spring broken, valve core non-operation, and light sticking, in the current and historical states, is collected, and this data is preprocessed, cleaned, and formatted to ensure that the data quality meets the analysis needs. Time-domain and frequency-domain analyses are then performed on the preprocessed data to extract key features such as the average, effective, maximum, minimum, and range values of the current. Next, the extracted time domain features and frequency domain features are fused to form an integrated feature vector, and these composite feature vectors are used to construct a vector data set. A random forest model is applied, and model training is performed based on the set of decision trees constructed by the C4.5 algorithm. After training is completed, the trained model is used to perform fault diagnosis on new or current feature vectors. The processes in the embodiments may be realized by, for example, a processor included in the processing device executing a program stored in a storage device. Alternatively, the processes in the embodiments may be performed by a hardware circuit included in the processing device.
[0022] Referring to Figure 1, an embodiment of the present invention provides a technical solution: an online fault diagnosis method for a solenoid valve based on characteristic analysis in the time-frequency domain, which includes the following steps:The current time series current data of the solenoid valve driving side, the valve core normal time series history current data, the spring broken time series history current data, the valve core non-operation time series history current data, and the valve core slightly stuck time series history current data are obtained, and preprocessing is performed on them. The valve core normal time series history current data is the current measurement data in the normal operating state of the solenoid valve valve core set by the operator, the spring broken time series history current data is the current measurement data in the solenoid valve spring broken operating state set by the operator, and the history valve core non-operation time series current data is the solenoid valve valve set by the operator. The historical valve core slightly stuck time series current data is current measurement data in the solenoid valve valve core slightly stuck operating state set by the operator, and by performing time domain and frequency domain analyses on the preprocessed current time series current data of the solenoid valve driving side, the valve core normal time series historical current data, the spring rupture time series historical current data, the valve core non-operating time series historical current data, and the valve core slightly stuck time series historical current data, the current time domain and frequency domain feature vectors, the valve core normal time domain and frequency domain feature vectors The time-domain and frequency-domain feature vector of the broken spring, the time-domain and frequency-domain feature vector of the stuck valve core, and the time-domain and frequency-domain feature vector of the slightly stuck valve core are obtained, and the current time-domain and frequency-domain feature vector, the time-domain and frequency-domain feature vector of the normal valve core, the time-domain and frequency-domain feature vector of the broken spring, the time-domain and frequency-domain feature vector of the stuck valve core, and the time-domain and frequency-domain feature vector of the slightly stuck valve core are respectively fused to obtain a current composite feature vector, a composite feature vector of the normal valve core, a composite feature vector of the broken spring, the time-domain and frequency-domain feature vector of the stuck valve core, and a composite feature vector of the slightly stuck valve core. A vector data set is created based on the composite feature vector of the normal valve core, the composite feature vector of the broken spring, the composite feature vector of the stuck valve core, and the composite feature vector of the slightly stuck valve core, and the vector data set is used to train a pre-created random forest model. After the training of the random forest model is completed, a diagnostic identification of the current composite feature vector is performed.
[0023] The current time-series current data on the solenoid valve driving side is specifically current values at multiple points in time when the solenoid valve driving side is in its current state, obtained by a current sensor installed in the solenoid valve driving circuit. The valve core normal time-series historical current data on the solenoid valve driving side is specifically historical current values at multiple points in time when the valve core on the solenoid valve driving side is in a normal state, obtained by a current sensor installed in the solenoid valve driving circuit. The spring breakage time-series historical current data on the solenoid valve driving side is specifically historical current values at multiple historical points when the solenoid valve driving side is in a spring breakage state, obtained by a current sensor installed in the solenoid valve driving circuit. The time-series historical current data of the solenoid valve driving side when the valve core is inoperative is specifically historical current values at multiple historical points in time when the solenoid valve driving side is in a valve core inoperative state, which is acquired by a current sensor installed in the solenoid valve driving circuit. The historical valve core light sticking time-series current data on the solenoid valve driving side is specifically historical current values at multiple historical points in time when the solenoid valve driving side is in a valve core light sticking state, which are acquired by a current sensor installed in the solenoid valve driving circuit.
[0024] Specifically, the specific steps for obtaining the feature vector of the current time domain, the feature vector of the time domain of the valve core being normal, the feature vector of the time domain of the spring being broken, the feature vector of the time domain of the valve core not operating, and the feature vector of the time domain of the valve core being slightly stuck are as follows: the current values at multiple points in time when the preprocessed solenoid valve driving side is in the current state, and the historical current values at multiple points in time when the valve core is in the normal state, the spring being broken, the valve core not operating, and the valve core being slightly stuck are read, and average value analysis and descending sorting are performed on them, respectively, to obtain the average current value, effective current value, maximum current value, and minimum current value of the current state, and the average current value, effective current value, maximum current value, and minimum current value of the valve core being normal, the spring being broken, the valve core not operating, and the valve core being slightly stuck the step of obtaining a current range value for the current state, and a current range value for the normal valve core state, the broken spring state, the broken valve core state, and the slightly stuck valve core state, by performing a differential analysis on the maximum and minimum current values in the current state and the maximum and minimum current values in the normal valve core state, the broken spring state, the broken valve core state, and the slightly stuck valve core state; and the step of creating a time-domain feature vector for the current state, a time-domain feature vector for the normal valve core, a time-domain feature vector for the broken spring, a time-domain feature vector for the stuck valve core, and a time-domain feature vector for the slightly stuck valve core, based on the average current value, effective current value, and current range value for the current state, and the average current value, effective current value, and current range value for the normal valve core state, the broken spring state, the broken valve core state, and the slightly stuck valve core state.
[0025] The specific formulas for calculating the current average value, current effective value, and current range value for the current state are as follows:
number
[0026] The specific formulas for calculating the average current value, effective current value, and current range value for the valve core normal state, spring broken state, valve core non-operating state, and valve core slightly stuck state are similar to the specific formulas for calculating the average current value, effective current value, and current range value for the current state.
[0027] In this embodiment, detailed analysis of the current data for various solenoid valve states (e.g., normal, spring broken, valve core stuck, etc.) allows for accurate identification of abnormal current patterns. For example, comparing the average, RMS, maximum, minimum, and range values of the current allows for effective identification of potential problems during equipment operation. These indicators can reflect whether the solenoid valve's operating conditions are abnormal, thereby enabling early detection of faults and preventing potential equipment failures. By analyzing the current feature vectors for various fault states (e.g., normal operation and various fault states), a detailed fault feature database can be constructed. Such a database not only helps accurately diagnose the type of current fault, but also identifies the specific cause of the fault, such as whether the valve core is stuck or whether the spring is broken, through comparative analysis. The accuracy of this diagnosis is crucial for subsequent maintenance work, reducing unintended inspections and unnecessary maintenance costs. Data provided by time domain analysis can be used to build and optimize predictive maintenance models. Long-term tracking of solenoid valve current data for various states allows for prediction of future equipment maintenance needs and optimization of maintenance plans and resource allocation. For example, if data shows that a particular pattern of electrical current changes consistently causes equipment failure, preventative maintenance can be performed before a problem occurs, avoiding costly emergency repairs and production interruptions.
[0028] Specifically, the specific steps of obtaining the current frequency domain feature vector, the frequency domain feature vector of the normal valve core, the frequency domain feature vector of the broken spring, the frequency domain feature vector of the non-operating valve core, and the frequency domain feature vector of the slightly stuck valve core include the steps of reading the current values at multiple points in time when the pre-processed solenoid valve driving side is in the current state, and the historical current values at multiple points in time when the valve core is in the normal valve core state, the broken spring state, the non-operating valve core, and the slightly stuck valve core, respectively, and performing second-order derivative analysis on them to obtain the second-order derivatives of the current state, the normal valve core state, the broken spring state, the non-operating valve core, and the slightly stuck valve core; and performing binary discrete wavelet packet decomposition on the second-order derivatives of the current state, the normal valve core state, the broken spring state, the non-operating valve core, and the slightly stuck valve core, respectively, to obtain the second-order derivatives of the current state, the normal valve core state, the broken spring state, the non-operating valve core, and the slightly stuck valve core. The method includes the steps of: obtaining wavelet functions for the valve core non-operating state and the valve core slightly stuck state; performing energy analysis on the wavelet functions for the current state, the valve core normal state, the spring broken state, the valve core non-operating state and the valve core slightly stuck state to obtain energy values for the current state, the valve core normal state, the spring broken state, the valve core non-operating state and the valve core slightly stuck state; and performing normalization processing on the energy values for the current state, the valve core normal state, the spring broken state, the valve core non-operating state and the valve core slightly stuck state to obtain normalized energy features for the current state, the valve core normal state, the spring broken state, the valve core non-operating state and the valve core slightly stuck state, and recording these as a feature vector in the current frequency domain, a feature vector in the frequency domain for the valve core normal, a feature vector in the frequency domain for the spring broken, a feature vector in the frequency domain for the valve core non-operating and a feature vector in the frequency domain for the valve core slightly stuck, respectively.
[0029] The specific formulas for calculating the wavelet function, energy value, and normalized energy feature of the current state are as follows:
number
[0030] The specific formulas for calculating the wavelet function, energy value, and normalized energy feature in the valve core normal state, the wavelet function energy value and normalized energy feature in the spring broken state, the wavelet function energy value and normalized energy feature in the valve core non-operating state, and the wavelet function energy value and normalized energy feature in the valve core slightly stuck state are similar to the specific formulas for calculating the wavelet function, energy value, and normalized energy feature in the current state.
[0031] In this embodiment, wavelet transform and second-order derivative analysis of solenoid valve current data effectively capture instantaneous changes and nonlinear characteristics of the current signal, which are difficult to identify using conventional time series analysis. Wavelet transform can partially analyze the current signal at various time scales, allowing even small changes to be detected, significantly improving the sensitivity and accuracy of fault detection. By analyzing frequency-domain feature vectors for various fault conditions, this method can accurately distinguish between various types of faults, such as a normal valve core, a broken spring, a malfunctioning valve core, and a slightly stuck valve core. Each condition has its own frequency-domain characteristics (e.g., changes in energy distribution and wavelet coefficients). This detailed frequency-domain information helps maintenance teams more accurately diagnose specific types of faults and implement more targeted maintenance measures. Continuously monitoring the solenoid valve's current characteristics and analyzing the time-frequency domain data allows for real-time understanding of the equipment's operating status and timely detection of changes in trends that could lead to faults. This method not only aids in real-time fault diagnosis, but also allows long-term data analysis to predict solenoid valve maintenance needs and enable preventive maintenance. Preventive maintenance helps avoid catastrophic breakdowns, reduces unplanned downtime, and improves overall equipment reliability and efficiency.
[0032] Specifically, a vector dataset is used to perform model training on a pre-built random forest model, specifically, the training is performed using the C4.5 algorithm, specifically, the vector dataset is sampled to generate multiple decision trees, and the random forest model is constructed.
[0033] In this embodiment, random forests improve prediction accuracy and reliability by integrating multiple decision trees. Each tree is trained on a random subset of the data set. This integration method significantly reduces model variance and avoids overfitting. The information gain rate method used in the C4.5 algorithm when constructing each tree allows for more effective selection of splitting attributes, further optimizing the performance of each tree and the overall model stability. The C4.5 algorithm natively supports continuous attribute processing and can automatically find optimal binary split points for continuous attributes. Because current data is typically continuous, the C4.5 algorithm is particularly useful for solenoid valve fault diagnosis. Furthermore, C4.5 does not require prior data transformation when processing classification data; it can directly learn from the original data, reducing the complexity of data preprocessing. The flexibility of the random forest model allows it to adapt to variable input characteristics and provide reliable diagnosis results for various types of faults. The C4.5 algorithm optimizes the feature selection process, allowing the model to more accurately identify key factors leading to failures and maintain high levels of performance even in complex industrial environments. By selecting split nodes using information gain ratios rather than simple information gain, the C4.5 algorithm avoids the tendency of decision trees to select too many categorical features, making the model more fair and balanced. This is particularly important in fault diagnosis, as it ensures that the model does not miss potential signs of failure due to feature diversity.
[0034] Specifically, the specific steps for generating multiple decision trees include: reading a vector dataset, randomly extracting multiple groups of data, creating separate random vector datasets, and splitting each group of data into a vector training dataset and a vector validation dataset; splitting each group of data, starting from the root node of the vector training dataset, using the feature with the highest information gain rate; repeating this splitting process for each subset generated by the splitting, and recursively building a tree. C4.5 uses the information gain rate, rather than pure information gain (as used by the ID3 algorithm), as the criterion for selecting split features. The information gain rate takes into account the impurity of features and helps avoid the tendency to select features with more categories. Here, the information gain is calculated by calculating the change in entropy before and after the difference, and the intrinsic value is calculated by taking into account the weighted sum of the sizes of each subset after splitting. The construction operation stops when a preset stopping condition is reached. The stopping conditions are when all instances belong to the same category, when there is no further information gain, or when a preset maximum tree depth or minimum number of node samples is reached. A post-pruning strategy is adopted for the constructed tree, which is performed after the tree is fully generated, and the vector validation data set is used to evaluate and adjust the tree before and after pruning until the tree meets a predetermined standard. Specifically, statistical indicators such as accuracy, recall, and precision are calculated, and parts that may improve the performance of the validation set after pruning are pruned until the tree meets the predetermined standard, which helps to reduce overfitting and improve the generalization ability of the model.
[0035] In this embodiment, by randomly extracting subsets of data and constructing multiple decision trees, the random forest model significantly reduces the risk of overfitting and improves model performance on unknown data. The C4.5 algorithm considers the information gain rate when selecting features for splitting, which not only optimizes the quality of the split but also reduces the deviation caused by multiple feature values, making the construction of each tree more rational and improving the accuracy and robustness of the overall model. The use of the C4.5 algorithm, particularly the introduction of the information gain rate in feature selection, helps the model more accurately identify the features most useful for classification and avoids the selection variations that can be caused by simple information gain. The information gain rate also takes into account the size of the subsets after splitting, which helps generate a more balanced tree structure, which is particularly important when processing complex datasets. Setting various stopping conditions (such as maximum depth, lower limit on the number of samples, or reaching an information gain threshold) effectively controls tree growth to prevent the tree structure from becoming too complex and avoid overfitting. Post-pruning further optimizes the tree model by pruning fully grown trees to remove nodes that contribute little or nothing to improving model performance, ensuring the simplicity and execution efficiency of the final model. Post-pruning allows the model to first base its decisions on a larger data frame, and then prunes away unnecessary parts. This not only improves the efficiency of the model's application to new data, but also optimizes model execution time and resource usage, further improving the model's efficiency in practical applications. In the application scenario of solenoid valve fault diagnosis, this method can accurately identify specific equipment fault types based on a comprehensive analysis of historical and real-time data, which is crucial for formulating timely and effective maintenance measures and reducing equipment downtime and maintenance costs.
[0036] Specifically, in the diagnosis identification of the current composite feature vector after the training of the random forest model is completed, the means of fault diagnosis by the random forest model uses majority voting to obtain the final result.
[0037] In this embodiment, the majority voting method combines the prediction results of each tree to determine the final classification output. Because each tree is trained independently on a different random subset of the data set, different predictions may be obtained for the same input. This model utilizes the wisdom of the crowd through majority voting, and even if some trees make incorrect predictions, the correct predictions of other trees compensate for these errors, improving overall prediction accuracy. A single decision tree, especially when the tree depth is large, is susceptible to overfitting due to noise in the data. On the other hand, random forests effectively distribute the risk of overfitting by constructing multiple trees and using a voting mechanism. Multiple trees cover various data perspectives and reduce the model's sensitivity to specific data samples, making model performance more stable for unknown data. Due to their integrated characteristics, random forests exhibit high robustness when faced with outliers or changes in feature distribution in the data set. The majority voting method ensures that even if some trees are affected by abnormal data, the overall model output is still determined by the majority of trees, maintaining consistency and reliability of prediction results. Random forests can handle data sets with high-dimensional features without the need for dimensionality reduction. Each tree in the model can learn from a random subset of features in the data, which not only improves the model's ability to handle complex data, but also allows the model to capture complex interactions between features, which is very difficult to achieve with a single tree or simple model.
[0038] A specific example of an online diagnosis method for solenoid valve faults based on time-frequency domain characteristic analysis is as follows:
[0039] Specifically, see Figures 2 and 3.
[0040] In step 1, four typical solenoid valve operating states are set: valve core normal, spring broken, valve core not working, and valve core slightly stuck. These are recorded sequentially as c0, c1, c2, and c3. To ensure that the solenoid valve operates normally, a solenoid valve operating circuit for normal operation is set. A non-contact current sensor is connected in series to the driving side, and the sampling period is T s , total acquisition time nT s Then, the time series current data i(t) = [i1,i2,...,i k ,···i n ] Collect.
[0041] In step 2, the average value of the time series current data i(t) is calculated. TIFF2026031339000008.tif85, RMS value i k , range R and first inflection time t are calculated to generate time series feature I, where
number
[0042] Taking a certain data set as an example, the final time series feature vector I is obtained as follows:
number
[0043] In step 3, we select N=3 and perform binary discrete wavelet packet decomposition on the second derivative of the current Δi′′(t) and calculate the energy as a frequency domain feature E according to the following equation:
number
[0044] In step 4, the frequency domain features E and the time domain features I are combined to form a composite feature vector T0, and multiple groups are recorded.
number
[0045] In step 5, three typical fault conditions, namely, spring broken, valve core stuck, and valve core slightly stuck, are simulated, and composite feature vectors T1, T2, T3 are formed and recorded again.
[0046] In step 5.1, a spring breakage fault condition is simulated and multiple sets of composite feature vectors T1 are recorded. In step 5.2, a valve core non-operation fault condition is simulated and multiple sets of composite feature vectors T2 are recorded. In step 5.3, a valve core mild sticking fault condition is simulated and multiple sets of composite feature vectors T3 are recorded.
[0047] In step 6, a composite feature vector with labels for multiple groups is generated. <T i ,C i >(i=0,1,2,3) is used as the training set DATA.
number
[0048] For ease of explanation, the following assumptions are made.
number
[0049] In step 7, a random forest model (RF) is generated. In step 7.1, the training data set is sampled. For example, the training set DATA contains R groups of data. Each time, one group of data is sampled with replacement, and the process is repeated k times to generate k decision trees. The training set Train sampled in a certain time is used as the training set. i is shown as follows:
number
[0050] In step 7.2, a decision tree model is created. The present invention uses the C4.5 algorithm to construct a decision tree unit in the random forest model. The C4.5 decision tree selects split attributes based on the amount of information gain, and i The decision trees corresponding to these generate a total of k decision trees.
[0051] In step 7.4, we build a random forest classification model. The application scenario is a 4-classification problem, and we can use majority voting to get the final prediction result. The main idea is to vote for the prediction results of all k decision trees in the random forest model, and the category that receives the most votes becomes the final output category.
[0052] In step 8, the trained random forest model is applied to perform online diagnosis of the failure mode of the solenoid valve, that is, the composite feature vector of the solenoid valve is taken as input and introduced into the random forest model, and all decision trees in the model are obtained, and the most frequent number of the operating state is determined and output as its operating state. Assume that the input composite feature vector is as follows:
number
number
[0053] From the above, the present application has at least the following effects. By integrating the current data of multiple states and the integrated feature vector analyzed using the time-frequency domain, different fault types of the solenoid valve can be more accurately identified and distinguished, which not only improves the feature characterization ability, but also improves the accuracy and reliability of fault diagnosis by comprehensively utilizing the information in the time domain and frequency domain. By monitoring and analyzing the solenoid valve's current characteristics in real time and using an efficient random forest model for online fault diagnosis, this method can provide immediate fault warnings and maintenance advice. Timely resolution of faults not only reduces equipment downtime but also prevents more serious equipment damage, thereby reducing maintenance costs and extending equipment lifespan. Training is performed using a random forest model based on the C4.5 algorithm, combined with post-hoc pruning, which effectively avoids overfitting and improves the model's generalization ability. Random forests integrate multiple decision trees to reduce the variance of a single decision tree, and the majority voting method improves the overall accuracy of the decision. This allows the model to maintain efficient diagnostic performance even when faced with changes in the working environment and various types of faults.
[0054] While preferred embodiments of the present invention have been described, further variations and modifications to these embodiments may be made by those skilled in the art once the basic inventive concept is apparent to them. It is therefore intended that the appended claims be interpreted to include the preferred embodiments and all such variations and modifications that are within the scope of the present invention.
[0055] It is obvious that those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these changes and modifications of the present invention fall within the scope of the claims of the present invention and the equivalent technologies thereof, the present invention also includes these changes and modifications.
Claims
1. An online diagnosis method for faults in a solenoid valve based on characteristic analysis in the time-frequency domain, comprising: A step of acquiring current time-series current data on the solenoid valve drive side, valve core normal time-series history current data, spring rupture time-series history current data, valve core non-operation time-series history current data, and valve core slightly stuck time-series history current data, and performing pre-processing on the data; a step of performing time domain analysis and frequency domain analysis on the preprocessed current time series current data on the solenoid valve drive side, the valve core normal time series history current data, the spring broken time series history current data, the valve core non-operation time series history current data, and the valve core slightly stuck time series history current data, to obtain a current time domain feature vector and a frequency domain feature vector, a valve core normal time domain feature vector and a frequency domain feature vector, a spring broken time domain feature vector and a frequency domain feature vector, a valve core non-operation time domain feature vector and a frequency domain feature vector, and a valve core slightly stuck time domain feature vector and a frequency domain feature vector; Execute fusion processing on the current time domain feature vector and frequency domain feature vector, the time domain feature vector and frequency domain feature vector of normal valve core, the time domain feature vector and frequency domain feature vector of broken spring, the time domain feature vector and frequency domain feature vector of non-operating valve core, and the time domain feature vector and frequency domain feature vector of slightly stuck valve core, to obtain a current composite feature vector, a composite feature vector of normal valve core, a composite feature vector of broken spring, a composite feature vector of non-operating valve core, and a composite feature vector of slightly stuck valve core; Creating a vector data set based on the composite feature vector of the normal valve core, the composite feature vector of the broken spring, the composite feature vector of the non-operating valve core, and the composite feature vector of the slightly stuck valve core; performing model training on a pre-created random forest model using the vector dataset, and performing diagnostic identification of the current composite feature vector after the random forest model training is completed; Including, The present invention provides an online fault diagnosis method for a solenoid valve based on characteristic analysis in the time-frequency domain, comprising:
2. The present time-series current data on the solenoid valve driving side is specifically current values at a plurality of time points when the solenoid valve driving side is in a current state, the valve core normal time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a valve core normal state, the spring breakage time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a spring breakage state, the valve core non-operation time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a valve core non-operation state, and the valve core mild sticking time-series historical current data on the solenoid valve driving side is specifically historical current values at a plurality of time points when the solenoid valve driving side is in a valve core mild sticking state.
2. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 1.
3. The specific steps for obtaining the current time domain feature vector, the time domain feature vector of the normal valve core, the time domain feature vector of the spring broken, the time domain feature vector of the non-operating valve core, and the time domain feature vector of the slightly stuck valve core are as follows: The current values at multiple points in time when the preprocessed solenoid valve drive side is in the current state, the historical current values at multiple points in time when the valve core is in a normal state, the historical current values at multiple points in time when the spring is broken, the historical current values at multiple points in time when the valve core is in a non-operating state, and the historical current values at multiple points in time when the valve core is in a slightly stuck state are read, and average value analysis and descending sorting are performed on these, to obtain the average current value in the current state, the effective current value in the current state, the maximum current value in the current state, the minimum current value in the current state, and the average current value in the normal state of the valve core. a step of obtaining a current value when the valve core is in a normal state, an effective current value when the valve core is in a normal state, a maximum current value when the valve core is in a normal state, a minimum current value when the valve core is in a normal state, an average current value when the spring is broken, an effective current value when the spring is broken, a maximum current value when the spring is broken, a minimum current value when the spring is broken, an average current value when the valve core is not operating, an effective current value when the valve core is not operating, a maximum current value when the valve core is not operating, a minimum current value when the valve core is not operating, and an average current value when the valve core is slightly stuck, an effective current value when the valve core is slightly stuck, a maximum current value when the valve core is slightly stuck, and a minimum current value when the valve core is slightly stuck; a step of performing a differential analysis on the maximum and minimum current values in the current state, the maximum and minimum current values in the valve core normal state, the maximum and minimum current values in the spring broken state, the maximum and minimum current values in the valve core non-operating state, and the maximum and minimum current values in the valve core slightly stuck state, thereby obtaining the current range values in the current state, the current range value in the valve core normal state, the current range value in the spring broken state, the current range value in the valve core non-operating state, and the current range value in the valve core slightly stuck state; generating a feature vector of the current time domain, a feature vector of the normal valve core time domain, a feature vector of the broken valve core time domain, a feature vector of the non-operating valve core time domain, and a feature vector of the slightly stuck valve core time domain based on the average current value in the current state, the effective current value in the current state, the current range value in the current state, the average current value in the normal valve core state, the effective current value in the normal valve core state, the current range value in the normal valve core state, the average current value in the broken spring state, the effective current value in the broken spring state, the current range value in the broken spring state, the average current value in the non-operating valve core state, the effective current value in the non-operating valve core, and the average current value in the slightly stuck valve core state, the effective current value in the slightly stuck valve core, and the current range value in the slightly stuck valve core; Including, 3. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 2.
4. The specific formulas for calculating the current average value, current effective value, and current range value of the current state are as follows: [Equation 1] where: 【number】 is the current average value of the current state, and i k is the current value at the kth time point when the solenoid valve driving side is in the current state, and i n is the current value at the nth time point when the solenoid valve driving side is in the current state, 2<k<n, n is the total number of time points, I' is the current effective value in the current state, R is the current range value in the current state, and i Max is the maximum current value in the current state, and i Min is the minimum current value in the current state, 4. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 3.
5. The specific steps for obtaining the current frequency domain feature vector, the frequency domain feature vector of the normal valve core, the frequency domain feature vector of the broken spring, the frequency domain feature vector of the non-operating valve core, and the frequency domain feature vector of the slightly stuck valve core are as follows: a step of reading current values at multiple points in time when the pre-processed solenoid valve driving side is in a current state, historical current values at multiple points in time when the valve core is in a normal state, historical current values at multiple points in time when the spring is broken, historical current values at multiple points in time when the valve core is in an inoperative state, and historical current values at multiple points in time when the valve core is in a slightly stuck state, and performing second derivative analysis on these values to obtain the second derivative of the current state, the second derivative of the valve core normal state, the second derivative of the spring is broken, the second derivative of the valve core in an inoperative state, and the second derivative of the valve core in a slightly stuck state; performing binary discrete wavelet packet decomposition on the second derivative of the current state, the second derivative of the valve core normal state, the second derivative of the spring broken state, the second derivative of the valve core non-operating state, and the second derivative of the valve core slightly stuck state, to obtain a wavelet function of the current state, a wavelet function of the valve core normal state, a wavelet function of the spring broken state, a wavelet function of the valve core non-operating state, and a wavelet function of the valve core slightly stuck state; performing energy analysis on the wavelet function of the current state, the wavelet function of the valve core normal state, the wavelet function of the spring broken state, the wavelet function of the valve core non-operating state, and the wavelet function of the valve core slightly stuck state, to obtain the energy value of the current state, the energy value of the valve core normal state, the energy value of the spring broken state, the energy value of the valve core non-operating state, and the energy value of the valve core slightly stuck state; performing normalization processing on the energy value of the current state, the energy value of the valve core normal state, the energy value of the spring broken state, the energy value of the valve core non-operating state, and the energy value of the valve core slightly stuck state, to obtain normalized energy features of the current state, the normalized energy features of the valve core normal state, the normalized energy features of the spring broken state, the normalized energy features of the valve core non-operating state, and the normalized energy features of the valve core slightly stuck state, and recording them as a feature vector in the current frequency domain, a feature vector in the frequency domain of the valve core normal, a feature vector in the frequency domain of the spring broken, a feature vector in the frequency domain of the valve core non-operating, and a feature vector in the frequency domain of the valve core slightly stuck, respectively; 3. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 2.
6. The specific formulas for calculating the wavelet function of the current state, the energy value of the current state, and the normalized energy feature of the current state are as follows: [Equation 2] where Ψ jr (t) is the wavelet function of the r-th component of the j-th layer wavelet decomposition of the current state, g is the scale parameter of the wavelet transform, g=1, 2, 3..., s, s is the maximum scale, and 1≦s≦j, and r is the position parameter of the wavelet transform; 【number】 is the second derivative of the current state, and X jr is the coefficient obtained by wavelet transform in the current state, and e j is the energy value of the j-th layer wavelet decomposition of the current state, and e j denotes the sum of the energy of the wavelet coefficients at all positions in the jth layer, r = 1, 2, 3, ..., Q, where Q is the total number of positions, and E j is the normalized energy feature of the j-th layer wavelet decomposition of the current state, 6. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 5.
7. Using the vector dataset, model training is performed on a pre-created random forest model, specifically using the C4.5 algorithm to perform the training, specifically sampling the vector dataset to generate multiple decision trees and construct the random forest model.
2. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 1.
8. The specific steps to generate multiple decision trees are: reading a vector data set and randomly extracting a plurality of groups of data to create separate random vector data sets; Dividing the random vector data set of each group of data into a vector training data set and a vector validation data set; For each group of data, starting from the root node of the vector training data set, split using the feature with the highest information gain rate, and repeating this splitting process for each subset generated by the split, recursively building a tree; halting the tree construction operation when a predefined stopping condition is reached; employing a post-pruning strategy on the constructed tree, which is performed after the tree has been fully generated, and which uses a vector validation data set to evaluate and adjust the tree before and after pruning until the tree meets a predetermined criterion; The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 7.
9. In the current diagnostic identification of the composite feature vector after the training of the random forest model is completed, the fault diagnosis method by the random forest model uses the majority voting method to obtain the final result.
2. The method for online diagnosis of faults in a solenoid valve based on characteristic analysis in the time-frequency domain according to claim 1.
Citation Information
Patent Citations
Solenoid valve fault diagnostic method based on current detection
CN103336189A