Fault diagnosis method and device of gas sensor, electronic equipment and vehicle
By combining graph convolutional networks and residual temporal convolutional networks with wavelet packet decomposition, adaptive filtering, and baseline compensation techniques, edge weights are dynamically updated, solving the nonlinearity and aging problems in gas sensor fault diagnosis and achieving highly accurate and reliable fault identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU AUTOMOBILE GROUP CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-05-12
AI Technical Summary
Existing gas sensor fault diagnosis methods struggle to effectively handle nonlinear relationships in sensor responses, resulting in low recognition rates, especially for complex faults such as aging and contamination. Furthermore, relying on manual feature extraction makes it difficult to automatically capture dynamic changes in signals.
By combining graph convolutional networks with material parameters and environmental data, and using wavelet packet decomposition, adaptive filtering, and baseline compensation techniques to dynamically update edge weights, combined with residual temporal convolutional networks, automatic identification of gas sensor faults can be achieved.
It significantly improves the accuracy and reliability of gas sensor fault diagnosis, can identify complex fault types, adapt to extreme environmental changes, and maintain signal fidelity.
Smart Images

Figure CN122017148A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sensor technology, and in particular to a method, apparatus, electronic device, and vehicle for diagnosing faults in a gas sensor. Background Technology
[0002] Gas sensors are widely used in industrial safety (such as chemical leak monitoring), environmental monitoring (such as air quality detection), and medical diagnostics (such as exhaled breath disease biomarker analysis). Taking nitrogen oxide sensors as an example, they play a crucial role in automotive exhaust control systems. If this sensor malfunctions, it may lead to excessive emissions or a decline in engine performance.
[0003] However, existing gas sensor fault diagnosis methods still have certain limitations: on the one hand, they are difficult to effectively handle the nonlinear relationship in the sensor response and have a low recognition rate for complex faults such as aging and contamination; on the other hand, most methods rely on manual feature extraction, and these methods usually also rely on domain knowledge, making it difficult to automatically capture the dynamic changes in the gas sensor response signal.
[0004] Therefore, how to automatically capture the dynamic changes in the response signal of a gas sensor, thereby identifying complex faults in the gas sensor, is a problem that urgently needs to be solved in this field. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and vehicle for diagnosing gas sensor faults, aiming to improve how to automatically capture dynamic changes in the response signal of a gas sensor, thereby identifying complex faults in the gas sensor.
[0006] To address the aforementioned problems, this application discloses a fault diagnosis method for a gas sensor, comprising: The material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor are obtained; the material parameters are physical parameters that reflect the material characteristics of the gas sensor. Based on the environmental data, the initial gas data is denoised to obtain target gas data; the target gas data is used to update the material parameters. The temperature data, material parameters, and target gas data from the environmental data are input into a pre-trained fault diagnosis model to identify the faulty gas sensor among the gas sensors. The fault diagnosis model includes a graph convolutional network; the graph convolutional network includes nodes representing the gas sensor and edges connecting the nodes, and the graph convolutional network is used to determine the edge weights of the edges based on the temperature data and the material parameters of the gas sensor, and the edge weights are used to determine the faulty gas sensor among the gas sensors.
[0007] This application's embodiments dynamically determine the edge weights of the graph convolutional network based on temperature data and the material parameters of the gas sensor, thus embedding materials science principles into the graph convolutional network. When the gas sensor experiences aging or other faults, its material parameters change, leading to corresponding changes in the edge weights. This, in turn, forms a traceable fault propagation path during the feature propagation process of the graph convolutional network. This enables the fault diagnosis model to effectively identify faulty gas sensors, achieving the identification of complex gas sensor faults, increasing the types of diagnosable faults, and significantly improving the accuracy of gas sensor fault diagnosis.
[0008] Optionally, the environmental data includes temperature data, humidity data, and air pressure data. The step of denoising the initial gas data based on the environmental data to obtain the target gas data includes: The initial gas data is decomposed using wavelet packet decomposition to obtain gas sub-signals; Using a correlation coefficient function, a sensitive sub-signal is determined from the gas sub-signal based on the temperature data, humidity data, and air pressure data. The sensitive sub-signal is a gas sub-signal that is sensitive to changes in the temperature data, humidity data, and air pressure data. An adaptive filtering algorithm is used to determine the environmental interference signal in the sensitive sub-signal based on the temperature data, humidity data, and air pressure data. In the gas sub-signal, environmental interference signals in the sensitive sub-signal are removed to obtain a denoised gas sub-signal; Wavelet packet reconstruction is performed on the denoised gas sub-signal to obtain the denoised gas data. Baseline compensation is performed on the denoised gas data to obtain the target gas data.
[0009] This application proposes a joint algorithm of wavelet packet decomposition and adaptive filtering to process initial gas data. This algorithm integrates the frequency domain localization of wavelet packet decomposition with the time domain tracking of adaptive filtering. By using temperature, humidity, and air pressure data, a dynamic sensitivity modeling relationship is established between changes in environmental parameters and changes in environmental interference signals in the gas response. This enables the system to accurately characterize the influence of environmental factors on the gas sensor output, improving the accuracy of subsequent fault diagnosis. Furthermore, experiments demonstrate that this denoising method allows the target gas data acquired by the gas sensor to maintain high signal fidelity even in extreme environments such as typhoons and rainstorms, solving the sensitivity drift problem of semiconductor-type gas sensors in tropical climates.
[0010] Optionally, the baseline compensation of the denoised gas data to obtain the target gas data includes: Determine the baseline drift rate factor based on the material parameters; The target gas data is obtained by using an exponentially weighted moving average model to perform baseline compensation on the denoised gas data based on the baseline drift rate factor.
[0011] The embodiments of this application dynamically correct the baseline offset of the gas sensor based on the exponentially weighted moving average model, so that the target gas data signal output by the gas sensor can maintain a stable benchmark under environmental changes and long-term aging conditions, thereby improving the accuracy of subsequent fault diagnosis.
[0012] Optionally, the material parameters include the activation energy parameters of the gas sensor material. The step of inputting the temperature data from the environmental data, the material parameters, and the target gas data into a pre-trained fault diagnosis model to obtain the faulty gas sensor and its fault type output by the fault diagnosis model includes: The material parameters and temperature data are input into the graph convolutional network, so that the graph convolutional network uses the material parameters as the node attributes of the nodes, and determines the edge weights between the nodes based on the temperature data and the activation energy parameters of the gas sensor material. The faulty gas sensor among the gas sensors is determined based on the edge weights.
[0013] This application introduces the physical mechanism of sensor materials and embeds the principles of materials science into graph convolutional networks. When a gas sensor experiences aging or other faults, its material parameters change, resulting in a corresponding change in edge weights. This leads to the formation of a traceable fault propagation path during the feature propagation process of the graph convolutional network, enabling the fault diagnosis model to effectively identify faulty gas sensors.
[0014] Optionally, the fault diagnosis model further includes a residual temporal convolutional network, wherein inputting the temperature data from the environmental data, the material parameters, and the target gas data into the pre-trained fault diagnosis model includes: The target gas data is input into the residual temporal convolutional network, so that the residual temporal convolutional network can determine the fault evolution characteristics of the gas sensor from a time scale based on the target gas data, and obtain the fault type of the gas sensor.
[0015] This application embodiment combines residual temporal convolutional networks to process target gas data, determine the fault evolution characteristics of the gas sensor from a time scale. The residual temporal convolutional network can automatically capture the dynamic changes of the target gas data of the gas sensor, thereby determining the fault type of the gas sensor.
[0016] Optionally, the residual temporal convolutional network includes convolutional paths at different time scales, and the step of inputting the target gas data into the residual temporal convolutional network includes: The target gas data is input into the residual temporal convolutional network, so that the residual temporal convolutional network processes the target gas data using convolutional paths of different time scales to obtain residual signals of different scales. The residual signals at different scales are fused using the residual temporal convolutional network to obtain fused residuals. By comparing the fused residual with the preset healthy gas sensor data, the fault type of the gas sensor is obtained.
[0017] This application embodiment processes target gas data using a residual temporal convolutional network to determine the fault type of the gas sensor. It can automatically capture the dynamic changes of the target gas data of the gas sensor, effectively improve the reliability and interpretability of fault identification, realize the identification of complex faults of gas sensors, increase the types of diagnosable faults, and significantly improve the accuracy of gas sensor fault diagnosis.
[0018] Optionally, the material parameters include the adsorption parameters of the gas sensor material, and the method includes: Obtain a fault diagnosis model to be trained, wherein the fault diagnosis model to be trained includes a graph convolutional network to be trained; Based on the Langmuir adsorption equation, physical constraint terms are constructed according to the adsorption parameters of the gas sensor material. The fault diagnosis model to be trained is trained according to the physical constraints to obtain the pre-trained fault diagnosis model. The physical constraints are used to guide the model parameters of the graph convolutional network to be trained to converge in a direction that conforms to the gas adsorption kinetics during training.
[0019] This application embodiment constructs physical constraint terms through the Langmuir adsorption equation, introducing gas adsorption kinetic constraints into the model training. When the model prediction violates the gas adsorption mechanism during training, the physical constraint terms automatically trigger a penalty, thereby restricting the model's judgment process within a parameter space that conforms to objective physical laws. This ensures that the model's fault diagnosis results strictly follow the thermodynamic laws of surface adsorption, thus effectively improving the reliability and interpretability of fault identification.
[0020] Optionally, the method includes: The material parameters of the gas sensor are updated based on the target gas data and the environmental data to obtain locally updated material parameters; The incremental material parameters determined by each gas sensor are uploaded to the cloud, so that the cloud can perform a weighted average aggregation of the locally updated material parameters of the gas sensors based on the incremental material parameters to obtain the target material parameters; wherein, the incremental material parameters are determined based on the locally updated material parameters and the material parameters. The locally updated material parameters of the gas sensor are updated to the target material parameters.
[0021] In this embodiment, after updating the material parameters locally on the gas sensor, the incremental updates of the locally updated material parameters are uploaded to the cloud for collaborative updates. This ensures that the original sensor data remains on-site, and only a small number of material parameters reflecting the intrinsic properties of the sensor material are collaboratively updated. Compared to traditional centralized learning methods that require uploading large amounts of raw gas response data and environmental data collected by each gas sensor to a central server, this embodiment reduces the communication burden and enhances the ability to characterize the material features of a single gas sensor. It not only ensures communication efficiency but also enables the system to adapt stably to sensor material aging and performance degradation over a long period, improving the reliability and accuracy of fault diagnosis.
[0022] This application also discloses a fault diagnosis device for a gas sensor, the device comprising: The parameter acquisition module is used to acquire the material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor; the material parameters are physical parameters that reflect the material characteristics of the gas sensor. The parameter processing module is used to denoise the initial gas data based on the environmental data to obtain target gas data; the target gas data is used to update the material parameters. A fault diagnosis module is used to input temperature data, material parameters, and target gas data from the environmental data into a pre-trained fault diagnosis model to identify faulty gas sensors among the gas sensors. The fault diagnosis model includes a graph convolutional network. The graph convolutional network contains nodes representing the gas sensors and edges connecting the nodes. The graph convolutional network is used to determine the edge weights of the edges based on the temperature data and the material parameters of the gas sensors. These edge weights are used to identify faulty gas sensors among the gas sensors.
[0023] This application also discloses an electronic device, including a processor and a memory, wherein the memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the fault diagnosis method for gas sensors as described in one or more embodiments of this application.
[0024] This application also discloses a vehicle that includes electronic devices as described in the embodiments of this application. Attached Figure Description
[0025] Figure 1 This is a flowchart of a fault diagnosis method for a gas sensor provided in an embodiment of this application; Figure 2 This is a system architecture diagram of a gas sensor fault diagnosis method provided in an embodiment of this application; Figure 3 This is a structural diagram of the gas sensor fault diagnosis device provided in the embodiments of this application; Figure 4 This is a structural diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0026] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] Gas sensors are widely used in industrial safety (such as chemical leak monitoring), environmental monitoring (such as air quality detection), and medical diagnostics (such as exhaled breath disease biomarker analysis). Taking nitrogen oxide sensors as an example, they play a crucial role in automotive exhaust control systems. If this sensor malfunctions, it may lead to excessive emissions or a decline in engine performance.
[0028] However, existing gas sensor fault diagnosis methods still have certain limitations: on the one hand, they are difficult to effectively handle the nonlinear relationship in the sensor response and have a low recognition rate for complex faults such as aging and contamination; on the other hand, most methods rely on manual feature extraction, and these methods usually also rely on domain knowledge, making it difficult to automatically capture the dynamic changes in the gas sensor response signal.
[0029] Therefore, how to automatically capture the dynamic changes in the response signal of a gas sensor, thereby identifying complex faults in the gas sensor, is a problem that urgently needs to be solved in this field.
[0030] This application provides a method for fault diagnosis of a gas sensor, comprising: acquiring material parameters of the gas sensor, environmental data of the environment in which the gas sensor is located, and initial gas data collected by the gas sensor; the material parameters are physical parameters reflecting the material characteristics of the gas sensor; denoising the initial gas data based on the environmental data to obtain target gas data; the target gas data being used to update the material parameters; inputting the temperature data, material parameters, and target gas data from the environmental data into a pre-trained fault diagnosis model to determine the faulty gas sensor; wherein the fault diagnosis model includes a graph convolutional network; the graph convolutional network includes nodes representing the gas sensor and edges connecting the nodes, and the graph convolutional network is used to determine the edge weights based on the temperature data and the material parameters of the gas sensor, the edge weights being used to determine the faulty gas sensor.
[0031] This application's embodiments dynamically determine the edge weights of the graph convolutional network based on temperature data and the material parameters of the gas sensor, thus embedding materials science principles into the graph convolutional network. When the gas sensor experiences aging or other faults, its material parameters change, leading to corresponding changes in the edge weights. This, in turn, forms a traceable fault propagation path during the feature propagation process of the graph convolutional network. This enables the fault diagnosis model to effectively identify faulty gas sensors, achieving the identification of complex gas sensor faults, increasing the types of diagnosable faults, and significantly improving the accuracy of gas sensor fault diagnosis.
[0032] Example 1 This application provides a method for diagnosing faults in a gas sensor. Please refer to [link / reference]. Figure 1 This includes the following steps: S110: Obtain the material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor; the material parameters are physical parameters that reflect the material characteristics of the gas sensor.
[0033] The multimodal sensing module of this application embodiment may include a gas sensor array, a temperature and humidity sensor, and a pressure sensor, wherein the gas sensor array includes a plurality of gas sensors.
[0034] In one embodiment, the gas sensor array integrates three types of sensors: metal oxide semiconductor, electrochemical, and infrared spectroscopy, covering the detection targets of combustible gases, toxic gases, and VOCs (volatile organic compounds). Specifically, the metal oxide semiconductor gas sensor detects changes in carrier concentration caused by the adsorption and reaction of gas molecules on the surface of a gas-sensitive material. The parameter directly acquired by this type of gas sensor is the resistance value of the gas-sensitive material, which is indirectly measured as the sensor's output voltage. The electrochemical gas sensor detects the target gas undergoing a redox reaction on the surface of the working electrode, generating an electrochemical current proportional to the gas concentration. The parameter acquired by this type of gas sensor is the electrode reaction current, which is the direct basis for gas concentration estimation. The infrared spectroscopy gas sensor detects based on the selective absorption characteristics of gas molecules to specific wavelengths of infrared light. The parameter acquired by this type of gas sensor is the transmittance signal, from which the absorption intensity related to the gas concentration can be obtained.
[0035] In one embodiment, the temperature and humidity sensor in the multimodal sensing module adopts thin-film capacitive humidity sensing. The environmental water molecules penetrate the polymer dielectric layer on its surface, causing a change in the dielectric constant, which is converted into a fluctuation in capacitance value to measure relative humidity. Platinum metal is used for temperature detection. By utilizing the linear relationship between the resistance value of platinum metal and temperature, high-precision temperature measurement can be achieved within a predetermined temperature range.
[0036] In one embodiment, the air pressure sensor in the multimodal sensing module adopts MEMS (Microelectromechanical Systems) piezoresistive pressure sensing. The deformation of the silicon diaphragm under pressure causes a change in the resistance of the Wheatstone bridge, and outputs a voltage signal proportional to the air pressure.
[0037] In step S110, it is necessary to obtain the material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor.
[0038] The environmental data of the gas sensor in this embodiment may include temperature data, humidity data, and air pressure data.
[0039] In this application, the material parameters are a set of physical parameters reflecting the intrinsic properties of the gas sensor material. In one embodiment, the material parameters may include the equivalent activation energy. Equivalent adsorption constant K, baseline drift rate factor .
[0040] The environmental data collected in this embodiment of the application, representing the environment in which the gas sensor is located, is used not only for independent measurement of environmental parameters but also as a reference for environmental disturbances in the gas sensor's output signal. Subsequently, temperature, humidity, and air pressure data from the environmental data will be dynamically weighted in the signal decoupling processor using an adaptive filter algorithm. This process estimates and subtracts environmental interference components from the initial gas data in real time, ensuring that the weight vector reflects the equivalent influence of current temperature, humidity, and air pressure on the gas sensor's output. This achieves online quantization of environmental coupling and signal decoupling.
[0041] S120: Based on the environmental data, the initial gas data is denoised to obtain target gas data; the target gas data is used to update the material parameters.
[0042] In step S120, based on the environmental data, the noise component caused by environmental factors is separated from the initial gas data to obtain target gas data. Environmental factors can be represented by temperature, humidity, and air pressure data from the environmental data of the environment where the gas sensor is located. The target gas data can be used to update material parameters. In one embodiment, the target gas data can also be used to determine the fault type of the gas sensor. S130: Input the temperature data, material parameters, and target gas data from the environmental data into a pre-trained fault diagnosis model to determine the faulty gas sensor among the gas sensors; wherein, the fault diagnosis model includes a graph convolutional network; the graph convolutional network includes nodes representing the gas sensor and edges connecting the nodes, the graph convolutional network is used to determine the edge weights of the edges based on the temperature data and the material parameters of the gas sensor, and the edge weights are used to determine the faulty gas sensor among the gas sensors.
[0043] In this embodiment, the fault diagnosis model includes a graph convolutional network.
[0044] Graph convolutional networks (GCNNs) contain nodes representing gas sensors and edges connecting these nodes. In this embodiment, each gas sensor in the gas sensor array is considered a node in the GCNN structure. Node attributes are no longer limited to electrical signal characteristics but also include a set of physical parameters, i.e., material parameters, which are materialized to reflect the intrinsic properties of the sensor material. By directly introducing material science parameters into the node feature space, the GCNN embeds the physical characteristics of the gas sensors, enabling it to have prior knowledge of the physical differences and aging states of the gas sensors during the feature propagation stage. The edge weights in the GCNN are dynamically updated with temperature data and material parameters to characterize the relative changes in the reaction rates of different gas sensor materials under varying temperature conditions. When a gas sensor ages or its material performance degrades, its material parameters change, directly causing the associated edge weights to decay or become abnormal, thus forming a traceable fault propagation path during the feature propagation process of the GCNN. Therefore, the GCNN in this embodiment can not only identify the abnormal state of a single gas sensor but also capture system-level abnormal patterns within the gas sensor array caused by material differences or collaborative failures.
[0045] In step S130, temperature data, denoised target gas data, and material parameters are input into a pre-trained fault diagnosis model, which then identifies faulty gas sensors from the gas sensors.
[0046] This application's embodiments dynamically determine the edge weights of the graph convolutional network based on temperature data and the material parameters of the gas sensor, thus embedding materials science principles into the graph convolutional network. When the gas sensor experiences aging or other faults, its material parameters change, leading to corresponding changes in the edge weights. This, in turn, forms a traceable fault propagation path during the feature propagation process of the graph convolutional network. This enables the fault diagnosis model to effectively identify faulty gas sensors, achieving the identification of complex gas sensor faults, increasing the types of diagnosable faults, and significantly improving the accuracy of gas sensor fault diagnosis.
[0047] Optionally, the environmental data includes temperature data, humidity data, and air pressure data, and step S120 includes: The initial gas data is decomposed using wavelet packet decomposition to obtain gas sub-signals; Using a correlation coefficient function, a sensitive sub-signal is determined from the gas sub-signal based on the temperature data, humidity data, and air pressure data. The sensitive sub-signal is a gas sub-signal that is sensitive to changes in the temperature data, humidity data, and air pressure data. An adaptive filtering algorithm is used to determine the environmental interference signal in the sensitive sub-signal based on the temperature data, humidity data, and air pressure data. In the gas sub-signal, environmental interference signals in the sensitive sub-signal are removed to obtain a denoised gas sub-signal; Wavelet packet reconstruction is performed on the denoised gas sub-signal to obtain the denoised gas data. Baseline compensation is performed on the denoised gas data to obtain the target gas data.
[0048] This application embodiment uses a joint algorithm of wavelet packet decomposition and adaptive filtering to separate environmental noise components from the initial gas data, thereby achieving denoising of the initial gas data collected by the gas sensor.
[0049] Specifically, firstly, the initial gas data... L-level wavelet packet decomposition is performed to obtain gas sub-signals in different frequency bands, as shown in formula (1) below: (1) in, For initial gas data, Corresponding frequency band gas sub-signal coefficients Indicates the first Layer, k-th wavelet packet basis function. The initial gas data signal is decomposed into gas sub-signals of different frequency bands through wavelet packet decomposition. The low-frequency sub-band mainly carries the slow drift component caused by temperature and humidity changes, the mid-frequency sub-band contains the effective response related to the gas adsorption-desorption process, and the high-frequency sub-band is mainly composed of random noise and transient disturbances, thereby realizing the preliminary location of environmental interference in the time and frequency domain.
[0050] After wavelet packet decomposition, correlation analysis and energy assessment are performed on the gas sub-signals of each frequency band based on the variation characteristics of temperature, humidity, and air pressure data. Sensitive sub-signals that are highly correlated with the changes in environmental parameters of temperature, humidity, and air pressure data are selected as the main carrier channels for environmental interference. Sensitive sub-signals are gas sub-signals that are sensitive to changes in temperature, humidity, and air pressure data. As shown in formula (2) below. (2) in, Indicates the first Each wavelet packet corresponds to a gas sub-signal; u(t) is the environmental input vector, including temperature data T(t), humidity data H(t), and air pressure data P(t); (·) represents the correlation coefficient function, with a numerical range of [-1, 1]; This indicates the selection of the index that maximizes the relevance. .therefore The final result is the index that maximizes relevance.
[0051] Subsequently, these sensitive sub-signals The data are passed as input parameters to the adaptive filtering algorithm. The adaptive filtering algorithm takes temperature data, humidity data and air pressure data as reference inputs and introduces weight vectors corresponding to different environmental parameters. It performs weighted modeling of the influence of different environmental parameters in each sensitive sub-signal and generates environmental interference estimate d(t).
[0052] Specifically, the process by which environmental parameters affect the adaptive filter weights is as follows: Initial gas data collected by the gas sensor It will be simultaneously affected by the target gas concentration and environmental disturbances (i.e., temperature data T(t), humidity data H(t), and air pressure data P(t)). In order to remove environmental interference from the output signal and obtain a pure gas sensor output signal, the environmental input vector u(t) shown in the following formula (3) is constructed, where t is time: u(t)=[T(t),H(t),P(t)] T (3) And an environmental disturbance estimate d(t) is generated through an adaptive filter, as shown in the following formula (4): d(t) = w T (t)u(t) = w T (t)T(t) + w H (t)H(t) + w P (t)P(t)(4) Where, w(t) = [w T (t),w H (t),w P (t)] T The adaptive weight vectors characterize the equivalent influence of temperature, humidity, and air pressure on the gas sensor output.
[0053] In the initial startup phase, assuming that environmental disturbances have not yet made a identifiable contribution to the gas sensor output, no environmental compensation is performed initially. The adaptive filter gradually learns the degree of influence of environmental factors on the sensor output during operation, i.e., w(0) = [0,0,0] T The adaptive weight vector is updated using the Normalized Least Mean Square (NLMS) algorithm, as shown in Equation (5) below: (5) Where t is time; This represents the step size factor, which controls the magnitude of weight updates and affects convergence speed and stability. This represents the regularization parameter, which prevents unstable weight updates caused by a denominator that is zero or too small. = - d(t) represents the error signal, which is the difference between the initial gas data output by the sensor at the current moment and the environmental interference estimated by the filter; u(t) is the environmental input vector; The energy of the environmental input vector can be represented by formula (6), which is used to normalize the update amount and prevent excessive weight updates due to excessively large input magnitude: = T(t) 2 +H(t) 2 +P(t) 2 (6) Where T(t) is temperature data, H(t) is humidity data, and P(t) is air pressure data.
[0054] Using the normalized least mean square algorithm, the error signal drives the adaptive weight vector to iteratively update along the signal subspace direction, which is highly correlated with environmental parameters. The convergence process of this adaptive weight vector essentially corresponds to the process by which the environmental disturbance estimate gradually approximates the noise components caused by environmental factors such as temperature, humidity, and air pressure. When the mean square value of the error signal converges to near its stable minimum, the filter reaches a steady state. At this point, the obtained environmental disturbance estimate achieves optimal modeling of the environmental disturbance components in the least mean square sense.
[0055] After the filter converges, the adaptive filtering algorithm can accurately estimate the environmental interference signal in each sensitive sub-signal. In the gas sub-signal, this estimated value d(t) is derived from the corresponding sensitive sub-signal. After subtraction, the sensitive sub-signal after removing environmental noise is obtained. Thus, the denoised gas sub-signal is obtained, and the process is represented by formula (7): - d(t)(7) Finally, the The denoised gas sub-signal of the layer is represented as The L-layer wavelet packet reconstruction is performed on each denoised gas sub-signal to recover the time-domain gas response signal after removing the effects of temperature, humidity, and air pressure, which is the denoised gas data. The process can be represented by formula (8): (8) Based on this, baseline compensation is performed on the denoised gas data to correct the baseline offset of the gas sensor and obtain the target gas data.
[0056] This application proposes a joint algorithm of wavelet packet decomposition and adaptive filtering to process initial gas data. This algorithm integrates the frequency domain localization of wavelet packet decomposition with the time domain tracking of adaptive filtering. By using temperature, humidity, and air pressure data, a dynamic sensitivity modeling relationship is established between changes in environmental parameters and changes in environmental interference signals in the gas response. This enables the system to accurately characterize the influence of environmental factors on the gas sensor output, improving the accuracy of subsequent fault diagnosis. Furthermore, experiments demonstrate that this denoising method allows the target gas data acquired by the gas sensor to maintain high signal fidelity even in extreme environments such as typhoons and rainstorms, solving the sensitivity drift problem of semiconductor-type gas sensors in tropical climates.
[0057] Optionally, the baseline compensation of the denoised gas data to obtain the target gas data includes: Determine the baseline drift rate factor based on the material parameters; The target gas data is obtained by using an exponentially weighted moving average model to perform baseline compensation on the denoised gas data based on the baseline drift rate factor.
[0058] In this embodiment, after obtaining the time-domain gas response signal after removing the influence of temperature, humidity and air pressure, i.e., after obtaining the target gas data, the baseline offset of the gas sensor is dynamically corrected based on the exponentially weighted moving average model.
[0059] Specifically, the baseline drift rate factor is determined based on material parameters. The gas sensor's aging is less pronounced, as reflected in its material parameters. A smaller value indicates more severe aging of the gas sensor, as reflected by the material parameters. The value is relatively large. Based on the exponentially weighted moving average model, the denoised gas data... Baseline compensation is performed to obtain the target gas data, as shown in the following formula (9): (9) Where t is time, This is the baseline estimate for the current time. This is the baseline drift rate factor.
[0060] Since the gas sensor baseline remains almost constant during the short initial time window, the initial baseline estimate is... This can be achieved by analyzing the gas signals used to eliminate environmental interference during the startup phase. The result is obtained by averaging over time, as shown in formula (10): (10) in, This refers to the system startup time. The number of sampling points is determined by the system sampling rate and the expected settling time. ={ , +1, ..., + -1}.
[0061] The embodiments of this application dynamically correct the baseline offset of the gas sensor based on the exponentially weighted moving average model, so that the target gas data signal output by the gas sensor can maintain a stable benchmark under environmental changes and long-term aging conditions, thereby improving the accuracy of subsequent fault diagnosis.
[0062] Optionally, the material parameters include the activation energy parameters of the gas sensor material, and step 130 includes: The material parameters and temperature data are input into the graph convolutional network, so that the graph convolutional network uses the material parameters as the node attributes of the nodes, and determines the edge weights between the nodes based on the temperature data and the activation energy parameters of the gas sensor material. The faulty gas sensor among the gas sensors is determined based on the edge weights.
[0063] The fault diagnosis model in this application embodiment is used to perform physical consistency fault diagnosis on the operating status of the gas sensor based on material parameters and target gas data after completing the elimination of environmental interference and baseline drift compensation of the target gas data.
[0064] Specifically, the fault diagnosis model includes a graph convolutional network that embeds the physical properties of sensors, with material parameters used as node attributes of each node in the graph convolutional network. The material parameters include at least the equivalent activation energy. Equivalent adsorption constant K, baseline drift rate factor The activation energy parameter of the gas sensor material includes the equivalent activation energy. The edge weights of the graph convolutional network do not use fixed or static parameters, but are dynamically calculated based on the Arrhenius kinetic equation, according to temperature data and the activation energy parameter of the gas sensor material, as shown in formula (11) below: (11) in, This represents the edge weight between node i and node j; , This represents the equivalent activation energy of the sensor material corresponding to node i and node j; , The activation energy shift caused by sensor aging at nodes i and j is represented by R; the gas constant is represented by T(t); and the real-time ambient temperature is represented by temperature data. This represents the normalization coefficient or the structural scaling factor.
[0065] After inputting material parameters and temperature data into the graph convolutional network, the graph convolutional network calculates and outputs edge weights based on the temperature data and the activation energy parameters of the gas sensor material. Based on the edge weights, it can further identify the abnormal state of a single gas sensor or capture system-level abnormal patterns caused by material differences or collaborative failures within the array.
[0066] This application introduces the physical mechanism of sensor materials and embeds the principles of materials science into graph convolutional networks. When a gas sensor experiences aging or other faults, its material parameters change, resulting in a corresponding change in edge weights. This leads to the formation of a traceable fault propagation path during the feature propagation process of the graph convolutional network, enabling the fault diagnosis model to effectively identify faulty gas sensors.
[0067] Optionally, the fault diagnosis model further includes a residual temporal convolutional network, wherein inputting the temperature data from the environmental data, the material parameters, and the target gas data into the pre-trained fault diagnosis model includes: The target gas data is input into the residual temporal convolutional network, so that the residual temporal convolutional network can determine the fault evolution characteristics of the gas sensor from a time scale based on the target gas data, and obtain the fault type of the gas sensor.
[0068] The fault diagnosis model in this embodiment also introduces a fault feature extraction layer to determine the fault evolution characteristics of the gas sensor from a time scale. The fault feature extraction layer may include a residual temporal convolutional network, which can be a multi-scale residual temporal convolutional network. Specifically, target gas data is input into the residual temporal convolutional network of the fault diagnosis model. The residual temporal convolutional network determines the fault evolution characteristics of the gas sensor from a time scale based on the target gas data, thereby obtaining the fault type of the gas sensor.
[0069] This application embodiment combines residual temporal convolutional networks to process target gas data, determine the fault evolution characteristics of the gas sensor from a time scale. The residual temporal convolutional network can automatically capture the dynamic changes of the target gas data of the gas sensor, thereby determining the fault type of the gas sensor.
[0070] Optionally, the residual temporal convolutional network includes convolutional paths at different time scales, and the step of inputting the target gas data into the residual temporal convolutional network includes: The target gas data is input into the residual temporal convolutional network, so that the residual temporal convolutional network processes the target gas data using convolutional paths of different time scales to obtain residual signals of different scales. The residual signals at different scales are fused using the residual temporal convolutional network to obtain fused residuals. By comparing the fused residual with the preset healthy gas sensor data, the fault type of the gas sensor is obtained.
[0071] The fault diagnosis model in this application adopts a multi-scale residual temporal convolutional network structure, that is, a residual temporal convolutional network including convolutional paths at different time scales.
[0072] Multi-scale residual temporal convolutional networks (MTCs) can simultaneously capture both abrupt fault features at short timescales and slow drift features at long timescales by setting convolutional pathways with different receptive fields in parallel. The kernel length and dilation factor of each pathway are independently configured, enabling the MTC to capture fault features at multiple timescales simultaneously. Since gas sensor faults do not reconstruct the dominant physical processes of the gas response, but rather superimpose deviations from the normal response onto the original signal, faults at different timescales correspond to different deviations at different timescales. The processing of target gas data by each convolutional pathway at each timescale can be expressed as the following formula (12): (12) Where m represents the m-th parallel convolutional path; M represents the total number of parallel scales; Let be the output feature of the m-th parallel convolutional path; x(t) represents the target gas signal after environmental decoupling and baseline compensation. The length of the convolution kernel corresponding to the m-th scale determines the size of the temporal receptive field of this pathway; This represents the discrete-time index variable in the convolution operation; This represents the inflation factor, which controls the sampling interval and determines the time span that the model can perceive. This represents the kernel weights at the m-th scale.
[0073] The target gas data is input into the residual temporal convolutional network. The residual temporal convolutional network uses convolutional paths of different time scales to process the target gas data according to formula (12) to obtain residual signals of different scales, i.e., multi-scale residual signals. Among them, the short-time-scale convolutional path uses a narrow convolutional kernel to sensitively capture abrupt fault features in the sensor output, such as device failure or transient anomalies; the long-time-scale convolutional path introduces a wider convolutional kernel and an asymmetric dilated convolutional structure to extract slow drift features caused by material aging or contamination accumulation.
[0074] After parallel extraction of fault features at different time scales to obtain residual signals at different scales, a multi-scale residual temporal convolutional network is used to fuse the residual signals at different scales to achieve collaborative representation of multi-scale information, resulting in fused residuals. As shown in the following formula (13): (13) in, This represents the feature concatenation operation, where M is the number of parallel time scales. represents the output feature of the m-th parallel convolutional path.
[0075] By comparing the fusion residuals By comparing the historical data of the health gas sensor (i.e., health gas sensor data), a reference statistical characteristic of the residuals can be established. This reference statistical characteristic of the residuals is used to determine the fault type of the gas sensor. In one embodiment, the reference statistical characteristic of the residuals may include an amplitude threshold. Mean threshold Slope threshold .
[0076] In one embodiment, healthy gas sensor data can be acquired by: collecting the corresponding gas response signal during the healthy operation phase of the gas sensor. After the signal is processed by the aforementioned multi-scale residual temporal convolutional network, the corresponding fused residual sequence is obtained. The residual It mainly reflects normal noise and modeling errors, and can be regarded as a reference for healthy residuals.
[0077] Further based on Calculate its statistical characteristics as reference statistical properties. Among them, the amplitude threshold... Mean threshold Slope threshold ;in .
[0078] According to the fusion residual The fault type of the sensor is determined by comparing it with reference statistical characteristics. For fused residuals... ,when It can be determined as a transient fault when; when This can be identified as a long-term drift fault; when This can be identified as an aging or cumulative contamination fault.
[0079] This application embodiment processes target gas data using a residual temporal convolutional network to determine the fault type of the gas sensor. It can automatically capture the dynamic changes of the target gas data of the gas sensor, effectively improve the reliability and interpretability of fault identification, realize the identification of complex faults of gas sensors, increase the types of diagnosable faults, and significantly improve the accuracy of gas sensor fault diagnosis.
[0080] Optionally, the material parameters include the adsorption parameters of the gas sensor material, and the method includes: Obtain a fault diagnosis model to be trained, wherein the fault diagnosis model to be trained includes a graph convolutional network to be trained; Based on the Langmuir adsorption equation, physical constraint terms are constructed according to the adsorption parameters of the gas sensor material. The fault diagnosis model to be trained is trained according to the physical constraints to obtain the pre-trained fault diagnosis model. The physical constraints are used to guide the model parameters of the graph convolutional network to be trained to converge in a direction that conforms to the gas adsorption kinetics during training.
[0081] In order to prevent the fault diagnosis model from exhibiting non-physical interpretations that violate the gas adsorption mechanism during training, this application embodiment sets physical constraints on the output of the graph convolutional network.
[0082] Physical constraints in this application embodiment To construct a regularization term based on the adsorption parameters of the gas sensor material in the material parameters, and using the adsorption behavior of the gas on the sensor surface as the physical constraint condition for the network prediction result, as shown in the following formula (14), where the adsorption parameters of the gas sensor material include the equivalent adsorption constant: (14) in, For physical constraints; Indicates the equivalent adsorption constant; Indicates gas concentration; The normalized mapping can be represented by formula (15): (15) in, This represents the network's predicted output for the gas sensor; This represents the minimum response value obtained by the sensor during the calibration phase; This indicates the maximum response value obtained by the sensor during the calibration phase.
[0083] Specifically, when training the fault diagnosis model to be trained, physical constraints are used to penalize the output of the graph convolutional network to be trained, thereby guiding the model parameters of the graph convolutional network to converge in a direction that conforms to the gas adsorption kinetics.
[0084] In one embodiment, the types of abnormal outputs that will result in penalties include abnormal oscillations in the response in the low concentration range, linear growth in the prediction in the medium-to-high concentration range, and out-of-bounds prediction in the saturation range. Specifically, in the low concentration range ( ), ,like Abnormal oscillations or non-monotonic changes occur due to physical constraints. It will increase, thus resulting in a greater penalty; in the medium to high concentration range ( ), It exhibits a noticeable bend, if If it continues to grow linearly, then it corresponds to the Langmuir curve at this point. The curvature characteristics are clearly inconsistent with the physical constraints. It will increase, thus producing a greater penalty; in the saturation concentration range ( ), ,like If the value is greater than 1 (i.e., the prediction exceeds the limit), it directly conflicts with the Langmuir saturation limit, which is a physical constraint. It will increase, thus resulting in a greater penalty.
[0085] Therefore, during the model training phase, when the sensor response amplitude or trend predicted by the graph convolutional network does not conform to the monolayer adsorption saturation characteristics or thermodynamic equilibrium laws, the physical loss term... This will penalize the prediction result, thereby guiding the model parameters of the graph convolutional network to converge in a direction consistent with gas adsorption kinetics.
[0086] This application embodiment constructs physical constraint terms through the Langmuir adsorption equation, introducing gas adsorption kinetic constraints into the model training. When the model prediction violates the gas adsorption mechanism during training, the physical constraint terms automatically trigger a penalty, thereby restricting the model's judgment process within a parameter space that conforms to objective physical laws. This ensures that the model's fault diagnosis results strictly follow the thermodynamic laws of surface adsorption, thus effectively improving the reliability and interpretability of fault identification.
[0087] Optionally, the method includes: The material parameters of the gas sensor are updated based on the target gas data and the environmental data to obtain locally updated material parameters; The incremental material parameters determined by each gas sensor are uploaded to the cloud, so that the cloud can perform a weighted average aggregation of the locally updated material parameters of the gas sensors based on the incremental material parameters to obtain the target material parameters; wherein, the incremental material parameters are determined based on the locally updated material parameters and the material parameters. The locally updated material parameters of the gas sensor are updated to the target material parameters.
[0088] This application embodiment has a dynamic incremental learning unit, which can update sensor material parameters based on a federated learning framework. Under the premise of ensuring that the original gas sensing data does not leave the end, only the material parameters reflecting the intrinsic characteristics of the gas sensor material are updated collaboratively.
[0089] Specifically, in the federated learning framework, the edge nodes are set as gas sensors. The physical loss term is determined solely based on locally acquired target gas data and environmental data. The original material parameters are then adjusted according to the physical loss term. Local incremental learning is performed to obtain locally updated material parameters, where the material parameters are... Including equivalent activation energy Equivalent adsorption constant K, baseline drift rate factor For the Kth gas sensor, its material parameters... The update of the physical loss term at time step t can be expressed as the following formula (17): (17) in, The physical loss term represents the gas sensor k. Represents physical loss item The gradient vector with respect to the material parameter θ; Indicates the learning rate; These are the material parameters of the gas sensor at the previous time step.
[0090] The gas sensor only increments the material parameters determined based on the original material parameters and the locally updated material parameters. The data is uploaded to a federated server in the cloud, thus avoiding the transmission of raw gas data. The server stores the original material parameters of each gas sensor. Based on the material parameter increment of each gas sensor and the original material parameters, the server can determine the locally updated material parameters of each gas sensor. Then, the locally updated material parameters from N gas sensors are weighted and averaged to obtain the target material parameters, which are used as the new material parameters of each gas sensor, as shown in formula (18). (18) in, For target material parameters, weights Related to the effective sampling number of the gas sensor, This represents the locally updated material parameters for the k-th gas sensor.
[0091] Target material parameters obtained by cloud aggregation The updated material parameters are then distributed to each gas sensor to update the locally updated material parameters of the gas sensor to the target material parameters. After being updated to the target material parameters, the target material parameters of the gas sensor can be directly applied to processes such as Arrhenius edge weight calculation, Langmuir regularization constraints, and baseline drift compensation, thereby achieving continuous adaptive modeling of sensor aging characteristics without retraining the complete model.
[0092] In this embodiment, after updating the material parameters locally on the gas sensor, the incremental updates of the locally updated material parameters are uploaded to the cloud for collaborative updates. This ensures that the original sensor data remains on-site, and only a small number of material parameters reflecting the intrinsic properties of the sensor material are collaboratively updated. Compared to traditional centralized learning methods that require uploading large amounts of raw gas response data and environmental data collected by each gas sensor to a central server, this embodiment reduces the communication burden and enhances the ability to characterize the material features of a single gas sensor. It not only ensures communication efficiency but also enables the system to adapt stably to sensor material aging and performance degradation over a long period, improving the reliability and accuracy of fault diagnosis.
[0093] Optionally, the method includes: The fault diagnosis model is compressed to obtain a compressed fault diagnosis model; wherein, the model parameters corresponding to the graph convolutional network are compressed according to a first precision, and the model parameters corresponding to the residual temporal convolutional network are compressed according to a second precision, wherein the first precision is higher than the second precision.
[0094] The embodiments of this application can compress the fault diagnosis model based on the TensorRT quantization engine and adopt a mixed precision strategy to compress the number of parameters to a predetermined ratio below that of the original model, thereby obtaining a compressed fault diagnosis model.
[0095] Specifically, the fault diagnosis model is first divided into functional structures. Data-driven parameters such as kernel weights, node edge weights, and physical loss terms in the residual temporal convolutional network used for feature extraction and fault discrimination are taken as the first parameter subset, i.e., the model parameters corresponding to the residual temporal convolutional network. Physical parameters related to sensor materials, such as equivalent activation energy, equivalent adsorption constant, and baseline drift rate factor in the graph convolutional network, are taken as the second parameter subset, i.e., the model parameters corresponding to the graph convolutional network.
[0096] The TensorRT quantization engine model employs different precision strategies for different parameter subsets. It uses INT8 or FP16 quantization for the first parameter subset and FP16 quantization or FP32 precision preservation for the second parameter subset. In other words, the precision of compressing the model parameters of the graph convolutional network is higher than that of compressing the model parameters of the residual temporal convolutional network.
[0097] The linear mapping of INT8 quantization to the model parameters is shown in formula (16): (16) in, This represents the original parameter size; This is a quantization scale factor; This represents the size of the quantized parameters. Through this mapping, INT8 quantization reduces the storage bit width of a single parameter from 32 bits to 8 bits, reducing the parameter storage size to 1 / 4 of its original size; similarly, FP16 quantization reduces the parameter storage size to 1 / 2 of its original size, and so on for other compression precipitates.
[0098] This application employs different precision and reverse model compression for different model parameters. This hybrid precision strategy ensures that while significantly reducing parameter storage and computation, it does not compromise the numerical stability of the fault diagnosis model and maintains the diagnostic accuracy of the fault diagnosis model even after model compression.
[0099] Example 2 To enable those skilled in the art to more clearly understand the fault diagnosis method for a gas sensor provided in the embodiments of this application, the following is combined with... Figure 2 A fault diagnosis method for a gas sensor, as shown in an embodiment of this application, will be described.
[0100] Reference Figure 2 This is a system architecture diagram of a gas sensor fault diagnosis method provided in an embodiment of this application.
[0101] like Figure 2 As shown in the embodiments of this application, the fault diagnosis method for the gas sensor can be implemented by a gas sensor fault diagnosis system, which includes a multimodal sensing module, a signal decoupling processor, a physical constraint diagnosis engine, and an edge deployment interface.
[0102] The multimodal sensing module may include a gas sensor array, a temperature and humidity sensor, and a pressure sensor, with the gas sensor array comprising several gas sensors.
[0103] The signal decoupling processor includes an environmental interference separation unit and a drift compensation unit. The environmental interference separation unit uses a joint wavelet packet decomposition and adaptive filtering algorithm to separate noise components caused by environmental factors such as temperature, humidity, and air pressure from the initial gas data to obtain the target gas data. The drift compensation unit, after obtaining the target gas data free from the influence of temperature, humidity, and air pressure, dynamically corrects the baseline offset of the gas sensor based on an exponentially weighted moving average model.
[0104] The physical constraint diagnostic engine deploys a fault diagnosis model, specifically comprising a graph convolutional network, a fault feature extraction layer, and a physical loss constraint unit. The graph convolutional network is used to model the physical associations of gas sensors and identify faulty sensors. The fault feature extraction layer, which can be a multi-scale residual temporal convolutional network, is used to extract fault modes and determine the fault type of the gas sensor. The physical loss constraint unit utilizes the Langmuir adsorption mechanism to construct physically consistent loss constraints, guiding the model parameters of the graph convolutional network to converge towards a direction consistent with gas adsorption kinetics during model training.
[0105] The edge deployment interface includes a model compression unit and a dynamic incremental learning unit. The model compression unit is used to compress the fault diagnosis model according to a mixed-precision strategy. The dynamic incremental learning unit is used to update the material parameters of the sensor based on a federated learning framework.
[0106] This application's embodiments dynamically determine the edge weights of a graph convolutional network based on temperature data and the material parameters of the gas sensor, thus embedding materials science principles into the graph convolutional network. When the gas sensor experiences aging or other faults, its material parameters change, leading to corresponding changes in the edge weights. This, in turn, forms a traceable fault propagation path during the feature propagation process of the graph convolutional network. This allows the fault diagnosis model to effectively identify faulty gas sensors. By combining this with a residual temporal convolutional network to process the target gas data to determine the fault type, the model can automatically capture the dynamic changes in the gas sensor's response signal, enabling the identification of complex gas sensor faults. This increases the types of diagnosable faults and significantly improves the accuracy of gas sensor fault diagnosis.
[0107] This application also provides a fault diagnosis device 30 for a gas sensor. Please refer to [link / reference]. Figure 3 ,include: The parameter acquisition module 310 is used to acquire the material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor; the material parameters are physical parameters that reflect the material characteristics of the gas sensor. The parameter processing module 320 is used to denoise the initial gas data based on the environmental data to obtain target gas data; the target gas data is used to update the material parameters. The fault diagnosis module 330 is used to input the temperature data, material parameters, and target gas data from the environmental data into a pre-trained fault diagnosis model to determine the faulty gas sensor among the gas sensors; wherein, the fault diagnosis model includes a graph convolutional network; the graph convolutional network includes nodes representing the gas sensor and edges connecting the nodes, and the graph convolutional network is used to determine the edge weights of the edges based on the temperature data and the material parameters of the gas sensor, and the edge weights are used to determine the faulty gas sensor among the gas sensors.
[0108] Optionally, the parameter processing module 320 includes: The wavelet packet decomposition submodule is used to perform wavelet packet decomposition on the initial gas data to obtain gas sub-signals; The sensitive sub-signal determination submodule is used to determine a sensitive sub-signal from the gas sub-signals based on the temperature data, humidity data, and air pressure data using a correlation coefficient function. The sensitive sub-signal is a gas sub-signal that is sensitive to changes in the temperature data, humidity data, and air pressure data. The interference signal determination submodule is used to determine the environmental interference signal in the sensitive sub-signal based on the temperature data, humidity data, and air pressure data using an adaptive filtering algorithm. The denoising sub-module is used to remove environmental interference signals from the sensitive sub-signal in the gas sub-signal to obtain a denoised gas sub-signal; The wavelet packet reconstruction submodule is used to reconstruct the denoised gas sub-signal using wavelet packets to obtain denoised gas data. The baseline compensation submodule is used to perform baseline compensation on the denoised gas data to obtain the target gas data.
[0109] Optionally, the baseline compensation submodule is specifically used for: Determine the baseline drift rate factor based on the material parameters; The target gas data is obtained by using an exponentially weighted moving average model to perform baseline compensation on the denoised gas data based on the baseline drift rate factor.
[0110] Optionally, the material parameters include the activation energy parameters of the gas sensor material, and the fault diagnosis module 330 includes: The edge weight update submodule is used to input the material parameters and the temperature data into the graph convolutional network, so that the graph convolutional network uses the material parameters as the node attributes of the nodes, and determines the edge weights between the nodes based on the temperature data and the activation energy parameters of the gas sensor material. The fault sensor determination submodule is used to determine the faulty gas sensor among the gas sensors based on the edge weights.
[0111] Optionally, the fault diagnosis model further includes a residual temporal convolutional network, and the fault diagnosis module 330 includes: The residual temporal convolutional network processing submodule is used to input the target gas data into the residual temporal convolutional network, so that the residual temporal convolutional network can determine the fault evolution characteristics of the gas sensor from a time scale based on the target gas data, and obtain the fault type of the gas sensor.
[0112] Optionally, the residual temporal convolutional network includes convolutional paths at different time scales, and the residual temporal convolutional network processing submodule includes: The residual signal determination unit is used to input the target gas data into the residual temporal convolutional network, so that the residual temporal convolutional network processes the target gas data with convolutional paths of different time scales respectively to obtain residual signals of different scales; The fusion residual determination unit is used to fuse the residual signals of different scales through the residual temporal convolutional network to obtain the fusion residual; The fault type determination unit is used to compare the fused residual with preset healthy gas sensor data to obtain the fault type of the gas sensor.
[0113] Optionally, the material parameters include the adsorption parameters of the gas sensor material, and the device includes: The module for acquiring the model to be trained is used to acquire the fault diagnosis model to be trained, wherein the fault diagnosis model to be trained includes a graph convolutional network to be trained. A physical constraint construction module is used to construct physical constraint terms based on the Langmuir adsorption equation and the adsorption parameters of the gas sensor material. The model training module is used to train the fault diagnosis model to be trained according to the physical constraints, so as to obtain the pre-trained fault diagnosis model. The physical constraints are used to guide the model parameters of the graph convolutional network to be trained to converge in a direction that conforms to the gas adsorption kinetics during training.
[0114] Optionally, the device includes: The first update module is used to update the material parameters of the gas sensor based on the target gas data and the environmental data, so as to obtain the locally updated material parameters; The cloud processing module is used to upload the incremental material parameters determined by each gas sensor to the cloud, so that the cloud can perform a weighted average aggregation of the locally updated material parameters of the gas sensors based on the incremental material parameters to obtain the target material parameters; wherein, the incremental material parameters are determined based on the locally updated material parameters and the material parameters. The second update module is used to update the locally updated material parameters of the gas sensor to the target material parameters.
[0115] This application also provides an electronic device 40, please refer to... Figure 4 It includes a processor 410 and a memory 420, wherein the memory 410 is used to store computer programs; the processor 420 is used to execute the programs stored in the memory 410 to implement the fault diagnosis method of the gas sensor described in any embodiment of this application.
[0116] This application also provides a vehicle that includes the electronic equipment described in this application.
[0117] In this application, "multiple" refers to two or more.
[0118] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0119] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0120] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0121] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.
[0122] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A fault diagnosis method for a gas sensor, characterized in that, include: The material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor are obtained; the material parameters are physical parameters that reflect the material characteristics of the gas sensor. Based on the environmental data, the initial gas data is denoised to obtain target gas data; the target gas data is used to update the material parameters. The temperature data, material parameters, and target gas data from the environmental data are input into a pre-trained fault diagnosis model to identify the faulty gas sensor among the gas sensors. The fault diagnosis model includes a graph convolutional network; the graph convolutional network includes nodes representing the gas sensor and edges connecting the nodes, and the graph convolutional network is used to determine the edge weights of the edges based on the temperature data and the material parameters of the gas sensor, and the edge weights are used to determine the faulty gas sensor among the gas sensors.
2. The fault diagnosis method for a gas sensor according to claim 1, characterized in that, The environmental data includes temperature data, humidity data, and air pressure data. The step of denoising the initial gas data based on the environmental data to obtain the target gas data includes: The initial gas data is decomposed using wavelet packet decomposition to obtain gas sub-signals; Using a correlation coefficient function, a sensitive sub-signal is determined from the gas sub-signal based on the temperature data, humidity data, and air pressure data. The sensitive sub-signal is a gas sub-signal that is sensitive to changes in the temperature data, humidity data, and air pressure data. An adaptive filtering algorithm is used to determine the environmental interference signal in the sensitive sub-signal based on the temperature data, humidity data, and air pressure data. In the gas sub-signal, environmental interference signals in the sensitive sub-signal are removed to obtain a denoised gas sub-signal; Wavelet packet reconstruction is performed on the denoised gas sub-signal to obtain the denoised gas data. Baseline compensation is performed on the denoised gas data to obtain the target gas data.
3. The fault diagnosis method for a gas sensor according to claim 2, characterized in that, The process of performing baseline compensation on the denoised gas data to obtain the target gas data includes: Determine the baseline drift rate factor based on the material parameters; The target gas data is obtained by using an exponentially weighted moving average model to perform baseline compensation on the denoised gas data based on the baseline drift rate factor.
4. The fault diagnosis method for a gas sensor according to claim 1, characterized in that, The material parameters include the activation energy parameter of the gas sensor material. The process involves inputting the temperature data from the environmental data, the material parameters, and the target gas data into a pre-trained fault diagnosis model to obtain the faulty gas sensor and its fault type output by the fault diagnosis model, including: The material parameters and temperature data are input into the graph convolutional network, so that the graph convolutional network uses the material parameters as the node attributes of the nodes, and determines the edge weights between the nodes based on the temperature data and the activation energy parameters of the gas sensor material. The faulty gas sensor among the gas sensors is determined based on the edge weights.
5. The fault diagnosis method for a gas sensor according to claim 1, characterized in that, The fault diagnosis model further includes a residual temporal convolutional network. The step of inputting the temperature data from the environmental data, the material parameters, and the target gas data into the pre-trained fault diagnosis model includes: The target gas data is input into the residual temporal convolutional network, so that the residual temporal convolutional network can determine the fault evolution characteristics of the gas sensor from a time scale based on the target gas data, and obtain the fault type of the gas sensor.
6. The fault diagnosis method for a gas sensor according to claim 5, characterized in that, The residual temporal convolutional network includes convolutional paths at different time scales. The step of inputting the target gas data into the residual temporal convolutional network includes: The target gas data is input into the residual temporal convolutional network, so that the residual temporal convolutional network processes the target gas data using convolutional paths of different time scales to obtain residual signals of different scales. The residual signals at different scales are fused using the residual temporal convolutional network to obtain fused residuals. By comparing the fused residual with the preset healthy gas sensor data, the fault type of the gas sensor is obtained.
7. The fault diagnosis method for a gas sensor according to claim 1, characterized in that, The material parameters include the adsorption parameters of the gas sensor material, and the method includes: Obtain a fault diagnosis model to be trained, wherein the fault diagnosis model to be trained includes a graph convolutional network to be trained; Based on the Langmuir adsorption equation, physical constraint terms are constructed according to the adsorption parameters of the gas sensor material. The fault diagnosis model to be trained is trained according to the physical constraints to obtain the pre-trained fault diagnosis model. The physical constraints are used to guide the model parameters of the graph convolutional network to be trained to converge in a direction that conforms to the gas adsorption kinetics during training.
8. The fault diagnosis method for a gas sensor according to claim 1, characterized in that, The method includes: The material parameters of the gas sensor are updated based on the target gas data and the environmental data to obtain locally updated material parameters; The incremental material parameters determined by each gas sensor are uploaded to the cloud, so that the cloud can perform a weighted average aggregation of the locally updated material parameters of the gas sensors based on the incremental material parameters to obtain the target material parameters; wherein, the incremental material parameters are determined based on the locally updated material parameters and the material parameters. The locally updated material parameters of the gas sensor are updated to the target material parameters.
9. A fault diagnosis device for a gas sensor, characterized in that, The device includes: The parameter acquisition module is used to acquire the material parameters of the gas sensor, the environmental data of the environment in which the gas sensor is located, and the initial gas data collected by the gas sensor; the material parameters are physical parameters that reflect the material characteristics of the gas sensor. The parameter processing module is used to denoise the initial gas data based on the environmental data to obtain target gas data; the target gas data is used to update the material parameters. The fault diagnosis module is used to input the temperature data, material parameters and target gas data from the environmental data into a pre-trained fault diagnosis model to identify the faulty gas sensor among the gas sensors. The fault diagnosis model includes a graph convolutional network; the graph convolutional network includes nodes representing the gas sensor and edges connecting the nodes, and the graph convolutional network is used to determine the edge weights of the edges based on the temperature data and the material parameters of the gas sensor, and the edge weights are used to determine the faulty gas sensor among the gas sensors.
10. An electronic device, characterized in that, Including processor and memory, among which Memory, used to store computer programs; A processor is used to execute a program stored in a memory to implement the fault diagnosis method for the gas sensor according to any one of claims 1-8.
11. A vehicle, characterized in that, It includes the electronic device as described in claim 10.