Intelligent temperature control method and device resistant to environmental disturbances
Patent Information
- Application Number
- CN202610964632.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-30
AI Technical Summary
[0016]本发明还提供一种抗环境扰动的智能温控箱,包括:多个前门区温度传感器、多个后壁区温度传感器,箱体以及上述任一项抗环境扰动的智能温控装置。
Smart Images

Figure CN123010900A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of temperature control technology, and in particular to an intelligent temperature control method and device that resists environmental disturbances. Background Technology
[0002] In fields such as cold chain logistics, biological sample preservation, medical reagent transportation, and food testing, there are extremely high requirements for the precision and stability of environmental temperature control. Taking the detection of hazardous substances in animal-derived products as an example, the testing process requires maintaining the internal temperature of the temperature-controlled warehouse at a stable 20℃ (a temperature difference of up to 40℃) in a -20℃ warehousing and logistics environment, with a temperature control precision requirement of within ±0.5℃.
[0003] Traditional PID control uses a proportional-integral-derivative controller for closed-loop control. For typical large-inertia, pure-delay, and nonlinear systems such as temperature control systems, fixed-parameter PID controllers struggle to balance response speed and steady-state accuracy, and generally suffer from problems such as large overshoot, long settling time, and weak anti-interference capability.
[0004] Currently, there are technical solutions for temperature control using fuzzy PID algorithms. By adjusting PID parameters online through fuzzy rules, the control effect is improved to some extent. Although existing solutions sometimes use multi-point sensors, they usually calculate the feedback temperature using an arithmetic average or fixed-weighted method. This "static weighting" method cannot cope with dynamic environmental disturbances: when a sudden drop in temperature occurs due to events such as opening a door, the fixed weights prevent the feedback temperature from accurately reflecting the temperature state at the "most unfavorable point," leading to controller lag or overcompensation.
[0005] Furthermore, existing fuzzy PID control is essentially still "error-driven" control—the output is only adjusted after a temperature deviation is detected. For large inertial systems like temperature-controlled chambers, there is a significant lag from cold source intrusion, temperature drop, sensor detection, controller calculation to heater response, inevitably leading to overshoot. Summary of the Invention
[0006] In view of the problems existing in the prior art, the present invention provides an intelligent temperature control method and device that is resistant to environmental disturbances.
[0007] This invention provides an intelligent temperature control method to resist environmental disturbances, comprising: calculating the difference between the average temperature of the front door area and the average temperature of the rear wall area, and calculating the average temperature change rate of the front door area and the average temperature change rate of the rear wall area; determining the front-to-back direction of temperature disturbance intrusion based on the difference, the front-to-back direction, and the rear-to-back direction; adjusting the weights of the temperature sensors in the corresponding areas according to the front-to-back direction, and calculating the real-time temperature by weighting the temperatures detected by all temperature sensors according to the adjusted weights; and adjusting the temperature of the insulation box according to the real-time temperature and the target temperature.
[0008] According to the present invention, an intelligent temperature control method for resisting environmental disturbances is provided. The step of determining the front and rear directions of temperature disturbance intrusion based on the difference, the rate of change of the front door area, and the rate of change of the rear wall area includes: when the difference is greater than a difference threshold and the average temperature change rate of the front door area is greater than a rate of change threshold, it is determined that the disturbance source intrusion is from the front door side; when the difference is greater than the difference threshold and the average temperature change rate of the rear wall side is greater than the rate of change threshold, it is determined that the disturbance source intrusion is from the rear wall side.
[0009] According to the present invention, an intelligent temperature control method for resisting environmental disturbances is provided, wherein adjusting the weight of the temperature sensor in the corresponding area according to the front and rear directions includes: increasing the weight of the temperature sensor on the front door side and decreasing the weight of the temperature sensor on the rear wall side when disturbance intrusion occurs on the front door side; decreasing the weight of the temperature sensor on the front door side and increasing the weight of the temperature sensor on the rear wall side when disturbance intrusion occurs on the rear wall side.
[0010] According to the present invention, an intelligent temperature control method for resisting environmental disturbances is provided, wherein adjusting the temperature of the insulation box according to the real-time temperature and the target temperature further includes: when it is determined that the disturbance intrusion is on the front door side, increasing the power of the heater in the front door area and decreasing the power of the heater in the rear wall area; when it is determined that the disturbance intrusion is on the rear wall side, increasing the power of the heater in the rear wall area and decreasing the power of the heater in the front door area.
[0011] According to the present invention, an intelligent temperature control method for resisting environmental disturbances is provided, wherein adjusting the temperature of the insulation box according to the real-time temperature and the target temperature includes: using the deviation between the real-time temperature and the target temperature as an input deviation; using the input deviation, the rate of change of the input deviation, and the difference as inputs to a fuzzy PID algorithm, and performing temperature control based on the output result.
[0012] According to the intelligent temperature control method for resisting environmental disturbances provided by the present invention, when the door is detected to be open, the accumulation of the integral term of the fuzzy PID is paused.
[0013] According to the intelligent temperature control method for resisting environmental disturbances provided by the present invention, when the door changes from open to closed, a compensation pulse is calculated based on the door opening time and the difference, and the compensation pulse is attenuated to zero exponentially within a preset time.
[0014] The present invention also provides an intelligent temperature control device resistant to environmental disturbances, comprising: a temperature acquisition module for calculating the difference between the average temperature of the front door area and the average temperature of the rear wall area, and calculating the average temperature change rate of the front door area and the average temperature change rate of the rear wall area; a direction recognition module for determining the front-to-back direction of temperature disturbance intrusion based on the difference, the change rate of the front door area, and the change rate of the rear wall area; a weight allocation module for adjusting the weights of temperature sensors in corresponding areas according to the front-to-back direction, and calculating the real-time temperature by weighting the temperatures detected by all temperature sensors according to the adjusted weights; and a temperature adjustment module for adjusting the temperature of the insulation box according to the real-time temperature and the target temperature.
[0015] According to the present invention, an intelligent temperature control device for resisting environmental disturbances further includes: a state detection module, used to pause the accumulation of the integral term of the fuzzy PID when the door is detected to be open; the state detection module is also used to calculate a compensation pulse based on the opening time and the difference when the door changes from open to closed, and to decay the compensation pulse to zero exponentially within a preset time.
[0016] The present invention also provides an intelligent temperature control box resistant to environmental disturbances, comprising: multiple front door temperature sensors, multiple rear wall temperature sensors, a box body, and any of the above-mentioned intelligent temperature control devices resistant to environmental disturbances.
[0017] The intelligent temperature control method and device for resisting environmental disturbances provided by this invention adopts temperature difference gradient detection and dynamic weighted feedback. Compared with the traditional fixed weight scheme, it can adjust the sensor weight in real time according to the direction of disturbance, so that the feedback temperature more realistically reflects the temperature state of the "most unfavorable point", thereby improving the control accuracy of the target temperature. In addition, through temperature detection in two regions and dynamic weighted feedback, temperature disturbance intrusion can be captured in time, improving the timeliness of temperature control and thus avoiding overshoot in temperature control. Attached Figure Description
[0018] 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.
[0019] Figure 1 This is a flowchart illustrating the intelligent temperature control method for resisting environmental disturbances provided by the present invention. Figure 2 This is a schematic diagram of the structure of the intelligent temperature control device for resisting environmental disturbances provided by the present invention; Figure 3 This is a structural schematic diagram of the intelligent temperature control box resistant to environmental disturbances provided by the present invention; Explanation of reference numerals in the attached diagram: 1. Temperature sensor; 2. Fan; 3. Cabinet; 4. Temperature sensor; 5. Heater; 6. Touch screen; 7. Human-machine interface unit; 8. Temperature sensor; 9. Door; 10. Temperature sensor; 11. Heater; 12. Power supply; 13. Reed switch; 14. Electrical control box. Detailed Implementation
[0020] 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.
[0021] To address the aforementioned shortcomings, this invention proposes an intelligent temperature control method and device based on multi-point temperature gradient detection and zone pre-compensation. Through asymmetric weighted sensing, dual-zone independent heating, and gate state feedforward compensation, it systematically solves the inherent defects of existing technologies from the three levels of sensing, execution, and strategy.
[0022] The following is combined with Figures 1-3 The present invention describes an intelligent temperature control method and apparatus for resisting environmental disturbances. Figure 1 This is a flowchart illustrating the intelligent temperature control method for resisting environmental disturbances provided by the present invention, as shown below. Figure 1 As shown, the intelligent temperature control method for resisting environmental disturbances provided by the present invention includes: 101. Calculate the difference between the average temperature of the front door area and the average temperature of the rear wall area, and calculate the rate of change of the average temperature of the front door area and the rate of change of the average temperature of the rear wall area.
[0023] This invention identifies the direction of disturbance based on temperature gradient. First, it calculates the difference ΔT_fb between the average temperature T_front_avg on the front door side and the average temperature T_back_avg on the rear wall side, as well as the average temperature change rate for each side, which can be in °C / s. Specifically, multiple sensors can be set in both the front door and rear wall regions to collect temperature information and calculate the average temperature. The number of sensors can be two or more.
[0024] 102. Based on the difference, the rate of change of the front door area and the rate of change of the rear wall area, determine the front and rear directions of the temperature disturbance intrusion.
[0025] This application dynamically adjusts the weights of each sensor according to the direction of the disturbance, so that the feedback temperature more accurately reflects the temperature state of the "most unfavorable point".
[0026] 103. Adjust the weights of the temperature sensors in the corresponding areas according to the front and back directions, and calculate the real-time temperature by weighting the temperatures detected by all temperature sensors according to the adjusted weights.
[0027] In some embodiments, adjusting the weights of the temperature sensors in the corresponding regions according to the front and rear directions includes: increasing the weight of the temperature sensor on the front door side and decreasing the weight of the temperature sensor on the rear wall side when there is a disturbance intrusion on the front door side; decreasing the weight of the temperature sensor on the front door side and increasing the weight of the temperature sensor on the rear wall side when there is a disturbance intrusion on the rear wall side.
[0028] For example, there are two temperature sensors in the front and two in the rear areas. In steady state, the weights of the sensors on the front door and the rear wall are both set to 0.25. When intrusion occurs on the front door side, the weight of the front door sensor increases to 0.4, while the weight of the rear wall sensor decreases to 0.1. When intrusion occurs on the rear wall side, the weights are adjusted in the opposite direction. This dynamic weighting strategy allows the feedback temperature to respond to environmental changes in real time, providing a more accurate input to the controller.
[0029] 104. Adjust the temperature of the insulation box according to the real-time temperature and the target temperature.
[0030] Temperature control can be performed based on the current fuzzy PID algorithm.
[0031] The intelligent temperature control method for resisting environmental disturbances of this invention employs temperature gradient detection and dynamic weighted feedback. Compared to traditional fixed-weight schemes, it can adjust sensor weights in real time according to the direction of disturbance, making the feedback temperature more accurately reflect the temperature state at the "most unfavorable point," thereby improving the control accuracy of the target temperature and exhibiting smaller steady-state fluctuations. Furthermore, through temperature detection in two regions and dynamic weighted feedback, it can promptly capture temperature disturbances, improving the timeliness of temperature control and thus avoiding overshoot. This method can meet the stringent requirements of temperature-sensitive scenarios such as biological sample preservation, medical reagent transportation, and food testing.
[0032] Among them, the control accuracy of the target temperature inside the temperature-controlled chamber reaches ±0.5℃, the steady-state fluctuation range is ≤0.3℃, and the steady-state accuracy is improved by about 40%.
[0033] In some embodiments, determining the front-to-back direction of temperature disturbance intrusion based on the difference, the rate of change in the front door area, and the rate of change in the rear wall area includes: when the difference is greater than a difference threshold and the average rate of change in the front door area is greater than a rate of change threshold, it is determined that the disturbance source intrusion is from the front door side; when the difference is greater than the difference threshold and the average rate of change in the rear wall area is greater than the rate of change threshold, it is determined that the disturbance source intrusion is from the rear wall side.
[0034] The difference threshold can be set to 0.8℃, and the rate of change threshold can be set to 0.3. Specifically, when ΔT_fb > 0.8℃ and the average temperature drop rate on the front door side > 0.3℃ / s (i.e., the rate of change is greater than 0.3), it is determined that a cold source has entered through the front door side; when ΔT_fb > 0.8℃ and the temperature drop rate on the rear wall side > 0.3℃ / s, it is determined that a cold source has entered through the rear wall side. This function enables the control system to clearly know "where the disturbance comes from," providing a decision-making basis for subsequent zone-selective compensation.
[0035] In some embodiments, adjusting the temperature of the insulation box according to the real-time temperature and the target temperature includes: using the deviation between the real-time temperature and the target temperature as an input deviation; using the input deviation, the rate of change of the input deviation, and the difference as inputs to a fuzzy PID algorithm, and performing temperature control based on the output result.
[0036] This invention can combine current fuzzy PID algorithms for temperature control. For example, the input deviation e = T_set - T_curr_weighted, the rate of change of the input deviation ec = e - e_prev, and the auxiliary input ΔT_fb. Here, T_set is the set target temperature, T_curr_weighted is the real-time temperature obtained by 104, and e_prev is the input deviation from the previous time step or period.
[0037] Kp, Ki, and Kd are updated using a fuzzy rule table. The control quantity u(t) is calculated using a positional PID formula and mapped to D_base (0~100%). D_base is the "total heating demand" (0~100%) calculated by the fuzzy PID controller based on the temperature deviation, reflecting the overall heat requirement and serving as a unified benchmark before heat allocation by the zone heaters. D_front and D_back represent the heat allocated to the front and rear zones, respectively. Temperature control can be implemented using PWM.
[0038] In one embodiment, adjusting the temperature of the insulation box according to the real-time temperature and the target temperature further includes: increasing the power of the heater in the front door area and decreasing the power of the heater in the rear wall area when it is determined that there is a disturbance intrusion on the front door side; and increasing the power of the heater in the rear wall area and decreasing the power of the heater in the front door area when it is determined that there is a disturbance intrusion on the rear wall side.
[0039] This invention employs dual-zone independent heating and spatially selective temperature difference compensation, dividing the heater into two independent control zones, each driven by a separate PWM path, to achieve spatially selective heating. For example, the front zone heater (attached to the inner wall of the front door, 120W power) handles the intrusion of cold sources when the door is opened, while the rear zone heater (attached to the rear side wall, 120W power) handles the intrusion of cold sources from the rear wall side. The compensation control logic is as follows: when intrusion occurs from the front door side, the power of the front zone heater increases by ΔD_front = 0.5×|ΔT_fb|, and the power of the rear zone heater decreases by ΔD_back = 0.3×|ΔT_fb|; the opposite compensation method is applied when intrusion occurs from the rear wall side. This zoned selective compensation mechanism achieves asymmetric control by "heating more on the cold side and less on the hot side." Of course, the heating zones are not limited to two; they can be configured as front, middle, and rear zones, etc.
[0040] Existing solutions generally use a single heating unit or a full-area heater, with all areas working simultaneously. When faced with local cold source intrusion (such as cold air sinking when the door is opened, or local insulation failure of the warehouse wall), single-zone heating can only "increase the overall power", resulting in overheating of areas far from the cold source, creating new temperature unevenness, and causing the "overshoot-rebound" phenomenon.
[0041] This invention employs a dual-zone independent heating and spatially selective temperature difference compensation mechanism. When a cold source intrusion is detected on the front door side, the heating power of the front zone can be actively increased, while the rear zone maintains its basic power. This avoids the local overcompensation problem caused by the traditional single-zone heating method of "increasing the overall power".
[0042] In one embodiment, when door opening is detected, the integral term accumulation of the fuzzy PID controller is paused. This embodiment employs feedforward compensation based on door state detection. A reed switch can be installed at the door, and the "door opening event" can be introduced into the control as a feedforward signal to achieve disturbance prediction. Pausing the integral term accumulation of the fuzzy PID controller during door opening avoids integral saturation.
[0043] In one embodiment, when the door is detected to change from open to closed, a compensation pulse is calculated based on the opening duration and the difference, and the compensation pulse is attenuated to zero exponentially within a preset duration.
[0044] The compensation pulse is calculated instantly after the door closes, based on the door opening duration t_open and the current temperature gradient ΔT_fb. It can be: E_comp = 30% + 0.2×t_open + 0.5×|ΔT_fb|; Where t_open is the opening time and ΔT_fb is the temperature difference over 101 steps. It then decays to zero exponentially over 30 seconds according to exp(-t / 10). This feedforward compensation mechanism intervenes proactively before the temperature deviation occurs, fundamentally suppressing the "overshoot-rebound" phenomenon.
[0045] This invention introduces a feedforward compensation mechanism based on door state detection. A compensation pulse is applied immediately upon door closing, based on the opening duration and temperature gradient, thus eliminating the root cause of the "overshoot-rebound" phenomenon. Traditional methods are like "driving blindfolded"—there's a delay between pressing the accelerator and feeling the acceleration, inevitably leading to repeated "overshoot-rebound." This application proactively intervenes with feedforward compensation at the moment of door closing, shortening the recovery time after disturbance.
[0046] The intelligent temperature control device for resisting environmental disturbances provided by the present invention will be described below. The intelligent temperature control device for resisting environmental disturbances described below can be referred to in correspondence with the intelligent temperature control method for resisting environmental disturbances described above.
[0047] Figure 2 This is a schematic diagram of the intelligent temperature control device for resisting environmental disturbances provided by the present invention, as shown below. Figure 2 As shown, the intelligent temperature control device for resisting environmental disturbances includes: a temperature acquisition module 201, a direction recognition module 202, a weight allocation module 203, and a temperature adjustment module 204. Specifically, the temperature acquisition module 201 calculates the difference between the average temperature of the front door area and the average temperature of the rear wall area, and calculates the rate of change of the average temperature of the front door area and the average temperature of the rear wall area; the direction recognition module 202 determines the front-to-back direction of temperature disturbance intrusion based on the difference, the rate of change of the front door area, and the rate of change of the rear wall area; the weight allocation module 203 adjusts the weights of the temperature sensors in the corresponding areas according to the front-to-back direction, and calculates the real-time temperature by weighting the temperatures detected by all temperature sensors based on the adjusted weights; and the temperature adjustment module 204 adjusts the temperature of the insulation box according to the real-time temperature and the target temperature.
[0048] In some embodiments, the intelligent temperature control device further includes a state detection module, which is used to pause the accumulation of the integral term of the fuzzy PID when the door is detected to be open; the state detection module is also used to calculate a compensation pulse based on the door opening time and the difference when the door changes from open to closed, and to decay the compensation pulse to zero exponentially within a preset time.
[0049] The apparatus embodiments provided in this invention are for implementing the above-described method embodiments. For specific processes and details, please refer to the above-described method embodiments, which will not be repeated here.
[0050] The intelligent temperature control device for resisting environmental disturbances provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned intelligent temperature control method for resisting environmental disturbances. For the sake of brevity, any parts not mentioned in the embodiment of the intelligent temperature control device for resisting environmental disturbances can be referred to the corresponding content in the aforementioned intelligent temperature control method for resisting environmental disturbances.
[0051] Figure 3 This is a structural schematic diagram of the intelligent temperature control box resistant to environmental disturbances provided by the present invention, as shown below. Figure 3 As shown, the environmentally resistant intelligent temperature control box includes: multiple front door temperature sensors, multiple rear wall temperature sensors, box body 3, and the aforementioned environmentally resistant intelligent temperature control device.
[0052] The front door area temperature sensor includes temperature sensor 1 and temperature sensor 4, and the rear wall area temperature sensor includes temperature sensor 8 and temperature sensor 10.
[0053] In addition, it may include a fan 2, a rear heater 5, a touch screen 6, a human-machine interface unit 7, a door 9, a front heater 11, a power supply 12, a reed switch 13, and an electrical control box 14. Among them, the heater 5 and the heater 11 may be silicone heaters.
[0054] The temperature control box has a rectangular body (3) with adjustable dimensions of 700mm × 500mm × 500mm. The body features a double-layer structure: an outer 0.5mm thick aluminum alloy shell and an inner 20mm thick polyethylene insulation layer, with the inner wall covered by an aluminum foil reflective film. A door (9) is installed on the front of the box, with a reed switch (13) embedded in the door frame. A 1.2W DC brushless fan (fan 2) is installed on the top of the box for forced air convection. A 4.3-inch ATK-MD0430 resistive touchscreen (touchscreen 6) is embedded in the box for parameter setting and status display.
[0055] The zoned heating unit consists of two heaters positioned in two independent zones: a front heater (attached to the inner wall of the front door, 200mm x 150mm, 120W power) and a rear heater (attached to the rear side wall, 200mm x 150mm, 120W power). Each heater's power supply circuit incorporates an independent MOSFET power switch (IRLZ44N). The control terminals of the two switches receive independent PWM signals from the PA6 and PA7 pins of the STM32 microcontroller, respectively. The PWM signal frequency is set to 1kHz, with a duty cycle adjustable from 0% to 100%, and both PWM channels can be controlled independently.
[0056] The temperature sensor consists of four DS18B20 temperature sensors, used to collect multi-point temperature data and average the values to determine the temperature field uniformity. All sensors are connected to the PB1 pin of the STM32 microcontroller via a one-wire bus. The microcontroller sequentially reads the temperature values from the four sensors at a sampling period of 0.5 seconds. The door status detection unit uses a reed switch (normally open type, model MKA10110), installed at the closed position between the door frame and the door body. The switch is closed when the door is closed (output low level), and open when the door is open (output high level). The switch signal is connected to the PB2 external interrupt pin of the STM32, configured to be rising-edge triggered (interrupt triggered the instant the door closes).
[0057] The control unit is based on the STM32F103RCT6 microcontroller and is equipped with an 8MHz external crystal oscillator, a reset circuit, an SWD download interface, and filter capacitors. The microcontroller runs embedded software, whose functional modules include: a temperature acquisition module (implementing sensor initialization, temperature conversion triggering, temperature value reading and verification according to the DS18B20 communication protocol); a temperature gradient calculation module (calculating the front average temperature T_front_avg, rear average temperature T_back_avg, and ΔT_fb); a direction recognition module (determining front door intrusion based on ΔT_fb and the rate of temperature change); a weight allocation module (adjusting the weights of each sensor according to the disturbance direction and calculating the weighted temperature T_curr_weighted); and a temperature regulation module, including a fuzzy PID algorithm (using deviation e and the rate of change of input deviation ec as inputs, and ΔT_fb as an auxiliary input, updating Kp, Ki, and Kd online through a fuzzy rule table); a partitioned PWM generation module (calculating the PWM duty cycle D_front of the front heater and the PWM duty cycle D_back of the rear heater based on D_base and the disturbance direction); and feedforward compensation (calculating and superimposing compensation pulses in the door close interrupt service). In addition, an LCD display and serial communication module can be implemented.
[0058] The human-machine interface unit includes four independent buttons (OK, Cancel, Temperature Increase, Temperature Decrease), connected to the PA0-PA3 GPIO input pins of the STM32 microcontroller, used to set the target temperature and control the system's start and stop. A 4.3-inch resistive touchscreen connects to the microcontroller via the FSMC interface, displaying the target temperature, real-time temperature (resolution ±0.01℃), two-zone PWM duty cycle, temperature gradient, and temperature change curve.
[0059] The power supply can adopt a three-stage power supply architecture: the first stage is a 220V AC input, which is converted to 24V DC by a switching power supply to power the two heaters and the fan; the second stage is a 24V input, which is converted to 12V by a DC-DC step-down module (LM2596) to power the two MOSFET drive circuits; the third stage is a 12V input, which is converted to 5V and 3.3V by LDO linear regulators (AMS1117-5.0 and AMS1117-3.3) to power the STM32 microcontroller, DS18B20 sensor, screen and reed switch.
[0060] like Figure 3 As shown, the temperature-controlled chamber is equipped with an electrical control box 14, which is installed on the back of the chamber 3. This electrical control box 14 houses multiple control modules, including an STM32 microcontroller, power supply, relays, drivers, and communication modules, to achieve centralized control and management. After the system is powered on, it can execute some or all of the following control processes: S1: Initialization. The STM32 microcontroller initializes peripherals such as clock, GPIO, timer (dual-channel PWM), external interrupt (PB2), one-wire bus, FSMC, and USART. It reads parameters such as target temperature T_set (20℃), fuzzy rule table, and compensation coefficients K_front=0.5, K_comp1=0.2, and K_comp2=0.5 from the EEPROM.
[0061] S2: Temperature Acquisition and Temperature Gradient Calculation. Read data from four DS18B20 sensors sequentially at 0.5-second intervals to obtain T1~T4. Calculate T_front_avg = (T1+T2) / 2, T_back_avg = (T3+T4) / 2, and ΔT_fb = T_back_avg-T_front_avg.
[0062] S3: Disturbance direction identification. If ΔT_fb > 0.8℃ and d(T_front_avg) / dt > 0.3℃ / s, it is determined to be a cold source intrusion on the front door side; otherwise, it is a steady state or an undirected disturbance.
[0063] S4: Dynamic weight adjustment. When there is intrusion at the front door, w1=w2=0.4, w3=w4=0.1; in steady state, all are 0.25. The weighted temperature T_curr_weighted is recalculated.
[0064] S5: Fuzzy PID Calculation (Dual-Zone Base Output). Input deviation e = T_set - T_curr_weighted, rate of change of input deviation ec = e - e_prev, and auxiliary input ΔT_fb. Update Kp, Ki, and Kd through the fuzzy rule table. Calculate the control quantity u(t) using the positional PID formula, mapping it to D_base (0~100%).
[0065] S6: Zone compensation calculation. When intruding through the front door: D_front = min(D_base + 0.5×|ΔT_fb|,100%), D_back = D_base; In steady state: D_front = D_back = D_base.
[0066] S7: PWM Output. Updates the timer compare register, and the dual PWM outputs duty cycles D_front and D_back respectively.
[0067] S8: Door Status Detection and Feedforward Compensation. A change in the reed switch level triggers an external interrupt on PB2; when the door opens (rising edge), the door opening start time t_open_start is recorded, and the integral term accumulation is paused; when the door closes (falling edge), t_open = t_close - t_open_start is recorded, the current ΔT_fb is read, and E_comp = 30% + 0.2×t_open +0.5×|ΔT_fb| is calculated; a 30-second exponential decay timer is started, during which D_front = D_front + E_comp × exp(-t / 10), updated every 0.5 seconds, and resumed after 30 seconds; the integral term accumulation is resumed.
[0068] S9: Status Refresh and Loop. Refresh the LCD display (target temperature, weighted temperature, dual-zone duty cycle, ΔT_fb, system status), send real-time data to the host computer via serial port, and return to step S2 after a 500ms delay.
[0069] A transfer function model for the temperature control system was established using the step response method: G(s) = K × e^(-τs) / (T1s+1)(T2s+1). System identification yielded K=0.95, τ=15s, T1=120s, and T2=80s. Simulation models of conventional PID and fuzzy PID were built in MATLAB / Simulink for comparison and verification.
[0070] -20℃ Low Temperature Environment Adaptability Structural Design. This application adopts a composite insulation structure: an outer 0.5mm aluminum alloy shell (balancing strength and portability), a middle 20mm polyethylene insulation layer (thermal conductivity ≤0.03W / (m·K)), and an inner wall covered with an aluminum foil reflective layer (reducing radiative heat exchange). A 1.2W DC brushless fan with a rated power is installed in the temperature control room, which has been verified to start normally after a -20℃ low temperature test, forcing air convection to eliminate temperature dead zones. Four DS18B20 temperature sensors are installed in the temperature control room, with a sampling period of 0.5 seconds, to determine the uniformity of the temperature field.
[0071] This invention employs the step response method combined with system identification to establish a transfer function model for a temperature control system. Simulation models of conventional PID and fuzzy PID controllers were then built in MATLAB / Simulink for comparative verification. This simulation method effectively predicts the actual control performance and significantly reduces the cost of research and development trial and error.
[0072] 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.
[0073] 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.
[0074] 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 smart temperature control method resistant to environmental disturbances, characterized in that, include: Calculate the difference between the average temperature of the front door area and the average temperature of the rear wall area, and calculate the rate of change of the average temperature of the front door area and the rate of change of the average temperature of the rear wall area. Based on the difference, the rate of change in the front door area, and the rate of change in the rear wall area, the front and rear directions of temperature disturbance intrusion are determined; Based on the aforementioned front and rear directions, the weights of the temperature sensors in the corresponding areas are adjusted respectively, and the real-time temperature is calculated by weighting the temperatures detected by all temperature sensors according to the adjusted weights. Adjust the temperature of the insulation box according to the real-time temperature and the target temperature.
2. The intelligent temperature control method for resisting environmental disturbances according to claim 1, characterized in that, The step of determining the forward and backward direction of temperature disturbance intrusion based on the difference, the rate of change in the front door area, and the rate of change in the rear wall area includes: If the difference is greater than the difference threshold and the average temperature change rate in the front door area is greater than the change rate threshold, it is determined that the disturbance source on the front door side has intruded. If the difference is greater than the difference threshold and the average temperature change rate on the rear wall side is greater than the change rate threshold, then it is determined that the rear wall side disturbance source has intruded.
3. The intelligent temperature control method for resisting environmental disturbances according to claim 1, characterized in that, The step of adjusting the temperature sensor weights of corresponding regions according to the front-back direction includes: In the event of disturbance intrusion on the front door side, the weight of the temperature sensor on the front door side is increased, while the weight of the temperature sensor on the rear wall side is decreased. In the event of rear wall disturbance intrusion, the weight of the front door side temperature sensor decreases, while the weight of the rear wall side temperature sensor increases.
4. The intelligent temperature control method for resisting environmental disturbances according to claim 1, characterized in that, The step of adjusting the temperature of the insulation box based on the real-time temperature and the target temperature includes: When a disturbance intrusion is detected on the front door side, the power of the heater in the front door area is increased and the power of the heater in the rear wall area is decreased. When a disturbance intrusion is detected on the rear wall side, the power of the heater in the rear wall area is increased, and the power of the heater in the front door area is decreased.
5. The intelligent temperature control method for resisting environmental disturbances according to claim 1, characterized in that, The step of adjusting the temperature of the insulation box based on the real-time temperature and the target temperature includes: The deviation between the real-time temperature and the target temperature is used as the input deviation; The input deviation, the rate of change of the input deviation, and the difference are used as inputs to the fuzzy PID algorithm, and temperature control is performed based on the output results.
6. The intelligent temperature control method for resisting environmental disturbances according to claim 5, characterized in that, When a door is detected to be open, pause the accumulation of the integral term of the fuzzy PID.
7. The intelligent temperature control method for resisting environmental disturbances according to claim 6, characterized in that, When the door is detected to change from open to closed, a compensation pulse is calculated based on the opening time and the difference, and the compensation pulse is attenuated to zero exponentially within a preset time.
8. An intelligent temperature control device resistant to environmental disturbances, characterized in that, include: The temperature acquisition module is used to calculate the difference between the average temperature of the front door area and the average temperature of the rear wall area, as well as to calculate the rate of change of the average temperature of the front door area and the average temperature of the rear wall area. The direction recognition module is used to determine the front and rear directions of the temperature disturbance intrusion based on the difference, the change rate of the front door area, and the change rate of the rear wall area. The weighting module is used to adjust the weights of the temperature sensors in the corresponding areas according to the front and rear directions, and to calculate the real-time temperature by weighting the temperatures detected by all temperature sensors according to the adjusted weights. The temperature control module is used to adjust the temperature of the insulation box according to the real-time temperature and the target temperature.
9. The intelligent temperature control device resistant to environmental disturbance according to claim 8, characterized in that... Also includes: The status detection module is used to pause the accumulation of the integral term of the fuzzy PID when the door is detected to be open. The state detection module is also used to detect when the door changes from open to closed, calculate a compensation pulse based on the opening time and the difference, and decay the compensation pulse to zero exponentially within a preset time.
10. An intelligent temperature control box resistant to environmental disturbances, characterized in that, include: Multiple front door area temperature sensors, multiple rear wall area temperature sensors, housing, and the intelligent temperature control device resistant to environmental disturbances as described in claim 8 or 9.