Diesel engine cold test fault detection method and system based on hybrid bayesian network
By using a hybrid Bayesian network and an improved firefly algorithm in the cold test of a diesel engine, the fault detection of the diesel engine is optimized, which solves the problem that the existing technology cannot identify diesel engine assembly faults and achieves fast and accurate fault detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2023-06-01
- Publication Date
- 2026-06-26
AI Technical Summary
Existing cold test methods for diesel engines cannot effectively identify the causes of malfunctions during diesel engine assembly, nor can they fully analyze the correlation between parameters, resulting in inaccurate testing.
A hybrid Bayesian network is adopted, using the leakage values before the exhaust valve opens, the leakage values after the exhaust valve closes, the minimum intake vacuum, the leakage values before the intake valve opens, the leakage values after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes. The Bayesian network structure is optimized by combining the K2 score function and the improved firefly algorithm for fault detection.
It enables rapid and accurate detection of cold-test faults in diesel engines, improving the comprehensiveness and accuracy of the detection.
Smart Images

Figure CN116735216B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of diesel engine cold test technology, and in particular relates to a diesel engine cold test fault detection method and system based on hybrid Bayesian networks. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Due to the complex structure and harsh working environment of diesel engines, their reliability is crucial for ensuring normal operation. Therefore, the quality inspection of diesel engine assembly is particularly important. Currently, cold testing is one of the key technologies for ensuring diesel engine assembly quality. Cold testing eliminates the need for ignition testing, offering advantages such as low pollution, low cost, and short time, leading to its increasingly widespread application in the internal combustion engine industry. Current cold testing techniques primarily involve using an electric motor to rotate the diesel engine while various sensors collect and detect parameters. For each parameter, a normal or abnormal threshold is determined to assess the assembly quality. However, the inventors have discovered that this method cannot determine the correlation between parameters; it only performs single-parameter testing and does not involve multi-parameter combination testing. This technology struggles to comprehensively analyze diesel engine quality problems caused by assembly errors and cannot effectively identify the causes of diesel engine malfunctions due to assembly issues. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a diesel engine cold test fault detection method and system based on a hybrid Bayesian network. The scheme uses parameters such as exhaust valve leakage value before opening, exhaust valve leakage value after closing, minimum intake vacuum, intake valve leakage value before opening, intake valve leakage value after closing, maximum crankshaft torque, and maximum exhaust pressure as nodes in the Bayesian network structure. The K2 score function is used as the fitness function, and an improved firefly algorithm is employed to obtain the optimal Bayesian network structure. This optimal Bayesian network is then used to perform fault detection on the diesel engine cold test dataset, achieving rapid and accurate detection of diesel engine cold test faults.
[0005] According to a first aspect of the present invention, a method for detecting cold-test faults in a diesel engine based on a hybrid Bayesian network is provided, comprising:
[0006] The parameters during the cold test of the diesel engine are acquired in real time, including the leakage value before the exhaust valve is opened, the leakage value after the exhaust valve is closed, the minimum intake vacuum, the leakage value before the intake valve is opened, the leakage value after the intake valve is closed, the maximum crankshaft torque, and the maximum exhaust pressure.
[0007] Based on the obtained parameter values, the diesel engine fault detection results are obtained using an optimized hybrid Bayesian network model. The optimized hybrid Bayesian network model uses parameters such as exhaust valve leakage value before opening, exhaust valve leakage value after closing, minimum intake vacuum, intake valve leakage value before opening, intake valve leakage value after closing, maximum crankshaft torque, and maximum exhaust pressure as nodes in the Bayesian network structure. Based on a preset fitness function, the Bayesian network structure is optimized using a firefly algorithm to obtain the optimized Bayesian network structure. In the firefly algorithm, the top three fittest fireflies are used to guide the movement of other fireflies.
[0008] Furthermore, in the firefly algorithm, based on the idea of the gray wolf algorithm, the top three fireflies in fitness are used to guide the movement of other fireflies, and their position updates are performed using the following formula:
[0009]
[0010] in, Firefly X i The position of X in the t-th iteration α X β and X δ The positions of the three fireflies with the best fitness are β1, β2 and β3, which are attraction coefficients, r is a random number between [0,1], and α is a step size factor between [0,1].
[0011] Furthermore, the training of the hybrid Bayesian network model is specifically as follows:
[0012] Historical parameter values during the cold test of the diesel engine are obtained as a training set; wherein, the historical parameter values include leakage value before the exhaust valve is opened, leakage value after the exhaust valve is closed, minimum intake vacuum, leakage value before the intake valve is opened, leakage value after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure.
[0013] Using the leakage values before the exhaust valve opens, the leakage values after the exhaust valve closes, the minimum intake vacuum, the leakage values before the intake valve opens, the leakage values after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes in the Bayesian network structure, the Firefly algorithm is used to optimize the Bayesian network structure based on the historical parameter values, resulting in an optimized Bayesian network structure.
[0014] Furthermore, in the hybrid Bayesian network model, a Gaussian distribution is used to determine whether the data is in the normal range or the abnormal range, and 3σ is used as the threshold between the normal range and the abnormal range.
[0015] Furthermore, the parameters of leakage value before exhaust valve opening, leakage value after exhaust valve closing, minimum intake vacuum, leakage value before intake valve opening, leakage value after intake valve closing, maximum crankshaft torque, and maximum exhaust pressure are obtained by cold test equipment. Among them, the minimum intake vacuum and maximum exhaust pressure are obtained by gas pressure sensor, the intake valve opening position and intake valve closing position are obtained by crankshaft angle sensor, and the maximum torque is obtained by torque sensor.
[0016] Furthermore, the fitness function adopts the K2 score function, specifically expressed as follows:
[0017]
[0018] Where, x i Let pa(x) be the i-th variable in the Bayesian network. i ) is the variable x i The parent node, q i For variable x i The number of types of parent node instances. r i This indicates that each variable has r. i N possible values ijk Let i be the number of samples in the dataset where the parent node of the i-th variable takes the k-th value and takes the j-th value, where i is the i-th variable, j is the parent node of the i-th variable taking the j-th value, and k is the i-th variable taking the k-th value.
[0019] According to a second aspect of the present invention, a diesel engine cold test fault detection system based on a hybrid Bayesian network is provided, comprising:
[0020] The data acquisition unit is used to acquire parameter values during the cold test of the diesel engine in real time. The parameter values include leakage value before the exhaust valve is opened, leakage value after the exhaust valve is closed, minimum intake vacuum, leakage value before the intake valve is opened, leakage value after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure.
[0021] The fault detection unit is used to obtain diesel engine fault detection results based on the obtained parameter values and a pre-trained hybrid Bayesian network model. The hybrid Bayesian network model uses the leakage value before the exhaust valve opens, the leakage value after the exhaust valve closes, the minimum intake vacuum, the leakage value before the intake valve opens, the leakage value after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes in the Bayesian network structure. Based on a preset fitness function, the Bayesian network structure is optimized using a firefly algorithm to obtain the optimal Bayesian network structure. In the firefly algorithm, the top three fitness fireflies are used to guide the movement of other fireflies.
[0022] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the memory, wherein the processor executes the program to implement the aforementioned method for detecting diesel engine cold test faults based on a hybrid Bayesian network.
[0023] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the aforementioned method for detecting diesel engine cold-test faults based on a hybrid Bayesian network.
[0024] The above one or more technical solutions have the following beneficial effects:
[0025] (1) This invention provides a method and system for detecting diesel engine cold test faults based on a hybrid Bayesian network. The scheme uses parameters such as the leakage value before the exhaust valve is opened, the leakage value after the exhaust valve is closed, the minimum intake vacuum, the leakage value before the intake valve is opened, the leakage value after the intake valve is closed, the maximum crankshaft torque, and the maximum exhaust pressure as nodes of the Bayesian network structure. Gaussian distribution is used to determine whether the data is in the normal or abnormal range. The K2 score function is used as the fitness function. The optimal Bayesian network structure is obtained by using an improved firefly algorithm. The optimal Bayesian network is then used to detect faults in the diesel engine cold test dataset, thereby achieving fast and accurate detection of diesel engine cold test faults.
[0026] (2) The solution described in this invention improves the update position of the Firefly Algorithm based on the Gray Wolf Algorithm, which effectively improves the optimization ability of the Firefly Algorithm and thus obtains the optimal Bayesian network structure.
[0027] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0028] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0029] Figure 1 This is a flowchart of a diesel engine cold test fault detection method based on a hybrid Bayesian network, as described in an embodiment of the present invention. Detailed Implementation
[0030] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0031] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0032] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0033] Terminology Explanation:
[0034] Cold test: An electric motor drives the engine to simulate the engine's operating state. Sensors dynamically collect various characteristic parameters reflecting the engine's performance. Through calculation and analysis by the system software, the differences between the measured parameters and the standard state are compared to make a quantitative judgment on the engine's quality.
[0035] Hybrid Bayesian network: This refers to a Bayesian network structure optimized using swarm intelligence algorithms.
[0036] Example 1:
[0037] The purpose of this embodiment is to provide a method for detecting diesel engine cold-test faults based on hybrid Bayesian networks.
[0038] A method for detecting cold-test faults in diesel engines based on hybrid Bayesian networks includes:
[0039] The parameters during the cold test of the diesel engine are acquired in real time, including the leakage value before the exhaust valve is opened, the leakage value after the exhaust valve is closed, the minimum intake vacuum, the leakage value before the intake valve is opened, the leakage value after the intake valve is closed, the maximum crankshaft torque, and the maximum exhaust pressure.
[0040] Based on the obtained parameter values, the diesel engine fault detection results are obtained using an optimized hybrid Bayesian network model. The optimized hybrid Bayesian network model uses the following parameters as nodes in the Bayesian network structure: leakage value before exhaust valve opening, leakage value after exhaust valve closing, minimum intake vacuum, leakage value before intake valve opening, leakage value after intake valve closing, maximum crankshaft torque, and maximum exhaust pressure. Based on a preset fitness function, the Bayesian network structure is optimized using a firefly algorithm to obtain the optimized Bayesian network structure. In the firefly algorithm, the top three fittest fireflies are used to guide the movement of other fireflies.
[0041] In specific implementation, the training of the hybrid Bayesian network model is as follows:
[0042] Historical parameter values during the cold test of the diesel engine are obtained as a training set; wherein, the historical parameter values include leakage value before the exhaust valve is opened, leakage value after the exhaust valve is closed, minimum intake vacuum, leakage value before the intake valve is opened, leakage value after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure.
[0043] Using the leakage values before the exhaust valve opens, the leakage values after the exhaust valve closes, the minimum intake vacuum, the leakage values before the intake valve opens, the leakage values after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes in the Bayesian network structure, the Firefly algorithm is used to optimize the Bayesian network structure based on the historical parameter values, resulting in an optimized Bayesian network structure.
[0044] In its implementation, the firefly algorithm, based on the idea of the gray wolf algorithm, uses the top three fireflies in fitness to guide the movement of other fireflies, and its position update uses the following formula:
[0045]
[0046] in, Firefly X i The position of X in the t-th iteration α X β and X δ The positions of the three fireflies with the best fitness are β1, β2 and β3, which are attraction coefficients, r is a random number between [0,1], and α is a step size factor between [0,1].
[0047] In specific implementation, the leakage values of the diesel engine before the exhaust valve is opened, after the exhaust valve is closed, minimum intake vacuum, leakage values before the intake valve is opened, leakage values after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure are obtained by cold test equipment. Among them, the leakage values before the exhaust valve is opened, leakage values after the exhaust valve is closed, minimum intake vacuum, leakage values before the intake valve is opened, minimum intake vacuum, and maximum exhaust pressure are obtained by gas pressure sensors, and the maximum torque is obtained by torque sensors.
[0048] In specific implementation, in the hybrid Bayesian network model, a Gaussian distribution is used to determine whether the data is in the normal range or the abnormal range, and 3σ is used as the threshold between the normal range and the abnormal range.
[0049] In practical implementation, the Bayesian network needs to be constructed in advance based on expert knowledge. For example, node X1 represents the leakage value before the intake valve opens; node X2 represents the leakage value after the intake valve closes; node X3 represents the leakage value before the exhaust valve opens; node X4 represents the leakage value after the exhaust valve closes; node X5 represents the minimum intake vacuum; node X6 represents the maximum torque; and node X7 represents the maximum exhaust pressure. Furthermore, based on the causal relationship between nodes, node X1 is used as the parent node of nodes X5 and X6, node X2 is used as the parent node of nodes X5, X6, and X7, node X3 is used as the parent node of node X7, and node X4 is used as the parent node of node X7, thereby realizing the initial construction of the Bayesian network.
[0050] In specific implementation, the fitness function adopts the K2 score function, which is specifically expressed as follows:
[0051]
[0052] Where, x i Let pa(x) be the i-th variable in the Bayesian network. i ) is the variable x i The parent node, q i For variable x i The number of types of parent node instances. r i This indicates that each variable has r. i N possible values ijk Let i be the number of samples in the dataset where the parent node of the i-th variable takes the k-th value and takes the j-th value, where i is the i-th variable, j is the parent node of the i-th variable taking the j-th value, and k is the i-th variable taking the k-th value.
[0053] In the specific implementation, the optimized hybrid Bayesian network model is used to obtain the diesel engine fault detection results. Taking the initial construction of the aforementioned Bayesian network as an example, the corresponding optimized hybrid Bayesian network model is specifically represented as follows: node X1 is the parent node of nodes X2 and X5, node X2 is the parent node of node X5, node X3 is the parent node of nodes X4 and X7; node X5 is the parent node of node X6, and node X6 is the parent node of node X7, thus obtaining the optimized hybrid Bayesian network model. At the same time, based on the obtained optimized hybrid Bayesian network model, Gaussian distribution is used to determine whether the data is in the normal range or the abnormal range, and the final detection result is obtained.
[0054] Example 2
[0055] The purpose of this embodiment is to provide a diesel engine cold test fault detection system based on a hybrid Bayesian network.
[0056] A diesel engine cold test fault detection system based on a hybrid Bayesian network includes:
[0057] The data acquisition unit is used to acquire parameter values during the cold test of the diesel engine in real time. The parameter values include leakage value before the exhaust valve is opened, leakage value after the exhaust valve is closed, minimum intake vacuum, leakage value before the intake valve is opened, leakage value after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure.
[0058] The fault detection unit is used to obtain diesel engine fault detection results based on the obtained parameter values and a pre-trained hybrid Bayesian network model. The hybrid Bayesian network model uses the leakage value before the exhaust valve opens, the leakage value after the exhaust valve closes, the minimum intake vacuum, the leakage value before the intake valve opens, the leakage value after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes in the Bayesian network structure. Based on a preset fitness function, the Bayesian network structure is optimized using a firefly algorithm to obtain the optimal Bayesian network structure. In the firefly algorithm, the top three fitness fireflies are used to guide the movement of other fireflies.
[0059] Furthermore, the system described in this embodiment corresponds to the method described in Embodiment 1, and its technical details have been described in detail in Embodiment 1, so they will not be repeated here.
[0060] In further embodiments, the following is also provided:
[0061] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When executed by the processor, the computer instructions perform the method described in Embodiment 1. For brevity, further details are omitted here.
[0062] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0063] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory may also include non-volatile random access memory. For example, memory may also store information about the device type.
[0064] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the method described in Embodiment 1.
[0065] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.
[0066] Those skilled in the art will recognize that the units, i.e., algorithm steps, of the various examples described in connection with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0067] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for detecting cold-test faults in diesel engines based on hybrid Bayesian networks, characterized in that, include: The parameters during the cold test of the diesel engine are acquired in real time, including the leakage value before the exhaust valve is opened, the leakage value after the exhaust valve is closed, the minimum intake vacuum, the leakage value before the intake valve is opened, the leakage value after the intake valve is closed, the maximum crankshaft torque, and the maximum exhaust pressure. Based on the obtained parameter values, the diesel engine fault detection results are obtained using an optimized hybrid Bayesian network model. The optimized hybrid Bayesian network model uses the following parameters as nodes in the Bayesian network structure: exhaust valve leakage value before opening, exhaust valve leakage value after closing, minimum intake vacuum, intake valve leakage value before opening, intake valve leakage value after closing, maximum crankshaft torque, and maximum exhaust pressure. Based on a preset fitness function, the Bayesian network structure is optimized using a firefly algorithm to obtain the optimized Bayesian network structure. In the firefly algorithm, the top three fittest fireflies are used to guide the movement of other fireflies. In the firefly algorithm, based on the idea of the gray wolf algorithm, the top three fireflies in fitness are used to guide the movement of other fireflies, and their positions are updated using the following formula: in, Fireflies In the Position in the next iteration , and The locations of the three fireflies with the best adaptability. , and As the attractiveness coefficient, A random number between [0,1] The step size factor is between [0,1].
2. The diesel engine cold test fault detection method based on hybrid Bayesian networks as described in claim 1, characterized in that, The training of the hybrid Bayesian network model is specifically as follows: Historical parameter values during the cold test of the diesel engine are obtained as a training set; wherein, the historical parameter values include leakage value before exhaust valve opening, leakage value after exhaust valve closing, minimum intake vacuum, leakage value before intake valve opening, leakage value after intake valve closing, maximum crankshaft torque, and maximum exhaust pressure; Using the leakage values before the exhaust valve opens, the leakage values after the exhaust valve closes, the minimum intake vacuum, the leakage values before the intake valve opens, the leakage values after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes in the Bayesian network structure, the Firefly algorithm is used to optimize the Bayesian network structure based on the historical parameter values, resulting in an optimized Bayesian network structure.
3. The diesel engine cold test fault detection method based on hybrid Bayesian networks as described in claim 1, characterized in that, In the hybrid Bayesian network model, a Gaussian distribution is used to determine whether the data is within the normal or abnormal range, and a 3... This serves as a threshold between the normal and abnormal ranges.
4. The diesel engine cold test fault detection method based on hybrid Bayesian networks as described in claim 1, characterized in that, The leakage values of the diesel engine before the exhaust valve is opened, after the exhaust valve is closed, minimum intake vacuum, leakage values before the intake valve is opened, leakage values after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure are obtained by cold test equipment. Among them, the leakage values before the exhaust valve is opened, after the exhaust valve is closed, minimum intake vacuum, leakage values before the intake valve is opened, leakage values after the intake valve is closed, and maximum exhaust pressure are obtained by gas pressure sensor, and the maximum torque is obtained by torque sensor.
5. The diesel engine cold test fault detection method based on hybrid Bayesian networks as described in claim 1, characterized in that, The fitness function adopts the K2 score function, which is specifically expressed as follows: in, Let i be the i-th variable in the Bayesian network. For variables The parent node, For variables The number of types of parent node instances. , This indicates that each variable has 10 possible values Let i be the number of samples in the dataset where the parent node of the i-th variable takes the k-th value and takes the j-th value, where i is the i-th variable, j is the parent node of the i-th variable taking the j-th value, and k is the i-th variable taking the k-th value.
6. A diesel engine cold test fault detection system based on a hybrid Bayesian network, characterized in that, include: The data acquisition unit is used to acquire parameter values during the cold test of the diesel engine in real time. The parameter values include leakage value before the exhaust valve is opened, leakage value after the exhaust valve is closed, minimum intake vacuum, leakage value before the intake valve is opened, leakage value after the intake valve is closed, maximum crankshaft torque, and maximum exhaust pressure. The fault detection unit is used to obtain diesel engine fault detection results based on the obtained parameter values using a pre-trained hybrid Bayesian network model. The hybrid Bayesian network model uses the leakage value before the exhaust valve opens, the leakage value after the exhaust valve closes, the minimum intake vacuum, the leakage value before the intake valve opens, the leakage value after the intake valve closes, the maximum crankshaft torque, and the maximum exhaust pressure as nodes in the Bayesian network structure. Based on a preset fitness function, the Bayesian network structure is optimized using a firefly algorithm to obtain the optimal Bayesian network structure. In the firefly algorithm, the top three fitness fireflies are used to guide the movement of other fireflies. In the firefly algorithm, based on the idea of the gray wolf algorithm, the top three fireflies in fitness are used to guide the movement of other fireflies, and their positions are updated using the following formula: in, Fireflies In the Position in the next iteration , and The locations of the three fireflies with the best adaptability. , and As the attraction coefficient, A random number between [0,1] The step size factor is between [0,1].
7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and running thereon, characterized in that, When the processor executes the program, it implements a diesel engine cold test fault detection method based on a hybrid Bayesian network as described in any one of claims 1-5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements a diesel engine cold test fault detection method based on a hybrid Bayesian network as described in any one of claims 1-5.