A solenoid valve fault diagnosis method and system based on a long short-term memory recurrent neural network
By constructing an LSTM-based solenoid valve fault diagnosis network, the problem of the inability to predict solenoid valve faults in advance in existing technologies is solved, realizing the automation, accurate prediction and diagnosis of solenoid valve faults, and improving the safety and reliability of equipment.
Patent Information
- Application Number
- CN202611379871.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-20
AI Technical Summary
Existing methods for detecting solenoid valve faults cannot predict the time of fault occurrence in advance. Traditional methods can only determine the location after the fault occurs. Furthermore, neural network-based methods have difficulty capturing the temporal characteristics of solenoid valve voltage and current signals, resulting in poor detection performance.
A fault diagnosis network for solenoid valves is constructed using a long short-term memory recurrent neural network (LSTM). Data from the solenoid valves is collected by sensors, Gaussian noise is added and normalized, and the LSTM network is trained to capture the timing information of current and voltage waveforms. Fault discrimination logic is then set up for diagnosis.
It enables automated prediction and accurate diagnosis of solenoid valve faults, avoiding the impact of faults on equipment operation, reducing reliance on manual inspection, and improving the accuracy and real-time performance of fault prediction.
Smart Images

Figure CN123138666A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solenoid valve fault diagnosis technology, and in particular to a solenoid valve fault diagnosis method and system based on long short-term memory recurrent neural network. Background Technology
[0002] Solenoid valves, as core actuators in automated control systems, are widely used in aerospace, petrochemical, power systems, and intelligent manufacturing. Their operating status directly affects the safety and reliability of the entire system. Because solenoid valves operate under high-frequency, high-pressure, or corrosive environments for extended periods, they are prone to malfunctions such as coil aging and abnormal loads. Once a solenoid valve fails and malfunctions, it can lead to serious threats to personnel safety and economic losses.
[0003] Fault detection and timing prediction for mechanical equipment is a problem that requires careful consideration of the equipment's characteristics. Traditional methods generally include system model-based and signal feature-based fault detection methods. However, system model-based fault detection methods are generally suitable for large-scale mechanical equipment and automated control systems, and can typically only be used to determine the location of the fault after it has occurred. While signal feature-based fault detection methods are suitable for small components such as solenoid valves, they still cannot predict the timing of the fault in advance.
[0004] In recent years, neural network-based fault detection methods have, to some extent, solved the problems of traditional methods' inability to accurately predict fault occurrence time and the difficulty in achieving automated detection. Feedforward neural networks (BP neural networks) can theoretically fit any nonlinear function, while convolutional neural networks excel at capturing and analyzing features in image signals. Both network structures play significant roles in fault detection and prediction. However, for objects requiring fault detection, such as solenoid valves, the readily available signals reflecting their operating state are often voltage or current. Current and voltage signals change rapidly and are often periodic, exhibiting significant temporal characteristics. The aforementioned two types of networks typically cannot capture these long-term temporal features, leading to poor fault detection performance. Summary of the Invention
[0005] This invention provides a method and system for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network, in order to solve the technical problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows: This invention provides a method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network, comprising the following steps: S1. Collect the solenoid valve's operating data through sensors, including the solenoid valve's operating data under various conditions, including normal state and several fault states. S2. Add Gaussian noise to the operating data of the solenoid valve under various conditions and randomly splice them to obtain training set and test set. Then normalize the training set and test set. S3. Construct a solenoid valve fault diagnosis network based on a long short-term memory recurrent neural network. The solenoid valve fault diagnosis network includes a long short-term memory recurrent neural network, a fully connected layer, and an output layer connected in sequence. S4. Train the solenoid valve fault diagnosis network using the normalized training set to obtain the trained solenoid valve fault diagnosis network; test the trained solenoid valve fault diagnosis network using the normalized test set. If the test results do not meet the preset target, adjust the trained solenoid valve fault diagnosis network until the preset target is met to obtain the final solenoid valve fault diagnosis network. S5. Based on the waveform characteristics of each fault occurrence, set the fault discrimination logic to identify and classify the fault. Then, use the final solenoid valve fault diagnosis network and fault discrimination logic to diagnose other solenoid valves and obtain the diagnosis results.
[0007] Furthermore, step S1 specifically includes the following steps: S11. Collect the operating data of the solenoid valve through the sensor, including the voltage waveform data and / or current waveform data of the solenoid valve under normal conditions and under several fault conditions. S12. Then, name these voltage waveform data and / or current waveform data respectively, and convert these voltage waveform data and / or current waveform data into one-dimensional vectors of a specified length to obtain waveform vectors. ; Furthermore, step S2 specifically includes the following steps: S21. Perform one-hot encoding on the operating data of the solenoid valve under multiple states, and then add Gaussian noise to the operating data of the solenoid valve under multiple states to obtain operating data with added Gaussian noise. S22. Then, the running data with added Gaussian noise is randomly spliced to obtain the network input data. Input data Each element in ,in Represents waveform vector The first in k One element; Represents element One-hot encoding of the waveform; T Indicate transpose; then the input data Divided into training set and test set; S23. Then, normalize the training set and the test set respectively to obtain the normalized training set and the test set.
[0008] Furthermore, the expression for the Gaussian noise is: ; in, Indicates targeting element The intensity of the applied noise; Elements representing the solenoid valve's operating data under various states, with subscripts. i Indicates the first solenoid valve i State, subscript j This indicates the position of the current element in the corresponding one-dimensional vector; The representative data mean, Represents standard deviation, standard deviation It determines the intensity of Gaussian noise.
[0009] Furthermore, the expression for the normalization process is: ; in, It is an element The initial waveform value; It is the vector of all waveforms The minimum value in, It is among all waveform vectors The maximum value in, Represents element The waveform values after normalization.
[0010] Furthermore, the long short-term memory recurrent neural network includes two stacked LSTM layers and a Dropout layer; the Dropout layer is connected between the two stacked LSTM layers. The Dropout layer is used to randomly shut down some neurons during training to prevent the solenoid valve fault diagnosis network from overfitting; the LSTM layer is used to directly process the current waveform data and / or voltage waveform data of the solenoid valve and capture the timing information therein; the LSTM layer contains 3 gates, and the output value of each gate is calculated using the following formula; ; in, This indicates the output value of the corresponding gate; This represents the sigmoid activation function; , This is the weight matrix; This is the input vector at the current moment, i.e., the first input vector; This is the hidden state from the previous moment; This is the first bias vector.
[0011] Furthermore, the fully connected layer is used to map the output of the last LSTM layer to the final output of the solenoid valve fault diagnosis network using the following formula; ; in, Indicates the output of the fully connected layer; It is another weight matrix; It is the input vector, that is, the second input vector; This is the second bias vector.
[0012] Furthermore, step S4 specifically includes the following steps: S41. Set training-related parameters, including learning rate, batch size, and number of training epochs, and select the loss function; S42. Train the solenoid valve fault diagnosis network using the training set, and calculate the loss value corresponding to the current training round based on the loss function during each training process; then adjust the parameters of the solenoid valve fault diagnosis network based on the loss value until the loss function converges, and obtain the trained solenoid valve fault diagnosis network. S43. Test the trained solenoid valve fault diagnosis network using the test set. If the test results do not meet the preset target, adjust the trained solenoid valve fault diagnosis network, including adjusting the training strategy and loss function, until the preset target is met, and obtain the final solenoid valve fault diagnosis network.
[0013] Furthermore, the loss function in S42 is as follows: ; in, Indicates the loss value; Indicates input data Data length; Represents the actual value of the data. f Indicates the current data length.
[0014] In another aspect, the present invention provides a solenoid valve fault diagnosis system, including a device end, which has a built-in final solenoid valve fault diagnosis network, and the device end is configured to execute the solenoid valve fault diagnosis method described above.
[0015] The beneficial effects of this invention are: 1. This invention discloses a solenoid valve fault diagnosis method based on a long short-term memory recurrent neural network. It uses a solenoid valve fault diagnosis network to predict faults and can provide early warnings before faults occur, thus avoiding sudden solenoid valve failures that could affect the normal operation of equipment and delay work progress. At the same time, this invention realizes automated fault monitoring of equipment such as solenoid valves, eliminating the need for manual inspection. Since the solenoid valve fault diagnosis network has corresponding fault discrimination logic and detection standards, it also avoids the dependence of manual inspection on experience.
[0016] 2. Considering that the waveform data of the solenoid valve has obvious temporal characteristics, this invention adopts a long short-term memory recurrent neural network, which can effectively utilize the temporal information in the data to predict faults. Compared with other networks, the long short-term memory recurrent neural network can remember the long-term trends and information in the temporal data, and has better performance when processing temporal data.
[0017] 3. The solenoid valve fault diagnosis method provided by this invention can achieve automated prediction of solenoid valve faults while ensuring the accuracy and real-time performance of fault prediction, and has practical application value. Attached Figure Description
[0018] Figure 1 This is a flowchart of the solenoid valve fault diagnosis method in this invention; Figure 2 The waveforms generated by the solenoid valve during normal operation in this embodiment of the invention are shown below, where the upper waveform is a current waveform and the lower waveform is a voltage waveform. Figure 3 The waveforms generated when the solenoid valve outputs an overload or short circuit fault in an embodiment of the present invention are shown below, where the upper waveform is a current waveform and the lower waveform is a voltage waveform. Figure 4 The waveforms shown are generated when the solenoid valve demagnetizes or experiences an abnormal load failure in an embodiment of the present invention, wherein the upper waveform is a current waveform and the lower waveform is a voltage waveform; Figure 5 This is a schematic diagram of the LSTM layer in the solenoid valve fault diagnosis network of the present invention; Figure 6 This is a schematic diagram of the fully connected layer within the solenoid valve fault diagnosis network of the present invention; Figure 7 This is a schematic diagram of the solenoid valve fault diagnosis network in this invention; Figure 8 This is a comparison chart of the network prediction results and the actual values of the solenoid valve under normal conditions in an embodiment of the present invention; Figure 9 This is a comparison chart of the network prediction results and the actual values when the solenoid valve output is overloaded or short-circuited in an embodiment of the present invention. Figure 10 This is a comparison chart of the network prediction results and the actual values when the solenoid valve is demagnetized or loaded in an embodiment of the present invention. Detailed Implementation
[0019] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many other different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0020] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0021] Reference Figure 1 This application provides a method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network, comprising the following steps: S1. Collect the operating data of the solenoid valve through sensors, including the operating data of the solenoid valve under various conditions, including normal state and various fault states. S2. Add Gaussian noise to the operating data of the solenoid valve under various conditions, and randomly splice the data. Then divide the data according to a set ratio (e.g., 4:1) to obtain the training set and the test set. Then normalize the training set and the test set. S3. Construct a solenoid valve fault diagnosis network based on a long short-term memory recurrent neural network. Due to the unique structure of the long short-term memory recurrent neural network, it can remember the temporal information in the input data, making it suitable for processing current waveform data and / or voltage waveform data in solenoid valves. It can also predict waveforms within a future period based on features extracted from the waveform data, thereby achieving the effect of early detection and warning of solenoid valve faults. Therefore, this invention incorporates a long short-term memory recurrent neural network into the solenoid valve fault diagnosis network. Specifically, the solenoid valve fault diagnosis network includes a long short-term memory recurrent neural network, a fully connected layer, and an output layer connected in sequence. S4. Train the solenoid valve fault diagnosis network using the normalized training set to obtain the trained solenoid valve fault diagnosis network; test the trained solenoid valve fault diagnosis network using the normalized test set. If the test results do not meet the preset target, adjust the trained solenoid valve fault diagnosis network until the preset target is met to obtain the final solenoid valve fault diagnosis network. S5. Based on the waveform characteristics of each fault occurrence, set the fault discrimination logic to identify and classify the fault. Then, use the final solenoid valve fault diagnosis network and fault discrimination logic to diagnose other solenoid valves and obtain the diagnosis results.
[0022] This invention employs a solenoid valve fault diagnosis network to predict faults, providing early warnings before faults occur, thus preventing sudden solenoid valve failures that could disrupt normal equipment operation and delay work progress. Simultaneously, this invention achieves automated fault monitoring for devices like solenoid valves, eliminating the need for manual inspection. Furthermore, the solenoid valve fault diagnosis network has corresponding fault discrimination logic and detection standards, avoiding reliance on experience in manual inspection.
[0023] Furthermore, the solenoid valve fault diagnosis method provided by this invention can achieve automated prediction of solenoid valve faults while ensuring the accuracy and real-time performance of fault prediction, thus having practical application value.
[0024] In some embodiments, S1 specifically includes the following steps: S11. Collect operating data of the solenoid valve through sensors, including voltage waveform data and / or current waveform data of the solenoid valve under normal conditions and two fault conditions; wherein, the waveform data of the solenoid valve under normal conditions is shown in [reference needed]. Figure 2 As shown; in this embodiment, the two fault states are the waveform data generated when the solenoid valve output is overloaded or short-circuited, and the waveform data generated when the solenoid valve is demagnetized or has an abnormal load, as shown in the figures below. Figure 3 and Figure 4 As shown; S12. Then, name these voltage waveform data and / or current waveform data respectively, among which the waveform data of the solenoid valve under normal conditions is named as follows: The waveform data generated when the solenoid valve outputs an overload or short circuit fault is named as follows: The waveform data generated when the solenoid valve demagnetizes or experiences an abnormal load is named as follows: ; Then, these voltage waveform data and / or current waveform data are converted into one-dimensional vectors of a specified length (e.g., length 20), resulting in the waveform vectors of the corresponding waveform data. ; In some embodiments, S2 specifically includes the following steps: S21. To enable the solenoid valve fault diagnosis network to obtain more information during training, one-hot encoding is performed on the solenoid valve operating data under various states, resulting in waveform data. The encoding of each element in for waveform data The encoding of each element in for waveform data The encoding of each element in for Then, in order to simulate the external influences on the current in the real working environment of the solenoid valve and improve the generalization ability and robustness of the solenoid valve fault diagnosis network, the operating data (i.e., waveform data) were analyzed. Waveform data Waveform data Add Gaussian noise to obtain the running data with Gaussian noise added; S22. Then, the running data with added Gaussian noise is randomly spliced, and three waveforms (waveform data) are spliced during the splicing process. , , The proportions are 0.9, 0.05, and 0.05 respectively. The sliding window method is used to obtain the label corresponding to the input waveform. Taking the prediction of the last 10 data using the first 20 data as an example, the first input waveform data is the 1st to 20th waveform data, and the corresponding label is the 21st to 30th waveform data. Then, the window of the input waveform data and the window of the label are moved forward by one time step to obtain the next set of input waveform data and its corresponding label until the window reaches the end of the data. At this point, the network input data has been obtained. Input data Each element in ,in Represents waveform vector The first in k One element; Represents element One-hot encoding of the waveform; T Indicate transpose; then the input data The dataset is divided into training and testing sets according to a set ratio (e.g., 4:1). S23. Then, normalize the training and test sets respectively. This is because the activation functions in the LSTM layer are mainly the sigmoid and hyperbolic tangent functions tanh, with output intervals of (0,1) and (1,1) respectively. If the input data is not normalized, the output values of the solenoid valve fault diagnosis network will be abnormal. Since one-hot encoding can only take values of 0 or 1, only the input data needs to be normalized. elements within each element in Normalization can be performed to obtain the normalized training and test sets.
[0025] In some embodiments, the expression for the Gaussian noise is: ; in, Indicates targeting element The intensity of the applied noise; Elements representing the solenoid valve's operating data under various states, with subscripts. i Indicates the first solenoid valve i a state, subscript j This indicates the position of the current element in the corresponding one-dimensional vector. ; This represents the mean of the data, which is set to 0 here. Represents standard deviation, standard deviation The strength of Gaussian noise is determined by the standard deviation of the operating data, which is usually taken as 0.01 to 0.05 times.
[0026] In some embodiments, the expression for the normalization process is: ; in, It is an element The initial waveform value; It is the vector of all waveforms The minimum value in, It is among all waveform vectors The maximum value in, Represents element The waveform values after normalization.
[0027] In some embodiments, the long short-term memory recurrent neural network includes two stacked LSTM layers and a Dropout layer; the Dropout layer is connected between the two stacked LSTM layers. The dropout layer is used to randomly disable some neurons during training to prevent overfitting in the solenoid valve fault diagnosis network. The dropout layer will disable during testing. The LSTM layer is used to directly process the current and / or voltage waveforms of the solenoid valve, capturing the timing information within. The LSTM layer is the core of the solenoid valve fault diagnosis network, and its structural diagram is shown below. Figure 5 As shown; the LSTM layer contains 3 gates (i.e. Figure 5 middle For each door, the output value is calculated using the following formula; ; in, This indicates the output value of the corresponding gate; This represents the sigmoid activation function; , This is the weight matrix; This is the input vector at the current moment, i.e., the first input vector; This is the hidden state from the previous moment; This is the first bias vector. As the formula shows, the LSTM layer can selectively retain and pass on information from the previous time step, which is key to its memory capability. Figure 5 middle, Indicates the current state of the cell; The symbol + indicates the cell state at the previous moment; the symbol × indicates element-wise multiplication.
[0028] Considering that the waveform data of solenoid valves has obvious temporal characteristics, this invention adopts a long short-term memory recurrent neural network, which can effectively utilize the temporal information in the data to predict faults. Compared with other networks, the long short-term memory recurrent neural network can remember long-term trends and information in the temporal data, and has better performance when processing temporal data.
[0029] In some embodiments, the fully connected layer is used to map the output of the last LSTM layer to the final output of the solenoid valve fault diagnosis network using the following formula; ; in, Indicates the output of the fully connected layer; It is another weight matrix; It is the input vector, that is, the second input vector; This is the second bias vector. A schematic diagram of the fully connected layer is shown below. Figure 6 As shown, in Figure 6 middle, The first fully connected layer represents the... n input vectors, This represents the m-th output vector of the fully connected layer; , The weight matrix represents the structure of the solenoid valve fault diagnosis network, as shown below. Figure 7 As shown, in this embodiment, each of the two LSTM layers has 256 neurons, the fully connected layer has 256 hidden layer neurons, and the output layer has 10 neurons.
[0030] In some embodiments, S4 specifically includes the following steps: S41. Set training parameters, including learning rate, batch size, and training epochs, and select the loss function. In this example, we choose to use adaptive learning rate. Set the initial value of the learning rate to a relatively large value. In this example, the initial value of the learning rate is 0.001. If it is found that the value of the loss function has not decreased after ten consecutive training epochs, the learning rate will be reduced to half of the current value. This can make the value of the loss function decrease faster in the early stage of training and reduce the oscillation of the loss function in the later stage of training. S42. Train the solenoid valve fault diagnosis network using the training set, and calculate the loss value corresponding to the current training round based on the loss function during each training process; then adjust the parameters of the solenoid valve fault diagnosis network based on the loss value until the loss function converges, and obtain the trained solenoid valve fault diagnosis network. S43. Test the trained solenoid valve fault diagnosis network using the test set. If the test results do not meet the preset target, adjust the trained solenoid valve fault diagnosis network, including adjusting the training strategy and loss function, until the preset target is met, and obtain the final solenoid valve fault diagnosis network.
[0031] In some embodiments, considering that waveform prediction of the solenoid valve is actually a regression problem, the loss function in S42 is the Mean Squared Error (MSE) loss function, as follows: ; in, Indicates the loss value; Indicates input data Data length; This represents the actual value of the data; The predicted value output by the solenoid valve fault diagnosis network. f This indicates the current data length. The batch size for each training iteration of the solenoid valve fault diagnosis network is 64 in this example. Theoretically, a larger batch size allows the network to more accurately capture data features, but this also increases the training time. The number of training iterations needs to ensure the training function value decreases to within a required range; in this example, it is 200. The simulation results for this example are as follows: Figures 8 to 10 As shown, the comparison diagrams are, in order, the network's predicted results and actual waveforms under normal conditions, output overload or short circuit, and solenoid valve demagnetization or abnormal load.
[0032] In some embodiments, S5 specifically includes the following steps: S51. Set up fault diagnosis logic based on waveforms and observe three waveforms (waveform data). 、 、 As can be seen, under normal circumstances, the current value reaches its peak and then decreases slowly according to an exponential law. When the output is overloaded or short-circuited, the current quickly returns to zero after reaching its peak. When the solenoid valve demagnetizes or the load is abnormal, the current remains at its peak for a period of time before returning to zero. Fault diagnosis logic is formulated based on these waveform characteristics. S52. Then, the final solenoid valve fault diagnosis network and fault discrimination logic are used to diagnose other solenoid valves and obtain the diagnosis results.
[0033] This invention uses a long short-term memory recurrent neural network to extract features of the current waveform of a solenoid valve. After training to meet the requirements, it can predict and classify future failures of the solenoid valve in advance, so that measures can be taken before the failure occurs to avoid losses caused by the failure of the solenoid valve, thus achieving the purpose of automated monitoring of the target equipment failure.
[0034] In another aspect, the present invention provides a solenoid valve fault diagnosis system, including a device end, which has a built-in final solenoid valve fault diagnosis network, and the device end is configured to execute the solenoid valve fault diagnosis method described above.
[0035] 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 technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network, characterized in that, Includes the following steps: S1. Collect the solenoid valve's operating data through sensors, including the solenoid valve's operating data under various conditions, including normal state and several fault states. S2. Add Gaussian noise to the operating data of the solenoid valve under various conditions and randomly splice them to obtain training set and test set. Then normalize the training set and test set. S3. Construct a solenoid valve fault diagnosis network based on a long short-term memory recurrent neural network. The solenoid valve fault diagnosis network includes a long short-term memory recurrent neural network, a fully connected layer, and an output layer connected in sequence. S4. Train the solenoid valve fault diagnosis network using the normalized training set to obtain the trained solenoid valve fault diagnosis network; test the trained solenoid valve fault diagnosis network using the normalized test set. If the test results do not meet the preset target, adjust the trained solenoid valve fault diagnosis network until the preset target is met to obtain the final solenoid valve fault diagnosis network. S5. Based on the waveform characteristics of each fault occurrence, set the fault discrimination logic to identify and classify the fault. Then, use the final solenoid valve fault diagnosis network and fault discrimination logic to diagnose other solenoid valves and obtain the diagnosis results.
2. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 1, characterized in that, S1 specifically includes the following steps: S11. Collect the operating data of the solenoid valve through the sensor, including the voltage waveform data and / or current waveform data of the solenoid valve under normal conditions and under several fault conditions. S12. Then, name these voltage waveform data and / or current waveform data respectively, and convert these voltage waveform data and / or current waveform data into one-dimensional vectors of a specified length to obtain waveform vectors. .
3. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 2, characterized in that, S2 specifically includes the following steps: S21. Perform one-hot encoding on the operating data of the solenoid valve under multiple states, and then add Gaussian noise to the operating data of the solenoid valve under multiple states to obtain operating data with added Gaussian noise. S22. Then, the running data with added Gaussian noise is randomly spliced to obtain the network input data. Input data Each element in ,in Represents waveform vector The first in k One element; Represents element One-hot encoding of the waveform; T Indicate transpose; then the input data Divided into training set and test set; S23. Then, normalize the training set and the test set respectively to obtain the normalized training set and the test set.
4. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 3, characterized in that, The expression for the Gaussian noise is: ; in, Indicates targeting element The intensity of the applied noise; Elements representing the solenoid valve's operating data under various states, with subscripts. i Indicates the first solenoid valve i State, subscript j This indicates the position of the current element in the corresponding one-dimensional vector; The representative data mean, Represents standard deviation, standard deviation It determines the intensity of Gaussian noise.
5. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 3, characterized in that, The expression for the normalization process is: ; in, It is an element The initial waveform value; It is the vector of all waveforms The minimum value in, It is among all waveform vectors The maximum value in, Represents element The waveform values after normalization.
6. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 1, characterized in that, The long short-term memory recurrent neural network includes two stacked LSTM layers and a Dropout layer; the Dropout layer is connected between the two stacked LSTM layers. The Dropout layer is used to randomly shut down some neurons during training to prevent the solenoid valve fault diagnosis network from overfitting; the LSTM layer is used to directly process the current waveform data and / or voltage waveform data of the solenoid valve and capture the timing information therein; the LSTM layer contains 3 gates, and the output value of each gate is calculated using the following formula; ; in, This indicates the output value of the corresponding gate; This represents the sigmoid activation function; , This is the weight matrix; This is the input vector at the current moment, i.e., the first input vector; This is the hidden state from the previous moment; This is the first bias vector.
7. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 6, characterized in that, The fully connected layer is used to map the output of the last LSTM layer to the final output of the solenoid valve fault diagnosis network using the following formula; ; in, Indicates the output of the fully connected layer; It is another weight matrix; It is the input vector, that is, the second input vector; This is the second bias vector.
8. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 7, characterized in that, S4 specifically includes the following steps: S41. Set training-related parameters, including learning rate, batch size, and number of training epochs, and select the loss function; S42. Train the solenoid valve fault diagnosis network using the training set, and calculate the loss value corresponding to the current training round based on the loss function during each training process; then adjust the parameters of the solenoid valve fault diagnosis network based on the loss value until the loss function converges, and obtain the trained solenoid valve fault diagnosis network. S43. Test the trained solenoid valve fault diagnosis network using the test set. If the test results do not meet the preset target, adjust the trained solenoid valve fault diagnosis network, including adjusting the training strategy and loss function, until the preset target is met, and obtain the final solenoid valve fault diagnosis network.
9. The method for diagnosing solenoid valve faults based on a long short-term memory recurrent neural network according to claim 8, characterized in that, The loss function in S42 is as follows: ; in, Indicates the loss value; Indicates input data Data length; Represents the actual value of the data. f Indicates the current data length.
10. A solenoid valve fault diagnosis system, characterized in that, The device includes a built-in final solenoid valve fault diagnosis network, and the device is configured to perform the solenoid valve fault diagnosis method according to any one of claims 1 to 9.
