VOCs / TVOC detection method based on photoionization sensor
By using the Transformer model of quantum algorithm and multi-head attention mechanism in VOCs/TVOC detection, the fan parameters are dynamically adjusted, and the problem of insufficient detection accuracy and response speed in the existing technology is solved, and flexible adaptation and detection accuracy are achieved for environmental changes. Improvement.
Patent Information
- Application Number
- CN202411192557.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-28
AI Technical Summary
The existing VOCs/TVOC detection methods are difficult to achieve real-time optimization control when facing environmental changes, resulting in insufficient detection accuracy and response speed. Traditional physical and chemical models are relatively fixed and cannot adapt to rapidly changing environmental conditions.
The method based on the photoionization sensor is adopted, and the time-frequency analysis of the signal is performed using quantum algorithms, and the influence of environmental factors is captured through the Transformer model of the multi-head attention mechanism, and the fan parameters are dynamically adjusted to improve detection accuracy and response speed.
Real-time optimization of VOCs/TVOC concentration and dynamic adjustment of fan parameters are achieved, the accuracy and response speed of detection are improved, and the ability to adapt to environmental changes is more flexibly.
Smart Images

Figure CN118706932B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of photoionization sensor signal analysis, and in particular to a VOCs / TVOC detection method based on a photoionization sensor. Background Art
[0002] As important environmental pollutants, the detection technology of volatile organic compounds (VOCs) and total volatile organic compounds (TVOCs) has always been the research focus in the field of environmental science and industrial process monitoring. Traditional VOCs / TVOC detection methods rely on equipment such as photoionization sensors, which can provide real-time gas concentration measurements. However, these measurements are often affected by environmental parameters such as temperature, humidity, and air pressure, resulting in deviations in readings. In order to improve detection accuracy, researchers have developed a variety of data preprocessing and signal compensation techniques; among them, machine learning algorithms, due to their powerful feature extraction and nonlinear mapping capabilities, are widely used in environmental monitoring and gas concentration prediction.
[0003] In existing VOCs / TVOC detection, physical models and chemical reaction models are often based on ideal conditions, which are different from actual environmental conditions, resulting in unsatisfactory compensation effects. In addition, these models are usually relatively fixed and difficult to adapt to rapidly changing or extreme environmental conditions. Traditional methods have limited capabilities in real-time data processing and dynamic adjustment, and cannot achieve real-time optimization control of sampling equipment such as fans, which affects the efficiency and response speed of VOCs / TVOC detection. Therefore, a more flexible and accurate method is needed that can dynamically adapt to environmental changes and adjust sampling strategies in real time. Summary of the invention
[0004] The present invention proposes a VOCs / TVOC detection method based on a photoionization sensor. The method uses a quantum algorithm to quickly identify and classify different modes of the signal, and deeply analyzes the correlation between different modes through the characteristics of the quantum state to perform accurate time-frequency analysis of the signal.
[0005] Among them, the VOCs / TVOC detection method based on the photoionization sensor includes the following steps:
[0006] S1. Collect environmental parameters, PID signals, signal strength and fan operating parameters, extract features from the data through data preprocessing, and establish feature vectors;
[0007] S2. Construct a Transformer model with a multi-head attention mechanism based on the feature vector, capture spatial information through multi-head attention, and predict and compensate for the impact of environmental factors on VOCs / TVOC readings;
[0008] S3. Based on the VOCs / TVOC concentration after environmental compensation, a nonlinear model is constructed to predict the optimal operating parameters of the fan;
[0009] S4. Dynamically control the fan parameters of PID according to the optimal fan operating parameters output by the nonlinear model;
[0010] Wherein, the step S2 specifically includes the following sub-steps:
[0011] S201. Embed the established feature vector and map the feature vector to a high-dimensional space;
[0012] S202. Adding position encoding to the embedded feature vector;
[0013] S203. Process the input feature vector through a multi-head attention mechanism, calculate the multi-head attention, and capture the information of different subspaces;
[0014] S204. The output of the multi-head attention is passed to the feedforward network, which outputs the normalized output to generate a VOCs / TVOC concentration prediction after environmental compensation.
[0015] Furthermore, in S201, the feature vector is mapped to a high-dimensional space, which is specifically performed through an embedding layer. The mapping process is expressed as follows: , wherein the represents the output of the embedding layer, represents the embedding layer, the Represents the original input data.
[0016] Furthermore, in S202, the specific process of adding the position code is represented as follows:
[0017] ;
[0018] ;
[0019] Among them, the Represents the position index, Indicates the dimension, Represents the model dimension, Represents an encoded value.
[0020] Furthermore, the S203 specifically includes the following sub-steps:
[0021] S2031. Mapping the position-encoded input feature vector into query, key, and value through different weight matrices;
[0022] S2032. Calculate the dot product between the query and the key, and obtain the attention weight by scaling and softmax function;
[0023] S2033. Perform weighted summation by calculating the attention weights;
[0024] S2034. Repeat the above steps for each head in the multi-head attention, process a different subspace of the input feature vector through each head, and merge the outputs of all heads.
[0025] Furthermore, the S204 specifically includes the following sub-steps:
[0026] S2041. Use the feedforward network to process the output of multi-head attention. The specific process is expressed as follows: , represents the output of the feedforward network, Represents the output of the multi-head attention mechanism. represents the weight of the first linear layer, represents the weight of the second linear layer, represents the bias of the first linear layer, represents the bias of the second linear layer;
[0027] S2042. Add the output of FFN to the output of the multi-head attention layer to form a residual connection;
[0028] S2043. Apply layer normalization to stabilize the output distribution of each layer in the network;
[0029] S2044. Pass the normalized output to the output layer to generate a prediction of VOCs / TVOC concentration.
[0030] Furthermore, in S2043, the specific process of normalization processing is as follows:
[0031] ;
[0032] Among them, the represents the output of the residual connection, Represents the output of the layer after normalization.
[0033] Furthermore, in S2044, the prediction of VOCs / TVOC concentration is specifically expressed as:
[0034] ;
[0035] Among them, the It represents the VOCs / TVOC concentration prediction after environmental compensation. Represents the output of the normalized layer. represents the weight of the output layer, Represents the bias of the output layer.
[0036] Furthermore, in S3, the specific process of constructing a nonlinear model to predict the optimal operating parameters of the wind turbine includes:
[0037] S301. Establishing a relationship model between fan speed and VOCs / TVOC concentration after environmental compensation;
[0038] S302. Dynamically adjust the control parameters in the relationship model according to the real-time environmentally compensated VOCs / TVOC concentration measurement values;
[0039] S303. Control the fan through the control system according to the adjusted control parameters of the fan.
[0040] Furthermore, in S301, the relationship model is specifically a fan speed adjustment model: , wherein the Indicates the updated fan speed. Indicates the current fan speed. Represents the proportional control parameter, which is used to adjust the fan speed. It represents the VOCs / TVOC concentration prediction after environmental compensation. represents the nonlinear scaling factor associated with the predicted VOCs / TVOC concentration. Represents an offset or intercept value in an exponential function that is used to compensate for static errors in the system at a specific operating point or to provide an initial adjustment at a specific concentration threshold.
[0041] Furthermore, in S302, the adjusted control parameters of the fan are expressed as:
[0042] ;
[0043] ;
[0044] Among them, the represents the updated proportional control parameter, Indicates the current proportional control parameters. represents the adjustment amount of the control parameter, Represents the proportional control parameter, Indicates the error, Represents the learning rate, which is used to control the step size of parameter update.
[0045] The beneficial effects of the present invention are:
[0046] The present invention collects environmental parameters, PID signals, signal strength and fan operating parameters, and uses a nonlinear model to dynamically predict and adjust the fan speed and operating time, thereby achieving real-time optimization of the sampling process. Furthermore, by establishing a relationship model between the fan speed and the VOCs / TVOC concentration after environmental compensation, the fan parameters can be dynamically adjusted according to real-time data to improve the detection accuracy and response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A method flow chart of a VOCs / TVOC detection method based on a photoionization sensor provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0049] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0050] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention. It should be noted that relational terms such as the terms "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0051] Moreover, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of more restrictions, an element defined by the phrase "comprises a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0052] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.
[0053] Among them, Figure 1 , the VOCs / TVOC detection method based on photoionization sensor includes the following steps:
[0054] S1. Collect environmental parameters, PID signals, signal strength and fan operating parameters, extract features from the data through data preprocessing, and establish feature vectors;
[0055] S2. Construct a Transformer model with a multi-head attention mechanism based on the feature vector, capture spatial information through multi-head attention, and predict and compensate for the impact of environmental factors on VOCs / TVOC readings;
[0056] S3. Based on the VOCs / TVOC concentration after environmental compensation, a nonlinear model is constructed to predict the optimal operating parameters of the fan;
[0057] S4. Dynamically control the fan parameters of PID according to the optimal fan operating parameters output by the nonlinear model;
[0058] Wherein, the step S2 specifically includes the following sub-steps:
[0059] S201. Embed the established feature vector and map the feature vector to a high-dimensional space;
[0060] S202. Adding position encoding to the embedded feature vector;
[0061] S203. Process the input feature vector through a multi-head attention mechanism, calculate the multi-head attention, and capture the information of different subspaces;
[0062] S204. The output of the multi-head attention is passed to the feedforward network, which outputs the normalized output to generate a VOCs / TVOC concentration prediction after environmental compensation.
[0063] Furthermore, in step S201, mapping the feature vector to the high-dimensional space is specifically performed through an embedding layer to perform high-dimensional space mapping, and the process is as follows: , wherein the represents the output of the embedding layer, represents the embedding layer, the Represents the original input data.
[0064] Furthermore, in step S202, the specific process of adding the position code is expressed as follows:
[0065] ;
[0066] ;
[0067] Among them, the Represents the position index, Indicates the dimension, Represents the model dimension, Represents an encoded value.
[0068] Furthermore, the step S203 specifically includes the following sub-steps:
[0069] S2031. Mapping the position-encoded input feature vector into query, key, and value through different weight matrices;
[0070] S2032. Calculate the dot product between the query and the key, and obtain the attention weight by scaling and softmax function;
[0071] S2033. Perform weighted summation by calculating the attention weights;
[0072] S2034. Repeat the above steps for each head in the multi-head attention, process a different subspace of the input feature vector through each head, and merge the outputs of all heads.
[0073] Furthermore, the step S204 specifically includes the following sub-steps:
[0074] S2041. Use the feedforward network to process the output of multi-head attention. The specific process is expressed as follows: , represents the output of the feedforward network, Represents the output of the multi-head attention mechanism. represents the weight of the first linear layer, represents the weight of the second linear layer, represents the bias of the first linear layer, represents the bias of the second linear layer;
[0075] S2042. Add the output of FFN to the output of the multi-head attention layer to form a residual connection;
[0076] S2043. Apply layer normalization to stabilize the output distribution of each layer in the network;
[0077] S2044. Pass the normalized output to the output layer to generate a prediction of VOCs / TVOC concentration.
[0078] Specifically, the multi-head attention mechanism allows the model to learn from different representation subspaces simultaneously. In multi-head attention, the input is split into multiple heads. Each head performs the standard attention operation independently, but uses a different linear projection (i.e., a different weight matrix , , ), each head is regarded as an independent attention layer, working in parallel, processing the same input data, but from different perspectives or representation subspaces. The output of each head is a vector with the same length as the original input. The trial vectors are merged back into a single vector for further processing, where the merging is achieved by concatenation, that is, the output vectors of all heads are concatenated together to form a longer vector. The concatenated vector is projected through a linear layer to reduce the dimension to match the dimension of the original input.
[0079] Furthermore, the multi-head attention mechanism realizes the specific process of query Q, key K, value V and calculation of attention score as follows:
[0080] ;
[0081] ;
[0082] Among them, the represents single-head attention, Indicates that The dot product result is converted into a probability distribution so that the sum of all output values is 1. Represents the result of the dot product, Indicates the dimension of the key vector, used to scale the dot product result. Represents the output of multi-head attention, Represents a splicing operation, the represents the output of the h-th head’s attention, Represents the output weight matrix, which is used to map the concatenated multi-head output vector back to the original dimensional space.
[0083] Specifically, the calculation of each head is as follows:
[0084] ;
[0085] Among them, the said representation, the said They represent the product of the query, key, and value matrices of the h-th head and the corresponding weight matrices. Specifically, is a trainable parameter, and the input Mapped to different representation subspaces.
[0086] Furthermore, in step S2043, the specific process of normalization is as follows:
[0087] ;
[0088] Among them, the represents the output of the residual connection, Represents the output of the layer after normalization.
[0089] Furthermore, in step S2044, the prediction of VOCs / TVOC concentration is generated as follows:
[0090] ;
[0091] Among them, the It represents the VOCs / TVOC concentration prediction after environmental compensation. Represents the output of the normalized layer. represents the weight of the output layer, Represents the bias of the output layer.
[0092] Furthermore, as a preferred specific implementation of the above embodiment, the multi-head attention mechanism model also includes a definition of a loss function, wherein the loss function is defined as: , wherein the Represents the mean square error, which is used to measure the difference between the predicted concentration and the actual concentration. represents the loss function, Indicates the input VOCs / TVOC concentration.
[0093] Furthermore, as a preferred specific implementation method of the above embodiment, a network architecture of the multi-head attention mechanism model is proposed. Specifically, the Transformer model includes an encoder and a decoder, wherein the encoder is used to process input features, and the decoder is used to generate predicted VOCs / TVOC concentrations. Specifically, the encoder includes multiple self-attention layers and feedforward network layers, the self-attention layer is used to calculate the weighted representation of the input features, and the weight is determined by the similarity between the input features, and the feedforward network layer is used to further process the output of the self-attention layer.
[0094] Furthermore, through the above embodiments, the Transformer model can capture information from different representation subspaces in parallel, which enhances the model's ability to understand and process input data, helps the model better understand the relationship between environmental parameters and gas concentrations, and makes more accurate predictions.
[0095] Furthermore, in step S3, the specific process of constructing a nonlinear model to predict the optimal operating parameters of the fan includes:
[0096] S301. Establishing a relationship model between fan speed and VOCs / TVOC concentration after environmental compensation;
[0097] S302. Dynamically adjust the control parameters in the relationship model according to the real-time environmentally compensated VOCs / TVOC concentration measurement values;
[0098] S303. Control the fan through the control system according to the adjusted control parameters of the fan.
[0099] Furthermore, in step S301, the relationship model is specifically a fan speed adjustment model: , wherein the Indicates the updated fan speed. Indicates the current fan speed. Represents the proportional control parameter, which is used to adjust the fan speed. It represents the VOCs / TVOC concentration prediction after environmental compensation. represents the nonlinear scaling factor associated with the predicted VOCs / TVOC concentration. Represents an offset or intercept value in an exponential function that is used to compensate for static errors in the system at a specific operating point or to provide an initial adjustment at a specific concentration threshold.
[0100] Furthermore, the specific implementation principle of step S3 is proposed: define the state variables of the current speed and current working time of the fan, establish the nonlinear relationship between the fan speed and working time and the VOCs / TVOC concentration, and select the proportional control parameter As the main control parameter, determine the nonlinear parameters and , where the nonlinear parameters are determined by artificial settings or system identification, and the system error Dynamic update of proportional control parameters , the gradient descent method can be used for optimization.
[0101] Furthermore, in step S302, the adjusted control parameters of the fan are expressed as:
[0102] ;
[0103] ;
[0104] Among them, the represents the updated proportional control parameter, Indicates the current proportional control parameters. represents the adjustment amount of the control parameter, Represents the proportional control parameter, Indicates the error, Represents the learning rate, which is used to control the step size of parameter update.
[0105] Further, as a preferred specific implementation of the above embodiment, the control parameter is not limited to the fan speed, and the control parameter and control object outputted by the control parameter are not limited to the fan. For example, the active air intake VOCs / TVOC ionization chamber can actively absorb external gas into the sensor ionization chamber, so that the polluted gas can be directly ionized through the ionization chamber, and the response is faster and more sensitive. For the ionization chamber, the ultraviolet lamp drive can also be controlled, that is, the control object also includes the ultraviolet lamp drive parameter, and the control parameter can add ultraviolet lamp brightness, irradiation intensity and other parameters related to the ultraviolet lamp. Specifically, the system composed of the ionization chamber includes a photoionization chamber, an ultraviolet lamp, a pump / negative pressure fan, a micro signal amplification circuit, a signal filtering circuit, an A / D conversion circuit, an MCU and an ultraviolet lamp driver. The air sample is sucked into the photoionization chamber through the pump / negative pressure fan, and the ultraviolet lamp irradiates the gas molecules to ionize. The generated ions move to the signal receiving electrode under the action of the external electric field to form a current signal. After the signal is amplified, filtered and A / D converted, it is processed by the MCU and the detection result is finally output. In the above embodiment, a readable storage medium of the detection method proposed in the above embodiment may be stored in the MCU to implement the application of the detection method in the above embodiment.
[0106] In addition, for the fan described in the above embodiment, a pump / negative pressure fan is preferably selected.
[0107] Further, for the step S1 of the above embodiment, environmental parameters, PID signals, signal strength and fan operating parameters are collected, and data preprocessing is performed to extract features of the data to establish a feature vector. It should be noted that for the measurement of VOCs / TVOC gas concentration, the collected PID signal will be mixed with other signals other than those that can represent the concentration, such as the influence of environmental factors. In addition to the signal caused by the actual VOCs molecules, when the temperature in the environment suddenly rises, the dark current of the sensor may increase in the PID signal, resulting in an increase in the signal baseline. At the same time, when the humidity is high, water vapor competes with VOCs molecules for ionization, resulting in a high reading. In addition, electronic noise signals, background gas signals, and mechanical vibration signals may all appear in the ID signal collected by P, affecting the actual concentration data. Therefore, the PID signal strength disclosed in the above embodiment does not directly represent the VOCs / TVOC gas concentration, but predicts the concentration by acquiring the PID signal; in addition, the above-mentioned related signals affecting the concentration can be vectorized as parameter features in environmental compensation, and its features can be signal types in the PID signal.
[0108] Furthermore, as a preferred specific implementation of the above embodiment, a VOCs / TVOC detection system based on a photoionization sensor is proposed. The system can be implemented by applying the above VOCs / TVOC detection method based on a photoionization sensor, and specifically includes:
[0109] The data acquisition module is used to collect environmental parameters, PID signals, signal strength and fan operating parameters, and extract features from the data through data preprocessing to establish feature vectors;
[0110] The multi-head attention model prediction module is used to construct a Transformer model with a multi-head attention mechanism based on the feature vector, capture spatial information through multi-head attention, and predict and compensate for the impact of environmental factors on VOCs / TVOC readings;
[0111] The nonlinear model fan control prediction module is used to build a nonlinear model to predict the optimal operating parameters of the fan according to the VOCs / TVOC concentration after environmental compensation;
[0112] The fan control execution module is used to dynamically control the fan parameters of PID according to the optimal working parameters of the fan output by the nonlinear model;
[0113] Among them, the multi-head attention model prediction module specifically includes:
[0114] An input embedding unit is used to embed the established feature vector and map the feature vector to a high-dimensional space;
[0115] A position encoding unit, used to add position encoding to the embedded feature vector;
[0116] The information processing unit is used to process the input feature vector through a multi-head attention mechanism, calculate the multi-head attention, and capture the information of different subspaces;
[0117] The prediction output unit is used to pass the output of the multi-head attention to the feedforward network, which outputs the normalized output to generate the VOCs / TVOC concentration prediction after environmental compensation.
[0118] Furthermore, in the input embedding unit, mapping the feature vector to the high-dimensional space is specifically performed through the embedding layer to perform high-dimensional space mapping, and the process is as follows: , wherein the represents the output of the embedding layer, represents the embedding layer, the Represents the original input data.
[0119] Furthermore, in the position coding unit, the specific process of adding the position coding is expressed as follows:
[0120] ;
[0121] ;
[0122] Among them, the Represents the position index, Indicates the dimension, Represents the model dimension, Represents an encoded value.
[0123] Furthermore, the information processing unit specifically includes:
[0124] The weight matrix mapping subunit is used to map the position-encoded input feature vector into query, key, and value through different weight matrices;
[0125] The attention weight calculation subunit is used to calculate the dot product between the query and the key, obtain the attention weight through scaling and softmax function, and perform weighted summation on the calculated attention weight;
[0126] The multi-head output calculation subunit repeats the above steps for each head in the multi-head attention, processes different subspaces of the input feature vector through each head, and merges the outputs of all heads.
[0127] Furthermore, the prediction output unit specifically includes:
[0128] The feedforward processing subunit is used to process the output of multi-head attention through the feedforward network. The specific process is expressed as follows: , represents the output of the feedforward network, Represents the output of the multi-head attention mechanism. represents the weight of the first linear layer, represents the weight of the second linear layer, represents the bias of the first linear layer, represents the bias of the second linear layer;
[0129] The residual connection subunit is used to add the output of the FFN to the output of the multi-head attention layer to form a residual connection;
[0130] The layer normalization subunit is used to apply layer normalization to stabilize the output distribution of each layer in the network;
[0131] The concentration prediction subunit is used to pass the normalized output to the output layer to generate the prediction of VOCs / TVOC concentration.
[0132] Furthermore, the nonlinear model fan control prediction module specifically includes:
[0133] A relationship model building unit is used to build a relationship model between the fan speed and the VOCs / TVOC concentration after environmental compensation;
[0134] A dynamic adjustment unit, used to dynamically adjust the control parameters in the relationship model according to the real-time VOCs / TVOC concentration measurement value after environmental compensation;
[0135] The control output unit is used to control the fan through the control system according to the adjusted control parameters of the fan.
[0136] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. VOCs / TVOC detection method based on photoionization sensor, characterized in that: The following steps are involved: S1. Collect environmental parameters, PID signals, signal strength and fan operating parameters, extract features from the data through data preprocessing, and establish feature vectors; S2. Construct a Transformer model with a multi-head attention mechanism based on the feature vector, capture spatial information through multi-head attention, and predict and compensate for the impact of environmental factors on VOCs / TVOC readings; S3. Based on the VOCs / TVOC concentration after environmental compensation, a nonlinear model is constructed to predict the optimal operating parameters of the fan; S4. Dynamically control the fan parameters of PID according to the optimal fan operating parameters output by the nonlinear model; Wherein, the S2 specifically includes the following sub-steps: S201. Embed the established feature vector and map the feature vector to a high-dimensional space; S202. Adding position encoding to the embedded feature vector; S203. Process the input feature vector through a multi-head attention mechanism, calculate the multi-head attention, and capture the information of different subspaces; S204. The output of the multi-head attention is passed to the feedforward network, which outputs the output through normalization to generate a VOCs / TVOC concentration prediction after environmental compensation; In S201, mapping the feature vector to the high-dimensional space is specifically performed through an embedding layer to perform high-dimensional space mapping, and the process is as follows: , represents the output of the embedding layer, represents the embedding layer, the Represents the original input data; In S202, the specific process of adding the position code is as follows: ; ; Among them, the Represents the position index, Indicates the dimension, Represents the model dimension, Represents a coded value; The S203 specifically includes the following sub-steps: S2031. Mapping the position-encoded input feature vector into query, key, and value through different weight matrices; S2032. Calculate the dot product between the query and the key, and obtain the attention weight by scaling and softmax function; S2033. Perform weighted summation by calculating the attention weights; S2034. Repeat the above steps for each head in the multi-head attention, process a different subspace of the input feature vector through each head, and merge the outputs of all heads; The S204 specifically includes the following sub-steps: S2041. Use the feedforward network to process the output of multi-head attention. The specific process is expressed as follows: , represents the output of the feedforward network, Represents the output of the multi-head attention mechanism. represents the weight of the first linear layer, represents the weight of the second linear layer, represents the bias of the first linear layer, represents the bias of the second linear layer; S2042. Add the output of FFN to the output of the multi-head attention layer to form a residual connection; S2043. Apply layer normalization to stabilize the output distribution of each layer in the network; S2044. Passing the normalized output to the output layer to generate a prediction of VOCs / TVOC concentration; In S2044, the prediction of VOCs / TVOC concentration is specifically expressed as: ; Among them, the It represents the VOCs / TVOC concentration prediction after environmental compensation. Represents the output of the normalized layer. represents the weight of the output layer, Represents the bias of the output layer.
2. The VOCs / TVOC detection method based on a photoionization sensor according to claim 1, characterized in that: In S2043, the specific process of normalization is as follows: ; Among them, the represents the output of the residual connection, Represents the output of the layer after normalization.
3. The VOCs / TVOC detection method based on a photoionization sensor according to claim 1, characterized in that: In S3, the specific process of constructing a nonlinear model to predict the optimal operating parameters of the fan includes: S301. Establishing a relationship model between fan speed and VOCs / TVOC concentration after environmental compensation; S302. Dynamically adjust the control parameters in the relationship model according to the real-time environmentally compensated VOCs / TVOC concentration measurement values; S303. Control the fan through the control system according to the adjusted control parameters of the fan.
4. The VOCs / TVOC detection method based on a photoionization sensor according to claim 3, characterized in that: In S301, the relationship model is specifically a fan speed adjustment model: , wherein the Indicates the updated fan speed. Indicates the current fan speed. Represents the proportional control parameter, which is used to adjust the fan speed. It represents the VOCs / TVOC concentration prediction after environmental compensation. represents the nonlinear scaling factor associated with the predicted VOCs / TVOC concentration. Represents an offset or intercept value in an exponential function that is used to compensate for static errors in the system at a specific operating point or to provide an initial adjustment at a specific concentration threshold.
5. The VOCs / TVOC detection method based on a photoionization sensor according to claim 3, characterized in that: In S302, the adjusted control parameters of the fan are expressed as: ; ; Among them, the represents the updated proportional control parameter, Indicates the current proportional control parameters. represents the adjustment amount of the control parameter, Represents the proportional control parameter, Indicates the error, Represents the learning rate, which is used to control the step size of parameter update.
