A Proportional Servo Valve Fault Diagnosis Method Based on Attention Convolutional Capsule Network

By using attention convolutional capsule network and discrete wavelet transform denoising technology in electro-hydraulic proportional servo valve fault diagnosis, the problem of the influence of multi-sensor data and random noise is solved, high-precision fault feature extraction and diagnosis are achieved, and the efficiency is improved. Diagnostic accuracy and efficiency.

CN118312879BActive Publication Date: 2024-09-24NANJING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410416031.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-09-24
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively process multi-sensor data and random noise in electro-hydraulic proportional servo valve fault diagnosis, resulting in low fault diagnosis accuracy and efficiency.

Method used

A method based on attention convolutional capsule network is used to extract intelligent fault characteristics of hydraulic proportional servo valves through discrete wavelet transform denoising and multi-channel fusion attention mechanism, suppress the influence of noise, and improve diagnosis accuracy and robustness.

Benefits of technology

It achieves high-precision fault feature extraction and diagnosis of hydraulic proportional servo valves in a random noise environment, improves the accuracy and speed of fault diagnosis, and enhances the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118312879B
    Figure CN118312879B
Patent Text Reader

Abstract

The present invention discloses a fault diagnosis method for a proportional servo valve based on an attention convolution capsule network, comprising the following steps: firstly, displacement, current, pressure and other signals of a proportional servo valve and an actuator under random noise are collected, and noise is separated from the collected signals by discrete wavelet packet transform and signal reconstruction; then, the denoised and reconstructed signals are divided into a training sample set and a test sample set; then, the training samples are input into the constructed attention convolution capsule network algorithm for training, and positive category loss, negative category loss and regularization term are used as loss functions to enhance the separation between categories and improve the generalization ability of the model; finally, the test sample set is input into the trained fault diagnosis method to perform proportional servo valve state test and intelligent fault diagnosis. In addition, the present invention is simple and easy to implement, and is suitable for intelligent and robust fault feature extraction and diagnosis of proportional servo valves under random noise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent fault diagnosis technology in mechanical equipment, specifically to a fault diagnosis method for proportional servo valves based on attention convolutional capsule networks. Background Technology

[0002] As a core component of high-end hydraulic equipment, the electro-hydraulic proportional servo valve is characterized by high precision, high reliability, and excellent control performance. It is one of the fastest-growing hydraulic components currently available and a landmark product for seizing the commanding heights of next-generation intelligent hydraulic technology. The electro-hydraulic proportional servo valve mainly consists of embedded electronic equipment, electromagnetic devices, a spool valve position sensor, and high-precision mechanical parts, exhibiting a high degree of integration. However, due to its complex and harsh working environment, often operating under high temperatures and heavy loads, it frequently experiences various types of failures during use, such as valve core jamming and proportional solenoid degradation. Therefore, achieving high-precision status sensing and fault diagnosis for electro-hydraulic proportional servo valves is particularly important.

[0003] Currently, there are two main methods for fault diagnosis of electro-hydraulic proportional servo valves: model-based fault diagnosis and data-based fault diagnosis. Model-based fault diagnosis methods consider the close relationship between model parameters and fault characteristics. Common methods include model reference, parameter identification, parity equations, and state observation. Although model-based fault diagnosis methods have been applied to electro-hydraulic proportional servo valves, establishing an accurate fault model for these valves is extremely difficult. This is mainly because the model parameters of electro-hydraulic proportional servo valves are usually unknown, limited by mechanical factors such as flow coefficient and channel geometry, and also affected by electromagnetic factors.

[0004] Therefore, data-driven fault diagnosis methods have attracted significant attention from researchers. This approach collects data during the operation of electro-hydraulic proportional servo valves and utilizes machine learning, deep learning, or other data analysis techniques to learn the feature differences between fault modes and normal behavior from complex data, thereby training a model for state identification and fault diagnosis of electro-hydraulic proportional servo valves. Extraction of state features is crucial for data-driven fault diagnosis methods. In this field, Convolutional Neural Networks (CNNs) and Capsule Networks have received particular attention due to their superior capabilities in feature extraction and pattern recognition. CNNs, through their deep structure and convolutional layers, can effectively and automatically extract useful features from raw data, which is especially important for identifying complex fault modes in electro-hydraulic proportional servo valves. However, CNNs have limitations in handling spatial hierarchical relationships, which is where Capsule Networks come in. By simulating the grouping and dynamic routing mechanisms of neurons, Capsule Networks can effectively capture the hierarchical features and spatial relationships of objects, which is crucial for understanding the complex relationships in the operating states and fault characteristics of electro-hydraulic proportional servo valves. Compared to traditional CNNs, capsule networks perform better in handling problems involving both local and global relationships, providing more accurate and robust fault diagnosis results. Therefore, introducing convolutional neural networks and capsule networks into the fault diagnosis of electro-hydraulic proportional servo valves opens up new possibilities for the state perception and fault diagnosis of these valves.

[0005] Zhu et al., in their paper "A Convolutional Neural Network Based on a Capsule Network with Strong Generalization for Bearing Fault Diagnosis," proposed a novel capsule network for bearing fault diagnosis, demonstrating better generalization ability than CNNs. Li et al., in their paper "Fault Diagnosis of Rotating Machinery Based on Dual Convolutional-Capsule Network (DC-CN)," proposed a dual convolutional capsule network for rotating machinery fault diagnosis under small sample conditions. However, unfortunately, they only considered fault diagnosis using data collected from a single sensor and did not consider using multi-sensor data.

[0006] It is important to note that data collected by a single sensor often fails to comprehensively and accurately reflect the characteristics of multiple fault types, potentially leading to inaccurate or even unidentifiable fault diagnoses. This is because different types of faults may exhibit specific characteristics across different signal dimensions, while data from a single sensor typically captures signals only from one dimension, making it difficult to cover the feature information of all fault types. Therefore, employing multi-sensor fusion-based methods has become a crucial strategy for improving the accuracy and efficiency of fault diagnosis. In this context, the ECA attention mechanism becomes an effective choice. ECA efficiently weights feature channels in multi-sensor data, highlighting features more critical for fault diagnosis while suppressing unimportant information. Through a lightweight attention model, ECA adaptively adjusts the importance of each channel, enabling the model to focus more on the features most discriminative for fault type identification, providing an efficient and effective solution for multi-sensor fusion-based fault diagnosis methods.

[0007] Considering the prevalence of random noise in real-world working environments, directly using noisy data for model learning could significantly reduce learning efficiency and prediction accuracy, as the model might mistakenly learn noisy features as valid information. Therefore, discrete wavelet packet transform (DWT) is used for data preprocessing before feeding the data into the model. DWT analyzes data at multiple resolution levels, effectively extracting useful features and separating noise from the original signal. Compared to traditional Fourier transform, wavelet transform is better suited for handling signals with abrupt changes or non-stationary characteristics because it not only focuses on the frequency characteristics of the signal but also preserves its local features in the time dimension. Furthermore, DWT, through multi-level signal decomposition, allows for finer control over noise filtering and signal reconstruction, thus better preserving key information and providing a more accurate and reliable foundation for subsequent model learning and analysis. Summary of the Invention

[0008] To achieve intelligent fault feature extraction and diagnosis of hydraulic proportional servo valves under random noise, this invention designs a proportional servo valve fault diagnosis method based on attention convolutional capsule network. The aim is to achieve intelligent fault feature extraction and diagnosis of hydraulic proportional servo valves under random noise by using discrete wavelet transform and multi-channel fusion attention mechanism, eliminating the influence of random noise on sample feature extraction, highlighting the features that are more critical to fault diagnosis, and suppressing unimportant information, thereby improving the accuracy and robustness of diagnosis.

[0009] The technical solution for implementing this invention is: a proportional servo valve fault diagnosis method based on attention convolutional capsule networks, comprising the following steps:

[0010] Step 1: Collect relevant signals of the proportional servo valve through different sensors as the original signals. Perform discrete wavelet packet transform and signal reconstruction on the original signals to remove random noise in the original signals while retaining key information in the signals, and obtain transformed data. Divide the transformed data into training sample set and test sample set according to the proportion.

[0011] Step 2: Construct an attention convolutional capsule network. The attention convolutional capsule network uses a one-dimensional convolutional network as the primary feature extractor and combines it with the ECA attention mechanism to learn the importance of different channels, thereby more effectively fusing high-level features between channels. The capsule network is used as a high-level feature extractor and the final fault classifier. The training sample set is input into the attention convolutional capsule network to train the proportional servo valve diagnostic model, and a trained fault diagnosis model is obtained.

[0012] Step 3: Input the test sample set into the trained fault diagnosis model to perform intelligent fault diagnosis and identification of the proportional servo valve status.

[0013] Compared with the prior art, the significant advantages of this invention are:

[0014] (1) This invention proposes the attention convolutional capsule network algorithm for the first time and applies it to the intelligent fault diagnosis of proportional servo valves. First, the relevant signals of the proportional servo valve are collected as the original signals. The original signals are subjected to discrete wavelet packet transformation and signal reconstruction. Then, the denoised and reconstructed signals are divided into training sample sets and test sample sets. Then, the attention convolutional capsule network algorithm is used to realize the fusion and extraction of multi-channel features. Positive class loss, negative class loss and regularization term are used as loss functions to enhance the separation between categories and improve the generalization ability of the model.

[0015] (2) The designed attention convolutional capsule network algorithm can suppress the influence of noise on fault diagnosis due to the operating environment of the proportional servo valve and the valve-related signal acquisition process compared with other algorithms; it makes full use of the advantages of the capsule network vector input vector output to learn higher-level fault features; and it improves the loss function to enable the model to learn quickly in the early stage, thereby achieving faster fault diagnosis speed and higher fault diagnosis accuracy. Attached Figure Description

[0016] Figure 1 This is a flowchart of a proportional servo valve fault diagnosis method based on attention convolutional capsule networks according to the present invention.

[0017] Figure 2 The data consists of six channels of raw time-frequency data for the electro-hydraulic proportional servo valve in normal state, severely degraded proportional electromagnet state, and severely stuck valve core state. Figure (a) represents the normal state, Figure (b) represents the severely degraded proportional electromagnet state, and Figure (c) represents the severely stuck valve core state.

[0018] Figure 3 The figures are comparisons of time-frequency data of valve drive current before and after discrete wavelet reconstruction under valve core stuck state. (a) represents the original data of valve drive current, and (b) represents the discrete wavelet reconstruction data of valve drive current.

[0019] Figure 4 This is the confusion matrix diagnosis result of the invented intelligent fault diagnosis method for electro-hydraulic proportional servo valves.

[0020] Figure 5 This is the t-SNE diagnostic result of the invented intelligent fault diagnosis method for electro-hydraulic proportional servo valves. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0022] Currently, data-driven intelligent fault diagnosis has gradually become one of the mainstream trends in intelligent fault diagnosis of electro-hydraulic proportional servo valves. To address the issue that single-collected data often fails to comprehensively and accurately reflect the characteristics of various fault types in electro-hydraulic proportional servo valves, an ECA channel attention mechanism is employed to fuse feature data from multiple sensors. Furthermore, to address the problem that the working environment of electro-hydraulic servo valves is filled with random noise interference, and that the model may mistake noise information for valid information when directly using raw data for learning, a discrete wavelet packet transform reconstruction preprocessing is performed on the raw data to improve the model's learning efficiency and prediction accuracy.

[0023] Combination Figure 1 This invention discloses a fault diagnosis method for proportional servo valves based on attention convolutional capsule networks. First, it collects and processes signals such as displacement, current, and pressure from the proportional servo valve and actuator under random noise. The collected signals are then analyzed at multiple resolution levels using discrete wavelet packet transform, effectively extracting useful feature information and separating noise from the original signals. Next, the denoised and reconstructed signals are divided into training and testing sample sets. The training samples are then input into the constructed attention convolutional capsule network algorithm for training, using positive class loss, negative class loss, and a regularization term as loss functions to enhance class separation and improve the model's generalization ability. Finally, the testing sample set is input into the trained fault diagnosis method for proportional servo valve state testing and intelligent fault diagnosis. Furthermore, this invention is simple and easy to implement, suitable for intelligent and robust fault feature extraction and diagnosis of proportional servo valves under random noise. The specific steps are as follows:

[0024] Step 1: Collect relevant signals of the proportional servo valve through different sensors as the original signals. Perform discrete wavelet packet transform and signal reconstruction on the original signals to remove random noise in the original signals while retaining key information in the signals, and obtain transformed data. Divide the transformed data into training sample set and test sample set according to the proportion.

[0025] The relevant signals of the proportional servo valve include the actual position signal of the valve core, the valve core drive current signal, the proportional servo valve A port pressure signal, the proportional servo valve B port pressure signal, and the cylinder position feedback signal, which are respectively collected by the LVDT displacement sensor, Hall current sensor, A port pressure sensor, B port pressure sensor, and linear displacement sensor.

[0026] Furthermore, the discrete wavelet packet transform and signal reconstruction processing are as follows:

[0027] To prevent noisy features from being mistakenly identified as valid information by the network model and to improve the model's state awareness and intelligent fault diagnosis capabilities, the raw data is preprocessed using Discrete Wavelet Packet Transform (DWT) before training begins. The original signal s is decomposed into multiple levels using DWT, resulting in approximation coefficients and detail coefficients at different frequency levels, as follows:

[0028] DWT(s)={cA n ,cD n ,cD n-1 ,...cD i ,...cD1}

[0029] Among them, cA n cD represents the approximation coefficient for the nth level. i Let i represent the detail coefficients at level i, where i = 1, 2, ..., n.

[0030] Assume that the high-frequency details of the signal are mainly composed of noise, and that the noise follows a Gaussian distribution. The standard deviation of the noise is estimated using the first-order detail coefficient cD1; the noise standard deviation σ1 is as follows:

[0031]

[0032] Where median() represents the median operation;

[0033] Based on the noise standard deviation σ1, the threshold λ used for denoising is calculated using the following formula:

[0034]

[0035] Here, N is the length of the signal, and the constant term k1 is greater than 1. By increasing the value of k1, the threshold can be made larger, thus making the denoising process more stringent. This threshold is used for subsequent soft thresholding.

[0036] For the detail coefficients cD obtained at each level of decomposition i Soft thresholding is applied to remove noise components smaller than a threshold. The formula for soft thresholding is:

[0037] cD' i =sign(cD) i )(|cD i |-λ) +

[0038] Among them, cD' i These are the detail coefficients after denoising, and sign(·) is the sign function. + This means only the positive value is taken.

[0039] Using the detail coefficients cD' after denoising i The denoised signal is reconstructed using inverse discrete wavelet transform (DWT). The signal reconstruction process is the inverse of DWT, merging information from various frequency levels to reconstruct the signal, as detailed below:

[0040] x′=IDWT(...IDWT(IDWT(cA n ,cD' n ),...cD' i ),cD'1)

[0041] Here, IDWT() represents the inverse discrete wavelet transform operation, which takes a pair of approximation coefficients and detail coefficients and reconstructs the signal or approximation coefficients of the previous level; x′ is the denoised signal reconstructed by discrete wavelet packet transform, which is the transformed data.

[0042] Step 2: Construct an attention convolutional capsule network. The attention convolutional capsule network uses a one-dimensional convolutional network as the primary feature extractor and combines it with the ECA attention mechanism to learn the importance of different channels, thereby more effectively fusing high-level features between channels. The capsule network is used as a high-level feature extractor and the final fault classifier. The training sample set is input into the attention convolutional capsule network to train the proportional servo valve diagnostic model, and a trained fault diagnosis model is obtained.

[0043] Furthermore, the training sample set is input into an attention convolutional capsule network to train the proportional servo valve diagnostic model, resulting in a trained fault diagnosis model, as detailed below:

[0044] The training sample set was successively processed through a one-dimensional convolutional network, an ECA attention mechanism, and a capsule network.

[0045] Step 2.1: The one-dimensional convolutional network is a four-layer network structure, and each layer contains one-dimensional convolution (Conv1D), batch normalization (BN), and Leaky ReLU activation (LReLU).

[0046] One-dimensional Conv1D Convolution: For input x, the convolution operation y is represented as:

[0047] y = W*x + b

[0048] Where * represents the convolution operation, W represents the weights of the convolution kernel, and b represents the bias;

[0049] The batch standardized y′ is represented as:

[0050]

[0051] Where μ is the mean of the batch data. is the variance of the batch data, ∈ is a constant term, 0 < ∈ < 1, and γ and β are both learnable parameters;

[0052] The expression for z in LeakyReLU is:

[0053] z = max(αy′, y′)

[0054] Where α is a constant term less than 1, and max() is the maximum value operation;

[0055] Step 2.2: After extraction by the primary feature extractor, six channel feature maps are obtained. Using the ECA attention mechanism, important feature channels are emphasized while unimportant channels are suppressed through adaptive learning of the interactions between channels, resulting in the input to the capsule network. The capsule network includes a primary capsule layer, a digital capsule layer, and an output layer. The primary capsule layer is used to further extract features from the feature maps from the ECA attention mechanism and vectorize the variable results. The digital capsule layer is used to dynamically route the vectorized features output from the primary capsule layer. This process involves calculating the correlation between different capsules and adjusting their connection weights accordingly. The output layer is responsible for converting the output of the digital capsule layer into the final prediction result. In the output layer, the multidimensional vector received from the digital capsule layer is further processed to generate the final category probability distribution, achieving fault classification.

[0056] Global average pooling (GAP) is applied to each channel to extract global context information for each channel. GAP averages all feature points of each channel into a scalar, forming a vector GAP(X) with the number of channels, i.e.:

[0057]

[0058] Where X is the feature map extracted by the primary feature extractor, N1 is the length of the feature map, and x d It is the value of the feature map at the d-th position;

[0059] One-dimensional convolutional kernels are used to capture local dependencies between channels. In ECA, the kernel size is adaptively determined and is typically calculated based on the number of channels. For six-channel data, the kernel size k2 is determined using the following formula:

[0060]

[0061] In the above formula, σ is an intermediate function used to ensure that k2 is odd; φ and γ1 are hyperparameters, and c is the number of channels; the purpose of this step is to generate a vector representing the channel weights. The output of the one-dimensional convolution is passed through a sigmoid activation function, which normalizes the weights to between 0 and 1, representing the importance of each channel.

[0062] The calculated channel weights are then applied to the feature maps of each channel after they have been extracted by the primary feature extractor, thereby achieving channel recalibration, i.e., the output of each channel will be multiplied by the corresponding weight.

[0063] The primary capsule layer consists of 16 parallel, regular convolutional layers stacked together. The output features y from the attention layer are used... attention As input, the feature mapping of the primary capsule layer is obtained as h. PAttention After dimensional transformation, 200 primary capsules h can be obtained. PCaps Each primary capsule is a vector. The primary capsule layer uses the non-linear Squashing function as the activation function, which can shrink the length of the input vector to within [0, 1] without changing its direction. The magnitude of the vector represents the probability of the feature existing. The Squashing function is:

[0064]

[0065] The digital capsule layer takes the output of the primary capsule layer as input and introduces a dynamic routing protocol algorithm between adjacent capsule layers to establish a complex nonlinear mapping between lower-level and higher-level capsules through clustering. The relationship between lower-level and higher-level capsules is part-whole; lower-level capsules tend to pass their output to higher-level capsules with higher "protocols." Based on the magnitude of the inter-capsule "protocol," the dynamic routing protocol algorithm can enhance or weaken the connection probability between corresponding capsule pairs. The calculation and update process of the dynamic routing protocol algorithm is as follows: the feature mapping of the output of the e-th capsule in the primary capsule layer... Multiply by the transformation matrix Obtain the intermediate prediction vector

[0066]

[0067] For the f-th capsule d in the digital capsule layer f It consists of the intermediate prediction vectors of all the lower-level capsules connected to it. The weighted sum is obtained, and capsule d f After mapping using the Squashing function, the feature map of the output of the higher capsule layer can be obtained.

[0068]

[0069]

[0070] Among them, c e,f The coupling coefficient, also known as the weighting coefficient, is the factor that determines the connection probability between lower-level capsules and higher-level capsules. For the e-th lower-level capsule, the coupling coefficient c with all higher-level capsules is... e,· The sum is 1;

[0071] Coupling coefficient c e,f Calculated using the Softmax function:

[0072]

[0073] Among them, b e,f Let f be the algebraic prior probability of connecting the e-th lower-level capsule with the f-th higher-level capsule.

[0074] For all possible categories of b e,g Sum the exponents; G is the total number of categories, and the current category g = 1, 2, ..., G; b e,f The initial value is 0. In each subsequent iteration, it is adjusted by the "protocol" value a. e,f Update by addition, i.e.: b i,j The initial value is 0, and it is updated in each subsequent iteration by adding it to the "protocol" value, that is:

[0075] b e,f =b e,f +a e,f

[0076] Among them, the value a of "protocol" e,f Defined as intermediate prediction vector Feature mapping with the output of higher capsule layers The dot product, which detects the similarity between the capsule input and output, is calculated by the dynamic routing protocol algorithm Routing().

[0077]

[0078] After multiple iterations and updates of the dynamic routing protocol algorithm, the final output feature mapping of the high-level capsule can be obtained. and its corresponding coupling coefficient c e,f ; <·> indicates dot product operation;

[0079] The output layer calculates the magnitude of the output vector for each category, and then uses the softmax function to calculate the probability of each category.

[0080] Let v j Let j be the output vector of the j-th class in the digital capsule layer;

[0081] Calculate the vector magnitude for each category, i.e., the length of the vector:

[0082] l f =||v f ||

[0083] Among them, l f Let f be the magnitude of the output vector for class f. The Softmax function is used to calculate the probability of each class.

[0084]

[0085] Where P(y=f|v) represents the probability that the data belongs to category f given vector v, f=1,2,3...h, h is the total number of categories in the output layer, and the summation operation is performed on all possible output layer categories.

[0086] Step 2.3: Use the positive class loss, negative class loss, and regularization term as the loss function for the attention convolutional capsule network. For each class k, the loss function L... k Defined as:

[0087]

[0088] Among them, v k T is the length of the capsule output vector of category k. k It is an indicator variable, equal to 1 when category k is the correct category, and 0 otherwise; m + and m - λ1 is the threshold for positive and negative margins, λ2 is a scaling parameter used to balance the loss of positive and negative examples, ||·|| represents the norm operation, and λ2 is the regularization coefficient. ii Represents the weights in the network;

[0089] Step 2.4: Input the training sample set into the attention convolutional capsule network to train the proportional servo valve diagnostic model. Update the weight parameters by minimizing the loss function to obtain the trained fault diagnosis model.

[0090] Step 3: Input the test sample set into the trained fault diagnosis model to perform intelligent fault diagnosis and identification of the proportional servo valve status.

[0091] Example 1: Data Verification of Proportional Servo Valve Fault Simulation Test Bench

[0092] The data used in this experiment comes from a proportional servo valve fault simulation test bench, such as... Figure 2 As shown, the platform consists of a data acquisition and control module, pressure sensors, LVDT displacement sensors, Hall current sensors, an electro-hydraulic proportional servo valve test bench, hydraulic actuators, a hydraulic pump station, and other auxiliary equipment. The proportional servo valve under test is a four-position three-way valve; the LVDT displacement sensor is installed inside the proportional servo valve solenoid to measure the valve core displacement signal; the Hall current sensor is installed between the proportional solenoid coil and the valve controller inside the valve to measure the coil current signal; pressure sensors are installed at ports A and B of the valve to acquire pressure signals under different valve health conditions.

[0093] This experiment designed seven sets of experiments to correspond to seven health states of a hydraulic proportional servo valve, with each set of experiments using the same experimental parameters. The experiments mainly covered two categories of common proportional servo valve faults: valve core jamming and proportional solenoid degradation. Valve core jamming is primarily addressed by using a proportional solenoid of the same model as the original proportional servo valve, such as... Figure 2 As shown. The proportional solenoid can control the valve core, causing it to move sluggishly or become completely stuck. The output force of the simulated proportional solenoid is 10%, 30%, and 50%, corresponding to mild, moderate, and severe jamming. By connecting a shunt resistor in parallel to reduce the solenoid current, the aging fault of the valve proportional solenoid coil is simulated. The specific description of the experimental dataset is shown in Table 1. The control module is set with an oil supply pressure of 6.9 MPa, a sensor data acquisition frequency of 100 Hz, an acquisition time of approximately 30 minutes, and a proportional servo valve commutation cycle of 10 seconds. Each fault feature dataset consists of six types of data: actual valve core position signal, valve core drive current signal, proportional servo valve A port pressure, proportional servo valve B port pressure, cylinder position feedback signal, and valve core given position signal, with approximately 180k data points for each type.

[0094] Table 1. Fault Types and Fault Locations

[0095]

[0096] The time-domain waveforms of a proportional servo valve under random noise conditions are shown in Figure 1, Figure 2, and Figure 3, respectively, under normal operation (a), severe degradation of the proportional electromagnet (b), and severe valve core jamming (c). Figure 3 As shown, the degradation of the proportional electromagnet has a certain impact on the valve spool position, resulting in a discrepancy between the actual and given valve spool position. Valve spool jamming also affects the valve spool position, and the valve drive current increases due to the jamming.

[0097] To address the impact of random noise on fault diagnosis of proportional servo valves based on attention convolutional capsule networks, discrete wavelet transform is performed on the original data to obtain approximation coefficients and detail coefficients. Soft thresholding is then used to remove noise smaller than the threshold, and the processed coefficients are used to reconstruct the signal. Figure 4 The data shows the valve core stuck state, the original data of the valve drive current, and the data after discrete wavelet reconstruction. It can be seen that the random noise in the data is significantly reduced after discrete wavelet reconstruction.

[0098] Using 1000 sample points as a single data point, the data was segmented into multiple samples. An overlap ratio was set to increase the number of samples, resulting in 1750 samples. These were then divided into a 60% training set and a 40% test set, resulting in 1050 training samples and 700 test samples. The attention-based convolutional capsule network was fully trained using the training samples, and its performance was evaluated using the test samples. Figure 5 The confusion matrix of the attention-based convolutional capsule network, evaluated using the test sample set, is shown. From... Figure 5 As can be seen, the proposed method can achieve 100% accuracy in diagnosing faults in proportional servo valves under random noise conditions.

[0099] In summary, to address the issue of traditional intelligent fault diagnosis methods' poor performance in extracting fault features and intelligently diagnosing proportional servo valves under random noise, this invention designs a proportional servo valve fault diagnosis method based on attention-based convolutional capsule networks. The designed fault diagnosis method utilizes tools such as discrete wavelet packet transform reconstruction, ECA attention mechanism, convolutional neural networks, and capsule networks to denoise, fuse multiple channels, and extract features from the original data. Finally, experimental data from proportional servo valves validates the effectiveness of this invention.

[0100] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A proportional servo valve fault diagnosis method based on attention convolutional capsule network, characterized in that: The following steps are involved: Step 1: Through different sensors, collect the relevant signals of the proportional servo valve as the original signals, perform discrete wavelet transform and signal reconstruction on the original signals, remove the random noise in the original signals, and retain the key information in the signals to obtain the transformed data. The transformed data is divided into a training sample set and a test sample set in proportion, as follows: The original signal s is decomposed into approximate coefficients and detail coefficients at different frequency levels using discrete wavelet transform DWT, which is expressed as: DWT(s)={cA n ,cD n ,cD n-1 ,...cD i ,...cD1} Among them, cA n represents the approximate coefficient of the nth order, cD i Represents the detail coefficient of the i-th level, i=1, 2...n; The standard deviation of the noise is estimated, and the first-level detail coefficient cD1 is used to estimate the standard deviation of the noise in the signal σ1; the standard deviation of the noise σ1 is as follows: Among them, median() represents the median operation; Based on the noise standard deviation σ1, the threshold λ for denoising is calculated as follows: Where N is the length of the signal, and the constant term k1 is greater than 1; For each level of decomposition, the detail coefficient cD i , apply soft threshold processing to remove noise components less than the threshold. The formula for soft threshold processing is: CD' i =sign(cD i )(CD i |-λ) + Among them, cD' i is the detail coefficient after denoising, sign(·) is the sign function, (·) + Indicates that only the positive value part is taken; Using the denoised detail coefficient cD' i , the denoised signal is reconstructed by inverse discrete wavelet transform. The process of signal reconstruction is the inverse process of DWT, which combines the information of each frequency level to reconstruct the signal, as follows: x′=IDWT(…IDWT(IDWT(cA n ,cD' n ),…cD' i ),cD'1) Wherein, IDWT() represents the inverse discrete wavelet transform operation, which receives a pair of approximation coefficients and detail coefficients and reconstructs the signal or approximation coefficients of the previous level; x′ is the denoised signal reconstructed by discrete wavelet transform, that is, the transformed data; Step 2: Construct an attention convolution capsule network. The attention convolution capsule network uses a one-dimensional convolution network as a primary feature extractor and combines it with the ECA attention mechanism to learn the importance of different channels, thereby more effectively integrating high-level features between channels and using the capsule network as a high-level feature extractor and the final fault classifier. The training sample set is input into the attention convolution capsule network to train the proportional servo valve diagnosis model and obtain a trained fault diagnosis model. Among them, the training sample set is input into the attention convolution capsule network to train the proportional servo valve diagnosis model, and the trained fault diagnosis model is obtained, as follows: Step 2.1: The training sample set passes through the one-dimensional convolutional network, ECA attention mechanism and capsule network successively; the one-dimensional convolutional network has a four-layer network structure, and each layer of the network contains one-dimensional convolution Conv1D, batch normalization BN and LeakyReLU activation LReLU; One-dimensional convolution Conv1D: For input x, the convolution operation y is expressed as: y=W*x+b Among them, * is the convolution operation, W is the weight of the convolution kernel, and b is the bias; The batch normalization y′ is expressed as: Among them, μ is the mean of the batch data, is the variance of the batch data, ∈ is a constant term, 0<∈<1, and γ and β are both learnable parameters; The expression z of LeakyReLU is: z=max(αy′,y′) Where α is a constant term less than 1, and max() is a maximum value operation; Step 2.2: After being extracted by the primary feature extractor, feature maps of six channels are obtained. The ECA attention mechanism is used to adaptively learn the interaction between channels, emphasize important feature channels, and suppress unimportant channels to obtain the input of the capsule network; the capsule network includes a primary capsule layer, a digital capsule layer, and an output layer, wherein: the primary capsule layer is used to further extract features from the feature map from the ECA attention mechanism and vectorize the variable results; the digital capsule layer is used to dynamically route the vectorized features output by the primary capsule layer; this process involves calculating the degree of association between different capsules and adjusting their connection weights accordingly; the output layer is responsible for converting the output of the digital capsule layer into the final prediction result. In the output layer, the multidimensional vector received from the digital capsule layer is further processed to generate the final category probability distribution to achieve fault classification; Among them, the digital capsule layer takes the output of the primary capsule layer as input, and introduces a dynamic routing protocol algorithm between two adjacent capsule layers to establish a complex nonlinear mapping between low-level capsules and high-level capsules in a clustering manner; the relationship between low-level capsules and high-level capsules is a part-whole relationship, and low-level capsules tend to pass their outputs to high-level capsules with higher protocols; according to the size of the agreement between capsules, the dynamic routing protocol algorithm is used to enhance or weaken the connection probability between corresponding capsule pairs; The calculation and update process of the dynamic routing protocol algorithm is as follows: The feature map output by the e-th capsule in the primary capsule layer Multiply by the transformation matrix W e,f Get the intermediate prediction vector For the fth capsule d of the digital capsule layer f , which consists of the intermediate prediction vectors of all the lower-level capsules connected to it The weighted sum of is obtained, and capsule d f After Squashing function mapping, the feature map of the high-level capsule layer output is obtained Among them, c e,f is the coupling coefficient, also known as the weight coefficient; the connection probability between the low-level capsule and the high-level capsule is directly determined by the size of the coupling coefficient. For the e-th low-level capsule, the sum of the coupling coefficients with all high-level capsules is 1; Coupling coefficient c e,f Calculated by the Softmax function: Among them, b e,f is the algebraic prior probability of the connection between the e-th low-level capsule and the f-th high-level capsule; For all possible categories of b e,g Take the index and sum it; G is the total number of categories, the current category g=1,2,……,G; b e,f The initial value is 0. In each subsequent iteration, the protocol value a e,f Update by adding, that is: b e,f =b e,f +a e,f Among them, the protocol value a e,f Defined as the intermediate prediction vector Feature map output from high-level capsule layer The dot product of is calculated by the dynamic routing protocol algorithm Routing(): After multiple iterations of the dynamic routing protocol algorithm, the final output feature map of the high-level capsule can be obtained. and its corresponding coupling coefficient c e,f ; <·> represents dot product operation; In the output layer, the modulus length of the output vector of each category is calculated, and then the softmax function is used between categories to calculate the probability of each category; Let v f is the output vector of the fth class in the digital capsule layer; Calculate the vector magnitude for each category: l f =||v f || Among them, l f is the output vector modulus of category f, and the Softmax function is used to calculate the probability of each category: Where P(y=f|v) represents the probability that the data belongs to category f when a given vector v is given, f=1,2,3...h, h is the total number of categories in the output layer, and the ∑ summation operation is performed on all possible output layer categories; Step 2.3: Use the positive category loss, negative category loss and regularization term as the loss function of the attention convolution capsule network. For each category k, the loss function L k Defined as: Among them, v k is the length of the capsule output vector of category k, T k is an indicator variable, which is 1 if category k is the correct category and 0 otherwise; m + and m - is the threshold of positive and negative margins, λ1 is a scaling parameter used to balance the loss of positive and negative examples, ||·|| represents the norm operation, λ2 is the regularization coefficient, and w ii Represents the weight in the network; Step 2.4: Input the training sample set into the attention convolution capsule network to train the proportional servo valve diagnosis model, update the weight parameters by minimizing the loss function, and obtain the trained fault diagnosis model; Step 3: Input the test sample set into the trained fault diagnosis model to perform intelligent fault diagnosis and identification of the proportional servo valve state.

2. According to claim 1, a proportional servo valve fault diagnosis method based on attention convolutional capsule network is characterized in that: In step 1, the relevant signals of the proportional servo valve include the actual valve core position signal, the valve core drive current signal, the proportional servo valve A port pressure signal, the proportional servo valve B port pressure signal and the cylinder position feedback signal respectively collected by the LVDT displacement sensor, the Hall current sensor, the A port pressure sensor, the B port pressure sensor and the linear displacement sensor.

3. According to claim 1, a proportional servo valve fault diagnosis method based on attention convolutional capsule network is characterized in that: In step 2.2, after being extracted by the primary feature extractor, feature maps of six channels are obtained. The ECA attention mechanism is used to adaptively learn the interaction between channels, emphasize important feature channels, and suppress unimportant channels to obtain the input of the capsule network, as follows: First, global average pooling GAP is performed on each channel to extract the global context information of each channel; GAP averages all feature points of each channel into a scalar to form a vector GAP(X) with the dimension of the number of channels, that is: Among them, X is the feature map extracted by the primary feature extractor, N1 is the length of the feature map, and x d is the value of the feature map at the dth position; Next, a one-dimensional convolution kernel is used to capture the local dependencies between channels. In ECA, the size of the convolution kernel is adaptively determined based on the number of channels. For six-channel data, the size of the convolution kernel k2 is determined by the following formula: In the above formula, σ is an intermediate function to ensure that k2 is an odd number; φ and γ1 are both hyperparameters, and Ch is the number of channels; the output of the one-dimensional convolution passes through a Sigmoid activation function to normalize the weights to between 0 and 1; Finally, the calculated channel weights are applied to the feature maps of each channel after extraction by the primary feature extractor, thereby achieving channel recalibration, that is, the output of each channel will be multiplied by the corresponding weight.

4. According to claim 3, a proportional servo valve fault diagnosis method based on attention convolutional capsule network is characterized in that: In step 2.2, the primary capsule layer is composed of multiple parallel one-dimensional convolutional layers stacked together, each of which captures different types of features; Take the output feature y of the attention layer attention As input, the feature map of the primary capsule layer is h PAttention , after dimensional transformation, multiple primary capsules h are obtained PCaps , each primary capsule is a vector; the primary capsule layer uses the nonlinear function Squashing function as the activation function, which shrinks the length of the input vector to [0, 1] without changing its direction. The modulus of the vector represents the probability of the feature existing; the Squashing function is: Among them, s jj is the vector input, v jj is the output of the Squashing function.