Volatile organic compound concentration detection signal processing method based on sliding window timing filtering
Patent Information
- Application Number
- CN202610933953.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-16
AI Technical Summary
然而,现有方法未能建立基于归一化趋势强度与变化率波动性双指标的精细化五阶段划分体系,其阶段判定多采用单阈值粗粒度三段式(如上升/平稳/下降)或异常筛查类量化指标,未给出可计算的量化公式及配套的七阈值判定规则,导致后续处理缺乏针对性的决策依据
[0016] 1. This invention uses trend strength indicators. and rate of change volatility indicators
Two quantitative indicators precisely divide the VOCs pollution process into five stages: a background plateau, a concentration rise, a peak concentration, a concentration decline, and an event end. Compared to existing technologies, this invention provides a more refined five-stage division, and...
Using the normalized covariance formula,
The method employs a first-order difference absolute deviation formula, all of which are calculable quantization formulas, and is equipped with a seven-threshold judgment rule, resulting in significantly higher stage recognition accuracy than existing methods. The stage switching introduces continuous...
The sampling point confirmation mechanism effectively avoids misjudgments caused by noise.
Smart Images

Figure CN122930243A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of volatile organic compound (VOC) concentration detection technology, specifically to a method for processing VOC concentration detection signals based on sliding window temporal filtering, applicable to scenarios such as online monitoring of ambient air VOCs, monitoring of pollution source emissions in industrial parks, indoor air quality monitoring, and portable VOCs detectors. Background Technology
[0002] Volatile organic compounds (VOCs) are important precursors to air pollution, posing significant threats to human health and the ecological environment. With increasingly stringent requirements for air pollution control, online VOC concentration monitoring technology has been widely applied. Currently, mainstream VOC concentration sensors include photoionization detectors (PID) and metal-oxide-semiconductor (MOS) sensors. However, the raw concentration signals output by these sensors are subject to various noise interferences in practical applications, severely impacting detection accuracy and reliability.
[0003] Existing VOCs concentration signal processing methods mainly suffer from the following four technical shortcomings:
[0004] First, there is a lack of refined pollution process stage identification capabilities. VOCs pollution processes typically go through different stages, such as background stabilization, concentration increase, peak maintenance, and concentration decay. Each stage has drastically different signal processing requirements—the increase stage requires rapid response to capture concentration abrupt changes, while the stabilization stage requires strong noise suppression to ensure measurement accuracy. Existing technologies, such as Chinese patent application CN118395090B, disclose a method for monitoring and treating exhaust gas from a coating and recovery integrated machine, which acquires VOCs concentration data time series and performs trend analysis. However, existing methods fail to establish a refined five-stage division system based on both normalized trend strength and rate of change volatility. Their stage determination often uses single-threshold coarse-grained three-segment methods (such as increase / stabilization / decline) or anomaly screening quantitative indicators, without providing calculable quantitative formulas and corresponding seven-threshold determination rules, resulting in a lack of targeted decision-making basis for subsequent processing.
[0005] Second, the fixed parameters of the sliding window cannot adapt to the dynamic changes in concentration signals. In existing VOCs concentration signal processing, the window length and sliding step size of the sliding window are usually fixed values, making it difficult to simultaneously meet the response speed requirements when the concentration rises rapidly and the noise suppression requirements when the concentration is stable. Chinese patent CN116955940B discloses a method for optimizing the processing of hazardous gas concentration monitoring data. Although it determines the filter window length based on "dynamic equilibrium," its judgment is based on local data statistics and fails to correlate with the global stage characteristics of the pollution process, resulting in insufficient targeting of window adjustments.
[0006] Third, the parameters of each stage of multi-stage filtering are adjusted independently, lacking a coordinated mechanism. Existing technologies, such as Chinese patent CN118566443B which discloses a combined use of Kalman filtering and Savitzky-Golay filtering; and Chinese patent application CN120072330A which discloses a method for adaptively selecting Savitzky-Golay filter parameters in stages according to "rising / falling / stable" states. However, in these schemes, the parameter adjustments of each stage of the filter are independent, lacking a unified decision-making basis. There is no information transmission or coordinated action between the different stages of filtering, making it difficult to achieve the overall optimal filtering effect.
[0007] Fourth, there is a lack of closed-loop feedback optimization mechanisms based on inversion quality. Existing VOCs concentration signal processing methods are all open-loop structures, meaning they process the signal according to a preset procedure and output the result without evaluating the reliability of the processing result or adjusting the processing parameters based on the quality feedback of the processing result. Once environmental conditions or sensor status change, the preset processing parameters may no longer be applicable, leading to a decrease in processing effectiveness.
[0008] In summary, existing VOCs concentration detection signal processing methods have significant shortcomings in terms of stage adaptive identification, dynamic adjustment of window parameters, multi-level filtering synergy, and closed-loop feedback optimization, making it difficult to meet the increasingly higher requirements for accuracy and reliability in online VOCs monitoring. Summary of the Invention
[0009] The technical problems to be solved by the present invention in view of the above-mentioned prior art include:
[0010] First, how to establish a refined pollution process stage identification system, which uses quantitative indicators to divide the VOCs pollution process into multiple stages, providing an accurate decision-making basis for subsequent filtering treatment.
[0011] Second, how to dynamically adjust the window length and sliding step size of the sliding window according to the identified pollution stage, taking into account both the response speed requirements when the concentration changes rapidly and the noise suppression requirements when the concentration is stable.
[0012] Third, how to use the stage identification results as a unified decision-making basis to drive the coordinated adjustment of parameters of multi-level filters and achieve the overall optimization of filtering at each level.
[0013] Fourth, how to establish a closed-loop feedback optimization mechanism based on the reliability of concentration inversion, so that the processing parameters can be adaptively optimized according to the inversion quality.
[0014] Furthermore, this invention provides a hysteresis compensation scheme based on the sensor's physical time constant to address the adsorption-desorption hysteresis effect unique to PID / MOS sensors; it provides an event-triggered freeze protection mechanism to address the problem of the true concentration signal being easily misrepresented during baseline drift correction; and it provides a lightweight implementation scheme to address the resource constraints of embedded devices.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] 1. This invention uses trend strength indicators. and rate of change volatility indicators Two quantitative indicators precisely divide the VOCs pollution process into five stages: a background plateau, a concentration rise, a peak concentration, a concentration decline, and an event end. Compared to existing technologies, this invention provides a more refined five-stage division, and... Using the normalized covariance formula, The method employs a first-order difference absolute deviation formula, all of which are calculable quantization formulas, and is equipped with a seven-threshold judgment rule, resulting in significantly higher stage recognition accuracy than existing methods. The stage switching introduces continuous... The sampling point confirmation mechanism effectively avoids misjudgments caused by noise.
[0017] 2. This invention dynamically adjusts the window length and sliding step size of the sliding window based on the identified pollution stages: shortening the window and reducing the step size during the rapid concentration rise and decay phases to improve response speed; increasing the window size during the relatively stable peak concentration phase to enhance smoothing effect; and using appropriate window parameters during the background stabilization phase and the event end phase. Compared to the existing technology that adjusts the window based on local statistics, the window adjustment of this invention is directly related to the global stage characteristics of the pollution process, making the decision-making basis more reasonable. Simultaneously, data points within the window are allocated according to exponential decay weights (…). The closer the data point is to the current time, the greater its weight, which further optimizes the timeliness of the filter.
[0018] 3. This invention organically connects three levels of filtering: sliding window polynomial fitting (to remove baseline drift), adaptive Kalman filtering (to suppress intermediate frequency noise), and adaptive Savitzky-Golay filtering (to suppress high frequency noise). Furthermore, the filtering parameters at each level are all driven and adjusted by the same decision source—the stage identification result. Specifically, the process noise covariance of the Kalman filter... Based on phase adaptive adjustment (amplification during rising / decreasing phases to track concentration changes, and reduction during plateau phases to prevent drift), observe the noise covariance. The standard deviation within the window is estimated in real time; the window length of the Savitzky-Golay filter is adjusted according to the stage and volatility, and the polynomial order is adjusted according to the trend strength. Compared with the independent combination of Kalman filtering and Savitzky-Golay filtering or the single-stage adaptive Savitzky-Golay filtering in the prior art, the "stage-driven three-level linkage" mechanism of this invention makes the filtering of each level form an organic whole, and the filtering effect is better than the simple superposition of the independent adjustment of each level.
[0019] 4. This invention introduces an inversion reliability index. The reliability of the concentration inversion results is quantitatively evaluated. When When the value remains below a preset threshold (preferably 0.85), parameter adjustment is triggered, and the objective function is adjusted based on the parameter optimization. The objective function takes into account both the accuracy of concentration inversion and the accuracy of concentration retrieval. Inversion reliability () ) and processing delay ( This approach achieves multi-objective comprehensive optimization across three dimensions. Parameter optimization performs a complete optimization process during offline calibration or periodic maintenance, and then makes incremental adjustments based on the most recent offline optimization results during online runtime, balancing optimization effectiveness and computational efficiency.
[0020] 5. This invention also addresses the adsorption-desorption hysteresis effect unique to PID / MOS sensors by introducing a method based on the sensor's physical time constant. and The hysteresis compensation recursive model effectively eliminates the response asymmetry error between rising and decaying edges; an event-triggered event freezing mechanism is introduced, which freezes filter parameter updates and baseline estimation when a sudden change in real VOC concentration is detected, effectively preventing the real signal from being mistakenly subtracted as baseline drift; a fast leakage response mechanism is introduced, which immediately switches the window to the minimum length and pauses filter parameter updates when the concentration rise rate exceeds the threshold, prioritizing the response to concentration changes; a lightweight implementation scheme for embedded devices is provided, which uses integer triangular cores, lookup table calls, and shift operations to replace floating-point operations, significantly reducing computational resource consumption and making it suitable for real-time operation on resource-constrained embedded platforms. Attached Figure Description
[0021] Figure 1 This is an overall flowchart of the volatile organic compound concentration detection signal processing method based on sliding window temporal filtering according to the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of protection of this invention.
[0023] Example 1
[0024] This embodiment provides a method for processing volatile organic compound (VOC) concentration detection signals based on sliding window temporal filtering, applicable to VOCs online monitoring equipment employing PID or MOS sensors. Please refer to... Figure 1 The method includes the following steps:
[0025] 1. Signal Acquisition and Preprocessing (S1)
[0026] In this embodiment, the VOCs concentration detection sensor is a PID sensor with a range of 0-100 ppm and a sampling frequency of 1 Hz. The sensor outputs the raw concentration signal. The analog voltage signal is converted from analog to digital and then input to the signal processing unit in digital form.
[0027] Preprocessing includes applying a sliding median filter to the raw concentration signal to suppress potential impulse noise in the sensor output. The sliding median filter uses a fixed odd-numbered window with a length of 7 sampling points. Specifically, for the current time... The concentration values of 7 sampling points within the window are taken, sorted by value, and the median is used as the preprocessed output value at that moment. The selection of a window length of 7 points is based on the following criteria: it can effectively suppress impulse noise with a width of 1-3 sampling points, while avoiding excessive smoothing of the true concentration change.
[0028] 2. Identification of pollution process stages (S2)
[0029] Based on the preprocessed concentration signal sequence, time-series characteristic parameters are calculated. Let the short-time window length be... Each sampling point (corresponding to 15 seconds) is located at the current time. The window contains from to common Data points.
[0030] Trend strength index Calculation:
[0031] Calculate according to the following formula:
[0032]
[0033] in, The relative time index of data points within the window ( This represents the oldest sampling point within the window. (This represents the latest sampling point within the window, i.e., the current time). For the first Concentration values at each sampling point This represents the average of the time indices within the window. This represents the average concentration within the window. The formula is essentially the slope calculation formula for least squares linear regression. The numerator is the covariance between the concentration value and the time index, and the denominator is the variance of the time index. The calculation result reflects the trend direction and intensity of concentration changes within the window.
[0034] Let's illustrate with a set of example data: Assume the window contains... The concentration sequence of the sampling points is [2.1, 2.2, 2.0, 2.3, 2.5, 3.0, 3.8, 5.2, 7.5, 10.2, 13.5, 16.8, 19.2, 21.5, 23.0] (unit: ppm), corresponding to the current time. , The oldest point, This is the latest point. Calculated... This indicates that the concentration within the current window is showing a significant upward trend.
[0035] rate of change volatility index Calculation:
[0036]
[0037] in, First-order difference ( ), It is the mean of the first-order differences within the window.
[0038] Using the data from the previous example, we calculated the following: This indicates that the fluctuation of the concentration change rate within the current window is moderate.
[0039] Five-stage judgment:
[0040] In this embodiment, each threshold is calibrated based on the sensor's measurement range (0-100 ppm). The general mapping relationship between the threshold and the measurement range is as follows: the first trend threshold is 0.15% of the measurement range, the second trend threshold is 0.50% of the measurement range, the third trend threshold is 0.20% of the measurement range, the first standard deviation threshold is 0.30% of the measurement range, the second standard deviation threshold is 1.00% of the measurement range, the first differential threshold is 0.20% of the measurement range, and the volatility threshold is 1.50% of the measurement range. For a PID sensor with a measurement range of 100 ppm, the specific values of each threshold are as follows:
[0041] First trend threshold: 0.15
[0042] Second trend threshold: 0.50
[0043] Third trend threshold: 0.20
[0044] First standard deviation threshold: 0.30 ppm
[0045] Second standard deviation threshold: 1.00 ppm
[0046] First differential threshold: 0.20 ppm
[0047] Volatility threshold: 1.50
[0048] Phase Switching Confirmation Points That is, the switching condition must be met for 5 consecutive sampling points before the switching of the stage can be confirmed. The value of is related to the sampling frequency: the higher the sampling frequency, The sampling frequency can be increased appropriately to enhance the image stabilization effect; the lower the sampling frequency, the better. The sampling frequency should be appropriately reduced to avoid excessive response delay. In this embodiment, the sampling frequency is 1 Hz. .
[0049] The following judgment rules shall be adopted:
[0050] Background stability period: when Standard deviation within the window and At this point, it is determined to be a period of background stability. During this time, the concentration signal fluctuates slightly around the baseline without a significant trend.
[0051] Concentration rise phase: when The current first-order difference and When the concentration increases, it is considered to be in the rising phase. At this time, the concentration continues to rise, and the rate of change is relatively stable (without drastic fluctuations).
[0052] Peak concentration period: when Standard deviation within the window Furthermore, when the previous stage is a period of rising concentration, it is determined to be the peak concentration period. At this time, the concentration reaches near the peak, the fluctuation increases, but the overall trend slows down.
[0053] Concentration decay period: when The current first-order difference and This period is considered the concentration decay period. During this time, the concentration continues to decrease, and the rate of change remains relatively stable.
[0054] Event End Date: When Standard deviation within the window Furthermore, when the previous stage is the concentration decay period, it is determined to be the end of the event. At this time, the concentration has returned to near the baseline, and the pollution event ends.
[0055] 3. Adaptive construction of sliding window (S3)
[0056] Base window length One sampling point (corresponding to 30 seconds). The base length is determined based on the sensor response time and sampling frequency. In this embodiment, the sensor response time... Approximately 10 seconds, take The number of sampling points corresponding to 3 times the base window length is used as the base window length.
[0057] Based on the identified stage, the window length is adaptively adjusted according to the following strategy:
[0058] Background stability period and event conclusion period: A longer window is used to effectively suppress noise.
[0059] Concentration rise phase and concentration decay phase: Shorten the window to improve the response speed to concentration changes.
[0060] Peak concentration period: Increase the window size to enhance the smoothing effect on fluctuations near the peak.
[0061] The sliding step size is adjusted according to the following strategy:
[0062] Concentration rise and concentration decay phases: Step size = 1 sampling point (sliding point by point) to ensure that rapid changes in details are not lost.
[0063] Peak concentration period: Step size = 3 sampling points, appropriately reduce the calculation frequency.
[0064] Background stabilization period and event end period: Step size = 5 sampling points, further reducing computational overhead.
[0065] The weights of the data points within the window are allocated using an exponential decay method, with a decay coefficient of... . The value is determined based on: The corresponding weight decay time constant is approximately 3-4 sampling points (corresponding to 3-4 seconds), which matches the typical VOCs concentration change time scale, so that the data in the most recent few seconds contributes the most to the filter output, while the data from older times still has a smoothing effect.
[0066]
[0067] in For the current moment, and For the time index of data points within the window, This is the current window length. This weighting method assigns a higher weight to data points closer to the current time, and an exponentially decreasing weight to data points farther away.
[0068] 4. Multi-stage adaptive filtering (S4)
[0069] This embodiment is the basic implementation scheme, and the hysteresis compensation option is not enabled; three-stage filtering is performed directly.
[0070] First-stage filtering – baseline drift subtraction:
[0071] The sensor baseline drift was estimated using a sliding window polynomial fitting. The window length was 60 sampling points (twice the base window), and a second-order polynomial was used for fitting. For the current time... Take 60 data points within the window and perform least-squares quadratic polynomial fitting to obtain the fitted values. Used as the baseline estimate at the current moment. Subtract the baseline estimate from the original signal:
[0072]
[0073] in This is the first-stage filtered signal (the signal after baseline removal).
[0074] Unlike recursive baseline adjustment methods, the first-stage filtering of this invention uses sliding window polynomial fitting to estimate baseline drift. Tracking slowly varying components (temperature and humidity drift, sensor aging drift) does not require setting a learning rate parameter, and polynomial fitting can capture second-order and higher slowly varying drift components, while recursive baseline adjustment mainly tracks DC drift components.
[0075] Second-stage filtering – Adaptive Kalman filtering:
[0076] An adaptive Kalman filter is used to suppress intermediate frequency noise in the first-stage filtered signal. The state equation and observation equation of the Kalman filter are as follows:
[0077]
[0078]
[0079] in Process noise (variance is) ), For observation noise (variance is ).
[0080] Process noise covariance The system adapts to different phases. The values of the first-phase coefficients (concentration rise and concentration decay phases) are determined based on the signal rise / fall rate: according to... The absolute value is used to determine when A value greater than twice the second trend threshold is considered a relatively fast rate; otherwise, it is considered a relatively slow rate. A larger value (e.g., 4.0-5.0) is used for a faster rate, and a smaller value (e.g., 1.5-2.5) is used for a slower rate.
[0081] Concentration rise phase and concentration decay phase: The noise covariance during the amplification process enables the filter to track concentration changes more quickly.
[0082] Background stability period and event conclusion period: To reduce process noise covariance, thereby enhancing smoothing and preventing drift.
[0083] Peak concentration period: Keep it moderate.
[0084] in Based on the fundamental process noise covariance, this embodiment takes... . The value is determined based on the sensor noise level: 0.005-0.02 for low-noise sensors (such as PID) and 0.02-0.10 for high-noise sensors (such as MOS).
[0085] Observation noise covariance Real-time estimation based on the standard deviation within the sliding window:
[0086]
[0087] in The current sliding window (length) The standard deviation of the first-stage filtered signal within the range. This estimation method increases the standard deviation when the signal fluctuates greatly. (Reduce filter gain, preserve signal variation), decrease when the signal is stable. (Enhancing filtering effect).
[0088] The recursive process of Kalman filtering is as follows:
[0089] Prediction Step:
[0090]
[0091]
[0092] Update steps:
[0093]
[0094]
[0095]
[0096] in For Kalman gain, To estimate the error covariance.
[0097] Third-level filtering – Adaptive Savitzky-Golay filtering:
[0098] An adaptive Savitzky-Golay filter is used to suppress high-frequency random noise in the second-stage filtered signal. The filter window length and polynomial order are adaptively adjusted according to the stage and time sequence characteristics.
[0099] Background plateau and event termination periods: Window length = 15, polynomial order = 3. The signal is relatively stable, so a larger window and a moderate order are used for sufficient smoothing.
[0100] Concentration rise and decay phases: window length = 7, polynomial order = 2. The signal changes rapidly, so a small window and low order are used to preserve the trend.
[0101] Peak concentration period: window length = 11, polynomial order = 3. Due to significant signal fluctuations, a medium window is used to smooth the fluctuations.
[0102] The specific implementation of Savitzky-Golay filtering is as follows: for the window... Data points, using A least-squares fit is performed on the order polynomial, and the value of the fitted polynomial at the current point is used as the filter output. In this embodiment, the classic convolution coefficient implementation method of Savitzky-Golay filtering is adopted, that is, the convolution coefficients corresponding to each window length and order are pre-calculated, and the convolution operation is directly performed with the data points within the window during filtering.
[0103] 5. Concentration Inversion and Closed-Loop Feedback Optimization (S5)
[0104] The filtered concentration signal is obtained after three stages of filtering. Concentration inversion converts the filtered signal value into a concentration value based on the sensor calibration curve. .
[0105] Inversion reliability index calculation:
[0106]
[0107] in The standard error estimate for concentration inversion is obtained statistically from the fitting residuals of the sensor calibration curve. In this embodiment, the standard error of the sensor calibration curve fitting is... (Within the full range), then:
[0108]
[0109] when hour, ;when hour, ;when When it is large (e.g.) ), Approaching 1.
[0110] Preset threshold = 0.85 (i.e., 5 consecutive sampling points) Adjustment is triggered when all values are below 0.85. The value of is related to the sampling frequency. In this embodiment, the sampling frequency is 1 Hz. A 5-second interval is used to eliminate occasional fluctuations.
[0111] Parameter optimization objective function:
[0112]
[0113] in A set of adjustable parameters (including window length adaptive coefficients, Kalman filter) (coefficients, SG filter window length and order, etc.) The root mean square error, To handle the delay (the time difference from signal input to concentration output, measured in sampling points).
[0114] In this embodiment, the weighting coefficient is taken as , , .
[0115] Parameter optimization is performed in its entirety during the offline calibration phase: tests are conducted using standard gases of known concentrations (such as toluene, benzene, and isobutylene at various concentration points), and sensor output signals are collected. Using the standard gas concentration value as a reference, the solution is obtained through grid search or gradient descent. Minimal parameter combination The search range is as follows: window adaptation coefficient 0.3-0.7 (step size 0.1), Kalman spectroscopy. The coefficients for the first stage are 1.5-5.0 (step size 0.5), the SG window length is 5-21 (step size 2), and the SG polynomial order is 2-4 (step size 1); the termination condition is 10 consecutive iterations. The change is less than 1%.
[0116] During the online operation phase, when Incremental adjustment is triggered when the value remains below 0.85 for five consecutive sampling points: based on the value obtained from the most recent offline optimization. Fine-tuning of the window length adaptive coefficient and filtering parameters (within the current value) (Search within range), until It recovered to above 0.85.
[0117] Example 2
[0118] This embodiment addresses the adsorption-desorption hysteresis effect unique to PID or MOS sensors by introducing a hysteresis compensation step based on Embodiment 1.
[0119] In this embodiment, the sensor is a PID sensor with a range of 0-100 ppm and a sampling period of... .
[0120] Implementation of delay compensation
[0121] A hysteresis compensation step is inserted after the first-stage filtering (baseline drift subtraction) and before the second-stage filtering (adaptive Kalman filtering) in S4.
[0122] Hysteresis compensation uses the following recursive formula:
[0123]
[0124] in This is the first-stage filtered signal (the signal after baseline removal). This is the signal after hysteresis compensation. For and The initial value is determined as follows: , , , That is, there is no hysteresis compensation effect at the initial moment.
[0125] coefficient and Adsorption time constant of the sensor and desorption time constant The mapping yields:
[0126]
[0127]
[0128] The above , The mapping formula is derived from the adsorption-desorption response characteristics of the PID / MOS sensor to a concentration step. The rising segment response of the sensor under concentration step excitation is approximated as a first-order inertial element. Its step response is in continuous form as follows: ; based on sampling period Discrete sampling of the step response yields The driving coefficients can be obtained by recursively rearranging them. The desorption response is approximately in the form of an exponential decay, which can be obtained after discrete sampling. ,in The coefficients are hysteresis loop coefficients. This closed mapping allows the coefficients of the hysteresis compensation recursion to be directly derived from the sensor's physical time constant. , The decision was made once the coefficient was set. Calibration is unique and does not require repeated adjustments of the iteration step size as is required for adaptive filters.
[0129] Calibration of time constant
[0130] , , It is obtained by fitting the rising and falling segments of the impulse response of the sensor to a known concentration of VOCs during calibration.
[0131] Toluene ( Taking (e.g., ) as an example, the calibration process is as follows:
[0132] 1. Place the sensor in clean air (zero air) and record the baseline value after the signal stabilizes.
[0133] 2. Introduce toluene standard gas at a concentration of 50 ppm, record the entire process of the sensor rising from the baseline to the stable value (rising phase), with a sampling frequency of 1 Hz and continuous acquisition for 60 seconds.
[0134] 3. Stop the flow of toluene standard gas, restore clean air, and record the entire process (attenuation phase) of the sensor dropping from the stable value back to the baseline, continuously collecting data for 120 seconds.
[0135] Rising segment data processing: processing of rising segment concentration signals ,calculate ,in This is the steady-state concentration (50 ppm). For With time Perform a linear fit, and the absolute value of its slope is In this embodiment, the calibration data of toluene were fitted to obtain... .
[0136] Attenuation range data processing: processing the concentration signal in the attenuation range ,calculate .right With time Perform a linear fit, and the absolute value of its slope is In this embodiment, the calibration data of toluene were fitted to obtain... .
[0137] Hysteresis loop coefficient Compare the difference in the area under the response curves during the rising and decaying phases. In this embodiment, the calibration data for toluene were calculated to obtain... .
[0138] A lookup table is created based on sensor type. The calibration parameters for some typical VOCs are as follows:
[0139] Toluene 8.5 25.3 0.62 benzene 6.2 18.7 0.58 Isobutylene 4.8 14.2 0.55
[0140] Depend on , , , The calculation yields:
[0141]
[0142]
[0143] Will , Substituting into the hysteresis compensation recursive formula, hysteresis compensation is performed on the first-stage filtered signal at each time step. The compensated signal... Alternative It participates in the subsequent second-stage filtering (adaptive Kalman filtering) process.
[0144] Example 3
[0145] Based on Example 1, this embodiment further introduces an event freezing mechanism to prevent the actual VOCs concentration mutation signal from being over-smoothed by the filter or mistakenly subtracted as baseline drift.
[0146] Implementation of the event freeze mechanism
[0147] Calculate the filter residual ,in This is the original concentration signal. This is the first-stage filtered signal (the signal after baseline removal).
[0148] Calculate the rolling standard deviation of the residuals The scrolling window length is set to 30 sampling points (corresponding to 30 seconds). Calculated recursively using the following formula:
[0149]
[0150] in This represents the mean of the residuals within the window.
[0151] Event determination and freeze triggering:
[0152] when When this occurs, it is determined to be a VOCs pollution event, triggering an event freeze state.
[0153] Let's illustrate this with a set of example data: Suppose the residual at a certain time... Rolling standard deviation ,but , This triggers an event freeze.
[0154] Operations while the event is frozen:
[0155] 1. Pause the iterative updates of the filter parameters in the multi-stage adaptive filtering process; the filter parameters at each stage remain at their values from the moment before entering the frozen state. This is the Kalman filter. , The window length and order of the SG filter remain unchanged.
[0156] 2. The process noise covariance of adaptive Kalman filtering Setting it to zero puts the Kalman filter in a "locked" state, preventing additional smoothing of the event signal and thus preserving the amplitude and shape of concentration abrupt changes.
[0157] Event termination determination and recovery:
[0158] Continuous monitoring of residuals ,when Return to Within and continue After sampling points, the event freeze state is lifted. In this embodiment, the sampling frequency is 1 Hz. A 10-second interval is used to ensure that the event has indeed ended, while avoiding slow recovery that could affect subsequent tracking.
[0159] After the freeze is lifted:
[0160] 1. Resume iterative updates of filtering parameters at each level, and adaptively adjust each parameter according to the current identification stage.
[0161] 2. Process noise covariance of adaptive Kalman filtering Revert to the normal mode that adapts to the phase (as described in Example 1: rise / decline phase) Stable / Ending Period ).
[0162] The introduction of the event freeze mechanism effectively avoids the following two common problems: (1) rise time delay caused by filter response lag when concentration surges; (2) peak underestimation caused by concentration surge signal being mistakenly treated as baseline drift and partially subtracted.
[0163] Example 4
[0164] This embodiment, based on Embodiment 1, further introduces a rapid response procedure for leaks to deal with sudden VOCs leak events.
[0165] Implementation of rapid response to leaks
[0166] Real-time monitoring of the temporal rise rate of the preprocessed concentration signal, wherein the temporal rise rate is the first-order difference of the preprocessed concentration signal:
[0167]
[0168] in This is the concentration signal after preprocessing.
[0169] The preset leakage threshold is 5 times the fluctuation threshold (1.50) in Example 1, that is, leakage threshold = 7.50 ppm / sampling point.
[0170] when When the incident is identified as a sudden leak, a rapid leak response is triggered.
[0171] 1. Immediately switch the sliding window's window length to the minimum window length. Multiple sampling points ensure the fastest response time.
[0172] 2. Pause the updating of filter parameters for multi-level adaptive filtering (maintain the current values of filter parameters at each level) to avoid filter response lag affecting the rapid tracking of leakage concentration.
[0173] Let's illustrate with an example set of data: Suppose that at a certain moment the concentration jumps from 5.2 ppm to 13.8 ppm (a change of 8.6 ppm within one sampling point), then... This triggers a rapid response to the leak. The window length immediately switches from the current value (let's say 30) to 5, the filter parameters freeze, and priority is given to responding to sudden changes in concentration.
[0174] Continuously monitor the rate of increase, when After the leakage threshold drops below the threshold and remains below it for 5 consecutive sampling points, the rapid response state for leakage is lifted, and the window length and filtering parameters are restored to the normal adjustment mode based on the current stage.
[0175] Rapid response mechanism for leaks and routine window adjustment during the concentration rise phase (window length = base length) Compared to the previous method, the window is further compressed to the minimum (5), and the filtering parameters are frozen to deal with sudden leaks with the most aggressive configuration and minimize response delay.
[0176] Example 5
[0177] This embodiment provides a lightweight implementation scheme suitable for resource-constrained devices such as embedded VOCs data acquisition instruments or portable PID detectors.
[0178] Constraint 1: Replace the floating-point Gaussian kernel with an integer triangular kernel.
[0179] Replace the floating-point exponent decay weight in Example 1 with an integer triangular kernel:
[0180] make For the first in the window Data points from the current time Time interval ( ),but:
[0181]
[0182] in , For positive integers, satisfying .
[0183] In this embodiment, take , (Set the weight of the oldest point to 0), then:
[0184]
[0185] That is, the latest data point in the window ( The weight is The oldest data point ( The weight is 0, and the weight of the intermediate point varies. Linearly decreasing.
[0186] Based on window length For example, the weight sequence is [14,13,12,…,1,0] (from newest to oldest). This integer triangular kernel does not require floating-point operations or exponential operations, only integer subtraction and multiplication, which greatly improves computational efficiency.
[0187] When using a weighted average, first calculate the weighted sum. Then divide by the weights. Weights and Pre-calculation and storage can be performed, avoiding online computation. , , For example, It can be stored in advance.
[0188] Constraint 2: Pre-calculation and table lookup of filter parameters
[0189] For each stage type and possible combinations of temporal structure features, pre-calculate the filter parameters for each group in offline mode:
[0190] Background Stable Period Low — 0.3 15 3 Concentration rise period middle powerful 3.0 7 2 Peak concentration period high weak 1.0 11 3 Concentration decay period middle Strong (Negative) 3.0 7 2 Event End Period Low — 0.3 15 3
[0191] At runtime, the corresponding filter parameters are retrieved from a table based on the real-time identified stage and time-series structural features (mean, standard deviation, trend strength, mean rate of change, extreme value ratio, and fluctuation pattern), without the need for online calculation.
[0192] Constraint 3: Shift operations replace multiplication operations
[0193] The weight coefficients of the parameter optimization objective function , , Take as Form, in which For non-negative integers:
[0194]
[0195]
[0196]
[0197] (The three coefficients can also take different values, such as...) , , )
[0198] but In calculations, multiplication ( The index value can be replaced with a right shift operation (index value). This significantly reduces computational overhead.
[0199] Taking a typical embedded platform (Cortex-M4 architecture, 168MHz) as an example, actual tests show that: floating-point exponential decay weight calculation requires approximately 120 CPU cycles, integer trigonometric core calculation requires approximately 5 CPU cycles; floating-point multiply-accumulate operation requires approximately 8 CPU cycles, and shift operation requires approximately 1 CPU cycle. After adopting the lightweight solution in this embodiment, the total number of CPU cycles for a single filtering calculation is reduced from approximately 2000 cycles to approximately 200 cycles, a reduction of 90%, making it suitable for real-time operation on resource-constrained embedded platforms.
[0200] Example 6
[0201] Based on Example 1, this embodiment further includes a real-time filter quality evaluation step, which is used to monitor the filtering effect and trigger parameter re-optimization when the filter quality deteriorates.
[0202] Calculation of filter quality evaluation index
[0203] Calculate filter quality evaluation metrics :
[0204]
[0205] in This represents the variance of the original concentration signal within the current sliding window. This represents the variance of the filtered concentration signal within the current sliding window.
[0206] Let's illustrate with a set of example data: Assume the variance within the original signal window... Variance within the filtered signal window ,but:
[0207]
[0208] This indicates that the filter removed 90% of the variance (noise) from the original signal, demonstrating a good filtering effect.
[0209] If the filtering effect decreases, such as , ,but:
[0210]
[0211] Parameter re-optimization trigger
[0212] when When the value falls below a preset threshold, the filter parameters are re-optimized. In this embodiment, the preset threshold is set to 30%.
[0213] After triggering re-optimization, a search is performed in the predefined parameter combination space to make... The maximum possible combination of parameters. The search space includes: Kalman filtering... The parameters are: coefficients (0.1-5.0, step size 0.1), window length of the SG filter (5-21, step size 2), and polynomial order (2-4). After finding the optimal parameter combination through traversal search or gradient descent, the current filter parameters are updated.
[0214] Real-time evaluation of filter quality and inversion reliability index in Example 5 Forming a two-layer quality control system: Monitor the quality of the filtering process (signal processing layer). The quality of the monitoring inversion results (concentration output layer) is monitored. The two monitoring layers complement each other to jointly ensure the long-term stable operation of the system.
[0215] Example 7: Application Case – Online Monitoring of VOCs in Industrial Parks
[0216] This embodiment applies the above method to an online VOCs monitoring station at the boundary of a chemical industrial park.
[0217] System Configuration
[0218] Sensor: PID sensor, range 0-100 ppm
[0219] Sampling frequency: 1 Hz
[0220] Signal processing platform: Embedded industrial computer (ARM Cortex-A8 architecture, 600MHz clock speed)
[0221] Communication method: 4G wireless transmission to the central server
[0222] Running process
[0223] The monitoring station operates continuously, with sensors collecting VOCs concentration signals in the air in real time. After preprocessing (7-point sliding median filtering), the signals enter the stage identification module.
[0224] Scene 1: Normal Background
[0225] Between 10:00 and 12:00 on a certain day, the production load in the industrial park was low, and the sensor output concentration fluctuated between 0.5 and 1.2 ppm. Standard deviation within the window The background was determined to be in a stationary phase. Window length = 30, step size = 5, Kalman filter. SG window = 15 / order = 3. The concentration output is stable after filtering. .
[0226] Scenario 2: Concentration Increase Event
[0227] At 12:30, a device in the park began to emit pollutants, and the sensor concentration rose continuously from 1.0 ppm to 25.0 ppm (over a period of about 40 seconds). Continue to increase to , ( This indicates a concentration rise phase. The window length is automatically shortened to 15, and the step size is shortened to 1. Kalman spectroscopy is used. Zoom in The SG window is shortened to 7 / order reduced to 2. The system quickly tracks the concentration rise, with a rising edge delay of approximately 3-5 seconds.
[0228] Scenario 3: Peak Value and Attenuation
[0229] At 12:31, the concentration reached a peak of approximately 28.0 ppm. Falling back to The standard deviation within the window increased to 1.50 ppm, indicating the peak concentration period. The window length was increased to 45, and the step size to 3, to enhance the smoothing of peak fluctuations. Subsequently, emissions ceased, and the concentration began to decline. Turn to negative value and This indicates a concentration decay period, so the window length is shortened to 15 and the step size is shortened to 1 to quickly track the concentration decrease.
[0230] Scenario 4: End of the event
[0231] At 13:00, the concentration returned to below 1.5 ppm. Standard deviation The event is considered to have ended. The window length is restored to 30, the step size is restored to 5, and the filter parameters are restored to stable mode.
[0232] Performance evaluation
[0233] Actual measurement data from a boundary monitoring station in a chemical industrial park, operating continuously for 30 days, indicates the following key performance indicators:
[0234] average (Compared with a weekly GC-MS reference): 0.35 ppm
[0235] average 0.92
[0236] Average processing latency: 2.8 seconds
[0237] Average tracking delay on rising edge: 4.2 seconds
[0238] Peak average overshoot: 3.2%
[0239] Average recovery time for attenuation trail: 12 seconds
[0240] In comparison, the control scheme using "five-stage recognition + fixed window length + fixed Kalman and Savitzky-Golay filter parameters (non-linked)" had an average rising edge tracking delay of 9.5 seconds, an average peak overshoot of 8.7%, and an average decay tail recovery time of 28 seconds under the same test conditions.
[0241] The above data shows that the method of the present invention significantly improves the response speed and peak fidelity during the concentration change stage while maintaining high filtering accuracy.
[0242] Example 8: Parameter Selection and Threshold Calibration Guide
[0243] Window length parameter
[0244] Base window length It should be determined based on the sensor sampling frequency and the time scale of VOCs concentration changes. General principle:
[0245] When the sampling frequency is 1 Hz, Select 20-40 (corresponding to 20-40 seconds).
[0246] At a sampling frequency of 0.5 Hz, Select 10-20 (corresponding to 20-40 seconds).
[0247] When the sampling frequency is 2 Hz, Select 40-80 (corresponding to 20-40 seconds).
[0248] Right now The corresponding actual time span should be 20-40 seconds to cover the time scale of typical VOCs concentration changes.
[0249] Adaptive coefficient: 0.3-0.7 during the rise / fall period (0.5 recommended), and 1.3-2.0 during the peak period (1.5 recommended).
[0250] Kalman filter parameters
[0251] Basic process noise covariance It should be determined based on the sensor noise level and the magnitude of concentration changes. General principle:
[0252] Low-noise sensors (such as PID controllers):
[0253] High-noise sensors (such as MOS):
[0254] First-stage coefficient (rise / decay period): 1.5-5.0 (3.0 recommended). The specific value is determined based on the rise / decay rate, according to... The absolute value is used to determine when The rate is faster when it is greater than twice the second trend threshold, so take a larger value (e.g., 4.0-5.0); otherwise the rate is slower, so take a smaller value (e.g., 1.5-2.5).
[0255] Second stage coefficient (stable / ending period): 0.1-0.8 (recommended 0.3).
[0256] Observation noise covariance ,in The standard deviation of the signal within the current window is estimated in real time.
[0257] Stage determination threshold
[0258] The percentage mapping relationship between each threshold and the sensor range is as follows (taking a PID sensor as an example):
[0259] First trend threshold Measuring range × 0.15% 0.15 Second trend threshold Measuring range × 0.50% 0.50 Third trend threshold Measuring range × 0.20% 0.20 First standard deviation threshold Measuring range × 0.30% 0.30 ppm Second standard deviation threshold Measuring range × 1.00% 1.00 ppm First difference threshold Measuring range × 0.20% 0.20 ppm Volatility threshold Measuring range × 1.50% 1.50
[0260] For MOS sensors (which typically have a large range, such as 0-1000 ppm), the above percentage mapping relationship also applies, with the specific values scaled proportionally to the range.
[0261] Relevant parameters
[0262] Preset threshold: 0.85 (corresponding to) No more than 15%
[0263] (Number of points consistently below the threshold): 3-10 (5 recommended)
[0264] (Phase switch confirmation points)
[0265] (Recommendation 5), the value should take into account the sampling frequency: the higher the sampling frequency, The value can be increased appropriately to enhance the anti-shake effect; the lower the sampling frequency, the lower the value should be to avoid excessive response delay.
[0266] #imgpt327# (Event freeze recovery confirmation points)
[0267] #imgpt328# (10 is recommended), the value selection principle is similar to #imgpt329#.
[0268] Industrial applicability
[0269] The volatile organic compound (VOC) concentration detection signal processing method based on sliding window temporal filtering provided by this invention can be widely applied to various VOC concentration detection scenarios. Specifically:
[0270] In the field of online monitoring of VOCs in ambient air, this invention can be deployed at fixed monitoring sites such as urban air quality monitoring stations and industrial park boundary monitoring stations to monitor the concentration of VOCs in the air in real time, continuously and with high precision, providing reliable data support for air pollution prevention and control.
[0271] In the field of industrial park pollution source emission monitoring, this invention can be integrated into the enterprise emission outlet VOCs online monitoring system to effectively cope with complex operating conditions such as rapid changes in emission concentration and multi-component interference, and provide an accurate basis for determining whether pollution source emissions meet standards.
[0272] In the field of indoor air quality monitoring, this invention can be applied to indoor air quality monitoring equipment in public places such as shopping malls, office buildings, schools, and hospitals to detect indoor VOCs concentration levels in real time and protect people's health.
[0273] In the field of portable VOCs detection, the lightweight implementation scheme provided by this invention makes it particularly suitable for operation on resource-constrained embedded platforms. It can be integrated into portable PID detectors, handheld VOCs inspection instruments and other devices to meet the needs of rapid on-site detection and emergency monitoring.
[0274] The method of this invention can be implemented by software programs and run on general-purpose computers, embedded processors, or dedicated signal processing chips. It has good portability and scalability and is suitable for industrial production and widespread application.
[0275] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Various changes made within the scope of knowledge possessed by those skilled in the art without departing from the concept of the present invention still fall within the scope of protection of the present invention.
Claims
1. A method for processing volatile organic compound (VOC) concentration detection signals based on sliding window temporal filtering, characterized in that, Includes the following steps: S1: Real-time acquisition of the raw concentration signal output by the volatile organic compound concentration detection sensor and preprocessing to obtain the preprocessed concentration signal sequence; S2: Calculate the time-series characteristic parameters based on the preprocessed concentration signal sequence, and identify the stage of the volatile organic compound concentration signal in the pollution process at the current moment according to the time-series characteristic parameters; The time-series characteristic parameters include trend strength indicators. and rate of change volatility indicators ; The trend strength index Calculate using the following formula: In the formula, For the time index of data points within the short time window, For the first Concentration values at each sampling point This represents the average of the time indices within the window. The average concentration within the window; The rate of change volatility indicator Calculate using the following formula: In the formula, For short-time window length, It is a first-order difference. This is the mean of the first-order differences within the window; The volatile organic compound (VOC) concentration signal in the pollution process is divided into four stages: background plateau, concentration rise, concentration peak, concentration decay, and event end. Stage switching can only be confirmed after multiple consecutive sampling points meet the switching conditions. S3: Based on the identified stage, a sliding window is dynamically constructed, and the window length and sliding step size of the sliding window are adaptively adjusted. Weights are assigned to the data points within the sliding window according to their time distance; data points closer to the current time have greater weights. The weights are calculated using the following formula: In the formula, For the current moment, and For the time index of data points within the window, For window length, The attenuation coefficient and ; S4: Based on the identified stage and the temporal structure characteristics of the sliding window, perform multi-level adaptive filtering on the concentration signal to obtain the filtered concentration signal; The multi-stage adaptive filtering process includes at least three stages of filtering performed sequentially: a first-stage filtering, a second-stage filtering, and a third-stage filtering. First-stage filtering: A sliding window polynomial fitting method is used to estimate and subtract the sensor baseline drift in the concentration signal to obtain the first-stage filtered signal, denoted as [the first-stage filtered signal is not specified in the original text]. ; Second-stage filtering: Adaptive Kalman filtering is used to suppress intermediate frequency noise in the first-stage filtered signal; the process noise covariance of the adaptive Kalman filtering is adaptively adjusted according to the identified stage: it is amplified during the concentration rise and concentration decay periods, and reduced during the background plateau and event end periods. The observation noise covariance is estimated in real time based on the statistical properties within the sliding window; Third-stage filtering: Adaptive Savitzky-Golay filtering is used to suppress high-frequency random noise in the second-stage filtered signal; the filter window length and polynomial order of the adaptive Savitzky-Golay filter are adaptively adjusted according to the current stage and the timing characteristics within the sliding window; S5: Perform concentration inversion on the filtered concentration signal to obtain the volatile organic compound concentration value, and optimize the processing parameters in S2 to S4 based on the inversion reliability index. The inversion reliability index is calculated using the following formula: In the formula, For the standard error estimation of concentration inversion, The value of volatile organic compound concentration obtained from the inversion; When the inversion reliability index remains below a preset threshold, the adaptive coefficient of the window length and the filtering parameters of the multi-level adaptive filter are adjusted; the adjustment is based on a parameter optimization objective function, which is: In the formula, A set of adjustable parameters. The root mean square error, To handle delays, , , These are the weighting coefficients; The objective function for parameter optimization undergoes a complete optimization process during offline calibration or periodic maintenance. These are the reference concentration values obtained by the reference instrument during the corresponding time period; When parameter adjustments are triggered during the online operation phase, incremental adjustments are made based on the most recent offline optimization results.
2. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, In S2, the number of consecutive sampling points The value range is 3 to 10; in S4, the process noise covariance is multiplied by a first-stage coefficient during the concentration rise and decay periods, with the preferred range of the first-stage coefficient being 1.5 to 5.0, and multiplied by a second-stage coefficient during the background plateau and event end periods, with the preferred range of the second-stage coefficient being 0.1 to 0.8; the observation noise covariance is equal to the square of the standard deviation within the sliding window; in S5, the preferred value of the preset threshold is 0.85, and "constantly below" refers to continuous... sampling points The values are all lower than the preset threshold. The value range is from 3 to 10.
3. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, In step S2, the following determination rules are used to identify the stage: When the absolute value of the trend strength index is less than the first trend threshold, the standard deviation is less than the first standard deviation threshold, and the absolute value of the first difference at the current moment is less than the first difference threshold, it is determined to be a background stationary period. When the trend strength index is greater than the second trend threshold, the first difference at the current moment is positive, and the rate of change volatility index is less than the volatility threshold, it is determined to be a period of rising concentration. When the absolute value of the trend intensity index is less than the third trend threshold, the standard deviation is greater than the second standard deviation threshold, and the previous stage is a concentration rise period, it is determined to be a concentration peak period. When the trend intensity index is less than the negative second trend threshold, the first difference at the current moment is negative, and the rate of change volatility index is less than the volatility threshold, it is determined to be a concentration decay period. When the absolute value of the trend intensity index is less than the first trend threshold, the standard deviation is less than the first standard deviation threshold, and the previous stage is a concentration decay period, it is determined to be the event end period. The first trend threshold, the second trend threshold, the third trend threshold, the first standard deviation threshold, the second standard deviation threshold, the first difference threshold, and the volatility threshold are all preset values, calibrated based on the range of the volatile organic compound concentration detection sensor.
4. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, In step S3, the window length is adaptively adjusted according to the following strategy: During the background stabilization period and the event termination period, the window length is equal to the base length; During the concentration rise and concentration decay periods, the window length is equal to the base length multiplied by an adaptive coefficient less than 1; During the peak concentration period, the window length is equal to the base length multiplied by an adaptive coefficient greater than 1; The sliding step size uses the first step size during the concentration rise and concentration decay periods, the second step size during the concentration peak period, and the third step size during the background plateau period and the event end period; the first step size is smaller than the second step size, and the second step size is smaller than the third step size.
5. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, The sensor is a photoionization detection sensor or a metal oxide semiconductor sensor; in step S4, after the first-stage filtering and before the second-stage filtering, the first-stage filtered signal is further subjected to hysteresis compensation based on the sensor adsorption-desorption hysteresis model, and the compensated signal is used to replace the first-stage filtered signal to participate in the subsequent second-stage filtering process. The hysteresis compensation is implemented using the following recursive formula: in, This is the first-stage filtered signal. The signal after hysteresis compensation; coefficient , Adsorption time constant of the sensor and desorption time constant It is obtained by mapping in the following way: In the formula, The sampling period is The hysteresis loop coefficient; , , The results are obtained by fitting the rising and falling segments of the impulse response of the sensor to a known concentration of volatile organic compounds during calibration, and a lookup table is established according to the sensor type.
6. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, It also includes an event freezing mechanism: Calculate the filter residual rolling standard deviation ,in This is the original concentration signal. This is the first-stage filtered signal; when The event was determined to be a volatile organic compound (VOC) pollution event, triggering an event freeze state. In the event-frozen state, the iterative update of the filter parameters of the multi-level adaptive filter is paused, and the filter parameters of each level are maintained at the values before entering the frozen state. At the same time, the process noise covariance of the adaptive Kalman filter is set to zero. When the event ends and Return to Within and continue After sampling points, the frozen state is lifted, and the iterative update of the filtering parameters at each level resumes. The process noise covariance of the adaptive Kalman filter is restored to the normal mode of adaptive adjustment according to the stage as described in claim 1.
7. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, In step S1, the preprocessing includes using a sliding median filter with a fixed odd-number window to suppress impulse noise in the original concentration signal. The window length of the fixed odd-number window is between 5 and 9 sampling points.
8. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, It also includes rapid response procedures for leaks: Real-time monitoring of the temporal rise rate of the preprocessed concentration signal, wherein the temporal rise rate is the first-order difference of the preprocessed concentration signal; When the rate of increase exceeds the preset leakage threshold, the window length of the sliding window in S3 is immediately switched to the minimum window length, and the update of the filter parameters of the multi-level adaptive filter is paused. The preset leakage threshold is 3 to 10 times the volatility threshold in claim 3.
9. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to any one of claims 1 to 8, characterized in that, The method is executed in an embedded volatile organic compound (VOC) data acquisition instrument or a portable photoionization detector, and satisfies at least one of the following lightweight constraints: The weighting kernel of the sliding window uses an integer triangular kernel instead of a floating-point Gaussian kernel, specifically: Let For the first in the window Data points from the current time The time interval, then ,in , For positive integers, satisfying , Given the current sliding window length, such that It is a non-negative integer and follows Decrease and increase; The filtering parameters of the adaptive Kalman filter and the adaptive Savitzky-Golay filter are pre-calculated and stored as a constant table, and are called by looking up the table at runtime according to the real-time identified stage and time sequence structure characteristics. The weight coefficients of the parameter optimization objective function , , Take as The form replaces multiplication with bit shifting operations.
10. The method for processing volatile organic compound concentration detection signals based on sliding window temporal filtering according to claim 1, characterized in that, S4 also includes a real-time filter quality assessment step: Calculate filter quality evaluation metrics : In the formula, The variance of the original concentration signal within the sliding window. The variance of the filtered concentration signal within the sliding window; When the filter quality evaluation index is lower than the preset threshold, the filter parameters are re-optimized.
Citation Information
Patent Citations
A method for optimizing the processing of hazardous gas concentration monitoring data
CN116955940B
A method for monitoring and treating tail gas of a coating and recycling integrated machine
CN118395090B
Gas detection method, device, program product and medium with intelligently improved accuracy
CN118566443B
Adaptive filtering real-time continuous analyte measurement method and device
CN120072330A