A temperature control method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202411660598.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2044-11-19
AI Technical Summary
[0004]本申请提供一种温度控制方法、装置、电子设备及存储介质,解决了相关技术中通过神经网络模型进行温度调节的方式,需要依赖大量的训练数据和计算资源,不能适配当下多场景的温度控制过程的技术问题
[0010] The temperature control method, apparatus, electronic device, and storage medium provided in this application allow the electronic device to acquire a digital signal characterizing the current temperature of a target device and generate control commands based on a PID control algorithm and the digital signal. Subsequently, the electronic device can generate a PWM signal based on the control commands and adjust the current temperature of the target device to a target temperature based on the PWM signal. Since the control commands include the temperature parameters to be adjusted, the electronic device can precisely regulate the temperature of the target device. Furthermore, because PWM technology enables precise adjustment during the temperature regulation process, unnecessary frequent starts of the electronic device are avoided, improving its stability.
Smart Images

Figure CN119536422B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automation control technology, and in particular to a temperature control method, device, electronic device and storage medium. Background Technology
[0002] Currently, for a specific server rack, its temperature can be predicted and adjusted using a neural network model. Specifically, a neural network model is a computational model that simulates the operation of neurons in the human brain, capable of adapting to the environment and learning to optimize the temperature regulation process.
[0003] However, the above method, which uses a neural network model for temperature regulation, relies on a large amount of training data and computing resources, and cannot be adapted to the current temperature control process in various scenarios. Summary of the Invention
[0004] This application provides a temperature control method, device, electronic device, and storage medium, which solves the technical problem that the temperature regulation method using neural network models in related technologies requires a large amount of training data and computing resources and cannot be adapted to the current temperature control process in multiple scenarios.
[0005] In a first aspect, this application provides a temperature control method, comprising: acquiring a digital signal, the digital signal being used to characterize the current temperature of a target device; generating a control command based on a PID control algorithm and the digital signal; generating a PWM signal based on the control command; and adjusting the current temperature of the target device to a target temperature based on the PWM signal.
[0006] Secondly, this application provides a temperature control device, comprising: an acquisition module and a processing module; the acquisition module is used to acquire a digital signal, the digital signal being used to characterize the current temperature of a target device; the processing module is used to generate a control command based on a proportional-integral-derivative (PID) control algorithm and the digital signal; the processing module is further used to generate a pulse width modulation (PWM) signal based on the control command; the processing module is further used to adjust the current temperature of the target device to a target temperature based on the PWM signal.
[0007] Thirdly, this application provides an electronic device, including: a processor and a memory configured to store processor-executable instructions; wherein the processor is configured to execute the instructions to implement any of the optional temperature control methods in the first aspect described above.
[0008] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed by an electronic device, enable the electronic device to perform any of the optional temperature control methods described in the first aspect.
[0009] Fifthly, this application provides a computer program product, including a computer program or instructions that, when executed on an electronic device, cause the electronic device to perform any of the optional temperature control methods described in the first aspect above.
[0010] The temperature control method, apparatus, electronic device, and storage medium provided in this application allow the electronic device to acquire a digital signal characterizing the current temperature of a target device and generate control commands based on a PID control algorithm and the digital signal. Subsequently, the electronic device can generate a PWM signal based on the control commands and adjust the current temperature of the target device to a target temperature based on the PWM signal. Since the control commands include the temperature parameters to be adjusted, the electronic device can precisely regulate the temperature of the target device. Furthermore, because PWM technology enables precise adjustment during the temperature regulation process, unnecessary frequent starts of the electronic device are avoided, improving its stability. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0012] Figure 1 A schematic flowchart of a temperature control method provided in an embodiment of this application;
[0013] Figure 2 A schematic flowchart illustrating another temperature control method provided in an embodiment of this application;
[0014] Figure 3 A schematic flowchart illustrating another temperature control method provided in an embodiment of this application;
[0015] Figure 4 A schematic flowchart illustrating another temperature control method provided in an embodiment of this application;
[0016] Figure 5 This is a schematic diagram of the internal structure of an electronic device provided in an embodiment of this application;
[0017] Figure 6 This is a schematic diagram of the structure of a temperature control device provided in an embodiment of this application;
[0018] Figure 7 This is a schematic diagram of another temperature control device provided in an embodiment of this application. Detailed Implementation
[0019] The temperature control method, apparatus, electronic device, and storage medium provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0020] Furthermore, the terms “comprising” and “having”, and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.
[0021] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0022] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0023] The following explains some concepts involved in a temperature control method, apparatus, electronic device, and storage medium provided in the embodiments of this application.
[0024] The Proportional Integral Derivative (PID) control algorithm is a control algorithm that combines proportional (P), integral (I), and derivative (D) components into one. It is widely used in industrial control systems due to its simple principle, ease of implementation, and wide applicability. The PID control algorithm controls the controlled variable through the error signal. Its basic principle is to perform calculations based on the input deviation value according to the proportional, integral, and derivative functional relationships, and the result is used to control the output. Specifically, the proportional (P) component directly adjusts the control quantity proportionally to the magnitude of the error, reducing the error. The integral (I) component accumulates the error, eliminating static error, but may slow down the system response. The derivative (D) component adjusts in advance based on the rate of change of the error, accelerating the system response speed and reducing overshoot and oscillation.
[0025] Finite impulse response (FIR) filtering is one of the most commonly used filtering algorithms in digital signal processing. FIR filters (also known as non-recursive filters) are fundamental components of signal processing systems, characterized by linear phase, ease of implementation, good stability, and flexible design. Their design is typically based on the window function method or the least squares method. The window function method is mainly used for designing low-pass and band-pass filters, while the least squares method is suitable for designing band-stop filters.
[0026] A metal-oxide-semiconductor field-effect transistor (MOSFET), also known as a MOS module or MOS transistor, is a widely used semiconductor device in modern electronic circuits. MOS modules play a crucial role in chips, typically used in amplifier and switching circuits. Their operation is based on the electric field effect, controlling the current between the source and drain by applying a voltage to the gate.
[0027] Pulse width modulation (PWM) is a technique that uses the digital output of a microprocessor to control analog circuits. PWM encodes the level of an analog signal by adjusting the pulse width (duty cycle), thereby controlling the voltage or current in the circuit. PWM technology is widely used in various electronic devices, especially in motor control, light-emitting diode (LED) brightness adjustment, and communication systems.
[0028] Currently, traditional temperature control systems rely solely on simple on / off control logic, which may not be able to achieve precise temperature regulation, leading to significant temperature fluctuations and failing to meet the needs of some temperature-sensitive applications. Specifically, when ambient temperature changes rapidly, traditional temperature control systems may exhibit lag, failing to adjust the operating status of heating or cooling devices in a timely manner, resulting in unstable temperature control. Furthermore, the lack of intelligence in traditional temperature control systems may prevent them from effectively managing energy, causing heating or cooling devices to operate unnecessarily, thus increasing energy consumption. In addition, frequent full-power starts and stops can accelerate wear and tear on heating or cooling devices, shortening the lifespan of related devices / equipment.
[0029] In some embodiments, the temperature of the server rack can be adjusted based on fuzzy logic algorithms. Specifically, fuzzy logic algorithms can simulate human thought processes to make decisions about complex systems. While fuzzy logic algorithms can handle uncertain information, a drawback is the need for a large amount of fuzzy rules and training data.
[0030] In other embodiments, the temperature of the cabinet can be predicted and adjusted using a neural network model. Specifically, a neural network model is a computational model that simulates the operation of neurons in the human brain, capable of adapting to the environment and learning to optimize the temperature regulation process. However, temperature regulation using a neural network model requires a large amount of training data and computational resources, making it unsuitable for various current temperature control scenarios.
[0031] Based on this, embodiments of this application provide a temperature control method, apparatus, electronic device, and storage medium. Since the control command includes the temperature parameters to be adjusted, the electronic device can precisely regulate the temperature of the target device. Furthermore, because PWM technology enables precise adjustment during the temperature regulation process, unnecessary frequent starts of the electronic device are avoided, thus improving the stability of the electronic device.
[0032] For example, the electronic device executing the temperature control method provided in this application embodiment can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device. This application embodiment does not impose special limitations on the specific form of the electronic device. It can interact with the user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device.
[0033] Optionally, the aforementioned electronic device may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, as well as big data and artificial intelligence platforms.
[0034] like Figure 1 As shown, the temperature control method provided in this application embodiment may include S101-S104.
[0035] S101, Acquire digital signal.
[0036] The digital signal is used to characterize the current temperature of the target device.
[0037] For example, the target equipment mentioned above can be a cabinet or a temperature-controlled cabinet, etc.
[0038] In one alternative implementation, the electronic device can acquire an initial electrical signal characterizing the current temperature of the target device and perform conversion processing on the initial electrical signal to obtain the aforementioned digital signal.
[0039] S102 generates control commands based on PID control algorithm and digital signals.
[0040] Specifically, electronic devices can determine the temperature parameters that need to be adjusted based on control algorithms and digital signals, thereby generating the aforementioned control commands.
[0041] Optionally, the control command may include the temperature parameter that needs to be adjusted, specifically the temperature that needs to be adjusted.
[0042] In this embodiment, the control command generated by the electronic device is a control signal calculated based on a PID control algorithm, which can also be understood as a total output signal. This total output signal (or control command) is used to indicate the degree of temperature regulation of the target device.
[0043] S103, Generate PWM signal based on control command.
[0044] It should be understood that electronic devices may include MOS modules (or MOS transistors). After generating control commands, the electronic device can use PWM technology to convert the aforementioned digital signals into control signals (i.e., PWM signals) suitable for the MOS modules.
[0045] S104. Adjust the current temperature of the target device to the target temperature based on the PWM signal.
[0046] It should be understood that the aforementioned MOS module may include a gate module. Specifically, the aforementioned PWM signal is transmitted to the gate module (or the gate of the MOS transistor). When the voltage of the gate module exceeds the voltage threshold, the MOS module will conduct, allowing current to flow from the source to the drain. By changing the voltage of the gate module or the duty cycle of the PWM signal, the conduction level of the MOS transistor is adjusted, thereby controlling the current flowing through the MOS transistor.
[0047] Furthermore, with the MOS module turned on, the temperature regulation process begins. Specifically, during the heating phase of the temperature regulation process, current flows through the heating element to generate heat; during the cooling phase, current drives a fan or other cooling equipment. By adjusting the on-time and conduction level of the MOS module, the power output of the temperature regulation process can be controlled to achieve the desired temperature regulation effect, that is, to adjust the current temperature of the target device to the target temperature.
[0048] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S101-S104, the electronic device can acquire a digital signal characterizing the current temperature of the target device, and generate a control command based on the PID control algorithm and the digital signal. Then, the electronic device can generate a PWM signal based on the control command and adjust the current temperature of the target device to the target temperature based on the PWM signal. Since the control command includes the temperature parameters that need to be adjusted, the electronic device can accurately regulate the temperature of the target device. Furthermore, since precise adjustment during the temperature regulation process can be achieved through PWM technology, unnecessary frequent starts of the electronic device are avoided, improving the stability of the electronic device.
[0049] Combination Figure 1 ,like Figure 2 As shown. The acquisition of digital signals described above specifically includes S1011-S1013.
[0050] S1011. Obtain the initial electrical signal characterizing the current temperature.
[0051] Specifically, the electronic device can acquire (or detect) the current temperature of the target device and convert the temperature signal into the aforementioned initial electrical signal through a thermistor.
[0052] Optionally, the temperature signal mentioned above includes resistance, voltage, current, and frequency.
[0053] S1012. Filter the initial electrical signal to obtain the target electrical signal.
[0054] It should be understood that the process by which an electronic device obtains the target electrical signal can also be understood as signal conditioning of the initial electrical signal, such as filtering to remove noise and amplifying the signal to bring it to the optimal input range of the analog-to-digital converter.
[0055] In this embodiment of the application, the above-mentioned electrical signals (including the initial electrical signal and the target electrical signal) can be analog electrical signals.
[0056] Optionally, the electronic device can filter the initial electrical signal using a preset filtering algorithm.
[0057] For example, the preset filtering algorithm mentioned above is the FIR filtering algorithm.
[0058] S1013. Perform conversion and quantization processing on the target electrical signal to obtain a digital signal.
[0059] Specifically, electronic devices can quantize target electrical signals to obtain a series of digital values. Furthermore, electronic devices can use analog-to-digital converters to convert continuous target electrical signals into discrete digital signals.
[0060] It should be understood that during the process of converting a target electrical signal into a digital signal by an electronic device (specifically an analog-to-digital converter), the sampled analog voltage is quantized, mapping it to a finite set of digital values. Furthermore, the quantization process involves determining the resolution (i.e., the number of bits); the higher the resolution, the closer the converted digital signal is to the target electrical signal. These quantized values are then encoded into binary form to facilitate subsequent digital signal processing.
[0061] In one implementation of this application, the filtering of the initial electrical signal to obtain the target electrical signal may specifically include steps A-B.
[0062] Step A: Obtain the quantized initial electrical signal, the wavelength of the filter used to filter the initial electrical signal, the filter index, the quantization compensation coefficient, and the phase compensation coefficient.
[0063] The quantization compensation coefficient is used to compensate for errors in the quantization process, and the phase compensation coefficient is used to compensate for the phase delay of the filter.
[0064] Step B: Based on the quantized initial electrical signal, the wavelength of the filter, the index of the filter, the quantization compensation coefficient, and the phase compensation coefficient, the target electrical signal is obtained.
[0065] It should be understood that in digital signal processing, the initial electrical signal is affected by quantization errors after digital-to-analog conversion. Quantization error refers to the error caused by rounding the electrical signal to the nearest representable value during the quantization process. Adding quantization compensation coefficients can compensate for these errors during filtering, thereby improving signal fidelity. Phase compensation coefficients can be used to adjust the additional phase delay introduced by the filter, ensuring that the initial electrical signal maintains its original phase relationship after filtering. By using quantization compensation coefficients and phase compensation coefficients, the accuracy of signal processing and the reliability of electronic equipment can be improved.
[0066] In one alternative implementation, the target electrical signal can satisfy the following formula:
[0067]
[0068] Where y[t] represents the target electrical signal, t represents the current time, k represents the index of the k-th coefficient of the filter, b[k] represents the k-th coefficient of the filter, α represents the quantization compensation coefficient, and x q Let α represent the quantized initial electrical signal, λ represent the phase compensation coefficient, N represent the wavelength of the filter, and [t-(k+λ)] represent the time delay equivalent to the current moment. 0.95≤α≤1.05, 1≤k≤N, where k and N are positive integers.
[0069] The phase compensation coefficients mentioned above satisfy the following formula:
[0070]
[0071] Specifically, λ represents the phase compensation coefficient, N represents the wavelength of the filter (i.e. the number of taps in the filter), and N is a positive integer.
[0072] In another alternative implementation, the target electrical signal can also satisfy the following formula:
[0073]
[0074] Where y[t] represents the target electrical signal, t represents the current time, k represents the index of the k-th coefficient of the filter, b[k] represents the k-th coefficient of the filter, and x q This represents the initial electrical signal after quantization, where N represents the wavelength of the filter, 1≤k≤N, and k and N are positive integers.
[0075] Combination Figure 1 ,like Figure 3 As shown. The above-mentioned control commands are generated based on the PID control algorithm and digital signals, specifically including S1021-S1023.
[0076] S1021. Determine the proportional gain of the digital signal, the integral gain of the digital signal, the differential gain of the digital signal, the feedforward control term for the target temperature, and the compensation term for the target temperature.
[0077] The proportional gain is used to characterize the error of the digital signal at the current moment, the integral gain is used to characterize the accumulated error of the digital signal from the initial moment to the current moment, the derivative gain is used to characterize the error change trend of the digital signal at the current moment, the feedforward control term is used to characterize the change of the target temperature over time, and the compensation term is used to compensate for the influence of the target device's internal environment on the target temperature. The proportional gain, integral gain, and derivative gain are the gain coefficients of the PID control algorithm.
[0078] It should be understood that the integral part (i.e., integral gain) of a PID controller can eliminate static errors, ensuring that the target device remains near the desired target value (i.e., target temperature) even after long-term operation. The derivative part (i.e., derivative gain) helps to anticipate deviation trends and react in advance, preventing overshoot and oscillation, thus contributing to the stability of the electronic equipment. Furthermore, the derivative part (or derivative term) can anticipate changes in the behavior of the electronic equipment and adjust the output signal in advance, thereby accelerating the response speed of the electronic equipment and reducing overshoot.
[0079] In one optional implementation, the aforementioned compensation includes at least one of capacitance compensation, resistance compensation, and friction compensation. The capacitance compensation compensates for the effect of the target device's capacitance on the target temperature, the resistance compensation compensates for the effect of the target device's resistance on the target temperature, and the friction compensation compensates for the effect of the target device's internal friction on the target temperature.
[0080] S1022. Determine the temperature difference between the current temperature and the target temperature based on the digital signal.
[0081] Specifically, electronic devices can determine the current temperature of the target device based on digital signals, thereby determining the temperature difference between the current temperature and the target temperature.
[0082] Understandably, electronic devices (specifically PID controllers) can quickly adjust their output based on the deviation (i.e., the temperature difference between the current temperature and the target temperature), thereby responding quickly to changes in the deviation and enabling the target device to approach the target value more rapidly.
[0083] S1023. Based on the proportional gain, integral gain, derivative gain, feedforward control term, compensation term, and temperature difference, generate control commands.
[0084] It should be understood that when the target temperature changes frequently, the PID controller needs to be able to respond quickly to these changes. By adjusting the gain coefficient of the PID control algorithm, especially the derivative gain, the controller's response speed to rapid changes can be improved. Integral gain helps reduce steady-state error; even when the target temperature changes frequently, the output can be gradually adjusted by accumulating error to ensure that the new target temperature is eventually reached. When the target device moves far from the setpoint, the integral gain may accumulate a large amount of error, leading to so-called "integral saturation."
[0085] Furthermore, higher capacitance leads to greater energy loss during switching, affecting the energy efficiency of the target device. Increased capacitance also prolongs the charging and discharging time of the circuit, resulting in a slower response speed and impacting the timeliness of temperature control. Resistance causes energy loss as heat, which is particularly important in temperature control as it can generate additional heat, affecting the temperature control accuracy of the target device. Changes in resistance affect the accuracy of current control, indirectly impacting power output during temperature regulation and ultimately affecting temperature control precision. Additionally, internal friction within the target device leads to energy loss between mechanical components, increasing power consumption and generating additional heat, further affecting temperature control.
[0086] Considering the frequent changes in target temperature, the cumulative integral gain, and the effects of changes in the target device's capacitance, resistance, and friction over time on the target temperature, the total output signal (i.e., the control command) can satisfy the following formula:
[0087]
[0088] Where u(t) represents the total output signal, t represents the current time, τ represents any time within the time interval from the initial time to the current time, and e(τ) represents the error of the control signal at that any time. K p K represents the proportional gain, which directly affects the error of the control signal at the current moment; i K represents the integral gain, used to accumulate the error of the control signal from the initial time to the current time; d The differential gain is used to predict the error trend of the control signal at the current moment. e(t) represents the temperature difference between the current temperature and the target temperature, and F(t) represents the feedforward control term, used to characterize the change of the target temperature over time and adjust the output signal in advance. C comp (t) represents the compensation term, which is used to compensate for the influence of the target equipment's internal components on the target temperature.
[0089] In addition, the above and represent the maximum value and minimum value of the current, respectively.
[0090] In one optional implementation, the compensation term includes capacitance compensation, resistance compensation, and friction compensation. That is, the compensation term can satisfy the following formula:
[0091]
[0092] Among them, C comp (t) represents the above compensation term, K C This represents the capacitance compensation coefficient, C(t) represents the capacitance value of the target device at the current moment, C0 represents the standard capacitance, and K... R R(t) represents the resistance compensation coefficient, R0 represents the resistance value of the target device at the current moment, and K represents the standard resistance. μ Let μ(t) represent the friction compensation coefficient, μ(t) represent the internal friction force of the target device at the current moment, and μ0 represent the standard friction force. 0.5 ≤ K C ≤1.5, 0.5≤K R ≤1.5, 0.5≤K μ ≤2.
[0093] Optionally, the above feedforward control term can satisfy the following formula:
[0094]
[0095] Where F(t) represents the feedforward control term, K F T represents the feedforward gain coefficient. ta Indicates the target temperature. This represents the rate of change of the target temperature over time, 0 ≤ K. F ≤2.
[0096] In another implementation of this application, the total output signal can also satisfy the following formula:
[0097]
[0098] Where u(t) represents the total output signal, t represents the current time, τ represents any time within the time interval from the initial time to the current time, and e(τ) represents the error of the control signal at that any time. K p K represents the proportional gain, which directly affects the error of the control signal at the current moment; i K represents the integral gain, used to accumulate the error of the control signal from the initial time to the current time; d The differential gain is used to predict the error change trend of the control signal at the current moment; e(t) represents the temperature difference between the current temperature and the target temperature.
[0099] In this embodiment, the electronic device employs a PID control algorithm, combining the effects of proportional gain, integral gain, and derivative gain, to accurately adjust temperature deviations and react quickly even to frequent changes in the target temperature. Furthermore, by incorporating feedforward control and compensation terms, the device fully considers the changes in target temperature over time and the variations in internal device parameters (including capacitance, resistance, and friction), making the electronic device more stable and reliable. This enables precise temperature control of the target device, improving its response speed and control accuracy.
[0100] Combination Figure 1 ,like Figure 4 As shown. In one implementation of this application embodiment, the control command includes a target power. The generation of the PWM signal based on the control command specifically includes steps S1031-S1033.
[0101] S1031. Obtain the maximum power during the temperature regulation process of the target device.
[0102] In this embodiment, the target power can also be understood as power adjustment information during temperature regulation. Maximum power can be understood as the power level specified by the electronic device.
[0103] It should be understood that electronic devices need to set the basic parameters of the PWM controller before obtaining the aforementioned maximum power. These basic parameters include frequency and resolution. The frequency determines the period of the PWM signal, and the resolution determines how many different duty cycles are included in each period.
[0104] S1032. Determine the target duty cycle based on the maximum power and the target power.
[0105] The target duty cycle is used to characterize the proportion of the PWM signal's on-time within one pulse cycle to the total time.
[0106] It should be understood that the duty cycle of a PWM signal can also be used to characterize the proportion of a high level in a PWM signal within one cycle.
[0107] Optionally, the target duty cycle described above can satisfy the following formula:
[0108]
[0109] Where DC represents the target duty cycle, and T p M represents the target power mentioned above. p This indicates the maximum power mentioned above.
[0110] S1033. Generate a PWM signal based on the target duty cycle.
[0111] Based on the description of the above embodiments, it should be understood that after the electronic device generates a PWM signal, the PWM signal can be applied to the gate module to control the conduction level and conduction time of the MOS module. By changing the duty cycle of the PWM signal, the conduction time and conduction level of the MOS module are adjusted to control the power output during the temperature regulation process.
[0112] In this embodiment, PWM technology allows for efficient energy conversion because the MOSFET is either fully on or fully off during each cycle of the PWM signal, reducing losses in intermediate states and improving efficiency. By changing the duty cycle of the PWM signal (i.e., the ratio of the high-level duration to the entire cycle time), electronic devices can very precisely control the output power during temperature regulation, which is extremely useful for processes requiring fine temperature control. In the temperature control method provided in this embodiment, PWM technology can provide a stable average power output, thus helping to maintain temperature stability. Furthermore, by adjusting the duty cycle of the PWM signal, output power regulation from extremely low to extremely high can be achieved, providing a large dynamic range. Additionally, since PWM technology can reduce unnecessary full-on / full-off operations during temperature regulation, it can effectively avoid wear and tear on electronic devices caused by frequent temperature regulation cycles, extending the lifespan of the electronic devices.
[0113] In one alternative implementation, the above-mentioned generation of a PWM signal based on a target duty cycle may specifically include steps C-E.
[0114] Step C: Set the timing module to control the period and duty cycle of the PWM signal.
[0115] Specifically, the process of setting the timing module in an electronic device is as follows:
[0116] / / Select timer TIM2
[0117] TIM_HandleTypeDef htim2;
[0118] / / Initialize the timer
[0119] htim2.Instance = TIM2;
[0120] htim2.Init.Prescaler = 83; / / Assuming the system clock is 16MHz, the prescaler is 83, and the counting frequency is 16MHz / 84≈190kHz.
[0121] htim2.Init.CounterMode=TIM_COUNTERMODE_UP;
[0122] htim2.Init.Period = 999; / / Sets a period of 1ms (assumed)
[0123] htim2.Init.ClockDivision=TIM_CLOCKDIVISION_DIV1;
[0124] if(HAL_TIM_PWM_Init(&htim2)!=HAL_OK)
[0125] {
[0126] Error_Handler();
[0127] }
[0128] Step D: Set the output pin to high level and hold it at T. on Time; and setting the output pin to low level and holding TT. on time.
[0129] Where T represents the time length of one complete cycle of the PWM signal, T on TT represents the length of time the PWM signal remains high within each cycle. on This indicates the length of time the PWM signal remains low within each cycle.
[0130] In this embodiment, keeping the PWM signal high can also be understood as keeping the PWM signal at a high level. Similarly, keeping the PWM signal low can also be understood as keeping the PWM signal at a low level.
[0131] Step E: Repeat the switching between high and low levels within a complete cycle until the desired signal duration T is reached, thus generating a PWM signal.
[0132] like Figure 5 As shown, the electronic device in this application embodiment may include a temperature sensing unit 201, a signal processing unit 202, a control unit 203, a heating and cooling unit 204, and a power management unit 205.
[0133] Specifically, the temperature sensing unit 201 is used to detect the current temperature of the target device and convert the temperature signal into an electrical signal through a thermistor.
[0134] The signal processing unit 202 is used to convert the electrical signal transmitted by the temperature sensing unit 201 into a digital signal through an analog-to-digital converter.
[0135] The control unit 203 receives the digital signal converted by the signal processing unit 202 and calculates the temperature parameters that need to be adjusted according to the PID control algorithm to generate control commands. In generating the control commands, the control unit 203 considers the frequent changes in the target temperature, the accumulation of integral terms, and the effects of changes in the capacitance, resistance, and friction of the target device over time.
[0136] The heating and cooling unit 204 is used to receive control commands from the control unit 203 to adjust the temperature of the target device.
[0137] Optionally, the heating and cooling unit 204 includes a heating module and a cooling module. Specifically, the heating module receives instructions to increase (or decrease) the heating element current (or to switch the heating module on and off) to ensure that the temperature of the target device does not fall below a set minimum temperature (T). min The cooling module receives commands to increase the cooling power of the refrigeration equipment to ensure that the temperature of the target equipment does not exceed the set maximum temperature (T). max ).
[0138] The power management unit 205 is used to control the power supply of the heating and cooling unit 204 by utilizing the switching characteristics of the MOS module, so as to achieve precise power regulation.
[0139] This application embodiment can divide electronic devices and the like into functional modules according to the above method examples. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0140] When dividing each function into modules according to its corresponding function. Figure 6 A possible structural schematic diagram of the temperature control device involved in the above embodiments is shown, such as... Figure 6 As shown, the temperature control device 30 may include an acquisition module 301 and a processing module 302.
[0141] The acquisition module 301 is used to acquire a digital signal, which is used to characterize the current temperature of the target device.
[0142] The processing module 302 is used to generate control commands based on the PID control algorithm and the digital signal.
[0143] The processing module 302 is also used to generate a PWM signal based on the control command.
[0144] The processing module 302 is also used to adjust the current temperature of the target device to the target temperature based on the PWM signal.
[0145] Optionally, the acquisition module 301 is specifically used to acquire an initial electrical signal characterizing the current temperature.
[0146] The processing module 302 is also used to filter the initial electrical signal to obtain the target electrical signal.
[0147] The processing module 302 is also used to perform conversion and quantization processing on the target electrical signal to obtain the digital signal.
[0148] Optionally, the acquisition module 301 is further configured to acquire the quantized initial electrical signal, the wavelength of the filter that performs the filtering process on the initial electrical signal, the index of the filter, the quantization compensation coefficient, and the phase compensation coefficient. The quantization compensation coefficient is used to compensate for errors in the quantization process, and the phase compensation coefficient is used to compensate for the phase delay of the filter.
[0149] The processing module 302 is specifically used to obtain the target electrical signal based on the quantized initial electrical signal, the wavelength of the filter, the index of the filter, the quantization compensation coefficient, and the phase compensation coefficient.
[0150] Optionally, the temperature control device 30 also includes a determination module 303.
[0151] The determination module 303 is used to determine the proportional gain, integral gain, and derivative gain of the digital signal, the feedforward control term for the target temperature, and the compensation term for the target temperature. The proportional gain is used to characterize the error of the digital signal at the current moment, the integral gain is used to characterize the accumulated error of the digital signal from the initial moment to the current moment, the derivative gain is used to characterize the error change trend of the digital signal at the current moment, the feedforward control term is used to characterize the change of the target temperature over time, and the compensation term is used to compensate for the influence of the target device on the target temperature. The proportional gain, integral gain, and derivative gain are the gain coefficients of the PID control algorithm.
[0152] The determining module 303 is also used to determine the temperature difference between the current temperature and the target temperature based on the digital signal.
[0153] The processing module 302 is specifically used to generate the control command based on the proportional gain, the integral gain, the derivative gain, the feedforward control term, the compensation term, and the temperature difference.
[0154] Optionally, the above compensation items include at least one of capacitance compensation, resistance compensation, and friction compensation. The capacitance compensation is used to compensate for the influence of the capacitance of the target device on the target temperature, the resistance compensation is used to compensate for the influence of the resistance of the target device on the target temperature, and the friction compensation is used to compensate for the influence of the internal friction of the target device on the target temperature.
[0155] Optionally, the above control commands include a target power.
[0156] The acquisition module 301 is also used to acquire the maximum power during the temperature regulation process of the target device.
[0157] The determination module 303 is used to determine the target duty cycle based on the maximum power and the target power. The target duty cycle is used to characterize the proportion of the energized time of the PWM signal in one pulse cycle to the total time.
[0158] The processing module 302 is specifically used to generate the PWM signal based on the target duty cycle.
[0159] When using integrated units, Figure 7 A possible structural schematic diagram of the temperature control device involved in the above embodiments is shown. For example... Figure 7 As shown, the temperature control device 40 may include a processing module 401 and a communication module 402. The processing module 401 can be used to control and manage the operation of the temperature control device 40. The communication module 402 can be used to support communication between the temperature control device 40 and other entities. Optionally, as... Figure 7As shown, the temperature control device 40 may also include a storage module 403 for storing the program code and data of the temperature control device 40.
[0160] The processing module 401 can be a processor or a controller. The communication module 402 can be a transceiver, transceiver circuit, or communication interface, etc. The storage module 403 can be a memory.
[0161] In this configuration, when the processing module 401 is a processor, the communication module 402 is a transceiver, and the storage module 403 is a memory, the processor, transceiver, and memory can be connected via a bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc.
[0162] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0163] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0164] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0165] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0166] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A temperature control method, characterized in that, include: Acquire a digital signal, which is used to characterize the current temperature of the target device; Based on the proportional-integral-derivative (PID) control algorithm and the digital signal, control commands are generated. Generate a pulse width modulation (PWM) signal based on the control command; The current temperature of the target device is adjusted to the target temperature based on the PWM signal. The step of generating control commands based on the proportional-integral-derivative (PID) control algorithm and the digital signal includes: determining the proportional gain, integral gain, and derivative gain of the digital signal, a feedforward control term for the target temperature, and a compensation term for the target temperature. The proportional gain characterizes the error of the digital signal at the current moment, the integral gain characterizes the accumulated error of the digital signal from the initial moment to the current moment, the derivative gain characterizes the error change trend of the digital signal at the current moment, the feedforward control term characterizes the change of the target temperature over time, and the compensation term compensates for the influence of the target device's internal components on the target temperature. The proportional gain, integral gain, and derivative gain are the gain coefficients of the PID control algorithm. The compensation term includes capacitance compensation, resistance compensation, and friction compensation. The capacitance compensation compensates for the influence of the target device's capacitance on the temperature adjustment response speed of the target temperature, the resistance compensation compensates for the influence of the target device's resistance on the target temperature, and the friction compensation compensates for the influence of the target device's internal friction on the target temperature. Based on the digital signal, determine the temperature difference between the current temperature and the target temperature; Based on the proportional gain, the integral gain, the derivative gain, the feedforward control term, the compensation term, and the temperature difference, a control command is generated; the control command includes a target power. The generation of a pulse width modulation (PWM) signal based on the control command includes: Obtain the maximum power during the temperature regulation process of the target device; Based on the maximum power and the target power, a target duty cycle is determined. The target duty cycle is used to characterize the proportion of the PWM signal's on-time in one pulse cycle to the total time. The PWM signal is generated based on the target duty cycle; The step of adjusting the current temperature of the target device to the target temperature based on the PWM signal includes: adjusting the conduction level and conduction time of the MOS module based on the PWM signal to control the power output during the temperature adjustment process, thereby adjusting the current temperature of the target device to the target temperature.
2. The method according to claim 1, characterized in that, The acquisition of digital signals includes: Acquire an initial electrical signal characterizing the current temperature; The initial electrical signal is filtered to obtain the target electrical signal; The target electrical signal is converted and quantized to obtain the digital signal.
3. The method according to claim 2, characterized in that, The step of filtering the initial electrical signal to obtain the target electrical signal includes: The quantized initial electrical signal, the wavelength of the filter used to filter the initial electrical signal, the index of the filter, the quantization compensation coefficient, and the phase compensation coefficient are obtained. The quantization compensation coefficient is used to compensate for errors in the quantization process, and the phase compensation coefficient is used to compensate for the phase delay of the filter. The target electrical signal is obtained based on the quantized initial electrical signal, the wavelength of the filter, the index of the filter, the quantization compensation coefficient, and the phase compensation coefficient.
4. A temperature control device, characterized in that, include: Acquisition module and processing module; The acquisition module is used to acquire digital signals, which are used to characterize the current temperature of the target device; The processing module is used to generate control commands based on the proportional-integral-derivative (PID) control algorithm and the digital signal; The processing module is also used to generate a pulse width modulation (PWM) signal based on the control command; The processing module is also used to adjust the current temperature of the target device to the target temperature based on the PWM signal; The step of generating control commands based on the proportional-integral-derivative (PID) control algorithm and the digital signal includes: determining the proportional gain, integral gain, and derivative gain of the digital signal, a feedforward control term for the target temperature, and a compensation term for the target temperature. The proportional gain characterizes the error of the digital signal at the current moment, the integral gain characterizes the accumulated error of the digital signal from the initial moment to the current moment, the derivative gain characterizes the error change trend of the digital signal at the current moment, the feedforward control term characterizes the change of the target temperature over time, and the compensation term compensates for the influence of the target device's internal components on the target temperature. The gain, integral gain, and derivative gain are the gain coefficients of the PID control algorithm; the compensation terms include capacitance compensation, resistance compensation, and friction compensation. The capacitance compensation is used to compensate for the influence of the target device's capacitance on the temperature adjustment response speed of the target temperature; the resistance compensation is used to compensate for the influence of the target device's resistance on the target temperature; and the friction compensation is used to compensate for the influence of the target device's internal friction on the target temperature. Based on the digital signal, the temperature difference between the current temperature and the target temperature is determined. Based on the proportional gain, integral gain, derivative gain, feedforward control term, compensation terms, and temperature difference, a control command is generated; the control command includes a target power. The step of generating a pulse width modulation (PWM) signal based on the control command includes: acquiring the maximum power during the temperature regulation process of the target device; determining a target duty cycle based on the maximum power and the target power, wherein the target duty cycle is used to characterize the proportion of the PWM signal's on-time in one pulse cycle to the total time; and generating the PWM signal based on the target duty cycle. The step of adjusting the current temperature of the target device to the target temperature based on the PWM signal includes: adjusting the conduction level and conduction time of the MOS module based on the PWM signal to control the power output during the temperature adjustment process, thereby adjusting the current temperature of the target device to the target temperature.
5. An electronic device, characterized in that, The electronic device includes: processor; A memory configured to store processor-executable instructions; The processor is configured to execute the instructions to implement the temperature control method as described in any one of claims 1-3.
6. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions in the computer-readable storage medium are executed by an electronic device, the electronic device is able to perform the temperature control method as described in any one of claims 1-3.
7. A computer program product, comprising instructions, characterized in that, When the instruction is executed on the electronic device, the electronic device causes the electronic device to perform the temperature control method as described in any one of claims 1-3.
Citation Information
Patent Citations
High-precision temperature-compensation MEMS (Micro-Electromechanical System) oscillator based on parasitic capacitance adjustment
CN102594260A
Automatic temperature control correcting device and method for resistance type heating device
CN109164851A
Low-consumption mute electrical cabinet automatic temperature control device and temperature control system thereof
CN111290448A
Method and device for temperature control of centrifugal machine, centrifugal machine and storage medium
CN113885600A
Passive radiation type constant temperature control system and control method based on PID (Proportion Integration Differentiation) controller
CN115047925A