An adaptive signal processing method and system for semiconductor gas sensors

By using an adaptive signal processing method to dynamically adjust the average number of samplings, the contradiction between noise interference and dynamic response in resistive semiconductor gas sensors is resolved, achieving a balance between high signal-to-noise ratio and fast response, thus improving the sensor's detection performance and environmental adaptability.

CN121786403BActive Publication Date: 2026-05-26NORTHEASTERN UNIV CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NORTHEASTERN UNIV CHINA
Filing Date
2026-03-05
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing resistive semiconductor gas sensors struggle to balance noise interference with dynamic response requirements. Fixed-parameter filtering methods cannot simultaneously achieve high signal-to-noise ratio and fast response speed. General adaptive filtering algorithms are computationally complex and unsuitable for resource-constrained systems. Single filtering strategies are insufficient in complex noise environments.

Method used

An adaptive signal processing method is adopted, which calculates target data such as instantaneous rate of change, differential sequence and one-sided power spectral density by real-time acquisition of electrical signals, dynamically adjusts the average sampling number, and combines multi-dimensional signal analysis and intelligent decision-making modules to achieve adaptive filtering.

Benefits of technology

It achieves optimization of signal-to-noise ratio and response speed under stable and drastically changing gas concentrations, improving detection performance and environmental adaptability, and is suitable for resource-constrained IoT sensor nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786403B_ABST
    Figure CN121786403B_ABST
Patent Text Reader

Abstract

This invention provides an adaptive signal processing method and system for semiconductor gas sensors, relating to the field of signal processing technology. The invention acquires electrical signals from a gas sensor; performs multi-dimensional analysis on the signal sequence, including calculating the ratio of short-term to long-term fluctuations to assess signal quality, calculating instantaneous rate of change, detecting the starting point of trends, and identifying noise types, obtaining at least one analysis parameter; dynamically adjusts the average number of samplings N for signal smoothing and / or switches the signal processing mode based on the analysis parameter; and finally processes and outputs the signal based on the adjusted strategy. The corresponding system includes signal acquisition, analysis, decision-making, and processing modules. This invention intelligently balances the contradiction between signal-to-noise ratio and response speed, deeply suppressing noise during stable periods and responding rapidly during periods of rapid change, effectively improving the accuracy and reliability of gas detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology, and more specifically to an adaptive signal processing method and system for semiconductor gas sensors. Background Technology

[0002] Resistive semiconductor gas sensors, especially metal-oxide-semiconductor gas sensors, are widely used in environmental monitoring, industrial safety, smart homes, and medical diagnostics due to their low cost, high sensitivity, long lifespan, and broad-spectrum response to a variety of volatile organic compounds and harmful gases. However, these sensors have long been limited by the quality of their output signal in practical applications, with the core challenge stemming from the inherent contradiction between noise interference and dynamic response requirements.

[0003] The sensor itself and the pre-conditioning circuitry introduce various types of noise, primarily including white noise across the entire frequency band (such as thermal noise and shot noise), specific power frequency (50 / 60Hz), and their harmonic interference. If these noises are superimposed on a weak effective signal, they will severely reduce the accuracy and stability of the measurement, especially for the detection of low-concentration gases. To suppress these noises and improve the signal-to-noise ratio, digital filtering techniques are widely used in the field. The simplest and most effective method is signal averaging, which involves performing an arithmetic average of multiple consecutive sampling points. The principle is to utilize the randomness of the noise to cancel each other out during multiple averaging processes.

[0004] However, this method contains an inherent and irreconcilable contradiction. When the gas concentration is stable, a large number of average samples (N) is desirable to deeply smooth noise and obtain high-precision, stable readings. But when the gas concentration changes rapidly (such as in a sudden leak), a large number of average samples N will smooth out the details of the signal change, resulting in significant response delays and an inability to capture the rapid rise in concentration in a timely manner, which is fatal for safety early warning applications. Currently, most applications still use fixed-point moving average filters, and this "one-size-fits-all" approach cannot adapt to dynamic changes in signal states.

[0005] While some general adaptive filtering algorithms exist in the field of signal processing, they are typically computationally complex and unsuitable for resource-constrained embedded systems such as IoT sensor nodes. More importantly, these general algorithms are not designed for the signal characteristics unique to resistive gas sensors (such as slow response, nonlinearity, and specific noise spectrum structures), making it difficult to achieve an optimal balance between noise suppression and response speed. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the present invention aims to propose an adaptive signal processing method for semiconductor gas sensors, comprising:

[0007] The electrical signals output by the gas sensor are acquired in real time to obtain discrete time signal sequences;

[0008] The discrete time signal sequence is processed to obtain target data, which includes instantaneous rate of change, or multiple difference sequences, or one-sided power spectral density, or instantaneous rate of change and multiple difference sequences;

[0009] Based on the target data, determine the average number of samples N;

[0010] In the next sampling period, N new electrical signals are acquired in real time, and the average value of the N electrical signals is taken as the effective signal value.

[0011] Optionally, the processing of the discrete time signal sequence to obtain the target data includes:

[0012] The instantaneous rate of change r is calculated based on the discrete time signal sequence according to the following formula, and r is used as the target data;

[0013] ;

[0014] Where x[k] represents the electrical signal of the current sampling point k acquired in real time, x[k-1] represents the electrical signal of the previous sampling point k-1, and ΔT is the sampling interval.

[0015] Optionally, determining the average number of samples N based on the target data includes:

[0016] When the absolute value of the instantaneous rate of change r is greater than or equal to the threshold r for detecting the frontier of change. max When this is the case, the average number of samples N is set to a preset minimum value N. min ;

[0017] When the absolute value of the instantaneous rate of change r is less than the threshold r for detecting the frontier of change max At that time, calculate the quality assessment parameter Q, and determine the average number of samples N based on Q.

[0018] Optionally, the calculation of the quality assessment parameter Q and the determination of the average number of samples N based on Q include:

[0019] Set a long-term window and a short-term window of preset length. The long-term window and the short-term window slide on the discrete time signal sequence. Calculate the variance of the electrical signal in the short-term window to obtain the short-term fluctuation characteristics. Calculate the variance of the electrical signal in the long-term window to obtain the long-term fluctuation characteristics. Calculate the ratio of the short-term fluctuation characteristics to the long-term fluctuation characteristics to obtain the quality assessment parameter Q.

[0020] Set the lower limit threshold Q low and upper limit threshold Q high When Q ≤ Q lowWhen this is the case, the average number of samples N is set to the preset maximum value N. max When Q ≥ Q high When this is the case, the average number of samples N is set to a preset minimum value N. min When Q low Q high When the average number of samples N is calculated, a linear interpolation method is used.

[0021] Optionally, the processing of the discrete time signal sequence to obtain the target data includes:

[0022] The first-order difference between two adjacent sampling points in a discrete-time signal sequence is calculated using the following formula:

[0023] d[i] = x[i] - x[i-1];

[0024] Where i is a sampling point in a discrete time signal sequence, d[i] represents the first-order difference value corresponding to sampling point i, x[i] represents the electrical signal of sampling point i, and x[i-1] represents the electrical signal of sampling point i-1.

[0025] According to a preset number of first-order difference values, all first-order difference values ​​are divided to obtain multiple difference sequences, and the multiple difference sequences are used as target data.

[0026] Optionally, determining the average number of samples N based on the target data includes:

[0027] When any difference sequence satisfies a preset condition, the average number of samples N is set to a preset minimum value N. min When none of the differential sequences meet the preset conditions, calculate the quality assessment parameter Q and determine the average number of samplings N based on Q;

[0028] The preset conditions are that all first-order difference values ​​in the difference sequence are either positive or all are negative, and the absolute value of each first-order difference value in the difference sequence is greater than a preset difference threshold d. max .

[0029] Optionally, the processing of the discrete time signal sequence to obtain the target data includes:

[0030] In a discrete time signal sequence, the target sequence is formed by obtaining the first L sampling points of the current sampling point k. The target sequence is then windowed using a window function to obtain the windowed signal sequence. The windowed signal sequence is then subjected to a fast Fourier transform to obtain the frequency domain representation of the signal sequence. Based on the frequency domain representation of the signal sequence, the one-sided power spectral density P[f] is calculated according to the following formula and P[f] is used as the target data.

[0031] ;​

[0032] Where f represents frequency, , Indicates the sampling frequency. This represents the frequency domain representation corresponding to sampling point i.

[0033] Optionally, determining the average number of samples N based on the target data includes:

[0034] Calculate the average value of the one-sided power spectral density of all frequencies to obtain the background noise power spectral density. Set the power frequency determination multiple threshold and the target frequency. When the one-sided power spectral density of the target frequency is greater than the product of the background noise power spectral density and the power frequency determination multiple threshold, it indicates that there is strong power frequency interference. Then set the average number of samplings N to a multiple of the integer of the power frequency fundamental period.

[0035] When the one-sided power spectral density of the target frequency is less than or equal to the product of the background noise power spectral density and the power frequency decision multiple threshold, a white noise decision multiple threshold and a preset high-frequency band are set, and the average power of the preset high-frequency band is calculated. When the average power of the preset high-frequency band is greater than the product of the background noise power spectral density and the white noise decision multiple threshold, white noise is characterized as the dominant noise, the quality assessment parameter Q is calculated, and the average number of samplings N is determined based on the quality assessment parameter Q.

[0036] When the average power in the preset high-frequency band is less than or equal to the product of the background noise power spectral density and the white noise discrimination multiple threshold, the average number of samplings N is set to a preset minimum value N. min .

[0037] Optionally, the method for processing the discrete time signal sequence to obtain the target data is as follows:

[0038] Based on discrete time signal sequences, the instantaneous rate of change r and multiple difference sequences are calculated to form the target data;

[0039] Then, based on the target data, the average number of samples N is determined as follows:

[0040] When the absolute value of the instantaneous rate of change r is greater than or equal to the detection threshold r of the change front. max If any difference sequence satisfies a preset condition, the average number of samples N is set to a preset minimum value N. min ;

[0041] When the absolute value of the instantaneous rate of change r is less than the detection threshold r of the change front. max When all differential sequences do not meet the preset conditions, the background noise power spectral density is calculated. Then, when the one-sided power spectral density of the target frequency is greater than the product of the background noise power spectral density and the power frequency determination multiple threshold, the average number of sampling N is set to a multiple of the power frequency fundamental period.

[0042] When the one-sided power spectral density of the target frequency is less than or equal to the product of the background noise power spectral density and the power frequency decision multiple threshold, a white noise decision multiple threshold and a preset high-frequency band are set, and the average power of the preset high-frequency band is calculated. When the average power of the preset high-frequency band is greater than the product of the background noise power spectral density and the white noise decision multiple threshold, white noise is characterized as the dominant noise, the quality assessment parameter Q is calculated, and the average number of samplings N is determined based on the quality assessment parameter Q.

[0043] When the average power in the preset high-frequency band is less than or equal to the product of the background noise power spectral density and the white noise discrimination multiple threshold, the average number of samplings N is set to a preset minimum value N. min .

[0044] An adaptive signal processing system for a semiconductor gas sensor, used to implement the aforementioned adaptive signal processing method for a semiconductor gas sensor, includes a signal acquisition module, a multi-dimensional signal analysis module, an intelligent decision-making module, and a configurable signal processing module;

[0045] The signal acquisition module is used to acquire the electrical signal output by the gas sensor in real time, obtain a discrete time signal sequence, and transmit the discrete time signal sequence to the multi-dimensional signal analysis module.

[0046] The multi-dimensional signal analysis module is used to receive discrete time signal sequences, process the discrete time signal sequences to obtain target data, and transmit the target data to the intelligent decision-making module.

[0047] The intelligent decision-making module is used to receive target data, determine the average number of samplings N based on the target data, and transmit it to the configurable signal processing module.

[0048] The configurable signal processing module is used to receive the average number of samplings N, acquire N new electrical signals in real time, and calculate the average value of the N electrical signals as the effective signal value.

[0049] The beneficial effects of adopting the above technical solution are as follows:

[0050] 1. Intelligence and Adaptability: It achieves a leap from "fixed filtering" to "intelligent adaptive filtering". The system can automatically sense the state of the signal (stable, drastic change, or subject to specific noise interference) and adjust to the optimal processing strategy without delay, without any manual intervention, greatly improving the convenience and reliability of use.

[0051] 2. Performance Optimization: This fundamentally resolves the conflict between signal-to-noise ratio and response speed. During periods of stable gas concentration, deep averaging achieves extremely high signal-to-noise ratio and measurement accuracy; during periods of rapid concentration change, a quick switch to shallow averaging mode ensures capture of the rapid response front, significantly improving dynamic detection performance.

[0052] 3. Strong environmental robustness: By introducing a multimodal noise identification and collaborative adjustment mechanism, this invention can effectively cope with complex on-site noise environments. Whether suppressing white noise or eliminating power frequency interference, the system can automatically select the most effective countermeasure, demonstrating extremely strong environmental adaptability and robustness.

[0053] 4. High resource efficiency: The algorithms used in this invention (such as volatility calculation and change point detection) have low computational load and high efficiency, making them very suitable for implementation on low-cost, low-power microcontrollers, providing a feasible solution for resource-constrained scenarios such as IoT sensor nodes.

[0054] 5. Proactive Response Capability: Through mechanisms such as trend start point detection, the system has the ability to react quickly in the early stages of signal changes, further shortening the effective response time, which is of vital importance for safety early warning applications.

[0055] In summary, this invention not only proposes a novel signal processing approach, but also achieves efficient engineering applications through specific technical means, providing an effective, reliable, and practical solution for improving the overall performance of resistive semiconductor gas sensors. Attached Figure Description

[0056] Figure 1 This is a schematic flowchart of an adaptive signal processing method for a semiconductor gas sensor according to an embodiment of the present invention;

[0057] Figure 2 This is a flowchart illustrating another adaptive signal processing method for a semiconductor gas sensor according to an embodiment of the present invention.

[0058] Figure 3 This is a schematic diagram of an adaptive signal processing system for a semiconductor gas sensor according to an embodiment of the present invention. Detailed Implementation

[0059] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0060] In view of the problems existing in the prior art, the specific technical problems to be solved in this invention include:

[0061] 1. To resolve the contradiction between high signal-to-noise ratio and fast response speed in fixed parameter filtering methods, and to avoid excessive noise due to insufficient filtering during periods of stable gas concentration, or response delay due to excessive filtering during periods of rapid concentration change.

[0062] 2. To address the problems that existing general-purpose adaptive filtering algorithms are computationally complex, difficult to run in real time on resource-constrained embedded systems, and not optimized for the unique signal characteristics of gas sensors.

[0063] 3. To address the problem that a single filtering strategy cannot always maintain optimal performance in complex and variable noise environments (such as the coexistence of white noise and power frequency interference).

[0064] 4. Enables rapid capture of the starting point of gas sensor signal change trends, avoids loss of critical initial response information, and improves the early warning capability for sudden gas leak events.

[0065] Based on this, the present invention provides an adaptive signal processing method for semiconductor gas sensors, combined with Figure 1 The microprocessor (MCU) performs the following steps:

[0066] Step 1: Acquire the electrical signal output by the gas sensor in real time to obtain a discrete time signal sequence;

[0067] Step 2: Process the discrete time signal sequence to obtain target data, which includes instantaneous rate of change, multiple difference sequences, one-sided power spectral density, or instantaneous rate of change and multiple difference sequences; determine the average number of samplings N based on the target data;

[0068] In the first implementation, when the rate of change of the signal is significantly higher than the steady-state noise level, the trend of change is judged in advance, and a fast response strategy is adopted first, prior to the judgment result of the Q value calculation window.

[0069] Specifically, discrete time signal sequences are processed to obtain target data, including:

[0070] The instantaneous rate of change r is calculated based on the discrete time signal sequence according to the following formula, and r is used as the target data;

[0071] ;

[0072] Where x[k] represents the electrical signal of the current sampling point k acquired in real time, x[k-1] represents the electrical signal of the previous sampling point k-1, and ΔT is the sampling interval;

[0073] Set a threshold r for detecting the change front maxThe principle for setting this threshold is that it should be significantly greater than the typical rate of change caused by noise fluctuations in the sensor under steady-state conditions. For example, this threshold can be set to 3 to 5 times the standard deviation of steady-state noise (in differential form).

[0074] Based on this, and according to the target data, the average number of samplings N is determined, including:

[0075] When the absolute value of the instantaneous rate of change r is greater than or equal to the threshold r for detecting the frontier of change. max When this is the case, the average number of samples N is set to a preset minimum value N. min ;

[0076] This invention introduces a change front detection threshold r max Rapid judgment enables a more sensitive response to sudden changes in gas concentration. Since the calculation of the instantaneous rate of change *r* relies only on two adjacent sampling points, its response speed is much faster than that of the *Q* value, which requires a certain data window (such as 10 or 100 points) to calculate the result. This effectively solves the problem of response front capture lag that may be caused by the delay in *Q* value calculation, and is particularly beneficial for rapid early warning of sudden gas leaks.

[0077] When the absolute value of the instantaneous rate of change r is less than the threshold r for detecting the frontier of change max At that time, calculate the quality assessment parameter Q, and determine the average number of samples N based on the quality assessment parameter Q, specifically including:

[0078] Set a preset long window and a short window. The length of the short window is denoted as L_short, for example, corresponding to the most recent 10 sampling points, i.e., 100 milliseconds of data. The length of the long window is denoted as L_long, for example, corresponding to the most recent 100 sampling points (i.e., 1 second of data), and L_long > L_short.

[0079] The long-term and short-term windows slide on the discrete time signal sequence. The variance of the electrical signal within the short-term window is calculated to obtain the short-term fluctuation feature Var_short. The variance of the electrical signal within the long-term window is calculated to obtain the long-term fluctuation feature Var_long. The ratio of the short-term fluctuation feature to the long-term fluctuation feature is calculated to obtain the quality assessment parameter Q, which can be expressed as: Q=Var_short / Var_long.

[0080] The theoretical significance of the quality assessment parameter Q lies in its ability to distinguish states:

[0081] 1. When the signal is in a stable period, both short-term and long-term fluctuations mainly come from random noise, and their intensity is similar. Therefore, the Q value fluctuates around the value of 1.

[0082] 2. When a signal begins to change drastically (such as a gas leak), the short-term window quickly captures this change, causing a significant increase in Var_short. The long-term window, however, contains a large amount of stationary data before the change, resulting in a relatively lagging and gradual change in its variance, Var_long. Therefore, the Q value will be significantly greater than 1.

[0083] Based on this, the number of sampling points N for subsequent averaging is dynamically adjusted according to the calculated Q value. To achieve a smooth transition, a lower limit threshold Q is set. low and upper limit threshold Q high Lower limit threshold Q low and upper limit threshold Q high The threshold value should be set based on the statistical characteristics of the Q value calculated after the sensor collects data in a stable environment (such as clean air). Preferably, the lower limit threshold Q... low The Q-value sequence can be statistically determined based on the data collected by the sensor under stable conditions. Specifically, Q... low The threshold is set to the 95th percentile of the sequence, ensuring that 95% of the Q values ​​are below this threshold during the stationary period, thus achieving a good balance between avoiding misjudgments and ensuring sensitivity. high Then a value significantly greater than 1 can be set according to the system's sensitivity requirements to "drastic changes".

[0084] When Q ≤ Q low At this point, it is determined that the current period is stable. The main aspect of the signal-to-noise ratio conflict at this time is noise suppression; therefore, the average number of samples N is set to the preset maximum value N. max (e.g., 20), perform depth averaging to maximize the signal-to-noise ratio.

[0085] When Q ≥ Q high At this point, it is determined that we are currently in a period of rapid change. The primary challenge at this time is maintaining response speed; therefore, the average number of samples N is set to a preset minimum value N. min (For example, 2) to respond to signal changes as quickly as possible.

[0086] When Q low Q high When the threshold value of N changes drastically at the specified point, it is determined that the current period is in transition. To avoid discontinuous output signal due to a jump in the value of N at the threshold point, a linear interpolation method is used to calculate the average number of samples N, specifically through the following formula:

[0087] .

[0088] ​This invention uses a design quality assessment parameter Q to dynamically adjust the depth of signal averaging, thereby achieving an adaptive balance between noise suppression and response speed. This enables intelligent judgment of signal state and dynamic optimization of filtering strategies based on this judgment. The method has a clear principle, low computational complexity, and is well-suited for implementation in embedded systems, effectively improving the overall performance of gas sensors in dynamic environments.

[0089] In the second implementation, a fast response is triggered by detecting the starting point of a continuous and consistent signal change trend, thereby achieving extremely strong resistance to transient interference with an acceptable small delay.

[0090] Specifically, discrete time signal sequences are processed to obtain target data, including:

[0091] The first-order difference between two adjacent sampling points in a discrete-time signal sequence is calculated using the following formula:

[0092] d[i] = x[i] - x[i-1];

[0093] Where i is a sampling point in a discrete time signal sequence, d[i] represents the first-order difference value corresponding to sampling point i, x[i] represents the electrical signal of sampling point i, and x[i-1] represents the electrical signal of sampling point i-1.

[0094] According to a preset number of first-order difference values, all first-order difference values ​​are divided to obtain multiple difference sequences, and the multiple difference sequences are used as target data.

[0095] Based on this, and according to the target data, the average number of samplings N is determined, including:

[0096] When any difference sequence meets the preset condition, the signal is determined to have entered a reliable upward or downward trend, and the average number of samples N is set to the preset minimum value N. min When none of the differential sequences meet the preset conditions, calculate the quality assessment parameter Q, and determine the average number of samplings N based on the quality assessment parameter Q. The specific calculation method is the same as above.

[0097] The preset conditions are that all first-order difference values ​​in the difference sequence are either positive or all are negative, and the absolute value of each first-order difference value in the difference sequence is greater than a preset difference threshold d. max The preset differential threshold is set to be slightly higher than the typical fluctuation range of the differential value under stable noise background. The preset condition is the key to ensuring that what is detected is not random noise interference.

[0098] Compared to the first implementation, its core advantage lies in its superior noise immunity. Because it requires the changes in multiple consecutive sampling points to be consistent and significant, single or instantaneous noise spikes cannot meet the triggering conditions and are thus effectively filtered out, greatly reducing the probability of false triggering. Although this method introduces a slight delay, this is acceptable for gas sensor signals that respond in seconds or minutes, and in return, it provides a high degree of confirmation of the true trend. Furthermore, the two methods can be used in combination. For example, the first implementation can be used as a highly sensitive primary warning, while this implementation serves as a confirmation mechanism. The final action is then executed only when both are triggered sequentially, thus constructing a multi-stage filtering system that combines high sensitivity and high reliability.

[0099] The third implementation aims to enable the system to identify the dominant noise type in the environment and switch to the optimal signal processing mode accordingly, thereby achieving intelligent global optimization in complex noise environments.

[0100] Specifically, discrete time signal sequences are processed (e.g., by applying the Hanning window) to suppress spectral leakage, thereby improving the accuracy of subsequent frequency domain analysis and obtaining the target data, including:

[0101] In a discrete time signal sequence, the target sequence is formed by obtaining the first L sampling points of the current sampling point k. The target sequence is then windowed using a window function to obtain the windowed signal sequence. The windowed signal sequence is then subjected to a fast Fourier transform to obtain the frequency domain representation of the signal sequence. Based on the frequency domain representation of the signal sequence, the one-sided power spectral density P[f] is calculated according to the following formula and P[f] is used as the target data.

[0102] ;

[0103] Where f represents frequency, , Indicates the sampling frequency. This represents the frequency domain representation corresponding to sampling point i;

[0104] Based on this, and according to the target data, the average number of samplings N is determined, including:

[0105] The average one-sided power spectral density of all frequencies is calculated to obtain the background noise power spectral density. A power frequency judgment multiple threshold and a target frequency are set. The target frequency includes the fundamental frequency of 50Hz or 60Hz and its main harmonic frequencies (such as the 2nd, 3rd, and 5th harmonics). This invention checks for the presence of peak values ​​at the target frequency. The principle is that, due to the influence of power electronic equipment and other factors, the waveform of power frequency interference in actual power grids is not an ideal sine wave, but contains rich harmonic components. Detecting only the fundamental frequency is insufficient to fully characterize the intensity of power frequency interference; therefore, it is necessary to simultaneously detect its main harmonic components to ensure the comprehensiveness and accuracy of the identification.

[0106] Specifically, when the one-sided power spectral density of the target frequency is greater than the product of the background noise power spectral density and the power frequency determination multiple threshold, it indicates the presence of strong power frequency interference. In this case, the average sampling number N is set to an integer multiple of the power frequency fundamental period. This setting ensures that the averaging time window is an integer multiple of the power frequency fundamental period, so that the power frequency interference noise cancels each other out due to phase coherence during the averaging process, thereby achieving the best suppression effect.

[0107] When the one-sided power spectral density of the target frequency is less than or equal to the product of the background noise power spectral density and the power frequency decision multiple threshold T_powerline (e.g., T_powerline=10), set the white noise decision multiple threshold T_white (e.g., T_white=3) and a preset high-frequency band (e.g., above 100Hz), calculate the average power of the preset high-frequency band, and when the average power of the preset high-frequency band is greater than the product of the background noise power spectral density and the white noise decision multiple threshold, characterize white noise as the dominant noise, calculate the quality assessment parameter Q, and determine the average number of samplings N based on the quality assessment parameter Q. The specific calculation method is the same as above.

[0108] When the average power in the preset high-frequency band is less than or equal to the product of the background noise power spectral density and the white noise discrimination multiple threshold, the average number of samplings N is set to a preset minimum value N. min .

[0109] By identifying noise modes and switching processing modes, the system upgrades from "single-strategy adaptive" to "multi-strategy collaborative optimization," enabling it to take the most effective countermeasures against the most destructive noise types and achieve intelligent maximization of performance in complex electromagnetic environments.

[0110] In the fourth implementation, the above three implementation methods are judged in sequence to determine the specific value of the average number of samples N.

[0111] Specifically, discrete time signal sequences are processed to obtain target data, and then combined with... Figure 2 ,include:

[0112] Based on discrete time signal sequences, the instantaneous rate of change r and multiple difference sequences are calculated to form the target data;

[0113] Then, based on the target data, the average number of samples N is determined as follows:

[0114] When the absolute value of the instantaneous rate of change r is greater than or equal to the detection threshold r of the change front. max If any difference sequence satisfies a preset condition, the average number of samples N is set to a preset minimum value N. min ;

[0115] When the absolute value of the instantaneous rate of change r is less than the detection threshold r of the change front. max When all differential sequences do not meet the preset conditions, the background noise power spectral density is calculated. Then, when the one-sided power spectral density of the target frequency is greater than the product of the background noise power spectral density and the power frequency determination multiple threshold, the average number of sampling N is set to a multiple of the power frequency fundamental period.

[0116] When the one-sided power spectral density of the target frequency is less than or equal to the product of the background noise power spectral density and the power frequency decision multiple threshold, a white noise decision multiple threshold and a preset high-frequency band are set, and the average power of the preset high-frequency band is calculated. When the average power of the preset high-frequency band is greater than the product of the background noise power spectral density and the white noise decision multiple threshold, white noise is characterized as the dominant noise, the quality assessment parameter Q is calculated, and the average number of samplings N is determined based on the quality assessment parameter Q.

[0117] When the average power in the preset high-frequency band is less than or equal to the product of the background noise power spectral density and the white noise discrimination multiple threshold, the average number of samplings N is set to a preset minimum value N. min .

[0118] Step 3: In the next sampling cycle, acquire N new electrical signals in real time, and use the average value of the N electrical signals as the effective signal value. The effective signal value is used to detect the gas concentration and gas type.

[0119] This invention also provides an adaptive signal processing system for a semiconductor gas sensor, used to implement an adaptive signal processing method for a semiconductor gas sensor, combined with... Figure 3 It includes a signal acquisition module, a multi-dimensional signal analysis module, an intelligent decision-making module, and a configurable signal processing module;

[0120] The signal acquisition module (usually implemented by the ADC inside the MCU) is used to acquire the electrical signal output by the gas sensor in real time at a fixed frequency (e.g., 100Hz) to obtain a discrete time signal sequence, and then transmit the discrete time signal sequence to the multi-dimensional signal analysis module.

[0121] The multi-dimensional signal analysis module is used to receive discrete time signal sequences, process the discrete time signal sequences to obtain target data, and transmit the target data to the intelligent decision-making module.

[0122] The multi-dimensional signal analysis module includes a quality analysis submodule, a rate of change calculation submodule, a trend detection submodule, and a noise identification submodule. The quality analysis submodule is used to calculate the quality assessment parameter Q, the rate of change calculation submodule is used to calculate the instantaneous rate of change r, the trend detection submodule is used to calculate the difference sequence, and the noise identification submodule is used to calculate the one-sided power spectral density and the average power of the preset high-frequency band.

[0123] The intelligent decision-making module is used to receive target data, determine the average number of samplings N based on the target data, and transmit it to the configurable signal processing module.

[0124] The configurable signal processing module (controllable point averager) is used to receive the average sampling number N, acquire N new electrical signals in real time, and calculate the average value of the N electrical signals as the effective signal value.

[0125] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. An adaptive signal processing method for a semiconductor gas sensor, characterized in that, include: The electrical signals output by the gas sensor are acquired in real time to obtain discrete time signal sequences; The discrete time signal sequence is processed to obtain the target data; Based on the target data, determine the average number of samples N; In the next sampling period, N new electrical signals are acquired in real time, and the average value of the N electrical signals is taken as the effective signal value. The process involves processing discrete time signal sequences to obtain target data, including: The instantaneous rate of change r is calculated based on the discrete time signal sequence according to the following formula, and r is used as the target data; ; Where x[k] represents the electrical signal of the current sampling point k acquired in real time, x[k-1] represents the electrical signal of the previous sampling point k-1, and ΔT is the sampling interval; The step of determining the average number of samplings N based on the target data includes: When the absolute value of the instantaneous rate of change r is greater than or equal to the threshold r for detecting the frontier of change. max When this is the case, the average number of samples N is set to a preset minimum value N. min ; When the absolute value of the instantaneous rate of change r is less than the threshold r for detecting the frontier of change max At that time, calculate the quality assessment parameter Q, and determine the average number of samples N based on Q; The calculation of the quality assessment parameter Q, and the determination of the average number of samples N based on Q, includes: Set a long-term window and a short-term window of preset length. The long-term window and the short-term window slide on the discrete time signal sequence. Calculate the variance of the electrical signal in the short-term window to obtain the short-term fluctuation characteristics. Calculate the variance of the electrical signal in the long-term window to obtain the long-term fluctuation characteristics. Calculate the ratio of the short-term fluctuation characteristics to the long-term fluctuation characteristics to obtain the quality assessment parameter Q. Set the lower limit threshold Q low and upper limit threshold Q high When Q ≤ Q low When this is the case, the average number of samples N is set to the preset maximum value N. max When Q ≥ Q high When this is the case, the average number of samples N is set to a preset minimum value N. min When Q low Q high When the average number of samples N is calculated, a linear interpolation method is used.​ 2. The adaptive signal processing method for a semiconductor gas sensor according to claim 1, characterized in that, The process of processing discrete time signal sequences to obtain target data includes: The first-order difference between two adjacent sampling points in a discrete-time signal sequence is calculated using the following formula: d[i] = x[i] - x[i-1]; Where i is a sampling point in a discrete time signal sequence, d[i] represents the first-order difference value corresponding to sampling point i, x[i] represents the electrical signal of sampling point i, and x[i-1] represents the electrical signal of sampling point i-1. According to a preset number of first-order difference values, all first-order difference values ​​are divided to obtain multiple difference sequences, and the multiple difference sequences are used as target data.

3. The adaptive signal processing method for a semiconductor gas sensor according to claim 2, characterized in that, The step of determining the average number of samplings N based on the target data includes: When any difference sequence satisfies a preset condition, the average number of samples N is set to a preset minimum value N. min When none of the differential sequences meet the preset conditions, calculate the quality assessment parameter Q and determine the average number of samplings N based on Q; The preset conditions are that all first-order difference values ​​in the difference sequence are either positive or all are negative, and the absolute value of each first-order difference value in the difference sequence is greater than a preset difference threshold d. max .

4. The adaptive signal processing method for a semiconductor gas sensor according to claim 1, characterized in that, The process of processing discrete time signal sequences to obtain target data includes: In a discrete time signal sequence, the target sequence is formed by obtaining the first L sampling points of the current sampling point k. The target sequence is then windowed using a window function to obtain the windowed signal sequence. The windowed signal sequence is then subjected to a fast Fourier transform to obtain the frequency domain representation of the signal sequence. Based on the frequency domain representation of the signal sequence, the one-sided power spectral density P[f] is calculated according to the following formula and P[f] is used as the target data. ; Where f represents frequency, , Indicates the sampling frequency. This represents the frequency domain representation corresponding to sampling point i.

5. The adaptive signal processing method for a semiconductor gas sensor according to claim 4, characterized in that, The step of determining the average number of samplings N based on the target data includes: Calculate the average value of the one-sided power spectral density of all frequencies to obtain the background noise power spectral density. Set the power frequency determination multiple threshold and the target frequency. When the one-sided power spectral density of the target frequency is greater than the product of the background noise power spectral density and the power frequency determination multiple threshold, it indicates that there is strong power frequency interference. Then set the average number of samplings N to a multiple of the integer of the power frequency fundamental period. When the one-sided power spectral density of the target frequency is less than or equal to the product of the background noise power spectral density and the power frequency decision multiple threshold, a white noise decision multiple threshold and a preset high-frequency band are set, and the average power of the preset high-frequency band is calculated. When the average power of the preset high-frequency band is greater than the product of the background noise power spectral density and the white noise decision multiple threshold, white noise is characterized as the dominant noise, the quality assessment parameter Q is calculated, and the average number of samplings N is determined based on the quality assessment parameter Q. When the average power in the preset high-frequency band is less than or equal to the product of the background noise power spectral density and the white noise discrimination multiple threshold, the average number of samplings N is set to a preset minimum value N. min .

6. The adaptive signal processing method for a semiconductor gas sensor according to claim 1, characterized in that, The process of processing discrete time signal sequences to obtain target data includes: Based on discrete time signal sequences, the instantaneous rate of change r and multiple difference sequences are calculated to form the target data; Then, based on the target data, the average number of samples N is determined as follows: When the absolute value of the instantaneous rate of change r is greater than or equal to the detection threshold r of the change front. max If any difference sequence satisfies a preset condition, the average number of samples N is set to a preset minimum value N. min ; When the absolute value of the instantaneous rate of change r is less than the detection threshold r of the change front. max When all differential sequences do not meet the preset conditions, the background noise power spectral density is calculated. Then, when the one-sided power spectral density of the target frequency is greater than the product of the background noise power spectral density and the power frequency determination multiple threshold, the average number of sampling N is set to a multiple of the power frequency fundamental period. When the one-sided power spectral density of the target frequency is less than or equal to the product of the background noise power spectral density and the power frequency decision multiple threshold, a white noise decision multiple threshold and a preset high-frequency band are set, and the average power of the preset high-frequency band is calculated. When the average power of the preset high-frequency band is greater than the product of the background noise power spectral density and the white noise decision multiple threshold, white noise is characterized as the dominant noise, the quality assessment parameter Q is calculated, and the average number of samplings N is determined based on the quality assessment parameter Q. When the average power in the preset high-frequency band is less than or equal to the product of the background noise power spectral density and the white noise discrimination multiple threshold, the average number of samplings N is set to a preset minimum value N. min .

7. An adaptive signal processing system for a semiconductor gas sensor, used to implement the adaptive signal processing method for a semiconductor gas sensor as described in claim 1, characterized in that, It includes a signal acquisition module, a multi-dimensional signal analysis module, an intelligent decision-making module, and a configurable signal processing module; The signal acquisition module is used to acquire the electrical signal output by the gas sensor in real time, obtain a discrete time signal sequence, and transmit the discrete time signal sequence to the multi-dimensional signal analysis module. The multi-dimensional signal analysis module is used to receive discrete time signal sequences, process the discrete time signal sequences to obtain target data, and transmit the target data to the intelligent decision-making module. The intelligent decision-making module is used to receive target data, determine the average number of samplings N based on the target data, and transmit it to the configurable signal processing module. The configurable signal processing module is used to receive the average number of samplings N, acquire N new electrical signals in real time, and calculate the average value of the N electrical signals as the effective signal value.