Temperature control method, device, system and spectrum analyzer based on tec module

CN123010905APending Publication Date: 2026-10-30HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510551870.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]TEC模块驱动电路多采用PWM(脉宽调制)占空比输入专用驱动芯片的架构,但PWM开关频率(通常为几十至数百kHz)导致的电压/电流纹波会形成高频底噪,在精密仪器的测量中将造成较大影响,并且TEC模块由当前温度向目标温度回调的过程中,存在响应较慢的问题,无法适用于需要精准温度调节的精密仪器

Benefits of technology

[0044]本申请提供的基于TEC模块的温度控制方法,通过PID控制器输出的第一调节系数调节温度误差,若第一调节系数大于调节阈值,则将第一调节系数以负反馈的形式加入至积分环节,以此消除PID控制器的积分环节中的积分饱和,避免积分环节将温度差持续累积,影响温度调节的效果,并且提升TEC模块由当前温度向目标温度回调的过程的响应速度,再者,通过数模转换器和运算放大器结合来驱动TEC模块,能够减小温度控制系统中的高频底噪,使该系统适用于需要精准温度调节的精密仪器。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123010905A_ABST
    Figure CN123010905A_ABST
Patent Text Reader

Abstract

The application discloses a temperature control method, device and system based on a thermoelectric cooler (TEC) module. The method comprises the following steps: acquiring the current temperature of the TEC module; inputting the current temperature and a preset target temperature into a proportional-integral-derivative (PID) controller to obtain a first adjustment coefficient; if the first adjustment coefficient is greater than a preset adjustment threshold, the first adjustment coefficient is added to the integral link of the PID controller in the form of negative feedback to obtain a second adjustment coefficient; a voltage signal corresponding to the second adjustment coefficient is generated through a digital-to-analog converter, and the voltage signal is transmitted to an operational amplifier; a constant current source circuit is constructed based on the operational amplifier to generate a current signal, and the current signal is transmitted to the TEC module to adjust the temperature of the TEC module. The response speed of the system for eliminating temperature errors is improved, the circuit floor noise in the system is reduced, and the system can be applied to precision instruments requiring precise temperature regulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to semiconductor cooler control technology, and in particular to a temperature control method, device, system, and spectrometer based on a TEC module. Background Technology

[0002] The temperature control system of TEC modules (Thermoelectric Coolers) achieves precise temperature regulation through the Peltier effect of semiconductor materials, and is widely used in precision instruments such as industrial lasers, medical testing equipment, biological experimental instruments, and smart homes.

[0003] TEC module drive circuits mostly adopt the architecture of dedicated driver chips with PWM (pulse width modulation) duty cycle input. However, the voltage / current ripple caused by the PWM switching frequency (usually tens to hundreds of kHz) will form high-frequency noise, which will have a significant impact on the measurement of precision instruments. In addition, the TEC module has a slow response during the process of returning from the current temperature to the target temperature, making it unsuitable for precision instruments that require precise temperature regulation.

[0004] In summary, the temperature control system of the TEC module suffers from high-frequency noise and slow response, which has become a key challenge restricting the development of precision instruments. Summary of the Invention

[0005] The purpose of this application is to provide a temperature control method, device, system and spectrometer based on a TEC module, which can reduce the high-frequency background noise generated during temperature control and avoid the problem that the system cannot respond in time during temperature recovery.

[0006] To achieve the above objectives, this application adopts the following technical solution:

[0007] Firstly, a temperature control method based on a TEC module is provided, the method comprising:

[0008] Get the current temperature of the TEC module;

[0009] The temperature difference between the current temperature and the preset target temperature is input into the proportional-integral-derivative PID controller to obtain the first adjustment coefficient. If the first adjustment coefficient is greater than the preset adjustment threshold, the first adjustment coefficient is added to the integral part of the PID controller in the form of negative feedback to obtain the second adjustment coefficient.

[0010] A voltage signal corresponding to the second adjustment coefficient is generated by a digital-to-analog converter, and the voltage signal is sent to an operational amplifier;

[0011] A constant current source circuit based on an operational amplifier generates a current signal and sends the current signal to the TEC module, adjusting the temperature of the TEC module based on the current signal.

[0012] Furthermore, the first adjustment coefficient is added to the integral term of the PID controller in the form of negative feedback to obtain the second adjustment coefficient, which includes:

[0013] The first temperature integral value after integral gain in the integral stage is determined before the first adjustment coefficient is obtained.

[0014] The first temperature integral value is reduced by the first adjustment coefficient to obtain the second temperature integral value after negative feedback.

[0015] The second adjustment coefficient is determined based on the integral value of the second temperature.

[0016] Further, by reducing the first temperature integral value according to the first adjustment coefficient, a second temperature integral value after negative feedback is obtained, including:

[0017] Determine the difference between the first adjustment coefficient and the adjustment threshold, and determine the anti-saturation correction term for adjusting the first temperature integral value based on the difference. The range of the anti-saturation correction term is 0.1 to 1.

[0018] The antisaturation correction term is superimposed on the integral term in the form of negative feedback to obtain the second temperature integral value.

[0019] Furthermore, the method also includes:

[0020] If the relay feedback self-tuning module where the TEC module is located is in an oscillating state, adjust the initial temperature control parameters of the PID controller;

[0021] The temperature of the TEC module is fuzzy controlled based on the adjusted initial temperature control parameters. According to the error feedback of the fuzzy control, the target temperature control parameters of the PID controller are obtained. The target control parameters include at least one of the target proportional parameter, target integral parameter and target derivative parameter.

[0022] Furthermore, adjust the initial temperature control parameters of the PID controller, including:

[0023] Obtain the critical parameters of the relay feedback self-tuning module. The critical parameters include at least the oscillation period and the oscillation amplitude.

[0024] The critical gain is determined based on the duty cycle and oscillation amplitude of the relay output signal, and the initial proportional parameter is determined based on the critical gain, wherein the initial proportional parameter is directly proportional to the critical gain.

[0025] The initial integral parameters are determined based on the oscillation period, where the initial integral parameters are inversely proportional to the oscillation period.

[0026] The initial differential parameter is determined based on the oscillation period, where the initial differential parameter is directly proportional to the oscillation period.

[0027] The initial temperature control parameters are obtained based on the initial proportional parameters, initial integral parameters, and initial derivative parameters.

[0028] Furthermore, the initial temperature control parameters include initial proportional parameters, initial integral parameters, and initial derivative parameters;

[0029] Based on the error feedback from fuzzy control, the target temperature control parameters for the PID controller are obtained, including:

[0030] The rate of temperature change is determined based on the temperature difference between the current temperature and the target temperature.

[0031] Fuzzy control queries the proportional fuzzy value corresponding to the temperature change rate and temperature difference according to the first fuzzy rule table, the integral fuzzy value corresponding to the temperature change rate and temperature difference according to the second fuzzy rule table, and the differential fuzzy value corresponding to the temperature change rate and temperature difference according to the third fuzzy rule table.

[0032] The target proportional parameter is obtained by calculating the sum of the initial proportional parameter and the proportional fuzzy value using a PID controller; the target integral parameter is obtained by calculating the sum of the initial integral parameter and the integral fuzzy value using a PID controller; and the target differential parameter is obtained by calculating the sum of the initial differential parameter and the differential fuzzy value using a PID controller.

[0033] The first fuzzy rule table includes at least the correspondence between temperature change rate, temperature difference and proportional fuzzy value; the second fuzzy rule table includes at least the correspondence between temperature change rate, temperature difference and integral fuzzy value; and the third fuzzy rule table includes at least the correspondence between temperature change rate, temperature difference and differential fuzzy value.

[0034] Furthermore, the method also includes:

[0035] If the first adjustment coefficient is not greater than the adjustment threshold, a voltage signal corresponding to the first adjustment coefficient is generated by the digital-to-analog converter, and the voltage signal is sent to the operational amplifier;

[0036] A constant current source circuit based on an operational amplifier generates a current signal and sends the current signal to the TEC module, adjusting the temperature of the TEC module based on the current signal.

[0037] Secondly, a temperature control device based on a TEC module is provided, the device comprising:

[0038] Temperature detection module, used to obtain the current temperature of TEC module;

[0039] The processing module is used to input the temperature difference between the current temperature and the preset target temperature into the proportional-integral-derivative PID controller to obtain the first adjustment coefficient. If the adjustment coefficient is greater than the preset adjustment threshold, the first adjustment coefficient is added to the integral part of the PID controller in the form of negative feedback to obtain the second adjustment coefficient.

[0040] A digital-to-analog converter is used to generate a voltage signal corresponding to the second adjustment coefficient and to send the voltage signal to an operational amplifier;

[0041] An operational amplifier is used to generate a current signal based on a voltage signal and then send the current signal to the TEC module.

[0042] Thirdly, a temperature control system based on a TEC module is provided. The system includes a TEC module and the temperature control device in the second aspect, wherein the TEC module is used to adjust the temperature according to the on / off state and direction change of the current.

[0043] Fourthly, a spectrometer is provided, comprising: a processor and a memory, the memory storing processor-executable instructions; when the processor is configured to execute the instructions, it causes the electronic device to implement the temperature control method based on the TEC module as described in the first aspect.

[0044] The temperature control method based on the TEC module provided in this application adjusts the temperature error through a first adjustment coefficient output by the PID controller. If the first adjustment coefficient is greater than the adjustment threshold, it is added to the integral link in the form of negative feedback. This eliminates integral saturation in the integral link of the PID controller, prevents the temperature difference from accumulating continuously in the integral link, and avoids affecting the temperature regulation effect. It also improves the response speed of the TEC module in the process of returning from the current temperature to the target temperature. Furthermore, by using a combination of digital-to-analog converter and operational amplifier to drive the TEC module, the high-frequency noise in the temperature control system can be reduced, making the system suitable for precision instruments that require precise temperature regulation. Attached Figure Description

[0045] Figure 1 A schematic diagram of a temperature control system provided in one embodiment of this application;

[0046] Figure 2 A flowchart of the temperature control method provided in the embodiments of this application;

[0047] Figure 3 A schematic diagram of a temperature control system in another embodiment provided in this application;

[0048] Figure 4 A flowchart illustrating the adjustment of the integral element of the PID controller based on a first adjustment coefficient in an embodiment provided in this application;

[0049] Figure 5 A schematic diagram of the operational amplifier provided in the embodiments of this application;

[0050] Figure 6 A logic block diagram of the temperature control system provided in the embodiments of this application;

[0051] Figure 7 A flowchart illustrating the operation of the relay feedback self-tuning module in the embodiments provided in this application;

[0052] Figure 8 The flowchart of fuzzy control provided in the embodiments of this application;

[0053] Figure 9 The logic block diagram of fuzzy control provided in the embodiments of this application;

[0054] Figure 10 The structural block diagram of the temperature control device based on the TEC module provided in the embodiments of this application;

[0055] Figure 11 The structural block diagram of the temperature control system based on the TEC module provided in the embodiments of this application;

[0056] Figure 12 A schematic diagram of the computing device provided in the embodiments of this application. Detailed Implementation

[0057] To enable those skilled in the art to better understand the present application, the technical solutions in specific embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0058] like Figure 1 As shown, the temperature control system where the TEC module is located generally relies on the control algorithm of the PID controller to achieve closed-loop regulation. The TEC module (Thermoelectric Cooler), also known as the Peltier module, is a solid-state thermal management device based on the Peltier effect, which can directly achieve heating or cooling through electrical energy.

[0059] Proportional-Integral-Derivative (PID) Controller: The PID controller is a feedback control algorithm widely used in industrial control systems. It adjusts the output signal in real time to enable the controlled object (such as temperature, speed, pressure, etc.) to quickly and stably reach the set value (target value). The PID controller dynamically adjusts based on the error signal (the deviation between the set value and the actual value). Its output consists of a superposition of three parts: proportional, integral, and derivative. The proportional value is used to linearly adjust the output according to the current error magnitude; the larger the error, the stronger the adjustment. The integral value is used to accumulate historical errors and eliminate steady-state errors that proportional control cannot completely eliminate. The derivative value is used to predict future error trends (through the error rate of change) and suppress overshoot or fluctuations in advance. e(k) is the deviation between the target temperature and the current temperature at time k, Kp is the proportional parameter of the proportional P unit of the PID controller, Ki is the integral parameter of the integral I unit of the PID controller, and Kd is the derivative parameter of the derivative D unit of the PID controller.

[0060] For example, when the temperature control system is in the heating phase and the current temperature is far below the target value, the integral term (I term) of the PID controller will continue to accumulate over time to quickly eliminate the error, causing the control output to rapidly reach the power limit of the actuator (such as the TEC drive circuit). If the temperature cannot recover for a long time due to excessive heat dissipation from the external environment or sudden load changes, the integral term will remain in a saturated state for a long time. At this time, even if the temperature begins to approach the target value and a reverse error (such as overshoot) occurs, the integral term still needs to undergo a slow "exit saturation" process and cannot respond to the reverse deviation in time, ultimately causing overshoot oscillation or steady-state regulation lag.

[0061] If the TEC drive circuit mostly adopts the architecture of a dedicated driver chip for PWM (Pulse Width Modulation) duty cycle input, the voltage / current ripple caused by the PWM switching frequency (usually tens to hundreds of kHz) will be coupled to the sensitive measurement circuit through the power supply loop, forming a high-frequency noise floor. For example, if such a structure is directly used in a spectrum analyzer or high-precision sensor, the high-frequency noise floor will directly interfere with the acquisition of weak electrical signals, causing measurement errors or a decrease in signal-to-noise ratio, making it difficult to meet the requirements of microvolt-level signal processing.

[0062] Therefore, this application provides a temperature control method, device, system, and spectrometer based on a TEC module. The method involves adding the adjustment coefficient output by the PID controller as negative feedback to the integral element of the PID controller's integral I unit. The PID controller's output adjustment system is obtained through a digital-to-analog converter (DAC), and a corresponding voltage signal is output to the operational amplifier according to the adjustment coefficient. A DAC is a key electronic device that converts digital signals into analog signals. Upon obtaining the voltage signal, the operational amplifier outputs a stable current signal to the TEC module based on a constant current source circuit constructed by the operational amplifier. The operational amplifier is a high-gain, versatile analog integrated circuit widely used in signal amplification, filtering, computation, and control systems. This reduces the high-frequency noise floor in the temperature control system and weakens the integral saturation in the PID controller's integral element, enabling the temperature control system to respond quickly to reverse deviations.

[0063] The temperature control method based on a thermoelectric cooler (TEC) module provided in this application will be described in detail below with reference to the accompanying drawings.

[0064] like Figure 2 As shown, this application provides a temperature control method based on a TEC module, the method comprising:

[0065] Step S101: Obtain the current temperature of the TEC module.

[0066] The TEC module has a cold end and a hot end. The cold end is the heat-absorbing surface of the TEC module, which is used to cool the target object (such as a laser chip). The hot end is the heat-dissipating surface of the TEC module, which needs to be connected to a heat sink to dissipate heat.

[0067] In some embodiments, a temperature sensor can be mounted on the surface of the TEC module to directly read the current temperature of the cold end and / or the hot end.

[0068] In other embodiments, the current temperature of the TEC module refers to the temperature of the controlled object connected to the TEC module, which is directly measured by an external sensor (such as a thermistor).

[0069] Step S102: Input the temperature difference between the current temperature and the preset target temperature into the proportional-integral-derivative PID controller to obtain the first adjustment coefficient. If the first adjustment coefficient is greater than the preset adjustment threshold, add the first adjustment coefficient to the integral part of the PID controller in the form of negative feedback to obtain the second adjustment coefficient.

[0070] like Figure 3As shown, in some embodiments, the PID controller acquires the temperature difference e(k) between the current temperature of the TEC module and the preset target temperature. The proportional P unit of the PID controller adjusts the output proportional parameter proportionally according to the temperature difference e(k). The integral I unit of the PID controller determines the cumulative historical temperature difference between the current temperature difference e(k) and the previous temperature difference e(k), and generates integral parameters for eliminating the steady-state error of the system based on the historical temperature difference. The derivative D unit of the PID controller generates derivative parameters for predicting the error change trend based on the historical temperature difference. The PID controller generates a first adjustment coefficient based on the obtained proportional parameter, integral parameter, and derivative parameter.

[0071] Furthermore, a limiter is connected in series at the output of the PID controller. The amplitude of the limiter is the adjustment threshold, and its amplitude range is defined as [-umax, +umax], where umax is the adjustment threshold. For example, if the first adjustment coefficient is 1, the TEC module is driven to heat at maximum power; if the first adjustment coefficient is -1, the TEC module is driven to cool at maximum power. If the first adjustment coefficient is greater than 1 due to the accumulation of integral parameters in the integral terminator (e.g., the first adjustment coefficient is 1.2), and the adjustment threshold is set to 1, the output value of the limiter will be 1, thereby suppressing integral saturation in the integral terminator.

[0072] like Figure 4 As shown, in some embodiments, the first adjustment coefficient is added to the integral term of the PID controller in the form of negative feedback to obtain the second adjustment coefficient, specifically including the following steps:

[0073] Step S1021: Determine the first temperature integral value after the integral gain in the integral stage.

[0074] The integral value of the first temperature satisfies the following relationship:

[0075] I(k) = Ki * Δt;

[0076] In the formula, I(k) represents the first temperature integral value, Ki represents the integral parameter, and Δt represents the sampling time interval. The first temperature integral value is determined before the first adjustment coefficient is obtained.

[0077] Step S1022: Reduce the first temperature integral value according to the first adjustment coefficient to obtain the second temperature integral value after negative feedback.

[0078] For example, the difference Δu between the first adjustment coefficient U and the adjustment threshold U0 is obtained. An anti-saturation correction term for adjusting the first temperature integral value is determined based on the difference Δu. A second temperature integral value is determined based on the difference between the first temperature integral value and the anti-saturation correction term. The anti-saturation correction term includes an adjustable coefficient Kc and the difference Δu between the first adjustment coefficient U and the adjustment threshold U0. A larger adjustable coefficient Kc indicates a stronger effect of the integral element in preventing integral saturation. The difference between the first adjustment coefficient and the adjustment threshold indicates a stronger effect of the integral element in preventing integral saturation.

[0079] The integral value of the second temperature satisfies the following relationship:

[0080] I'(k)=I(k)-Kc*(u(k)-umax);

[0081] In the formula, I`(k) represents the second temperature integral value, Kc represents the adjustable coefficient, and u(k) represents the first adjustment coefficient.

[0082] Step S1023: Determine the second adjustment coefficient based on the second temperature integral value.

[0083] For example, the second adjustment coefficient is less than the adjustment threshold, that is, the second adjustment coefficient is the final output value of the PID controller, and the second adjustment coefficient satisfies the following relationship:

[0084]

[0085] In Formula 1, y pid (k) represents the second adjustment coefficient, K p The proportional parameter of the proportional unit P is represented, e(k) represents the temperature difference between the current temperature and the target temperature, ec(k) represents the approximate difference value of the temperature difference, and T is the proportional parameter of the proportional unit P. s T represents the time interval for collecting the current temperature. i T represents the integration time constant. d This represents the differential time constant.

[0086] It should be noted that in the embodiments of this application, the control algorithm of the PID controller is a position control algorithm, and the temperature control system in which the PID controller is located is a steady-state control system. The position control algorithm is more conducive to steady-state control and has better temperature control accuracy.

[0087] Step S103: Generate a voltage signal corresponding to the second adjustment coefficient through a digital-to-analog converter, and send the voltage signal to an operational amplifier.

[0088] Step S104: Generate a current signal based on the negative feedback mechanism of the operational amplifier, and send the current signal to the TEC module to adjust the temperature of the TEC module based on the current signal.

[0089] like Figure 5 The diagram shows the circuit structure of an operational amplifier. The output current I of the operational amplifier drives the TEC module, and the TEC module is kept grounded at one end. When the operational amplifier is in a negative feedback state, the current I flowing through resistor R5 is approximately the same as the current output to the TEC module.

[0090] For example, resistors R1 and R3 have the same resistance, and resistors R2 and R4 have the same resistance. Calculations show that the current I flowing through resistor R5 satisfies the following relationship:

[0091]

[0092] In Formula 2, I represents the current flowing through resistor R5, Vref represents the reference voltage, and Ui represents the voltage signal output by the digital-to-analog converter.

[0093] In some embodiments, if the first adjustment coefficient is not greater than the adjustment threshold, a voltage signal corresponding to the first adjustment coefficient is generated by a digital-to-analog converter and sent to an operational amplifier. A constant current source circuit based on the operational amplifier generates a current signal and sends the current signal to the TEC module, adjusting the temperature of the TEC module based on the current signal.

[0094] For example, if the first adjustment coefficient is not greater than the adjustment threshold, the voltage signal U output by the digital-to-analog converter... i It is determined based on the first adjustment coefficient. If the first adjustment coefficient is greater than the adjustment threshold, the voltage signal U output by the digital-to-analog converter... i It is determined based on the adjustment threshold.

[0095] In this embodiment, if the first adjustment coefficient is greater than a preset adjustment threshold, the difference between the first adjustment coefficient and the adjustment threshold is used as an anti-saturation correction term. This anti-saturation correction term is added to the integral term of the PID controller in the form of negative feedback to eliminate integral saturation in the integral term, preventing the integral term from continuously accumulating temperature differences and improving the response speed of the TEC module in the process of returning from the current temperature to the target temperature. Furthermore, by combining a digital-to-analog converter and an operational amplifier to drive the TEC module, the high-frequency noise floor in the temperature control system can be reduced, making the system suitable for precision instruments requiring accurate temperature regulation.

[0096] like Figure 6As shown, the temperature control system integrates a relay feedback self-tuning module. This module uses the switching characteristics of a relay to excite the system's limit loop oscillation, which is used to obtain the critical point oscillation for tuning the PID parameters (proportional, integral, and derivative parameters). In some embodiments, by changing the target temperature to make the current temperature different from the target temperature, the relay in the relay feedback self-tuning module switches between high and low output levels, forcing the temperature control system into an oscillation state. This obtains the critical parameters of the relay feedback self-tuning module, and the initial temperature control parameters of the PID controller are adjusted based on these critical parameters. Fuzzy control is then performed on the temperature of the TEC module based on the adjusted initial temperature control parameters to obtain the target temperature control parameters of the PID controller. These target temperature control parameters include the target proportional parameter, target integral parameter, and target derivative parameter.

[0097] like Figure 7 As shown, exemplarily, in a temperature control system, the specific steps for controlling the heating / cooling of the TEC module via a relay feedback self-tuning module are as follows:

[0098] Step S201: Change the target temperature.

[0099] For example, the target temperature set in the temperature control system is 20°C. If the target temperature is changed, for example, the target temperature is adjusted from 20°C to 30°C.

[0100] Step S202: Obtain the current temperature.

[0101] Step S203: Determine whether the current temperature is greater than the target temperature.

[0102] In some embodiments, if the current temperature is different from the target temperature, the relay in the relay feedback self-tuning module forces the temperature control system into an oscillation state by switching the output high level and low level, thereby obtaining the critical parameters of the relay feedback self-tuning module. The critical parameters include at least the oscillation period and oscillation amplitude of the system.

[0103] The critical gain Ku and critical period Tc are obtained based on the oscillation period and oscillation amplitude, respectively. The critical period Tc is equal to the oscillation period, and the critical gain Ku satisfies the following relationship:

[0104] K u =4d / πa (Formula 3);

[0105] In Formula 3, K u denoted as critical gain, d represents half of the maximum duty cycle and the minimum duty cycle, a represents the oscillation amplitude, and π represents a fixed coefficient.

[0106] In some embodiments, the initial proportional parameters of the PID controller can be determined according to the obtained critical gain Ku and critical period Tc, based on Table 1 (Relay Feedback Self-Tuning Parameter Table) below. The initial temperature control parameters include at least the initial proportional parameters, initial integral parameters, and initial derivative parameters.

[0107]

[0108] Table 1

[0109] Table 1 shows three different controllers. If the controller only controls the proportional element, the initial proportional parameter Kp is determined based on the critical gain. If the controller controls both the proportional and integral elements, the initial proportional parameter Kp is determined based on the critical gain Ku, and the initial integral parameter Ki is determined based on the critical period Tc. In Table 1, Ti represents the integral time constant, and the initial integral parameter Ki is inversely proportional to the integral time constant Ti.

[0110] In this embodiment, during the relay feedback self-tuning process performed by the relay feedback self-tuning module, the controller is a PID controller. The PID controller simultaneously controls the proportional, integral, and derivative components. The initial proportional parameter Kp is determined based on the critical gain, the initial integral parameter Ki is determined based on the critical period Ku, and the initial derivative parameter Kd is determined based on the critical period Tc. In Table 1, Td represents the derivative time constant, and the initial derivative parameter Kd is directly proportional to the integral time constant Td. Therefore, Kp = 0.6Ku; Ki = Kp / 0.5Tc; Kd = Kp*0.125Tc are selected.

[0111] Step S204: If the current temperature is lower than the target temperature, control the TEC module to heat up at full power.

[0112] Step S204: If the current temperature is higher than the target temperature, control the TEC module to cool down at full power.

[0113] For example, the output range of the relay is set to 100% and -100%. If the maximum duty cycle of the relay's output signal is 100%, the TEC module heats up at full power under the control of the relay; if the minimum duty cycle of the relay's output signal is -100%, the TEC module cools down at full power under the control of the relay.

[0114] like Figure 8 As shown, in some embodiments, adjusting the initial temperature control parameters of the PID controller specifically includes the following steps:

[0115] Step S301: Determine the rate of temperature change based on the temperature difference between the current temperature and the target temperature.

[0116] The temperature change rate represents the change in temperature between two consecutive sampling times, and can be obtained by differentiating the temperature difference.

[0117] Step S302: Using fuzzy control, query the proportional fuzzy value corresponding to the temperature change rate and temperature difference according to the first fuzzy rule table, query the integral fuzzy value corresponding to the temperature change rate and temperature difference according to the second fuzzy rule table, and query the differential fuzzy value corresponding to the temperature change rate and temperature difference according to the third fuzzy rule table.

[0118] The first fuzzy rule table includes at least the correspondence between temperature change rate, temperature difference and proportional fuzzy value; the second fuzzy rule table includes at least the correspondence between temperature change rate, temperature difference and integral fuzzy value; and the third fuzzy rule table includes at least the correspondence between temperature change rate, temperature difference and differential fuzzy value.

[0119] For example, the temperature difference and the rate of temperature change are mapped to a universe of discourse within a defined range, and the membership degrees of the temperature difference and the rate of temperature change within the universe of discourse are calculated to obtain fuzzy quantities. Here, the universe of discourse represents the range of all possible values ​​for the fuzzy variables (input or output) in fuzzy control. In the embodiments of this application, the inputs to the fuzzy control are the rate of temperature change and the temperature difference. Then, based on the rate of temperature change and the temperature difference, fuzzy rules are defined to determine the fuzzy control values ​​used to adjust the PID controller.

[0120] For example, if the temperature difference exceeds the preset temperature range, to accelerate the response of the temperature control system and prevent differential overflow that may be caused by a sudden increase in the temperature difference, a larger proportional fuzzy value and a smaller derivative fuzzy value can be used for the fuzzy control value of the PID controller. At the same time, because an excessively strong integral action can lead to increased overshoot in the temperature control system, the integral action needs to be limited, typically by using a smaller fuzzy integral value.

[0121] If the temperature difference is within the preset temperature difference range, in order to reduce the overshoot of the temperature control system and ensure a certain response speed, the proportional fuzzy value is reduced. In this case, the value of the differential fuzzy value has a greater impact on the system, so a smaller differential fuzzy value is selected.

[0122] If the temperature difference is less than the preset temperature difference range, in order to reduce steady-state error and enable the temperature control system to have better steady-state performance, the proportional fuzzy value and the integral fuzzy value are taken as large values, thereby avoiding oscillations in the output response.

[0123] In some embodiments, the temperature difference e(k) can be divided into eight parts for fuzzy reasoning. These eight parts are -40 to -30, -30 to -20, -20 to -10, -10 to 0, 0 to 10, 10 to 20, 20 to 30, and 30 to 40. The values ​​of -30, -20, -10, 0, 10, 20, and 30 are represented by NB, NM, NS, ZO, PS, PM, and PB, respectively. For example, when e(k) = 27, e(k) belongs to the range between PM and PB, therefore e(k) corresponds to at least one membership degree. The percentage of e(k) belonging to PB is (27-20) / (30-20) = 0.7, and the percentage of e(k) belonging to PM is (30-27) / (30-20) = 0.3. Similarly, the temperature change rate ec is also fuzzified to obtain its membership degree. In the process of fuzzy control, the membership degree corresponding to the output value is found according to the membership degree of the temperature difference e(k) and the temperature change rate ec, based on the fuzzy control rule table.

[0124] For example, if the two membership values ​​of temperature difference e(k) are PM and PB, and the membership degree of temperature difference e(k) to PM is a (a < 1), then the membership degree of temperature difference e(k) to PB is (1-a). If the two membership values ​​of temperature change rate ec are NB and NM, and the membership degree of temperature change rate ec to NM is b, then the membership degree of temperature change rate ec to NB is (1-b). According to the first fuzzy rule table (Table 2) below, since the membership degree of temperature difference e(k) to PM is a, and the membership degree of temperature change rate ec to NB is (1-b), then the membership degree of proportional fuzzy value to NS is a*(1-b), and further, the membership degree of proportional fuzzy value to ZO is a*b + a*(1-b) + (1-a)*(1-b).

[0125]

[0126] Table 2

[0127] like Figure 9 As shown, after fuzzy inference based on the first fuzzy rule table, a declarative process is performed based on the membership degrees of the proportional fuzzy values. During declarative process, the proportional fuzzy values ​​can also be divided into 8 parts, namely 7 membership values: NB, NM, NS, ZO, PS, PM, and PB. The membership values ​​of the proportional fuzzy values ​​belonging to ZO are determined, and the membership degrees of the proportional fuzzy values ​​during fuzzy inference are multiplied by the membership values ​​of the proportional fuzzy values ​​during declarative process to obtain the final output proportional fuzzy value.

[0128] The output proportional fuzzy value ΔKp satisfies the following relationship:

[0129] ΔKp=(a*b+a*(1-b)+(1-a)*(1-b))*ZO+(1-a)*b*NS.

[0130] In this embodiment of the application, based on the above method for obtaining the proportional fuzzy value ΔKp, the integral fuzzy value ΔKi and the differential fuzzy value ΔKd are obtained according to the second fuzzy rule table (Table 3) and the third fuzzy rule table (Table 4) as follows.

[0131]

[0132]

[0133] Table 3

[0134]

[0135] Table 4

[0136] Step S303: Calculate the sum of the initial proportional parameter and the proportional fuzzy value using the PID controller to obtain the target proportional parameter; calculate the sum of the initial integral parameter and the integral fuzzy value using the PID controller to obtain the target integral parameter; calculate the sum of the initial derivative parameter and the derivative fuzzy value using the PID controller to obtain the target derivative parameter.

[0137] For example, given the proportional fuzzy value ΔKp, the integral fuzzy value ΔKi, and the differential fuzzy value ΔKd, the proportional fuzzy value ΔKp is added to the initial proportional parameter Kp to obtain the target proportional parameter. Similarly, the integral fuzzy value ΔKi is added to the initial integral parameter Ki to obtain the target integral parameter. Finally, the differential fuzzy value ΔKd is added to the initial differential parameter Kd to obtain the target differential parameter.

[0138] The target temperature control parameters of the PID controller are determined based on the sum of the target proportional parameters, target integral parameters, and target derivative parameters.

[0139] In summary, based on the relay feedback self-tuning module combined with fuzzy control, the temperature control system can adaptively adjust the target control parameters of the PID controller according to the changed target temperature when the target temperature changes, thereby meeting the temperature control requirements of precision instruments.

[0140] like Figure 10 As shown in the embodiments of this application, a temperature control device 100 based on a TEC module is also provided, which includes:

[0141] Temperature detection module 11 is used to obtain the current temperature of the TEC module.

[0142] The processing module 12 is used to input the temperature difference between the current temperature and the preset target temperature into the proportional-integral-derivative PID controller to obtain a first adjustment coefficient. If the adjustment coefficient is greater than the preset adjustment threshold, the first adjustment coefficient is added to the integral part of the PID controller in the form of negative feedback to obtain a second adjustment coefficient.

[0143] The digital-to-analog converter 13 is used to generate a voltage signal corresponding to the second adjustment coefficient and to send the voltage signal to the operational amplifier.

[0144] Operational amplifier 14 is used to generate a current signal based on the voltage signal and to send the current signal to the TEC module.

[0145] like Figure 11 As shown in the embodiment of this application, a temperature control system based on a TEC module is also provided, the system including a temperature control device 100 and a TEC module 200.

[0146] In this application embodiment, a spectrometer is also provided, which includes a processor and a memory, the memory storing processor-executable instructions; when the processor is configured to execute the instructions, it enables the electronic device to implement a temperature control method based on a TEC module.

[0147] In one embodiment, a computing device is provided, including a memory and a processor. The computing device may be a terminal, and its internal structure diagram may be as follows: Figure 12 As shown, the computing device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a temperature control method based on a TEC module. The display screen can be an LCD screen or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the device's casing, or an external keyboard, touchpad, or mouse.

[0148] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A temperature control method based on a thermoelectric cooler (TEC) module, characterized in that, The method includes: Obtain the current temperature of the TEC module; The temperature difference between the current temperature and the preset target temperature is input into the proportional-integral-derivative PID controller to obtain the first adjustment coefficient. If the first adjustment coefficient is greater than the preset adjustment threshold, the first adjustment coefficient is added to the integral part of the PID controller in the form of negative feedback to obtain the second adjustment coefficient. A voltage signal corresponding to the second adjustment coefficient is generated by a digital-to-analog converter, and the voltage signal is sent to an operational amplifier; A constant current source circuit based on the operational amplifier generates a current signal and sends the current signal to the TEC module, adjusting the temperature of the TEC module based on the current signal.

2. The temperature control method according to claim 1, characterized in that, The step of adding the first adjustment coefficient to the integral term of the PID controller in the form of negative feedback to obtain the second adjustment coefficient includes: The first temperature integral value after integral gain in the integral stage is determined before the first adjustment coefficient is obtained. The first temperature integral value is reduced by the first adjustment coefficient to obtain the second temperature integral value after negative feedback. The second adjustment coefficient is determined based on the second temperature integral value.

3. The temperature control method according to claim 2, characterized in that, The step of reducing the first temperature integral value according to the first adjustment coefficient to obtain the second temperature integral value after negative feedback includes: The difference between the first adjustment coefficient and the adjustment threshold is determined, and an anti-saturation correction term for adjusting the first temperature integral value is determined based on the difference, wherein the anti-saturation correction term ranges from 0.1 to 1; The anti-saturation correction term is superimposed on the integral term in the form of negative feedback to obtain the second temperature integral value.

4. The temperature control method according to claim 1, characterized in that, The method further includes: If the relay feedback self-tuning module where the TEC module is located is in an oscillation state, adjust the initial temperature control parameters of the PID controller; The temperature of the TEC module is fuzzy controlled based on the adjusted initial temperature control parameters. According to the error feedback of the fuzzy control, the target temperature control parameters of the PID controller are obtained. The target control parameters include at least one of the target proportional parameter, target integral parameter, and target derivative parameter.

5. The temperature control method according to claim 4, characterized in that, The adjustment of the initial temperature control parameters of the PID controller includes: Obtain the critical parameters of the relay feedback self-tuning module, wherein the critical parameters include at least the oscillation period and the oscillation amplitude; The critical gain is determined based on the duty cycle and oscillation amplitude of the relay output signal, and an initial proportional parameter is determined based on the critical gain, wherein the initial proportional parameter is directly proportional to the critical gain. An initial integral parameter is determined based on the oscillation period, wherein the initial integral parameter is inversely proportional to the oscillation period; The initial differential parameter is determined based on the oscillation period, wherein the initial differential parameter is directly proportional to the oscillation period; The initial temperature control parameters are obtained based on the initial proportional parameter, the initial integral parameter, and the initial derivative parameter.

6. The temperature control method according to claim 4, characterized in that, The initial temperature control parameters include initial proportional parameters, initial integral parameters, and initial derivative parameters; The step of obtaining the target temperature control parameters of the PID controller based on the error feedback of the fuzzy control includes: The rate of temperature change is determined based on the temperature difference between the current temperature and the target temperature; The fuzzy control queries the proportional fuzzy value corresponding to the temperature change rate and the temperature difference according to the first fuzzy rule table, queries the integral fuzzy value corresponding to the temperature change rate and the temperature difference according to the second fuzzy rule table, and queries the differential fuzzy value corresponding to the temperature change rate and the temperature difference according to the third fuzzy rule table. The target proportional parameter is obtained by calculating the sum of the initial proportional parameter and the proportional fuzzy value using the PID controller; the target integral parameter is obtained by calculating the sum of the initial integral parameter and the integral fuzzy value using the PID controller; and the target differential parameter is obtained by calculating the sum of the initial differential parameter and the differential fuzzy value using the PID controller. The first fuzzy rule table includes at least the correspondence between the temperature change rate, the temperature difference, and the proportional fuzzy value; the second fuzzy rule table includes at least the correspondence between the temperature change rate, the temperature difference, and the integral fuzzy value; and the third fuzzy rule table includes at least the correspondence between the temperature change rate, the temperature difference, and the differential fuzzy value.

7. The temperature control method according to claim 1, characterized in that, The method further includes: If the first adjustment coefficient is not greater than the adjustment threshold, the digital-to-analog converter generates a voltage signal corresponding to the first adjustment coefficient, and the voltage signal is sent to the operational amplifier; A constant current source circuit based on the operational amplifier generates a current signal and sends the current signal to the TEC module, adjusting the temperature of the TEC module based on the current signal.

8. A temperature control device based on a thermoelectric cooler (TEC) module, characterized in that, include: A temperature detection module is used to obtain the current temperature of the TEC module; The processing module is used to input the temperature difference between the current temperature and the preset target temperature into the proportional-integral-derivative PID controller to obtain a first adjustment coefficient. If the adjustment coefficient is greater than the preset adjustment threshold, the first adjustment coefficient is added to the integral part of the PID controller in the form of negative feedback to obtain a second adjustment coefficient. A digital-to-analog converter is used to generate a voltage signal corresponding to the second adjustment coefficient and to send the voltage signal to an operational amplifier; An operational amplifier is used to generate a current signal based on the voltage signal and to send the current signal to the TEC module.

9. A temperature control system based on a thermoelectric cooler (TEC) module, characterized in that, The system includes a TEC module for adjusting the temperature based on the on / off state and direction of the current, and the system also includes the temperature control device as described in claim 8.

10. A spectrometer, characterized in that, The spectrometer includes a processor and a memory, the memory storing instructions executable by the processor; the processor is configured to execute the instructions such that the electronic device performs the method as described in any one of claims 1-7.