Self-calibration method for NDIR sensor
Through the NDIR sensor self-calibration method, data calibration is performed using automatic zero-calibration neural network model, which solves the problems of sensor data drift and frequent calibration, achieving higher measurement accuracy and longer service life.
Patent Information
- Application Number
- CN202510204656.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-05-13
AI Technical Summary
Existing NDIR sensors are susceptible to environmental impacts, resulting in measurement data drift, requiring frequent calibration and short service life.
The NDIR sensor self-calibration method is adopted, including device startup and initialization, automatic zero calibration operation, data acquisition and transmission, remote model calibration and model update and optimization, and data calibration and model optimization are used for neural network models.
Effectively eliminate the impact of environmental factors such as humidity and atmospheric pressure on NDIR sensor measurement, reduce data drift, improve calibration efficiency, improve the accuracy and accuracy of monitoring data, and extend the service life of the sensor.
Smart Images

Figure CN119985380A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of environmental air monitoring, and in particular relates to a NDIR sensor self-calibration method. Background Art
[0002] NDIR sensor is a device used to detect gas concentration. Its working principle is based on the characteristic that different gases selectively absorb infrared light of specific wavelengths. The light emitted by the infrared light source passes through the gas chamber containing the target gas. After the gas absorbs the infrared light of specific wavelengths, the remaining light is received by the detector and converted into an electrical signal. The signal processing circuit converts the electrical signal into a signal output related to the gas concentration, thereby realizing the detection of the target gas concentration. It plays a key role in many fields such as environmental monitoring and industrial process control.
[0003] The existing NDIR sensor itself is easily affected by the environment, especially humidity and atmospheric pressure. Humidity changes will change the characteristics of the light propagation medium, causing changes in the absorption and scattering laws of infrared light. Atmospheric pressure fluctuations affect the distribution of gas molecules and the light absorption process. The combined effect of the two causes the NDIR sensor measurement data to drift. Long-term accumulation causes a serious decrease in data accuracy. At the same time, the NDIR sensor needs to be frequently calibrated. Summary of the invention
[0004] The purpose of the present invention is to provide a NDIR sensor self-calibration method in order to solve the shortcomings that the existing NDIR sensor itself is easily affected by the environment, the sensor monitoring equipment will have data drift in long-term operation, the sensor needs frequent calibration, and the service life is short.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A NDIR sensor self-calibration method comprises the following steps:
[0007] S1, equipment startup and initialization, turn on the NDIR sensor equipment, the control unit initializes the configuration of each component, checks the connection and functional status, and initializes the local storage unit to prepare for storing calibration and measurement data;
[0008] S2, automatic zero calibration operation, starting the automatic zero calibration procedure according to a preset time interval or a specific trigger condition;
[0009] S3, data acquisition and transmission. During normal monitoring, the NDIR sensor continuously detects the target gas, and the environmental sensor simultaneously collects humidity and atmospheric pressure data. To ensure the data quality used for neural network model training, it is necessary to regularly pass the standard gas. The number of times the standard gas is passed is closely related to the data quality. If the data acquisition frequency is low, the environment changes greatly, or the sensor measurement stability is poor, it is necessary to increase the number of times the standard gas is passed to obtain sufficient and accurate original sensor measurement data under different environmental conditions and the target gas real concentration data measured by high-precision reference instruments. The control unit packages these data and equipment status information and sends them to the remote calibration server through the communication module to ensure stable transmission.
[0010] S4. Remote model calibration. The remote calibration server receives and checks the data integrity and accuracy. The server compares the received original sensor measurement data with the target gas real concentration data measured by the high-precision reference instrument and calculates the error between the two. If the error is within the preset allowable error range, it indicates that the current measurement result is relatively accurate and no calibration is required. If the error exceeds the preset allowable error range, the data is input into the pre-trained neural network model, and the model calculates the predicted value of the target gas concentration after calibration and generates a calibration report.
[0011] S5. Model update and optimization. The remote calibration server will regularly check the newly uploaded data. If the update conditions are met, the neural network model will be retrained using the new data, the model parameters and structure will be optimized, and the updated model version information will be pushed to the sensor system. The sensor system will download the update and test the validity of the new model.
[0012] The NDIR sensor device includes a NDIR sensor core component, an environmental sensor, a data acquisition circuit, a control unit, a communication module and a local storage unit hardware component.
[0013] The automatic zero calibration procedure includes the following steps:
[0014] S1, trigger condition check, when the preset time interval is reached or the specific trigger condition is met, the zero calibration procedure is automatically started;
[0015] S2, optical path switching preparation. When the trigger condition is met, the control unit sends a command to the gas path switching valve to prepare to switch the measurement optical path to the zero gas chamber. During this process, the control unit will check the status of the switching valve to ensure that it is in a normal and operable state.
[0016] S3, optical path switching operation, the switching valve switches the measuring optical path from the normal measuring gas chamber to the zero gas chamber according to the instruction of the control unit. The zero gas chamber is pre-filled with high-purity nitrogen or other gas that does not absorb the infrared light of the target gas, and the gas chamber has good sealing and stability;
[0017] S4, optical signal acquisition, after the measuring optical path is successfully switched to the zero gas chamber, the dual optical paths of the NDIR sensor work simultaneously;
[0018] S5, zero drift value calculation and storage, the control unit calculates the zero drift value;
[0019] S6, optical path recovery, after completing the collection and storage of the zero drift value, the control unit sends a command to the gas path switching valve again to restore the measurement optical path to the normal measurement gas chamber;
[0020] S7. Recording and feedback of zero calibration results. The control unit can record relevant data during the zero calibration process in a local log file.
[0021] Among them, in the data acquisition and transmission stage, the data acquisition circuit collects the original measurement data of the NDIR sensor at a specific frequency. These original measurement data reflect the sensor's preliminary detection results of the target gas. At the same time, the environmental sensor collects the humidity data and atmospheric pressure data of the current environment in real time. The control unit integrates the collected NDIR sensor original measurement data, humidity data, atmospheric pressure data and equipment status information. During the integration process, the data is pre-processed, including checking the rationality of the data and removing obviously abnormal data points.
[0022] The neural network model includes the following steps:
[0023] S1. Data preparation stage: collect the original measurement data of sensors under different environmental conditions and the real concentration data of target gas measured by high-precision reference instruments, pre-process these data, and divide the pre-processed data into several data groups according to time sequence or different environmental conditions. Each group contains N samples. The value of N can be set according to the actual situation. Then, the training set, validation set and test set are divided from these data groups.
[0024] S2, model building stage, build a multi-layer feedforward neural network including input layer, several hidden layers and output layer. The input layer receives the original measurement value of the sensor, humidity value, atmospheric pressure value and other related data, reasonably sets the number of hidden layers, the number of neurons in each layer and the activation function of each layer, and the output layer outputs the calibrated target gas concentration prediction value;
[0025] S3, training phase, the training set data is input into the neural network in sequence according to the data group. Based on the back propagation algorithm, the weight and bias parameters of each layer are adjusted according to the error between the output prediction value and the true concentration value. During the training process, the generalization ability of the model is monitored using the validation set. When any of the following conditions is met, the model training is considered to be completed:
[0026] - Reach the preset maximum number of training rounds M, which can be set according to actual conditions;
[0027] -The loss function value on the validation set no longer decreases significantly within K consecutive rounds, that is, the change in the loss function value is less than the preset threshold ε. K and ε can be set according to actual conditions;
[0028] - Overfitting occurs, which is manifested by the loss function value on the validation set starting to increase, while the loss function value on the training set is still decreasing;
[0029] S4, calibration application stage, in actual work, the newly collected sensor raw measurement, humidity, and atmospheric pressure data are pre-processed and input into the trained neural network, and the model operation outputs the calibrated target gas concentration prediction value, which is used to correct the sensor measurement results;
[0030] S5, model update phase: the remote calibration server periodically checks whether the new data meets the update conditions. If so, the neural network is retrained with the new data, the structural parameters are adjusted for optimization, and then the update information is pushed to the sensor system. The sensor system downloads the update and tests the effectiveness of the new model.
[0031] The calibration report includes data comparison before and after calibration, model information used for calibration, and confidence of the model. Before entering the model update and optimization stage, the remote calibration server transmits the calibration results and calibration report back to the NDIR sensor system through the communication module. After the local control unit receives the calibration results, it corrects and updates the locally stored original measurement data according to the calibration results.
[0032] The calibration report is also stored in a local log file. At the same time, based on the calibration result and the confidence information of the model, it is determined whether the local model needs to be updated or whether a request to retrain the model is made to the remote server.
[0033] Among them, the model update and optimization stage includes data inspection, retraining and push update. In the data inspection, the remote calibration server regularly checks the newly uploaded data to determine whether the data volume is sufficient and the distribution is reasonable. If the conditions are met, the update process is started. The retraining can integrate new data and historical data, adjust the model structure and training parameters as needed, and retrain the model with the processed data. During training, the verification set is used to monitor the generalization ability and prevent overfitting. The training is terminated when the stopping conditions are met. In the push update, the remote calibration server pushes the updated model version information to the sensor system, the sensor system downloads the update, and then uses the local newly collected data to test the effectiveness of the new model. If it is not good, the problem is fed back.
[0034] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0035] In the present invention, the automatic zeroing and model calibration are realized by improving the equipment structure, which can effectively eliminate the influence of environmental factors such as humidity and atmospheric pressure on the measurement of NDIR sensor, reduce the data drift of NDIR sensor, improve the calibration efficiency, and improve the accuracy and precision of monitoring data, thereby ensuring that the sensor can more reliably monitor gas concentration in various environments, and provide high-quality data support for related environmental monitoring, industrial production and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of the method of the present invention;
[0037] Figure 2 is a flow chart of the steps of the automatic zero calibration procedure in the present invention;
[0038] Figure 3 It is a flowchart of the steps of the neural network model in the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below 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.
[0040] Reference Figure 1-Figure 3 , a NDIR sensor self-calibration method, comprising the following steps:
[0041] S1, equipment startup and initialization, turn on the NDIR sensor equipment, the control unit initializes the configuration of each component, checks the connection and functional status, and initializes the local storage unit to prepare for storing calibration and measurement data;
[0042] S2, automatic zero calibration operation, starting the automatic zero calibration procedure according to a preset time interval or a specific trigger condition;
[0043] S3, data acquisition and transmission. During normal monitoring, the NDIR sensor continuously detects the target gas, and the environmental sensor simultaneously collects humidity and atmospheric pressure data. To ensure the data quality used for neural network model training, it is necessary to regularly pass the standard gas. The number of times the standard gas is passed is closely related to the data quality. If the data acquisition frequency is low, the environment changes greatly, or the sensor measurement stability is poor, it is necessary to increase the number of times the standard gas is passed to obtain sufficient and accurate original sensor measurement data under different environmental conditions and the target gas real concentration data measured by high-precision reference instruments. The control unit packages these data and equipment status information and sends them to the remote calibration server through the communication module to ensure stable transmission.
[0044] S4. Remote model calibration. The remote calibration server receives and checks the data integrity and accuracy. The server compares the received original sensor measurement data with the target gas real concentration data measured by the high-precision reference instrument and calculates the error between the two. If the error is within the preset allowable error range, it indicates that the current measurement result is relatively accurate and no calibration is required. If the error exceeds the preset allowable error range, the data is input into the pre-trained neural network model, and the model calculates the predicted value of the target gas concentration after calibration and generates a calibration report.
[0045] S5. Model update and optimization. The remote calibration server will regularly check the newly uploaded data. If the update conditions are met, the neural network model will be retrained using the new data, the model parameters and structure will be optimized, and the updated model version information will be pushed to the sensor system. The sensor system will download the update and test the validity of the new model.
[0046] Specifically, through the above method, automatic zeroing can be achieved through equipment structure improvement, and remote calibration can be used to break through geographical restrictions. With the help of model calibration, the relationship between sensor measurement data and environmental factors can be accurately grasped, and the influence of environmental factors such as humidity and atmospheric pressure can be effectively eliminated. The data drift of NDIR sensors can be reduced and prevented, which not only greatly improves the calibration efficiency, but also improves the accuracy and monitoring precision of monitoring data, reduces the inconvenience caused by frequent calibration, extends the service life of sensors, and provides more reliable and high-quality data support for related monitoring work.
[0047] Reference Figure 1As shown, the NDIR sensor device includes NDIR sensor core components, environmental sensors, data acquisition circuits, control units, communication modules and local storage unit hardware components. The NDIR sensor core components are used to detect the target gas concentration. The environmental sensors include humidity sensors and pressure sensors. The humidity sensor can measure the environmental humidity in real time. The atmospheric pressure sensor can obtain atmospheric pressure data. These data will be used as an important reference in the subsequent calibration process to help eliminate the interference of environmental factors on the NDIR sensor measurement. The data acquisition circuit is responsible for collecting analog signals from the NDIR sensor core components and environmental sensors. It converts these analog signals into digital signals for the control unit to process. The control unit mainly controls the work of the data acquisition circuit and sets the frequency and mode of data acquisition. At the same time, it receives digital signals from the data acquisition circuit and performs preliminary data processing and analysis. The communication module is used to realize the communication between the device and the external system. It can send the sensor data, environmental data and device status information processed by the local control unit to the remote server for remote calibration and data analysis. At the same time, it can also receive the calibration results, updated calibration model and other information from the remote server, and pass this information to the control unit so that the device can update the calibration parameters in time. The local storage unit is used to store various data and programs.
[0048] Reference Figure 2 As shown in the figure, the automatic zeroing procedure includes the following steps:
[0049] S1. Trigger condition check. The trigger condition can be triggered by setting a time interval, or it can be triggered by an event after the device is restarted or when the sensor has not been zeroed for a long time and the accumulated measurement error may exceed a certain range. After the trigger, the zeroing procedure is automatically started;
[0050] S2, optical path switching preparation. When the trigger condition is met, the control unit sends a command to the gas path switching valve to prepare to switch the measurement optical path to the zero gas chamber. During this process, the control unit will check the status of the switching valve to ensure that it is in a normal and operable state. At the same time, it can also preheat the infrared light source so that the output of the light source reaches a stable state when switching the optical path, so as to reduce the influence of light source fluctuations on the zero calibration result.
[0051] S3, optical path switching operation, the switching valve switches the measuring optical path from the normal measuring gas chamber to the zero gas chamber according to the instruction of the control unit. The zero gas chamber is pre-filled with high-purity nitrogen or other gases that do not absorb the infrared light of the target gas, and the gas chamber has good sealing and stability. During the switching process, it is necessary to ensure a smooth transition of the gas path to avoid pressure fluctuations or residual gas interference;
[0052] S4, light signal acquisition, after the measuring light path is successfully switched to the zero gas chamber, the dual light paths of the NDIR sensor work simultaneously, and the light detector collects the light signal intensity of the two light paths respectively. Let the light intensity of the measuring light path be Im, and the light intensity of the reference light path be Ir. The acquisition process needs to ensure that the light detector works within a stable linear range, and the acquisition time is long enough to reduce the influence of noise on the light intensity measurement;
[0053] S5, calculation and storage of zero drift value, the control unit calculates the difference of the light signal strength of the two optical paths △I=Im-Ir, this difference is the zero drift value of the current device, the control unit stores △I in the local storage unit, and the relevant information such as the timestamp of zero calibration, device status, etc. will be recorded during storage, so as to perform real-time correction of the measurement data later;
[0054] S6, optical path recovery, after completing the acquisition and storage of the zero drift value, the control unit sends a command to the gas path switching valve again to restore the measurement optical path to the normal measurement gas chamber. During the recovery process, attention should also be paid to the stability of the gas path and avoidance of interference. After the recovery, check whether the measurement optical path is working normally;
[0055] S7. Recording and feedback of zero calibration results. The control unit can record the relevant data in the zero calibration process in a local log file. If the device is connected to a host computer or a monitoring system, the zero calibration results can also be sent to the host computer for display and recording, so that the operator can understand the zero calibration status and equipment status of the device.
[0056] Reference Figure 1 As shown in the figure, in the data acquisition and transmission stage, the data acquisition circuit collects the original measurement data of the NDIR sensor at a specific frequency. These original measurement data reflect the preliminary detection results of the sensor on the target gas. At the same time, the environmental sensor collects the humidity data and atmospheric pressure data of the current environment in real time. The control unit integrates the collected original measurement data, humidity data, atmospheric pressure data and equipment status information of the NDIR sensor. During the integration process, the data is pre-processed, including checking the rationality of the data and removing obviously abnormal data points. Before data transmission, the communication module first establishes a connection with the remote calibration server. This connection process involves network configuration, identity authentication and other steps. After the connection is completed, the communication module will use the data checksum algorithm to check the transmitted data. If the data is found to be wrong or lost during the transmission process, the communication module will automatically start the data retransmission mechanism until the data is correctly received. At the same time, the communication module will also monitor the network status. If the network fluctuates or is interrupted, it will try to reconnect and continue the data transmission task after the connection is restored to ensure that the data can be transmitted to the remote calibration server in a timely and complete manner.
[0057] Reference Figure 3As shown, the neural network model includes the following operating steps:
[0058] S1. Data preparation stage: collect the original measurement data of sensors under different environmental conditions and the real concentration data of target gas measured by high-precision reference instruments, pre-process these data, and divide the pre-processed data into several data groups according to time sequence or different environmental conditions. Each group contains N samples. The value of N can be set according to the actual situation. Then, the training set, validation set and test set are divided from these data groups.
[0059] S2, model building stage, build a multi-layer feedforward neural network including input layer, several hidden layers and output layer. The input layer receives the original measurement value of the sensor, humidity value, atmospheric pressure value and other related data, reasonably sets the number of hidden layers, the number of neurons in each layer and the activation function of each layer, and the output layer outputs the calibrated target gas concentration prediction value;
[0060] S3, training phase, the training set data is input into the neural network in sequence according to the data group. Based on the back propagation algorithm, the weight and bias parameters of each layer are adjusted according to the error between the output prediction value and the true concentration value. During the training process, the generalization ability of the model is monitored using the validation set. When any of the following conditions is met, the model training is considered to be completed:
[0061] - Reach the preset maximum number of training rounds M, which can be set according to actual conditions;
[0062] -The loss function value on the validation set no longer decreases significantly within K consecutive rounds, that is, the change in the loss function value is less than the preset threshold ε. K and ε can be set according to actual conditions;
[0063] - Overfitting occurs, which is manifested by the loss function value on the validation set starting to increase, while the loss function value on the training set is still decreasing;
[0064] S4, calibration application stage, in actual work, the newly collected sensor raw measurement, humidity, and atmospheric pressure data are pre-processed and input into the trained neural network. The model operation outputs the calibrated target gas concentration prediction value, which is used to correct the sensor measurement results. In actual work, when the NDIR sensor obtains new raw measurement data X 1new And the corresponding real-time humidity value X 2new , atmospheric pressure value X 3new When the data is normalized, it is sent to the trained neural network model as input. The model is calculated by internal neurons, and the nonlinear transformation from the input layer to the hidden layer is finally output at the output layer. The predicted value Y of the target gas concentration after calibration new,This predicted value can be used to correct the current measurement results of the sensor, thereby eliminating the influence of environmental factors such as humidity and atmospheric pressure, and improving the accuracy of the monitoring data;
[0065] S5, model update phase: the remote calibration server periodically checks whether the new data meets the update conditions. If so, the neural network is retrained with the new data, the structural parameters are adjusted for optimization, and then the update information is pushed to the sensor system. The sensor system downloads the update and tests the effectiveness of the new model.
[0066] Reference Figure 1 As shown in the figure, the calibration report includes the data comparison before and after calibration, the model information used for calibration, and the confidence of the model. Before entering the model update and optimization stage, the remote calibration server sends the calibration results and calibration report back to the NDIR sensor system through the communication module. After the local control unit receives the calibration results, it corrects and updates the locally stored original measurement data according to the calibration results. The original measurement data is set to M, and the calibration coefficient calculated according to the calibration results is set to k. The corrected data is M 1 =M*k.
[0067] Reference Figure 1 As shown, the calibration report is also stored in the local log file. At the same time, based on the calibration results and the confidence information of the model, it is determined whether the local model needs to be updated or the remote server needs to be requested to retrain the model. When the model confidence is lower than the set threshold, the model needs to be optimized, which triggers the update process of the neural network model.
[0068] Reference Figure 1 As shown in the figure, the model update and optimization stage includes data inspection, retraining and push update. In the data inspection, the remote calibration server regularly checks the newly uploaded data to determine whether the data volume is sufficient and the distribution is reasonable. If the conditions are met, the update process is started. Retraining can integrate new data and historical data. After adjusting the model structure and training parameters as needed, the model is retrained with the processed data. During training, the generalization ability is monitored and overfitting is prevented with the help of the verification set. The training is terminated when the stopping condition is reached. In the push update, the remote calibration server pushes the updated model version information to the sensor system. The sensor system downloads the update and then uses the newly collected local data to test the effectiveness of the new model. If it is not good, the problem is fed back. When the sensor system downloads the update, the sensor system will conduct a preliminary test on the new model, make predictions using some of the newly collected local data, and compare it with the measurement results of the high-precision reference instrument to verify the effectiveness of the new model.
[0069] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A NDIR sensor self-calibration method, characterized in that: The following steps are involved: S1, equipment startup and initialization, turn on the NDIR sensor equipment, the control unit initializes the configuration of each component, checks the connection and functional status, and initializes the local storage unit to prepare for storing calibration measurement data; S2, automatic zero calibration operation, starting the automatic zero calibration procedure according to a preset time interval or a specific trigger condition; S3, data acquisition and transmission. During normal monitoring, the NDIR sensor continuously detects the target gas, and the environmental sensor simultaneously collects humidity and atmospheric pressure data. To ensure the data quality used for neural network model training, it is necessary to regularly pass the standard gas. The number of times the standard gas is passed is closely related to the data quality. If the data acquisition frequency is low, the environment changes greatly, or the sensor measurement stability is poor, it is necessary to increase the number of times the standard gas is passed to obtain sufficient and accurate original sensor measurement data under different environmental conditions and the target gas real concentration data measured by high-precision reference instruments. The control unit packages these data and equipment status information and sends them to the remote calibration server through the communication module to ensure stable transmission. S4. Remote model calibration. The remote calibration server receives and checks the data integrity and accuracy. The server compares the received original sensor measurement data with the target gas real concentration data measured by the high-precision reference instrument and calculates the error between the two. If the error is within the preset allowable error range, it indicates that the current measurement result is relatively accurate and no calibration is required. If the error exceeds the preset allowable error range, the data is input into the pre-trained neural network model, and the model calculates the predicted value of the target gas concentration after calibration and generates a calibration report. S5. Model update and optimization. The remote calibration server will regularly check the newly uploaded data. If the update conditions are met, the neural network model will be retrained using the new data, the model parameters and structure will be optimized, and the updated model version information will be pushed to the sensor system. The sensor system will download the update and test the validity of the new model.
2. A NDIR sensor self-calibration method as claimed in claim 1, characterized in that: The NDIR sensor device includes an NDIR sensor core component, an environmental sensor, a data acquisition circuit, a control unit, a communication module and a local storage unit hardware component.
3. A NDIR sensor self-calibration method as claimed in claim 1, characterized in that: The automatic zeroing procedure includes the following steps: S1, trigger condition check, when the preset time interval is reached or the specific trigger condition is met, the zero calibration procedure is automatically started; S2, optical path switching preparation. When the trigger condition is met, the control unit sends a command to the gas path switching valve to prepare to switch the measurement optical path to the zero gas chamber. During this process, the control unit will check the status of the switching valve to ensure that it is in a normal and operable state. S3, optical path switching operation, the switching valve switches the measuring optical path from the normal measuring gas chamber to the zero gas chamber according to the instruction of the control unit. The zero gas chamber is pre-filled with high-purity nitrogen or other gas that does not absorb the infrared light of the target gas, and the gas chamber has good sealing and stability; S4, optical signal acquisition, after the measuring optical path is successfully switched to the zero gas chamber, the dual optical paths of the NDIR sensor work simultaneously; S5, zero drift value calculation and storage, the control unit calculates the zero drift value; S6, optical path restoration, after completing the collection and storage of the zero drift value, the control unit sends a command to the gas path switching valve again to restore the measurement optical path to the normal measurement gas chamber; S7. Recording and feedback of zero calibration results. The control unit can record relevant data during the zero calibration process in a local log file.
4. A NDIR sensor self-calibration method as claimed in claim 2, characterized in that: During the data acquisition and transmission stage, the data acquisition circuit collects the original measurement data of the NDIR sensor at a specific frequency. These original measurement data reflect the sensor's preliminary detection results of the target gas. At the same time, the environmental sensor collects the humidity data and atmospheric pressure data of the current environment in real time. The control unit integrates the collected NDIR sensor original measurement data, humidity data, atmospheric pressure data and equipment status information. During the integration process, the data is pre-processed, including checking the rationality of the data and removing obviously abnormal data points.
5. A NDIR sensor self-calibration method as claimed in claim 1, characterized in that: The neural network model includes the following operating steps: S1. Data preparation stage: collect the original measurement data of sensors under different environmental conditions and the real concentration data of target gas measured by high-precision reference instruments, pre-process these data, and divide the pre-processed data into several data groups according to time sequence or different environmental conditions. Each group contains N samples. The value of N can be set according to the actual situation. Then, the training set, validation set and test set are divided from these data groups. S2, model building stage, build a multi-layer feedforward neural network including input layer, several hidden layers and output layer. The input layer receives the original measurement value of the sensor, humidity value, atmospheric pressure value and other related data, reasonably sets the number of hidden layers, the number of neurons in each layer and the activation function of each layer, and the output layer outputs the calibrated target gas concentration prediction value; S3, training phase, the training set data is input into the neural network in sequence according to the data group. Based on the back propagation algorithm, the weight and bias parameters of each layer are adjusted according to the error between the output prediction value and the true concentration value. During the training process, the generalization ability of the model is monitored using the validation set. When any of the following conditions is met, the model training is considered to be completed: - Reach the preset maximum number of training rounds M, which can be set according to actual conditions; -The loss function value on the validation set no longer decreases significantly within K consecutive rounds, that is, the change in the loss function value is less than the preset threshold ε. K and ε can be set according to actual conditions; - Overfitting occurs, which is manifested by the loss function value on the validation set starting to increase, while the loss function value on the training set is still decreasing; S4, calibration application stage, in actual work, the newly collected sensor raw measurement, humidity, and atmospheric pressure data are pre-processed and input into the trained neural network, and the model operation outputs the calibrated target gas concentration prediction value, which is used to correct the sensor measurement results; S5, model update phase: the remote calibration server periodically checks whether the new data meets the update conditions. If so, the neural network is retrained with the new data, the structural parameters are adjusted for optimization, and then the update information is pushed to the sensor system. The sensor system downloads the update and tests the effectiveness of the new model.
6. A NDIR sensor self-calibration method as claimed in claim 1, characterized in that: The calibration report includes data comparison before and after calibration, model information used for calibration, and model confidence. Before entering the model update and optimization phase, the remote calibration server transmits the calibration results and calibration report back to the NDIR sensor system through the communication module. After the local control unit receives the calibration results, it corrects and updates the locally stored original measurement data according to the calibration results.
7. A NDIR sensor self-calibration method as claimed in claim 6, characterized in that: The calibration report is also stored in the local log file. At the same time, based on the calibration results and the confidence information of the model, it is determined whether the local model needs to be updated or whether a request to retrain the model is made to the remote server.
8. A NDIR sensor self-calibration method as claimed in claim 1, characterized in that: The model update and optimization stage includes data inspection, retraining and push update. In the data inspection, the remote calibration server regularly checks the newly uploaded data to determine whether the data volume is sufficient and the distribution is reasonable. If the conditions are met, the update process is started. The retraining can integrate new data and historical data, adjust the model structure and training parameters as needed, and then retrain the model with the processed data. During training, the generalization ability is monitored and overfitting is prevented with the help of the verification set. The training is terminated when the stopping condition is reached. In the push update, the remote calibration server pushes the updated model version information to the sensor system, the sensor system downloads the update, and then uses the local newly collected data to test the effectiveness of the new model. If it is not good, the problem is fed back.
Citation Information
Cited By
Household gas detection device
CN121384852A
A household gas detection device
CN121384852B