# Application of Modern Multimedia and Sensing Technology in Fault Detection and Diagnosis of Hydraulic Agricultural Machinery

Authors: Jia Jia; Jijing Lin
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In order to solve the problem of fault diagnosis of agricultural machinery hydraulic system, the authors propose an application of modern multimedia and sensing technology in fault detection and diagnosis of hydraulic agricultural machinery. By analyzing the component faults and system faults of the hydraulic system of agricultural machinery, an expert system for fault diagnosis is constructed, and a knowledge base and inference engine suitable for fault diagnosis of the hydraulic system of agricultural machinery are designed. In order to further improve the diagnostic accuracy of the fault diagnosis expert system, a fault diagnosis based on sparse coding is designed, and the sparse coding fault diagnosis results are integrated with the expert system to improve the diagnostic accuracy. The experimental results show that after sparse coding fusion, the fault diagnosis accuracy can be improved to more than 91%. In conclusion, the model meets the requirements of fault diagnosis and puts forward a new idea for the fault diagnosis of agricultural machinery hydraulic system. Make the agricultural machinery and equipment industry develop healthily.


---

## Body

## 1. Introduction

The most fundamental reason for the failure of the hydraulic components of agricultural machinery is the structure of the hydraulic components of the equipment, in the design of agricultural machinery and equipment, the principle of fault diagnosis of hydraulic components of agricultural machinery and equipment is based on the composition of the hydraulic mechanism, scientific and reasonable component structure, and correct combination of components, and high-quality work of mechanical equipment can be better achieved [1]. In the fault diagnosis of hydraulic components, the first step is to determine whether the fault identification is correct or not and carry out a series of fault information collection work through accurate and efficient sensing devices; after information collection and fault feature analysis, the fault category is reasonably classified, so as to carry out fault analysis and processing in a targeted manner [2]. Scientific structural composition and correct component installation can make the entire equipment work efficiently, in order to scientifically and rationally lay out, certain design principles and methods must be followed, when diagnosing and analyzing the failure of hydraulic components, various information must be correctly identified, and correct information can be obtained by assembling sensing devices; Secondly, after collecting the required information and after the feature classification and processing of hydraulic component faults, conduct comprehensive and in-depth analysis and processing [3].In my country’s current agricultural industry, the good operation of agricultural machinery and equipment requires the efficient cooperation of various internal components. With the rapid development of my country’s big data information technology, the corresponding electronic information intelligent diagnosis technology has also been born; this intelligent automatic fault diagnosis technology has been widely used in agricultural production in my country, mainly in the failure of agricultural machinery and equipment; it plays a very important role in the inspection and maintenance [4]. This hydraulic element has many functions, such as moving, working, turning, and returning, so it plays a key role in agricultural harvesting. It is also the device that is most prone to failure. In order to greatly improve the accuracy and timeliness of the fault diagnosis of the multifunctional automatic harvester, a comprehensive and simple analysis of the components is carried out when a mechanical fault occurs, and the later work is completed by the fault diagnosis intelligent system equipment [5].Hydraulic systems are widely used in agricultural machinery, many agricultural machineries such as tractors, harvesters, and sprayers are equipped with hydraulic systems, and hydraulic systems also play an important role in the function of agricultural machinery [6]. The hydraulic system cannot only realize the rapid transmission of power but also assist agricultural machinery to achieve various functions; it can be said that the normal operation of agricultural machinery is inseparable from the hydraulic system [7]. With the integrated development of electro-mechanical-hydraulic technology, a large number of electro-mechanical-hydraulic technologies have also been applied to agricultural machinery; in addition, many hydraulic, electrical, and mechanical devices cooperate to form a complex structure and transmission mode; therefore, during the long-term high-intensity use of agricultural machinery, various failure problems are prone to occur; the leakage of hydraulic oil is one of the most common faults [8]. In the process of using agricultural machinery, if the driver of agricultural machinery can master the failure performance and maintenance methods of hydraulic system leakage, the impact of hydraulic system failure on the use of agricultural machinery can be greatly reduced; it is beneficial to ensure the long-term, stable, and efficient operation of agricultural machinery.


## 2. Literature Review

Hydraulic systems are widely used in various types of modern machinery, such as hoisting machinery, construction machinery, and agricultural machinery [9]. Moreover, the hydraulic system is being used in more mechanical fields by virtue of its high degree of automation, convenient speed regulation, smooth transmission, and large bearing capacity [10]. However, the hydraulic system also has a high failure rate due to its complex structure, so it is very important to quickly and accurately diagnose the failure of the hydraulic system. With the continuous change of task requirements, the application of hydraulic systems in agricultural machinery has also become very common; for agricultural machinery, the failure probability of its hydraulic system is higher than other application fields; the main reason is that the working environment of agricultural machinery and equipment is relatively poor, concealed faults are difficult to find, and the operators of agricultural machinery are generally not very professional, so it is difficult to obtain normal maintenance and maintenance [11].At present, the fault diagnosis method of the hydraulic system mainly focuses on establishing the corresponding fault database according to the fault mode of the specific equipment and then comprehensively evaluating the state of the hydraulic system with the help of advanced information processing technology and giving the fault diagnosis results [12]. The common methods of hydraulic system fault diagnosis include neural network, fuzzy theory, and expert system. Among them, the expert system has been widely used in hydraulic system fault diagnosis because of its accuracy and expansibility. However, there are still relatively few expert system-related forming software dedicated to the fault diagnosis of agricultural machinery, and with the increasing complexity of modern agricultural machinery and equipment, the faults of its hydraulic system also become more complicated [13]. In addition, the standardized maintenance of the hydraulic system of agricultural machinery in my country is still very lacking, the failure mode classification of the hydraulic system of agricultural machinery is not very clear, and the maturity of the knowledge base and reasoning scheme of the corresponding expert system is also low [14].Aiming at these problems, the authors study the problem of fault diagnosis of agricultural machinery hydraulic system based on the expert system. According to the complexity of agricultural machinery hydraulic system failure, based on the failure mode of agricultural machinery hydraulic system, an expert system agricultural machinery hydraulic fault diagnosis model is established, and the knowledge base and reasoning model of the expert system are designed. Finally, the sparse coding fault diagnosis method is combined with the expert system to diagnose the fault of the agricultural machinery hydraulic system, so as to improve the accuracy of the fault diagnosis.


## 3. Methods

### 3.1. Failure Analysis of Agricultural Machinery Hydraulic System

#### 3.1.1. Component Failure

Although the types of modern agricultural machinery and equipment are different, the basic structure of the hydraulic system is basically the same, with good consistency [15]. After sorting out and analyzing a large number of agricultural machinery hydraulic system component failures, it is found that in general, hydraulic system component failures can be divided into four categories: power element failure, control element failure, actuator failure, and auxiliary element failure.


#### 3.1.2. System Error

Usually, in different agricultural machinery hydraulic equipment, the circuit composition of the hydraulic system is very different, and the components are also partially different [16]. Therefore, the failures of different types of agricultural machinery hydraulic systems are not the same. However, some types of failures frequently occur in the hydraulic system of agricultural machinery, and their failure characteristics are very similar; these common failures of the hydraulic system of agricultural machinery include cavitation, hydraulic clamping, oil leakage, and hydraulic shock [17].


### 3.2. Construction of Fault Diagnosis Expert System

#### 3.2.1. Basic Structure

Knowledge base and inference engine are essential components of any expert system and are closely related to the performance of the expert system [18]. In the agricultural machinery hydraulic system fault diagnosis expert system, the task of the knowledge base is to express and store the knowledge of the expert system engineers and agricultural machinery hydraulic system fault diagnosis experts in a unique form, so as to facilitate the reading and calling of the system [19]. The reasoning engine is based on the experience of agricultural machinery hydraulic system fault diagnosis experts and converts the experience into a language that can be calculated by the machine; perform fault diagnosis on the hydraulic system according to the input parameters, and output the fault diagnosis results. The fault diagnosis model of agricultural machinery hydraulic system based on expert system constructed by the author is shown in Figure 1.Figure 1
Expert system model for fault diagnosis of agricultural machinery hydraulic system.It can be seen from Figure1 that, in addition to the necessary component knowledge base and inference engine, the expert system also includes some other functional modules, including comprehensive database, human-computer interface, and knowledge acquisition module.


### 3.3. Knowledge Base Implementation

#### 3.3.1. Knowledge Representation

The knowledge base is mainly used to store various data used for fault diagnosis of agricultural machinery hydraulic system, which is stored in the form of one piece of knowledge [20]. Each piece of knowledge corresponds to a fault record, including the fault phenomenon, fault cause, and fault handling method. In the fault diagnosis process of the expert system, the richer the data used for fault diagnosis, that is, the more fault information is input, the higher the accuracy of the fault diagnosis result. This is because the fault information is a description of the fault, and the more specific the description, the more accurate the fault diagnosis. Conversely, the less fault information, the less accurate the description of the fault. For example, in the fault diagnosis process of the hydraulic system of agricultural machinery, if the user only enters a fault phenomenon “oil leakage” without other auxiliary information as support, all fault information related to the oil leakage phenomenon will be output in the knowledge base. Therefore, the focus of the expert system knowledge base construction proposed by the author is the expression relationship between the fault cause and the fault phenomenonThe authors design an expert system knowledge base based on the relationship between the fault phenomenon and the fault cause, which is established by using the ACCESS database. In the process of building the knowledge base, the emphasis is on using conceptualized language to translate into formalized diagnostic knowledge.


#### 3.3.2. Knowledge Base Composition

The knowledge base of the established agricultural machinery hydraulic system fault diagnosis expert system mainly consists of three parts: structure base, rule base, and typical case base. The whole knowledge base can support the fuzzy query of fault diagnosis by the expert system. The knowledge base structure is shown in Figure2.Figure 2
The composition of the knowledge base.


#### 3.3.3. Knowledge Management

Good knowledge management is the key to the knowledge base. The knowledge management functions of the expert fault diagnosis system constructed by the author mainly include knowledge addition, knowledge modification, knowledge repair, and knowledge deletion. System knowledge management is based on VB language; the structure is shown in Figure3.Figure 3
Knowledge management structure of knowledge base.


### 3.4. Inference Engine Implementation

#### 3.4.1. Policy Control

The inference engine is an important part of the system to realize the fault diagnosis. The so-called reasoning engine is based on the relevant reasoning strategy, under the fault information input by the user, combined with the fault knowledge data in the knowledge base, the information input by the user is reasoned and diagnosed, and the fault diagnosis result is finally obtained. In the construction of general expert system reasoning machine, reasoning strategies can be divided into four categories, namely, forward reasoning, reverse reasoning, hybrid reasoning, and conflict resolution reasoningTaking into full consideration the actual situation of agricultural machinery hydraulic system fault diagnosis, the authors adopt the forward reasoning process to realize the reasoning engine of the expert system. The reasons for choosing forward reasoning mainly include two aspects. On the one hand, in the process of fault diagnosis of the hydraulic system of agricultural machinery, it is accustomed to use the fault information to obtain the cause of the fault and the troubleshooting method, this method is consistent with the forward reasoning strategy, and the forward reasoning conforms to the general way of thinking of the user’s fault diagnosis, which reduces the difficulty of the user’s operation and use. On the other hand, the corresponding speed of forward reasoning is relatively fast, and the degree of integration with the human interaction interface is high, which can significantly enhance the operability and practicability of fault diagnosis of agricultural machinery hydraulic systems.


#### 3.4.2. Inference Rules

The traditional reasoning rule of the expert system is to simply match the fault information input by the user with the rules and data in the knowledge base; when the matching is successful, the fault diagnosis result is output. However, this kind of reasoning rule takes a long time in the reasoning process, the timeliness of fault diagnosis is low, and the traditional reasoning rule does not fully utilize the knowledge base data. To this end, the authors aim at the characteristics of fault diagnosis of agricultural machinery hydraulic equipment; a forward inference strategy based on neural network is designedFirst, the collected fault information data is imported into the inference engine through the knowledge acquisition module, and then according to the output of the neural network, forward uncertainty inference is performed, and the inference trajectory is recorded. Compare the inference results of the two parts; if the inference results are inconsistent, the data needs to be fused to improve the inference accuracy. The specific reasoning process is as follows.(Step 1)
Import the fault diagnosis knowledge base and the collected fault data: the fault data set is as follows:(1)X=x1,x2,⋯,xL.(Step 2)
Calculate the output of the hidden layer of the neural network.(2)y1=11+e−β1,(3)β1=∑i=jLxiwij1−θi1.(Step 3)
Calculate the output of neurons in the output layer.(4)y2=11+e−β2,(5)β2=∑i=jLyiwij2−θi2.(Step 4)
According to the fault judgment rule, the fault diagnosis result is obtained.In the formula,e is the natural logarithm; β is the back propagation error; wij is the neural network connection weight; θi is the threshold of the neuron.


#### 3.4.3. System Development and Implementation

The authors build the expert system fault diagnosis of agricultural machinery hydraulic system based on expert system tool (CLIPS); CLIPS can be very convenient to carry out joint debugging, write external functions and complex numerical operations throughVC++6.0, use MicrosoftSQLServer to manage diagnosis knowledge base and database, and use MicrosoftVisualStudioC# to develop fault diagnosis human-computer interaction interface. The whole expert system has the advantages of strong portability, simple interface, and easy operation, the specific implementation steps are as follows.
(Step 1)
Register and install the CLIPS control inVC++6.0, configure the relevant environment variables of the CLIPS control as required, and add various properties and functions of the CLIPS control in the control library.(Step 2)
Add a global variable for the CLIPS control in the project to record the working process of the inference engine.(Step 3)
Use the Bind command of the CLIPS control to construct variable constraints.(Step 4)
Build the expert system startup program inVC++6.0, and realize the import of fault information and the output of fault diagnosis results based on the cyclic structure.(Step 5)
Define the fact variable and transfer it to the CLIPS control via the AssertString command.(Step 6)
Use the CLIPS control to transmit the fault diagnosis results to the display control window.


### 3.5. Sparse Coding Fault Diagnosis

Sparse coding is widely used in various fault diagnosis occasions; the authors use it for fault diagnosis of agricultural machinery hydraulic system; it complements the constructed expert system to achieve high-performance agricultural machinery hydraulic system fault diagnosis. Sparse coding troubleshooting can be divided into two parts: dictionary learning and sparse solving. Among them, dictionary learning is a process of adaptive learning according to fault data (that is, fault signals), and sparse solution is based on adaptive learning, the process of solving the sparse coefficients through the optimal solution method.


### 3.6. Dictionary Learning Based on K-SVD

K-SVD is a dictionary learning method with good performance. The method trains and learns the data dictionary through iterative calculation and can continuously modify the atoms in the dictionary based on the sparse decomposition coefficient during the training process and finally obtain an overcomplete data dictionary. The training speed of the K-SVD algorithm is fast, the compatibility is strong, and it can be coupled with most tracking algorithms, as shown in formula (6).The K-SVD algorithm dictionary learning process is as follows:(6)minD,XY−DX2Fs.t.∀i,xi0⩽T0.In the formula,D is the dictionary; X is the sparse coefficient; Y is the fault signal that needs to be decomposed; T0 is the upper limit of the number of nonzero components; xi is the vector norm; usually 2 norm is selected.In the process of dictionary learning, first set the coefficientX to a fixed value, assuming that the atom in the kth column in the dictionary update process is dk; at this time, the objective function of the K-SVD algorithm is shown in
(7)Y−DXF2=Y−∑j≠kdjxTk−djxTkF2=Ek−dkxTkF2.The following is the SVD decomposition of matrixEk:
(8)EkR=UΔVT.The first column of the decomposed matrixU is updated to the kth column in the dictionary, and the first column of the matrix V is multiplied by the first column and the first row of the matrix Δ to modify the sparse coefficient matrix xTk.


### 3.7. Sparse Solution Based on Orthogonal Matching Pursuit

Orthogonal matching pursuit is an improvement to the original matching pursuit algorithm; on the basis of the original algorithm, a step-by-step signal decomposition strategy is added; the specific solution method is as follows. First, the matching tracking is carried out in the complete atom library obtained by dictionary learning, and the atom with the highest matching degree with the fault signal is selected; then, the atom is removed from the fault signal to obtain a residual signal; next, the optimal atom matching is performed on the residual signal in turn, and the optimal atom is removed. The atom matching and atom removal are repeated until the ability of the residual signal reaches the predesigned threshold or the number of iterations reaches the maximum, and the solution ends.


### 3.8. Realization of Coefficient Coding Fault Diagnosis

Combined with the sparse coding method, a fault diagnosis model of the hydraulic system of agricultural machinery is constructed, as shown in Figure4.Figure 4
Sparse coding fault diagnosis model.In the signal preprocessing stage, the directly collected fault signals are time-domain waveforms, which need to be converted in the time-frequency domain with the help of spectrum analysis tools. In the dictionary learning stage, it is necessary to learn the dictionary according to the fault types of the agricultural machinery hydraulic system and obtain a complete dictionary of different fault types. In the fault identification stage, after obtaining the fault dictionary, the spectral signal of the unknown fault state is decomposed and reconstructed, so as to realize the fault diagnosis of the agricultural machinery hydraulic system.


### 3.9. Experiment

The joint fault diagnosis model based on expert system and sparse coding is shown in Figure5.Figure 5
Joint fault diagnosis model of agricultural machinery hydraulic system.First, in order to verify the fault diagnosis of agricultural machinery hydraulic system based on sparse coding proposed by the authors, a complete dictionary library is obtained after dictionary learning and sparse solution for different fault types, and then the correlation calculation of fault signals is carried out to realize fault identification. The parameter settings are as follows.SparsityK=12, maximum iteration is 50 times, and after dictionary learning based on K-SVD, we get 1024×8 dictionary, corresponding to 8 fault types of agricultural hydraulic system.After the fault diagnosis system is built, the fault factors of the hydraulic system are first analyzed, after sorting out, the relationship between the main factors of hydraulic fault diagnosis as shown in Table1 is formed, the factors 1 to 7 in Table 1 are formed into a factor set X, and at the same time, a corresponding item set Y is formed for the positions where the components of the hydraulic system may fail; it mainly includes oil supply subsystem, control subsystem, pressure regulation subsystem, execution subsystem, and feedback subsystem, which are combined into a fault judgment matrix relationship, which is convenient for accurate fault location and identification.Table 1
Relationship between main factors of hydraulic fault diagnosis.
Serial numberFactor nameWeight range1System leak0.1~0.62System vibration0.1~0.53System noise0.2~0.84System heats up0.1~0.85System crawling0.1~0.76Insufficient system flow0.1~0.77Insufficient system pressure0.1~1.0


## 3.1. Failure Analysis of Agricultural Machinery Hydraulic System

### 3.1.1. Component Failure

Although the types of modern agricultural machinery and equipment are different, the basic structure of the hydraulic system is basically the same, with good consistency [15]. After sorting out and analyzing a large number of agricultural machinery hydraulic system component failures, it is found that in general, hydraulic system component failures can be divided into four categories: power element failure, control element failure, actuator failure, and auxiliary element failure.


### 3.1.2. System Error

Usually, in different agricultural machinery hydraulic equipment, the circuit composition of the hydraulic system is very different, and the components are also partially different [16]. Therefore, the failures of different types of agricultural machinery hydraulic systems are not the same. However, some types of failures frequently occur in the hydraulic system of agricultural machinery, and their failure characteristics are very similar; these common failures of the hydraulic system of agricultural machinery include cavitation, hydraulic clamping, oil leakage, and hydraulic shock [17].


## 3.1.1. Component Failure

Although the types of modern agricultural machinery and equipment are different, the basic structure of the hydraulic system is basically the same, with good consistency [15]. After sorting out and analyzing a large number of agricultural machinery hydraulic system component failures, it is found that in general, hydraulic system component failures can be divided into four categories: power element failure, control element failure, actuator failure, and auxiliary element failure.


## 3.1.2. System Error

Usually, in different agricultural machinery hydraulic equipment, the circuit composition of the hydraulic system is very different, and the components are also partially different [16]. Therefore, the failures of different types of agricultural machinery hydraulic systems are not the same. However, some types of failures frequently occur in the hydraulic system of agricultural machinery, and their failure characteristics are very similar; these common failures of the hydraulic system of agricultural machinery include cavitation, hydraulic clamping, oil leakage, and hydraulic shock [17].


## 3.2. Construction of Fault Diagnosis Expert System

### 3.2.1. Basic Structure

Knowledge base and inference engine are essential components of any expert system and are closely related to the performance of the expert system [18]. In the agricultural machinery hydraulic system fault diagnosis expert system, the task of the knowledge base is to express and store the knowledge of the expert system engineers and agricultural machinery hydraulic system fault diagnosis experts in a unique form, so as to facilitate the reading and calling of the system [19]. The reasoning engine is based on the experience of agricultural machinery hydraulic system fault diagnosis experts and converts the experience into a language that can be calculated by the machine; perform fault diagnosis on the hydraulic system according to the input parameters, and output the fault diagnosis results. The fault diagnosis model of agricultural machinery hydraulic system based on expert system constructed by the author is shown in Figure 1.Figure 1
Expert system model for fault diagnosis of agricultural machinery hydraulic system.It can be seen from Figure1 that, in addition to the necessary component knowledge base and inference engine, the expert system also includes some other functional modules, including comprehensive database, human-computer interface, and knowledge acquisition module.


## 3.2.1. Basic Structure

Knowledge base and inference engine are essential components of any expert system and are closely related to the performance of the expert system [18]. In the agricultural machinery hydraulic system fault diagnosis expert system, the task of the knowledge base is to express and store the knowledge of the expert system engineers and agricultural machinery hydraulic system fault diagnosis experts in a unique form, so as to facilitate the reading and calling of the system [19]. The reasoning engine is based on the experience of agricultural machinery hydraulic system fault diagnosis experts and converts the experience into a language that can be calculated by the machine; perform fault diagnosis on the hydraulic system according to the input parameters, and output the fault diagnosis results. The fault diagnosis model of agricultural machinery hydraulic system based on expert system constructed by the author is shown in Figure 1.Figure 1
Expert system model for fault diagnosis of agricultural machinery hydraulic system.It can be seen from Figure1 that, in addition to the necessary component knowledge base and inference engine, the expert system also includes some other functional modules, including comprehensive database, human-computer interface, and knowledge acquisition module.


## 3.3. Knowledge Base Implementation

### 3.3.1. Knowledge Representation

The knowledge base is mainly used to store various data used for fault diagnosis of agricultural machinery hydraulic system, which is stored in the form of one piece of knowledge [20]. Each piece of knowledge corresponds to a fault record, including the fault phenomenon, fault cause, and fault handling method. In the fault diagnosis process of the expert system, the richer the data used for fault diagnosis, that is, the more fault information is input, the higher the accuracy of the fault diagnosis result. This is because the fault information is a description of the fault, and the more specific the description, the more accurate the fault diagnosis. Conversely, the less fault information, the less accurate the description of the fault. For example, in the fault diagnosis process of the hydraulic system of agricultural machinery, if the user only enters a fault phenomenon “oil leakage” without other auxiliary information as support, all fault information related to the oil leakage phenomenon will be output in the knowledge base. Therefore, the focus of the expert system knowledge base construction proposed by the author is the expression relationship between the fault cause and the fault phenomenonThe authors design an expert system knowledge base based on the relationship between the fault phenomenon and the fault cause, which is established by using the ACCESS database. In the process of building the knowledge base, the emphasis is on using conceptualized language to translate into formalized diagnostic knowledge.


### 3.3.2. Knowledge Base Composition

The knowledge base of the established agricultural machinery hydraulic system fault diagnosis expert system mainly consists of three parts: structure base, rule base, and typical case base. The whole knowledge base can support the fuzzy query of fault diagnosis by the expert system. The knowledge base structure is shown in Figure2.Figure 2
The composition of the knowledge base.


### 3.3.3. Knowledge Management

Good knowledge management is the key to the knowledge base. The knowledge management functions of the expert fault diagnosis system constructed by the author mainly include knowledge addition, knowledge modification, knowledge repair, and knowledge deletion. System knowledge management is based on VB language; the structure is shown in Figure3.Figure 3
Knowledge management structure of knowledge base.


## 3.3.1. Knowledge Representation

The knowledge base is mainly used to store various data used for fault diagnosis of agricultural machinery hydraulic system, which is stored in the form of one piece of knowledge [20]. Each piece of knowledge corresponds to a fault record, including the fault phenomenon, fault cause, and fault handling method. In the fault diagnosis process of the expert system, the richer the data used for fault diagnosis, that is, the more fault information is input, the higher the accuracy of the fault diagnosis result. This is because the fault information is a description of the fault, and the more specific the description, the more accurate the fault diagnosis. Conversely, the less fault information, the less accurate the description of the fault. For example, in the fault diagnosis process of the hydraulic system of agricultural machinery, if the user only enters a fault phenomenon “oil leakage” without other auxiliary information as support, all fault information related to the oil leakage phenomenon will be output in the knowledge base. Therefore, the focus of the expert system knowledge base construction proposed by the author is the expression relationship between the fault cause and the fault phenomenonThe authors design an expert system knowledge base based on the relationship between the fault phenomenon and the fault cause, which is established by using the ACCESS database. In the process of building the knowledge base, the emphasis is on using conceptualized language to translate into formalized diagnostic knowledge.


## 3.3.2. Knowledge Base Composition

The knowledge base of the established agricultural machinery hydraulic system fault diagnosis expert system mainly consists of three parts: structure base, rule base, and typical case base. The whole knowledge base can support the fuzzy query of fault diagnosis by the expert system. The knowledge base structure is shown in Figure2.Figure 2
The composition of the knowledge base.


## 3.3.3. Knowledge Management

Good knowledge management is the key to the knowledge base. The knowledge management functions of the expert fault diagnosis system constructed by the author mainly include knowledge addition, knowledge modification, knowledge repair, and knowledge deletion. System knowledge management is based on VB language; the structure is shown in Figure3.Figure 3
Knowledge management structure of knowledge base.


## 3.4. Inference Engine Implementation

### 3.4.1. Policy Control

The inference engine is an important part of the system to realize the fault diagnosis. The so-called reasoning engine is based on the relevant reasoning strategy, under the fault information input by the user, combined with the fault knowledge data in the knowledge base, the information input by the user is reasoned and diagnosed, and the fault diagnosis result is finally obtained. In the construction of general expert system reasoning machine, reasoning strategies can be divided into four categories, namely, forward reasoning, reverse reasoning, hybrid reasoning, and conflict resolution reasoningTaking into full consideration the actual situation of agricultural machinery hydraulic system fault diagnosis, the authors adopt the forward reasoning process to realize the reasoning engine of the expert system. The reasons for choosing forward reasoning mainly include two aspects. On the one hand, in the process of fault diagnosis of the hydraulic system of agricultural machinery, it is accustomed to use the fault information to obtain the cause of the fault and the troubleshooting method, this method is consistent with the forward reasoning strategy, and the forward reasoning conforms to the general way of thinking of the user’s fault diagnosis, which reduces the difficulty of the user’s operation and use. On the other hand, the corresponding speed of forward reasoning is relatively fast, and the degree of integration with the human interaction interface is high, which can significantly enhance the operability and practicability of fault diagnosis of agricultural machinery hydraulic systems.


### 3.4.2. Inference Rules

The traditional reasoning rule of the expert system is to simply match the fault information input by the user with the rules and data in the knowledge base; when the matching is successful, the fault diagnosis result is output. However, this kind of reasoning rule takes a long time in the reasoning process, the timeliness of fault diagnosis is low, and the traditional reasoning rule does not fully utilize the knowledge base data. To this end, the authors aim at the characteristics of fault diagnosis of agricultural machinery hydraulic equipment; a forward inference strategy based on neural network is designedFirst, the collected fault information data is imported into the inference engine through the knowledge acquisition module, and then according to the output of the neural network, forward uncertainty inference is performed, and the inference trajectory is recorded. Compare the inference results of the two parts; if the inference results are inconsistent, the data needs to be fused to improve the inference accuracy. The specific reasoning process is as follows.(Step 1)
Import the fault diagnosis knowledge base and the collected fault data: the fault data set is as follows:(1)X=x1,x2,⋯,xL.(Step 2)
Calculate the output of the hidden layer of the neural network.(2)y1=11+e−β1,(3)β1=∑i=jLxiwij1−θi1.(Step 3)
Calculate the output of neurons in the output layer.(4)y2=11+e−β2,(5)β2=∑i=jLyiwij2−θi2.(Step 4)
According to the fault judgment rule, the fault diagnosis result is obtained.In the formula,e is the natural logarithm; β is the back propagation error; wij is the neural network connection weight; θi is the threshold of the neuron.


### 3.4.3. System Development and Implementation

The authors build the expert system fault diagnosis of agricultural machinery hydraulic system based on expert system tool (CLIPS); CLIPS can be very convenient to carry out joint debugging, write external functions and complex numerical operations throughVC++6.0, use MicrosoftSQLServer to manage diagnosis knowledge base and database, and use MicrosoftVisualStudioC# to develop fault diagnosis human-computer interaction interface. The whole expert system has the advantages of strong portability, simple interface, and easy operation, the specific implementation steps are as follows.
(Step 1)
Register and install the CLIPS control inVC++6.0, configure the relevant environment variables of the CLIPS control as required, and add various properties and functions of the CLIPS control in the control library.(Step 2)
Add a global variable for the CLIPS control in the project to record the working process of the inference engine.(Step 3)
Use the Bind command of the CLIPS control to construct variable constraints.(Step 4)
Build the expert system startup program inVC++6.0, and realize the import of fault information and the output of fault diagnosis results based on the cyclic structure.(Step 5)
Define the fact variable and transfer it to the CLIPS control via the AssertString command.(Step 6)
Use the CLIPS control to transmit the fault diagnosis results to the display control window.


## 3.4.1. Policy Control

The inference engine is an important part of the system to realize the fault diagnosis. The so-called reasoning engine is based on the relevant reasoning strategy, under the fault information input by the user, combined with the fault knowledge data in the knowledge base, the information input by the user is reasoned and diagnosed, and the fault diagnosis result is finally obtained. In the construction of general expert system reasoning machine, reasoning strategies can be divided into four categories, namely, forward reasoning, reverse reasoning, hybrid reasoning, and conflict resolution reasoningTaking into full consideration the actual situation of agricultural machinery hydraulic system fault diagnosis, the authors adopt the forward reasoning process to realize the reasoning engine of the expert system. The reasons for choosing forward reasoning mainly include two aspects. On the one hand, in the process of fault diagnosis of the hydraulic system of agricultural machinery, it is accustomed to use the fault information to obtain the cause of the fault and the troubleshooting method, this method is consistent with the forward reasoning strategy, and the forward reasoning conforms to the general way of thinking of the user’s fault diagnosis, which reduces the difficulty of the user’s operation and use. On the other hand, the corresponding speed of forward reasoning is relatively fast, and the degree of integration with the human interaction interface is high, which can significantly enhance the operability and practicability of fault diagnosis of agricultural machinery hydraulic systems.


## 3.4.2. Inference Rules

The traditional reasoning rule of the expert system is to simply match the fault information input by the user with the rules and data in the knowledge base; when the matching is successful, the fault diagnosis result is output. However, this kind of reasoning rule takes a long time in the reasoning process, the timeliness of fault diagnosis is low, and the traditional reasoning rule does not fully utilize the knowledge base data. To this end, the authors aim at the characteristics of fault diagnosis of agricultural machinery hydraulic equipment; a forward inference strategy based on neural network is designedFirst, the collected fault information data is imported into the inference engine through the knowledge acquisition module, and then according to the output of the neural network, forward uncertainty inference is performed, and the inference trajectory is recorded. Compare the inference results of the two parts; if the inference results are inconsistent, the data needs to be fused to improve the inference accuracy. The specific reasoning process is as follows.(Step 1)
Import the fault diagnosis knowledge base and the collected fault data: the fault data set is as follows:(1)X=x1,x2,⋯,xL.(Step 2)
Calculate the output of the hidden layer of the neural network.(2)y1=11+e−β1,(3)β1=∑i=jLxiwij1−θi1.(Step 3)
Calculate the output of neurons in the output layer.(4)y2=11+e−β2,(5)β2=∑i=jLyiwij2−θi2.(Step 4)
According to the fault judgment rule, the fault diagnosis result is obtained.In the formula,e is the natural logarithm; β is the back propagation error; wij is the neural network connection weight; θi is the threshold of the neuron.


## 3.4.3. System Development and Implementation

The authors build the expert system fault diagnosis of agricultural machinery hydraulic system based on expert system tool (CLIPS); CLIPS can be very convenient to carry out joint debugging, write external functions and complex numerical operations throughVC++6.0, use MicrosoftSQLServer to manage diagnosis knowledge base and database, and use MicrosoftVisualStudioC# to develop fault diagnosis human-computer interaction interface. The whole expert system has the advantages of strong portability, simple interface, and easy operation, the specific implementation steps are as follows.
(Step 1)
Register and install the CLIPS control inVC++6.0, configure the relevant environment variables of the CLIPS control as required, and add various properties and functions of the CLIPS control in the control library.(Step 2)
Add a global variable for the CLIPS control in the project to record the working process of the inference engine.(Step 3)
Use the Bind command of the CLIPS control to construct variable constraints.(Step 4)
Build the expert system startup program inVC++6.0, and realize the import of fault information and the output of fault diagnosis results based on the cyclic structure.(Step 5)
Define the fact variable and transfer it to the CLIPS control via the AssertString command.(Step 6)
Use the CLIPS control to transmit the fault diagnosis results to the display control window.


## 3.5. Sparse Coding Fault Diagnosis

Sparse coding is widely used in various fault diagnosis occasions; the authors use it for fault diagnosis of agricultural machinery hydraulic system; it complements the constructed expert system to achieve high-performance agricultural machinery hydraulic system fault diagnosis. Sparse coding troubleshooting can be divided into two parts: dictionary learning and sparse solving. Among them, dictionary learning is a process of adaptive learning according to fault data (that is, fault signals), and sparse solution is based on adaptive learning, the process of solving the sparse coefficients through the optimal solution method.


## 3.6. Dictionary Learning Based on K-SVD

K-SVD is a dictionary learning method with good performance. The method trains and learns the data dictionary through iterative calculation and can continuously modify the atoms in the dictionary based on the sparse decomposition coefficient during the training process and finally obtain an overcomplete data dictionary. The training speed of the K-SVD algorithm is fast, the compatibility is strong, and it can be coupled with most tracking algorithms, as shown in formula (6).The K-SVD algorithm dictionary learning process is as follows:(6)minD,XY−DX2Fs.t.∀i,xi0⩽T0.In the formula,D is the dictionary; X is the sparse coefficient; Y is the fault signal that needs to be decomposed; T0 is the upper limit of the number of nonzero components; xi is the vector norm; usually 2 norm is selected.In the process of dictionary learning, first set the coefficientX to a fixed value, assuming that the atom in the kth column in the dictionary update process is dk; at this time, the objective function of the K-SVD algorithm is shown in
(7)Y−DXF2=Y−∑j≠kdjxTk−djxTkF2=Ek−dkxTkF2.The following is the SVD decomposition of matrixEk:
(8)EkR=UΔVT.The first column of the decomposed matrixU is updated to the kth column in the dictionary, and the first column of the matrix V is multiplied by the first column and the first row of the matrix Δ to modify the sparse coefficient matrix xTk.


## 3.7. Sparse Solution Based on Orthogonal Matching Pursuit

Orthogonal matching pursuit is an improvement to the original matching pursuit algorithm; on the basis of the original algorithm, a step-by-step signal decomposition strategy is added; the specific solution method is as follows. First, the matching tracking is carried out in the complete atom library obtained by dictionary learning, and the atom with the highest matching degree with the fault signal is selected; then, the atom is removed from the fault signal to obtain a residual signal; next, the optimal atom matching is performed on the residual signal in turn, and the optimal atom is removed. The atom matching and atom removal are repeated until the ability of the residual signal reaches the predesigned threshold or the number of iterations reaches the maximum, and the solution ends.


## 3.8. Realization of Coefficient Coding Fault Diagnosis

Combined with the sparse coding method, a fault diagnosis model of the hydraulic system of agricultural machinery is constructed, as shown in Figure4.Figure 4
Sparse coding fault diagnosis model.In the signal preprocessing stage, the directly collected fault signals are time-domain waveforms, which need to be converted in the time-frequency domain with the help of spectrum analysis tools. In the dictionary learning stage, it is necessary to learn the dictionary according to the fault types of the agricultural machinery hydraulic system and obtain a complete dictionary of different fault types. In the fault identification stage, after obtaining the fault dictionary, the spectral signal of the unknown fault state is decomposed and reconstructed, so as to realize the fault diagnosis of the agricultural machinery hydraulic system.


## 3.9. Experiment

The joint fault diagnosis model based on expert system and sparse coding is shown in Figure5.Figure 5
Joint fault diagnosis model of agricultural machinery hydraulic system.First, in order to verify the fault diagnosis of agricultural machinery hydraulic system based on sparse coding proposed by the authors, a complete dictionary library is obtained after dictionary learning and sparse solution for different fault types, and then the correlation calculation of fault signals is carried out to realize fault identification. The parameter settings are as follows.SparsityK=12, maximum iteration is 50 times, and after dictionary learning based on K-SVD, we get 1024×8 dictionary, corresponding to 8 fault types of agricultural hydraulic system.After the fault diagnosis system is built, the fault factors of the hydraulic system are first analyzed, after sorting out, the relationship between the main factors of hydraulic fault diagnosis as shown in Table1 is formed, the factors 1 to 7 in Table 1 are formed into a factor set X, and at the same time, a corresponding item set Y is formed for the positions where the components of the hydraulic system may fail; it mainly includes oil supply subsystem, control subsystem, pressure regulation subsystem, execution subsystem, and feedback subsystem, which are combined into a fault judgment matrix relationship, which is convenient for accurate fault location and identification.Table 1
Relationship between main factors of hydraulic fault diagnosis.
Serial numberFactor nameWeight range1System leak0.1~0.62System vibration0.1~0.53System noise0.2~0.84System heats up0.1~0.85System crawling0.1~0.76Insufficient system flow0.1~0.77Insufficient system pressure0.1~1.0


## 4. Results and Discussion

In order to verify the fault diagnosis performance of the sparse coding and expert system proposed by the authors, a diagnostic test was carried out on the fault data of a certain type of agricultural machinery hydraulic system, each group of samples selects 20 components, and the test results are shown in Figure6. The test result indicates the constructed fault diagnosis expert system can effectively identify the hydraulic faults of agricultural machinery, and the fault accuracy rate is high. When the sparse coding method is added, the fault diagnosis accuracy rate of the expert system is further improved, which verifies the effectiveness of the method.Figure 6
Comparative analysis diagram of fault diagnosis results.A fault diagnosis model based on expert system and sparse coding is designed, and the sparse coding fault diagnosis results are integrated with the expert system to form complementary advantages. The test result indicates, after sparse coding fusion, the fault diagnosis accuracy rate can be increased to more than 91%, and the built model can meet the fault diagnosis requirements of agricultural machinery hydraulic system, which has certain practical application significance.


## 5. Conclusion

The authors propose the application of modern multimedia and sensing technology in fault detection and diagnosis of hydraulic agricultural machinery, starting from the operation mechanism of the hydraulic system of agricultural machinery and equipment; combined with the coordination of the working components of the hydraulic components, the theoretical model and core algorithm of the fault diagnosis of the hydraulic components of the multifunctional harvester are obtained, and the fault diagnosis is systematically designed. The design and application of the fault diagnosis system of agricultural machinery and equipment are mainly established by combining the data theoretical model established by the fault diagnosis of hydraulic components with the BP algorithm; the system mainly includes three parts, namely, the establishment of theoretical model, the establishment of fault diagnosis system, and the control system of hydraulic component diagnosis. It is necessary to start from these three aspects, make them operate in coordination with each other, jointly promote the efficient operation of the fault diagnosis system of agricultural machinery and equipment, and then vigorously promote the development of my country’s agricultural machinery industry to a higher level.



---

*Source: 8627554-2022-09-06.xml*