Indicating value processing method of gas sensor and related equipment

By using a gas sensor reading processing method based on logistic curve characteristics, and employing first-order difference maxima judgment and weighted summation, the stable value of the sensor is predicted. This solves the problem of slow response time in gas sensors, achieving faster response time and higher data analysis accuracy.

CN121856479APending Publication Date: 2026-04-14HENAN RELATIONS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

If the gas sensor has a slow response time, the output data will be delayed and unable to reflect changes in gas concentration in a timely manner, affecting real-time data analysis and judgment, and may even lead to safety hazards.

Method used

A gas sensor indication processing method is adopted, based on the logistic curve characteristics. By recording the sensor response data in real time, the stable value of the sensor is predicted by using the first-order difference maxima judgment and weighted summation, thereby shortening the response time.

Benefits of technology

It reduces the response time of gas sensors by at least half, improving the efficiency and accuracy of real-time data analysis and judgment, and is applicable to industrial safety production, environmental monitoring and smart home fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121856479A_ABST
    Figure CN121856479A_ABST
Patent Text Reader

Abstract

The invention relates to an indicating value processing method of a gas sensor and related equipment, and the method comprises the following steps: placing the gas sensor of which the response characteristic accords with the logistic curve characteristic in a detection state, and collecting the response data of the sensor according to a certain frequency; after it is judged that the real-time response data of the sensor enters a climbing stage during real-time collection, the indicating value ydisp of the sensor is made to be equal to an estimated stable value yp, namely the two-time real-time response value y, and meanwhile maximum judgment of the difference value of the real-time response data is continuously conducted till the difference maximum value appears; recording and storing a sensor real-time response value ym corresponding to the difference maximum value and a corresponding estimated stable value yps; after the difference maximum value appears, the indicating value ydisp is obtained by weighted addition of the estimated stable value yp and the real-time response value y until the real-time response data of the sensor is in a stable state; and after the real-time response data of the sensor is in a stable state, the indicating value ydispp is equal to the real-time response value y.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, specifically relating to a method for processing the readings of a gas sensor and related equipment. Background Technology

[0002] Gas sensors are widely used in many fields such as industrial production, environmental monitoring, and indoor air quality testing to obtain real-time gas concentration information. However, some gas sensors have a slow response time, which causes a lag in the sensor output data. This makes it impossible to reflect the real changes in gas concentration in a timely manner, which greatly hinders real-time data analysis and judgment, affects the timeliness and accuracy of the monitoring system, and may even lead to the failure to detect safety hazards in a timely manner.

[0003] The response time of a gas sensor refers to the time required from the moment it comes into contact with the target gas until the output signal reaches a certain percentage of its stable value (usually 90% of the final value, i.e., T90). The shorter the response time, the stronger the sensor's ability to track changes in gas concentration, and the more suitable it is for real-time monitoring or emergency early warning scenarios (such as hydrogen leak detection). The most commonly used method for measuring response time is the step response method. The sensor is placed in clean air (initial state), and the target gas (constant concentration) is suddenly introduced. The data acquisition system records the curve of the output signal changing over time, and the time required for the signal to rise from the initial value to 90% of the final stable value (T90) is calculated.

[0004] When the response characteristics of a gas sensor's output signal conform to the logistic curve, the response time corresponds to the time required for the signal to slowly increase from the moment the sensor comes into contact with the gas until it stabilizes at 90% of its maximum value (saturation value). This process involves a rapid response period (the accelerated growth phase of the logistic curve), a saturation transition period (the decelerated growth phase of the logistic curve), and finally, the signal stabilizes at the maximum value of the logistic curve. Since the slow signal growth is very brief (gas flow is very short), the last three segments, i.e., 90% of the entire step response phase, can be considered the response time. If the stable signal value can be predicted before the signal stabilizes, the response time of the gas sensor can be shortened. Summary of the Invention

[0005] To overcome the problem of slow response time in gas sensors, this invention provides a method for processing the indication of a gas sensor and related equipment.

[0006] The technical solution adopted in this invention is as follows:

[0007] A method for processing the readings of a gas sensor includes the following steps:

[0008] S1: Place the gas sensor whose response characteristics conform to the logistic curve into the detection state, introduce a certain concentration of sensing gas into the gas sensor, and record and save the response data of the gas sensor and the corresponding time t in real time at a certain frequency.

[0009] S2: During real-time data acquisition, after determining that the sensor's real-time response data has entered the climbing phase, set the sensor's reading y... disp Equal to the estimated stable value y p That is, twice the real-time response value y, while continuously judging the maximum value of the difference value of the real-time response data until the maximum value of the difference appears;

[0010] S3: After the differential maximum occurs, record and save the real-time sensor response value y corresponding to the differential maximum. m and the corresponding estimated stable value y ps =2y m ;

[0011] S4: After the maximum difference value appears, the indicated value y disp From the predicted stable value y ps The estimated stable value y is obtained by weighted summation of the real-time response value y. ps The formulas for the proportion α and the weighting coefficient α are as follows:

[0012]

[0013] Simultaneously, the stability of the real-time response data is assessed until the sensor's real-time response data reaches a stable state.

[0014] S5: After the sensor's real-time response data reaches a steady state, the indicated value y disp = Real-time response value y.

[0015] Furthermore, for gas sensors in S1 whose response characteristics conform to the logistic curve characteristics, the determination method is as follows:

[0016] S11: Place the sensor in the detection state. Within the sensor's range, for the sensor's response to different concentrations of the sensed gas, obtain the gas response value of the sensor as a function of time and the corresponding time t, as sample data.

[0017] S12: Perform logistic curve fitting based on the sample data;

[0018] S13: If the logistic curve fitting degree of the sample data meets the requirements, then the response characteristics of the gas sensor are considered to conform to the logistic curve characteristics.

[0019] Furthermore, a method for determining whether the sensor's real-time response data has entered the climbing phase.

[0020] In real-time data acquisition, a sliding window is used to capture the sensor's response data. As the sliding window moves, if the real-time response data of the gas sensor in the current window is in a stable state and the real-time response data begins to increase over time, it is determined that the sensor's real-time response data has entered the climbing phase.

[0021] Furthermore, the method for determining whether the sensor response data is in a steady state includes:

[0022] A sliding window is used to extract sensor response data. As the sliding window moves, the standard deviation of the sensor response data within the current window is continuously calculated and obtained.

[0023] If the standard deviation of the current window is less than or equal to the measurement error range, then the response data of the gas sensor within the current window is determined to be in a steady state.

[0024] Furthermore, the method for determining whether the sensor response data is in a steady state can also be achieved through the following methods:

[0025] S221: After the sensor is purged with zero-point standard gas and the response value stabilizes, multiple stable values ​​and corresponding times that change over time are obtained;

[0026] S222: Calculate the standard deviation of the stable value, and take 1 to 2 times the standard deviation of the stable value as the threshold S for judging the steady state of the sensor. air ;

[0027] S223: Use a sliding window to extract the sensor's response data, and calculate the standard deviation of the response data in the current window as the sliding window moves.

[0028] S224: If the standard deviation of the response data within the current window is less than or equal to the steady-state threshold S air If the gas sensor response data within the current window is in a stable state, then it is determined that the gas sensor response data is in a stable state.

[0029] Furthermore, the method for determining that the real-time response data of the sensor shows an increasing trend over time includes:

[0030] A sliding window is used to extract data from the sensor's response data.

[0031] Within the current sliding window, calculate and obtain the first-order difference value Δy of the sensor's real-time response data. t ,

[0032] Δy t =y t -y t-1 ,

[0033] and the first-order difference Δyt Let Np be the number of positive values.

[0034] If the number of positive difference values ​​Np is much greater than 50% of the number of first-order difference data (N-1), then it is determined that the real-time response data of the sensor in the current window shows an increasing trend over time, and the data is in the initial climbing stage, where N is the number of response data captured by the sliding window.

[0035] Prior to this, if the number of positive difference values ​​Np in the current sliding window is at least greater than 80% of the number of first-order difference data (N-1), then it is determined that the real-time response data of the sensor in the current window shows an increasing trend over time.

[0036] The gas sensor may be a palladium alloy sensor, a metal oxide semiconductor (MOS) sensor, an electrochemical sensor, or a humidity sensor.

[0037] Based on the same inventive concept, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.

[0038] Based on the same inventive concept, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the method described above.

[0039] As can be seen from the above, the gas sensor indication processing method and related equipment provided in this application, based on the logistic curve characteristics of the sensor response data, predicts the numerical or stable value that the sensor can reach in segments, and then processes the real-time response value of the sensor in segments to obtain the sensor indication value. This application is simple to operate and has the advantages of low cost and automation.

[0040] This invention relates to a gas sensor reading processing method based on logistic curves. By predicting the stable value to be reached by the sensor in advance, effective detection information can be obtained before the sensor actually stabilizes, which can shorten the sensor's response time. In particular, before the first-order difference maximum appears during the data climb phase, the response time can be shortened by at least half, thereby improving the efficiency and accuracy of real-time data analysis and judgment.

[0041] In the field of industrial safety production, it can promptly detect dangerous situations such as gas leaks and prevent accidents; in the field of environmental monitoring, it can more timely and accurately reflect changes in air quality, providing strong support for environmental governance; in the field of smart homes, it can quickly respond to changes in indoor air quality and ensure residents' healthy lives. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 Flowchart of the method according to an embodiment of the present invention;

[0044] Figure 2 This is one of the methods for determining whether the real-time response data of the sensor is in a stable state in this invention;

[0045] Figure 3 The data represents the sensor's response to a certain concentration of the sensed gas in this embodiment of the invention (the vertical axis represents the real-time gas response concentration value, and the horizontal axis represents time t).

[0046] Figure 4 According to Figure 3 The logistic curve (red) fitted to the sample data (black) is shown in the upper left corner, with the fitting parameters in the upper left corner.

[0047] Figure 5 A simple logistic function graph (x-axis, y-axis);

[0048] Figure 6 This is a graph showing the distribution of the first derivative of a simple logistic function (x-axis, y-axis). Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0050] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. For ease of understanding, a commonly used gas sensor for measuring gas concentration will be used as an example for explanation.

[0051] The present invention is applicable only if the output signal response characteristics of the sensor conform to the logistic curve characteristics.

[0052] By randomly selecting a batch of similar sensors and examining whether the signal output response characteristics of the sampled sensors conform to the logistic curve, it can be determined whether the signal response characteristics of this type of sensor meet the aforementioned prerequisites. Of course, other methods can also be used for confirmation, such as the manufacturer's test reports and publicly published literature.

[0053] This invention discloses a method for determining whether the signal output response characteristics of a sensor in a sample conform to the characteristics of a logistic curve, comprising the following steps:

[0054] S11: Place the sample sensor in the detection state. Within the sensor's range, acquire the gas response data of the sensor over time and the corresponding time t for the sensor's response to different concentrations of the sensed gas, as sample data.

[0055] When collecting sample data, try to collect the response signal of the gas sensor for a long time and at a high frequency.

[0056] During the data acquisition process, the gas response data of the sensor response signal changing with time and the corresponding time t are accurately recorded. At the same time, the environmental parameters (temperature, humidity, etc.) during the acquisition are also recorded, providing a rich and accurate data foundation for subsequent sample data fitting.

[0057] There are no restrictions on the method of collecting sample data; data from sensors can be recorded using computer software or by other means such as manual recording.

[0058] The sensor's response to different concentrations of the sensed gas is described as follows: If the sample gas sensor can detect hydrogen, then different concentrations of hydrogen within its measurement range are introduced into the sample sensor. Each gas concentration corresponds to a curve showing the sensor's gas response concentration data and time.

[0059] The gas concentration data of the sample sensor changing over time and the corresponding time t, i.e., the collected sample data, are shown below. Figure 3 .

[0060] S12: Based on the sample data, perform logistic curve fitting and adjust the parameters of the logistic curve to achieve the best fitting state.

[0061] The gas response concentration values ​​and corresponding times t collected from the sample sensors were used as sample data for logistic curve fitting. During the fitting process, the curve parameters A, k, and t0 were continuously adjusted (A is the upper limit of the curve, corresponding to the final stable response value of the sensor; k is the growth rate parameter, reflecting the sensor's response speed; t0 is the center position parameter of the curve, representing the key time nodes in the response process) to achieve the best fit.

[0062] Figure 4 The graph shows the sample data after being fitted with a logistic curve, with the red line representing the fitted curve.

[0063] The tool used for curve fitting is not limited; it can be any curve fitting software such as Originpro, Matlab, CurveFitter, or Excel.Figure 4 The fitted curve was generated using the professional data processing software Originpro.

[0064] S13: If the logistic curve fitting degree of the sample data meets the requirements, then the sensor response is considered to conform to the logistic curve characteristics.

[0065] from Figure 4 As can be seen from the upper left corner of the fitted curve (red line) shown, the data has a high degree of fit to the logistic function, with a correlation coefficient of 0.99916, which is a relatively ideal state.

[0066] However, sometimes, even after adjusting the curve parameters A, k, and t0, the correlation coefficient of the logistic curve fitted by the sample data of the sensor's output signal is not very high. In such cases, as long as the fitted correlation coefficient meets the requirements—for example, if the actual error is verified to be within the measurement error range after fitting, or if, after removing some sample data such as early data or special discrete points, the logistic curve fitted by the sample data has a high degree of fit and meets the measurement error of the sample sensor, i.e., meets the requirements—then it can be considered that the response characteristics of the sample sensor conform to the logistic curve characteristics. Furthermore, it can be considered that the response characteristics of this batch or even similar sensors conform to the logistic curve characteristics.

[0067] By fitting the logistic curves of a large number of different gas response data of the sample sensor, it can be seen that the response characteristics of the sensor represented by the sample conform to the logistic curve. Therefore, the characteristics of the logistic curve can be used to predict the stable value, that is, to predict the stable value of gas concentration before the actual response is completed, thereby shortening the response time of the sensor.

[0068] The gas sensor whose output signal response characteristics conform to the logistic curve features is a palladium alloy sensor, or a metal oxide semiconductor (MOS) sensor, or an electrochemical gas sensor, or a humidity sensor.

[0069] The signal output (such as ΔR / R0) of the palladium alloy sensor changes with hydrogen concentration in a highly consistent manner with the logistic curve. The core reason is that the hydrogen absorption process of palladium is limited by both "adsorption kinetics" and "lattice capacity".

[0070] When the hydrogen concentration is below a certain threshold (e.g., <1% Vol.), the amount of hydrogen atoms adsorbed on the palladium surface is extremely small, and the rate of hydrogen diffusion into the crystal lattice is slow. At this point, the palladium crystal structure does not change significantly, the rate of change of resistivity (ΔR / R0) increases gradually, and the signal output does not change significantly with concentration.

[0071] When the hydrogen concentration reaches a threshold (e.g., 1%-4% Vol., depending on the palladium alloy composition), the amount of hydrogen atoms adsorbed on the palladium surface increases dramatically, and a large number of hydrogen atoms rapidly diffuse into the crystal lattice, causing the palladium lattice to expand and undergo a phase transition (from the α phase to the β phase). At this point, the electron scattering effect is significantly enhanced, the rate of change of resistivity (ΔR / R0) increases rapidly with increasing concentration, and the signal output enters a steep growth phase.

[0072] When the hydrogen concentration approaches the hydrogen absorption saturation limit of palladium (e.g., >4% Vol.), the maximum hydride composition of palladium is PdH. 0. At point 7), the palladium lattice is fully occupied by hydrogen atoms, leaving very few remaining adsorption sites. At this point, even if the hydrogen concentration continues to increase, the adsorption and diffusion of hydrogen atoms tend to stagnate, and the rate of change of resistance (ΔR / R0) slows down, eventually stabilizing at its maximum value (saturation value). Therefore, the relationship between the signal output of a palladium alloy hydrogen sensor and the hydrogen concentration often exhibits a logistic curve (S-shaped curve) characteristic.

[0073] Metal-oxide-semiconductor (MOS) sensors, typically TiO2, SnO2, and ZnO-based sensors. Taking TiO2 as an example, when H2 is adsorbed, oxygen ions (O2)... - O 2- The H2 reacts with H2 to release electrons, and its conductivity initially increases rapidly with increasing H2 concentration before saturating, conforming to the logistic curve. The adsorption energy of H2 (positively correlated with k) can be calculated through curve fitting, guiding doping modifications (such as adding Pt to increase k and accelerate the response).

[0074] Electrochemical gas sensors utilize the oxidation / reduction reaction of gases (such as CO and O2) on electrode surfaces. The current signal depends on the amount of gas adsorbed. At high concentrations, the adsorption sites are saturated, and the output response signal conforms to a logistic curve. At low concentrations, the current increases slowly with gas concentration; at medium concentrations, it rises rapidly; and at high concentrations, it tends to stabilize due to insufficient adsorption sites, resulting in an S-shaped curve.

[0075] Humidity sensors, specifically those that measure resistance and capacitance, exhibit a signal variation with humidity. This variation is essentially due to the adsorption / desorption of water molecules by the hygroscopic material. However, the material's hygroscopic capacity is limited, leading to signal saturation at high humidity levels. The overall trend is an S-shaped curve: slow change at low humidity → rapid response at medium humidity → stabilization at high humidity. For example, common capacitive humidity sensors work by changing the dielectric constant of a polymer film (such as polyimide) after adsorbing water molecules, resulting in a change in capacitance. Signal characteristics: The capacitance-humidity curve exhibits an S-shape across the entire range, with significant saturation in the high humidity range (>80% RH), consistent with the logistic curve. For instance, a certain capacitive sensor shows a capacitance change rate of <10% from 0%-30% RH, a change rate of 60% from 30%-70% RH, and an increase of <15% from 70%-100% RH, exhibiting a typical S-shape overall.

[0076] As is well known, the logistic curve is characterized by an "S"-shaped trend, initially increasing slowly, then rapidly, and finally stabilizing. Similarly, in the response process of a gas sensor, the sensor's response to gas concentration also involves a slow initial sensing stage, a rapid change in the intermediate stage, and finally reaching a stable response value.

[0077] The logistic curve exhibits an S-shaped growth trend, and its mathematical expression is:

[0078]

[0079] Where f(t) is the sensor signal value at time t;

[0080] A is the saturation value, which is the maximum signal value in the steady state; k is the rate or growth rate parameter;

[0081] t0 is the time corresponding to the midpoint of the curve; e is the base of the natural logarithm.

[0082] The curve is characterized by an initial approximately exponential growth, followed by a slowdown in the growth rate, eventually approaching the upper limit A. The turning point of the growth trend is at t = t0.

[0083] The signal response characteristics of a sensor conforming to the logistic curve can be specifically described in the following four segments.

[0084] Initial slow growth period: The sensor has not yet fully come into contact with the gas, and the signal changes slowly, similar to the initial slow growth period of the logistic curve;

[0085] Rapid response period (rapid growth period): The sensor signal increases exponentially, corresponding to the acceleration phase of the logistic curve;

[0086] Saturation transition period (deceleration growth period): The signal approaches f max When the response rate approaches saturation, the response rate k decreases, but it still increases, corresponding to the deceleration phase of the logistic curve.

[0087] Steady state: The signal is stable at f max This corresponds to the steady state of the logistic curve. During the initial slow growth period, the signal changes slowly, which can also be considered as a steady state.

[0088] The characteristics of each of the above stages can be used Figure 2 It is represented by A. Growth characteristics: It initially grows rapidly, with the fastest growth at A / 2, after which the growth begins to slow down, and stops growing at the value A, or fluctuates around the value A.

[0089] The monotonicity or monotonicity of the logistic curve can be represented by the first derivative of the logistic function.

[0090] Geometrically, the first derivative represents the slope of the tangent line to the function's curve at that point. The first derivative can be used to determine the increasing or decreasing nature of a function: if the first derivative is greater than 0, the function is monotonically increasing in that interval; if the first derivative is equal to 0, the function may have an extremum at that point. If the first derivative is less than 0, the function is monotonically decreasing in that interval.

[0091] By setting 'a' to 1, 'k' to 1, and 't0' to 0 in the logistic function, we obtain the standard logistic function:

[0092]

[0093] Differentiating the standard logistic function, we obtain the following equation:

[0094]

[0095] Simplifying equation (3) yields:

[0096] y'=y×(1-y) (4)

[0097] According to equation (4), the first derivative can be obtained.

[0098] y'∈(0,0.25]

[0099] The first derivative plot of the simple standard logistic function is shown below. Figure 6 ,

[0100] When x = 0 (i.e., y = 0.5), the derivative reaches its maximum value of 0.25, which corresponds to the inflection point of the function.

[0101] As x approaches ±∞, y′ approaches 0, reflecting that the rate of change of the function slows down as it moves away from the center point.

[0102] Analysis of the first derivative of the standard logistic function shows that when the first derivative is at its maximum value of 0.25, the function value of 0.5 is exactly half of the maximum value of 1. This also applies to the conventional logistic function.

[0103] Therefore, after the sensor's real-time response data enters the ramp-up phase, the predicted stable value of the logistic curve is twice the maximum value of the first derivative.

[0104] The first derivative of the logistic function is

[0105] dy=y'×dx (5)

[0106] As can be seen from equation (5), the maximum value of the first derivative corresponds to the maximum value of the first differential. Since the collected gas sensor response data is a set of discrete data, obtaining the differential (i.e., the difference) is very convenient. That is, the maximum value of the first derivative is transformed into obtaining the maximum value of the first difference Δy. t ,

[0107] Δy t =y t -y t-1 (6)

[0108] Therefore, in the real-time collected window data, the maximum value of the concentration difference is continuously determined. When the maximum value of the difference appears, the gas concentration response value at that point (denoted as y) can be determined based on the characteristics of the logistic function. m Twice that of the gas concentration corresponds to the stable value of this gas concentration, and thus the stable value (denoted as y) can be predicted. ps As shown in formula (7), the stable value of the gas concentration response can be predicted at the time point t when the maximum value of the concentration difference occurs, which is earlier than the response time corresponding to the stable value of the gas concentration.

[0109] y ps = 2 y m (7)

[0110] Considering the continuity of the change in the predicted response data concentration, the sensor measurement value can be amplified by two times during the response data ramp-up phase to make an advance prediction of the response data. That is, before the first-order difference maximum appears, the sensor measurement value is calculated according to the following formula (8).

[0111] y disp =y p = 2 y (8)

[0112] Among them, y disp : Measurement reading

[0113] y p : Estimated stable value

[0114] y: Real-time response value or data.

[0115] Therefore, determining the starting point of the sensor's response data ramp-up phase is crucial. Before the sensor comes into contact with the gas being measured, the response signal changes slowly, entering an initial slow growth phase, which can be approximated as a steady state. After the response data begins to ramp up, the difference in the response data shows an increasing trend. At this point, the maximum difference value has not yet appeared, therefore...

[0116] The method for determining the starting point of the sensor response data climb phase is as follows:

[0117] As the sliding window moves, it is determined sequentially whether a starting point for data rise exists within the current window. Specifically, first, it is determined that the response data within the current sliding window is in a stable state; then, it is determined whether the response data within the sliding window begins to show an increasing trend. If so, the starting point for the sensor response data rise is established. From this point, the stable value y is estimated. p =2y.

[0118] One method to determine whether real-time response data is in a steady state is to check whether the standard deviation over a certain time period is less than or equal to the measurement error range. If it is less than or equal to the measurement error range, the window response data is considered to be in a steady state. The specific method is as follows:

[0119] A sliding window is used to extract sensor response data. As the sliding window moves, the standard deviation of the sensor response data within the current window is continuously calculated.

[0120] First, calculate the average value of the real-time response data within the current window, as shown in formula (9).

[0121]

[0122] Where n: the data length of the sliding window,

[0123] y t Data arranged in time series, i.e., real-time response data.

[0124] The average value of the response data within the window;

[0125] Next, calculate the standard deviation of the response data within the current window, as shown in formula (10).

[0126]

[0127] Finally, the obtained standard deviation is compared with the sensor measurement error. If the standard deviation is less than or equal to the measurement error range, the response data of the current window is considered to be in a steady state.

[0128] The standard deviation of data represents the degree of dispersion between each data point in a dataset and the dataset mean. It is a commonly used method to indicate whether the data corresponding to a certain segment of a curve is in a steady state.

[0129] Another method to determine whether response data over a certain period is in a steady state is to use a steady-state threshold.

[0130] First, after the sensor is placed in the zero-point standard gas and the response value is stable, multiple response values ​​and corresponding times that change over time are obtained. The standard deviation of the stable value of the sensor under the zero-point gas environment is calculated. One to two times the standard deviation of the stable value is taken as the threshold Sair for judging the steady state of the sensor. The value of one to two times can be based on experience or can be selected according to actual needs.

[0131] A non-zero calibrated gas was introduced into the sensor, and the sensor's real-time response value and corresponding time were recorded.

[0132] A sliding window is used to extract sensor response data. As the sliding window moves, the standard deviation of the sensor response data within the current window is continuously calculated and obtained.

[0133] If the standard deviation is less than or equal to the steady-state threshold Sair, then the gas sensor response data within the current window is determined to be in a steady state.

[0134] The method for determining whether the response data within the sliding window shows an increasing trend includes the following steps:

[0135] The first-order difference value Δy of the gas sensor response data is acquired in chronological order within the sliding window. t ;

[0136] Δy t =y t -y t-1 (6)

[0137] Simultaneously calculate the difference value Δy in the difference data. t If the number of positive values ​​is Np, then Δy t The number of negative numbers is Nn = (N-1) - Np.

[0138] If the number of response data points captured within the window is N, then the number of first-order difference data points is N-1.

[0139] If Np is much greater than Nn, that is, Np is much greater than half of (N-1), it indicates that the data is trending upwards, and it is highly likely that the gas being measured has been introduced. If Np is much less than Nn, that is, Np is much greater than half of (N-1), it indicates that the sensor was originally supplied with a standard gas, and the sensor is currently being purged to zero.

[0140] Furthermore, considering the fluctuations in real-time response data during data acquisition, based on testing experience, if the number of positive difference values ​​Np is greater than or equal to the number of first-order difference data (N-1) × 80%, then it is determined that the real-time response value of the gas shows an increasing trend over time, and the data is in the climbing phase.

[0141] After the first-order difference maxima appear, the growth rate of the sensor's real-time response data gradually decreases, see... Figure 6 This continues until the data fluctuations reach dynamic stability. The sensor's response data corresponds to the deceleration and growth phase of the logistic curve. Although the estimated stable value y can be displayed in advance. p =y ps However, it keeps showing y ps This would contradict the fact that the sensor's real-time response data changes dynamically. Therefore, a real-time response value is introduced to smooth the data. The estimated stable value is obtained by weighting the real-time response value with the estimated stable value according to formulas (11) and (12). ps Percentage α.

[0142] y disp =y ps ×α+y t ×(1-α) (11)

[0143] The weighting coefficient α is calculated according to formula (13).

[0144]

[0145] y disp : Indicated value; y ps : Estimated stable value; y: Real-time response value or data.

[0146] Once the sensor's response data reaches a steady state, the final real-time response data y may appear at y ps The value fluctuates and will not be completely uniform. At this time, the data stability is still judged according to the aforementioned formulas (9) and (10) (or the steady-state threshold Sair is still used as the judgment threshold). After judging that the real-time response data of the sensor is in a steady state, the weighting coefficient α in formula (13) is set to 0, and the real-time response value is displayed. At this time, the sensor's indicated value y disp = Real-time response value y.

[0147] A method for calculating the maximum value of the first-order difference.

[0148] Since the real-time response data of the sensor consists of discrete data points, the following methods can be used:

[0149] Calculate the first-order difference: Δy t =y t -y t-1 ;

[0150] Find Δy t The maximum value point;

[0151] Alternatively, the difference data can be smoothed and then the maximum value can be found.

[0152] The difference maximum point corresponds to the inflection point of the logistic curve, which is also the moment of fastest growth. In the discrete case, the maximum point may not fall exactly at t0, but it will be very close to the midpoint.

[0153] The second method for calculating the first-order difference maxima requires significant computational power and places high demands on the resources of the processor matched to the sensor, such as bit width, architecture, and integrated hardware accelerators.

[0154] The method for calculating the first-order difference maxima in this invention is not limited. The first method is preferred.

[0155] There are several methods for determining the starting point of the climb phase based on the sensor's real-time response data, including:

[0156] Based on differential mutation detection methods, the start of a climb is characterized by a sudden increase in the first-order difference from near zero. In practice, a climb is considered to have begun when the difference exceeds the baseline by a certain multiple.

[0157] The baseline is the average, median, or range (such as mean ± standard deviation) of multiple measurements of a certain indicator under steady-state conditions; it can also be a benchmark value predefined according to industry standards, experience, or design objectives.

[0158] The method based on the Cumulative Sum (CUSUM) control chart detects small but persistent upward trends by accumulating small deviations.

[0159] The method based on fitting the derivative of the logistic curve determines the starting point of the climb by fitting the derivative of the logistic function in real time. The climb begins when the derivative first exceeds a preset threshold. The method used for this determination is not limited.

[0160] The method for determining whether the real-time response data of a sensor has entered a steady state also includes:

[0161] Based on the first-order difference determination method, the first-order difference of the logistic curve approaches zero in the steady state. The mean of the difference is calculated, and the threshold of the mean difference is set according to the actual data. When the difference value of the current window approaches zero, it can be considered that the real-time response data has entered a steady state.

[0162] The sliding window statistical test compares the statistical characteristics of the most recent window with the previous window; if there is no significant difference, it is considered to be in a steady state; and so on. There are no restrictions on the method.

[0163] It should be noted that the prerequisites for a sensor to be "collected" or "in a detection state" are that the gas can come into contact with the sensitive element, the sensor is activated, and the environment and gas conditions are compatible.

[0164] For the gas to come into contact with the sensor's sensitive element, the gas must be in contact with the sensing surface of the sensor's sensitive element. Generally, the sensing surface of the sensor is designed with a breathable structure. Furthermore, the contact between the gas and the sensor usually occurs in a gas chamber. For example, in laboratory experiments, a standard gas or a sensing gas of a certain concentration is introduced into the gas chamber, and the sensor's sensing surface is also installed in the gas chamber. As the gas flows in the gas chamber, contact naturally occurs. Of course, if it is a diffusion-type detection, a gas diffusion scenario is required, with the gas sensing surface exposed in the gas diffusion environment. This invention is for verifying the feasibility of the method; a sensor acquisition platform can be set up in the laboratory, and it is not necessary to be in an on-site detection environment.

[0165] For the sensor to be activated, it needs to be functional, requiring an MCU control board. This control board amplifies signals and acquires data. If the sensor requires heating, a heating control unit is also needed; if the sensor needs driving, a drive circuit module is required. Of course, this invention relates to sensor readings, real-time response values, and other data; therefore, setting up an output display in the hardware is also essential… In short, after power-on, the sensor must be able to operate.

[0166] The sensor has been calibrated or standardized; a calibration gas generator, a zero-point gas generator, or multiple gas distributors are required, as well as a calibration chamber; the sensor is in detection mode or being collected, and the concentration of the introduced gas is within the detection range, etc.

[0167] Necessary environmental control and auxiliary equipment are also required, such as temperature and humidity controllers to control the test environment, pressure regulators to avoid the influence of air pressure, and anti-interference shielding boxes to shield electromagnetic interference.

[0168] In summary, effective data acquisition by gas sensors requires the construction of a complete "contact-drive-processing-calibration" system. Contact between the gas and the sensor's sensitive element ensures the validity of the acquired data, the drive circuit activates the sensor response, the signal processing equipment quantifies the data, and the calibration device ensures accuracy and reliability.

[0169] The aforementioned sensors can be "collected" or "in a detection state," and are commonly used techniques for gas analysis. They are only briefly described here and are not intended to be limiting.

[0170] It should also be noted that the real-time response values ​​or data, estimated stable values, indicated values, etc. appearing in this application should in principle be related to the measurement parameters of the sensor. However, in the embodiments, the gas sensor is used to measure the concentration as an example for illustration, so all the above values ​​or data are concentration data.Figures 3-5 In this context, the sensor also measures gas concentration, so the data on the vertical axis are all concentration data. If the sensor measures humidity, then all the above values ​​or data should be humidity data. Furthermore, the indicated values ​​don't necessarily have to be displayed; they can also be understood as output values—the output values ​​after data processing.

[0171] Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for processing the readings of a gas sensor, characterized in that: include, S1: Place the gas sensor whose response characteristics conform to the logistic curve into the detection state, introduce a certain concentration of sensing gas into the gas sensor, and record and save the response data of the gas sensor and the corresponding time t in real time at a certain frequency. S2: During real-time data acquisition, after determining that the sensor's real-time response data has entered the climbing phase, set the sensor's reading y... disp Equal to the estimated stable value y p That is, twice the real-time response value y, while continuously judging the maximum value of the difference value of the real-time response data until the maximum value of the difference appears; S3: After the differential maximum occurs, record and save the real-time sensor response value y corresponding to the differential maximum. m and the corresponding estimated stable value y ps =2y m ; S4: After the maximum difference value appears, the indicated value y disp From the predicted stable value y ps The estimated stable value y is obtained by weighted summation of the real-time response value y. ps The formulas for the proportion α and the weighting coefficient α are as follows: Simultaneously, the stability of the real-time response data is assessed until the sensor's real-time response data reaches a stable state. S5: After the sensor's real-time response data reaches a steady state, the indicated value y disp = Real-time response value y.

2. The method for processing the indication of a gas sensor according to claim 1, characterized in that, The method for determining a gas sensor in S1 whose response characteristics conform to the logistic curve is as follows: S11: Place the sensor in the detection state. Within the sensor's range, for the sensor's response to different concentrations of the sensed gas, obtain the gas response value of the sensor as a function of time and the corresponding time t, as sample data. S12: Perform logistic curve fitting based on the sample data; S13: If the logistic curve fitting degree of the sample data meets the requirements, then the response characteristics of the gas sensor are considered to conform to the logistic curve characteristics.

3. The method for processing the indication of a gas sensor according to claim 1, characterized in that, The method for determining whether the sensor's real-time response data has entered the climbing phase in step S2. In real-time data acquisition, a sliding window is used to capture the sensor's response data. As the sliding window moves, if the real-time response data of the gas sensor in the current window is in a stable state and the real-time response data begins to increase over time, it is determined that the sensor's real-time response data has begun to enter the climbing phase.

4. A method for processing the indication of a gas sensor according to claim 1 or 3, characterized in that, The method for determining whether the sensor response data is in a steady state includes: A sliding window is used to extract sensor response data. As the sliding window moves, the standard deviation of the sensor response data within the current window is continuously calculated and obtained. If the standard deviation within the current window is less than or equal to the measurement error range, then the response data of the gas sensor within the current window is determined to be in a steady state.

5. A method for processing the indication of a gas sensor according to claim 1 or 3, characterized in that: The method for determining whether the sensor response data is in a steady state can also be achieved through the following methods, including: S221: After the sensor is purged with zero-point standard gas and the response value stabilizes, multiple stable values ​​and corresponding times that change over time are obtained; S222: Calculate the standard deviation of the stable value, and take 1 to 2 times the standard deviation of the stable value as the threshold S for judging the steady state of the sensor. air ; S223: A sliding window is used to extract the response data of the sensor. As the sliding window moves, the standard deviation of the response data in the current window is calculated. S224: If the standard deviation of the response data in the current window is less than or equal to the steady-state threshold S air If the gas sensor response data within the current window is in a stable state, then it is determined that the gas sensor response data is in a stable state.

6. A method for processing the indication of a gas sensor according to claim 1 or 3, characterized in that: The method for determining that the real-time response data of the sensor shows an increasing trend over time includes, During the process of using a sliding window to capture sensor response data, Within the current sliding window, calculate and obtain the first-order difference value Δy of the sensor's real-time response data. t Dy t y t -y t-1 , and the first-order difference Δy t Let Np be the number of positive values. If the number of positive difference values ​​Np is much greater than 50% of the number of first-order difference data (N-1), then it is determined that the real-time response data of the sensor in the current window shows an increasing trend over time, and the data is in the initial climbing stage, where N is the number of response data captured by the sliding window.

7. A method for processing the indication of a gas sensor according to claim 1 or 6, characterized in that: If the number of positive difference values ​​Np in the current sliding window is at least greater than 80% of the number of first-order difference data (N-1), then it is determined that the real-time response data of the sensor in the current window shows an increasing trend over time.

8. The method for processing the indication of a gas sensor according to claim 1, characterized in that: The gas sensor may be a palladium alloy sensor, a metal oxide semiconductor (MOS) sensor, an electrochemical sensor, or a humidity sensor.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 6.