Full-link temperature control method and system for breath alcohol tester calibration
By constructing a series hysteresis model of gas transmission and heating inertia, and combining an improved Smith predictor and multimodal PID control, the problems of temperature coupling interference and slow response in the breath alcohol detector testing device were solved, achieving high-precision and fast-response temperature control, improving the accuracy of the testing results and the intelligent operation and maintenance of the system.
Patent Information
- Application Number
- CN202611065240.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-08-25
AI Technical Summary
In existing breath alcohol detector testing devices, the traditional two-stage heating architecture suffers from temperature coupling interference, slow control response due to the large heat capacity of the heating element, and the sensor temperature is not included in the real-time control loop, which affects the accuracy and reliability of the test results.
By employing a gas transport and heating inertial series hysteresis model, combined with an improved Smith predictor, multimodal PID control, sensor thermal balance back-calculation correction, and piecewise Hermite interpolation nonlinear compensation, and updating parameters online through a robust RLS algorithm, high-precision and fast-response control of gas temperature is achieved.
It effectively eliminates temperature hysteresis and thermal balance error, improves the accuracy and reliability of the test results, adapts to different expiratory flow conditions, and enhances the intelligent operation and maintenance level of the system.
Smart Images

Figure CN122632933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of temperature control technology, and more specifically to a full-chain temperature control method and system for breath alcohol detector testing. Background Technology
[0002] Currently, the standard ethanol gas comparison method is commonly used to calibrate breath alcohol detectors. This involves introducing a standard gas of known concentration into the device under test and comparing the deviation between the instrument's reading and the standard value to determine its metrological performance. To ensure the accuracy of the calibration results, the outlet temperature of the standard gas must be strictly controlled within the range of 34±0.5℃ to match the actual temperature of exhaled breath and the sensitivity characteristics of the sensor at that temperature.
[0003] In existing technologies, a two-stage series heating architecture is widely used, where the first heating zone initially heats the ambient gas, and the second heating zone performs fine-tuning. However, this architecture has several technical limitations: First, there is significant temperature coupling interference between the two heating zones, forming mass flow coupling through airflow thermal migration and solid-state thermal conduction coupling through pipe wall heat transfer. The fixed compensation parameters of traditional offline calibration are difficult to adapt to time-varying factors such as flow rate, ambient temperature, and component aging, leading to a gradual deterioration of the decoupling effect. Second, the heat capacity of the heating element is much greater than that of the gas, causing severe overshoot during high-power regulation and slow response during low-power fine-tuning, making it difficult to cope with sudden environmental changes. In addition, the sensor temperature of the instrument under test is only used for offline compensation of the test results and is not incorporated into the real-time control loop of the calibration device, wasting key information reflecting the complete heat transfer terminal effect.
[0004] Therefore, how to provide a full-link temperature control method that integrates multi-point temperature sensing, dynamic coupling and decoupling, and terminal feedback compensation to achieve high-precision and high-response control of the standard gas outlet temperature is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention provides a full-link temperature control method and system for breath alcohol detector testing. By constructing a series hysteresis model of gas transmission and heating inertia and using an improved Smith predictor for feedforward compensation, combined with multimodal partitioned PID control, sensor thermal balance back-calculation correction, piecewise Hermite interpolation nonlinear compensation, and adaptive RLS parameter online update, high-precision, fast-response, and robust control of gas temperature under all operating conditions is achieved, effectively eliminating hysteresis and thermal balance errors, and improving the accuracy and reliability of the testing results.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: On the one hand, the present invention provides a full-link temperature control method for breath alcohol detector testing, including: Acquire the outlet temperature of the second heating zone, the sensor temperature of the instrument under test, the ambient temperature of the calibration environment, and the real-time gas flow rate; A series hysteresis model of pure gas transport hysteresis and heating inertial hysteresis is constructed. The time-varying hysteresis time constant is calculated based on real-time gas flow rate. An improved Smith predictor is used to calculate the feedforward compensation amount of the second heating zone. Based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature, the control mode is divided into three modes: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone. If the absolute value of the deviation is less than or equal to the first steady-state threshold and the duration exceeds the preset duration, the gas setpoint correction amount is calculated back based on the thermal balance differential equation of the sensor of the instrument under test, and a nonlinear attenuation gain is used for amplitude limiting and fine adjustment. Based on the outlet temperature of the second heating zone and the sensor temperature of the instrument under test, piecewise Hermite interpolation is used for nonlinear compensation, and the robust RLS algorithm with a variable forgetting factor is used to periodically update the compensation parameters in the background. The compensated detection results are output, and the temperature field feature vector under the current operating conditions is stored in the historical case library.
[0007] Preferably, a series hysteresis model is constructed, consisting of pure gas transport hysteresis and heating inertial hysteresis, including: The process of gas flowing from the outlet of the first heating zone through the transmission pipeline to the inlet of the second heating zone is equivalent to a first-order pure time-delay system, with a time delay constant τ. t Represented as:
[0008] Where L is the equivalent length of the transmission pipeline, v(t) is the average flow velocity of the pipeline calculated based on the real-time gas flow rate, Re(t) is the Reynolds number under the current operating conditions, and α and β are empirical coefficients obtained by fitting through pipeline thermophysical property calibration experiments. The temperature response lag caused by the heating element and tube wall heat capacity in the second heating zone is equivalent to a first-order inertial element, with an inertial time constant τ. h Represented as:
[0009] Among them, C th Where is the equivalent heat capacity of the heating zone, h is the convective heat transfer coefficient, A is the heat transfer area, and T is the heat transfer area. s For the target outlet temperature, T a To verify the ambient temperature, γ is the temperature compensation factor; By connecting the pure time-delay element in series with the inertial element, an overall transfer function model is constructed:
[0010] Where K is the static gain coefficient and s is the Laplace operator; And dynamically update τ based on real-time gas flow rate. t and τ h The time-varying lag time constant is obtained. .
[0011] Preferably, the feedforward compensation amount for the second heating zone is calculated using an improved Smith predictor, specifically including: An improved Smith predictor structure is constructed, which includes an internal model channel and a feedback correction channel. The internal model channel uses the transfer function G(s) as the reference model of the controlled object and dynamically updates the model transfer function based on the model parameters identified in real time. The feedback correction channel uses the difference between the outlet temperature of the second heating zone and the model prediction output as a disturbance compensation signal and superimposes it onto the control output. Based on the internal model, the estimated temperature after hysteresis compensation is calculated. Calculate the feedforward compensation amount based on the current target outlet temperature and rate of change; The feedforward compensation quantity is superimposed with the PID feedback control quantity to obtain the total control output; The compensation signal output by the predictor is used to correct the PID feedback control quantity in real time. When the gas flow rate undergoes a step change, the hysteresis time constant τ of the internal model is dynamically adjusted according to the rate of change of flow rate. t and inertial time constant τ h And reset the internal state variables of the Smith predictor.
[0012] Preferably, in the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled, and the control output of the second heating zone is calculated. Specific steps include: Construct an anti-integral saturation PID control law with an airflow attenuation factor to control the output u. fb (t) is:
[0013] Among them, K p For proportional gain, K i For integral gain, K d This is the differential gain; In resisting integral saturation, an inverse calculation method is used to dynamically correct the integral term, with the correction amount Δu. int The calculation formula is:
[0014] Among them, T iU is the integration time constant. sat To control the saturation boundary value, sat( ) is a saturation function; The correction amount is fed back to the input of the integral term to achieve real-time desaturation of the integral state; Under the steady-state fine-tuning mode, the control parameters are adjusted in real time according to the absolute value of the temperature deviation |e(t)|. The PID control output is superimposed with the feedforward compensation amount to form the total control output of the second heating zone.
[0015] Preferably, the gas setpoint correction amount is calculated by back-calculating the thermal balance differential equation of the sensor of the instrument under test, and a nonlinear attenuation gain is used for amplitude limiting and fine-tuning, specifically including: Establish the thermal balance difference equation for the sensor of the instrument under test:
[0016] Among them, C s For the sensor's equivalent heat capacity, T s h represents the temperature of the sensor in the instrument under test. g Let A be the convective heat transfer coefficient between the gas and the sensor surface. s T represents the effective heat transfer area for gas contact. g h is the temperature of the gas entering the sensor. a A is the heat dissipation coefficient of the sensor to the environment. sa T represents the heat dissipation area of the sensor to the environment. a To verify the ambient temperature; Under steady-state conditions, let The gas temperature setpoint correction amount ΔT is calculated by reverse calculation. g :
[0017] Where, ΔT s Δt represents the measured change in the temperature of the sensor of the instrument under test within adjacent sampling periods, where Δt is the sampling period. Using nonlinear attenuation gain γ(ΔT) g Perform amplitude limiting fine-tuning:
[0018] Where, γ max For maximum gain limiting, ΔT lim Let sgn( be the boundary temperature of the linear region) ) is a symbolic function; The correction amount after the amplitude limit is added to the target outlet temperature setpoint of the second heating zone: .
[0019] Preferably, piecewise Hermite interpolation is used for nonlinear compensation, specifically including: A two-dimensional nonlinear compensation surface is constructed using the outlet temperature of the second heating zone and the sensor temperature of the instrument under test as input nodes. In the temperature range [T min ,T max Within the [section], m×n calibration nodes are selected. These calibration nodes are obtained during the factory manufacturing process through multi-point standard temperature source injection experiments. The corresponding temperature compensation value is recorded for each node. and first-order partial derivatives , ; For any operating point (T) h ,T s ), determine the enclosing element of the working point in the node mesh, and let the four vertices of the enclosing element be (T h,i ,T s,j ), (T h,i+1 ,T s,j ), (T h,i ,T s,j+1 ), (T h,i+1 ,T s,j+1 The compensation value is calculated using bicubic Hermite interpolation.
[0020] Among them, H pr (u) and H qs (v) are Hermite basis functions; c pr Let q be the function value at the vertex of the enclosing cell. s The coefficient matrix is composed of first-order partial derivatives; The compensated temperature output is used as the final calibration temperature value.
[0021] Preferably, a robust RLS algorithm with a variable forgetting factor is used to periodically update the compensation parameters in the background, specifically including: Define the compensation parameter vector Establish a linear regression model:
[0022] Among them, T t (k) is the standard reference temperature. (k) is the regression vector, and v(k) is the measurement noise; The parameter θ(k) is updated online using a recursive least squares algorithm with a variable forgetting factor. The recursive formula is as follows:
[0023]
[0024]
[0025]
[0026] Where e(k) is the innovation residual, K(k) is the gain vector, P(k) is the covariance matrix, and λ(k) is the variable forgetting factor; Set an update strategy for the variable forgetting factor λ(k) such that the variable forgetting factor adaptively adjusts with the change of the absolute value of the new residual |e(k)|:
[0027] Where, λ min ρ is the preset minimum forgetting factor, and ρ is the sensitivity coefficient.
[0028] On the other hand, the present invention provides a full-link temperature control method for breath alcohol detector testing, including: The data acquisition module is used to acquire the outlet temperature of the second heating zone, the sensor temperature of the instrument under test, the calibration environment temperature, and the real-time gas flow rate. The compensation module is used to construct a series hysteresis model of pure gas transmission hysteresis and heating inertial hysteresis. It calculates the time-varying hysteresis time constant based on real-time gas flow and uses an improved Smith predictor to calculate the feedforward compensation amount of the second heating zone. The control module is used to divide the control mode into three modes based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone. The correction and fine-tuning module is used to back-calculate the gas setpoint correction amount based on the thermal balance differential equation of the sensor of the instrument under test when the absolute value of the deviation is less than or equal to the first steady-state threshold and the duration exceeds the preset time, and to perform amplitude limiting fine-tuning using nonlinear attenuation gain. The compensation and update module is used to perform nonlinear compensation based on the outlet temperature of the second heating zone and the sensor temperature of the instrument under test, using piecewise Hermite interpolation, and periodically update the compensation parameters in the background using a robust RLS algorithm with a variable forgetting factor. The storage and display module is used to output the compensated detection results and store the temperature field feature vector under the current operating conditions into the historical case library.
[0029] As can be seen from the above technical solution, compared with the prior art, this invention discloses a full-link temperature control method and system for breath alcohol detector calibration. By constructing a series hysteresis model of pure gas transmission hysteresis and heating inertial hysteresis, and using an improved Smith predictor for feedforward dynamic compensation, the influence of pipeline transmission hysteresis and heater thermal inertia on the stability of the control system is effectively eliminated. Based on the degree of deviation, the control mode is divided into three modes: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning, an anti-integral saturation PID with an airflow attenuation factor is introduced, balancing the dual requirements of rapid heating and high steady-state accuracy. Simultaneously, this strategy has a strong ability to suppress airflow disturbances, maintaining stable outlet temperature within a flow fluctuation range of ±20%, greatly improving the adaptability of the calibration device to different expiratory flow conditions. Furthermore, the gas temperature correction is derived by back-calculating the sensor's thermal balance differential equation, and a nonlinear attenuation gain limiting fine-tuning method is employed. This allows for real-time compensation of temperature measurement deviations caused by the sensor's own heat capacity and environmental heat dissipation, making the calibration results more accurately reflect the actual gas temperature and improving the traceability and reliability of the calibration results. Piecewise Hermite interpolation ensures the continuous smoothness of nonlinear compensation across the entire temperature range, avoiding compensation jumps at nodes as seen in traditional methods. The robust RLS algorithm with a variable forgetting factor can track parameter drift caused by sensor aging and environmental changes online, ensuring that the compensation accuracy does not decrease after long-term system operation. The introduction of a historical case library provides data support for control strategy optimization and fault diagnosis, improving the system's intelligent operation and maintenance level. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0031] Figure 1 This is a schematic diagram of the process provided by the present invention.
[0032] Figure 2 This is a schematic diagram of the structure provided by the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] This invention discloses a full-chain temperature control method for breath alcohol detector testing, such as... Figure 1 As shown, it includes: The system acquires the outlet temperature of the second heating zone, the sensor temperature of the instrument under test, the ambient temperature of the calibration environment, and the real-time gas flow rate. Further data acquired includes the outlet temperature of the first heating zone.
[0035] A series hysteresis model of pure gas transport hysteresis and heating inertial hysteresis is constructed. The time-varying hysteresis time constant is calculated based on real-time gas flow rate. An improved Smith predictor is used to calculate the feedforward compensation amount of the second heating zone. Based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature, the control mode is divided into three modes: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone. If the absolute value of the deviation is less than or equal to the first steady-state threshold and the duration exceeds the preset duration, the gas setpoint correction amount is calculated back based on the thermal balance differential equation of the sensor of the instrument under test, and a nonlinear attenuation gain is used for amplitude limiting and fine adjustment. Based on the outlet temperature of the second heating zone and the sensor temperature of the instrument under test, piecewise Hermite interpolation is used for nonlinear compensation, and the robust RLS algorithm with a variable forgetting factor is used to periodically update the compensation parameters in the background. During the update process, abnormal interference data is removed based on the 3σ criterion of the innovation residual. The compensated detection results are output, and the temperature field feature vector under the current operating conditions is stored in the historical case library as the initial solution prior knowledge for subsequent verification of the same type of instrument.
[0036] Furthermore, a series hysteresis model is constructed, consisting of pure hysteresis of gas transport and inertial hysteresis of heating, including: The process of gas flowing from the outlet of the first heating zone through the transmission pipeline to the inlet of the second heating zone is equivalent to a first-order pure time-delay system, with a time delay constant τ. t Represented as:
[0037] Where L is the equivalent length of the transmission pipeline, v(t) is the average flow velocity of the pipeline calculated based on the real-time gas flow rate, Re(t) is the Reynolds number under the current operating conditions, and α and β are empirical coefficients obtained by fitting through pipeline thermophysical property calibration experiments. The temperature response lag caused by the heating element and tube wall heat capacity in the second heating zone is equivalent to a first-order inertial element, with an inertial time constant τ. h Represented as:
[0038] Among them, C thWhere is the equivalent heat capacity of the heating zone, h is the convective heat transfer coefficient, A is the heat transfer area, and T is the heat transfer area. s For the target outlet temperature, T a To verify the ambient temperature, γ is the temperature compensation factor; By connecting the pure time-delay element in series with the inertial element, an overall transfer function model is constructed:
[0039] Where K is the static gain coefficient and s is the Laplace operator; And dynamically update τ based on real-time gas flow rate. t and τ h The time-varying lag time constant is obtained. .
[0040] Furthermore, an improved Smith predictor is used to calculate the feedforward compensation for the second heating zone, specifically including: An improved Smith predictor structure is constructed, comprising an internal model channel and a feedback correction channel. The internal model channel uses the transfer function G(s) as the reference model of the controlled object and is based on the model parameters K and τ obtained in real time. t τ h The model transfer function is dynamically updated; the feedback correction channel uses the difference between the outlet temperature of the second heating zone and the model's predicted output as a disturbance compensation signal, which is then superimposed on the control output. Based on the internal model, the estimated temperature after hysteresis compensation is calculated. The calculation method is as follows: first, apply the current control output u(t) to the hysteresis-free model. Obtain the intermediate variable, then pass through pure time delay. Delay, to obtain the estimated output:
[0041] Where U(s) is the Laplace transform of the control variable u(t); Calculate the feedforward compensation amount u based on the current target outlet temperature and rate of change. ff (t), the calculation formula is:
[0042] And in the discretization implementation, a first-order backward difference approximation differential term is used, that is T s To control the period, k is the current sampling time; feedforward compensation amount u ff (t) and PID feedback control quantity u fb The total control output is obtained by superimposing (t) the values. ; Using the compensation signal output by the predictor The PID feedback control input is corrected in real time to suppress model mismatch and external disturbances; When the gas flow rate undergoes a step change, the hysteresis time constant τ of the internal model is dynamically adjusted according to the rate of change of flow rate. t and inertial time constant τ h It also resets the internal state variables of the Smith predictor to avoid jumps in the predicted output caused by abrupt changes in model parameters.
[0043] Based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature, the control mode is divided into three modes: full-speed heating, approach constraint, and steady-state fine-tuning. Specifically, these include: A first threshold E1 and a second threshold E2 are set, satisfying E1>E2>0. The first threshold E1 is the switching boundary between the full-rate heating mode and the approach-constraint mode; the second threshold E2 is the switching boundary between the approach-constraint mode and the steady-state fine-tuning mode. The values of the two thresholds are determined experimentally based on the calibration procedures of the breath alcohol detector being tested and the dynamic characteristics of the heating system.
[0044] When the absolute value of the temperature deviation satisfies |e(t)|>E1, the system determines that it is currently in a state far from the target temperature and activates the full-speed heating mode.
[0045] In this mode, the control output directly uses the maximum heating power u. max Approaching the target temperature at the maximum rate:
[0046] Among them, sgn( ) is a sign function. When e(t)>0, it outputs positive maximum power, and when e(t)<0, it outputs negative maximum power (or zero power, depending on whether the heating system supports active cooling).
[0047] The full-speed heating mode does not perform complex feedback regulation. Its purpose is to bring the outlet temperature of the second heating zone close to the target temperature in the shortest possible time, thus shortening the transition time of the heating stage.
[0048] When the absolute value of the temperature deviation satisfies E2<|e(t)|≤E1, the system determines that it has entered the neighborhood of the target temperature, but has not yet reached the steady-state accuracy requirement, and activates the approach constraint mode.
[0049] In this mode, a segmented deceleration strategy is adopted to control the output to smoothly transition from maximum power to steady-state power range according to a preset decay curve. The control law is as follows:
[0050] Where α is the decay exponent, typically ranging from 1 ≤ α ≤ 2, determined through experimental calibration; u fb( t) is a weak feedback correction term used to suppress overshoot tendency, and its gain coefficient is smaller than the PID gain under steady-state fine-tuning mode.
[0051] To further prevent overshoot due to excessive speed when approaching the target temperature, a rate of change constraint is introduced. When the absolute value of the deviation rate of change satisfies... At that time, an additional damping braking term is applied:
[0052] in, K is the maximum allowable rate of change. d This is the damping coefficient. This damping braking term is added to the control output to limit the speed when approaching the target and prevent overshoot.
[0053] The core function of approaching constraint mode is to create stable initial conditions for entering steady-state fine-tuning mode by asymptotic deceleration and damping constraints while ensuring rapidity.
[0054] When the absolute value of the temperature deviation satisfies |e(t)|≤E2, the system determines that the neighborhood has reached the steady-state accuracy requirement and activates the steady-state fine-tuning mode.
[0055] In this mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone.
[0056] The core objective of steady-state fine-tuning mode is to eliminate residual steady-state errors, suppress interference factors such as gas flow fluctuations, and ensure that the outlet temperature of the second heating zone remains stable within the allowable error range of the target outlet temperature.
[0057] Furthermore, to avoid control output jitter caused by frequent switching of the three modes at the boundaries, this embodiment of the invention sets up a hysteresis buffer band.
[0058] Switching from the full-rate heating mode to the approach-constraint mode requires simultaneously meeting the following two conditions: The absolute value of the temperature deviation satisfies |e(t)|≤E1; The duration of this condition exceeds the preset duration t. h1 .
[0059] Switching from the approaching constraint mode to the steady-state fine-tuning mode requires simultaneously satisfying the following two conditions: The absolute value of the temperature deviation satisfies |e(t)|≤E2; The absolute value of the rate of change of temperature deviation satisfies ,in This is the steady-state rate of change threshold.
[0060] Returning to the convergent constraint mode from the steady-state fine-tuning mode requires satisfying the following: The absolute value of the temperature deviation satisfies , where ΔE hys This represents the hysteresis width.
[0061] The hysteresis buffer mechanism effectively avoids modal oscillations caused by measurement noise or minor disturbances, thus improving the robustness of the control system.
[0062] To ensure the continuity of control output during mode switching and to avoid impact on the controlled object caused by output jumps, this embodiment performs smooth initialization of the controller state variables during mode switching.
[0063] Specifically, when switching from the approaching constraint mode to the steady-state fine-tuning mode: The current control output value is used as the initial value of the PID integral term, that is... , where u(t) - This is to switch the control output from the previous moment; Using the rate of change of deviation at the previous moment as the initial condition for the differential term, i.e. .
[0064] The above-mentioned smooth initialization measures ensure that the output of the PID controller at the moment of startup is seamlessly connected with the control output of the previous mode, eliminating the switching shock.
[0065] The full-rate heating mode, the approach-constraint mode, and the steady-state fine-tuning mode work together in a hierarchical structure of "coarse-tuning-transition-fine-tuning" to form a complete temperature control strategy. The full-speed heating mode is responsible for rapid response under large deviations, driving the temperature closer to the target value with maximum power; The approaching constraint mode is responsible for the smooth transition under medium deviation, and creates conditions for steady state through asymptotic deceleration and damping constraints. The steady-state fine-tuning mode is responsible for maintaining accuracy under small deviations, and eliminates residual errors and suppresses disturbances through adaptive PID control.
[0066] The three modes are divided based on two real-time state variables: temperature deviation and rate of change. The switching logic is clear, the parameter tuning is independent, and it is convenient for engineering implementation and on-site debugging.
[0067] Specifically, in the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is activated, and the control output of the second heating zone is calculated. The specific steps include: Construct an anti-integral saturation PID control law with an airflow attenuation factor to control the output u. fb (t) is:
[0068] Among them, K pFor proportional gain, K i For integral gain, K d The gain is the differential gain; the integral term employs a conditional integration strategy, freezing the integral accumulation when any of the following conditions are met: or
[0069] Among them, E max U is the deviation limit value. max To control the output limiting value; In resisting integral saturation, an inverse calculation method is used to dynamically correct the integral term, with the correction amount Δu. int The calculation formula is:
[0070] Among them, T i U is the integration time constant. sat To control the saturation boundary value, sat( ) is a saturation function; The correction amount is fed back to the input of the integral term to achieve real-time desaturation of the integral state; Under the steady-state fine-tuning mode, the control parameters are adjusted in real time according to the absolute value of the temperature deviation, |e(t)|. Specifically, when |e(t)| continuously decreases and enters the second steady-state threshold E... th2 (E) th2 <E th1 When the value of the airflow attenuation factor λ(q(t)) is within a certain range, the value of the airflow attenuation factor λ(q(t)) is gradually increased to further weaken the integral effect and avoid steady-state overshoot; at the same time, the differential gain K is increased. d Adjusted to a dynamic value negatively correlated with the rate of temperature change, i.e.:
[0071] Among them, K d0 The base differential gain is η, and the adjustment coefficient is η. The maximum permissible rate of change; The PID control output is superimposed with the feedforward compensation amount to form the total control output of the second heating zone, and then output to the actuator of the second heating zone to achieve precise temperature control in steady-state fine-tuning mode.
[0072] Furthermore, the gas setpoint correction is calculated by back-calculating the thermal balance differential equation of the sensor of the instrument under test, and a nonlinear attenuation gain is used for amplitude limiting and fine-tuning, specifically including: Establish the thermal balance difference equation for the sensor of the instrument under test:
[0073] Among them, C s For the sensor's equivalent heat capacity, Ts h represents the temperature of the sensor in the instrument under test. g Let A be the convective heat transfer coefficient between the gas and the sensor surface. s T represents the effective heat transfer area for gas contact. g h is the temperature of the gas entering the sensor. a A is the heat dissipation coefficient of the sensor to the environment. sa T represents the heat dissipation area of the sensor to the environment. a To verify the ambient temperature; Under steady-state conditions, let The gas temperature setpoint correction amount ΔT is calculated by reverse calculation. g :
[0074] Where, ΔT s Δt represents the measured change in the temperature of the sensor of the instrument under test within adjacent sampling periods, where Δt is the sampling period. Using nonlinear attenuation gain γ(ΔT) g Perform amplitude limiting fine-tuning:
[0075] Where, γ max For maximum gain limiting, ΔT lim Let sgn( be the boundary temperature of the linear region) ) is a symbolic function; The correction amount after the amplitude limit is added to the target outlet temperature setpoint of the second heating zone: .
[0076] Furthermore, piecewise Hermite interpolation is used for nonlinear compensation, specifically including: A two-dimensional nonlinear compensation surface is constructed using the outlet temperature of the second heating zone and the sensor temperature of the instrument under test as input nodes. In the temperature range [T min ,T max Within the range, m×n calibration nodes are selected to cover the entire operating temperature range. These calibration nodes are obtained during the factory manufacturing process through multi-point standard temperature source injection experiments, and the corresponding temperature compensation value is recorded for each node. and first-order partial derivatives , ; For any operating point (T) h ,T s ), determine the enclosing element of the working point in the node mesh, and let the four vertices of the enclosing element be (T h,i ,T s,j ), (T h,i+1 ,T s,j ), (Th,i ,T s,j+1 ), (T h,i+1 ,T s,j+1 The compensation value is calculated using bicubic Hermite interpolation.
[0077] Among them, H pr (u) and H qs (v) are Hermite basis functions:
[0078]
[0079]
[0080]
[0081] , For normalized local coordinates, c pr Let q be the function value at the vertex of the enclosing cell. s The coefficient matrix is composed of first-order partial derivatives; The compensated temperature output is used as the final calibration temperature value.
[0082] In another embodiment, a robust RLS algorithm with a variable forgetting factor is used to periodically update the compensation parameters in the background, specifically including: Define the compensation parameter vector Establish a linear regression model:
[0083] Among them, T t (k) is the standard reference temperature. (k) is the regression vector (composed of temperature characteristics under the current operating conditions), and v(k) is the measurement noise; The parameter θ(k) is updated online using a recursive least squares algorithm with a variable forgetting factor. The recursive formula is as follows:
[0084]
[0085]
[0086]
[0087] Where e(k) is the innovation residual, K(k) is the gain vector, P(k) is the covariance matrix, and λ(k) is the variable forgetting factor (0 < λ(k) ≤ 1). Set an update strategy for the variable forgetting factor λ(k) such that the variable forgetting factor adaptively adjusts with the change of the absolute value of the new residual |e(k)|:
[0088] Where, λ min ρ is the preset minimum forgetting factor (usually taken as 0.95), and ρ is the sensitivity coefficient; as the residual increases, λ(k) approaches λ. min This enhances the ability to track new data; as the residual decreases, λ(k) approaches 1, maintaining parameter stability; During the update process, the mean μ of the new information residual is calculated in real time. e and standard deviation σ e The 3σ criterion is used to remove abnormal interference data: when When the current data is identified as an outlier, e(k) is forced to be 0 while θ(k) is kept at θ(k-1). At the same time, the update of the covariance matrix is skipped to avoid outliers from polluting the parameter estimation. The RLS algorithm runs in the background at a periodic frequency of no less than 1 Hz. The updated parameter θ(k) is immediately transmitted to the piecewise Hermite interpolation module to achieve adaptive adjustment of the compensation parameters; when the parameter changes... Less than the preset threshold δ θ At this time, updates are frozen to save computing resources.
[0089] On the other hand, the present invention also provides a full-link temperature control method for breath alcohol detector testing, such as... Figure 2 As shown, it includes: The data acquisition module is used to acquire the outlet temperature of the second heating zone, the sensor temperature of the instrument under test, the calibration environment temperature, and the real-time gas flow rate. The compensation module is used to construct a series hysteresis model of pure gas transmission hysteresis and heating inertial hysteresis. It calculates the time-varying hysteresis time constant based on real-time gas flow and uses an improved Smith predictor to calculate the feedforward compensation amount of the second heating zone. The control module is used to divide the control mode into three modes based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone. The correction and fine-tuning module is used to back-calculate the gas setpoint correction amount based on the thermal balance differential equation of the sensor of the instrument under test when the absolute value of the deviation is less than or equal to the first steady-state threshold and the duration exceeds the preset time, and to perform amplitude limiting fine-tuning using nonlinear attenuation gain. The compensation and update module is used to perform nonlinear compensation based on the outlet temperature of the second heating zone and the sensor temperature of the instrument under test using piecewise Hermite interpolation, and to periodically update the compensation parameters in the background using a robust RLS algorithm with a variable forgetting factor. During the update process, abnormal interference data is removed based on the 3σ criterion of the innovation residual. The storage and display module is used to output the compensated detection results and store the temperature field feature vector under the current operating conditions into the historical case library as the initial solution prior knowledge for subsequent verification of the same type of instrument.
[0090] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0091] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A full-chain temperature control method for breath alcohol detector testing, characterized in that, include: Acquire the outlet temperature of the second heating zone, the sensor temperature of the instrument under test, the ambient temperature of the calibration environment, and the real-time gas flow rate; A series hysteresis model of pure gas transport hysteresis and heating inertial hysteresis is constructed. The time-varying hysteresis time constant is calculated based on real-time gas flow rate. An improved Smith predictor is used to calculate the feedforward compensation amount of the second heating zone. Based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature, the control mode is divided into three modes: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone. If the absolute value of the deviation is less than or equal to the first steady-state threshold and the duration exceeds the preset duration, the gas setpoint correction amount is calculated back based on the thermal balance differential equation of the sensor of the instrument under test, and a nonlinear attenuation gain is used for amplitude limiting and fine adjustment. Based on the outlet temperature of the second heating zone and the sensor temperature of the instrument under test, piecewise Hermite interpolation is used for nonlinear compensation, and the robust RLS algorithm with a variable forgetting factor is used to periodically update the compensation parameters in the background. The compensated detection results are output, and the temperature field feature vector under the current operating conditions is stored in the historical case library.
2. The end-to-end temperature control method for breath alcohol detector testing according to claim 1, characterized in that, A series hysteresis model is constructed, consisting of pure hysteresis of gas transport and inertial hysteresis of heating, including: The process of gas flowing from the outlet of the first heating zone through the transmission pipeline to the inlet of the second heating zone is equivalent to a first-order pure time-delay system, with a time delay constant τ. t Represented as: Where L is the equivalent length of the transmission pipeline, v(t) is the average flow velocity of the pipeline calculated based on the real-time gas flow rate, Re(t) is the Reynolds number under the current operating conditions, and α and β are empirical coefficients obtained by fitting through pipeline thermophysical property calibration experiments. The temperature response lag caused by the heating element and tube wall heat capacity in the second heating zone is equivalent to a first-order inertial element, with an inertial time constant τ. h Represented as: Among them, C th Where is the equivalent heat capacity of the heating zone, h is the convective heat transfer coefficient, A is the heat transfer area, and T is the heat transfer area. s For the target outlet temperature, T a γ is the temperature compensation factor for verifying the ambient temperature; By connecting the pure time-delay element in series with the inertial element, an overall transfer function model is constructed: Where K is the static gain coefficient and s is the Laplace operator; And dynamically update τ based on real-time gas flow rate. t and τ h The time-varying lag time constant is obtained. .
3. The end-to-end temperature control method for breath alcohol detector testing according to claim 2, characterized in that, The feedforward compensation for the second heating zone is calculated using an improved Smith predictor, specifically including: An improved Smith predictor structure is constructed, which includes an internal model channel and a feedback correction channel. The internal model channel uses the transfer function G(s) as the reference model of the controlled object and dynamically updates the model transfer function based on the model parameters identified in real time. The feedback correction channel uses the difference between the outlet temperature of the second heating zone and the model prediction output as a disturbance compensation signal and superimposes it onto the control output. Based on the internal model, the estimated temperature after hysteresis compensation is calculated. ; Calculate the feedforward compensation amount based on the current target outlet temperature and rate of change; The feedforward compensation quantity is superimposed with the PID feedback control quantity to obtain the total control output; The compensation signal output by the predictor is used to correct the PID feedback control quantity in real time. When the gas flow rate undergoes a step change, the hysteresis time constant τ of the internal model is dynamically adjusted according to the rate of change of flow rate. t and inertial time constant τ h And reset the internal state variables of the Smith predictor.
4. The end-to-end temperature control method for breath alcohol detector testing according to claim 1, characterized in that, In steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is activated, and the control output of the second heating zone is calculated. The specific steps include: Construct an anti-integral saturation PID control law with an airflow attenuation factor to control the output u. fb (t) is: Among them, K p For proportional gain, K i For integral gain, K d This is the differential gain; In resisting integral saturation, an inverse calculation method is used to dynamically correct the integral term, with the correction amount Δu. int The calculation formula is: Among them, T i U is the integration time constant. sat To control the saturation boundary value, sat( ) is a saturation function; The correction amount is fed back to the input of the integral term to achieve real-time desaturation of the integral state; Under the steady-state fine-tuning mode, the control parameters are adjusted in real time according to the absolute value of the temperature deviation |e(t)|. The PID control output is superimposed with the feedforward compensation amount to form the total control output of the second heating zone.
5. The end-to-end temperature control method for breath alcohol detector testing according to claim 1, characterized in that, The gas setpoint correction is calculated by back-calculating the thermal balance differential equation of the sensor of the instrument under test, and a nonlinear attenuation gain is used for amplitude limiting and fine-tuning, specifically including: Establish the thermal balance difference equation for the sensor of the instrument under test: Among them, C s For the sensor's equivalent heat capacity, T s h represents the temperature of the sensor in the instrument under test. g Let A be the convective heat transfer coefficient between the gas and the sensor surface. s T is the effective heat transfer area for gas contact. g h is the temperature of the gas entering the sensor. a A is the heat dissipation coefficient of the sensor to the environment. sa T represents the heat dissipation area of the sensor to the environment. a To verify the ambient temperature; Under steady-state conditions, let The gas temperature setpoint correction amount ΔT is calculated by reverse calculation. g : Where, ΔT s Δt represents the measured change in the sensor temperature of the instrument under test within adjacent sampling periods, where Δt is the sampling period. Using nonlinear attenuation gain γ(ΔT) g Perform amplitude limiting fine-tuning: Where, γ max For maximum gain limiting, ΔT lim Let sgn( be the boundary temperature of the linear region) ) is a symbolic function; The correction amount after the amplitude limit is added to the target outlet temperature setpoint of the second heating zone: 。 6. The end-to-end temperature control method for breath alcohol detector testing according to claim 1, characterized in that, Nonlinear compensation is performed using piecewise Hermite interpolation, specifically including: A two-dimensional nonlinear compensation surface is constructed using the outlet temperature of the second heating zone and the sensor temperature of the instrument under test as input nodes. In the temperature range [T min ,T max Within the [section], m×n calibration nodes are selected. These calibration nodes are obtained during the factory manufacturing process through multi-point standard temperature source injection experiments. The corresponding temperature compensation value is recorded for each node. and first-order partial derivatives , ; For any operating point (T) h ,T s ), determine the enclosing element of the working point in the node mesh, and let the four vertices of the enclosing element be (T h,i ,T s,j ), (T h,i+1 ,T s,j ), (T h,i ,T s,j+1 ), (T h,i+1 ,T s,j+1 The compensation value is calculated using bicubic Hermite interpolation. Among them, H pr (u) and H qs (v) are Hermite basis functions; c pr Let q be the function value at the vertex of the enclosing cell. s The coefficient matrix is composed of first-order partial derivatives; The compensated temperature output is used as the final calibration temperature value.
7. The end-to-end temperature control method for breath alcohol detector testing according to claim 1, characterized in that, The robust RLS algorithm with a variable forgetting factor is used to periodically update the compensation parameters in the background, specifically including: Define the compensation parameter vector Establish a linear regression model: Among them, T t (k) is the standard reference temperature. (k) is the regression vector, and v(k) is the measurement noise; The parameter θ(k) is updated online using a recursive least squares algorithm with a variable forgetting factor. The recursive formula is as follows: Where e(k) is the innovation residual, K(k) is the gain vector, P(k) is the covariance matrix, and λ(k) is the variable forgetting factor; Set an update strategy for the variable forgetting factor λ(k) such that the variable forgetting factor adaptively adjusts with the change of the absolute value of the new residual |e(k)|: Where, λ min ρ is the preset minimum forgetting factor, and ρ is the sensitivity coefficient.
8. A full-chain temperature control method for breath alcohol detector testing, characterized in that, include: The data acquisition module is used to acquire the outlet temperature of the second heating zone, the sensor temperature of the instrument under test, the calibration environment temperature, and the real-time gas flow rate. The compensation module is used to construct a series hysteresis model of pure gas transmission hysteresis and heating inertial hysteresis. It calculates the time-varying hysteresis time constant based on real-time gas flow and uses an improved Smith predictor to calculate the feedforward compensation amount of the second heating zone. The control module is used to divide the control mode into three modes based on the deviation and rate of change between the outlet temperature of the second heating zone and the target outlet temperature: full-speed heating, approach constraint, and steady-state fine-tuning. In the steady-state fine-tuning mode, anti-integral saturation PID control with airflow attenuation factor is enabled to calculate the control output of the second heating zone. The correction and fine-tuning module is used to back-calculate the gas setpoint correction amount based on the thermal balance differential equation of the sensor of the instrument under test when the absolute value of the deviation is less than or equal to the first steady-state threshold and the duration exceeds the preset time, and to perform amplitude limiting fine-tuning using nonlinear attenuation gain. The compensation and update module is used to perform nonlinear compensation based on the outlet temperature of the second heating zone and the sensor temperature of the instrument under test, using piecewise Hermite interpolation, and periodically update the compensation parameters in the background using a robust RLS algorithm with a variable forgetting factor. The storage and display module is used to output the compensated detection results and store the temperature field feature vector under the current operating conditions into the historical case library.