Automobile fault diagnosis method and system
Through federal learning and hybrid neural network model, combining exhaust gas and environmental parameters, dynamically calibrate the air-fuel ratio and pollutant threshold, and invert the engine combustion state, the problem of insufficient fault recognition accuracy of traditional diagnostic technology under complex operating conditions is solved, and high-precision fault diagnosis is achieved.
Patent Information
- Application Number
- CN202510920653.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Traditional automotive fault diagnosis technology has insufficient fault feature recognition accuracy under multi-parameter dynamic coupling and environmental interference, and cannot adapt to complex working conditions, resulting in high missed detection rate and outstanding risk of misjudgment.
The federal learning framework is used to combine exhaust gas component data and local environmental parameters, and the air-fuel ratio and pollutant threshold are dynamically calibrated through physical information neural network and hybrid CNN-Transformer model, the combustion state in the engine cylinder is inverted, and fault diagnosis is carried out based on exhaust gas timing characteristics and long-term dependence of engine operating conditions.
It significantly improves the accuracy and adaptability of fault diagnosis, and can adaptively perform fault identification under different environmental conditions, reducing the rate of error judgment.
Smart Images

Figure CN120429759B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a method and system for diagnosing automobile faults. Background Art
[0002] As global emission regulations become increasingly stringent, automobile exhaust composition has become the core basis for evaluating engine combustion efficiency and the health status of key components. X The concentration changes of gases such as HC and CO can not only directly reflect the faults of the ignition system, fuel injection and other links, but also indirectly reveal mechanical problems such as valve sealing and piston ring wear. This makes exhaust-based fault diagnosis technology crucial to vehicle safe operation and maintenance and environmental compliance.
[0003] Traditional fault diagnosis techniques primarily rely on preset fault codes in the on-board diagnostic system or single exhaust parameter thresholds. Environmental interference compensation strategies based on linear models struggle to adapt to complex operating conditions. In particular, in nonlinear scenarios characterized by fluctuating ambient temperature and humidity, varying fuel quality, and the dynamic coupling of multiple gas concentrations, traditional models are unable to accurately parse the correlation between fault characteristics and interference signals, resulting in a high rate of missed detection of early-stage complex faults and a significant risk of misjudgment. Furthermore, existing methods lack the ability to model the spatiotemporal correlation characteristics of exhaust parameters and lack a real-time dynamic correction mechanism, further limiting diagnostic accuracy and engineering applicability. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an automobile fault diagnosis method to solve the problem of insufficient fault feature recognition accuracy of traditional diagnosis technology under multi-parameter dynamic coupling and environmental interference.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for diagnosing automobile faults, comprising: acquiring exhaust gas composition data in real time, and synchronously collecting local environmental parameters and OBD-II data; based on a federated learning framework, inputting the exhaust gas composition data and local environmental parameters into a pre-trained global benchmark model, dynamically calibrating the λ value and the exhaust gas composition threshold, and generating normalized exhaust gas data after environmental compensation; inputting the normalized exhaust gas data and OBD-II data into a physical information neural network model; embedding the combustion reaction kinetics equation in the physical information neural network model, and inverting the combustion state parameters in the engine cylinder through inverse calculation; jointly inputting the combustion state parameters and the calibrated λ value into a federated CNN-Transformer classifier; extracting local exhaust gas time series features through a convolutional layer, modeling the long-term dependency of the OBD-II data through a Transformer encoder, outputting the combustion fault probability distribution and the mechanical fault probability distribution, and uploading them to the federated server in an encrypted manner for updating the global benchmark model.
[0008] As a preferred solution of the automobile fault diagnosis method of the present invention, wherein: the λ value refers to the air-fuel ratio calibration coefficient dynamically output by the global reference model according to the local environmental parameters;
[0009] The exhaust gas composition threshold refers to the dynamic pollutant boundary value established through multi-node joint training in the global benchmark model.
[0010] As a preferred embodiment of the automobile fault diagnosis method of the present invention, the steps of generating normalized exhaust gas data after environmental compensation are as follows:
[0011] Download the pre-trained global baseline model from the federated server, decrypt it using the locally stored decryption key, and load it into memory;
[0012] Normalize the local environmental parameters and exhaust composition data and merge them into a fixed-dimensional input tensor, input it into the global benchmark model, perform forward propagation calculations, and output the λ calibration coefficient and threshold scaling factor;
[0013] Based on the lambda calibration coefficient and the threshold scaling factor, the air-fuel ratio calibration coefficient and the dynamic pollutant boundary value are calculated, and the exhaust composition data is physically compensated according to the local environmental parameters to obtain the normalized exhaust data.
[0014] As a preferred solution of the automobile fault diagnosis method of the present invention, wherein: the physical information neural network model refers to a neural network architecture for engine combustion state analysis;
[0015] The neural network architecture reserves an embedded interface for the combustion reaction kinetics equation, and performs data-physics joint optimization through a physical constraint loss function.
[0016] As a preferred solution of the automobile fault diagnosis method of the present invention, the specific steps of calculating and inverting the combustion state parameters in the engine cylinder are as follows:
[0017] Screen the CO oxidation and NO generation reaction equations, define the in-cylinder temperature and pressure as trainable variables, and establish a mathematical correlation with the exhaust gas composition;
[0018] The reaction equation is converted into a physical constraint loss function, and the residual between the theoretical exhaust gas concentration and the normalized exhaust gas data is calculated and superimposed into the total loss function of the neural network for joint optimization.
[0019] The adjoint equation method is used to embed the reaction partial derivatives into back propagation, and the neural network weights and temperature and pressure parameters are updated synchronously. Inverse calculation guided by physical laws is performed to output combustion state parameters.
[0020] As a preferred embodiment of the automobile fault diagnosis method of the present invention, the steps of outputting the combustion fault probability distribution and the mechanical fault probability distribution are as follows:
[0021] The combustion state parameters output by the physical information neural network model and the lambda value dynamically calibrated by federated learning are combined into a joint input vector, which is then input into the front-end interface of the federated CNN-Transformer classifier.
[0022] In the CNN branch of the federated CNN-Transformer classifier, a 1D convolution kernel is used to perform sliding window feature extraction on the time series segments of the normalized exhaust data, and the output represents NO X Local eigenvectors of instantaneous fluctuations and CO slow-changing trends;
[0023] In the Transformer branch of the federated CNN-Transformer classifier, multi-head self-attention calculation is performed on the historical OBD-II data to generate an encoding vector of the long-term dependencies of the engine operating conditions;
[0024] Dynamically allocate the weight ratio of CNN and Transformer branches based on the federated learning confidence of the lambda value;
[0025] The dual-branch fully connected layer of the federated CNN-Transformer classifier outputs the probability distribution of combustion faults and mechanical faults respectively.
[0026] As a preferred solution of the automobile fault diagnosis method described in the present invention, the federated CNN-Transformer classifier refers to a hybrid neural network architecture that is collaboratively trained under a federated learning framework, the CNN branch performs exhaust gas time series feature extraction, and the Transformer branch performs OBD-II data dependency modeling.
[0027] In the second aspect, the present invention provides an automobile fault diagnosis system, including a data acquisition module, a federated calibration module, a physical modeling module, a state inversion module, a joint diagnosis module and a fault analysis module; the data acquisition module is used to obtain exhaust gas composition data in real time, and synchronously collect local environmental parameters and OBD-II data; the federated calibration module is used to input the exhaust gas composition data and local environmental parameters into a pre-trained global benchmark model based on a federated learning framework, dynamically calibrate the λ value and the exhaust gas composition threshold, and generate normalized exhaust gas data after environmental compensation; the physical modeling module is used to input the normalized exhaust gas data and OBD-II data into the physical modeling module. The information neural network model; the state inversion module is used to embed the combustion reaction kinetics equations in the physical information neural network model and invert the combustion state parameters in the engine cylinder through inverse calculation; the joint diagnosis module is used to jointly input the combustion state parameters and the calibrated λ value into the federal CNN-Transformer classifier; the fault analysis module is used to extract the local features of the exhaust gas time series through the convolution layer, model the long-term dependency of the OBD-II data through the Transformer encoder, output the combustion fault probability distribution and the mechanical fault probability distribution, and upload them to the federal server in an encrypted manner for global benchmark model update.
[0028] The beneficial effects of the present invention are as follows: by combining exhaust gas composition data, environmental parameters and OBD-II data and embedding the combustion reaction kinetics equation, the combustion state in the engine cylinder can be more accurately inverted, thereby significantly improving the accuracy of fault diagnosis; the air-fuel ratio and pollutant thresholds are dynamically calibrated using a federated learning framework, and combined with the CNN-Transformer hybrid model, a collaborative analysis of the exhaust gas timing characteristics and the long-term dependency of the engine operating conditions is achieved, which can adapt to the fault diagnosis needs under different environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 This is a flow chart of the automobile fault diagnosis method.
[0031] Figure 2 This is a schematic diagram of the interaction between the automobile fault diagnosis system modules.
[0032] Figure 3 Generate a flow chart for normalizing exhaust data.
[0033] Figure 4 This is the flow chart of the inversion calculation of combustion state parameters. DETAILED DESCRIPTION
[0034] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0035] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0036] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.
[0037] Reference Figure 1 , is an embodiment of the present invention, which provides a method for diagnosing automobile faults, comprising the following steps:
[0038] S1: Acquire exhaust gas composition data in real time, and simultaneously collect local environmental parameters and OBD-II data.
[0039] S1.1: After starting the exhaust gas analyzer and preheating it to the sensor operating temperature, start the real-time sampling mode and continuously collect exhaust gas composition data at a fixed frequency (such as 1Hz). The exhaust gas composition data includes CO2 concentration, CO concentration, HC concentration, O2 concentration and NO X concentration.
[0040] S1.2: While real-time sampling mode is enabled, environmental sensors are also enabled to measure ambient temperature, relative humidity, and atmospheric pressure to generate local environmental parameters. It should be noted that temperature is recorded in °C (e.g., 25.3°C), humidity in %RH (e.g., 45.2%RH), and pressure in hPa (e.g., 1013.2hPa).
[0041] S1.3: Connect to the vehicle's OBD-II interface and execute the ATZ command initialization in sequence to further obtain engine speed, engine load, long-term fuel correction value and coolant temperature as OBD-II data.
[0042] S2: Please refer to Figure 3,Based on the federated learning framework, the exhaust composition data and local environmental parameters are input into the pre-trained global benchmark model, the λ value and the exhaust composition threshold are dynamically calibrated to generate normalized exhaust data after environmental compensation.
[0043] S2.1: Download the pre-trained global baseline model from the federated server, decrypt it using the locally stored decryption key, and load it into memory.
[0044] Specifically, the global benchmark model is downloaded from the federated server through the HTTPS two-way authentication protocol, decrypted using the key stored in the local TEE (Trusted Execution Environment), and loaded into the secure memory area after verifying the model signature hash value (SHA3-512).
[0045] The global benchmark model is a multimodal neural network architecture based on federated learning. Its core structure consists of three layers of cascaded modules, as follows:
[0046] The input layer uses a feature fusion encoder to convert the exhaust gas composition data (CO / CO2 / HC / NO X The model combines the time series signals of CO2 / O2, environmental parameters (real-time scalars of temperature, humidity, and air pressure), and OBD-II data (engine speed and load, etc.) into a 256-dimensional feature vector through 1D convolution and positional encoding. The middle layer contains a physical constraint module, embedding the combustion reaction kinetics equation as a regularization term in the loss function. It also integrates empirical threshold rules from the vehicle exhaust analysis mind map (for example, when CO2>0.5%, the gradient weight is tripled in backpropagation, corresponding to the abnormal operating conditions in the vehicle exhaust analysis mind map). The output layer adopts a two-branch structure—a CNN-Transformer hybrid classifier (the CNN branch contains four residual blocks to extract local exhaust features, and the Transformer branch uses a six-layer encoder to model the long-term dependencies of OBD-II). The final output is a fault probability distribution compressed by knowledge distillation (8 categories of combustion faults and 5 categories of mechanical faults, with category definitions mapped to the encodings such as "three-element gas barrel P3P7" in the mind map). The global baseline model updates global parameters using differential privacy and homomorphic encryption. The initial weights are 14.1%-15% of the weights marked in the vehicle exhaust analysis mind map. It is obtained through pre-training of prior knowledge such as the normal range of CO2.
[0047] It should be noted that the core of the automobile exhaust analysis brain map revolves around CO2, CO, HC, O2, NO X Equal components to expand.
[0048] Example: The classification logic of the automobile exhaust analysis mind map is described in Tables 1 to 6 below:
[0049] Table 1 Oxygen (O2) content analysis table
[0050] Concentration range Troubleshooting Instructions <0.1% The fuel injector atomization is not good 0.1%-0.3% basically normal 0.3%-0.8% Fuel injector atomization is not good P1, three-way catalytic converter P3 0.8%-1.5% Oxygen sensor P3, intake system leakage, exhaust system leakage >1.5% Ignition status, fuel injector P1, system leakage, valve timing, OBD information, mechanical failure >4% Mechanical problems, ignition problems, air leaks, or malfunction of a cylinder
[0051] Table 2 Carbon monoxide (CO) content analysis table
[0052] Concentration range Troubleshooting Instructions National V is less than 0.2% National VI is less than 0.1% If it is higher than 0.5% It means the mixture ratio is rich, which is usually caused by dirty injector P1, inaccurate fuel pressure, fuel quality P1, air volume sensor (flow meter or pressure sensor) and other problems. If it is higher than 1% It means that the mixture ratio is very rich, which is usually caused by problems with the injector P1, fuel pressure, fuel quality P1, air volume sensor (flow meter or pressure sensor), combustion chamber carbon deposit P1 or P4, and other sensor signals. If it is higher than 1.5% It means that the mixture ratio is too rich, which is usually caused by problems with the injector P1, fuel pressure, air volume sensor (flow meter or pressure sensor), combustion chamber carbon deposit P4, OBD data, etc.
[0053] Table 3 Hydrocarbon (HC) content analysis table
[0054] Concentration range Troubleshooting Instructions <10ppm It is relatively normal. High idle speed and close idle speed are relatively normal. 10ppm-30ppm Generally, the fuel injector is dirty and blocked P1, and the oxygen sensor P3 is inaccurate. 30ppm-50ppm Check the injector atomization P1, the intake system is dirty P2, occasional misfire, and carbon deposits in the combustion chamber P4 50ppm-200ppm Ignition system, poor injector atomization P1, inaccurate intake air sensor, dirty intake duct P2, burning oil P4+P5, fuel quality, carbon deposits in combustion chamber P4 >200ppm Ignition system, oil burning P4+P5, serious blockage of fuel injector P, fuel quality, OBD related data, valve oil seal R4 >300ppm Ignition system, oil burning P4+P5, serious nozzle blockage P1, fuel quality, OBD related data, mechanical damage, valve oil seal R4
[0055] Table 4 Nitrogen oxides (NO X ) Content Analysis Table
[0056] Concentration range Troubleshooting Instructions 10ppm-30ppm Three-way catalytic P3+ temperature, water tank external C2 30ppm-100ppm Three-way catalytic converter P3+ temperature, water tank external C2, water tank internal scale P6, cooling system heat dissipation P6, oxygen sensor 100ppm-250ppm Three-way catalytic converter P3+ temperature, water tank exterior C2, water tank interior scale P6, cooling system heat dissipation P6, valve timing, combustion chamber carbon deposits P4 >250ppm Three-way catalytic converter P3+ temperature, water tank exterior C2, water tank interior scale P6, cooling system heat dissipation P6, valve timing, combustion chamber carbon deposits P4, engine overall heat dissipation >400ppm Check whether the three-way catalytic converter is damaged, check the overall heat dissipation, valve timing, check EGR (if equipped), compression ratio, engine mixture ratio
[0057] Table 5 Carbon dioxide (CO2) content analysis table
[0058] Concentration range Troubleshooting Instructions <14% Fuel quality, fuel atomization P1, intake system P2, ignition quality, intake or exhaust leakage 14%-15% Three-way catalytic converter P3+ temperature, fuel quality, fuel injection atomization P1, intake system P2, ignition quality, intake or exhaust leakage 15%-16% Normal combustion 17%-18% Three-way catalytic converter P3+ temperature, fuel quality, fuel injection atomization P1, intake system P2, ignition quality, intake or exhaust leakage 19%-20% Normal combustion
[0059] Table 6 λ value content analysis table
[0060] Concentration range Troubleshooting Instructions 0.85%-0.99% Injector nozzle atomization P1, fuel quality, injection pulse width, OB information, three-way catalytic converter P3 <0.9% Injector atomization P1, injector performance, fuel quality, injection pulse width, OB information, intake air volume sensor 1% normal 1.01%-1.05% Intake system leakage, exhaust system leakage, poor fuel injector atomization P1, inaccurate oxygen sensor P3, three-way catalytic converter P3+ temperature
[0061] For example, CO2 below 14% may be related to air leakage in the intake system (P2 mark), while in the range of 14%-15%, it is necessary to check the combustion efficiency or liquefied gas pressure problem. CO content analysis focuses on the range of 0.1%-1.8%. When CO is higher than 1.5%, it involves excessively rich fuel mixture, air filter blockage (mark P3 / P6), poor combustion chamber sealing or carbon canister system failure; low values (such as 0.5%) may point to fuel evaporation leakage or air flow meter abnormality. HC (hydrocarbon) detection needs to focus on the range of 10ppm-200ppm. Low values (<10ppm) are normal, 30ppm-50ppm indicates intake system particulate matter accumulation (P3 / P6 mark) or oxygen sensor failure; 50-200ppm requires checking fuel injection pressure, filter blockage (such as microwave particles P6) and combustion chamber carbon deposits, and correlating the liquid pipe pressure sensor data. NO X (Nitrogen oxides) abnormalities need to be combined with O2 content analysis. High NO X It may be caused by excessive combustion temperature, EGR valve failure (marked P3 / P7) or failure of the three-way catalytic converter; low O2 (such as a fixed value of 0.2%) requires checking the air flow meter, intake manifold leakage (marked P2) and fuel injection system problems, such as abnormal air impulse temperature sensor.
[0062] Furthermore, the fault diagnosis logic includes multi-system linkage analysis. For example, repeated occurrences of the dust layer P2 indicate chronic carbon deposits in the intake system; OBT particle markers P2 / P6 correlate with a clogged particulate filter; abnormal EMP2 exhaust temperature requires checking the ignition coil (M9P1) and fuel pump pressure; and problems with the liquid-gas lines P3 / P4 may affect fuel evaporation control.
[0063] S2.2: Normalize the local environmental parameters and exhaust composition data and merge them into a fixed-dimensional input tensor, input it into the global benchmark model, perform forward propagation calculations, and output the λ calibration coefficient and threshold scaling factor.
[0064] Specifically, local environmental parameters (temperature, humidity, and air pressure) are normalized using physical formulas to eliminate dimensional differences. Segmented normalization is performed based on the classification logic in the vehicle exhaust analysis mind map (e.g., CO > 0.5% is abnormal). The expression is:
[0065] ;
[0066] In the formula, the subscript Indicates that the original CO data has been normalized to eliminate dimensional differences.
[0067] It should be noted that other components (such as HC and NOx) are scaled proportionally according to the classification intervals in the automobile exhaust analysis mind map.
[0068] Furthermore, the standardized 10-dimensional data (5 exhaust components + 3 environmental parameters + 2 OBD-II) are concatenated with the timestamp position encoding to generate a 16×256-dimensional tensor (16-second time window);
[0069] After the input tensor is processed through a 1D convolutional layer to extract local features, the theoretical λ value is calculated using a predefined combustion equation and compared with the measured λ value to generate a residual signal.
[0070] The combustion equation is expressed as:
[0071] ;
[0072] Where, Indicates the dynamic calibration coefficient of the air-fuel ratio (λ value), which is used to correct the measurement error of the original λ value. represents the combustion temperature in the engine cylinder (calculated by inversion of physical information neural network), represents the functional relationship defined by the global baseline model, implicitly learned by the neural network, represents the penalty coefficient, Indicates the volume concentration of oxygen in the exhaust gas, represents the volume concentration of carbon dioxide, Indicates the volume concentration of carbon monoxide.
[0073] It should be noted that the penalty coefficient The default value is 0.1. Dynamic adjustment is allowed in local training of federated learning, but it must be constrained in the range of [0, 0.5]. The specific value is adaptively calculated by each node based on the ambient air pressure.
[0074] The residual signal and the brain map rule library (such as "CO>0.5%→gradient×3") are jointly input into the fully connected layer to perform dual-task learning.
[0075] Specifically, Task 1 (λ calibration coefficient):
[0076] Output through sigmoid function , dynamic correction formula:
[0077] ;
[0078] Where, Represents an uncalibrated air-fuel ratio measurement read directly from an OBD-II system or exhaust gas analyzer. Indicates the air-fuel ratio measurement value after dynamic compensation and physical correction, which is the core parameter for fault diagnosis. represents the normalized atmospheric pressure;
[0079] Task 2 (Threshold Scaling Factor):
[0080] ;
[0081] Where, represents the integrated scaling factor vector, represents the temperature scaling factor, represents the humidity scaling factor, represents the gas compression and expansion factor, represents a multilayer perceptron, represents the normalized temperature, represents the normalized relative humidity, Indicates the normalized atmospheric pressure.
[0082] It should be noted that the comprehensive scaling factor vector is derived from the temperature compensation rule marked "Liquid Temperature Gas Pipe P3" in the exhaust gas analysis mind map. This mark indicates that the exhaust gas sensor readings in high temperature environments (>40°C) need to be drift compensated. The value range is: Humidity scaling factor, corresponding to the "Wet Pipe P2" rule in the exhaust analysis mind map. This entry states that high humidity (>80% RH) will cause HC adsorption and the detection sensitivity needs to be improved. The value range is: ; Air compression and expansion factor, refer to the "Air Impulse Temperature Sensing" item in the mind map. This rule emphasizes the nonlinear effect of altitude change (air pressure) on air-fuel ratio calculation. The value range is: .
[0083] S2.3: Based on the lambda calibration coefficient and the threshold scaling factor, the air-fuel ratio calibration coefficient and the dynamic pollutant boundary value are calculated, and the exhaust composition data is physically compensated according to the local environmental parameters to obtain the normalized exhaust data.
[0084] Specifically, the lambda calibration coefficient generated in Task 1 is used in conjunction with real-time air pressure data to dynamically correct the original air-fuel ratio. The calibration process simultaneously considers sensor error compensation and the influence of ambient air pressure, and outputs the final calibrated air-fuel ratio value.
[0085] Based on the temperature, humidity, and atmospheric compression and expansion factors output by Task 2, the pollutants (including CO, HC, NO X The adjustment rules strictly follow the environmental sensitivity characteristics marked in the exhaust gas analysis mind map.
[0086] For example, when the vehicle is operating at an altitude of 2000 meters (air pressure 800hPa), an ambient temperature of 35°C, and a humidity of 70%RH, the temperature scaling factor is first output through Task 2 of the federal calibration module. (High temperature causes sensor readings to be higher), humidity scaling factor (Medium humidity slightly affects HC adsorption), gas compression and release factor (Low pressure inhibits combustion efficiency), then the system analyzes the environmental sensitivity characteristics of the brain map according to the exhaust gas, and calculates the weight ratio according to the preset weight (CO: temperature weight 0.5 / humidity 0.3 / air pressure 0.2, NO X : Temperature 0.3 / Air Pressure 0.6 / Humidity 0.1) Dynamically adjust pollutant thresholds.
[0087] Furthermore, in the specific calculation, the original pollutant threshold of CO 0.5% is multiplied by the weight distribution (temperature 0.5 / humidity 0.3 / pressure 0.2) and the scaling factor (0.5×1.1+0.3×1.05+0.2×0.9=1.045) to obtain the calibrated pollutant threshold of 0.5225%; at the same time, NO X The original pollutant threshold of 200ppm (parts per million) is calibrated to 195ppm by multiplying the weights (temperature 0.3 / pressure 0.6 / humidity 0.1) by the scaling factor (0.3×1.1+0.6×0.9+0.1×1.05=0.975). When using the adjusted pollutant threshold to perform fault judgment on normalized exhaust gas data, if the detected CO concentration exceeds the new pollutant threshold of 0.5225%, the "too rich mixture" fault warning is triggered, while NO XThe concentration of 190 ppm was judged to be normal because it was below the pollutant threshold of 195 ppm.
[0088] Preferably, the weight ratio is dynamically optimized through multi-node data under the federated learning framework (for example, the temperature weight of nodes in plateau areas may be increased to 0.6), combined with compensation for environmental sensitivity characteristics, which significantly reduces the misjudgment rate of high-temperature conditions in plateaus.
[0089] The original exhaust composition data is triple compensated, including: air-fuel ratio compensation: correcting the combustion efficiency effect according to the air-fuel ratio before and after calibration; temperature compensation: correcting the sensor thermal drift error according to the temperature scaling factor; humidity / air pressure compensation: respectively for HC and NO X Compensate for adsorption effects and combustion conditions.
[0090] Example: When the vehicle is running at an altitude of 3000 meters (air pressure 700hPa) and an ambient temperature of 40°C and humidity 80%RH, the air-fuel ratio is compensated according to the λ calibration coefficient. (Because of low pressure, the mixture needs to be enriched) Correct the original lambda value from 0.98 to 1.02; perform temperature compensation and use the temperature scaling factor (High temperature environment) Drift correction is performed on the exhaust gas sensor reading.
[0091] For example, the measured CO concentration of 0.6% is corrected to 0.5%; humidity / pressure joint compensation is performed, and the humidity scaling factor is used. (HC adsorption at high humidity) Corrected the HC detection value from 120ppm to 132ppm, and at the same time, the gas compression factor (Low pressure suppresses NO X Generate) NO X The concentration is corrected from 300ppm to 240ppm, and the output is normalized exhaust gas data that meets standard operating conditions (1013hPa, 25℃).
[0092] The compensated exhaust data are normalized to a uniform dimension range according to component type to ensure that the subsequent classifier can directly process them.
[0093] It should be noted that the normalized range refers to the normal value range of each component marked on the exhaust gas analysis brain map.
[0094] The better approach is to use the global benchmark model under the federated learning framework for dynamic calibration, and significantly improve the accuracy of exhaust data through environmental compensation and lambda value correction, especially for measurement deviations in complex environments such as high altitudes, extreme temperature and humidity, making the diagnostic results more environmentally adaptable.
[0095] S3: Input the normalized exhaust gas data and OBD-II data into the physical information neural network model;
[0096] The combustion reaction kinetics equation is embedded in the physical information neural network model, and the combustion state parameters in the engine cylinder are inverted through inverse calculation.
[0097] Among them, the physical information neural network model refers to the neural network architecture for engine combustion state analysis; the neural network architecture reserves an embedded interface for the combustion reaction kinetics equation, and performs data-physics joint optimization through the physical constraint loss function.
[0098] S3.1: See Figure 4 , screen the CO oxidation and NO generation reaction equations, define the in-cylinder temperature and pressure as trainable variables, and establish a mathematical correlation with the exhaust gas components.
[0099] Specifically, the CO oxidation reaction (2CO+O2→2CO2) and NO generation reaction (N2+O2→2NO) were loaded, and the cylinder temperature (initial value 800K) and cylinder pressure (initial value 2.5MPa) were bound to the trainable variables of the physical information neural network model. The chemical reaction kinetic equation was used to establish the exhaust gas composition (CO / CO2 / NO x ) quantitative correlation.
[0100] Preferably, the combustion reaction kinetics equations are embedded in the neural network, and the high-precision inversion of the in-cylinder combustion state is achieved through inverse calculation guided by physical constraints. Compared with the traditional black box model, it can better ensure the interpretability and physical rationality of the combustion parameters.
[0101] S3.2: Convert the reaction equation into a physical constraint loss function, calculate the residual between the theoretical exhaust gas concentration and the normalized exhaust gas data, and superimpose it into the total loss function of the neural network for joint optimization.
[0102] Specifically, the CO oxidation and NO generation reaction equations are converted into differentiable loss functions. The theoretical exhaust gas concentration is calculated based on the current in-cylinder temperature and pressure, and the residual with the measured normalized exhaust gas data is calculated using the L1 norm. The residual is multiplied by the weight coefficient (0.3 for CO oxidation and 0.2 for NO generation) and then added to the total loss function, which is jointly optimized with the data fitting loss (MSE) at a weight of 6:4.
[0103] S3.3: The adjoint equation method is used to embed the reaction partial derivatives into back propagation, and the neural network weights and temperature and pressure parameters are updated synchronously to perform reverse calculations guided by physical laws and output combustion state parameters.
[0104] Specifically, the reactive partial derivatives (e.g. In-cylinder), the neural network weights and in-cylinder temperature and pressure parameters are updated synchronously through the Adam optimizer (learning rate 0.001). After 50 iterations, the converged combustion state parameters are output: in-cylinder temperature (unit K), in-cylinder pressure (unit MPa), and combustion efficiency (percentage). After the rationality is verified by the exhaust gas analysis brain map, it is merged with the calibrated λ value and prepared for subsequent input into the federal CNN-Transformer classifier.
[0105] S4: Combustion state parameters and calibrated λ values are jointly input into the federated CNN-Transformer classifier;
[0106] The local features of the exhaust gas time series are extracted through the convolutional layer, and the long-term dependencies of the OBD-II data are modeled through the Transformer encoder. The combustion failure probability distribution and the mechanical failure probability distribution are output and encrypted and uploaded to the federated server for global benchmark model update.
[0107] S4.1: Combine the combustion state parameters output by the physical information neural network model and the lambda value dynamically calibrated by federated learning into a joint input vector, which is then input into the front-end interface of the federated CNN-Transformer classifier.
[0108] Specifically, the in-cylinder temperature (in K), in-cylinder pressure (in MPa), combustion efficiency (percentage), and calibrated lambda values (range 0.8-1.2) are aligned according to the time window and concatenated into an 8-dimensional joint vector (temperature + pressure + efficiency + lambda value + 4 reserved bits). This is then expanded into a 16×8-dimensional time series input matrix (16-second time window, sampling rate 1Hz). Classifier loading: The federated CNN-Transformer classifier, which has been verified by SHA3-512 authentication, is downloaded from the federated server, decrypted, and loaded into the secure memory area to verify its front-end interface compatibility (input dimension 16×8, output dimension 256).
[0109] S4.2: In the CNN branch of the federated CNN-Transformer classifier, a 1D convolution kernel is used to perform sliding window feature extraction on the time series segments of the normalized exhaust data, and the output represents NO x Local eigenvectors of instantaneous fluctuations and slow-changing trends of CO.
[0110] It should be noted that the convolution operation is as follows: the first convolution layer: 3×1 kernel, stride 1, 32 channels, ReLU activation, extract NO x Instantaneous peak features (such as the concentration change rate within 0.5 seconds); sub-layer convolution: 5×1 kernel, stride 2, 64 channels, capturing the 10-second slow change trend of CO; residual block: contains batch normalization and skip connection, outputting a 128-dimensional local feature vector.
[0111] It should also be noted that NOx The characteristic dimension (0-63) corresponds to high-frequency fluctuations, and the CO characteristic dimension (64-127) corresponds to low-frequency trends, which are associated with the fault mode marked "Emergency Fire EMP2" in the exhaust gas analysis mind map.
[0112] S4.3: In the Transformer branch of the federated CNN-Transformer classifier, multi-head self-attention calculation is performed on the historical OBD-II data to generate an encoding vector of the long-term dependencies of the engine operating conditions.
[0113] Specifically, OBD-II data (such as engine speed and coolant temperature) is timestamp-encoded into a 16×64-dimensional positional embedding vector, which is then sinusoidally encoded. An 8-head self-attention algorithm (with 64 key / query / value dimensions) is used to calculate long-term dependencies of historical operating conditions (such as the lag effect of coolant temperature on speed). The data is then compressed into a 128-dimensional global encoding vector using a feedforward network.
[0114] S4.4: Dynamically allocate the weight ratio of CNN and Transformer branches based on the federated learning confidence of the λ value.
[0115] Specifically, the confidence level is calculated based on the λ calibration coefficient output by federated learning, and the data reliability is judged based on the direction in which it deviates from the standard interval: when the confidence level of the λ value is high, the balanced weights of the two branches are maintained; if the confidence level shifts toward exhaust abnormalities, the weight of the CNN branch is increased to enhance exhaust feature analysis; if the confidence level shifts toward abnormal engine operating conditions, the weight of the Transformer branch is increased to strengthen long-term dependency modeling.
[0116] It should be noted that the weight distribution is achieved through a trainable parameter matrix, which is synchronously updated during the federated aggregation process to ensure that the weight strategy of each node is consistent with the global model. Ultimately, by dynamically weighting and fusing the dual-branch features, a joint diagnostic feature that takes into account both real-time and long-term regularities is formed.
[0117] For example, in the specific implementation process, when the λ calibration coefficient output by the federated learning When it is within the standard range of [0.95, 1.05], it indicates that the air-fuel ratio measurement is reliable. At this time, the weight ratio of the CNN branch and the Transformer branch is kept at 1:1 for balanced feature fusion. If the detection value is 0.92 (lower than the lower limit of the standard range), it is judged that the exhaust gas composition may be abnormal, and the CNN branch weight is automatically increased to 0.6 and the Transformer branch weight is reduced to 0.4 to strengthen the exhaust gas time series characteristics (such as NO x transient fluctuations); on the contrary, when When it reaches 1.08 (higher than the upper limit of the standard range), the engine operating condition data is determined to be more critical, and the Transformer branch weight is adjusted to 0.6 and the CNN branch weight is adjusted to 0.4 to enhance the modeling of the long-term dependency of OBD-II historical data. This dynamic weight adjustment is achieved through a trainable parameter matrix, and the weight allocation strategy of each node is synchronously updated in each round of federated aggregation. Finally, the 128-dimensional exhaust feature vector output by the adjusted CNN branch and the 128-dimensional operating condition feature vector output by the Transformer branch are weighted and summed according to the latest weight ratio to generate a 256-dimensional joint diagnostic feature input into the subsequent fully connected layer, thereby realizing adaptive diagnosis of different fault tendencies.
[0118] S4.5: Output the probability distribution of combustion faults and mechanical faults respectively through the dual-branch fully connected layer of the federated CNN-Transformer classifier.
[0119] Specifically, in the output stage of the federated CNN-Transformer classifier, the combustion fault branch gradually reduces the 128-dimensional joint features to 64-dimensional intermediate features through the fully connected layer and then outputs an 8-dimensional probability distribution, corresponding to the 8 types of combustion faults defined in the exhaust gas analysis mind map (for example, the failure of the three-way catalytic converter is marked as P3). At the same time, the mechanical fault branch compresses the 128-dimensional features into a 64-dimensional intermediate layer in the same way and then outputs a 5-dimensional probability distribution, corresponding to the 5 types of mechanical faults (for example, the oxygen sensor failure is marked as P7). The outputs of the two branches are normalized to probability values by the Softmax function respectively. The top three types of faults with the highest probability are screened and associated with the exhaust gas analysis mind map coding labels (such as P3P7 combination coding). Finally, the complete fault probability distribution and coding labels are encrypted by the homomorphic encryption algorithm and uploaded to the federated server.
[0120] It should be noted that the fault probability distribution is output through the dual-branch fully connected layer of the federated CNN-Transformer classifier, and the diagnosis result should strictly follow the classification logic of the automobile exhaust analysis mind map; the combustion fault branch outputs 8 types of fault probability distributions, corresponding to the abnormal combustion state in the automobile exhaust analysis mind map.
[0121] For example, in the output stage of the dual-branch fully connected layer of the federated CNN-Transformer classifier, the combustion fault branch gradually reduces the 128-dimensional joint features to 64-dimensional intermediate features and then outputs an 8-dimensional probability distribution, corresponding to the 8 types of combustion faults defined in the exhaust gas analysis mind map, including the three-way catalytic converter failure marked as P3. The mechanical fault branch compresses the 128-dimensional features into a 64-dimensional intermediate layer in the same way and then outputs a 5-dimensional probability distribution, corresponding to the 5 types of mechanical faults, including the oxygen sensor failure marked as P7. The outputs of the two branches are normalized to probability values by the Softmax function, and then the top three types of faults with the highest probability are screened and associated with the exhaust gas analysis mind map coding labels such as the P3P7 combination code. Finally, the complete fault probability distribution and coding labels are encrypted by the homomorphic encryption algorithm and uploaded to the federated server.
[0122] The diagnostic process strictly follows the classification logic of the automobile exhaust analysis mind map. For example, when the CO concentration is detected to be higher than 0.5%, the fault probability of the dirty injector P1 and the fuel quality P1 will be automatically associated. At the same time, if HC>200ppm is detected, the fault characteristics of burning oil P4+P5 and injector blockage P1 will be superimposed. For NO x When the CO2 concentration is >250ppm, the joint probability of three-way catalytic failure P3 and cooling system failure P6 is calculated first. When the CO2 concentration is lower than 14%, the combustion efficiency is verified in combination with the λ value. When the λ value deviates from the standard range of 1.0, the probability of intake leakage or oxygen sensor P3 failure is corrected to ensure that the output results fully match the classification logic of the automobile exhaust analysis mind map.
[0123] See also Figure 2 , this embodiment also provides an automobile fault diagnosis system, including: a data acquisition module, a federated calibration module, a physical modeling module, a state inversion module, a joint diagnosis module and a fault analysis module; the data acquisition module is used to obtain exhaust gas composition data in real time and synchronously collect local environmental parameters and OBD-II data; the federated calibration module is used to input the exhaust gas composition data and local environmental parameters into a pre-trained global benchmark model based on a federated learning framework, dynamically calibrate the λ value and the exhaust gas composition threshold, and generate normalized exhaust gas data after environmental compensation; the physical modeling module is used to input the normalized exhaust gas data and OBD-II data into the physical signal The system consists of a state inversion module, which is used to embed the combustion reaction kinetics equations in the physical information neural network model and invert the combustion state parameters in the engine cylinder through inverse calculation; a joint diagnosis module, which is used to input the combustion state parameters and the calibrated λ value into the federated CNN-Transformer classifier; a fault analysis module, which is used to extract the local features of the exhaust gas time series through the convolution layer, model the long-term dependency of the OBD-II data through the Transformer encoder, output the combustion fault probability distribution and the mechanical fault probability distribution, and upload them to the federated server in an encrypted manner for global benchmark model update.
[0124] This embodiment further provides a computer device, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the automobile fault diagnosis method proposed in the above embodiment.
[0125] The computer device may be a terminal, comprising a processor, memory, a communication interface, a display, and an input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and computer programs. The internal memory provides an environment for the operating system and computer programs stored in the non-volatile storage media. The communication interface of the computer device is used to communicate with external terminals via wired or wireless communication. Wireless communication may be achieved via Wi-Fi, a carrier network, NFC (near-field communication), or other technologies. The display of the computer device may be a liquid crystal display or an electronic ink display. The input device may be a touchscreen overlay on the display, buttons, a trackball, or a touchpad on the computer device housing, or an external keyboard, touchpad, or mouse.
[0126] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the automobile fault diagnosis method proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0127] In summary, the present invention combines exhaust composition data, environmental parameters and OBD-II data and embeds combustion reaction kinetic equations to more accurately invert the combustion state in the engine cylinder, thereby significantly improving the accuracy of fault diagnosis. It adopts a federated learning framework to dynamically calibrate the air-fuel ratio and pollutant thresholds, and combines the CNN-Transformer hybrid model to achieve a collaborative analysis of the exhaust gas timing characteristics and the long-term dependence of the engine operating conditions, which can adapt to the fault diagnosis needs under different environmental conditions.
[0128] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for diagnosing automobile faults, characterized in that: include: Acquire exhaust gas composition data in real time, and simultaneously collect local environmental parameters and OBD-II data; Based on the federated learning framework, exhaust gas composition data and local environmental parameters are input into the pre-trained global benchmark model, and the lambda value and exhaust gas composition threshold are dynamically calibrated to generate normalized exhaust gas data after environmental compensation. The specific steps are as follows: Download the pre-trained global baseline model from the federated server, decrypt it using the locally stored decryption key, and load it into memory; Normalize the local environmental parameters and exhaust composition data and merge them into a fixed-dimensional input tensor, input it into the global benchmark model, perform forward propagation calculations, and output the λ calibration coefficient and threshold scaling factor; Based on the lambda calibration coefficient and threshold scaling factor, the air-fuel ratio calibration coefficient and dynamic pollutant boundary value are calculated, and the exhaust composition data is physically compensated according to local environmental parameters to obtain normalized exhaust data; Input the normalized exhaust gas data and OBD-II data into the physical information neural network model; The combustion reaction kinetics equation is embedded in the physical information neural network model, and the combustion state parameters in the engine cylinder are inverted through inverse calculation. The specific steps are as follows: Screen the CO oxidation and NO generation reaction equations, define the in-cylinder temperature and pressure as trainable variables, and establish a mathematical correlation with the exhaust gas composition; The reaction equation is converted into a physical constraint loss function, and the residual between the theoretical exhaust gas concentration and the normalized exhaust gas data is calculated and superimposed into the total loss function of the neural network for joint optimization. Adjoint equation method is used to embed reaction partial derivatives into back propagation, and the neural network weights are updated synchronously with temperature and pressure parameters. Inverse calculation guided by physical laws is performed to output combustion state parameters. The combustion state parameters and the calibrated λ value are jointly input into the federated CNN-Transformer classifier; The lambda value refers to the air-fuel ratio calibration coefficient dynamically output by the global reference model according to local environmental parameters; The local features of the exhaust gas time series are extracted through the convolutional layer, and the long-term dependencies of the OBD-II data are modeled through the Transformer encoder. The combustion failure probability distribution and the mechanical failure probability distribution are output and encrypted and uploaded to the federated server for global benchmark model update.
2. The automobile fault diagnosis method according to claim 1, wherein: The exhaust gas composition threshold refers to the dynamic pollutant boundary value established through multi-node joint training in the global benchmark model.
3. The automobile fault diagnosis method according to claim 1, wherein: The physical information neural network model refers to the neural network architecture for engine combustion state analysis; The neural network architecture reserves an embedded interface for the combustion reaction kinetics equation, and performs data-physics joint optimization through a physical constraint loss function.
4. The automobile fault diagnosis method according to claim 1, wherein: The specific steps of outputting the combustion failure probability distribution and the mechanical failure probability distribution are as follows: The combustion state parameters output by the physical information neural network model and the lambda value dynamically calibrated by federated learning are combined into a joint input vector, which is then input into the front-end interface of the federated CNN-Transformer classifier. In the CNN branch of the federated CNN-Transformer classifier, a 1D convolution kernel is used to perform sliding window feature extraction on the time series segments of the normalized exhaust data, and the output represents NO X Local eigenvectors of instantaneous fluctuations and CO slow-changing trends; In the Transformer branch of the federated CNN-Transformer classifier, multi-head self-attention calculation is performed on the historical OBD-II data to generate an encoding vector of the long-term dependencies of the engine operating conditions; Dynamically allocate the weight ratio of CNN and Transformer branches based on the federated learning confidence of the lambda value; The dual-branch fully connected layer of the federated CNN-Transformer classifier outputs the probability distribution of combustion faults and mechanical faults respectively.
5. The automobile fault diagnosis method according to claim 4, wherein: The federated CNN-Transformer classifier refers to a hybrid neural network architecture that is collaboratively trained under a federated learning framework. The CNN branch extracts exhaust gas time series features, and the Transformer branch models OBD-II data dependencies.
6. An automobile fault diagnosis system based on the automobile fault diagnosis method according to any one of claims 1 to 5, characterized in that: It includes data acquisition module, federated calibration module, physical modeling module, state inversion module, joint diagnosis module and fault analysis module; The data acquisition module is used to obtain exhaust gas composition data in real time and simultaneously collect local environmental parameters and OBD-II data; The federated calibration module is used to input exhaust gas composition data and local environmental parameters into a pre-trained global benchmark model based on a federated learning framework, dynamically calibrate the lambda value and exhaust gas composition threshold, and generate normalized exhaust gas data after environmental compensation; The physical modeling module is used to input the normalized exhaust data and OBD-II data into the physical information neural network model; The state inversion module is used to embed the combustion reaction kinetics equation in the physical information neural network model and invert the combustion state parameters in the engine cylinder through inverse calculation; The joint diagnosis module is used to jointly input the combustion state parameters and the calibrated lambda value into the federated CNN-Transformer classifier; The fault analysis module is used to extract local exhaust gas time series features through convolutional layers, model the long-term dependencies of OBD-II data through a Transformer encoder, output combustion fault probability distributions and mechanical fault probability distributions, and upload them to the federated server in encrypted form for global benchmark model updates.
Citation Information
Patent Citations
Intelligent electric meter fault diagnosis method and device based on federated learning
CN111537945A
Intelligent diagnosis platform and method for vehicle exhaust emission fault
CN118194140A