**Yafei Lei 1, Wanlu Jiang 1,\*, Anqi Jiang 2, Yong Zhu 3,\*, Hongjie Niu <sup>4</sup> and Sheng Zhang 1,\***


Received: 18 August 2019; Accepted: 29 August 2019; Published: 3 September 2019

**Abstract:** A novel fault diagnosis method is proposed, depending on a cloud service, for the typical faults in the hydraulic directional valve. The method, based on the Machine Learning Service (MLS) HUAWEI CLOUD, achieves accurate diagnosis of hydraulic valve faults by combining both the advantages of Principal Component Analysis (PCA) in dimensionality reduction and the eXtreme Gradient Boosting (XGBoost) algorithm. First, to obtain the principal component feature set of the pressure signal, PCA was utilized to reduce the dimension of the measured inlet and outlet pressure signals of the hydraulic directional valve. Second, a machine learning sample was constructed by replacing the original fault set with the principal component feature set. Third, the MLS was employed to create an XGBoost model to diagnose valve faults. Lastly, based on model evaluation indicators such as precision, the recall rate, and the *F*1 score, a test set was used to compare the XGBoost model with the Classification And Regression Trees (CART) model and the Random Forests (RFs) model, respectively. The research results indicate that the proposed method can effectively identify valve faults in the hydraulic directional valve and have higher fault diagnosis accuracy.

**Keywords:** hydraulic valve; fault diagnosis; principal component analysis (PCA); extreme gradient boosting (XGBoost); HUAWEI Cloud machine learning service (MLS)
