Thermostat PID control method, device, equipment and medium
By dynamically adjusting the PID parameter gain and calculating the heater power in conjunction with temperature deviation and rate of change acceleration, the nonlinearity and sudden thermal disturbance problems of the low-temperature thermostat are solved, achieving rapid convergence and high-precision steady-state control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TECHNICAL INST OF PHYSICS & CHEMISTRY - CHINESE ACAD OF SCI
- Filing Date
- 2026-02-13
- Publication Date
- 2026-05-08
AI Technical Summary
Low-temperature thermostats face challenges in high-precision control, including strong nonlinearity, system oscillations or hysteresis caused by fixed parameters of traditional PID controllers, and difficulties in quickly responding to sudden thermal disturbances due to the large computational load and limited resources of existing complex control schemes.
By acquiring the current and historical temperatures of the thermostat, the PID parameter gain is dynamically adjusted, and the heating power control quantity of the heater is calculated using temperature deviation, rate of change, and acceleration of change, thus realizing a variable gain strategy for rapid convergence and high-precision steady-state maintenance.
While ensuring system stability, the thermostat achieves rapid convergence and high-precision steady-state control, adapting to material nonlinear thermal property disturbances and sudden thermal load fluctuations in large time delay and large temperature span low temperature range.
Smart Images

Figure CN121995993A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control and constant temperature measurement and testing technology, and in particular to a PID control method, device, equipment and medium for a thermostat. Background Technology
[0002] A thermostat is a device that provides a constant temperature environment and is widely used in scientific research, industry, and other fields. Examples include low-temperature thermostats and high-temperature thermostats.
[0003] In cryogenic metrology and ultra-low temperature physics experiments, achieving high-precision temperature control is crucial. However, high-precision temperature control in low-temperature environments faces significant challenges: 1. Strong nonlinearity: The heat load of the cryogenic thermostat and the specific heat capacity of the materials (such as oxygen-free copper and stainless steel) exhibit a drastic nonlinear relationship with temperature changes. For example, the specific heat capacity of materials at extremely low temperatures typically follows a Debye curve. The law drops sharply, resulting in huge differences in the system's time constant and gain across different temperature zones.
[0004] 2. Limitations of traditional PID controllers: Traditional PID controllers typically use fixed parameters (gain). During a wide temperature variation process, if a set of parameters performs well in the high-temperature region, it may cause system oscillation due to excessive gain in the low-temperature region; conversely, it may lead to sluggish response.
[0005] 3. Complexity of existing solutions: Although existing control methods (such as fuzzy PID and neural network PID) can solve some problems, they usually involve large amounts of computation, rely on expert experience for rule bases, and are difficult to respond quickly to sudden thermal disturbances in resource-constrained embedded instruments or host computer loops with extremely high real-time requirements. Summary of the Invention
[0006] To address the problems existing in the prior art, the present invention provides a PID control method, device, equipment, and medium for a thermostat.
[0007] This invention provides a PID control method for a thermostat, comprising: Obtain the current temperature of the thermostat at the current acquisition time, as well as the temperature at the first number of historical acquisition times; Based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times, determine the temperature deviation information; Based on the temperature deviation information, determine the gain information at the current acquisition time; Based on the gain information and the temperature deviation information, the control amount of the heating power of the heater inside the thermostat is determined.
[0008] According to a PID control method for a thermostat provided by the present invention, determining temperature deviation information based on the current temperature at the time of acquisition and a first number of historical temperatures at the time of acquisition includes: Based on the current temperature at the time of acquisition, the temperature at the first number of historical acquisition times, and the set target temperature, the temperature deviation at each acquisition time is determined. Based on the temperature deviation at each acquisition time, determine the rate of change of temperature deviation and the acceleration of temperature deviation change; The temperature deviation, the rate of change of temperature deviation, and the acceleration of the change of temperature deviation at each acquisition time are used as temperature deviation information.
[0009] According to the PID control method for a thermostat provided by the present invention, determining the gain information at the current acquisition time based on the temperature deviation information includes: Based on the rate of change of temperature deviation and the acceleration of temperature deviation change, the proportional gain, integral gain, and derivative gain at the current acquisition time are determined.
[0010] According to the PID control method for a thermostat provided by the present invention, the proportional gain, integral gain, and derivative gain at the current acquisition time are determined based on the rate of change of temperature deviation and the acceleration of temperature deviation change, including: The optimal formula is derived based on the preset parameters, and the proportional gain, integral gain, and derivative gain at the current acquisition time are determined based on the temperature deviation change rate and the temperature deviation change acceleration. The preferred formula for parameter derivation includes: in, Basic parameters; This is the weighted adjustment coefficient; For normalized feature mapping functions, The rate of change of temperature deviation. This represents the acceleration due to temperature deviation.
[0011] According to the PID control method for a thermostat provided by the present invention, the current temperature at the time of acquisition and the temperature at a first number of historical acquisition times are respectively... , , ,in This is the current sampling time; Based on the current temperature at the time of data collection, the first number of historical temperature data collection times, and the set target temperature... Determine the temperature deviation at three sampling times. ; ; Based on the temperature deviation at three acquisition times, determine the rate of change of temperature deviation and the acceleration of temperature deviation change; ; ; The rate of change of temperature deviation. This represents the acceleration due to temperature deviation.
[0012] According to a PID control method for a thermostat provided by the present invention, determining the current control quantity of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information includes: Based on the gain information, the temperature deviation at the current acquisition time, the rate of change of temperature deviation, and the acceleration of temperature deviation change, the current output increment of the heating power of the heater inside the thermostat is determined. The current control value of the heating power of the heater inside the thermostat is determined based on the current output increment of the heating power of the heater inside the thermostat and the control value of the heating power of the heater inside the thermostat at the previous acquisition time.
[0013] According to the PID control method for a thermostat provided by the present invention, the method further includes: if the current control quantity exceeds the maximum power of the heater, then the current control quantity is the maximum power of the heater, and the calculation of gain information at the next acquisition time is stopped.
[0014] The present invention also provides a PID control device for a thermostat, comprising: The acquisition module is used to acquire the temperature of the thermostat at the current acquisition time and the temperature at a first number of historical acquisition times. The calculation module is used to determine temperature deviation information based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times; The gain module is used to determine the gain information at the current acquisition time based on the temperature deviation information. The adjustment module is used to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-described thermostat PID control methods.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described thermostat PID control methods.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described thermostat PID control methods.
[0018] This invention provides a PID control method, device, equipment, and medium for a thermostat. By acquiring a preset number of temperature data points at different times and determining the temperature deviation, the gain of the PID parameters is dynamically adjusted based on the temperature deviation. Then, based on the gain and the temperature deviation, the control quantity of the heating power of the heater inside the thermostat is determined to drive the heater inside the thermostat. This achieves rapid convergence and high-precision steady-state maintenance of the thermostat through a variable gain strategy while ensuring system stability. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the PID control method for a thermostat provided by the present invention.
[0021] Figure 2 This is a flowchart illustrating the PID control method for a thermostat based on temperature data collected at three different times, as provided by this invention.
[0022] Figure 3 This is a comparison chart of temperature and time curves for adaptive PID and fixed parameter PID provided by the present invention.
[0023] Figure 4 This is a schematic diagram of the PID control device for a thermostat provided by the present invention.
[0024] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] Figure 1 A flowchart illustrating a PID control method for a thermostat provided by this invention is shown below. Figure 1 The method includes the following steps: Step 11: Obtain the current temperature of the thermostat at the current acquisition time, and the temperature at the first number of historical acquisition times.
[0027] Step 12: Determine the temperature deviation information based on the current temperature at the time of data collection and the temperature at the first number of historical data collection times.
[0028] Step 13: Determine the gain information at the current acquisition time based on the temperature deviation information.
[0029] Step 14: Based on the gain information and temperature deviation information, determine the control amount of the heating power of the heater inside the thermostat.
[0030] Regarding steps 11 to 14, it should be noted that a thermostat is a device that provides a constant temperature environment and is widely used in scientific research, industry, and other fields. Examples include low-temperature thermostats and high-temperature thermostats.
[0031] In cryogenic metrology and ultra-low temperature physics experiments, achieving high-precision temperature control is crucial. However, high-precision temperature control in low-temperature environments faces significant challenges: 1. Strong nonlinearity: The heat load of the cryogenic thermostat and the specific heat capacity of the materials (such as oxygen-free copper and stainless steel) exhibit a drastic nonlinear relationship with temperature changes. For example, the specific heat capacity of materials at extremely low temperatures typically follows a Debye curve. The law drops sharply, resulting in huge differences in the system's time constant and gain across different temperature zones.
[0032] 2. Limitations of traditional PID controllers: Traditional PID controllers typically use fixed parameters (gain). During a wide temperature variation process, if a set of parameters performs well in the high-temperature region, it may cause system oscillation due to excessive gain in the low-temperature region; conversely, it may lead to sluggish response.
[0033] 3. Complexity of existing solutions: Although existing control methods (such as fuzzy PID and neural network PID) can solve some problems, they usually involve large amounts of computation, rely on expert experience for rule bases, and are difficult to respond quickly to sudden thermal disturbances in resource-constrained embedded instruments or host computer loops with extremely high real-time requirements.
[0034] In response, this invention provides a precision temperature control method applicable to large time delays, large temperature spans, and low temperature regions, capable of resisting nonlinear thermal property disturbances of materials and sudden thermal load fluctuations. It can calculate the optimal PID parameters in real time based on the temperature of a very small number of recent sampling moments, as the state changes of the controlled object are observed.
[0035] To address this, we start by utilizing the temperature from a very small number of recent sampling times to obtain the current temperature at the thermostat's sampling moment, as well as the temperature from a first set of historical sampling moments. For example, we obtain the temperatures at three sampling moments, respectively... , , ,in This represents the current sampling time.
[0036] In this invention, the thermostat has a defined target temperature, and the temperature acquired at each sampling moment is the real-time temperature. The two work together to achieve precise temperature control. Therefore, it is necessary to obtain the deviation between the real-time temperature and the target temperature. This is done by calculating the difference between the current sampling temperature and the temperature at a first number of historical sampling moments, and then subtracting the target temperature from each. This temperature deviation information includes the temperature deviation at each sampling moment. For example, by acquiring the temperatures at three sampling moments, the temperature deviation at those three sampling moments can be determined. ; ; The target temperature.
[0037] Then, based on the temperature deviation information, the gain information at the current acquisition time is determined. This means the gain information is dynamically adjusted in real time at the current acquisition time; different acquisition times will have different gain information. This gain information includes proportional gain, integral gain, and derivative gain.
[0038] In this invention, the focus is on regulating the heating power of the heater in the thermostat. To this end, it is necessary to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and temperature deviation information.
[0039] Then control the heating power of the heater inside the thermostat. Perform output limiting and anti-integral saturation processing: If Exceeding the heater's maximum power Then let And stop accumulating the integral. Finally, It is converted into an analog voltage or current signal to drive the heater inside the thermostat.
[0040] The thermostat PID control method provided by this invention acquires a preset number of temperature data collection times and determines the temperature deviation. Based on the temperature deviation, the gain of the PID parameters is dynamically adjusted. Then, based on the gain and the temperature deviation, the control quantity of the heating power of the heater inside the thermostat is determined to drive the heater inside the thermostat. This achieves rapid convergence and high-precision steady-state maintenance of the thermostat through a variable gain strategy while ensuring system stability.
[0041] A further step in the above method mainly involves explaining the process of determining the temperature deviation information between the current acquisition temperature and the first number of historical acquisition temperatures, as detailed below: Based on the temperature at the current acquisition time, the temperature at the first number of historical acquisition times, and the set target temperature, determine the temperature deviation at each acquisition time. Based on the temperature deviation at each acquisition time, determine the rate of change of temperature deviation and the acceleration of temperature deviation change; Temperature deviation, rate of change of temperature deviation, and acceleration of change of temperature deviation at each acquisition time are used as temperature deviation information.
[0042] It's important to clarify that the thermostat has a specific target temperature, while the temperature acquired at each sampling moment is the real-time temperature. The two work together to achieve precise temperature control. Therefore, it's necessary to obtain the deviation between the real-time temperature and the target temperature. This is done by subtracting the target temperature from the current sampling temperature and the temperature at a first set of historical sampling moments, respectively, to determine the temperature deviation. Based on the temperature deviation at each sampling moment, the rate of change and acceleration of the temperature deviation are determined. For example, if there are many sampling moments, the change curves can be analyzed based on multiple temperature deviations, and then the curves can be quantified to obtain the rate of change and acceleration. Alternatively, multiple rates of change can be calculated based on multiple temperature deviations, and then the average can be taken; correspondingly, the acceleration of the temperature deviation can also be averaged.
[0043] In a further embodiment, based on a set target temperature Calculate the temperature deviation at the three most recent times. : Using the discretization difference principle, the rate of change of temperature deviation (velocity characteristic) is derived. And the acceleration of temperature deviation change (curvature characteristics) : First-order difference (velocity): Second-order difference (acceleration / curvature): .
[0044] In this invention, all data related to temperature deviation obtained are collectively referred to as temperature deviation information, which is convenient for flexible use when needed in the future.
[0045] In a further step of the above method, the process of determining the gain information at the current acquisition time based on temperature deviation information is explained as follows: Based on the rate of change of temperature deviation and the acceleration of temperature deviation change, determine the proportional gain, integral gain, and derivative gain at the current acquisition time.
[0046] It should be noted that this invention dynamically adjusts the gain information at different acquisition times, that is, it utilizes temperature deviation information to construct a nonlinear mapping function for the PID parameters. Its core control strategy is as follows: proportional gain When the rate of change of temperature deviation When the value is large, dynamic adjustment is required. Especially when and When the signs are the same (the deviation is diverging), it increases significantly. To provide strong resilience; when approaching the target value, reduce appropriately. Prevent overshoot.
[0047] Integral gain When the system is under drastic change (temperature deviation change acceleration) When the temperature deviation is large, the integral action should be temporarily reduced to prevent integral saturation and overshoot. When the system is stable (the acceleration of temperature deviation change is small), the integral action should be restored to eliminate the steady-state error.
[0048] Differential gain Utilizing temperature deviation changes The inflection point of the temperature sensing curve. When the curvature is large (approaching a peak or trough), the effect is significantly enhanced. Its function is to introduce strong damping to suppress oscillations.
[0049] Therefore, based on the preset parameters, the optimal formula is derived, and the proportional gain, integral gain, and derivative gain at the current acquisition time are determined according to the temperature deviation change rate and the temperature deviation change acceleration. The optimal formula for parameter derivation includes: in, Basic parameters; This is the weighted adjustment coefficient; For normalized feature mapping functions, The rate of change of temperature deviation. This represents the acceleration due to temperature deviation.
[0050] A further step in the above method mainly explains the process of determining the current control quantity of the heating power of the heater inside the thermostat based on gain information and temperature deviation information, as follows: Based on the gain information, the temperature deviation at the current acquisition time, the rate of change of temperature deviation, and the acceleration of temperature deviation change, the current output increment of the heating power of the heater inside the thermostat is determined. The current control quantity of the heating power of the heater inside the thermostat is determined based on the current output increment of the heating power of the heater inside the thermostat and the control quantity at the previous acquisition time of the heating power of the heater inside the thermostat.
[0051] It should be noted that the derived dynamic parameters... The incremental PID algorithm is used to calculate the output increment of heating power. : Calculate the final control quantity .
[0052] In a further step of the above method, it should be noted that the temperature data of the low-temperature thermostat is collected in real time using a host computer or embedded controller through a high-precision temperature measuring instrument.
[0053] To eliminate the electronic noise and quantization error of the sensor itself, the collected data is first preprocessed, such as by weighted moving average filtering.
[0054] To facilitate automatic system control, a first-in-first-out (FIFO) sliding data window of length n is established to store the temperatures at the most recent n acquisition times (including the temperature at the current acquisition time). For example, storing three pre-processed temperature values at different sampling times would be denoted as: , , ,in This represents the current sampling time.
[0055] As the sampling time progresses, the latest temperature Enter the window and squeeze out the oldest Repeat the above steps to update the control strategy point by point and execute the method of the present invention.
[0056] See Figure 2 A flowchart illustrating a method for implementing PID control of a thermostat by collecting temperatures at three different times is shown.
[0057] The host computer reads the temperature data from a high-precision low-temperature thermometer (such as a Lakeshore 336 or 370 AC resistance bridge) via the GPIB / USB bus (the sensor is a Cernox or standard resistance thermometer), and the sampling frequency is set to 10Hz; the host computer controls the programmable DC power supply to drive the heating wire through analog voltage output.
[0058] Initial configuration: Set target temperature Setting basic PID parameters Set weighting coefficients Dynamic operation process: Sampling and Window Update: Moments The data in the sliding window is updated to (Unit: K).
[0059] Feature calculation: Current deviation .
[0060] Historical bias .
[0061] Speed Item (A negative value indicates that the error is decreasing rapidly and the temperature is approaching the set value.)
[0062] acceleration term (Negative values indicate a deceleration trend, and the curve begins to flatten.)
[0063] Parameter calculation: due to The algorithm indicates that the target is rapidly approaching, but there is a risk of overshoot.
[0064] Adjustment: Utilize larger The effect of the coefficient amplification of the acceleration term is calculated. Adjustment: Reduce appropriately To reduce the driving force.
[0065] Output execution: Substitute into the incremental formula for calculation The amplitude is limited and then output to the power supply.
[0066] like Figure 3 As shown, during the temperature rise from 4.2K to 10K, traditional PID controllers typically experience an overshoot of around 0.5K when reaching 10K. However, using the method of this invention, the system automatically enhances damping around 9.9K, smoothly approaching 10.000K with no significant overshoot, and the steady-state fluctuation is superior. .
[0067] The thermostat PID control method provided by this invention acquires a preset number of temperature data collection times and determines the temperature deviation. Based on the temperature deviation, the gain of the PID parameters is dynamically adjusted. Then, based on the gain and the temperature deviation, the control quantity of the heating power of the heater inside the thermostat is determined to drive the heater inside the thermostat. This achieves rapid convergence and high-precision steady-state maintenance of the thermostat through a variable gain strategy while ensuring system stability.
[0068] The thermostat PID control device provided by the present invention is described below. The thermostat PID control device described below and the thermostat PID control method described above can be referred to in correspondence.
[0069] Figure 4 A schematic diagram of the structure of a thermostat PID control device provided by the present invention is shown below. Figure 4 The device includes an acquisition module 41, a calculation module 42, a gain module 43, and an adjustment module 44, wherein: The acquisition module is used to acquire the temperature of the thermostat at the current acquisition time and the temperature at a first number of historical acquisition times. The calculation module is used to determine the temperature deviation information based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times. The gain module is used to determine the gain information at the current acquisition time based on the temperature deviation information. The adjustment module is used to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and temperature deviation information.
[0070] Since the apparatus of this embodiment is based on the same principle as the method of the above embodiment, more detailed explanations will not be repeated here.
[0071] It should be noted that, in the embodiments of the present invention, the relevant functional modules can be implemented by a hardware processor.
[0072] The thermostat PID control device provided by this invention acquires a preset number of temperature data collection times and determines the temperature deviation. It then dynamically adjusts the PID parameter gain based on the temperature deviation and determines the control quantity of the heating power of the heater inside the thermostat based on the gain and the temperature deviation. This drives the heater inside the thermostat, thereby achieving rapid convergence and high-precision steady-state maintenance of the thermostat through a variable gain strategy while ensuring system stability.
[0073] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 51, a communication interface 52, a memory 53, and a communication bus 54, wherein the processor 51, the communication interface 52, and the memory 53 communicate with each other via the communication bus 54. The processor 51 can call logic instructions in the memory 53 to execute a thermostat PID control method, which includes: Obtain the current temperature of the thermostat at the current acquisition time, as well as the temperature at the first number of historical acquisition times; The calculation module is used to determine temperature deviation information based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times; The gain module is used to determine the gain information at the current acquisition time based on the temperature deviation information. The adjustment module is used to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information.
[0074] Furthermore, the logical instructions in the aforementioned memory 53 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing a thermostat PID control method, the method comprising: Obtain the current temperature of the thermostat at the current acquisition time, as well as the temperature at the first number of historical acquisition times; The calculation module is used to determine temperature deviation information based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times; The gain module is used to determine the gain information at the current acquisition time based on the temperature deviation information. The adjustment module is used to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information.
[0076] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform a thermostat PID control method, the method comprising: Obtain the current temperature of the thermostat at the current acquisition time, as well as the temperature at the first number of historical acquisition times; The calculation module is used to determine temperature deviation information based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times; The gain module is used to determine the gain information at the current acquisition time based on the temperature deviation information. The adjustment module is used to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information.
[0077] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0078] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A PID control method for a thermostat, characterized in that, include: Obtain the current temperature of the thermostat at the current acquisition time, as well as the temperature at the first number of historical acquisition times; Based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times, determine the temperature deviation information; Based on the temperature deviation information, determine the gain information at the current acquisition time; Based on the gain information and the temperature deviation information, the control amount of the heating power of the heater inside the thermostat is determined.
2. The thermostat PID control method according to claim 1, characterized in that, The step of determining temperature deviation information based on the current temperature at the time of data collection and the temperature at a first number of historical data collection times includes: Based on the current temperature at the time of acquisition, the temperature at the first number of historical acquisition times, and the set target temperature, the temperature deviation at each acquisition time is determined. Based on the temperature deviation at each acquisition time, determine the rate of change of temperature deviation and the acceleration of temperature deviation change; The temperature deviation, the rate of change of temperature deviation, and the acceleration of the change of temperature deviation at each acquisition time are used as temperature deviation information.
3. The thermostat PID control method according to claim 2, characterized in that, The step of determining the gain information at the current acquisition time based on the temperature deviation information includes: Based on the rate of change of temperature deviation and the acceleration of temperature deviation change, the proportional gain, integral gain, and derivative gain at the current acquisition time are determined.
4. The thermostat PID control method according to claim 3, characterized in that, Based on the rate of change of temperature deviation and the acceleration of temperature deviation change, determine the proportional gain, integral gain, and derivative gain at the current acquisition moment, including: The optimal formula is derived based on the preset parameters, and the proportional gain, integral gain, and derivative gain at the current acquisition time are determined based on the temperature deviation change rate and the temperature deviation change acceleration. The preferred formula for parameter derivation includes: in, Basic parameters; This is the weighted adjustment coefficient; For normalized feature mapping functions, The rate of change of temperature deviation. This represents the acceleration due to temperature deviation.
5. The thermostat PID control method according to claim 3 or 4, characterized in that, The temperature at the current acquisition time and the temperature at the first historical acquisition time are respectively , , ,in This is the current sampling time; Based on the current temperature at the time of data collection, the first number of historical temperature data collection times, and the set target temperature... Determine the temperature deviation at three sampling times. ; ; Based on the temperature deviation at three acquisition times, determine the rate of change of temperature deviation and the acceleration of temperature deviation change; ; ; The rate of change of temperature deviation. This represents the acceleration due to temperature deviation.
6. The thermostat PID control method according to claim 1, characterized in that, The step of determining the current control value of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information includes: Based on the gain information, the temperature deviation at the current acquisition time, the rate of change of temperature deviation, and the acceleration of temperature deviation change, the current output increment of the heating power of the heater inside the thermostat is determined. The current control value of the heating power of the heater inside the thermostat is determined based on the current output increment of the heating power of the heater inside the thermostat and the control value of the heating power of the heater inside the thermostat at the previous acquisition time.
7. The thermostat PID control method according to claim 1, characterized in that, The method further includes: if the current control quantity exceeds the maximum power of the heater, then the current control quantity is the maximum power of the heater, and the calculation of gain information at the next acquisition moment is stopped.
8. A PID control device for a thermostat, characterized in that, include: The acquisition module is used to acquire the temperature of the thermostat at the current acquisition time and the temperature at a first number of historical acquisition times. The calculation module is used to determine temperature deviation information based on the temperature at the current acquisition time and the temperature at a first number of historical acquisition times; The gain module is used to determine the gain information at the current acquisition time based on the temperature deviation information. The adjustment module is used to determine the control amount of the heating power of the heater inside the thermostat based on the gain information and the temperature deviation information.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the thermostat PID control method as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the thermostat PID control method as described in any one of claims 1-7.
Citation Information
Cited By
Temperature control method, electronic device, and storage medium
CN122308512A