A method and system for suppressing temperature control oscillations during TEC (thermal control) switching between hot and cold modes.

CN122566419APending Publication Date: 2026-08-14NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

第三,常规PID主要依据当前误差及误差变化率进行修正,对尚未消散的历史热流缺乏前置处理,因而在接近目标温度时容易反复修正,产生多次振荡

Benefits of technology

[0037]有益效果:本发明具有如下优点:本发明解决现有 TEC 温控系统在冷热方向切换过程中,由于 PID 历史积分项残留、热惯性延续以及控制输出突变等因素,容易产生温度过冲、往复振荡和稳态调节时间较长的问题,能够有效抑制 TEC 冷热切换过程中的温度过冲和往复振荡,缩短稳态调节时间,并提高不同热惯量被控对象下的温控适应性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122566419A_ABST
    Figure CN122566419A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for suppressing temperature control oscillations during TEC (Thermoelectric Cooler) switching. The method includes determining whether the thermoelectric cooler has entered a switching state between hot and cold conditions in the current sampling period. If a switching state is entered, starting from the current sampling period, the integral term of the PID control is reconstructed and thermal inertia compensation is calculated in each sampling period to generate a composite original control output. This output is then subjected to amplitude limiting, slope limiting, and mitigation processing to obtain the actual control signal for the controlled object. This process continues until the temperature change of the controlled object meets the set requirements. In the next sampling period after the set requirements are met, the original PID control output is used to control the controlled object, and the next switching state determination for the thermoelectric cooler is performed. This invention can suppress overshoot and temperature oscillations during the switching process of the thermoelectric cooler, shorten the steady-state adjustment time, and also consider the dynamic response capability after the switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of thermoelectric cooler thermal management technology, and in particular to a method and system for suppressing temperature control oscillations during TEC cooling and heating switching. Background Technology

[0002] Thermoelectric coolers (TECs) can switch between heating and cooling by changing the direction of the drive current. They are characterized by their compact structure, fast response, and ease of miniaturization and integration, making them widely used in precision temperature control applications. A typical structure includes a temperature acquisition circuit, a controller, a power drive circuit, and a TEC unit. The control algorithm often employs digital PID (proportional-integral-derivative) control or a PID compensation network. The power drive circuit typically uses PWM modulation combined with an H-bridge topology to adjust the magnitude and direction of the TEC drive current.

[0003] However, TEC still tends to encounter the following problems in scenarios where the hot and cold directions are reversed. First, the integral term accumulated before the switch is retained afterward, causing the control output to carry a historical bias in the new direction, resulting in a noticeable reverse overshoot. Second, the thermal structure itself has thermal resistance and thermal capacity characteristics. Even after the drive direction has reversed, the heat flow generated in the early stages may continue to affect the temperature of the controlled object for a period of time, causing the actual temperature to continue changing in the original direction, forming the so-called thermal inertia continuation effect. Third, conventional PID mainly corrects based on the current error and the rate of change of error, lacking pre-processing for the historical heat flow that has not yet dissipated. Therefore, it is prone to repeated corrections and multiple oscillations when approaching the target temperature.

[0004] To alleviate the aforementioned problems, existing solutions typically employ methods such as zeroing the integral during switching, reducing the integral gain, introducing dead-zone control, delay control, or segmented control. Each of these measures has its limitations: zeroing the integral can reduce the interference of historical integrals on reverse control, but it can lead to insufficient driving force in the initial switching phase; simply reducing the gain to gain stability sacrifices response speed during the approach to the target; relying solely on dead-zone or delay is largely passive suppression and cannot effectively handle the continued effect of established thermal inertia; segmented control usually relies on empirical thresholds, which can easily lead to control discontinuities at switching boundaries and has limited adaptability to different thermal inertia objects. Therefore, in engineering practice, a control method specifically designed for the TEC hot-cold switching process is still needed to enable the TEC to effectively suppress overshoot and oscillation after direction reversal, without significantly sacrificing switching response capability. Summary of the Invention

[0005] Purpose of the invention: The purpose of this invention is to provide a method and system for suppressing temperature control oscillations during the switching of thermoelectric coolers, thereby suppressing overshoot and temperature oscillations during the switching process, shortening the steady-state adjustment time, and taking into account the dynamic response capability after the switching.

[0006] Technical Solution: To achieve the above objective, this invention provides a method for suppressing temperature control oscillations during TEC cooling / heating switching, comprising: determining whether the thermoelectric cooler has entered a cooling / heating state switching phase in the current sampling period; if it has entered a cooling / heating state switching phase, then, starting from the current sampling period, reconstructing the PID control integral term and calculating thermal inertia compensation for each sampling period to generate a composite original control output quantity u. raw and the composite original control output u raw Amplitude limiting, slope limiting, and slow-release processing are applied to obtain the control output quantity u. out’ As the actual control signal for the controlled object, the original output quantity u of the PID control is used until the temperature change of the controlled object meets the set requirements. Then, in the next sampling cycle after the set requirements are met, the original output quantity u of the PID control is resumed. pre As the actual control signal of the controlled object.

[0007] Preferably, the method for determining whether the thermoelectric cooler has entered the switching between hot and cold states is as follows: During continuous N... conf Within a sampling period, the TEC is determined to enter a hot / cold state switching state when at least one of the following conditions is met:

[0008] (1) sgn[u pre (k-i1)] and sgn[u out Conversely, |u] pre (k-i1)|、|u out (k-i1-1)| are all greater than the small threshold for direction determination u th ;

[0009] (2) sgn[e(k-i1)] is the opposite of sgn[e(k-i1-1)], and |e(k-i1)| is greater than the set temperature error threshold e. th ;

[0010] Where k is the index of the current sampling period, and i1 = 0 ~ N conf ;u pre (k-i1) represents the original output of the PID control in the (k-i1)th sampling period in history, including the current period. out (k-i1-1) represents the actual control output of the controlled object in the (k-i1-1)th sampling period of history; e(k-i1) and e(k-i1-1) represent the historical temperature error of the controlled object, respectively, e(k-i1) = T set -T(k-i1), T set The target temperature is T(k-i1), which represents the temperature of the controlled object in the (k-i1)th sampling period in history; sgn[] represents the output symbol.

[0011] Preferably, the original output of the PID control is:

[0012] u pre (k-i1)=K p ·e(k-i1)+K i ·I(k-i1-1)+K d ·Δe(k-i1) / Ts,

[0013] Among them, K p K i K d These are the proportional, integral, and derivative gain coefficients, respectively. I(k-i1-1) is the integral term of the PID control in the k-i1-1th sampling period. Δe(k-i1) is the temperature error change, Δe(k-i1)=e(k-i1)-e(k-i1-1), and Ts is the duration of a single sampling period.

[0014] Preferably, the method for reconstructing the integral term of PID control is as follows:

[0015] I′(k+n) = α·I(k-1) + β·e(k+n) + γ·Δe(k+n) + η·u out (k-1),

[0016] Where n is the sampling period index after entering the hot / cold state switching, n=0~n c -1, n c The total number of sampling cycles executed after switching between hot and cold states is given by I′(k+n), where I′(k+n) is the reconstruction integral term for the (k+n)th sampling cycle, I(k-1) is the PID control integral term for the (k-1)th sampling cycle, and e(k+n) and Δe(k+n) represent the temperature error and error change of the controlled object in the (k+n)th sampling cycle, respectively. out (k-1) represents the actual control output of the controlled object in the (k-1)th sampling period, α is the historical integral attenuation coefficient, β is the current error guidance coefficient, γ is the error change guidance coefficient, and η takes a negative value as the feedback coefficient.

[0017] Preferably, the thermal inertia compensation calculation method is as follows:

[0018] C th (k+n) = K1·v dir (k+n) + K2·Σ[i2=1~m](u out (k-i2)·w i2 ) + K3·Δe(k+n),

[0019] Where Cth(k+n) is the thermal inertia compensation amount for the (k+n)th sampling period, and K1, K2, and K3 are compensation coefficients; w i2w is the weighting coefficient for historical outputs. i2 =(1-λ)^(i2-1), where m is the compensation window N based on thermal inertia. comp A defined number of compensation cycles; u out (k-i2) represents the actual control output of the controlled object in the i2th sampling period before the switching between hot and cold states; v dir (k+n) represents the rate of temperature change in the (k+n)th sampling period affected by the residual heat flow before the switching between hot and cold states, v dir (k+n)=sgn[u out (k-1)]·v T (k+n), v T (k+n) represents the rate of temperature change of the controlled object in the (k+n)th sampling period, v T (k+n)=[T(k+n)-T(k+n-1)] / Ts, where T(k+n) and T(k+n-1) represent the temperatures of the controlled object in the k+n and k+n-1 sampling periods, respectively.

[0020] Preferably, the composite original control output is:

[0021] u raw (k+n) = K p ·e(k+n) + K i ·I′(k+n) + K d ·Δe(k+n) / Ts - C th (k+n),

[0022] Among them, K p K i K d These are the proportional, integral, and differential gain coefficients, respectively, and Ts is the duration of a single sampling period.

[0023] Preferably, the method for limiting, slope limiting, and slow-release processing of the composite raw control output includes:

[0024] Limit: u lim (k+n)=max[min(u raw (k+n),u max ),-u max ], u max u is the maximum allowable output value of the power drive circuit. lim (k+n) represents the control output after limiting in the (k+n)th sampling period;

[0025] Slope constraint: when n=0, u slope (k)=u out (k-1)+c lip [u lim(k)-u out (k-1),-Δu max ,Δu max ],

[0026] When n≥1, u slope (k+n)=u out’ (k+n-1)+c lip [u lim (k+n)-u out’ (k+n-1),-Δu max ,Δu max ];

[0027] Where, Δu max u is the maximum allowable output change between two adjacent sampling periods. slope (k+n) represents the control output after slope limiting of the amplitude-limited control output in the (k+n)th sampling period, c lip [] represents the amplitude limiting function; u out’ (k+n-1) is the control output obtained after slow-release processing in the k+n-1th sampling period;

[0028] Sustained-release treatment: in n=0~N ramp -1, 1 < N ramp ≤n c During the period, a linearly increasing weight r(n) = (n+1) / N is applied to the control output after slope limitation. ramp When N ramp <n c And n∈[N ramp ,n c When -1], the applied linearly increasing weight r(n) = 1; N ramp This refers to the number of sustained-release treatment cycles;

[0029] The control output obtained after slow release processing in the (k+n)th sampling period is:

[0030] u out’ (k+n)=r(n)·u slope (k+n).

[0031] Preferably, the temperature change of the controlled object meets the set requirement as follows: during continuous N... stable Within each sampling period, if the absolute value of the temperature error of the current controlled object is less than the stable error threshold and the absolute value of the current temperature change rate is less than the stable slope threshold, then in the next sampling period, the original output of the PID control will be used as the actual control signal for the controlled object, and at the same time, a determination will be made on whether the TEC will enter the hot / cold state switching next time.

[0032] Preferably, Nconf Take 2 to 3 sampling periods, N comp Take 5 to 20 sampling periods, N ramp Take 3 to 5 sampling periods.

[0033] The TEC (Thermal Control and Temperature) switching temperature control oscillation suppression system of the present invention includes:

[0034] Hot / cold state switching determination module: used to determine whether the thermoelectric cooler has entered the hot / cold state switching phase in the current sampling period;

[0035] Actual control signal generation module: Used in the cold / hot state switching determination module to determine when the thermoelectric cooler enters the cold / hot state switching phase in the current sampling period. Starting from the current sampling period, it reconstructs the PID control integral term and performs thermal inertia compensation calculations in each sampling period to generate a composite original control output quantity u. raw and the composite original control output u raw Amplitude limiting, slope limiting, and slow-release processing are applied to obtain the control output quantity u. out’ , as the actual control signal of the controlled object;

[0036] PID control recovery judgment module: Used to determine whether the temperature change of the controlled object meets the set requirements, and to resume the use of the original PID control output u in the next sampling cycle if the set requirements are met. pre As the actual control signal of the controlled object.

[0037] Beneficial effects: The present invention has the following advantages: The present invention solves the problem that existing TEC temperature control systems are prone to temperature overshoot, reciprocating oscillation and long steady-state adjustment time during the switching process between hot and cold directions due to factors such as residual historical integral terms of PID, continuation of thermal inertia and sudden changes in control output. It can effectively suppress temperature overshoot and reciprocating oscillation during the switching process between hot and cold TEC, shorten the steady-state adjustment time, and improve the temperature control adaptability under controlled objects with different thermal inertia. Attached Figure Description

[0038] Figure 1 This is a schematic flowchart of the TEC cooling and heating switching temperature control oscillation suppression method described in Example 1;

[0039] Figure 2 This is a control timing diagram of the TEC hot / cold switching process described in Example 1;

[0040] Figure 3 This is a comparison chart of the temperature response of the present invention and the benchmark PID integral zeroing scheme in Example 5 under the switching scenario of 60℃→20℃. Detailed Implementation

[0041] The technical solution of the present invention will be described in detail below with reference to the embodiments and accompanying drawings.

[0042] Example 1

[0043] This embodiment provides a method for suppressing temperature control oscillations during TEC (Thermal Design Equipment) switching between hot and cold modes, such as... Figure 1 , 2 As shown, it specifically includes the following:

[0044] 1. Determine whether the TEC has entered a hot / cold state switching state under the current sampling period.

[0045] 1. In a continuous N conf For each sampling period, calculate the temperature error e(k-i1), temperature error change Δe(k-i1), and temperature change rate v of the controlled object in adjacent sampling periods. T (k-i1), and calculate the original output u of the PID control based on the temperature error e(k-i1) and the temperature error change Δe(k-i1). pre (k-i1), simultaneously acquiring the actual control output u of the controlled object. out (k-i1-1).

[0046] Temperature error: e(k-i1)=T set -T(k-i1), the change in temperature error Δe(k-i1)=e(k-i1)-e(k-i1-1), the rate of temperature change v T (k-i1)=[T(k-i1)-T(k-i1-1)] / Ts.

[0047] Where k is the index of the current sampling period, and i1 = 0 ~ N conf N conf Take 2 to 3 sampling periods, T set The target temperature is Ts, and the duration of a single sampling period is Ts = 0.1 s to 0.5 s.

[0048] When i1=0, T(k-i1) is the temperature of the controlled object during sampling period k, e(k) is the temperature error of the controlled object during sampling period k, Δe(k) is the change in temperature error of the controlled object during sampling period k, and v T (k) represents the temperature change rate during the current sampling period.

[0049] PID control raw output: u pre (k-i1)=K p ·e(k-i1)+K i ·I(k-i1-1)+K d ·Δe(k-i1) / Ts,

[0050] Among them, Kp K i K d These are the proportional, integral, and derivative gain coefficients, respectively, and I(k-i1-1) is the historical integral term of the PID control.

[0051] Among them, u pre (k-i1), u out (k) is the output quantity with a directional sign. The sign is used to characterize the direction of TEC current. A positive direction indicates driving in the heating direction, and a negative direction indicates driving in the cooling direction. The absolute value is used to characterize the driving intensity.

[0052] 2. If in a continuous N conf Within a sampling period, a TEC is determined to enter a hot / cold state switching phase when at least one of the following conditions is met in the current sampling period:

[0053] (1) sgn[u pre (k-i1)] and sgn[u out [(k-i1-1)] Conversely, both absolute values ​​are greater than the direction determination threshold u. th ; sgn[] represents the output symbol;

[0054] (2) sgn[e(k-i1)] is the opposite of sgn[e(k-i1-1)], and |e(k-i1)| is greater than the set temperature error threshold e. th .

[0055] To suppress misjudgments caused by temperature measurement noise, only when there are consecutive N... conf A handover is officially confirmed only when the handover criteria are met within each cycle.

[0056] Preferably, e th Take 0.5℃~2.0℃, u th Determined based on the minimum effective output of the power drive circuit.

[0057] 2. If the TEC enters a hot / cold state switching, the controller takes the current sampling period k as the first execution period after the switching, and executes the cycle from k to k+n. c Within one sampling period, the integral term of the PID control is reconstructed and thermal inertia compensation is calculated in each sampling period to generate a composite original control output u. raw Then, amplitude limiting, slope limiting, and slow-release processing are performed to obtain the control output quantity u. out’ , which serves as the actual control signal for the controlled object.

[0058] 1. Reconstruction of integral terms

[0059] If the TEC switches between hot and cold states, it does not directly use the integral term from before the switch to avoid historical bias; nor does it perform a complete reset to avoid loss of initial driving force. Instead, it reconstructs the integral term. The reconstruction method comprehensively considers the attenuation and retention of historical integrals, the guidance of current error, the error change trend, and the reverse pull of the actual control output before the switch.

[0060] The method for calculating the reconstructed integral term is as follows:

[0061] I′(k+n) = α·I(k-1) + β·e(k+n) + γ·Δe(k+n) + η·u out (k-1) Formula (1)

[0062] Where n is the sampling period index after entering the hot / cold state switching, n=0~n c -1, I′(k+n) is the reconstruction integral term of the nth sampling period (i.e., the k+nth sampling period) after entering the hot / cold state switch, I(k-1) is the integral term of the last sampling period (i.e., the k-1th sampling period) before entering the hot / cold state switch, e(k+n) and Δe(k+n) are the temperature error and error change of the controlled object in the k+nth sampling period after entering the hot / cold state switch, respectively. out (k-1) represents the actual control output of the controlled object during the last sampling period before the switching between hot and cold states. α is the historical integral attenuation coefficient, ranging from 0 to 0.3; β is the current error guidance coefficient, ranging from 0.1 to 0.5; γ is the error change guidance coefficient, ranging from 0.05 to 0.2; η is the previous output feedback coefficient, ranging from -0.3 to 0. Since u out (k-1) carries the direction sign and η takes a negative value. Therefore, the larger the output is before the switch between hot and cold states, the more obvious the reverse pull on the reconstructed integral is, thereby reducing the reverse overshoot caused by the historical integral bias in the early stage of the new direction drive.

[0063] 2. Thermal inertia compensation calculation

[0064] After the TEC enters the hot / cold state switching, set the temperature compensation window N. comp Temperature compensation window N comp This represents the number of sampling periods that continuously participate in the thermal inertia compensation calculation, starting from the current sampling period k; when the actual number of switching control cycles running starting from the kth sampling period is greater than N. comp When n+1 > N comp , making C th (k+n)=0 or gradually exit according to the decay factor.

[0065] To unify the sign direction, the current driving direction s is defined before entering the hot / cold state switching. ref =sgn[uout [(k-1)], and define the rate of temperature change v affected by the residual heat flow before the switching between hot and cold states. dir (k+n)=s ref ·v T (k+n), when the temperature still changes along the original driving direction due to the residual heat flow before the switch between hot and cold states, v dir (k) is positive; when the temperature change trend has deviated from the influence of the residual heat flow before the switch, v dir (k) approaches zero or turns negative.

[0066] The calculation method for thermal inertia compensation is as follows:

[0067] C th (k+n) = K1·v dir (k+n) + K2·Σ[i2=1~m](u out (k-i2)·w i2 Formula (2) + K3·Δe(k+n)

[0068] Where K1, K2, and K3 are compensation coefficients; u out (k-i2) represents the actual control output of the controlled object in the i2th sampling period before entering the hot / cold state switch. It is a historical output locked during the switch confirmation and remains unchanged during the current switch control phase; w i2 The weighting coefficients for historical outputs are expressed using an exponential decay form w. i2 =(1-λ)^(i2-1); m can be determined based on the compensation window N comp Determined, the preferred value is m=N comp λ takes values ​​from 0.1 to 0.5. When i2 = 1, w i2 =1, the larger the value of i2, the greater the weight w. i2 The smaller the value, the better. K1 is used to adjust the effect of the current drive direction's converted temperature change rate on the compensation amount; K2 is used to adjust the effect of the historical drive cumulative effect before the switching between hot and cold states on the compensation amount; K3 is used to adjust the effect of the error change trend on the compensation amount. Compensation window N comp Use 5 to 20 sampling periods; K1 is 0.1 to 1.0, K2 is 0.05 to 0.5, and K3 is 0.05 to 0.3.

[0069] 3. Based on the reconstructed integral term and thermal inertia compensation, a composite original control output u is generated. raw (k+n).

[0070] u raw (k+n) = K p ·e(k+n) + K i ·I′(k+n) + K d·Δe(k+n) / Ts - C th (k+n) Formula (3)

[0071] Among them, K p K i K d These are the proportional, integral, and derivative gain coefficients, respectively. Within a control cycle, these gains are fixed values. Under different operating conditions, they can be updated using a parameter table or a self-tuning method, but after updating, they still participate in the calculation for the current cycle according to fixed parameters. raw (k+n) is the signed raw control quantity generated by the controller. Its sign indicates the direction of heating or cooling, and its amplitude indicates the driving intensity.

[0072] C th (k+n) is used as a compensation term subtracted from the original control output in formula (3). When the temperature continues to change along the current drive direction before the switching between hot and cold states due to inertia, the current temperature change rate term and the historical output weighting term will cause C to... th (k+n) reflects the effect of residual heat flow, and is derived from the composite primary control output u. raw Subtract C from (k+n) th (k+n) is equivalent to pre-subtracting the effect of this residual heat flux; when the direction of temperature change has been reversed or the effect of historical output has decayed, C th When (k+n) approaches zero, the compensation automatically terminates. th (k+n) is ultimately limited by the output constraint, and will not cause reverse amplification of the control.

[0073] 4. For the composite original control output u raw (k+n) is used for amplitude limiting, slope limiting, and slow release processing to obtain the control output quantity u. out’ (k+n).

[0074] (1) Hard limiting: u lim (k+n)=max[min(u raw (k+n),u max ),-u max ]

[0075] Among them, u max This represents the maximum allowable output value of the power drive circuit.

[0076] (2) Slope constraint: When n=0, u slope (k)=u out (k-1)+c lip [u lim (k)-u out (k-1),-Δu max ,Δu max ],

[0077] When n≥1, u slope (k+n)=u out’ (k+n-1)+c lip [u lim (k+n)-u out’ (k+n-1),-Δu max ,Δu max ];

[0078] Where, Δu max The maximum allowable output change between two adjacent sampling periods; u slope (k+n) represents the control output after slope limiting of the amplitude-limited control output in the (k+n)th sampling period; u out’ (k+n-1) represents the control output obtained after slow-release processing in the (k+n-1)th sampling period; c lip [] represents the amplitude limiting function, c lip [x,a,b] represents a limiting function that restricts the variable x to the interval [a,b]. lip [x,a,b]=a; when x>b, c lip [x,a,b]=b; when a≤x≤b, c lip [x,a,b]=x. The slope constraint is used to limit the control output in the (k+n)th sampling period relative to the actual control output u before the switch. out The variation range of (k-1) is controlled to avoid sudden output changes impacting the H-bridge drive circuit.

[0079] (3) Slow-release treatment: from the kth sampling period to the (k+Nth)th sampling period ramp Within -1 sampling period, i.e., n=0~N ramp -1 (1 < N) ramp ≤n c When applying a linearly increasing weight r(n) = (n+1) / N to the output, the weights are: ramp When N ramp <n c And n∈[N ramp ,n c When -1], r(n)=1.

[0080] The final output is: u out’ (k+n)=r(n)·u slope (k+n).

[0081] Preferably, N ramp To determine the sustained-release period, 3 to 5 sampling periods are taken, corresponding to a sustained-release duration of N. ramp ​•Ts. Through the above three levels of constraints, the controller can gradually establish a new directional drive while suppressing instantaneous reverse impact.

[0082] The power drive circuit is based on u out’ (k+n) generates drive current, voltage, PWM duty cycle, or power setpoints to drive the controlled object, causing the TEC unit to operate in heating or cooling mode. For example, in current-type drive, u out’ (k+n) can be directly used as the target current; in PWM H-bridge driving, sgn[u out’ [k+n] is used to determine the direction of the H-bridge current, |u out’ (k+n)| / u max Used to calculate PWM duty cycle.

[0083] III. When n=N stable -1~n c -1 (0 < N) stable <n c -1), that is, in the continuous N stable Within each sampling period, the absolute value of the temperature error of the controlled object is simultaneously satisfied: stable And the absolute value of the current rate of temperature change is less than v. stab At that time, it is determined that the temperature of the controlled object has entered the stable region, at the (k+n)th time. c Each sampling cycle uses the original output of the PID control as the actual control signal for the controlled object, and at the same time returns to step one to determine whether the TEC should enter the hot / cold state switching next time.

[0084] For the quantitative switching control phase, a switching status flag S can be set. switch Set S when switching confirmation switch =1, and start the compensation window count and the mitigation count; when the stability criterion is continuously satisfied N stable When the cycle, or when the compensation window and the slow-release phase have both ended and the temperature of the controlled object has entered the stable region, set S... switch =0, reverting to normal steady-state PID. ε stable To stabilize the error threshold, v stab To stabilize the slope threshold, N stable To ensure a stable confirmation period, a typical value is ε. stable =0.3℃~0.5℃, v stab =0.05℃ / s~0.2℃ / s, N stable Take 5 to 10 cycles.

[0085] The method described in this embodiment does not directly use the PID integral term before the switch when the TEC enters the hot / cold state, nor does it simply clear the integral term. Instead, it reconstructs the integral term by combining the historical integral term, the current temperature error, the change in temperature error, and the actual control output before the switch. This can reduce the bias effect of the historical integral residue before the switch on the control of the new direction after the switch, reduce the reverse overshoot caused by integral accumulation, and avoid the initial insufficient driving force caused by simply clearing the integral.

[0086] Thermal inertia compensation calculation is introduced during the switching phase. Based on the historical control output before the switch, the current temperature change rate, and the error change trend, the continued influence of residual heat flow on the temperature of the controlled object before the switch is compensated. This can reduce the temperature deviation caused by the residual heat flow in advance when the TEC drive direction has been switched but the temperature of the controlled object is still affected by the thermal inertia of the original direction, thereby reducing overshoot and oscillation near the target temperature.

[0087] Furthermore, the composite original control output is subjected to amplitude limiting, slope limitation and slow release processing, so that the actual control output of TEC is gradually established in the early stage of switching between hot and cold directions, avoiding the impact of instantaneous changes in control output on H-bridge drive circuit and TEC unit, while reducing temperature fluctuations caused by sudden control changes and improving the stability of the hot and cold switching process.

[0088] Finally, after the temperature error and temperature change rate of the controlled object continuously meet the stability criterion, the original output of PID control is resumed for conventional control. This enables the system to have strong oscillation suppression capability during the hot-cold switching phase and maintain the dynamic adjustment capability of conventional PID control after the temperature enters the stable region, thus taking into account both switching stability and subsequent response speed.

[0089] Example 2

[0090] This embodiment uses a semiconductor testing platform as the controlled object and utilizes the method described in Embodiment 1 to achieve hot and cold switching control from 60°C to 20°C.

[0091] The stage is heated and cooled by a TEC (Digital Temperature Regulator). An aluminum heat sink is installed on the heat dissipation side and forced by a fan for air cooling. The ambient temperature is approximately 25°C. The TEC uses a PT100 platinum resistance thermometer to collect temperature signals, which are then digitized by a 16-bit ADC and sent to the embedded controller. The sampling period Ts is 0.2 s. The TEC has a rated operating current of 5 A, is driven by a bidirectional H-bridge, and has a maximum duty cycle limited to 90%.

[0092] When the target temperature changes from 60℃ to 20℃, the controller detects a reversal of the control output sign and an inversion of the error sign (|e|>e) within the first sampling period. th=1.0℃), after confirmation for two consecutive cycles, the hot / cold direction switching process is triggered. In the first control cycle after the switching is triggered, the integral term is reconstructed with the following parameters: α=0.1, β=0.3, γ=0.1, η=-0.2. The initial value of the reconstructed integral is approximately 13% of the integral term before the switching plus the error guidance amount, and the historical bias is significantly reduced. Subsequently, within a compensation window of 10 sampling cycles (2s), the thermal inertia compensation is calculated with K1=0.5, K2=0.2, K3=0.1, λ=0.3, and subtracted from the control output in each control cycle. Regarding the output constraint, the release period N ramp =4, the control output weights in the first four control cycles are approximately 0.25, 0.50, 0.75 and 1.00 respectively, and the slope limit Δu max =0.8 A / cycle.

[0093] Under the conditions of this embodiment, during the actual temperature transition from 60℃ to 20℃, the maximum overshoot is approximately 1.5℃ (corresponding to a rise after reaching approximately 18.5℃), and the number of oscillations near the target temperature is 1. The TEC meets the stability criterion (|e|<0.5℃ and |dT / dt|<0.1℃ / s for 8 consecutive cycles) within approximately 22 seconds after the switching trigger, subsequently exiting the switching control and resuming steady-state PID control. The steady-state temperature control accuracy is better than ±0.3℃. Compared to the integral zeroing baseline scheme under the same conditions (overshoot approximately 4.2℃, settling time approximately 42 s, oscillations 3-4 times), this embodiment reduces overshoot by approximately 64% and shortens the settling time by approximately 47%.

[0094] Example 3

[0095] This embodiment uses the built-in temperature control platform of a certain photoelectric detection device as the controlled object, and uses the method described in Embodiment 1 to achieve wide-range switching control from low temperature to high temperature, switching from -10℃ to 50℃.

[0096] The stage needs to perform rapid switching tests from low to high temperatures over a wide temperature range. The TEC has a rated current of 6 A, with a semiconductor cooling chip stacked on the cooling side and the heating side tightly bonded to the copper base via thermal grease. The overall heat capacity is larger than in Example 1, with an equivalent heat capacity of approximately 22 J / ℃ and an equivalent thermal resistance of approximately 0.6℃ / W. The ambient temperature is approximately 22℃. The sampling period Ts = 0.2 s, the driving method is the same as the H-bridge, and an NTC thermistor is used as the temperature sensor, with a resolution better than 0.05℃.

[0097] When the target temperature changes from -10℃ to 50℃, because the TEC has maintained a deep cooling state for a long time before the switch, the accumulated integral term before the switch is relatively large (approximately 70% of the rated output). If it is directly reset to zero, the initial heating drive will be significantly insufficient; if it is directly retained, the positive bias will be too large, both of which will lead to slow response or early overshoot. This embodiment uses the following parameters: switching error threshold e th=1.5℃, N conf =2; Integral reconstruction coefficients α=0.15, β=0.4, γ=0.12, η=-0.25; Thermal inertia compensation parameters K1=0.6, K2=0.25, K3=0.12, λ=0.35, compensation window N comp =15 (i.e., 3 s); sustained-release period N ramp =5; Slope limit Δu max =1.0 A / period; stability criterion ε stable =0.5℃, (dT / dt)s tab =0.15℃ / s, N stable =8 cycles.

[0098] Under the conditions of this embodiment, during the actual temperature transition from -10℃ to 50℃, the maximum overshoot is approximately 2.1℃ (peak value approximately 52.1℃), the number of oscillations near the target temperature is 1, and the system meets the stability criterion approximately 35 seconds after the switching trigger. The steady-state temperature control accuracy is better than ±0.4℃. Compared with the integral zeroing baseline scheme under the same conditions (overshoot approximately 6.8℃, settling time approximately 68 seconds, oscillations 4-5 times), this embodiment reduces overshoot by approximately 69% and shortens the settling time by approximately 49%. A larger compensation window N... comp (15 cycles) and a slightly higher K2 coefficient effectively mitigate the thermal inertia of the high heat capacity structure during the initial stage of switching heating direction.

[0099] Example 4

[0100] This embodiment uses a thermal cycling test device as the controlled object and utilizes the method described in Embodiment 1 to achieve small-scale hot and cold switching control from 20°C to near 0°C.

[0101] This device requires frequent small-amplitude thermal cycling tests near the target temperature of 0°C, demanding high steady-state accuracy and oscillation suppression. The switching amplitude is small (only 20°C), but the cycling frequency is high, switching approximately every 3-5 minutes. The TEC has a rated current of 4 A, a small heat capacity (equivalent to approximately 8 J / °C), and an equivalent thermal resistance of approximately 1.2°C / W, resulting in a fast overall thermal response. However, the TEC is more prone to high-frequency oscillations due to residual integral terms. The sampling period Ts = 0.1 s (the sampling frequency was increased to accommodate the rapid thermal response), and the NTC sensor resolution is better than 0.05°C.

[0102] Due to the small switching amplitude and short thermal time constant, this embodiment employs a more sensitive switching detection threshold and a narrower compensation window: switching error threshold e th =0.5℃, N conf=2; Integral reconstruction coefficients α=0.05, β=0.25, γ=0.08, η=-0.15; Thermal inertia compensation parameters K1=0.3, K2=0.15, K3=0.08, λ=0.2, compensation window N comp =8 (0.8 s); sustained-release period N ramp =3; Slope limit Δu max =0.6 A / period; stability criterion ε stable =0.3℃, (dT / dt)s tab =0.05℃ / s, N stable =10 cycles. Since α takes a small value (0.05), the historical integral is almost cleared, which is closer to the effect of clearing to zero. However, the current state is retained through the terms β and η, which avoids the loss of driving force from pure clearing.

[0103] Under the conditions of this embodiment, during the transition from 20℃ to 0℃, the maximum overshoot is approximately 0.8℃ (the lowest temperature reaches approximately -0.8℃), the number of oscillations is 0 to 1, and the TEC meets the stability criterion approximately 12 seconds after the switching trigger, with a steady-state temperature control accuracy better than ±0.2℃. In 10 consecutive cyclic switching tests, the overshoot of each switching did not exceed 1.0℃, and the stability time fluctuated between 10 s and 14 s, showing good consistency. Compared with the integral zeroing benchmark scheme under the same conditions (average overshoot approximately 2.3℃, average stability time approximately 28 s, 2 to 3 oscillations), the overshoot in this embodiment is reduced by approximately 65%, and the stability time is shortened by approximately 57%. This embodiment shows that the method of the present invention is also effective in small-amplitude high-frequency switching scenarios, and can be adapted to controlled objects with different thermal time constants by adjusting the parameters.

[0104] Example 5

[0105] This embodiment uses a simulation verification platform based on C# and WPF to compare and verify the parameter combinations of embodiments two through four.

[0106] The control algorithm of this invention can be fully implemented using the C# language, and a graphical user interface can be built using the WPF (Windows Presentation Foundation) framework. The overall architecture of the simulation platform is divided into five functional modules: parameter configuration module, controller module, thermal model module, recording module, and curve display module.

[0107] The controller module comprises four sub-modules: switching determination, integral reconstruction, thermal inertia compensation, and output constraint, used to implement the method described in Example 1. The thermal model module uses a first-order RC thermal equivalent circuit to simulate the heat transfer relationship between the TEC, the stage, and the environment, with equivalent thermal resistance and equivalent heat capacity as configurable parameters, supporting the simulation of different controlled object characteristics. The recording module automatically records the error e(k), reconstructed integral term I′(k), thermal inertia compensation Cth(k), original control output, and constrained control output in each control cycle, and supports exporting to a CSV file for subsequent analysis. The interface module displays the real-time temperature response curve, switching status flags, and parameter tuning results, supporting online modification of control parameters and immediate observation of response changes.

[0108] The key classes and interfaces of the simulation platform include: TecSwitchController (the main controller entry point, which calls all sub-modules and summarizes control results every sampling period), SwitchDetector (switching judgment and confirmation window logic), IntegralReconstructor (integral reconstruction calculation), ThermalInertiaCompensator (thermal inertia compensation calculation and compensation window management), OutputLimiter (three levels of constraints: amplitude limiting, slope limiting, and mitigation), ThermalPlantModel (first-order RC thermal model), and RecorderService (data recording and export). These classes are decoupled through interfaces, facilitating the replacement of specific implementations and portability to embedded platforms.

[0109] Table 1 shows the comparison data of the main performance indicators between the control method of this invention and the benchmark PID zeroing method based on the simulation platform of Examples 2-4. The stability criterion is |e(k)| < ε. stable And |dT / dt| < (dT / dt)s tab Continuous N stable Each sampling period. For example... Figure 3 As shown, the results indicate that during the switching process between hot and cold, the control method of the present invention outperforms the benchmark PID zeroing method in terms of maximum overshoot, number of oscillations, and settling time.

[0110] Table 1. Comparison data between the control method of this invention and the baseline PID reset method.

[0111] .

Claims

1. A method for suppressing temperature-controlled oscillation during TEC (Thermal Design Equipment) switching, characterized in that, include: In the current sampling period, it is determined whether the thermoelectric cooler has entered the switching between hot and cold states. If it has, then starting from the current sampling period, the PID control integral term is reconstructed and thermal inertia compensation is calculated in each sampling period to generate a composite original control output u. raw and the composite original control output u raw Amplitude limiting, slope limiting, and slow-release processing are applied to obtain the control output quantity u. out’ As the actual control signal for the controlled object, the original output quantity u of the PID control is used until the temperature change of the controlled object meets the set requirements. Then, in the next sampling cycle after the set requirements are met, the original output quantity u of the PID control is resumed. pre As the actual control signal of the controlled object.

2. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 1, characterized in that, The method for determining whether the thermoelectric cooler has entered the switching between hot and cold states is as follows: During consecutive N... conf Within a sampling period, the TEC is determined to enter a hot / cold state switching state when at least one of the following conditions is met: (1) sgn[u pre (k-i1)] and sgn[u out Conversely, |u] pre (k-i1)|、|u out (k-i1-1)| are all greater than the small threshold for direction determination u th ; (2) sgn[e(k-i1)] is the opposite of sgn[e(k-i1-1)], and |e(k-i1)| is greater than the set temperature error threshold e. th ; Where k is the index of the current sampling period, and i1 = 0 ~ N conf ;u pre (k-i1) represents the original output of the PID control in the (k-i1)th sampling period in history, including the current period, u out (k-i1-1) represents the actual control output of the controlled object in the (k-i1-1)th sampling period of history; e(k-i1) and e(k-i1-1) represent the historical temperature error of the controlled object, respectively, e(k-i1) = T set -T(k-i1), T set The target temperature is T(k-i1), which represents the temperature of the controlled object in the (k-i1)th sampling period in history; sgn[] represents the output symbol.

3. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 2, characterized in that, The original output of the PID control is: u pre (k-i1)=K p ·e(k-i1)+K i ·I(k-i1-1)+K d ·Δe(k-i1) / Ts, Among them, K p K i K d These are the proportional, integral, and derivative gain coefficients, respectively. I(k-i1-1) is the integral term of the PID control in the k-i1-1th sampling period. Δe(k-i1) is the temperature error change, Δe(k-i1)=e(k-i1)-e(k-i1-1), and Ts is the duration of a single sampling period.

4. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 2, characterized in that, The method for reconstructing the integral term of the PID control is as follows: I′(k+n) = α·I(k-1) + β·e(k+n) + γ·Δe(k+n) + η·u out (k-1), Where n is the sampling period index after entering the hot / cold state switching, n=0~n c -1, n c The total number of sampling cycles executed after switching between hot and cold states is given by I′(k+n), where I′(k+n) is the reconstruction integral term for the (k+n)th sampling cycle, I(k-1) is the PID control integral term for the (k-1)th sampling cycle, and e(k+n) and Δe(k+n) represent the temperature error and error change of the controlled object in the (k+n)th sampling cycle, respectively. out (k-1) represents the actual control output of the controlled object in the (k-1)th sampling period, α is the historical integral attenuation coefficient, β is the current error guidance coefficient, γ is the error change guidance coefficient, and η takes a negative value as the feedback coefficient.

5. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 4, characterized in that, The thermal inertia compensation calculation method is as follows: C th (k+n) = K1·v dir (k+n) + K2·Σ[i2=1~m](u out (k-i2)·w i2 ) + K3·Δe(k+n), Among them, C th (k+n) represents the thermal inertia compensation amount for the (k+n)th sampling period, where K1, K2, and K3 are compensation coefficients; w i2 w is the weighting coefficient for historical outputs. i2 =(1-λ)^(i2-1), where m is the compensation window N based on thermal inertia. comp A defined number of compensation cycles; u out (k-i2) represents the actual control output of the controlled object in the i2th sampling period before the switching between hot and cold states; v dir (k+n) represents the rate of temperature change in the (k+n)th sampling period affected by the residual heat flow before the switching between hot and cold states, v dir (k+n)=sgn[u out (k-1)]·v T (k+n), v T (k+n) represents the rate of temperature change of the controlled object in the (k+n)th sampling period, v T (k+n)=[T(k+n)-T(k+n-1)] / Ts, where T(k+n) and T(k+n-1) represent the temperatures of the controlled object in the k+n and k+n-1 sampling periods, respectively.

6. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 5, characterized in that, The composite original control output is: u raw (k+n) = K p ·e(k+n) + K i ·I′(k+n) + K d ·Δe(k+n) / Ts - C th (k+n), Among them, K p K i K d These are the proportional, integral, and differential gain coefficients, respectively, and Ts is the duration of a single sampling period.

7. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 6, characterized in that, A method for limiting, slope limiting, and slowing down the composite raw control output includes: Limit: u lim (k+n)=max[min(u raw (k+n),u max ),-u max ], u max u is the maximum allowable output value of the power drive circuit. lim (k+n) represents the control output after limiting in the (k+n)th sampling period; Slope constraint: when n=0, u slope (k)=u out (k-1)+c lip [u lim (k)-u out (k-1),-Δu max ,Δu max ], When n ≥ 1, u slope (k + n) = u out’ (k + n - 1) + c lip [u lim (k + n) - u out’ (k + n - 1), -Δu max , Δu max ; Where, Δu max u is the maximum allowable output change between two adjacent sampling periods. slope (k+n) represents the control output after slope limiting of the amplitude-limited control output in the (k+n)th sampling period, c lip [] represents the amplitude limiting function; u out’ (k+n-1) is the control output obtained after slow-release processing in the k+n-1th sampling period; Slow-release treatment: in n=0~N ramp -1, 1 < N ramp ≤n c During the period, a linearly increasing weight r(n) = (n+1) / N is applied to the control output after slope limitation. ramp When N ramp <n c And n∈[N ramp ,n c When -1], the applied linearly increasing weight r(n) = 1; N ramp This refers to the number of sustained-release treatment cycles; The control output obtained after slow release processing in the (k+n)th sampling period is: u out’ (k+n)=r(n)·u slope (k+n)。 8. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 2, characterized in that, The temperature change of the controlled object meets the set requirement as follows: during continuous N... stable Within each sampling period, if the absolute value of the temperature error of the current controlled object is less than the stable error threshold and the absolute value of the current temperature change rate is less than the stable slope threshold, then in the next sampling period, the original output of the PID control will be used as the actual control signal for the controlled object, and at the same time, a determination will be made on whether the TEC will enter the hot / cold state switching next time.

9. The TEC cooling / heating switching temperature control oscillation suppression method according to claim 7, characterized in that, N conf Take 2 to 3 sampling periods, N comp Take 5 to 20 sampling periods, N ramp Take 3 to 5 sampling periods.

10. A TEC (Thermal Control and Temperature) switching temperature control oscillation suppression system, characterized in that, include: Hot / cold state switching determination module: used to determine whether the thermoelectric cooler has entered the hot / cold state switching phase in the current sampling period; Actual control signal generation module: Used in the cold / hot state switching determination module to determine when the thermoelectric cooler enters the cold / hot state switching phase in the current sampling period. Starting from the current sampling period, it reconstructs the PID control integral term and performs thermal inertia compensation calculations in each sampling period to generate a composite original control output quantity u. raw and the composite original control output u raw Amplitude limiting, slope limiting, and slow-release processing are applied to obtain the control output quantity u. out’ , as the actual control signal of the controlled object; PID control recovery judgment module: Used to determine whether the temperature change of the controlled object meets the set requirements, and to resume the use of the original PID control output u in the next sampling cycle if the set requirements are met. pre As the actual control signal of the controlled object.