Alcohol testing method and system based on automatic zero resetting technology
Through the combination of high-sensitivity electrochemical alcohol sensors, fluid dynamics model and PID control algorithm, an automatic re-zero model is built, which solves the sensitivity, response time and calibration accuracy of alcohol detection in the prior art, and realizes the High accuracy and stability of alcohol detection.
Patent Information
- Application Number
- CN202410863057.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-29
- Publication Date
- 2024-11-15
AI Technical Summary
The existing alcohol detection technology has shortcomings in sensitivity, response time, re-zero mechanism and calibration accuracy, which makes it difficult to ensure the accuracy and stability of the detection results, especially when environmental pollutants are disturbed.
Using a high-sensitivity electrochemical alcohol sensor combined with a fluid dynamic model and a PID control algorithm to build an automatic re-zero model. By defining the rate of electrical signal change caused by unit alcohol concentration, the relationship between sensor output and alcohol concentration is calculated, and through clean air Filter contaminants to achieve automatic re-zero and multiple calibrations.
It improves the sensitivity and response speed of the sensor, ensures the accuracy and stability of the measurement results, and can automatically adjust the zero point in complex environments, eliminate background interference, and meet the real-time monitoring and accurate measurement requirements of alcohol concentration.
Smart Images

Figure CN118961824A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of alcohol detection zeroing, and in particular to an alcohol testing method and system based on automatic zeroing technology. Background Art
[0002] Using high-sensitivity alcohol sensors to detect alcohol concentration and using automatic zeroing technology to ensure the accuracy of measurement results has become a key technical requirement.
[0003] Existing alcohol detection technology has many defects. First, the traditional alcohol sensor has deficiencies in sensitivity and response time, which makes it difficult to ensure the accuracy and timeliness of the detection results. Secondly, the existing alcohol detection system lacks an effective zeroing mechanism and is easily interfered by environmental pollutants, thus affecting the accuracy of the measurement results. In addition, the traditional technology lacks accurate mathematical models and algorithm support when performing multiple calibrations and setting the detection range, resulting in unstable calibration results. The present invention introduces a fluid dynamics model and a PID control algorithm to construct an automatic zeroing model, which effectively solves these defects of the prior art. Summary of the invention
[0004] In view of the problems existing in the existing alcohol testing method and system based on the automatic zeroing technology, the present invention is proposed.
[0005] Therefore, the present invention aims to solve the defects of the prior art in terms of sensitivity, response time, zeroing mechanism and calibration accuracy by adopting a high-sensitivity electrochemical alcohol sensor combined with a fluid dynamics model and a PID control algorithm.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides an alcohol testing method based on automatic zeroing technology, which includes selecting a high-sensitivity alcohol sensor based on electrochemical principles, and defining the rate of change of an electrical signal caused by a unit concentration of alcohol according to the redox reaction between alcohol and an electrode surface;
[0008] Based on the definition result, the time required for the sensor to output an electrical signal after being exposed to alcohol gas is obtained, and the calibration curve is introduced to calculate the relationship between the sensor output and the alcohol concentration;
[0009] An automatic zeroing model is constructed based on the calculation results. The automatic zeroing model includes using a fluid dynamics model and a PID control algorithm to control the gas flow rate output by the human body, introducing clean air according to the controlled gas flow rate, filtering the concentration of uncleaned pollutants, detecting the residual pollutant concentration and calculating the average value of the actual alcohol concentration multiple times, and injecting clean air to filter the pollutant concentration.
[0010] As a preferred solution of the alcohol testing method based on the automatic zeroing technology of the present invention, the electrochemical principle includes checking the sensitivity range of the sensor according to the redox reaction between alcohol and the electrode surface, performing multiple calibrations based on the checked range, selecting the lower and upper limits of the alcohol sensor sensitivity, selecting the lower and upper limits of the alcohol sensor response time, selecting the lower and upper limits of the alcohol sensor ambient temperature, and selecting the lower and upper limits of the alcohol sensor power supply voltage, and performing multiple calibrations based on the checked range;
[0011] The specific steps of selecting the lower and upper limits of the alcohol sensor sensitivity are as follows:
[0012] When k2≤S≤k3, where S represents the sensitivity of the sensor, the lower limit k2 and the upper limit k3 of the sensitivity are calculated. The specific calculation steps are as follows:
[0013] The specific calculation formula of the sensitivity lower limit k2 is:
[0014]
[0015] The specific calculation formula of the upper limit of sensitivity k2 is:
[0016]
[0017] Among them, S nominal It represents the nominal sensitivity of the sensor, which is defined as the expected sensitivity value under specific conditions. n represents the factor of the sensitivity confidence interval, S i represents the sensitivity value of the i-th measurement, N represents the number of sensitivity measurements, k2 represents the lower limit of sensitivity, and k3 represents the upper limit of sensitivity;
[0018] The specific steps of selecting the lower and upper limits of the alcohol sensor response time are as follows:
[0019] When t2≤t response ≤t3, where t response Represents the nominal response time of the sensor, then calculate the lower and upper limits of the alcohol sensor response time. The specific calculation steps are as follows:
[0020] The calculation formula for calculating the lower limit of the state of the alcohol sensor response time is:
[0021]
[0022] The specific calculation formula of the upper limit is:
[0023]
[0024] Among them, tnominal represents the nominal response time of the sensor, m represents the factor of the time confidence interval, and t j represents the jth measured response time, and M represents the number of response time measurements.
[0025] As a preferred solution of the alcohol testing method based on the automatic zeroing technology of the present invention, the specific steps of selecting the lower and upper limits of the alcohol sensor ambient temperature are as follows:
[0026] When T1≤T ambient ≤T2, where T ambient Represents the nominal operating temperature of the sensor, then calculate the lower limit and upper limit of the nominal operating temperature of the sensor. The specific calculation steps are as follows:
[0027] The specific calculation formula for calculating the lower limit of the nominal operating temperature of the sensor is:
[0028]
[0029] The specific calculation formula for the upper limit of the nominal operating temperature of the sensor is:
[0030]
[0031] Among them, T ambient represents the nominal operating temperature of the sensor, m represents the factor of the temperature confidence interval, T k represents the ambient temperature measured for the Kth time, and p represents the number of working temperature measurements;
[0032] The specific steps of selecting the lower and upper limits of the alcohol sensor power supply voltage are as follows:
[0033] When V1≤V nomina ≤V2, where V nomina Represents the nominal power supply voltage of the sensor, then calculate the sensor power supply voltage lower limit and sensor power supply voltage upper limit. The specific calculation steps are as follows:
[0034] The specific calculation formula for calculating the lower limit of the sensor power supply voltage is:
[0035]
[0036] The specific calculation formula for the upper limit of the sensor power supply voltage is:
[0037]
[0038] Among them, V nominal represents the nominal supply voltage of the sensor, q represents the factor of the confidence interval of the supply voltage, V lrepresents the power supply voltage measured for the lth time, and W represents the number of power supply voltage measurements.
[0039] As a preferred solution of the alcohol testing method based on the automatic zeroing technology of the present invention, wherein: the multiple calibrations based on the inspection range include calculating the lower limit value and the upper limit value of the sensor after calibration, and the specific steps are as follows:
[0040] The specific formula for calculating the lower limit value of the sensor after calibration is:
[0041]
[0042] The specific calculation formula of the upper limit value is:
[0043]
[0044] Among them, γ represents the factor of the confidence interval after calibration, R represents the number of calibrations, and S measured,m represents the sensitivity of the mth measurement, S calibrated,m represents the sensitivity of the mth calibration, S represents the sensitivity of the sensor, and t response Indicates the nominal response time of the sensor, T ambient Indicates the nominal operating temperature of the sensor, V nominal Indicates the nominal supply voltage of the sensor.
[0045] As a preferred embodiment of the alcohol testing method based on the automatic zeroing technology of the present invention, wherein: the definition of the rate of change of the electrical signal caused by the unit concentration of alcohol includes using a linear regression analysis method to calculate the sensitivity S intercept of the sensor, calculating the standard deviation of the sensitivity S of the sensor according to the intercept, and calculating the effective range of the electrical signal according to the obtained standard deviation;
[0046] The specific formula for calculating the sensitivity S intercept of the sensor is:
[0047]
[0048] Among them, S represents the sensitivity of the sensor, b represents the intercept, N represents the number of samples, and C i represents the alcohol concentration value of the i-th sample, represents the mean alcohol concentration, ΔV i represents the change value of the electrical signal of the i-th sample, represents the mean value of the electrical signal change, represents the difference between the alcohol concentration of the i-th sample and the mean, Represents the difference between the electrical signal change of the i-th sample and the mean;
[0049] The introduction of the calibration curve to calculate the relationship between the sensor output and the alcohol concentration includes calculating the electrical signal change value according to the difference between the nominal power supply voltage and the intercept of the sensor, and substituting the obtained electrical signal change value into the calibration curve equation to solve the alcohol concentration of the current environment;
[0050] The specific formula for calculating the change value of the electrical signal is:
[0051]
[0052] Where, ΔV measured Indicates the change value of the electrical signal, V nominal represents the nominal supply voltage of the sensor, b represents the intercept;
[0053] The specific calculation formula for solving the alcohol concentration in the current environment is:
[0054]
[0055] Among them, C represents the alcohol concentration of the current environment, S represents the sensitivity of the sensor, b represents the intercept, ΔV measured Indicates the change value of the electrical signal.
[0056] As a preferred solution of the alcohol testing method based on the automatic zeroing technology of the present invention, the automatic zeroing model is constructed, which includes using a fluid dynamics model and a PID control algorithm to complete the gas flow rate control, removing the interfering substances of the alcohol concentration in the current environment, starting the zeroing program by automatic triggering, and setting the initial flow rate of the air pump based on the alcohol concentration in the current environment;
[0057] The specific calculation formula for the gas flow rate control is:
[0058]
[0059] Among them, K p Indicates the ratio of the PID controller, K i Represents the integral of the PID controller, K d Represents the differential gain of the PID controller;
[0060] The removal of interfering substances of alcohol concentration in the current environment includes calculating the filtration efficiency according to the control of the gas flow rate, and the specific calculation formula is:
[0061]
[0062] Where N represents the number of different pollutants, k i represents the capture rate constant of the i-th pollutant, A irepresents the surface area of the i-th pollutant, V represents the volume of the filter, t represents the filtration time, and Q(t) represents the gas flow rate control.
[0063] As a preferred embodiment of the alcohol testing method based on the automatic zeroing technology of the present invention, wherein: the injecting of clean air to filter the pollutant concentration includes setting the air pump according to the set initial flow rate Q according to the gas flow rate control set , monitor the residual gas concentration C residual ;
[0064] If the concentration of residual gas C residual Greater than threshold C threshold , then the first clean air injection operation is required;
[0065] After the first injection of clean air, adjust the gas flow rate Q(t) of the air pump and correct the gas flow rate Q(t) of the air pump. The specific correction calculation formula is:
[0066]
[0067] Where ΔQ(t) represents the dynamic correction at time t, k represents the adjustment coefficient, and C residual Indicates the real-time residual gas concentration, C threshold represents the set residual gas concentration threshold, and τ represents the time constant;
[0068] If the concentration of residual gas C residual Greater than the corrected threshold When ΔQ(t) is calculated according to the real-time residual gas concentration C residual With the corrected threshold The difference is adjusted positively, and clean air is injected n times until the set environmental cleanliness requirement is met;
[0069] If the concentration of residual gas C residual Below or equal to the revised threshold , ΔQ(t) is zero, and the flow rate of the air pump remains unchanged.
[0070] In a second aspect, an embodiment of the present invention provides an alcohol testing system based on automatic zeroing technology, which includes: a selection module, which selects a high-sensitivity alcohol sensor based on an electrochemical principle and defines the rate of change of an electrical signal caused by a unit concentration of alcohol;
[0071] A calculation module, which obtains the time required for the sensor to output an electrical signal after being exposed to alcohol gas based on the definition result, and introduces a calibration curve to calculate the relationship between the sensor output and the alcohol concentration;
[0072] The detection module builds an automatic zeroing model based on the calculation results, detects the residual pollutant concentration and calculates the average value of the actual alcohol concentration multiple times, and injects clean air to filter the pollutant concentration.
[0073] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the processor executes the computer program, any step of the above-mentioned alcohol testing method based on automatic zeroing technology is implemented.
[0074] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the above-mentioned alcohol testing method based on the automatic zeroing technology is implemented.
[0075] The beneficial effects of the present invention are as follows: the present invention can accurately detect minute concentration changes by selecting a high-sensitivity electrochemical alcohol sensor, and adopts a fluid dynamics model and a PID control algorithm to effectively control the gas flow rate and filtering effect, ensure environmental cleanliness and measurement stability, and introduce automatic zeroing technology to enable the sensor to automatically adjust the zero point in various complex environments, eliminate background interference, and ensure the accuracy of the test results. In addition, multiple calibrations and dynamic correction algorithms further improve the stability and response speed of the system, meet the high requirements for real-time monitoring and accurate measurement of alcohol concentration, and thus greatly improve the performance and application range of the alcohol testing system. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0077] Figure 1 A specific flow chart of an alcohol testing method and system based on automatic zeroing technology provided by one embodiment of the present invention.
[0078] Figure 2 A schematic diagram of an alcohol testing system of an alcohol testing method and system based on automatic zeroing technology provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0080] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0081] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0082] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0083] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0084] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0085] Example 1
[0086] Reference Figure 1 and Figure 2, which is the first embodiment of the present invention, and provides an alcohol testing method based on automatic zeroing technology, comprising:
[0087] S1: Select a high-sensitivity alcohol sensor based on electrochemical principles, and define the rate of change of the electrical signal caused by a unit concentration of alcohol according to the redox reaction between alcohol and the electrode surface.
[0088] Among them, the electrochemical principle includes checking the sensitivity range of the sensor according to the redox reaction between alcohol and the electrode surface, performing multiple calibrations based on the checked range, selecting the lower and upper limits of the alcohol sensor sensitivity, selecting the lower and upper limits of the alcohol sensor response time, selecting the lower and upper limits of the alcohol sensor ambient temperature, and selecting the lower and upper limits of the alcohol sensor power supply voltage, and performing multiple calibrations based on the checked range;
[0089] The specific steps for selecting the lower and upper limits of the alcohol sensor sensitivity are as follows:
[0090] When k2≤S≤k3, where S represents the sensitivity of the sensor, the lower limit k2 and the upper limit k3 of the sensitivity are calculated. The specific calculation steps are as follows:
[0091] The specific calculation formula for the lower limit of sensitivity k2 is:
[0092]
[0093] The specific calculation formula for the upper limit of sensitivity k2 is:
[0094]
[0095] Among them, S nominal It represents the nominal sensitivity of the sensor, which is defined as the expected sensitivity value under specific conditions. n represents the factor of the sensitivity confidence interval, S i represents the sensitivity value of the i-th measurement, N represents the number of sensitivity measurements, k2 represents the lower limit of sensitivity, and k3 represents the upper limit of sensitivity;
[0096] The specific steps for selecting the lower and upper limits of the alcohol sensor response time are as follows:
[0097] When t2≤t response ≤t3, where t response Represents the nominal response time of the sensor, then calculate the lower and upper limits of the alcohol sensor response time. The specific calculation steps are as follows:
[0098] The formula for calculating the lower limit of the alcohol sensor response time is:
[0099]
[0100] The specific calculation formula for the upper limit is:
[0101]
[0102] Among them, t nominal represents the nominal response time of the sensor, m represents the factor of the time confidence interval, and t j represents the jth measured response time, and M represents the number of response time measurements.
[0103] Furthermore, the electrochemical principle of the present invention checks the sensitivity range of the sensor through the redox reaction between alcohol and the electrode surface. In the specific operation, it is assumed that the nominal sensitivity of the sensor is 0.01ppm. -1 / , and recorded different sensitivity values in 10 measurements. By calculation, the lower limit of sensitivity is 0.008ppm -1 / , the upper limit is 0.012ppm -1 / , ensure that the sensor works within this range. For the response time, it is assumed that the nominal response time of the sensor is 2 seconds, and different response time values are recorded in 10 measurements. By calculation, the lower limit of the response time is 1.8 seconds and the upper limit is 2.2 seconds, ensuring that the sensor can respond quickly within this range. In addition, the sensor works stably in the ambient temperature range of 15℃ to 35℃ and the power supply voltage range of 3.0V to 3.3V. Through multiple calibrations and precise measurements, the state range of sensitivity and response time can be determined, thereby significantly improving the accuracy and reliability of alcohol testing.
[0104] S1.1: The specific steps for selecting the lower and upper limits of the alcohol sensor ambient temperature are as follows:
[0105] When T1≤T ambient ≤T2, where T ambient Represents the nominal operating temperature of the sensor, then calculate the lower limit and upper limit of the nominal operating temperature of the sensor. The specific calculation steps are as follows:
[0106] The specific calculation formula for calculating the lower limit of the nominal operating temperature of the sensor is:
[0107]
[0108] The specific calculation formula for the upper limit of the nominal operating temperature of the sensor is:
[0109]
[0110] Among them, T ambient represents the nominal operating temperature of the sensor, m represents the factor of the temperature confidence interval, T krepresents the ambient temperature measured for the Kth time, and p represents the number of working temperature measurements;
[0111] The specific steps for selecting the lower and upper limits of the alcohol sensor power supply voltage are as follows:
[0112] When V1≤V nomina ≤V2, where V nomina Represents the nominal power supply voltage of the sensor, then calculate the sensor power supply voltage lower limit and sensor power supply voltage upper limit. The specific calculation steps are as follows:
[0113] The specific calculation formula for calculating the lower limit of the sensor power supply voltage is:
[0114]
[0115] The specific calculation formula for the upper limit of the sensor power supply voltage is:
[0116]
[0117] Among them, V nominal represents the nominal supply voltage of the sensor, q represents the factor of the confidence interval of the supply voltage, V l represents the power supply voltage measured for the lth time, and Q represents the number of power supply voltage measurements.
[0118] Furthermore, in order to ensure the stable performance of the alcohol sensor under different environmental conditions, it is necessary to accurately set the upper and lower limits of its operating temperature and power supply voltage. First, assuming that the nominal operating temperature of the sensor is 25°C, by analyzing the measurement data at 10 different temperatures, the factors of the temperature confidence interval are determined, so that the lower limit of the sensor operating temperature is 20°C and the upper limit is 30°C. At this time, the sensor can work stably in the ambient temperature range of 20°C to 30°C. Similarly, for the power supply voltage, assuming that the nominal power supply voltage of the sensor is 3.2V, in 10 measurements at different voltages, by calculating the factors of the voltage confidence interval, the lower limit of the power supply voltage is determined to be 3.1V and the upper limit is 3.3V, which ensures that the sensor can operate normally within the power supply voltage range of 3.1V to 3.3V. In this way, the state range of the operating temperature and power supply voltage of the alcohol sensor can be accurately set, thereby ensuring its reliability and accuracy under various environmental conditions.
[0119] S1.2: Perform multiple calibrations based on the inspection range, including calculating the lower and upper limits of the sensor after calibration. The specific steps are as follows:
[0120] The specific formula for calculating the lower limit value of the sensor after calibration is:
[0121]
[0122] The specific calculation formula for the upper limit value is:
[0123]
[0124] Among them, γ represents the factor of the confidence interval after calibration, R represents the number of calibrations, and S measured,m represents the sensitivity of the mth measurement, S calibrated,m represents the sensitivity of the mth calibration, S represents the sensitivity of the sensor, and t response Indicates the nominal response time of the sensor, T ambient Indicates the nominal operating temperature of the sensor, V nominal Indicates the nominal supply voltage of the sensor.
[0125] S1.3: Defining the rate of change of the electrical signal caused by a unit concentration of alcohol includes using a linear regression analysis method to calculate the sensitivity S intercept of the sensor, calculating the standard deviation of the sensitivity S of the sensor based on the intercept, and calculating the effective range of the electrical signal based on the obtained standard deviation;
[0126] The specific formula for calculating the sensitivity S intercept of the sensor is:
[0127]
[0128] Among them, S represents the sensitivity of the sensor, b represents the intercept, N represents the number of samples, and C i represents the alcohol concentration value of the i-th sample, represents the mean alcohol concentration, ΔV i represents the change value of the electrical signal of the i-th sample, represents the mean value of the electrical signal change, represents the difference between the alcohol concentration of the i-th sample and the mean, Represents the difference between the electrical signal change of the i-th sample and the mean.
[0129] S2: Based on the definition result, the time required for the sensor to output an electrical signal after being exposed to alcohol gas is obtained, and the calibration curve is introduced to calculate the relationship between the sensor output and the alcohol concentration.
[0130] The introduction of the calibration curve to calculate the relationship between the sensor output and the alcohol concentration includes calculating the change value of the electrical signal according to the difference between the nominal power supply voltage and the intercept of the sensor, and substituting the obtained change value of the electrical signal into the calibration curve equation to solve the alcohol concentration of the current environment;
[0131] The specific formula for calculating the change value of the electrical signal is:
[0132]
[0133] Where, ΔV measured Indicates the change value of the electrical signal, Vnominal represents the nominal supply voltage of the sensor, b represents the intercept;
[0134] The specific calculation formula for solving the alcohol concentration in the current environment is:
[0135]
[0136] Among them, C represents the alcohol concentration of the current environment, S represents the sensitivity of the sensor, b represents the intercept, ΔV measured Indicates the change value of the electrical signal.
[0137] Furthermore, when defining the rate of change of the electrical signal caused by a unit concentration of alcohol, the linear regression analysis method is first used to calculate the sensitivity and intercept of the sensor. Assuming that 10 measurements were performed, the alcohol concentration value and the corresponding electrical signal change value each time were 40ppm / 0.45V, 50ppm / 0.50V, 60ppm / 0.55V, etc., the average alcohol concentration was 50ppm, and the average electrical signal change was 0.5V. By calculating the difference between the alcohol concentration measured each time and the mean and the difference between the electrical signal change value and the mean, the sensitivity of the sensor was 0.01V / ppm and the intercept was 0.02V.
[0138] The calculated standard deviation of sensitivity is 0.005V / ppm, which determines the effective range of the electrical signal, thereby improving the accuracy and reliability of the measurement. Then, the relationship between the sensor output and the alcohol concentration is calculated using the calibration curve. The nominal power supply voltage of the sensor is 3.2V. By comparing the difference between the nominal voltage and the intercept, the electrical signal change value is calculated to be 0.03V.
[0139] Substitute the electrical signal change value into the calibration curve equation to solve the alcohol concentration in the current environment. Under the condition of 0.03V electrical signal change, the alcohol concentration in the current environment is calculated to be 10ppm. Through this series of steps, the alcohol concentration in the current environment can be accurately inferred from the electrical signal output of the sensor, and the accurate measurement and monitoring of alcohol concentration can be achieved. The relationship between alcohol concentration and electrical signal change is shown in Table 1 below:
[0140] Table 1 Relationship between alcohol concentration and electrical signal changes
[0141] Alcohol concentration (ppm) Electrical signal change value (V) 40 0.45 50 0.50 60 0.55 70 0.60 80 0.65
[0142] The table shows the relationship between alcohol concentration and electrical signal changes. By recording the electrical signal change values at different concentrations and using the linear regression method to calculate the sensitivity and intercept of the sensor, the precise value of the alcohol concentration in the current environment can be obtained based on these calculation results. The specific data in the table include sample number, alcohol concentration, mean alcohol concentration, electrical signal change, mean electrical signal change, alcohol concentration difference and electrical signal change difference.
[0143] S3: Construct an automatic zeroing model based on the calculation results. The automatic zeroing model includes using a fluid dynamics model and a PID control algorithm to control the gas flow rate output by the human body, introducing clean air according to the controlled gas flow rate, filtering the uncleaned pollutant concentration, detecting the residual pollutant concentration and calculating the average value of the actual alcohol concentration multiple times, and injecting clean air to filter the pollutant concentration.
[0144] Among them, building an automatic zeroing model includes using a fluid dynamics model and a PID control algorithm to complete gas flow rate control, removing interfering substances of the alcohol concentration in the current environment, starting the zeroing program through an automatic triggering method, and setting the initial flow rate of the air pump based on the alcohol concentration in the current environment;
[0145] The specific calculation formula for gas flow rate control is:
[0146]
[0147] Among them, K p Indicates the ratio of the PID controller, K i Represents the integral of the PID controller, K d Represents the differential gain of the PID controller;
[0148] Removing interfering substances of alcohol concentration in the current environment includes calculating the filtration efficiency based on the control of gas flow rate. The specific calculation formula is:
[0149]
[0150] Where N represents the number of different pollutants, k i represents the capture rate constant of the i-th pollutant, A i represents the surface area of the i-th pollutant, V represents the volume of the filter, t represents the filtration time, and Q(t) represents the gas flow rate control.
[0151] S3.1: Inject clean air to filter the pollutant concentration, including setting the air pump according to the set initial flow rate Q according to the gas flow rate control set , monitor the residual gas concentration C residual ;
[0152] If the concentration of residual gas C residual Greater than threshold C threshold , then the first clean air injection operation is required;
[0153] After the first injection of clean air, adjust the gas flow rate Q(t) of the air pump and correct the gas flow rate Q(t) of the air pump. The specific correction calculation formula is:
[0154]
[0155] Where ΔQ(t) represents the dynamic correction at time t, k represents the adjustment coefficient, and C residual Indicates the real-time residual gas concentration, C threshold represents the set residual gas concentration threshold, and τ represents the time constant;
[0156] If the concentration of residual gas C residual Greater than the corrected threshold When ΔQ(t) is calculated according to the real-time residual gas concentration C residual With the corrected threshold The difference is adjusted positively, and clean air is injected n times until the set environmental cleanliness requirement is met;
[0157] If the concentration of residual gas C residual Below or equal to the revised threshold , ΔQ(t) is zero, and the flow rate of the air pump remains unchanged.
[0158] In a preferred embodiment, an alcohol testing system based on automatic zeroing technology includes a selection module, which selects a high-sensitivity alcohol sensor based on electrochemical principles and defines the rate of change of the electrical signal caused by a unit concentration of alcohol;
[0159] A calculation module, which obtains the time required for the sensor to output an electrical signal after being exposed to alcohol gas based on the definition result, and introduces a calibration curve to calculate the relationship between the sensor output and the alcohol concentration;
[0160] The detection module builds an automatic zeroing model based on the calculation results, detects the residual pollutant concentration and calculates the average value of the actual alcohol concentration multiple times, and injects clean air to filter the pollutant concentration.
[0161] The above-mentioned unit modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above-mentioned modules.
[0162] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0163] In summary, the present invention can accurately detect small concentration changes by selecting a high-sensitivity electrochemical alcohol sensor, and adopts a fluid dynamics model and PID control algorithm to effectively control the gas flow rate and filtering effect, ensure environmental cleanliness and measurement stability, and introduce automatic zeroing technology, so that the sensor can automatically adjust the zero point in various complex environments, eliminate background interference, and ensure the accuracy of the test results. In addition, multiple calibrations and dynamic correction algorithms further improve the stability and response speed of the system, meet the high requirements for real-time monitoring and accurate measurement of alcohol concentration, and thus greatly improve the performance and application range of the alcohol testing system.
[0164] Example 2
[0165] Reference Figure 1 and Figure 2 , which is the second embodiment of the present invention, and this embodiment provides an alcohol testing method based on automatic zeroing technology. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through simulation experiments.
[0166] The process of injecting clean air to filter the pollutant concentration includes the following steps: first, according to the gas flow rate control, the air pump is set to run at a set initial flow rate (for example, 10L / min), and the concentration of the residual gas is monitored. If the monitored residual gas concentration is greater than a preset threshold (for example, 50ppm), it is necessary to inject clean air for the first time. After the first injection of clean air, adjust the gas flow rate of the air pump, for example, from 10L / min to 15L / min, and correct the gas flow rate of the air pump. It is assumed that the dynamic correction amount in the correction calculation is 0.2, the adjustment coefficient is 0.5, the real-time residual gas concentration is 55ppm, the set residual gas concentration threshold is 50ppm, and the time constant is 30 seconds.
[0167] If the concentration of residual gas is still greater than the corrected threshold value (e.g. 52ppm) after correction, a positive adjustment is made according to the difference between the real-time residual gas concentration and the corrected threshold value (e.g. 3ppm), and clean air is further injected, for example, 3 times of clean air injection, each injection volume is 2L, until the set environmental cleanliness requirements are met. When the concentration of residual gas is lower than or equal to the corrected threshold value (e.g. 50ppm), no adjustment is made, and the flow rate of the air pump remains unchanged and continues to run at 15L / min. The clean air filtration data is shown in Table 2 below:
[0168] Table 2 Clean air filtration data table
[0169] step parameter Numeric Initial flow rate setting Initial flow rate 10L / min Residual gas concentration monitoring Preset Threshold 50ppm First clean air injection Residual gas concentration >50ppm Adjust the flow rate after the first clean air injection Adjusted flow rate 15L / min Correction calculation Dynamic correction amount 0.2 Correction calculation Adjustment factor 0.5 Correction calculation Real-time residual gas concentration 55ppm Correction calculation Setting the residual gas concentration threshold 50ppm Correction calculation Time constant 30 seconds Corrected threshold Corrected threshold 52ppm Further adjustments Difference between real-time concentration and corrected threshold 3ppm Further injection of clean air Injection times 3 times Further injection of clean air Each injection amount 2L Meet cleanliness requirements Corrected concentration threshold ≤50ppm Stable flow rate Final flow rate 15L / min
[0170] The table shows the process of injecting clean air by the air pump to reduce the residual gas concentration under different initial conditions, including setting the initial flow rate, real-time monitoring of the residual gas concentration, the set threshold, and the positive adjustment according to the difference between the real-time concentration and the threshold until the environmental cleanliness requirements are met. The comparison with the prior art is shown in Table 3 below:
[0171] Table 3 Comparison with prior art
[0172]
[0173] The table compares the differences between the technical solution of the present invention and the prior art, and highlights the significant advantages of the present invention in sensor sensitivity calibration, response time control, calibration of ambient temperature and power supply voltage, automatic zeroing technology, clean air injection control, calibration curve application, and residual gas concentration monitoring. These improvements improve the measurement accuracy, stability, and automation level of the alcohol sensor, and ensure the cleanliness of the test environment and the reliability of the measurement process.
[0174] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An alcohol testing method based on automatic zeroing technology, characterized in that: include, A high-sensitivity alcohol sensor based on electrochemical principle is selected, and the rate of change of the electrical signal caused by the unit concentration of alcohol is defined according to the redox reaction between alcohol and the electrode surface; Based on the definition result, the time required for the sensor to output an electrical signal after being exposed to alcohol gas is obtained, and the relationship between the sensor output and the alcohol concentration is calculated by introducing a calibration curve; An automatic zeroing model is constructed based on the calculation results. The automatic zeroing model includes using a fluid dynamics model and a PID control algorithm to control the gas flow rate output by the human body, introducing clean air according to the controlled gas flow rate, filtering the concentration of uncleaned pollutants, detecting the residual pollutant concentration and calculating the average value of the actual alcohol concentration multiple times, and injecting clean air to filter the pollutant concentration.
2. The alcohol testing method based on automatic zeroing technology as claimed in claim 1, characterized in that: The electrochemical principle includes checking the sensitivity range of the sensor according to the redox reaction between alcohol and the electrode surface, performing multiple calibrations based on the checked range, selecting the lower and upper limits of the alcohol sensor sensitivity, selecting the lower and upper limits of the alcohol sensor response time, selecting the lower and upper limits of the alcohol sensor ambient temperature, and selecting the lower and upper limits of the alcohol sensor power supply voltage, and performing multiple calibrations based on the checked range; The specific steps of selecting the lower and upper limits of the alcohol sensor sensitivity are as follows: When k2≤S≤k3, where S represents the sensitivity of the sensor, the lower limit k2 and the upper limit k3 of the sensitivity are calculated. The specific calculation steps are as follows: The specific calculation formula of the sensitivity lower limit k2 is: The specific calculation formula of the upper limit of sensitivity k2 is: Among them, S nominal It represents the nominal sensitivity of the sensor, which is defined as the expected sensitivity value under specific conditions. n represents the factor of the sensitivity confidence interval, S i represents the sensitivity value of the i-th measurement, N represents the number of sensitivity measurements, k2 represents the lower limit of sensitivity, and k3 represents the upper limit of sensitivity; The specific steps of selecting the lower and upper limits of the alcohol sensor response time are as follows: When t2≤t response ≤t3, where t response Represents the nominal response time of the sensor, then calculate the lower and upper limits of the alcohol sensor response time. The specific calculation steps are as follows: The calculation formula for calculating the lower limit of the state of the alcohol sensor response time is: The specific calculation formula of the upper limit is: Among them, t nominal represents the nominal response time of the sensor, m represents the factor of the time confidence interval, and t j represents the jth measured response time, and M represents the number of response time measurements.
3. The alcohol testing method based on automatic zeroing technology as claimed in claim 2, characterized in that: The specific steps of selecting the lower and upper limits of the alcohol sensor ambient temperature are as follows: When T1≤T ambient ≤T2, where T ambient Represents the nominal operating temperature of the sensor, then calculate the lower limit and upper limit of the nominal operating temperature of the sensor. The specific calculation steps are as follows: The specific calculation formula for calculating the lower limit of the nominal operating temperature of the sensor is: The specific calculation formula for the upper limit of the nominal operating temperature of the sensor is: Among them, T ambient represents the nominal operating temperature of the sensor, m represents the factor of the temperature confidence interval, T k represents the ambient temperature measured for the Kth time, and p represents the number of working temperature measurements; The specific steps of selecting the lower and upper limits of the alcohol sensor power supply voltage are as follows: When V1≤V nomina ≤V2, where V nomina Represents the nominal power supply voltage of the sensor, then calculate the sensor power supply voltage lower limit and sensor power supply voltage upper limit. The specific calculation steps are as follows: The specific calculation formula for calculating the lower limit of the sensor power supply voltage is: The specific calculation formula for the upper limit of the sensor power supply voltage is: Among them, V nominal represents the nominal supply voltage of the sensor, q represents the factor of the confidence interval of the supply voltage, V l represents the power supply voltage measured for the lth time, and Q represents the number of power supply voltage measurements.
4. The alcohol testing method based on automatic zeroing technology as claimed in claim 3 is characterized in that: The multiple calibrations based on the inspection range include calculating the lower limit value and the upper limit value of the sensor after calibration, and the specific steps are as follows: The specific formula for calculating the lower limit value of the sensor after calibration is: The specific calculation formula of the upper limit value is: Among them, γ represents the factor of the confidence interval after calibration, R represents the number of calibrations, and S measured,m represents the sensitivity of the mth measurement, S calibrated,m represents the sensitivity of the mth calibration, S represents the sensitivity of the sensor, and t response Indicates the nominal response time of the sensor, T ambient Indicates the nominal operating temperature of the sensor, V nominal Indicates the nominal supply voltage of the sensor.
5. The alcohol testing method based on automatic zeroing technology as claimed in claim 4, characterized in that: Defining the rate of change of the electrical signal caused by a unit concentration of alcohol includes using a linear regression analysis method to calculate the sensitivity S intercept of the sensor, calculating the standard deviation of the sensitivity S of the sensor according to the intercept, and calculating the effective range of the electrical signal according to the obtained standard deviation; The specific formula for calculating the sensitivity S intercept of the sensor is: Among them, S represents the sensitivity of the sensor, b represents the intercept, N represents the number of samples, and C i represents the alcohol concentration value of the i-th sample, represents the mean alcohol concentration, ΔV i represents the change value of the electrical signal of the i-th sample, represents the mean value of the electrical signal change, represents the difference between the alcohol concentration of the i-th sample and the mean, Represents the difference between the electrical signal change of the i-th sample and the mean; The introduction of the calibration curve to calculate the relationship between the sensor output and the alcohol concentration includes calculating the electrical signal change value according to the difference between the nominal power supply voltage and the intercept of the sensor, and substituting the obtained electrical signal change value into the calibration curve equation to solve the alcohol concentration of the current environment; The specific formula for calculating the change value of the electrical signal is: Where, ΔV measured Indicates the change value of the electrical signal, V nominal represents the nominal supply voltage of the sensor, b represents the intercept; The specific calculation formula for solving the alcohol concentration in the current environment is: Among them, C represents the alcohol concentration of the current environment, S represents the sensitivity of the sensor, b represents the intercept, ΔV measured Indicates the change value of the electrical signal.
6. The alcohol testing method based on automatic zeroing technology as claimed in claim 5, characterized in that: The automatic zeroing model is constructed by using a fluid dynamics model and a PID control algorithm to complete the gas flow rate control, remove the interfering substances of the alcohol concentration in the current environment, start the zeroing program by automatic triggering, and set the initial flow rate of the air pump based on the alcohol concentration in the current environment; The specific calculation formula for the gas flow rate control is: Among them, K p Indicates the ratio of the PID controller, K i Represents the integral of the PID controller, K d Represents the differential gain of the PID controller; The removal of interfering substances of alcohol concentration in the current environment includes calculating the filtration efficiency according to the control of the gas flow rate, and the specific calculation formula is: Where N represents the number of different pollutants, k i represents the capture rate constant of the i-th pollutant, A i represents the surface area of the i-th pollutant, V represents the volume of the filter, t represents the filtration time, and Q(t) represents the gas flow rate control.
7. The alcohol testing method based on automatic zeroing technology as claimed in claim 6, characterized in that: The injecting of clean air to filter the pollutant concentration includes setting the air pump to a set initial flow rate Q according to the gas flow rate control. set , monitor the residual gas concentration C residual ; If the concentration of residual gas C residual Greater than threshold C threshold , then the first clean air injection operation is required; After the first injection of clean air, adjust the gas flow rate Q(t) of the air pump and correct the gas flow rate Q(t) of the air pump. The specific correction calculation formula is: Where ΔQ(t) represents the dynamic correction at time t, k represents the adjustment coefficient, and C residual Indicates the real-time residual gas concentration, C threshold represents the set residual gas concentration threshold, and τ represents the time constant; If the concentration of residual gas C residual Greater than the corrected threshold When ΔQ(t) is calculated according to the real-time residual gas concentration C residual With the corrected threshold The difference is adjusted positively, and clean air is injected n times until the set environmental cleanliness requirement is met; If the concentration of residual gas C residual Below or equal to the revised threshold , ΔQ(t) is zero, and the flow rate of the air pump remains unchanged.
8. An alcohol testing system based on automatic zeroing technology, based on the alcohol testing method based on automatic zeroing technology according to any one of claims 1 to 7, characterized in that: include, A selection module is used to select a high-sensitivity alcohol sensor based on electrochemical principles and define the rate of change of the electrical signal caused by a unit concentration of alcohol; A calculation module, which obtains the time required for the sensor to output an electrical signal after being exposed to alcohol gas based on the definition result, and introduces a calibration curve to calculate the relationship between the sensor output and the alcohol concentration; The detection module builds an automatic zeroing model based on the calculation results, detects the residual pollutant concentration and calculates the average value of the actual alcohol concentration multiple times, and injects clean air to filter the pollutant concentration.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the alcohol testing method based on automatic zeroing technology described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the alcohol testing method based on automatic zeroing technology described in any one of claims 1 to 7 are implemented.
