## Abstract

Solenoid operated direction control valves, responsible for regulating the flow of fluid in hydraulic circuit highly relies on the control current for their actuation. The control currents supplied to the solenoid generate the electromagnetic force required for switching of valves by mechanical movement of spools inside. The deterioration in control current leads to the degradation in electromagnetic force and thus the spool takes longer to initiate as well as terminate the switching phenomenon. This delay or lag potentially causes the pressure, flow and power fluctuation, and unintended impacts on the system. This article presents a comparative analysis of detecting these anomalies by acquiring pressure signals across the valve using extreme gradient boosting (XGBoost) and one-dimensional convolution neural network (CNN). Four handcrafted statistical features and four fractal dimensions train XGBoost whereas 1D CNN with six hidden layers utilizes the raw signal of net pressure change across the valve. XGBoost predicts the switching behavior at an accuracy of 99.68%, and 1D CNN performs at its maximum possible accuracy (100%). The very narrow gap signifies the nearly equal significance of both of these different category classifiers. As XGBoost cannot handle the raw signals, the pre-processing increases the time consumption while 1D CNN does not require deep architecture and efficiently maps the complexity of the hydraulic system using pressure signals.

## 1 Introduction

Direction control valves (DCVs) are one of the most critical components of a hydraulic system that enable reliable flow management of the hydraulic fluid. They achieve their desired functionality by switching the spool position and connecting different ports. Any deviation from the optimal switching condition either due to delay or incomplete movement of the spool may trigger undesirable flow and pressure fluctuations in the system, thereby impairing its power transmission ability. Therefore, to ensure system reliability and reduce maintenance downtime, it is imperative to monitor the valve switching condition. To date, a few attempts have been made to study the static and dynamic characteristics of the hydraulic valves. Maiti et al. [1] studied the steady and dynamic characteristic of a two-stage proportional relief valve by varying the input voltage, theoretically as well as experimentally. They conveyed the linear relationship between the input current voltage and the force generated in the solenoids. Topçu et al. [2] developed a fast-switching electro-pneumatic valve with a switching time of 4.5 ms and stated that the switching time of the valve can be enhanced by applying an overdriving current to the solenoid coils. Folmer et al. [3] presented a data-driven system for hydraulic valves by comparing standardized flow coefficients using data obtained across companies. They used it to detect faults by considering the wear and the contamination of the valve plug (spool). Cao et al. [4] developed a health monitoring model based on the non-dimensional artificial neural networks to estimate the flow force and flowrates under broad operating conditions (such as different pressure drops and valve openings) compared with conventional lumped flow field models. Lei et al. [5] employed a machine learning model using principal component analysis (PCA) and extreme gradient boosting (XGBoost) to identify hydraulic valve faults by acquiring pressure signals in a hydraulic system. Given this, it is noted that there are limited developments in the monitoring process for the degradation of the switching behavior in the solenoid-actuated hydraulic valves. Although, few of the authors [4,5] have demonstrated the health monitoring of the hydraulic valves and pumps [6–8] using conventional data-driven methodologies, there is a lack in terms of the applicability of deep learning methods. To this end, it can be concluded that the mathematical and data-based investigation of the switching behavior of hydraulic valves are limited to the implementation of neural networks, PCA, etc.

Convolution neural network (CNN) is one such deep learning neural network used to analyze the visual imagery dataset (two-dimensional data) [9]. The architecture of the CNN is configurable as it consists of different layers, namely, convolution layers, pooling layers, fully connected layers, and the output layer stacked together in mannered order for the pattern recognition. CNN eliminates out the manual feature extraction of the input as convolution layers perform so by moving the kernel over the data itself. The conventional 2D CNN can be tuned and adapted to learn features from time domain signal (one-dimensional signal) by moving the kernels in the convolution layer in one direction only preserving the complex learning capabilities of CNN. On the other side, XGBoost algorithm is one of the most effective ensemble classifiers known for its fast computational speed and high accuracy [10].

XGBoost is well capable of performing the classification task on small as well as big data. It minimizes a regularized objective function (L1 and L2 regularization) comprising the function of convex loss and a model complexity penalty term. It adopts the continuous iterative method of training and induces new tress to predict the errors of previous tress and combines it with the previous trees to enhance the performance. This way, XGBoost is one of the most promising and highly accurate classifiers for predicting the switching characteristic of the valve.

On the other hand, 1D CNN is developed to slide the kernel along one dimension only. This characteristic makes it well suitable for convolution-based feature extraction of 1D signals. One-dimensional CNN is known to have achieved state-of-the-art performances in various health monitoring tasks using electrocardiogram data, raw motor current data, etc. This approach is shown to yield better results as it employs raw time-series sensor data directly as input to efficiently learn optimal representation unlike that with the manually extracted features. In view of this, 1D CNN is opted to classify the switching characteristic of the curve using pressure signals acquired on either side of the valve.

The present study attempts to detect the faults in the switching characteristic of hydraulic valve using the net pressure difference across the valve with 1D CNN and XGBoost. These two classifiers are chosen deliberately to look for the capabilities of these classifiers in handling hydraulic signals and to look for their compatibilities in monitoring the valve for deterioration in their switching behavior. As XGBoost requires manually extracted features, eight features (four statistical and fractal dimensions each) are extracted using the net pressure change data. The prediction results reveal that both of these classifiers are well capable and their prediction accuracies lie in a close proximity. The methodology adapted in this study is shown in Fig. 1.

## 2 Experimental Setup and Data Acquisition

The experimental dataset for pressure signals used in this study is obtained from the UC Irvine Machine Learning Repository [11]. The pressure signals are acquired from two pressure sensors (PS1 and PS2) installed across the two-way DCV at a sampling frequency of 100 Hz for 60 s. Initially, the valve remains in OFF condition where pressure transducer PS1 records high pressure (∼190 bar), while sensor PS2 senses zero pressure.

At *t* = 10 s, the valve’s spool switches to the new position. As the valve opens, the upstream pressure PS1 starts reducing while the downstream pressure PS2 (see Fig. 2(a)) increases. Figure 2(b) shows the temporal variation of both the pressure signals during the switching operation for four different switching conditions, namely, “Optimal switching, small lag, severe lag, and close to total failure.” Since the magnitude of the control current supplied to the solenoid actuator governs the spool movement [1], to simulate these fault conditions, the control current is varied at 100%, 90%, 80%, and 73% of the nominal value, respectively. Figure 2(c) shows the temporal variation of pressure difference (ΔPS = PS1 − PS2) across the valve for four different switching conditions. It is evident that the smaller the control current is, the larger the delay is, which is triggering spool movement for switching. This delay is termed as the *lag* in the switching of a direction control valve. It is obvious that the lower values of the control current generate less amount of the electromagnetic force and thus, the movement of the spool for switching initiates lately and moves slowly as compared to the optimal switching condition. This delay is termed as the *lag* or delay in the switching of the direction control valve.

At optimal switching condition, the valve starts to switch at ∼9.3 s (see Fig. 2(b)) while under the faulty conditions, there is a noticeable delay. For instance, at the switching condition of close to total failure, switching starts at ∼9.7 s due to the lower control current to the solenoid, which in turn generates lower electromagnetic force for spool movement. With a decrease in the control current while the switching delay increases, the pressure difference attains a constant, steady-state value (∼25 bar after 10.5 s) irrespective of the switching condition. However, the transient pathways that lead to this steady-state value depend on the switching condition. Specifically, under optimal switching, there is a gradual reduction in PS1 with no pressure fluctuations, while under small lag and severe lag conditions, there are small-scale fluctuations in PS1, and under close to total failure condition, there are noticeable large-scale fluctuations in the PS1 signal. While it is possible to detect the switching condition by capturing the trends and features with such highly time-resolved signals (a sampling rate of 100 Hz), in practice, these measurements are acquired either using simple pressure gauges or with pressure transducers at nominal sampling frequencies in the order of 10 Hz [12], which cannot capture such fluctuations. Thus, an automated machine learning approach is required for monitoring the switching condition of valves. This is the focus of Secs. 3 and 4, which demonstrate the efficacy of XGBoost and 1D CNN for predicting the switching condition with a high accuracy.

## 3 Monitoring Using Extreme Gradient Boosting

### 3.1 Statistical Features.

Statistical features infer the information associated with the statistic and the distribution of the signal under consideration. Many a times, these features do indicate the condition of the system and thus are a viable option to train a machine learning model for more accurate information. Root mean square (RMS), standard deviation, skewness, and kurtosis [13–15] are extracted from the pressure difference signals. The mathematical formula for these features is mentioned below:

*RMS*: Root mean square is the quadratic mean of the signal.where(1)$RMS=1n(x12+x22+\cdots +xn2)$*n*is the number of data points and*x*are data points._{i}*Standard deviation*(): Standard deviation is the measure of the scattering of discrete data about the mean value of the signal.*σ*where $x\xaf$ is the mean of the signal.(2)$\sigma =\u2211i=1n(xi\u2212x\xaf)2n$*Skewness*: Skewness is the measure of asymmetry in the statistical distribution. It signifies the extent to which a specific distribution of the signal differs from the normal distribution.(3)$Skewness=\u2211i=1n(xi\u2212x\xaf)3n$*Kurtosis*: Kurtosis is a measure of the combined weight of the tail of the distribution with respect to the center of the distribution of the signal.(4)$Kurtosis=\u2211i=1n(xi\u2212x\xaf)/n\sigma 4$

### 3.2 Fractal Dimensions.

The fractal dimension has a non-integer value that is a good measure of the nonlinearity and complexity of the data. Thus, these are vital mathematical tools for analyzing non-stationary and non-periodic signals. It is viable that the pressure signals acquired across the valve neither does exhibit periodicity nor exhibits regularity (see Fig. 2(a)). Thus, fractal dimension is a good measure to analyze the nonlinearity in the acquired pressure signals. In this study, four different fractal dimensions, i.e., Higuchi’s fractal dimension (HFD) [16], Petrosian’s FD [17], Katz’s FD [18], and detrended fluctuation analysis [19], are used to quantify the nonlinearity of the pressure signal data obtained across a DCV.

Higuchi’s algorithm for FD estimation is based on the evaluation of mean of the curve length by considering segments of *k* samples. The methods proposed by Polychronaki et al. [20] have been adopted to evaluate the numerical values of *k*_{max} (1–100) to calculate the Higuchi fractal dimension of Weierstrass cosine sequences. The mean square error is lowest for *k*_{max} = 4 (see Fig. 3) and thus used to calculate the HFD for the change in pressure signals.

### 3.3 Extreme Gradient Boosting.

XGBoost is an ensemble, high-speed and high performing classifier based on the gradient boosted decision trees [10]. It sequentially combines weak learners to produce a powerful learner with a lower bias and variance. The mathematical interpretation and formulations are provided in Refs. [10,21]. The statistical features and fractal dimension for the differential pressure signal clubbed together constructs the feature matrix to train the XGBoost. Seventy percent of the data is used to train the model and remaining 30% is used as the testing data. To remove the biasness of the model, ten-fold cross validation has been employed, and to maintain the generality in the data splitting, *stratified* is set to be true. The hyper-parameters of the XGBoost classifier are tuned using random search cross validation and the optimal hyper-parameters are listed in Table 1. The testing accuracy for predicting the valve switching condition is found to be 99.68%. The precision, recall, and f1-score are 99.52, 99.63, and 99.58, respectively.

Hyper-parameters | Value | Hyper-parameters | Value |
---|---|---|---|

Alpha | 0.0025 | max_depth | 38 |

bootstrap | TRUE | max_features | sqrt |

Colsample_bytree | 1 | min_child_weight | 3 |

gamma | 0.013 | min_samples_split | 7 |

learning_rate | 0.065 | n_estimators | 1333 |

Hyper-parameters | Value | Hyper-parameters | Value |
---|---|---|---|

Alpha | 0.0025 | max_depth | 38 |

bootstrap | TRUE | max_features | sqrt |

Colsample_bytree | 1 | min_child_weight | 3 |

gamma | 0.013 | min_samples_split | 7 |

learning_rate | 0.065 | n_estimators | 1333 |

## 4 Monitoring Using One-Dimensional Convolution Neural Networks

The conventional CNN, also called as 2D CNN, was originally defined for classifying image data. In 2D CNN, the kernel slides along the two dimensions of the image. The kernel can be understood as a filter that extract features from the images. Thus, a CNN does not require the manual feature extraction, and the raw data can be directly used in CNN [22]. This leads to the introduction of 1D CNN to handle time-series data and the kernel moves over the data and autonomously extract the features. Thus, 1D CNN has been adopted to analyze the switching condition of the valve by directly employing the pressure difference signals. In a CNN architecture, there are number of layers that defines the depth of the model and highly influences the classification performance of the model. In 1D CNN, the complexity order gets reduced as compared to the conventional CNN. For example, an image with *N* × *N* dimensions convolve with *K* × *K* kernel and has a computational complexity ∼*O*(*N*^{2}*K*^{2}), whereas for the corresponding 1D convolution (with the same dimensions, *N* and *K*), the order of complexity is $\u223cO(NK)$ [23]. Thus, it is evident that the complexity order also gets reduced significantly using 1D CNN and are easier and faster to train and implement. The architecture of the adapted 1D CNN for the valve switching prediction is shown in Fig. 4.

The architecture contains two pairs of convolution and max pooling layer. The latter layer acts as an input to the flatten layer. The flatten layer is connected to a dense network (fully connected layer-100 neurons), which then acts as an input for the output layer. Each set of input signals containing 6000 data points each is fed to the first CNN layer where they are subjected to 64 filters. This makes the dimension of the first CNN layer as 5998 × 1 × 64. Each of the CNN layer contains an activation function placed after the CNN layer and before the next layer. *Rectified linear unit* is chosen as the activation function because it prevents the vanishing gradient problem during learning and assists the model to learn the complex patterns in the data. Next, the max pooling layer performs the sample-based discretization of the data which down-samples and reduces the dimensionality of the feature set. Subsequently, the data pass through another pair of 1D CNN layer and the max pooling layer, respectively. The flatten layer employed after the max pooling layer flattens the multidimensional input tensor to a single dimension array before feeding it to the classification layer. The classification layer employs a fully connected layer that learns the non-linear combination of the high-level features, extracted by convolution layers during learning. Based on the learning, the fully connected layer classifies the data to a class and passes on the information to the output layer. In addition, the dropout regularization introduced in the model after each convolution layer avoids overfitting of the neural networks. This way the architecture offers an effective regularization that reduces the overfitting and improves the generalization error by dropping the nodes randomly during the training. With the current 1D CNN architecture, the model predicts the switching condition of the DCV with an accuracy, precision, recall, and f1-score of 100% each using the pressure difference data. Seventy percent of the data is used for training and the remaining 30% is used for testing the 1D CNN. Overall, 2205 number of data samples are considered. Thus, 1544 (70% of 2205) number of instances are used to train the model.

Table 2 shows the performance comparison of XGBoost and 1D CNN, while Table 3 presents a comparison of these models with a previous study, which used the same dataset. Thus, 1D CNN, employed for hydraulic signals, is performing slightly better and can be a prospective efficient classifier for hydraulic valve monitoring. The accuracy of the 1D CNN model is found to be 100% in predicting the switching behavior of the DCV using the pressure difference data. Also, the precision, recall, and f1-score are equal to 100%.

Machine learning model | XGBoost | 1D CNN |
---|---|---|

Accuracy (%) | 99.68 | 100 |

Precision (%) | 99.52 | 100 |

Recall (%) | 99.63 | 100 |

f1-score (%) | 99.58 | 100 |

Machine learning model | XGBoost | 1D CNN |
---|---|---|

Accuracy (%) | 99.68 | 100 |

Precision (%) | 99.52 | 100 |

Recall (%) | 99.63 | 100 |

f1-score (%) | 99.58 | 100 |

Switching condition | Lei et al. [5] PCA + XGBoost | Present work | ||
---|---|---|---|---|

XGBoost | 1D CNN | |||

Precision | Optimal switching | 0.99 | 1 | 1 |

Small lag | 0.885 | 1 | 1 | |

Severe lag | 1 | 0.96 | 1 | |

Close to total failure | 1 | 0.99 | 1 | |

Recall | Optimal switching | 0.902 | 1 | 1 |

Small lag | 1 | 0.99 | 1 | |

Severe lag | 0.975 | 1 | 1 | |

Close to total failure | 0.99 | 0.97 | 1 | |

f1-score | Optimal switching | 0.944 | 1 | 1 |

Small lag | 0.939 | 1 | 1 | |

Severe lag | 0.988 | 0.98 | 1 | |

Close to total failure | 0.995 | 0.98 | 1 | |

Accuracy | 0.966 | 0.996 | 1 |

Switching condition | Lei et al. [5] PCA + XGBoost | Present work | ||
---|---|---|---|---|

XGBoost | 1D CNN | |||

Precision | Optimal switching | 0.99 | 1 | 1 |

Small lag | 0.885 | 1 | 1 | |

Severe lag | 1 | 0.96 | 1 | |

Close to total failure | 1 | 0.99 | 1 | |

Recall | Optimal switching | 0.902 | 1 | 1 |

Small lag | 1 | 0.99 | 1 | |

Severe lag | 0.975 | 1 | 1 | |

Close to total failure | 0.99 | 0.97 | 1 | |

f1-score | Optimal switching | 0.944 | 1 | 1 |

Small lag | 0.939 | 1 | 1 | |

Severe lag | 0.988 | 0.98 | 1 | |

Close to total failure | 0.995 | 0.98 | 1 | |

Accuracy | 0.966 | 0.996 | 1 |

## 5 Conclusion

This study presents a methodology for monitoring the degradation in the switching condition of a solenoid-actuated DCV using XGBoost and 1D CNN. Its major findings are:

With a decrease in the control current to the solenoid actuator or increase in the severity of switching fault, the time delay to initiation of the switching increases, and fluctuations in the pressure signal increase.

Through manual feature extraction (statistical features and fractal dimensions) from the differential pressure signals for training the XGBoost model, a prediction accuracy of 99.68% is achieved.

One-dimensional CNN is capable of learning complex and non-stationary features from the raw signal autonomously. With six hidden layers, 1D CNN employs unprocessed data and achieves a marginally better performance (100% accuracy) compared to XGBoost (99.68%).

XGBoost model is time-consuming and computationally complex, whereas 1D CNN is simple and achieves a better accuracy without requiring pre-determined transformations, manual feature extraction, or feature selection methods.

The future work of this study will attempt to address to develop a forecasting technique to detect the anomaly in the switching characteristic of the valve well before the development of the improper switching of the valve.

## Footnote

## Conflict of Interest

The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article. This article does not include research in which human participants were involved. Informed consent not applicable. This article does not include any research in which animal participants were involved.

## Data Availability Statement

The data and information that support the findings of this article are freely available.^{3}