A data analysis method and system for formaldehyde detectors
By optimizing the heat treatment parameter sequence of sensor materials and constructing a frequency matching model, the problems of slow response speed, insufficient sensitivity and low detection accuracy of sensors in complex environments were solved, achieving high-performance formaldehyde detection.
Patent Information
- Application Number
- CN202511415287.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-09-30
AI Technical Summary
Improper heat treatment processes in sensor materials result in slow response speed, insufficient sensitivity, and low detection accuracy. In particular, it is difficult to achieve rapid, sensitive, and accurate formaldehyde detection in complex environments. Existing methods are inefficient in terms of iterative efficiency, as they cannot simultaneously achieve multi-objective optimization and parameter adjustment.
By acquiring temperature fluctuation and microstructure data of sensor materials, optimizing the heat treatment parameter sequence, constructing a frequency matching model using particle swarm optimization algorithm and finite element analysis method, and verifying the detection accuracy using support vector machine algorithm, multi-stage optimization of the sensor is achieved.
It improves the sensor's response speed, sensitivity, and accuracy in detecting low-concentration formaldehyde, making it suitable for high-performance detection in complex environments.
Smart Images

Figure CN120891158B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a data analysis method and system for formaldehyde detectors. Background Technology
[0002] In formaldehyde detection scenarios, sensor materials often suffer from slow response speed, insufficient sensitivity, and low detection accuracy due to suboptimal microstructure caused by improper heat treatment processes. This problem stems from the failure to effectively optimize parameters such as temperature control, heating / cooling rates, and holding time during heat treatment. This makes it difficult to achieve a suitable grain size, porosity, and defect density distribution for formaldehyde molecule adsorption and signal conversion, thus affecting the sensor's rapid response capability and signal output stability in low-concentration formaldehyde environments. Particularly in complex environments, such as those with interfering gases or humidity changes, the non-uniformity of the sensor's microstructure leads to resonant frequency shifts, resulting in poor frequency matching model compliance and impacting detection sensitivity. Furthermore, the unreasonable distribution of microstructural defects reduces signal amplification efficiency, making it difficult to meet high-precision detection requirements.
[0003] Furthermore, the optimization of heat treatment parameters lacks a systematic logical connection, and traditional methods struggle to balance multiple objectives, leading to difficulties in balancing response speed and sensitivity. This results in low iterative efficiency in parameter adjustments and an inability to adapt to detection scenarios with varying formaldehyde concentrations. These seemingly minor issues collectively constitute the core technical challenge for sensor materials to achieve rapid, sensitive, and accurate detection in complex environments. A systematic approach is urgently needed to resolve the complex relationship between heat treatment process parameters and microstructural characteristics to improve the overall performance of the sensor. Summary of the Invention
[0004] This application provides a data analysis method, system, and storage medium for formaldehyde detectors, which improves the overall performance of the sensor.
[0005] In a first aspect, this application provides a data analysis method for a formaldehyde detector, the data analysis method for a formaldehyde detector comprising:
[0006] Acquire temperature fluctuation data and microstructure data of sensor materials during heat treatment, extract microstructure features, and obtain initial distribution parameters;
[0007] Optimize the heat treatment parameter sequence based on the initial distribution parameters;
[0008] The sensor material is processed according to the heat treatment parameter sequence to obtain adjusted microstructure data;
[0009] The response speed index is calculated based on the adjusted microstructure data. If the response speed index is lower than the preset response threshold, the heat treatment parameter sequence is iteratively optimized to obtain an improved heat treatment parameter sequence.
[0010] Based on the improved heat treatment parameter sequence, resonant frequency-related variables are extracted, and the frequency matching effect is simulated using the finite element analysis method to obtain a frequency matching model.
[0011] A virtual test scenario is generated based on the frequency matching model. It is determined whether the sensitivity index exceeds the preset sensitivity threshold. If so, the frequency matching model is confirmed to be effective, and the sensor optimization configuration is determined.
[0012] A validation dataset is constructed based on the optimized sensor configuration, and a classification algorithm is used to obtain the detection accuracy index.
[0013] Secondly, this application provides a data analysis system for a formaldehyde detector, the data analysis system for the formaldehyde detector comprising:
[0014] The data acquisition module is used to acquire temperature fluctuation data and microstructure data of sensor materials during heat treatment, extract microstructure features, and obtain initial distribution parameters.
[0015] The parameter optimization module is used to optimize the heat treatment parameter sequence based on the initial distribution parameters;
[0016] A sequence processing module is used to process the sensor material according to the heat treatment parameters to obtain adjusted microstructure data.
[0017] The response evaluation module is used to calculate the response speed index based on the adjusted microstructure data. If the response speed index is lower than the preset response threshold, the heat treatment parameter sequence is iteratively optimized to obtain an improved heat treatment parameter sequence.
[0018] The frequency matching module is used to extract resonant frequency-related variables based on the improved heat treatment parameter sequence, and to simulate the frequency matching effect using the finite element analysis method to obtain a frequency matching model.
[0019] The sensitivity verification module is used to generate a virtual test scenario based on the frequency matching model, determine whether the sensitivity index exceeds the preset sensitivity threshold, and if so, confirm that the frequency matching model is effective and determine the optimized configuration of the sensor.
[0020] The accuracy verification module is used to construct a verification dataset based on the optimized configuration of the sensor and to obtain the detection accuracy index using a classification algorithm.
[0021] This invention discloses a method for optimizing the heat treatment process of sensor materials to improve detection performance. Addressing the challenges of slow response, insufficient sensitivity, and low detection accuracy in formaldehyde detection scenarios, this invention proposes a logically interconnected solution. By collecting temperature and microstructure data during the heat treatment process, this invention extracts features such as grain size distribution, porosity, and defect density to construct initial distribution parameters. Then, a particle swarm optimization algorithm is used to generate an optimized heat treatment parameter sequence, adjusting the heating rate, cooling rate, and holding time to improve the microstructure. If the response speed does not meet the target, the parameter sequence is iteratively optimized, further extracting resonant frequency-related variables. A frequency matching model is constructed using finite element analysis, and sensitivity is verified in a virtual test scenario. A support vector machine algorithm is used to generate a verification dataset, and the detection accuracy is calculated. This invention improves the response speed, sensitivity, and accuracy of sensors in low-concentration formaldehyde detection through multi-stage optimization, achieving systematic optimization of high-performance sensor configuration, suitable for precise detection needs in complex environments. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of an embodiment of the data analysis method for a formaldehyde detector in this application;
[0024] Figure 2 The flowchart of the optimized closed-loop control system for the formaldehyde sensor in this application is shown below;
[0025] Figure 3 A visualization of the sensor frequency response characteristics of the formaldehyde detector in this application;
[0026] Figure 4 This is a schematic diagram of the data analysis system used in the formaldehyde detector in this application. Detailed Implementation
[0027] This application provides a data analysis method and system for a formaldehyde detector. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0028] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the data analysis method for a formaldehyde detector in this application includes:
[0029] Step S1: Obtain temperature fluctuation data and microstructure data of sensor material during heat treatment, extract microstructure features, and obtain initial distribution parameters.
[0030] Specifically, during the heat treatment of sensor materials, temperature fluctuation data is collected in real time by deploying temperature sensors, and microstructure images of the material at different stages are acquired using image acquisition equipment. Fusing these two types of data comprehensively reflects the thermodynamic characteristics and structural evolution laws during the heat treatment process. Image processing algorithms are used to preprocess and extract features from the acquired microstructure images, including edge detection, region segmentation, and texture analysis, thereby obtaining clear outlines of grain boundaries and distribution information of pores and defects. These features are dynamically correlated with temperature curves to reveal the impact of temperature fluctuations on microstructure formation. Statistical and modeling methods are used to calculate the distribution of grain size, the amplitude of porosity variation, and the spatial distribution characteristics of defect density, and these parameters are quantified to form initial distribution parameters that represent the overall microstructure state of the material, providing a foundation for optimizing heat treatment parameters and improving sensor performance.
[0031] Step S2: Optimize the heat treatment parameter sequence based on the initial distribution parameters.
[0032] Specifically, using initial distribution parameters as boundary conditions and prior constraints, the variables to be optimized in the heat treatment mathematical model are set as heating rate, cooling rate, and holding time. The model employs a combination of multi-objective functions and constraints, focusing on minimizing microstructural heterogeneity, maximizing response speed, and limiting thermal stress. Subsequently, a particle swarm optimization algorithm is introduced to perform a swarm search and iterative update of the parameter space. Fitness evaluation is used to correlate indicators such as grain size distribution, porosity, and defect density in real time. A balance between exploration and convergence is achieved using a strategy of decreasing inertial weights and guiding individual / global extrema. In each iteration, the model is invoked to perform a linked simulation of temperature history, microstructure, and performance, selecting feasible solutions that meet the requirements of equipment power, heating / cooling gradients, and safety thresholds. When the fitness improvement stabilizes or reaches the termination criterion, the optimal heat treatment parameter sequence consisting of heating-holding-cooling stages is output, forming a benchmark scheme for subsequent verification and closed-loop correction.
[0033] Step S3: Process the sensor material according to the heat treatment parameter sequence to obtain the adjusted microstructure data.
[0034] Specifically, the determined optimal heat treatment parameter sequence is imported into the temperature control system, and the sensor material is subjected to controlled processing according to the time-temperature curve of "heating-holding-cooling". Simultaneously, furnace temperature and sample point temperature are sampled and recorded at the second level, and thermal hysteresis is corrected. At key nodes, the temperature range is paused or slowed down, and in-situ or quasi-in-situ microstructure images and diffraction / spectral data are acquired to ensure a one-to-one correspondence between the temperature history and structural evolution. Subsequently, the acquired images are denoised and brightness equalized. Edge detection and Watershed segmentation are used to obtain grain boundaries, and Otsu or adaptive thresholding is combined to identify pores and defects. Further grayscale analysis is then performed. Texture and uniformity features are extracted using the generated matrix and multi-scale local binary mode, and the equivalent diameter of grains, porosity, defect density, and orientation distribution are vectorized. To reduce batch-to-batch imaging differences, embedded standard samples are used to correct pixel-scale relationships and contrast drift, and frame-temperature alignment is achieved through temperature synchronization signals. Finally, multi-source features are fused with process temperature, atmosphere, and timestamps to form a serialized dataset of structural features evolving with temperature and time. The output is "adjusted microstructure data" containing grain size distribution, porosity curves, defect density spectra, and texture uniformity indices, which are used for subsequent response evaluation and closed-loop optimization.
[0035] Step S4: Calculate the response speed index based on the adjusted microstructure data. If the response speed index is lower than the preset response threshold, iteratively optimize the heat treatment parameter sequence to obtain an improved heat treatment parameter sequence.
[0036] Specifically, features such as grain size distribution, porosity, and defect density from the "adjusted microstructure data" are input into the response prediction model. After feature normalization and temperature compensation, the response speed index is calculated and compared with a preset response threshold. If the index is lower than the threshold, the current optimal heating rate, cooling rate, and holding time are used as the initial solution. Combined with equipment power and safe temperature gradient constraints, the particle swarm optimization algorithm is used to iteratively optimize the thermal processing mathematical model. The particle position and velocity are updated by decreasing inertia weight and guiding individual / global extrema. Each simulation cycle writes back the new microstructure and re-evaluates the response speed until the threshold, fitness improvement convergence, or iteration upper limit is reached. Based on this, the improved thermal processing parameter sequence is output as the benchmark for subsequent closed-loop optimization.
[0037] Step S5: Extract the resonant frequency-related variables based on the improved heat treatment parameter sequence, and use the finite element analysis method to simulate the frequency matching effect to obtain the frequency matching model.
[0038] Specifically, based on the microstructure data corresponding to the improved heat treatment parameter sequence, material parameters closely related to resonance behavior, including equivalent Young's modulus, density, and loss factor, are calculated through a mapping model between structure and performance. These parameters are then interpolated and corrected based on temperature dependence. A three-dimensional geometric model of the sensor sensing element and support boundary is established in a finite element analysis platform. After mesh generation and convergence verification, actual constraints and load conditions are applied, and modal analysis is performed to obtain the intrinsic frequencies and mode shapes. Harmonic response frequency scanning is also conducted to obtain response curves between frequency and displacement or strain amplitude. Within the target operating frequency band, peak positions are identified, and the deviation from the target resonance frequency, bandwidth, and quality factor are calculated. The frequency shift effect caused by the coupling of temperature field and material parameters is considered, thus forming a logical relationship between heat treatment parameters, material parameters, and frequency response. Based on multiple sets of simulation samples, a frequency matching model is established using least squares fitting or Gaussian process regression methods. This model can predict the resonance frequency, frequency deviation, and quality factor under given heat treatment parameters and output corresponding matching degree indices, providing a basis for the generation and optimization configuration of virtual test scenarios.
[0039] Step S6: Generate a virtual test scenario based on the frequency matching model, and determine whether the sensitivity index exceeds the preset sensitivity threshold. If so, confirm that the frequency matching model is effective and determine the optimal configuration of the sensor.
[0040] Specifically, based on the established frequency matching model, a virtual test scenario is constructed, incorporating low-concentration formaldehyde disturbances, temperature and humidity fluctuations, and environmental noise. The model-predicted resonant frequency, frequency offset, and quality factor are mapped to the sensor output signal. Response trajectories are generated according to a set concentration step or pulse sequence, and calculated using sensitivity indices. Preset sensitivity thresholds and confidence lower limits are set, and the significance of the sensitivity distribution obtained from multiple simulations or Monte Carlo experiments is tested. If the weighted average sensitivity and its confidence lower limit are not lower than the threshold, the frequency matching model is deemed effective. Based on this, the corresponding heat treatment parameters and frequency calibration coefficients are backtracked to determine the optimal sensor configuration, including heating and cooling rates, holding time, frequency compensation factor, and temperature drift correction term. If the threshold requirements are not met, the mismatch condition is recorded for subsequent parameter iteration and model correction.
[0041] Step S7: Construct a validation dataset based on the optimized sensor configuration, and use a classification algorithm to obtain the detection accuracy index.
[0042] Specifically, under a defined sensor optimization configuration, different formaldehyde concentration levels and multiple temperature fluctuation ranges are set. Numerical simulations are performed using a frequency matching model and sensitivity parameters to generate sensor response signal samples covering multiple operating conditions, constructing a validation dataset containing concentration labels and corresponding signal features. The dataset is then preprocessed, including normalization, denoising, and feature extraction, converting variables such as response frequency offset, signal-to-noise ratio, and response time into feature vectors. In the classification stage, classification algorithms such as support vector machines or random forests are introduced to train and test the validation dataset. Model stability is evaluated through cross-validation, and accuracy, recall, and F1 score are calculated using a confusion matrix. Detection accuracy is used as the core evaluation criterion. If the result exceeds a preset threshold, the optimized sensor configuration is confirmed to be reliable and practical in complex environments; otherwise, the optimization process is returned to further adjust the heat treatment parameters and frequency matching model, thereby achieving closed-loop performance improvement.
[0043] It is understood that the executing entity of this application can be a data analysis system used for formaldehyde detectors, or it can be a terminal or a server; no specific limitation is made here. This application's embodiments use a server as an example for illustration.
[0044] In one specific embodiment, the process of performing step S1 may specifically include the following steps:
[0045] (1) Temperature fluctuation data during the heat treatment process is collected by sensors, and microstructure images are obtained by image acquisition equipment;
[0046] (2) For microstructure images, image processing algorithms are used to extract microstructure heterogeneity features;
[0047] (3) Based on the heterogeneity of the microstructure, calculate the grain size distribution, porosity and defect density of the microstructure;
[0048] (4) Determine the initial distribution parameters based on the grain size distribution, porosity and defect density.
[0049] Specifically, a sensor material sample is placed in a heat treatment furnace, and a thermocouple sensor is used to record the temperature change curve in real time, for example, acquiring a temperature value once per second during the heating phase. Simultaneously, a scanning electron microscope is used as an image acquisition device to pause the process at key points in the heat treatment and capture microscopic images of the material surface to capture structural details.
[0050] For microstructure images, image processing algorithms are employed to extract microstructural heterogeneity features. The acquired microstructure images undergo preprocessing, including grayscale conversion and noise removal, and median filtering is used to smooth the images to reduce interference. Edge detection algorithms, such as the Canny algorithm, are applied to identify grain boundaries and defect edges in the images, thereby extracting inhomogeneity features such as boundary discontinuities and regional variations. Based on the extracted edge information, statistical indices of the inhomogeneity features are calculated, such as regional contrast and texture entropy values, which reflect the structural heterogeneity of the material.
[0051] In one possible implementation, the image processing algorithm in this step can be extended to multi-scale analysis, such as first extracting macroscopic inhomogeneities at low resolution and then refining microscopic features at high resolution. This method helps identify local inhomogeneities caused by temperature fluctuations during the heat treatment of sensor materials, improving the accuracy of subsequent parameter calculations and enhancing the accuracy of material uniformity assessment. Based on the heterogeneity characteristics of the microstructure, the grain size distribution, porosity, and defect density of the microstructure are calculated. Using the extracted inhomogeneity features, such as boundary discontinuities, the Watershed segmentation algorithm is used to divide the grain regions, and the equivalent diameter of each grain is measured to generate a size distribution histogram. Porous regions in the image are identified through binarization, and the proportion of pore pixels to total pixels is calculated as the porosity. For example, if there are 5000 pore pixels and 100000 total pixels, the porosity is 0.05. Based on the texture entropy value and edge density, the defect density is quantified, for example, by counting the number of defect points per unit area. If there are 10 defect points per square micrometer, the density is 10 per square micrometer.
[0052] For example, in the heat treatment of sensor materials such as quartz crystals, the grain size distribution can show an average size of 20 micrometers and a standard deviation of 5 micrometers; a porosity of 0.03 and a defect density of 8 per square micrometer. This calculation process ensures a logical chain from non-uniform characteristics to quantifiable indicators, which has the benefit of providing a measurable benchmark for material properties, facilitating the optimization of heat treatment parameters.
[0053] In one embodiment, the calculation weights can be adjusted for different heat treatment stages, such as the annealing stage, for example, by increasing the focus on porosity, since bubble defects are more easily introduced during annealing. By testing multiple samples, such as sample A having a normal grain size distribution with a peak value of 15 micrometers, while sample B has a peak value of 20 micrometers, and combining this with defect density analysis, the specific impact of temperature fluctuations on the microstructure can be verified, thereby enabling targeted material improvements.
[0054] In one specific embodiment, the process of performing step S2 may specifically include the following steps:
[0055] (1) Construct a mathematical model of the heat treatment process based on the initial distribution parameters;
[0056] (2) Based on the mathematical model, the particle swarm optimization algorithm is used to simulate the adjustment of heating and cooling rates through iterative search.
[0057] (3) Based on the iterative results of the particle swarm optimization algorithm, determine the optimal combination of heating rate, cooling rate and holding time;
[0058] (4) Generate a heat treatment parameter sequence based on the optimized combination.
[0059] Specifically, a mathematical model of the heat treatment process can be constructed first based on initial distribution parameters. The distribution density and non-uniformity of the microstructure are introduced into the heat conduction equation to form a computational model that reflects the temperature change law of the material. The reliability of the model is verified by comparing the consistency between the simulated temperature curve and the actual collected data. Based on this, a particle swarm optimization algorithm is introduced based on the mathematical model to iteratively search and simulate the heating and cooling rates. Each particle represents a set of candidate parameter combinations, and its fitness function aims to minimize the heterogeneity of the microstructure, gradually approaching the optimal solution through continuous updates of position and velocity. During the iteration process, the heating rate, cooling rate, and calculated holding time corresponding to the global optimal solution are recorded and extracted, thereby obtaining a set of optimized parameter combinations that can effectively improve the microstructure of the material. The optimized heating, holding, and cooling stage parameters are arranged in chronological order to generate a complete heat treatment parameter sequence, providing a basis for process simulation and performance verification.
[0060] In one embodiment, the determined optimized combination can directly improve the heat treatment efficiency. For example, in ceramic sensor materials, the heating rate is 5°C / min, the cooling rate is 3°C / min, and the holding time is 30min. Compared with the initial parameters, the response speed index is improved by 15%, which is beneficial to the construction of the frequency matching model.
[0061] In one embodiment, the generated heat treatment parameter sequence closely follows the overall goal of optimizing the heat treatment parameter sequence. Through a logical chain from the initial distribution parameters to the final sequence, the microstructure optimization of the sensor material is achieved.
[0062] For example, in simulation adjustment, the principle is that each particle represents a point in the parameter space, and the optimal path is explored by updating the velocity. In practice, if the initial velocity is 10℃ / min and then adjusted to 5℃ / min, the analysis process shows that the microstructure uniformity increases from 70% to 90%, which supports the determination of the optimal combination. The beneficial effect is to reduce thermal stress and improve the sensor life.
[0063] In one specific embodiment, the process of performing step S3 may specifically include the following steps:
[0064] (1) Adjust the heating rate, cooling rate and holding time in the simulation environment according to the heat treatment parameter sequence;
[0065] (2) The sensor material sample was processed by simulating the environment to obtain the processed microstructure image;
[0066] (3) For the processed microstructure image, image processing algorithms are used to extract the adjusted structural features;
[0067] (4) Generate adjusted microstructure data based on the adjusted structural features.
[0068] Specifically, the heating rate, cooling rate, and holding time are set in a simulated environment according to the heat treatment parameter sequence, and the heat treatment process is run to ensure that the material completes the temperature history under controlled conditions. Sensor material samples are placed in this simulated environment for processing, and microstructure images are acquired at different key stages to visually reflect the grain evolution and defect changes of the material under heat treatment. Image processing algorithms are used to preprocess and extract features from the acquired microstructure images, including edge detection, region segmentation, and texture analysis, to identify adjusted structural features such as grain boundaries, porosity, and defect density. These structural features are then converted into numerical parameters that can be used for calculation and optimization through quantization and fusion methods, generating adjusted microstructure data.
[0069] Specifically, a sequence of heat treatment parameters is loaded into the simulation environment. For sensor materials such as quartz crystal microbalances, the heating rate is set to range from 5°C to 20°C per minute, the cooling rate to range from 3°C to 15°C per minute, and the holding time to range from 30 to 120 minutes, thus simulating the actual heat treatment process. This adjustment ensures that the material is heated uniformly during temperature changes, avoiding localized overheating that could lead to structural defects, and thus improving the material's stability.
[0070] In one embodiment, this step first loads a digital model of the sensor material sample, such as an initial model pre-acquired using a scanning electron microscope. Then, adjusted heating, cooling, and holding parameters are applied for virtual heat treatment, with the simulation lasting 2 to 4 hours. After processing, a high-resolution image, such as a 1024x1024 pixel grayscale image, is generated using a built-in imaging module to capture changes in the crystal arrangement within the material. This approach facilitates rapid iterative testing of the effects of different parameters on the microstructure without requiring actual physical experiments, thus reducing resource consumption.
[0071] For example, when processing sensor materials for detecting low concentrations of formaldehyde, the simulated environment can be set to a temperature fluctuation range from room temperature to 200 degrees Celsius. The acquired images show a structure with clearer grain boundaries, which is beneficial to the accuracy of subsequent feature extraction.
[0072] For example, in formaldehyde detection applications, this data generation process ensures logical continuity from image to data, and the generated uniform structure data can directly support the construction of frequency matching models, improving the accuracy of sensors in temperature fluctuation environments.
[0073] In one specific embodiment, the process of performing step S4 may specifically include the following steps:
[0074] (1) Based on the adjusted microstructure data, calculate the response rate index of the material under different temperature fluctuation data;
[0075] (2) If the response speed index is lower than the preset response threshold, adjust the inertia weight and learning factor of the particle swarm optimization algorithm;
[0076] (3) Rerun the particle swarm optimization algorithm based on the adjusted inertia weights and learning factors;
[0077] (4) Based on the results of the rerun of the particle swarm optimization algorithm, the improved heat treatment parameter sequence is obtained.
[0078] Specifically, the adjusted microstructure data is input into the response prediction model. Under multiple sets of set temperature fluctuation conditions, the response speed index is calculated and normalized, and compared with the preset response threshold to determine whether the current process meets the standard. If it does not meet the standard, the parameters of the particle swarm optimization algorithm are retuned by reducing or adaptively decreasing the inertia weight and adjusting the cognitive and social learning factors according to performance feedback to strengthen the balance between global exploration and local convergence. The current optimal parameter combination is used as the seed for swarm initialization or elite retention. The search range is constrained to meet the equipment power, temperature gradient and safety boundary. The simulation is iteratively run according to the standard speed and position update formula. In each round, the generated heating rate, cooling rate and holding time are sent into the heat treatment model to re-evaluate the response speed, and early stopping and convergence criteria are used to control the computational cost. When the index reaches the threshold or the fitness improvement tends to stabilize, the corresponding parameter combination is extracted as the improved heat treatment parameter sequence to provide a benchmark for subsequent verification and closed-loop optimization.
[0079] For example, during the optimization process of quartz crystal sensor materials, the initial microstructure parameters can be set as follows: average grain size of 18 micrometers, porosity of 0.03, and defect density of 8 per 1000 mm. These data were then incorporated into a mathematical model for heat treatment simulation. When using the particle swarm optimization algorithm, the initial number of particles was set to 50, the maximum number of iterations to 100, and the fitness function aimed at minimizing the variance of grain uniformity. During the iteration process, the heating rate was gradually adjusted between 4–6℃ / min and the cooling rate between 2–3℃ / min, and the holding time was calculated to be approximately 30 minutes. This heat treatment parameter sequence was then input into the simulation environment to obtain the processed microstructure image. The extracted grain size distribution showed a mean of 20. Variance from 5 Reduced to 2 The porosity decreased from 0.03 to 0.02, and the defect density decreased by approximately 15%. The adjusted microstructure data showed a significant improvement in structural homogenization. Further calculations of the response rate index showed that the material's response time under temperature fluctuations of 20–50°C was reduced from 1.2 seconds to 0.8 seconds, approaching the preset threshold of 0.75 seconds. Subsequently, the particle swarm optimization algorithm was re-run with adjusted inertia weights of 0.7 and learning factors of 1.8 and 2.2, resulting in an improved parameter sequence: heating rate of 5°C / min, holding time of 35 minutes, and cooling rate of 2.5°C / min. Based on this sequence, the elastic modulus of 200 GPa and density were extracted. The resonant peak frequency obtained by frequency scanning using the finite element method was 512 Hz, with a deviation of less than 2% from the target frequency, achieving an accuracy of 98% for the frequency matching model. In a virtual test scenario with a formaldehyde concentration of 0.05 ppm and a temperature fluctuation of ±15℃, the calculated sensitivity index was 0.82 Hz / ppm, exceeding the threshold of 0.6 Hz / ppm, thus confirming the effectiveness of the frequency matching model and determining the optimal sensor configuration. Finally, a validation dataset containing 1000 samples was generated based on this configuration, and a support vector machine classification algorithm was used for detection, achieving an accuracy of 96%, demonstrating that the optimized sensor has high response speed and high sensitivity in low-concentration formaldehyde detection. (Reference) Figure 2 The diagram illustrates the flow of the formaldehyde sensor optimized closed-loop control system.
[0080] In one specific embodiment, the process of performing step S5 may specifically include the following steps:
[0081] (1) Based on the improved heat treatment parameter sequence, extract the material elastic modulus and material density related to the resonant frequency;
[0082] (2) The finite element method was used to simulate the response of the material's elastic modulus and density at different frequencies;
[0083] (3) Construct a frequency matching model based on the simulation results;
[0084] (4) Determine the matching accuracy of the resonant frequency based on the frequency matching model.
[0085] In one embodiment, the improved heat treatment parameter sequence is obtained by iteratively adjusting the parameters of a particle swarm optimization algorithm. This sequence includes data such as heating and cooling rates, from which material elastic moduli, such as Young's modulus and density values, are extracted. These values directly affect the calculation of the resonant frequency; for example, the elastic modulus represents the material's resistance to deformation, and density affects mass distribution. Specific values are calculated using the microstructure data in the sequence, thus providing a basis for subsequent simulations. A finite element mesh model is constructed, dividing the sensor material sample into a finite number of elements, each assigned the extracted elastic modulus and density values.
[0086] In one embodiment, the finite element analysis method is a numerical simulation technique that discretizes a continuum into finite elements and simulates physical behavior by solving a system of partial differential equations. For example, in the simulation, the material's elastic modulus is set to 200 GPa, and its density is... By applying sinusoidal excitation with frequencies ranging from 100Hz to 1000Hz, calculating the response curve, and observing the peak displacement, we can reveal the frequency behavior of materials under temperature fluctuations and improve the stability of the sensor.
[0087] For example, in scenarios where the sensor material is a metal alloy, when simulating low-frequency response, density dominates the mass effect, resulting in a slow response. However, at high frequencies, the elastic modulus affects stiffness, leading to a sharper response. This approach can identify potential resonance points and avoid environmental interference.
[0088] In one embodiment, the frequency matching model is a mathematical expression obtained by fitting the response data using the least squares method, for example, the model form is: Where ω is the frequency, ω0 is the target resonant frequency, and A and b are parameters fitted based on simulation results, this model enables a quantitative evaluation of the matching effect, which is beneficial to the accuracy of the sensor in detecting low concentrations of formaldehyde. For example, in a virtual scenario with temperature fluctuations of ±10℃, the model was used to simulate matching, and the deviation was less than 5%, proving the effectiveness of the model and improving the detection accuracy.
[0089] In one embodiment, the matching accuracy is determined by calculating the root mean square error between the model's predicted frequency and the actual measurement. For example, an error of less than 2% is considered high accuracy. This directly supports the final optimized configuration of the sensor and is beneficial for generating virtual test scenarios and confirming the effectiveness of the model.
[0090] For example, if the matching accuracy reaches 98%, the model is confirmed to be suitable for formaldehyde detection, thus improving the response speed index.
[0091] Taking the optimized application of the formaldehyde detector sensor as an example, the improved heat treatment parameter sequence was set with a heating rate of 3℃ / min, a cooling rate of 2℃ / min, and a holding time of 40min. The extracted material elastic modulus was approximately 120 GPa, and the density was... After inputting the finite element analysis model, a mesh was created for the sample and divided into 12,000 elements. A sinusoidal excitation ranging from 100Hz to 800Hz was applied. The results showed a significant peak displacement near the target frequency of 420Hz, with the peak response amplitude being 1.4 times that of the initial state, verifying that the material's frequency response was enhanced after heat treatment. A frequency-matching model was obtained by fitting the simulation data using the least squares method, with the fitting function taking the form of… Where A is set to 0.85 and b to 1.2 × 10⁻⁴, the model's predicted resonant frequency deviates from the simulation result by less than 4 Hz, with a calculated root mean square error of approximately 1.5%, achieving a matching accuracy of 98.5%. Even in a virtual scenario with temperature fluctuations of ±15℃, the model can still stably predict frequency drift with a deviation of less than 5%. This indicates that optimizing the parameter sequence can effectively improve the stability and accuracy of the sensor in complex environments, providing a reliable basis for subsequent sensitivity verification and detection performance evaluation. (Reference) Figure 3 This figure is a visualization of the sensor frequency response characteristics of a formaldehyde detector.
[0092] In one specific embodiment, the process of performing step S6 may specifically include the following steps:
[0093] (1) Based on the frequency matching model, generate a virtual test scenario containing low-concentration formaldehyde and temperature fluctuation data;
[0094] (2) Calculate the sensitivity index of the sensor for the virtual test scenario;
[0095] (3) If the sensitivity index exceeds the preset sensitivity threshold, the frequency matching model is confirmed to be effective;
[0096] (4) Determine the optimal configuration of the sensor based on the frequency matching model.
[0097] In one embodiment, resonant frequency-related variables, such as frequency offset and damping coefficient, are extracted from the frequency matching model. These variables are derived from a sequence of heat treatment parameters adjusted by the particle swarm optimization algorithm and are used to simulate the sensor's response behavior in the environment.
[0098] Using the finite element analysis method, the extracted variables are input into the simulation environment to construct a virtual scene. The low concentration of formaldehyde is set to the range of 0.01ppm to 0.1ppm, and the temperature fluctuation is set to a random variation curve between -10 degrees Celsius and 50 degrees Celsius to ensure that the scene covers the actual application conditions after the microstructure of the sensor material is adjusted.
[0099] For example, in scenarios involving low-concentration formaldehyde, virtual testing uses a finite element mesh to divide the sensor surface, simulating the frequency shift caused by formaldehyde molecule adsorption. This, combined with the effect of temperature fluctuations on material expansion, generates dynamic response data. This approach allows for early verification of the stability of optimized parameters under complex environments, helping to reduce errors and costs in actual testing.
[0100] For example, assuming the formaldehyde concentration in the virtual scene is 0.02 ppm and the temperature fluctuation range is 20 degrees Celsius, the calculated sensitivity index is 0.8 ppm / Hz. After exceeding the threshold of 0.5 ppm / Hz, the model is confirmed to be effective. The subsequent optimized configuration includes adjusting the heat treatment parameter sequence to a heating rate of 3 degrees Celsius / minute and a cooling rate of 1.5 degrees Celsius / minute. This configuration, as shown by finite element simulation, improves the sensor response speed by 10% and increases the detection accuracy from 85% to 95% in subsequent support vector machine classification, demonstrating the key role of frequency matching in material optimization.
[0101] In one specific embodiment, the process of performing step S7 may specifically include the following steps:
[0102] (1) Based on the optimized configuration of the sensors, a verification dataset containing different formaldehyde concentrations and temperature conditions is generated;
[0103] (2) The support vector machine algorithm is used to classify the validation dataset;
[0104] (3) Calculate the detection accuracy index based on the classification results;
[0105] (4) Confirm the performance of the optimized sensor configuration based on the detection accuracy index.
[0106] Specifically, based on the final optimized sensor configuration, a formaldehyde concentration range from 0.01 ppm to 1 ppm was selected, and combined with temperature conditions from -10 degrees Celsius to 50 degrees Celsius, a dataset was simulated and generated, which included sensor response signal data.
[0107] Specifically, this implementation generates data from virtual test scenarios by optimizing the frequency matching model in the sensor configuration. For example, it collects response speed indicators under conditions of low formaldehyde concentration (0.05 ppm) and temperature fluctuations of 20 degrees Celsius, thereby constructing a validation dataset. This method can effectively simulate complex environments and improve the representativeness of the dataset.
[0108] For example, when generating the dataset, resonant frequency-related variables are first extracted from the optimized configuration, and then the frequency matching effect under different concentrations is simulated to obtain the response data. This extension can bring higher detection robustness because it takes into account the impact of temperature fluctuations on microstructure, leading to improved accuracy.
[0109] For example, assuming the validation dataset contains 1000 samples, 500 of which are low-concentration scenes, the accuracy calculation after classification by support vector machine shows a correct rate of 98%, which confirms the performance improvement of the configuration, especially the optimization of response speed under conditions of large temperature fluctuations.
[0110] Specifically, in one example, a dataset was simulated using an optimized sequence of heat treatment parameters, including formaldehyde concentrations of 0.1 ppm and temperature fluctuations from 15 to 35 degrees Celsius. The classification results showed an accuracy of 96%, which supported the effectiveness of the configuration and highlighted the role of microstructural heterogeneity features extracted through image processing in the validation.
[0111] The data analysis method for a formaldehyde detector in the embodiments of this application has been described above. The data analysis system for a formaldehyde detector in the embodiments of this application is described below. Please refer to [link / reference]. Figure 4 One embodiment of the data analysis system for formaldehyde detectors in this application includes:
[0112] The data acquisition module 201 is used to acquire temperature fluctuation data and microstructure data of the sensor material during the heat treatment process, extract microstructure features, and obtain initial distribution parameters.
[0113] The parameter optimization module 202 is used to optimize the heat treatment parameter sequence based on the initial distribution parameters.
[0114] The sequence processing module 203 is used to process the sensor material according to the heat treatment parameters to obtain the adjusted microstructure data.
[0115] The response evaluation module 204 is used to calculate the response speed index based on the adjusted microstructure data. If the response speed index is lower than the preset response threshold, the heat treatment parameter sequence is iteratively optimized to obtain an improved heat treatment parameter sequence.
[0116] The frequency matching module 205 is used to extract resonant frequency-related variables based on the improved heat treatment parameter sequence, and to simulate the frequency matching effect using the finite element analysis method to obtain a frequency matching model.
[0117] The sensitivity verification module 206 is used to generate a virtual test scenario based on the frequency matching model, determine whether the sensitivity index exceeds the preset sensitivity threshold, and if so, confirm that the frequency matching model is effective and determine the optimal configuration of the sensor.
[0118] The accuracy verification module 207 is used to construct a verification dataset based on the optimized configuration of the sensor and to obtain the detection accuracy index using a classification algorithm.
[0119] Through the collaborative efforts of the aforementioned components, this system can precisely optimize the microstructure of the sensor material during heat treatment. The data acquisition module 201 first collects temperature fluctuation and microstructure data of the sensor material and extracts key features for initializing distribution parameters. The parameter optimization module 202 then optimizes the heat treatment parameter sequence based on these initial parameters to ensure optimal material processing. The sequence processing module 203 processes the sensor material according to the optimized parameter sequence to obtain adjusted microstructure data. The response evaluation module 204 analyzes this data, calculates the response speed index, and iteratively optimizes the parameter sequence as needed to ensure the response speed meets expected requirements. The frequency matching module 205 extracts resonant frequency-related variables of the material based on the improved heat treatment parameter sequence, simulates the frequency matching effect using finite element analysis, and obtains a frequency matching model. The sensitivity verification module 206 generates virtual test scenarios to verify the effectiveness of the frequency matching model under different environmental conditions, ensuring that the sensitivity reaches a preset threshold. The accuracy verification module 207 constructs a verification dataset and calculates the detection accuracy index using a classification algorithm to ensure that the final optimized configuration meets high-precision detection requirements.
[0120] above Figure 4The data analysis system for formaldehyde detectors in this embodiment of the invention is described in detail from the perspective of modular functional entities. The data analysis device for formaldehyde detectors in this embodiment of the invention is described in detail from the perspective of hardware processing.
[0121] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0122] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data analysis method for a formaldehyde detector, characterized by, The method comprises: S1, obtaining temperature fluctuation data and microstructure data of the sensor material during heat treatment, extracting microstructure features, and obtaining initial distribution parameters; S2, optimizing a heat treatment parameter sequence according to the initial distribution parameters; S3, processing the sensor material according to the heat treatment parameter sequence to obtain adjusted microstructure data; S4, calculating a response speed index according to the adjusted microstructure data, and if the response speed index is lower than a preset response threshold, iteratively optimizing the heat treatment parameter sequence to obtain an improved heat treatment parameter sequence; S5, extracting a resonance frequency related variable according to the improved heat treatment parameter sequence, and simulating a frequency matching effect by using a finite element analysis method to obtain a frequency matching model; S6, generating a virtual test scene according to the frequency matching model, judging whether a sensitivity index exceeds a preset sensitivity threshold, and if so, confirming that the frequency matching model is effective and determining a sensor optimization configuration; S7, constructing a verification data set according to the sensor optimization configuration, and obtaining a detection accuracy index by using a classification algorithm; In step S1, the temperature fluctuation data during heat treatment is collected by a sensor, a microstructure image is obtained by using an image acquisition device, the microstructure heterogeneity features are extracted by using an image processing algorithm for the microstructure image, the grain size distribution, porosity and defect density of the microstructure are calculated according to the microstructure heterogeneity features, and the initial distribution parameters are determined according to the grain size distribution, porosity and defect density. In step S2, a mathematical model of the heat treatment process is constructed according to the initial distribution parameters, the adjustment of the heating rate and the cooling rate is simulated by iterative search based on the mathematical model by using a particle swarm optimization algorithm, the optimized combination of the heating rate, the cooling rate and the holding time is determined according to the iterative results of the particle swarm optimization algorithm, and the heat treatment parameter sequence is generated according to the optimized combination.
2. The data analysis method for a formaldehyde detector according to claim 1, wherein, S3 comprises: According to the heat treatment parameter sequence, the heating rate, the cooling rate and the holding time are adjusted in a simulated environment; The sensor material sample is processed through the simulated environment to obtain a processed microstructure image; For the processed microstructure image, an image processing algorithm is used to extract adjusted structure features; According to the adjusted structure features, the adjusted microstructure data is generated.
3. The data analysis method for a formaldehyde detector according to claim 1, wherein, S4 comprises: According to the adjusted microstructure data, the response speed index of the material under different temperature fluctuation data is calculated; If the response speed index is lower than the preset response threshold, the inertia weight and the learning factor of the particle swarm optimization algorithm are adjusted; According to the adjusted inertia weight and learning factor, the particle swarm optimization algorithm is re-run; According to the results of the re-run particle swarm optimization algorithm, the improved heat treatment parameter sequence is obtained.
4. The data analysis method for a formaldehyde detector according to claim 1, wherein, S5 comprises: According to the improved heat treatment parameter sequence, the material elastic modulus and the material density related to the resonance frequency are extracted; By using a finite element analysis method, the response of the material elastic modulus and the material density under different frequencies is simulated; constructing the frequency matching model according to simulation results; determining matching accuracy of the resonance frequency according to the frequency matching model.
5. The data analysis method for a formaldehyde detector according to claim 1, wherein, The S6 comprises: generating a virtual test scenario containing low-concentration formaldehyde and the temperature fluctuation data according to the frequency matching model; calculating a sensitivity index of the sensor for the virtual test scenario; if the sensitivity index exceeds a preset sensitivity threshold, confirming that the frequency matching model is valid; determining a sensor optimization configuration according to the frequency matching model.
6. The data analysis method for a formaldehyde detector according to claim 1, wherein, The S7 comprises: generating the verification data set containing different formaldehyde concentrations and temperature conditions according to the sensor optimization configuration; classifying the verification data set by using a support vector machine algorithm; calculating the detection accuracy index according to the classification result; confirming the performance of the sensor optimization configuration according to the detection accuracy index.
7. A data analysis system for a formaldehyde detector for implementing the data analysis method for a formaldehyde detector according to any one of claims 1 to 6, characterized by The data analysis system for the formaldehyde detector comprises: a data acquisition module, configured to acquire temperature fluctuation data and microstructure data of a sensor material in a heat treatment process, extract microstructure features, and obtain initial distribution parameters; a parameter optimization module, configured to optimize a heat treatment parameter sequence according to the initial distribution parameters; a sequence processing module, configured to process the sensor material according to the heat treatment parameter sequence, and obtain adjusted microstructure data; a response evaluation module, configured to calculate a response speed index according to the adjusted microstructure data, and if the response speed index is lower than a preset response threshold, iteratively optimize the heat treatment parameter sequence to obtain an improved heat treatment parameter sequence; a frequency matching module, configured to extract resonance frequency related variables according to the improved heat treatment parameter sequence, simulate frequency matching effects by using a finite element analysis method, and obtain a frequency matching model; a sensitivity verification module, configured to generate a virtual test scenario according to the frequency matching model, determine whether a sensitivity index exceeds a preset sensitivity threshold, and if yes, confirm that the frequency matching model is valid and determine a sensor optimization configuration; an accuracy verification module, configured to construct a verification data set according to the sensor optimization configuration, and obtain a detection accuracy index by using a classification algorithm.
Citation Information
Patent Citations
Formaldehyde air-sensitive material and its preparation method and preparation method for formaldehyde air-sensitive device
CN101144789A
Formaldehyde gas sensor
CN101349669A