A kettle constant-temperature heating control method based on adaptive PID control

CN122816334APending Publication Date: 2026-09-25SHANGHAI YANCAN ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610680223.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

现有算法无法感知壶内水量多少,无论加水多少均采用相同控制策略,水量少时加热速率极快,停止加热后余热仍会导致水温大幅超过目标温度,影响使用安全

Benefits of technology

显示温度准确,解决温度虚高与“跳水”现象:本发明通过动态补偿算法,根据加热状态与水量等级对壶底传感器温度进行实时修正。加热阶段采用加权融合模型,使显示温度准确反映壶内实际水温,将显示误差从现有技术的±8℃降低至±2℃以内;停止加热后,采用指数衰减补偿偏移量,消除了显示温度“跳水”现象,使用户获得真实、平滑的温度读数,显著提升使用体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122816334A_ABST
    Figure CN122816334A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of kettle constant temperature heating control method based on adaptive PID control, belong to temperature control technical field.It includes: with fixed sampling period acquisition heating disc temperature;Heating starts after determining water level according to temperature rise rate, immediately stop heating when water shortage;According to the difference between current temperature and target temperature, three-stage control is divided: full-power heating stage, variable gain PID stage and parameter reduction and dead zone control stage, wherein the proportional coefficient of the second stage is dynamically improved with the increase of deviation;After temperature reaches boiling point detection threshold, monitor temperature change rate, determine boiling and record local boiling point when it continues to be lower than boiling threshold;Meanwhile, the temperature of heating disc is dynamically compensated by combining heating state and water level, and the accurate display water temperature is output.The fast water heating, accurate constant temperature, adaptive altitude and safe and reliable heating control are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of temperature control technology, specifically relating to a method for constant temperature heating control of a kettle based on adaptive PID control. Background Technology

[0002] Currently, electric kettles and thermostatic kettles on the market mainly use the following technical solutions for temperature control: Firstly, there is the mechanical bimetallic thermostat solution. This solution can only disconnect the power supply when the water boils by the deformation of the bimetallic strip due to heat, thus achieving power-off protection. It cannot achieve constant temperature control, and users cannot maintain the water temperature at a specific temperature (such as keeping milk warm at 45℃ or brewing tea at 85℃).

[0003] Secondly, a simple microcontroller-based hysteresis control scheme. This scheme uses a temperature sensor to collect the temperature at the bottom or inside of the kettle, and sets a hysteresis range (for example, setting the target temperature to 100℃, starting heating when the temperature is below 95℃, and stopping heating when it is above 100℃). Because it uses switch control, the water temperature fluctuates greatly, and the temperature control accuracy is usually only ±5℃ or higher, resulting in a poor user experience. Furthermore, frequent switching on and off affects the lifespan of the relay.

[0004] Thirdly, traditional PID control schemes. Some high-end products attempt to introduce proportional-integral-derivative (PID) algorithms to improve temperature control accuracy. However, kettle heating systems are characterized by high power (typically 1000W-2000W), large thermal inertia, and nonlinear time-varying characteristics. Traditional fixed-parameter PID controllers struggle to balance rapid heating with the control objective of no overshoot. If the PID parameters are tuned towards a fast response, significant temperature overshoot (measured overshoot exceeding 10°C) is likely to occur, followed by repeated oscillations; if the parameters are tuned towards a stable response, heating will be slow, resulting in excessively long boiling times.

[0005] In addition, the existing technology also has the following drawbacks: The displayed temperature does not match the actual water temperature. The temperature sensor is usually installed in the center of the heating plate at the bottom of the kettle, detecting the temperature of the heating plate rather than the actual water temperature inside the kettle. The existing algorithm directly uses the sensor temperature as the displayed temperature. During the heating phase, the displayed temperature is falsely high. After heating stops, the heat from the bottom of the kettle conducts upwards, causing the actual water temperature to continue to rise, while the displayed temperature stops changing, resulting in a "displayed temperature drop" phenomenon. The maximum measured deviation can reach 8℃, which users often mistakenly believe is a product malfunction.

[0006] Boiling point detection relies on a fixed 100°C threshold, which is unsuitable for high-altitude areas. In high-altitude areas (such as Kunming with a boiling point of approximately 96°C and Lhasa with approximately 92°C), water boils before reaching 100°C. Existing software, unable to detect 100°C, will continue heating, resulting in wasted energy and potential safety hazards such as dry burning or even damage to the kettle.

[0007] The dry-burn detection response is slow and relies on mechanical thermostats. Existing products lack rapid dry-burn detection based on the rate of temperature change, and typically rely solely on a 125°C snap-action thermostat for hardware protection, resulting in a delayed response and the software being unable to recognize sensor failure.

[0008] The lack of water level detection makes heating with small amounts of water prone to getting out of control. The existing algorithm cannot sense the amount of water in the kettle, and uses the same control strategy regardless of the amount of water added. When the water level is low, the heating rate is extremely fast, and after heating stops, residual heat can still cause the water temperature to exceed the target temperature significantly, affecting safety.

[0009] Therefore, there is an urgent need to provide a constant temperature heating method that can solve the above problems and achieve rapid water boiling, precise constant temperature, altitude adaptation, and safe and reliable constant temperature heating. Summary of the Invention

[0010] To address the aforementioned problems in the existing technology, this invention provides a kettle constant temperature heating control method based on adaptive PID control. The objective of this invention can be achieved through the following technical solution: A kettle constant temperature heating control method based on adaptive PID control includes: The temperature value of the kettle heating plate is collected at a fixed sampling period. After heating is started, the water level is determined according to the rate of temperature rise within a preset time period. If the rate exceeds the water shortage threshold, it is confirmed as water shortage and heating is stopped. The control is divided into three stages based on the difference between the current temperature and the target temperature: Stage 1 is when the current temperature is below the full-power heating threshold, and full-power heating is implemented; Stage 2 is when the temperature is between the full-power heating threshold and the near-constant temperature threshold, and PID control is activated with the proportional coefficient dynamically increasing as the temperature deviation increases; Stage 3 is when the temperature reaches or exceeds the near-constant temperature threshold, and the integral and derivative coefficients are reduced and dead-zone control is introduced; wherein, the full-power heating threshold and the near-constant temperature threshold are preset values, and the full-power heating threshold < near-constant temperature threshold < target temperature; In the second and third stages, the output control quantity is calculated according to the PID parameters of the corresponding stage to drive the heater to run; when the temperature reaches the preset boiling point detection start threshold, the temperature change rate is monitored. If the change rate is continuously lower than the boiling judgment threshold and reaches the preset time, boiling is judged, the current temperature is recorded as the local boiling point and heating is stopped. By combining the heating status and water volume level, the collected heating plate temperature is dynamically compensated and the water temperature is displayed.

[0011] Specifically, determining the water volume level based on the temperature rise rate within a preset time period includes: continuously collecting temperature values ​​and calculating the average temperature rise rate within a preset time period after heating is started; comparing the average temperature rise rate with multiple preset thresholds to classify at least three water volume levels, including a water shortage level, a low water volume level, and a normal water volume level; when the water shortage level is determined, water shortage protection is immediately triggered and heating is stopped, while a water shortage alarm signal is output; when the low water volume level is determined, the upper limit of the output of the subsequent PID control is reduced.

[0012] Specifically, it also includes: dynamically adjusting the control parameters of the second and third stages according to the determined water volume level. The control parameters include the upper limit of the PID output and the reference value of the proportional coefficient. The lower the water volume, the lower the upper limit of the output and the reference value of the proportional coefficient, so as to suppress temperature overshoot under low water volume. For water shortage level, heating is stopped directly and the subsequent control stage is not entered.

[0013] Specifically, the full-power heating threshold is the target temperature minus the first preset temperature difference, the approaching constant temperature threshold is the target temperature minus the second preset temperature difference, and the first preset temperature difference is greater than the second preset temperature difference; when the local boiling point has been detected and the target temperature set by the user is close to or exceeds the local boiling point, the first preset temperature difference and the second preset temperature difference are reduced proportionally.

[0014] Specifically, the proportional coefficient that dynamically increases with increasing temperature deviation is calculated using variable gain linearity: the proportional coefficient is obtained by adding the product of the base value, the gain coefficient, and the relative deviation; the gain coefficient is limited to a preset range, and the calculated proportional coefficient is restricted to a preset upper and lower limit range.

[0015] Specifically, the reduction of integral and derivative coefficients and the introduction of dead-zone control include: reducing them to the set proportions corresponding to the second stage values ​​respectively; the triggering condition for dead-zone control is: the absolute value of the temperature deviation is less than the first dead-zone threshold, and the absolute value of the temperature change rate is less than the second dead-zone threshold; heating is stopped when the condition is met, and PID control is restarted after the temperature drops back to near the constant temperature threshold.

[0016] Specifically, the boiling point detection includes: when the temperature reaches a preset boiling point detection start threshold, continuously calculating the temperature change rate at a fixed sampling period; if the temperature change rate for multiple consecutive sampling periods is lower than the boiling determination threshold, and the absolute temperature increase during this period does not exceed a preset range, then the water is determined to have boiled; the temperature value at the moment of boiling is recorded as the local boiling point and stored in a non-volatile memory; in subsequent constant temperature control, if the target temperature set by the user exceeds the local boiling point, the target temperature is automatically limited to the local boiling point minus a preset safety margin.

[0017] Specifically, the dynamic compensation of the collected heating plate temperature includes: using a dual-model compensation based on the heating state, water volume level and measured temperature of the heating plate; using a weighted fusion model during the heating stage to fuse the measured temperature and the filtered temperature according to dynamic weights; and using an exponential decay compensation model during the heat dissipation stage to superimpose a compensation offset that decays over time, so that the displayed temperature smoothly tracks the actual water temperature.

[0018] Specifically, the initial value of the compensation offset is determined by the integral value of the heating power before heating stops and the water volume level; under normal water volume, the initial compensation value is within a preset range, and the decay time constant is a preset fixed value.

[0019] Specifically, it also includes sensor fault detection: In each sampling cycle, the ADC conversion value of the temperature sensor is checked to see if it exceeds the preset normal operating range. If it does, it is determined to be an open circuit or short circuit abnormality. Simultaneously, the temperature jump rate in adjacent sampling periods is detected. If the jump rate exceeds the preset maximum allowable jump value, it is determined to be an abnormal jump rate. If any of the open circuit, short circuit, or transient abnormality is detected in multiple consecutive sampling cycles, the sensor is determined to be faulty. The heater output is immediately stopped, all loads are shut off, and an audible and visual alarm signal is continuously issued until it is manually reset. For abnormal temperature jumps, before the number of fault determinations is reached, the effective temperature value of the previous cycle is used to replace the current abnormal value for control.

[0020] Specifically, it also includes zero-crossing triggering and dynamic PWM control: detecting the AC zero-crossing point and synchronously triggering the thyristor; the PWM period is dynamically adjusted according to the proximity of water volume and temperature, with a short period used in the early stage of the second phase and a long period used in the later stage of the second phase and the third phase.

[0021] Specifically, it also includes hardware redundancy protection: an independent snap-action temperature controller is set outside the MCU, whose operating temperature is higher than the normal boiling point of water and lower than the safe limit temperature of the heating plate. When the software control fails and the temperature of the heating plate rises to the operating temperature, the snap-action temperature controller physically disconnects the heating circuit. At the same time, a watchdog timer is set in the software to trigger the MCU hardware reset when the main loop is abnormal.

[0022] The beneficial effects of this invention are as follows: Accurate temperature display, resolving issues of inflated or fluctuating temperatures: This invention employs a dynamic compensation algorithm to correct the temperature of the sensor at the bottom of the kettle in real time based on the heating status and water volume. During the heating phase, a weighted fusion model is used to ensure the displayed temperature accurately reflects the actual water temperature inside the kettle, reducing the display error from ±8℃ in existing technologies to within ±2℃. After heating stops, an exponential decay compensation method is used to compensate for the offset, eliminating temperature fluctuations and providing users with a true and smooth temperature reading, significantly improving the user experience.

[0023] To achieve rapid heating without overshoot while balancing speed and stability, this invention employs a three-stage adaptive PID control strategy: The first stage involves full-power heating to ensure rapid temperature rise; the second stage utilizes a variable-gain PID controller, where the proportional coefficient dynamically adjusts with temperature deviation, resulting in a stronger response as the deviation increases and an automatic reduction in response as the deviation decreases, thus avoiding the contradiction of traditional fixed PID controllers that exhibit overshoot when fast and slow speed when stable; the third stage reduces the integral and derivative coefficients and introduces dead-zone control to prevent overshoot caused by thermal inertia.

[0024] High temperature control accuracy, low energy consumption, and long device life: This invention adaptively adjusts PID parameters according to water volume level and introduces dead-zone control during the temperature control phase. Heating stops when the temperature deviation is less than 0.5℃ and the rate of change is less than 0.1℃ / s. The temperature control accuracy is improved from ±5℃ of traditional hysteresis control to ±0.8℃, the average power consumption during the temperature control phase is reduced by about 37.5%, the relay operating frequency is reduced by nearly 80%, and the lifespan is extended by 2-3 times.

[0025] Adaptive altitude-based boiling point detection eliminates the risk of dry burning: This invention does not rely on a fixed boiling point of 100℃, but instead determines boiling by monitoring the rate of temperature change. When the water temperature rises stagnates or the rate of change remains below a threshold, the water is determined to have boiled, and the current temperature is recorded as the local boiling point. This algorithm can automatically adapt to the boiling point differences in different altitude regions within the range of 85℃-100℃, solving the problem of dry burning or even damage to the kettle caused by continuous heating at high altitudes.

[0026] Multi-level safety protection ensures reliable operation: This invention constructs a five-level safety protection mechanism: the software layer includes water shortage detection, sensor fault detection, over-temperature protection, and watchdog reset; the hardware layer is equipped with an independent snap-action temperature controller (physical disconnection at 125℃). This multi-level redundancy design ensures safe shutdown even in extreme situations such as software malfunction or sensor failure, greatly reducing the risk of product recall. Attached Figure Description

[0027] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0028] Figure 1 This is a flowchart illustrating the overall method of the present invention; Figure 2This is a flowchart of the three-stage adaptive PID control of the present invention; Figure 3 This is a flowchart of the boiling point detection and water quantity determination process of the present invention. Detailed Implementation

[0029] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.

[0030] Please see Figures 1-3 A method for constant temperature heating control of a kettle based on adaptive PID control, comprising: The temperature value of the kettle heating plate is collected at a fixed sampling period. After heating is started, the water level is determined according to the rate of temperature rise within a preset time period. If the rate exceeds the water shortage threshold, it is confirmed as water shortage and heating is stopped. The control is divided into three stages based on the difference between the current temperature and the target temperature: Stage 1 is when the current temperature is below the full-power heating threshold, and full-power heating is implemented; Stage 2 is when the temperature is between the full-power heating threshold and the near-constant temperature threshold, and PID control is activated with the proportional coefficient dynamically increasing as the temperature deviation increases; Stage 3 is when the temperature reaches or exceeds the near-constant temperature threshold, and the integral and derivative coefficients are reduced and dead-zone control is introduced; wherein, the full-power heating threshold and the near-constant temperature threshold are preset values, and the full-power heating threshold < near-constant temperature threshold < target temperature; In the second and third stages, the output control quantity is calculated according to the PID parameters of the corresponding stage to drive the heater to run; when the temperature reaches the preset boiling point detection start threshold, the temperature change rate is monitored. If the change rate is continuously lower than the boiling judgment threshold and reaches the preset time, boiling is judged, the current temperature is recorded as the local boiling point and heating is stopped. By combining the heating status and water volume level, the collected heating plate temperature is dynamically compensated and the water temperature is displayed.

[0031] Specifically, determining the water volume level based on the temperature rise rate within a preset time period includes: continuously collecting temperature values ​​and calculating the average temperature rise rate within a preset time period after heating is started; comparing the average temperature rise rate with multiple preset thresholds to classify at least three water volume levels, including a water shortage level, a low water volume level, and a normal water volume level; when the water shortage level is determined, water shortage protection is immediately triggered and heating is stopped, while a water shortage alarm signal is output; when the low water volume level is determined, the upper limit of the output of the subsequent PID control is reduced.

[0032] Specifically, it also includes: dynamically adjusting the control parameters of the second and third stages according to the determined water volume level. The control parameters include the upper limit of the PID output and the reference value of the proportional coefficient. The lower the water volume, the lower the upper limit of the output and the reference value of the proportional coefficient, so as to suppress temperature overshoot under low water volume. For water shortage level, heating is stopped directly and the subsequent control stage is not entered.

[0033] Specifically, the full-power heating threshold is the target temperature minus the first preset temperature difference, the approaching constant temperature threshold is the target temperature minus the second preset temperature difference, and the first preset temperature difference is greater than the second preset temperature difference; when the local boiling point has been detected and the target temperature set by the user is close to or exceeds the local boiling point, the first preset temperature difference and the second preset temperature difference are reduced proportionally.

[0034] Specifically, the proportional coefficient that dynamically increases with increasing temperature deviation is calculated using variable gain linearity: the proportional coefficient is obtained by adding the product of the base value, the gain coefficient, and the relative deviation; the gain coefficient is limited to a preset range, and the calculated proportional coefficient is restricted to a preset upper and lower limit range.

[0035] Specifically, the reduction of integral and derivative coefficients and the introduction of dead-zone control include: reducing them to the set proportions corresponding to the second stage values ​​respectively; the triggering condition for dead-zone control is: the absolute value of the temperature deviation is less than the first dead-zone threshold, and the absolute value of the temperature change rate is less than the second dead-zone threshold; heating is stopped when the condition is met, and PID control is restarted after the temperature drops back to near the constant temperature threshold.

[0036] Specifically, the boiling point detection includes: when the temperature reaches a preset boiling point detection start threshold, continuously calculating the temperature change rate at a fixed sampling period; if the temperature change rate for multiple consecutive sampling periods is lower than the boiling determination threshold, and the absolute temperature increase during this period does not exceed a preset range, then the water is determined to have boiled; the temperature value at the moment of boiling is recorded as the local boiling point and stored in a non-volatile memory; in subsequent constant temperature control, if the target temperature set by the user exceeds the local boiling point, the target temperature is automatically limited to the local boiling point minus a preset safety margin.

[0037] Specifically, the dynamic compensation of the collected heating plate temperature includes: using a dual-model compensation based on the heating state, water volume level and measured temperature of the heating plate; using a weighted fusion model during the heating stage to fuse the measured temperature and the filtered temperature according to dynamic weights; and using an exponential decay compensation model during the heat dissipation stage to superimpose a compensation offset that decays over time, so that the displayed temperature smoothly tracks the actual water temperature.

[0038] Specifically, the initial value of the compensation offset is determined by the integral value of the heating power before heating stops and the water volume level; under normal water volume, the initial compensation value is within a preset range, and the decay time constant is a preset fixed value.

[0039] Specifically, it also includes sensor fault detection: In each sampling cycle, the ADC conversion value of the temperature sensor is checked to see if it exceeds the preset normal operating range. If it does, it is determined to be an open circuit or short circuit abnormality. Simultaneously, the temperature jump rate in adjacent sampling periods is detected. If the jump rate exceeds the preset maximum allowable jump value, it is determined to be an abnormal jump rate. If any of the open circuit, short circuit, or transient abnormality is detected in multiple consecutive sampling cycles, the sensor is determined to be faulty. The heater output is immediately stopped, all loads are shut off, and an audible and visual alarm signal is continuously issued until it is manually reset. For abnormal temperature jumps, before the number of fault determinations is reached, the effective temperature value of the previous cycle is used to replace the current abnormal value for control.

[0040] Specifically, it also includes zero-crossing triggering and dynamic PWM control: detecting the AC zero-crossing point and synchronously triggering the thyristor; the PWM period is dynamically adjusted according to the proximity of water volume and temperature, with a short period used in the early stage of the second phase and a long period used in the later stage of the second phase and the third phase.

[0041] Specifically, it also includes hardware redundancy protection: an independent snap-action temperature controller is set outside the MCU, whose operating temperature is higher than the normal boiling point of water and lower than the safe limit temperature of the heating plate. When the software control fails and the temperature of the heating plate rises to the operating temperature, the snap-action temperature controller physically disconnects the heating circuit. At the same time, a watchdog timer is set in the software to trigger the MCU hardware reset when the main loop is abnormal.

[0042] Example This embodiment uses an electric thermos kettle with a rated power of 1500W as an example for description, but the present invention is also applicable to liquid heating appliances such as health pots, instant water dispensers, and coffee machines.

[0043] I. Hardware Components and Initial Setup The thermostat kettle in this embodiment includes: a microcontroller (MCU with an internal model-to-digital converter, pulse width modulation output, and watchdog timer), a negative temperature coefficient thermistor (NTC) temperature sensor installed in the center of the heating plate, a silicon controlled rectifier-driven heating plate, an AC zero-crossing detection circuit, a touch button or rotary encoder, a digital tube or LCD display, a buzzer, and a snap-action thermostat as the last line of physical protection (the operating temperature is set to 125°C and is connected in series in the heater power supply circuit).

[0044] The MCU reads the NTC voltage value at fixed time intervals (e.g., 10 times per second) and obtains the current heating plate temperature by looking up a table or calculation. This temperature value is used for heating control and, after compensation, for display on the digital tube.

[0045] II. Water Shortage Detection and Water Volume Adaptation After the user starts heating (e.g., selects "boiling" mode or sets a constant temperature), the MCU first enters the water shortage detection phase. Specifically, it records the rate of temperature rise within a few seconds after heating begins (e.g., from the 5th to the 10th second). Because water has a high specific heat capacity, the less water there is, the faster the temperature rises; therefore, the rate of temperature rise directly reflects the amount of water.

[0046] If the temperature rise rate exceeds a high threshold (e.g., more than 4°C per second), it indicates that the water level in the kettle is extremely low (less than 200 ml), posing a risk of dry burning. At this point, the MCU immediately shuts off the SCR, stops heating, the buzzer sounds a rapid alarm, and a fault code is displayed on the screen. No further heating steps will be executed.

[0047] If the temperature rise rate is in the medium range (e.g., 2.5°C to 4°C per second), it is determined that the water volume is too low. At this time, the MCU will limit the output limit of subsequent heating to a lower level (e.g., maximum duty cycle of 60%), and adjust the base value of the proportional coefficient accordingly to prevent temperature overshoot due to thermal inertia under low water volume.

[0048] If the temperature rise rate is lower, it is determined to be normal water volume or excessive water volume, and the control parameters are kept at the nominal value.

[0049] This water volume determination method based on the rate of temperature rise can achieve water shortage protection and adaptive water volume control without the need for an additional water level sensor.

[0050] III. Three-stage adaptive PID control This invention divides the heating process into three consecutive control stages, each employing a different control strategy, thereby simultaneously achieving the goals of rapid heating and no overshoot.

[0051] Let the user-defined target temperature be T. set The current measured temperature of the heating plate is T.

[0052] Phase 1: Full power heating.

[0053] When T is significantly lower than T set When the temperature difference is greater than 15°C, the MCU outputs a full-conduction signal, causing the heater to operate continuously at its rated power. During this stage, PID calculations are not performed; the MCU is only responsible for rapidly raising the water temperature to near the target temperature range. Throughout this stage, the MCU continuously monitors the temperature rise rate and water shortage status, and immediately stops heating if any abnormality is detected.

[0054] Second stage: Variable gain PID control.

[0055] When T rises to a distance T setWhen the temperature falls within a certain range (e.g., within 15°C) but is not extremely close (e.g., still more than 3°C off), the second stage begins. At this point, the MCU uses a proportional-integral-derivative (PID) algorithm, but the proportional coefficient is not fixed; instead, it dynamically changes based on the deviation between the current and target temperatures: the larger the deviation, the larger the proportional coefficient, thus maintaining strong driving capability; the smaller the deviation, the smaller the proportional coefficient automatically decreases to avoid overshoot caused by overdrive. The integral and derivative coefficients use pre-tuned values ​​in this stage. The PID controller calculates the required heating power based on the deviation (output in duty cycle form) and drives the thyristor to steadily raise the water temperature.

[0056] Phase 3: Weak parameter and dead zone control.

[0057] When T is very close to T set When the temperature difference is less than 3°C, the system enters the third stage. At this point, the MCU actively reduces the integral and derivative coefficients (e.g., reducing the integral coefficient to one-third of its original value and the derivative coefficient to one-fifth of its original value) to prevent overshoot caused by thermal inertia. Dead-zone control is also introduced: if the absolute value of the temperature deviation is less than a small value (e.g., 0.5°C) and the rate of temperature change is also very slow (e.g., less than 0.1°C per second), the MCU temporarily stops outputting heating power, allowing the water temperature to change naturally and slowly. PID control is only restarted when the temperature drops below the starting threshold of the second stage.

[0058] By using the three-stage switching and variable gain PID control, both rapid heating and smooth transition are achieved, with a maximum overshoot of no more than 1.5℃ and no repeated oscillations.

[0059] IV. Adaptive Boiling Point Detection In "boiling" mode, the ultimate goal of heating is to bring the water to a boil. However, the boiling point of water varies at different altitudes; in high-altitude areas, the boiling point may be as low as around 90°C. The traditional method of using a fixed 100°C for judgment can lead to continuous heating, dry burning, or even damage to the kettle.

[0060] This embodiment of boiling point detection does not rely on a fixed temperature value, but utilizes a physical property of water boiling: after water reaches its boiling point, all the heat absorbed is used for phase change (vaporization), the water temperature no longer rises, and the rate of temperature change approaches zero. The specific implementation is as follows: Once the measured temperature exceeds a low start-up threshold (e.g., 85°C), the MCU begins calculating the temperature change rate at regular intervals (e.g., every 2 seconds). If the temperature change rate remains below a very small threshold (e.g., less than 0.1°C increase every 2 seconds) for several consecutive cycles (e.g., 3 cycles totaling 6 seconds), and the absolute temperature increase is also extremely small (not exceeding 0.5°C), then the water is determined to have boiled. At this point, the MCU records the current temperature value as the actual boiling point at that altitude and stores it in non-volatile memory, while simultaneously stopping heating.

[0061] Subsequently, in the constant temperature maintenance mode, if the user-set target temperature exceeds the stored local boiling point, the MCU will automatically limit the actual constant temperature target to "the local boiling point minus a safety margin (e.g., 1°C)," thereby avoiding continuous heating due to the set temperature being higher than the boiling point. When the user-set constant temperature target approaches the recorded local boiling point, the system automatically reduces the preset temperature difference between the full-power heating threshold and the threshold approaching the constant temperature proportionally to prevent the three-stage control range from disappearing.

[0062] V. Dynamic temperature compensation Because the temperature sensor is in close contact with the heating plate, its temperature is significantly higher than the actual water temperature inside the kettle during heating. After heating stops, the residual heat from the bottom of the kettle conducts upwards, causing the actual water temperature to continue rising for a period, while the sensor temperature may drop. If the sensor temperature were displayed directly, users would see an "artificially high temperature" or a "temperature drop," resulting in a poor user experience.

[0063] This embodiment uses a dynamic compensation algorithm to independently calculate and display the temperature, processing it separately from the temperature value used to control heating.

[0064] Heating Phase: The displayed temperature is obtained by fusing the sensor's measured temperature and the smoothed temperature after low-pass filtering, according to a certain weight. The weighting coefficient is dynamic: initially, the sensor temperature has a small weight (e.g., 30%), while the filtered temperature has a large weight; as the water temperature continues to rise and approaches the boiling point, the weight of the sensor temperature gradually decreases (e.g., to 10%). This effectively suppresses the artificially high peak values ​​of the sensor during heating, making the displayed temperature closer to the actual water temperature inside the kettle.

[0065] Heat dissipation phase after heating stops: After the heater is turned off, although the sensor temperature begins to drop, the actual water temperature inside the kettle will continue to rise for a period of time due to residual heat conduction. To address this phenomenon, this embodiment superimposes a positive compensation amount that decays exponentially over time onto the sensor temperature. The initial magnitude of the compensation amount is related to the total heating power and the amount of water in the kettle in the most recent period before heating stops; the less water and the greater the heating power, the larger the initial compensation value (e.g., 2°C to 8°C). The compensation amount then gradually decays to zero according to a preset time constant (e.g., 30 seconds), causing the displayed temperature to smoothly rise to the peak of the actual water temperature and then slowly fall back, eliminating the "water drop" phenomenon.

[0066] VI. Multi-level security protection In addition to the aforementioned water shortage detection and adaptive boiling point control, this embodiment also integrates the following safety protection mechanisms: Sensor fault detection: The MCU checks whether the AD conversion value exceeds the sensor's normal range (open circuit or short circuit) in each sampling cycle. If the value exceeds the limit multiple times consecutively, the sensor is deemed damaged, heating is immediately stopped, and an alarm is triggered. Simultaneously, if the temperature jump between two adjacent samplings is too large (e.g., exceeding 5°C), it is considered interference or poor contact. The previous valid temperature value is used as a substitute, and the number of abnormal occurrences is accumulated. Once the upper limit is reached, the system also shuts down for protection.

[0067] Zero-crossing triggering and dynamic PWM: The MCU uses a zero-crossing detection circuit to switch the SCR at the zero-crossing point of the AC current to reduce electromagnetic interference. The pulse width modulation (PWM) period is not fixed: a shorter period (e.g., 1 second) is used in the early stage of the second phase (when the temperature difference is large) to obtain a fast response; a longer period (e.g., more than 3 seconds) is used in the later stage of the second phase and the third phase to reduce the number of SCR switching, reduce power consumption and temperature rise.

[0068] Hardware redundancy protection: The MCU has a built-in independent watchdog timer. The main loop program must periodically reset the watchdog. If the program crashes or deadlocks, the watchdog will reset the MCU within seconds, causing the system to restart. Furthermore, the snap-action temperature controller connected in series in the heater power supply circuit is completely independent of the electronic control system: when the heating plate temperature exceeds 125°C for any reason (such as a short circuit in the thyristor or continuous heating output by the MCU), the bimetallic strip physically snaps open, completely cutting off the power supply and ensuring that serious accidents such as fires do not occur.

[0069] VII. Complete Working Examples Scenario: The user lives in Kunming (altitude about 1900 meters, actual boiling point about 94℃), adds about 1 liter of room temperature water (normal water volume) to the thermos, sets it to "boiling" mode, and then needs to prepare formula at a constant temperature of 45℃.

[0070] Heating Startup: The MCU detects that the temperature rise rate is approximately 2.0°C per second within 5 to 10 seconds after heating begins, which is considered normal water volume, and maintains standard control parameters.

[0071] Phase 1: The water temperature rises from 20℃ to 85℃. During this period, the water is heated at full power. The display screen shows the water temperature in real time, which is basically the same as the temperature inside the kettle, through a compensation algorithm (the sensor temperature may be 2-3℃ higher during the heating process, but after weighted fusion, the displayed value is close to the actual temperature inside the kettle).

[0072] Second stage: After the water temperature exceeds 85℃, it enters variable gain PID control. The proportional coefficient gradually decreases as the deviation decreases, and the water temperature rises steadily without overshoot.

[0073] Adaptive boiling point detection: When the temperature reaches 94℃, the MCU detects that the temperature change rate is less than 0.1℃ every 2 seconds for 6 consecutive seconds, determines that the water has boiled, records 94℃ as the local boiling point and stores it in memory, and then stops heating. The displayed temperature also correctly displays 94℃ after compensation.

[0074] Switching to constant temperature mode: The user presses the keep-warm button and sets the temperature to 45℃. Since 45℃ is much lower than the stored boiling point (94℃), the system directly enters the third stage (weak PID + dead-zone control) to maintain the water temperature. The actual water temperature is controlled between 44.5℃ and 45.5℃, with a constant temperature accuracy of ±0.5℃, and heating is only started a few times per hour, resulting in extremely low power consumption.

[0075] Safety verification: A watchdog timer is always running, and a snap-action thermostat serves as the ultimate safety measure. If the user forgets to add water before starting the heater, the temperature rise rate will quickly exceed the water shortage threshold within seconds of heating begins, and the MCU will immediately report an error and shut down the heater, without waiting for the temperature to reach 125°C before the snap-action thermostat provides protection.

[0076] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for constant temperature heating control of a kettle based on adaptive PID control, characterized in that, include: The temperature value of the kettle heating plate is collected at a fixed sampling period; After heating is started, the water level is determined based on the rate of temperature rise within a preset time period. If the rate exceeds the water shortage threshold, it is confirmed as water shortage and heating is stopped. The control is divided into three stages based on the difference between the current temperature and the target temperature: Stage 1 is when the current temperature is below the full-power heating threshold, and full-power heating is implemented; Stage 2 is when the temperature is between the full-power heating threshold and the near-constant temperature threshold, and PID control is activated with the proportional coefficient dynamically increasing as the temperature deviation increases; Stage 3 is when the temperature reaches or exceeds the near-constant temperature threshold, and the integral and derivative coefficients are reduced and dead-zone control is introduced; wherein, the full-power heating threshold and the near-constant temperature threshold are preset values, and the full-power heating threshold < near-constant temperature threshold < target temperature; In the second and third stages, the output control quantity is calculated according to the PID parameters of the corresponding stage to drive the heater to run; when the temperature reaches the preset boiling point detection start threshold, the temperature change rate is monitored. If the change rate is continuously lower than the boiling judgment threshold and reaches the preset time, boiling is judged, the current temperature is recorded as the local boiling point and heating is stopped. By combining the heating status and water volume level, the collected heating plate temperature is dynamically compensated and the water temperature is displayed.

2. The method according to claim 1, characterized in that, The method of determining the water volume level based on the temperature rise rate within a preset time period includes: continuously collecting temperature values ​​and calculating the average temperature rise rate within a preset time period after heating is started; comparing the average temperature rise rate with multiple preset thresholds to classify at least three water volume levels, including a water shortage level, a low water volume level, and a normal water volume level; when the water shortage level is determined, water shortage protection is immediately triggered and heating is stopped, while a water shortage alarm signal is output; when the low water volume level is determined, the upper limit of the output of the subsequent PID control is reduced.

3. The method according to claim 2, characterized in that, Also includes: The control parameters for the second and third stages are dynamically adjusted based on the determined water volume level. The control parameters include the upper limit of PID output and the baseline value of the proportional coefficient. The less water there is, the lower the upper limit of the output and the lower the baseline value of the proportional coefficient, in order to suppress temperature overshoot under low water volume; for water shortage levels, heating is stopped directly and the subsequent control stage is not entered.

4. The method according to claim 1, characterized in that, The full-power heating threshold is the target temperature minus the first preset temperature difference, and the approaching constant temperature threshold is the target temperature minus the second preset temperature difference, wherein the first preset temperature difference is greater than the second preset temperature difference; when the local boiling point has been detected and the target temperature set by the user is close to or exceeds the local boiling point, the first preset temperature difference and the second preset temperature difference are reduced proportionally.

5. The method according to claim 1, characterized in that, The proportional coefficient that dynamically increases with increasing temperature deviation is calculated using variable gain linearity: the proportional coefficient is obtained by adding the product of the base value and the gain coefficient and the relative deviation. The gain coefficient is limited to a preset range, and the calculated proportional coefficient is restricted to a preset upper and lower limit range.

6. The method according to claim 1, characterized in that, The reduction of integral and derivative coefficients and the introduction of dead zone control include: reducing them to the set proportions corresponding to the second stage values ​​respectively; the triggering condition for dead zone control is: the absolute value of the temperature deviation is less than the first dead zone threshold, and the absolute value of the temperature change rate is less than the second dead zone threshold; heating is stopped when the condition is met, and PID control is restarted after the temperature drops back to near the constant temperature threshold.

7. The method according to claim 1, characterized in that, The boiling point detection specifically includes: when the temperature reaches a preset boiling point detection start threshold, continuously calculating the temperature change rate at a fixed sampling period; if the temperature change rate for multiple consecutive sampling periods is lower than the boiling determination threshold, and the absolute temperature increase during this period does not exceed a preset range, then the water is determined to have boiled; the temperature value at the moment of boiling is recorded as the local boiling point and stored in a non-volatile memory; in subsequent constant temperature control, if the target temperature set by the user exceeds the local boiling point, the target temperature is automatically limited to the local boiling point minus a preset safety margin.

8. The method according to claim 1, characterized in that, The dynamic compensation for the collected heating plate temperature includes: using a dual-model compensation based on the heating status, water volume level, and measured heating plate temperature; using a weighted fusion model during the heating stage to fuse the measured temperature and the filtered temperature according to dynamic weights; and using an exponential decay compensation model during the heat dissipation stage to superimpose a compensation offset that decays over time, so that the displayed temperature smoothly tracks the actual water temperature.

9. The method according to claim 8, characterized in that, The initial value of the compensation offset is determined by the integral value of the heating power before heating stops and the water volume level; under normal water volume, the initial compensation value is within a preset range, and the decay time constant is a preset fixed value.

10. The method according to claim 1, characterized in that, It also includes sensor fault detection: In each sampling cycle, the ADC conversion value of the temperature sensor is checked to see if it exceeds the preset normal operating range. If it does, it is determined to be an open circuit or short circuit abnormality. Simultaneously, the temperature jump rate in adjacent sampling periods is detected. If the jump rate exceeds the preset maximum allowable jump value, it is determined to be an abnormal jump rate. If any of the open circuit, short circuit, or transient abnormality is detected in multiple consecutive sampling cycles, the sensor is determined to be faulty. The heater output is immediately stopped, all loads are shut off, and an audible and visual alarm signal is continuously issued until it is manually reset. For abnormal temperature jumps, before the number of fault determinations is reached, the effective temperature value of the previous cycle is used to replace the current abnormal value for control.

11. The method according to claim 1, characterized in that, It also includes zero-crossing triggering and dynamic PWM control: detecting the AC zero-crossing point and synchronously triggering the thyristor; the PWM period is dynamically adjusted according to the proximity of water volume and temperature, with a short period used in the early stage of the second phase and a long period used in the later stage of the second phase and the third phase.

12. The method according to claim 1, characterized in that, It also includes hardware redundancy protection: an independent snap-action temperature controller is set outside the MCU, whose operating temperature is higher than the normal boiling point of water and lower than the safe limit temperature of the heating plate. When the software control fails and the temperature of the heating plate rises to the operating temperature, the snap-action temperature controller physically disconnects the heating circuit. At the same time, a watchdog timer is set in the software to trigger the MCU hardware reset when the main loop is abnormal.