A temperature control method and system with fault self-diagnosis function

CN122902520APending Publication Date: 2026-10-13JIANGSU ANGEL ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611150263.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

然而,随着系统复杂度和可靠性要求的不断提高,如何在无需大幅增加硬件成本的前提下,实现精准、自适应的故障自诊断已成为行业亟待解决的问题

Benefits of technology

[0044]1.本发明通过同步采集并融合目标温度设定值、反馈温度数据与执行器工作电流信号,构建反映系统动态耦合关系的多维特征空间,并基于预训练的决策树模型进行智能分析,能够有效区分传感器失准、执行器失效、环境扰动与正常运行等多种状态,从而精准定位故障源头,减少误判与不必要的维护排查,提高故障诊断的准确性与运维效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902520A_ABST
    Figure CN122902520A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of temperature control method and system with fault self-diagnosis function, belong to automatic control technical field.The method is by synchronous acquisition target temperature set value, feedback temperature and actuator operating current signal, and carry out time stamp alignment, form unified multidimensional time sequence data sequence;Data sequence is carried out sliding window segmentation and feature extraction, and the feedback temperature change rate, current average, deviation integral and differential are calculated;Characteristic vector is input into pre-trained fault classification decision tree model, real-time discriminant system is in normal operation, sensor misalignment, actuator failure or environmental disturbance state;When continuously determining is same non-normal state, corresponding alarm is triggered, and decision tree threshold can be updated adaptively according to the long-term statistical characteristics of normal operation cycle, to track equipment aging.The system can realize accurate distinction of fault type without additional hardware, with good real-time, adaptability and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automatic control technology, specifically relating to a temperature control method and system with fault self-diagnosis function. Background Technology

[0002] Temperature control systems, as a fundamental technology in the field of automatic control, are widely used in household appliances, industrial thermal equipment, and HVAC systems. Their core function is to sense ambient temperature and drive actuators to maintain the controlled object within a set temperature range. To improve operational safety, existing solutions generally incorporate basic fault detection mechanisms, such as triggering alarms or protective shutdowns when the feedback temperature consistently exceeds a safety threshold. However, with the increasing complexity and reliability requirements of systems, achieving accurate and adaptive fault self-diagnosis without significantly increasing hardware costs has become a pressing issue for the industry.

[0003] Currently, fault diagnosis in mainstream temperature control systems primarily relies on the deviation between the feedback temperature and the setpoint. This method has significant limitations in practical applications: First, the system cannot effectively distinguish whether the root cause of the fault is sensor drift or actuator failure, leading to low maintenance efficiency. Second, under dynamic operating conditions, instantaneous temperature fluctuations can easily trigger false alarms or accidental shutdowns, affecting equipment availability. Third, existing diagnostic strategies do not fully utilize the state information contained in the actuator drive signals and lack modeling of the dynamic coupling relationship between the setpoint, feedback value, and actuator electrical signals, resulting in insufficient diagnostic basis and poor observability. Furthermore, existing systems generally lack the ability to adapt to slow parameter drifts such as component aging, and diagnostic accuracy decreases with increasing equipment usage time. Although some solutions employ multi-sensor redundancy or anomaly detection based on historical data, these still suffer from high hardware costs and limited fault isolation capabilities.

[0004] Therefore, it is necessary to provide a temperature control method and system based on software algorithms, which can accurately distinguish between sensor and actuator faults by fusing multi-source signals and constructing dynamic feature models without adding extra hardware, and has the ability to adaptively learn from the aging process of equipment, thereby significantly improving the reliability, maintainability and overall performance of the system throughout its entire life cycle. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a temperature control method and system with self-diagnostic fault function, specifically employing the following technical solution:

[0006] Firstly, a temperature control method with fault self-diagnosis function includes the following steps:

[0007] The target temperature setpoint, feedback temperature data, and actuator operating current signal are collected synchronously to obtain three raw data streams. The three raw data streams are then time-stamped and synchronized to form a unified multi-dimensional time-series data sequence.

[0008] The multidimensional time-series data sequence is divided into multiple consecutive time segments by a sliding window.

[0009] For each time segment, extract multiple feature quantities that comprehensively reflect the coupling relationship between the setting command, temperature response, and actuator action;

[0010] The extracted features are input into a pre-trained fault classification decision tree model, which outputs the system state category within the current time segment. The state category includes normal operation, sensor misalignment, actuator failure, and environmental disturbance.

[0011] When multiple consecutive time segments are identified as belonging to the same abnormal state category, a fault alarm corresponding to that category is triggered.

[0012] Based on the data collected by the system under normal operating conditions, the internal decision threshold of the fault classification decision tree model is adaptively updated to track parameter drift caused by equipment aging.

[0013] Preferably, the three raw data streams are timestamped and synchronized, specifically including:

[0014] Using the sampling time point of the actuator operating current signal with the highest sampling frequency as a reference, the estimated values ​​of the target temperature setpoint and the feedback temperature data at the corresponding time are calculated through a linear interpolation algorithm, forming a multi-dimensional time-series data sequence with strict time alignment.

[0015] Preferably, the extracted feature quantities include:

[0016] The feedback temperature change rate, the average actuator current, the integral of the deviation between the target temperature setpoint and the feedback temperature data, and the differential deviation within the time segment are all measured.

[0017] Preferably, the fault classification decision tree model is pre-converted into a static lookup table during the software compilation stage and stored in read-only memory;

[0018] During runtime, the state classification is completed by querying the static lookup table.

[0019] Preferably, the step of triggering the fault alarm includes:

[0020] An alarm is triggered only when the same abnormal state category appears continuously in the result sequence of multiple consecutive time segments, and is thus identified as a real fault or disturbance.

[0021] Preferably, the method further includes a hierarchical response step:

[0022] If the status category is actuator failure, a protective shutdown is performed immediately;

[0023] If the status category is sensor misalignment, the severity of the fault is assessed based on the characteristic values, and a protective shutdown is performed only if the assessment result exceeds a safety threshold.

[0024] If the status category is environmental disturbance, only an alarm will be issued.

[0025] Preferably, the step of adaptively updating the internal judgment threshold of the fault classification decision tree model is activated only after the system completes a full temperature control cycle that is judged to be operating normally throughout.

[0026] Preferably, the adaptive update step specifically includes:

[0027] Calculate the long-term moving average and standard deviation of key characteristic quantities over the most recent normal temperature control cycles;

[0028] If the deviation of the long-term moving average from the initial reference value exceeds a predetermined multiple of its long-term standard deviation, it is determined that the threshold of the corresponding decision node in the decision tree model needs to be adaptively adjusted.

[0029] Preferably, the process of adjusting the threshold of the decision node includes:

[0030] The adjustment amount is calculated based on the offset magnitude, and the updated threshold set is stored in non-volatile memory for loading on the next system startup.

[0031] Secondly, a temperature control system with fault self-diagnosis function, used to implement the above-mentioned temperature control method with fault self-diagnosis function, includes:

[0032] Temperature sensing unit, used to collect and feedback temperature data;

[0033] The human-computer interaction unit is used to receive the target temperature setpoint.

[0034] The execution drive unit is used to drive the load according to control commands;

[0035] A current monitoring unit is used to monitor the operating current signal of the execution drive unit;

[0036] The control and calculation unit is connected to the temperature sensing unit, the human-machine interaction unit, the execution drive unit, and the current monitoring unit, respectively.

[0037] The control and arithmetic unit is configured to perform the following functions:

[0038] The target temperature setpoint, feedback temperature data, and operating current signal are simultaneously acquired and processed to form a multi-dimensional time-series data sequence.

[0039] The sequence is segmented using a sliding window and its features are extracted.

[0040] The pre-trained fault classification decision tree model classifies the extracted features and outputs the system state category.

[0041] Trigger tiered alarms or protection actions based on continuous classification results;

[0042] The decision threshold of the fault classification decision tree model is adaptively updated based on normal operation data.

[0043] In summary, this application includes at least one of the following beneficial technical effects:

[0044] 1. This invention constructs a multi-dimensional feature space reflecting the dynamic coupling relationship of the system by synchronously collecting and fusing the target temperature setpoint, feedback temperature data and actuator operating current signal. Based on a pre-trained decision tree model, it performs intelligent analysis, which can effectively distinguish between various states such as sensor misalignment, actuator failure, environmental disturbance and normal operation, thereby accurately locating the source of the fault, reducing misjudgment and unnecessary maintenance and troubleshooting, and improving the accuracy of fault diagnosis and operation and maintenance efficiency.

[0045] 2. After each normal operation cycle, the present invention automatically analyzes the statistical trends of key characteristic quantities based on long-term operation data and safely fine-tunes the internal judgment threshold of the fault diagnosis model. This adaptive mechanism enables the diagnostic logic to continuously track and adapt to slow performance drifts such as component aging and contact resistance changes, ensuring that the system maintains high diagnostic sensitivity and accuracy throughout its entire life cycle, thus solving the problem of diagnostic performance degradation over time caused by the lack of adaptive capabilities in existing solutions.

[0046] 3. The self-diagnostic function of this invention is entirely based on software algorithms. Through efficient signal synchronization, feature extraction, and decision tree classification in the form of a fixed lookup table, millisecond-level real-time diagnosis can be completed on a general-purpose microcontroller without the need for additional redundant sensors or complex hardware. While significantly improving system reliability and maintainability, it effectively controls product cost and hardware complexity, and has good industrial promotion value. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating a temperature control method with fault self-diagnosis function according to the present invention.

[0048] Figure 2 This is a flowchart illustrating the multidimensional time-series data fusion and fault classification decision tree model in this invention.

[0049] Figure 3 This is a schematic diagram of the process of synchronous acquisition of multi-source signals, feature extraction and adaptive threshold update in this invention. Detailed Implementation

[0050] This invention provides a temperature control method and system with fault self-diagnosis function. Its core lies in constructing a multi-dimensional feature space that reflects the internal physical coupling relationship of the temperature control system by synchronously collecting three time-series data: target temperature setpoint, feedback temperature data, and actuator operating current signal. Based on this feature space, it can accurately distinguish four states: sensor misalignment, actuator failure, environmental disturbance, and normal operation.

[0051] To further illustrate the technical means and effects adopted by the present invention in order to achieve the intended purpose, the following detailed description is provided in conjunction with the accompanying drawings and preferred embodiments, based on specific implementation methods of the present invention.

[0052] A temperature control method with fault self-diagnosis function includes the following steps:

[0053] S1, real-time acquisition of feedback temperature data of the controlled object through a temperature sensor, specifically including the following sub-steps:

[0054] S101: A negative temperature coefficient (NTC) thermistor conforming to the International Electrotechnical Commission standard IEC 60751 is selected as the temperature sensing unit.

[0055] The thermistor is encapsulated in a stainless steel probe, which is in direct contact with the heat exchange medium of the controlled object via threads or crimping to ensure temperature response speed and accuracy. Its temperature measurement range is -40℃ to +125℃, and its full-range accuracy is ±0.5℃.

[0056] The NTC thermistor is connected in series with a precision fixed resistor in the circuit to form a voltage divider circuit, which converts the resistance change into a voltage signal. The voltage signal is then sent to the ADC input pin of the control unit after passing through a buffer composed of an operational amplifier, so as to improve the signal driving capability and suppress interference.

[0057] S102: The control unit performs ADC sampling on the above voltage signal at a frequency of 20Hz.

[0058] The digital value obtained from sampling needs to be converted into the corresponding thermistor resistance value according to specific circuit parameters (such as reference voltage and voltage divider resistor values), and then converted into a temperature value through the temperature-resistance relationship. This conversion process is implemented through any of the following common embedded system methods:

[0059] Lookup table method: The sensor calibration table is stored in the controller memory as an array. The sensor is looked up based on the measured resistance value, and the final temperature is calculated by linear interpolation between adjacent data points.

[0060] Polynomial fitting method: The pre-fitted temperature-resistance characteristic polynomial coefficients are stored in the controller, and the measured resistance value is directly substituted into the controller during operation for calculation.

[0061] S103: After each conversion to obtain a temperature value, the system adds a timestamp to it, which is derived from a common hardware timer in the control and arithmetic unit.

[0062] In this system, the timing of periodic tasks such as temperature sampling and current sampling is controlled by the interrupt signal generated by this common timer. Therefore, the timestamps of the data in each channel naturally have a common, high-resolution (1ms) time base, which provides a fundamental guarantee for accurate time synchronization and alignment in the subsequent step S5.

[0063] S2, receiving the target temperature setting value input by the user through the human-computer interaction interface, specifically includes the following sub-steps:

[0064] S201: The human-machine interface unit consists of an LCD screen and membrane buttons. Users input the desired target temperature setting value by pressing the membrane buttons.

[0065] S202: The system will dynamically limit the range of user-input settings based on the type of controlled device to prevent illegal or dangerous settings.

[0066] For example, for refrigerators, the allowed setting range is limited to -18℃ to 10℃; for ovens, it is limited to 30℃ to 250℃. User-inputted values ​​must be within this valid range to be accepted.

[0067] S203: The user confirms the input target temperature setpoint by pressing the "Confirm" key (or similar function key) on the human-machine interface unit. This setpoint is then updated to a global variable (or software register) within the control calculation unit, denoted as Ts, specifically for storing the target setpoint. This variable is directly read by the control algorithm in each loop, thereby ensuring the consistency and real-time performance of the adjustment target.

[0068] At the same time, the system will immediately record a timestamp for this set value update event. This timestamp also comes from the common hardware timer provided for data synchronization in the control and operation unit (which is the same as the timer described in step S103), thereby ensuring that it has the same high precision and the same time base as the timestamps of temperature, current and other sampled data, providing an accurate time reference for the time alignment of multiple signals in the subsequent step S5.

[0069] S204: During a complete control process of the system (i.e., within the "temperature control cycle" defined in step S1001 below), the above target temperature setpoint (Ts) will remain constant unless the user actively modifies it again.

[0070] This stability provides a clear adjustment target for the control algorithm and also provides a stable reference benchmark for subsequent fault diagnosis algorithms, avoiding misjudgment interference caused by frequent changes in set values.

[0071] S3, based on the deviation between the target temperature setpoint and the feedback temperature data, the controller generates actuator drive commands, specifically including the following sub-steps:

[0072] S301: This step is executed by the control and arithmetic unit.

[0073] The core processing unit of this unit is typically a medium-performance microcontroller (MCU) with sufficient computing power to run control algorithms and diagnostic logic in real time, and it integrates an analog-to-digital converter (ADC) channel and a pulse width modulation (PWM) signal generator. For example, a 32-bit MCU can be used to implement this.

[0074] S302: The control calculation unit continuously reads the target temperature setpoint (Ts) from step S2 and the real-time feedback temperature value (Tf) from step S1, and calculates the real-time deviation between the two. This deviation value serves as the input to the control algorithm.

[0075] S303: The controller runs a positional PID control algorithm commonly used in embedded systems.

[0076] The algorithm calculates the absolute control quantity u(t) for adjusting the actuator power based on the real-time temperature deviation e(t) through a weighted sum of proportional, integral and derivative operations.

[0077] The core parameters in the control algorithm, including the proportional gain Kp, integral time constant Ti, and derivative time constant Td, are tuned based on the thermal inertia of the controlled object before the equipment leaves the factory and remain unchanged during subsequent operation.

[0078] Therefore, the fault self-diagnosis function of the present invention is completely independent of the above-mentioned fixed PID parameters. The core of the diagnosis lies in analyzing and extracting features from the real-time data sequence of "set value-feedback temperature-actuator current" collected in steps S1, S2 and S4, thereby realizing the observation and judgment of the system status.

[0079] S304: The controller converts the calculated control quantity u(t) into a pulse width modulation (PWM) signal with an adjustable duty cycle through a linear mapping relationship.

[0080] Specifically, the effective output range of the control quantity u(t) is set as follows: It directly and proportionally corresponds to the duty cycle range of the PWM signal [0%, 100%] (or a preset effective operating range), and the duty cycle of the PWM signal directly reflects the instantaneous power level that the controller expects to apply to the controlled object.

[0081] S305: This PWM signal is sent to the actuator drive unit and is typically used to control the on and off of a solid-state relay (SSR).

[0082] Solid-state relays periodically connect or disconnect the power supply circuit to the final actuator (such as heating wire or refrigeration compressor) based on the state of the PWM signal, thereby realizing the regulation of the heating or cooling power of the controlled object.

[0083] Because of this PWM-based switching control method, the operating current flowing through the actuator will exhibit a pulse shape synchronized with the PWM signal. This characteristic is the basis for subsequent current signal monitoring and analysis.

[0084] S4, the operating current signal of the actuator is monitored in real time through the current detection circuit, specifically including the following sub-steps:

[0085] S401: The current monitoring unit uses a high-precision Hall effect current sensor.

[0086] The primary side of the sensor is directly connected in series in the power supply circuit of the actuator (such as a heating wire or compressor), usually between the power supply and the actuator, to sense the actual operating current flowing through the load.

[0087] S402: The secondary side of the sensor outputs an analog voltage signal that is proportional to the operating current of the primary side.

[0088] The sensor has a standard measurement range of 0 to 10 amperes (A), with a linearity error of less than 0.5% within its range. Its bandwidth is designed to be no less than 500 Hz, in order to ensure that the system can accurately and quickly capture the dynamic current characteristics (such as step changes) generated by the actuator during startup, shutdown, or power changes.

[0089] S403: The control unit samples the above analog voltage signal at a frequency of 1 kHz (i.e., once every 1 millisecond).

[0090] The voltage value obtained from each sampling is converted into a digital value by an analog-to-digital converter and then stored.

[0091] S404: Each stored current sampling data point will be appended with a timestamp, which is consistent with the timestamp described in step S103, and originates from the common hardware timer provided for data synchronization in the control arithmetic unit, with a resolution of 1 millisecond.

[0092] S405: Since the power supply of the actuator is controlled by the aforementioned PWM signal, the monitored operating current signal naturally exhibits pulse characteristics synchronized with the PWM wave. The amplitude of the current pulse directly reflects the instantaneous current flowing through the actuator, and thus directly relates to the instantaneous power consumption state of the actuator. This pulse shape and amplitude information are the key basis for subsequent analysis of whether the actuator operates normally and whether there are faults such as open circuit or short circuit.

[0093] S5 performs timestamp synchronization processing on the feedback temperature data, target temperature setpoint, and actuator operating current signal to form a unified multi-dimensional time-series data sequence, specifically including the following sub-steps:

[0094] S501: The three raw data sources (feedback temperature, target setpoint, and operating current) from the temperature sensing unit, human-machine interaction unit, and current monitoring unit arrive asynchronously.

[0095] The system opens three independent circular buffers inside the microcontroller to temporarily store the three streams of raw data. The depth of each buffer is set to 100 data points. When new data arrives, it automatically overwrites the oldest data, forming a first-in-first-out data stream.

[0096] S502: The data synchronization unit triggers a timer interrupt at a fixed time period (5 milliseconds). In this interrupt service routine, the synchronization logic is activated and begins to process the data in the buffer.

[0097] S503: During each synchronization interrupt, the system safely reads the latest valid data (i.e., the data with the most recent timestamp) from each of the three circular buffers into a temporary variable.

[0098] Since the sampling times of the three raw data streams are not exactly the same, the system uses the discrete sampling time point of the current signal with the highest sampling frequency (1kHz) as the time alignment reference. Specifically, for each known sampling time point of the current signal (e.g., ... The system searches for timestamps that exactly match the temperature data and setpoint data buffers. Two valid data points, one before and one after; then, using a linear interpolation algorithm, the temperature value Tf and the setpoint Ts are calculated based on the values ​​of these two data points and the timestamp. The estimated value of the time.

[0099] S504: After the above interpolation and alignment processing, at each current sampling time point The above yields a set of observation data that is strictly aligned in time, including the timestamp (t) at that moment, the estimated value of the target setpoint (Ts), the estimated value of the feedback temperature (Tf), and the actual operating current value (I) collected at that moment.

[0100] These four values ​​are combined into a four-dimensional vector [t, Ts, Tf, I]. The continuously generated vectors are arranged in chronological order, thus forming a unified multidimensional time-series data sequence.

[0101] The time alignment error in the entire synchronization process mainly stems from interpolation calculations. By combining the temperature sampling period (50ms), the event-driven update of the set value, and the high-frequency sampling of the current (1ms), along with a 5ms synchronization processing period, the error is controlled within 2 milliseconds, meeting the time accuracy requirements of subsequent feature extraction.

[0102] S6, perform sliding window segmentation on the multidimensional time series data sequence to obtain multiple consecutive time segments, specifically including the following sub-steps:

[0103] S601: The feature extraction unit performs a sliding window segmentation operation on the multidimensional time series data sequence generated in step S5.

[0104] First, the two core parameters, window length and sliding step size, are determined. In a preferred embodiment of the invention, the window length is set to 30 seconds. This length is chosen to cover a sufficiently long temperature dynamic response process of the controlled object (such as an oven cavity or a refrigerator compartment), thereby capturing the typical characteristics of the system in heating, cooling, or steady-state conditions.

[0105] Since the time resolution of the data sequence is 1 millisecond, it means that each standard window theoretically contains 30,000 data points.

[0106] S602: Considering that the actuator (such as the heater) uses PWM control and its operation is intermittent, the amount of effective data contained in each sliding window (i.e. the moment when the actuator actually moves or the temperature changes) is dynamic.

[0107] To exclude invalid operating conditions such as the system being in complete standby, just started, or under extremely light load, and to ensure the statistical reliability of subsequent feature calculations, the system sets a validity threshold: each time segment (window) to be analyzed must contain at least 50 "valid data points".

[0108] Here, a "valid data point" is defined as a synchronization data point that meets any of the following conditions:

[0109] (1) The operating current value I is greater than zero (indicating that the actuator is turned on);

[0110] (2) The absolute value of the difference between the feedback temperature values ​​Tf at two adjacent synchronization moments exceeds a preset small threshold. (For example (), representing a identifiable change in temperature.

[0111] S603: The step size of the sliding window is preferably set to 5 seconds, which means that the system slides the window forward once every 5 seconds to generate a new, partially overlapping 30-second time segment for calculation (for example, the first segment covers data from 0 to 30 seconds, and the second segment covers data from 5 to 35 seconds). The 5-second step size provides a good balance between the real-time update frequency of the diagnosis and the computational overhead.

[0112] S604: Windows are managed in memory using a fixed-length array combined with a circular index (or circular buffer) to achieve first-in, first-out (FIFO) management.

[0113] When a new synchronization data point needs to be added to the current window, it is stored in the next available position of the array (updating the tail index). At the same time, the oldest data point is logically overwritten due to the limited array space (achieved by moving the head index). This ensures that the memory buffer size used for feature calculation is strictly constant, avoids dynamic memory allocation, and is suitable for long-term stable operation in resource-constrained embedded controllers.

[0114] S7, for each time segment, calculates the feedback temperature change rate, the average actuator current, the integral of the deviation between the setpoint and the feedback value, and the differential component of the deviation, specifically including the following sub-steps:

[0115] S701: For all feedback temperature data arranged in chronological order within the current time segment, the system first calculates the first-order difference value of each pair of adjacent data points in the sequence (i.e., the temperature at the next moment minus the temperature at the previous moment).

[0116] To eliminate the influence of heating or cooling direction, the system takes the absolute values ​​of these differences and then calculates the arithmetic mean of these absolute values ​​(N-1 in total, where N is the total number of temperature data points within the window). This average value is the feedback temperature change rate within that time segment. The unit is degrees Celsius per second (°C / s), which helps identify whether the system is in a state of stagnant temperature response (F1 too low) or abnormally drastic fluctuation (F1 abnormally high).

[0117] S702: The system iterates through all operating current sampling values ​​within the current time segment, ignoring points where the current value is zero (corresponding to the actuator being off), and calculates the arithmetic mean of all remaining non-zero current values.

[0118] If all current values ​​within the window are zero, the mean is recorded as zero. This calculation result is the actuator current mean (…). This summation directly reflects the actuator's average operating current during that time period, and thus relates to its average output power level. In actual embedded code, this summation and averaging calculation typically employs fixed-point arithmetic to ensure speed and determinism.

[0119] S703: At each synchronous sampling moment of the time segment, the system calculates the instantaneous deviation between the target setpoint (Ts) and the feedback temperature value (Tf). .

[0120] Subsequently, the instantaneous deviation e at each sampling moment within the entire time period is multiplied by the sampling time interval Δt (i.e., 1 millisecond), and then summed to obtain the integral of the deviation. The unit is degrees Celsius per second (°C·s), which quantifies the cumulative "amount" of the overall temperature deviation from the set target within that time window (the combined effect of the magnitude of the deviation and the duration).

[0121] S704: Take the five nearest and consecutive synchronous data points at the end of the current time segment and extract their corresponding setpoint and feedback temperature deviation sequences.

[0122] Using the least squares method to linearly fit this short-time deviation sequence is a robust method for estimating the trend slope. The slope (k) of the fitted line is the differential deviation (de / dt), in degrees Celsius per second (°C / s).

[0123] The differential is calculated by selecting the last 5 points (approximately a 5-millisecond span) to capture the trend of deviation changes in the system at the most recent moment and to determine whether the deviation is expanding, converging, or remaining stable.

[0124] S705: The above four features characterize the system's behavior within a time segment from different dimensions:

[0125] The feedback temperature change rate (F1) reflects the thermal dynamic response of the controlled object;

[0126] The average actuator current (F2) directly reflects the actuator's output level;

[0127] The integral of the deviation (F3) quantifies the cumulative error of the control effect;

[0128] The differential deviation (F4) reveals the recent trend of control effectiveness.

[0129] The four-dimensional feature vectors [F1, F2, F3, F4] formed by the above combination constitute a state descriptor that can comprehensively reflect the coupling relationship between "setting command - temperature response - actuator action", providing highly discriminative input features for subsequent fault classification based on decision tree.

[0130] S8, taking the above four features as input, feeds them into the pre-trained fault classification decision tree model and outputs the state category of the system in the current time period. This includes the following sub-steps:

[0131] S801: When the fault identification unit starts up, it loads a pre-trained fault classification decision tree model. For example, the model can be a binary decision tree of moderate depth (e.g., 4 layers deep, containing about 15 decision nodes).

[0132] To meet the requirements of embedded systems for deterministic operation, low latency, and efficient resource utilization, during the software compilation phase, the logic of the decision tree (i.e., the sequence of decision rules from the root node to the leaf node) is pre-flattened and converted into a multi-level indexed static lookup table, which is then burned into the microcontroller's read-only memory (ROM).

[0133] During runtime, the fault identification unit does not need to dynamically parse the tree structure. It can directly query the table in sequence according to the input feature vector to obtain the classification result, thereby ensuring a fixed classification time of milliseconds or even microseconds.

[0134] S802: The topology and threshold values ​​of each node in this decision tree model are derived from a large number of fault injection experiments and data learning conducted in a controlled laboratory environment before the equipment leaves the factory. The experiment systematically simulates four typical operating conditions that need to be distinguished: sensor misalignment (such as manually changing the resistance value of the NTC thermistor), actuator failure (such as disconnecting the heating wire circuit), environmental disturbance (such as opening the equipment door for a short period of time), and normal operation.

[0135] For each state, a large number (e.g., no less than 1000 for each) of time segments corresponding to four-dimensional feature vectors [F1, F2, F3, F4] are collected as training samples.

[0136] By performing statistical analysis on these sample datasets (e.g., calculating the mean and standard deviation of each feature under each state, or observing its distribution range), typical intervals of feature values ​​corresponding to different states can be objectively defined. Decision tree learning algorithms (such as CART, ID3, etc.) utilize this interval information to automatically or assistedly determine the optimal combination of decision nodes and thresholds that can distinguish the four states. The final generated decision tree logic reflects the characteristic patterns of the coupling relationship between "setting command - temperature response - actuator action" under different fault modes.

[0137] S803: For each four-dimensional feature vector [F1, F2, F3, F4] generated in step S7, the fault discrimination unit takes it as input and executes the decision logic based on the decision logic embedded in the lookup table, starting from the first judgment condition corresponding to the root node.

[0138] At each decision node, the corresponding feature quantity in the feature vector (such as the average current of the F2 actuator) is compared with the node's preset threshold. Based on the comparison result (yes or no), the node is selected to enter the left subtree or the right subtree until a leaf node is reached.

[0139] S804: The arriving leaf node represents the state category of the system in the current time segment. The output result is one of "normal operation", "sensor misalignment", "actuator failure" or "environmental disturbance".

[0140] Its decision-making logic is essentially a combination of multiple feature quantities based on a predetermined threshold. For example, if the training data of a certain type of equipment shows that when the average actuator current (F2) is maintained above a certain level while the temperature change rate (F1) is abnormally low, it often corresponds to sensor inaccuracy; conversely, if the average current is close to zero while the temperature deviation integral (F3) continues to increase, it strongly suggests actuator failure.

[0141] The time required to traverse the entire decision tree to complete one classification is extremely short (e.g., no more than 50 microseconds), which fully meets the real-time requirements.

[0142] S9, when multiple consecutive time segments are determined to belong to the same abnormal state category, the corresponding fault alarm signal is triggered, and the fault type identifier is output through the human-machine interface. This includes the following sub-steps:

[0143] S901: The alarm output unit continuously monitors and records the sequence of status category results output by the fault discrimination unit (step S8).

[0144] The sequence is arranged in chronological order, with each result corresponding to a time segment with a 5-second step.

[0145] S902: To effectively suppress false alarms caused by transient disturbances, the system sets a continuous trigger condition. For example, it can be set so that the abnormal state is determined to be a persistent real fault or disturbance only when the same abnormal state category ("sensor misalignment", "actuator failure" or "environmental disturbance") appears multiple times (e.g., 3 times) consecutively in the result sequence.

[0146] With a decision step size of 5 seconds, three consecutive occurrences indicate that the abnormal state has lasted for at least 15 seconds, which helps to distinguish between brief disturbances and genuine faults.

[0147] S903: Once the above continuity conditions are met, the alarm output unit immediately triggers the fault alarm signal corresponding to the abnormal state category, and displays the specific fault type identifier (such as "E01: Temperature sensor fault", "E02: Heater open circuit") to the user through the LCD screen of the human-machine interaction unit.

[0148] S904: Upon triggering an alarm, the system will determine whether to perform a protective shutdown based on the currently determined fault type and its severity. The specific logic is as follows:

[0149] For the "actuator failure" category: the system considers it the highest risk, and once the alarm is triggered, it will immediately cut off the control signal of the actuator drive unit and disconnect the load power supply.

[0150] For the "sensor misalignment" category: The system further assesses the severity of the fault, based on the characteristic quantities calculated for the current time segment in step S7. For example, the system checks the absolute value of the deviation integral (F3). If this value exceeds a preset "maximum allowable cumulative deviation" threshold (this threshold is set and stored at the factory based on the equipment's thermal safety margin), it is considered that the sensor misalignment has caused a serious deviation in temperature control, posing a safety hazard, thereby triggering a protective shutdown; if it does not exceed this threshold, the system only maintains the alarm prompt and continues to operate and monitor.

[0151] For the "Environmental Disturbance" category: the system will only issue an alarm and will not perform any protective power-off operations.

[0152] Through the aforementioned graded response mechanism, the system can avoid unnecessary downtime caused by non-critical sensor drift or brief external interference, while ensuring safety, thereby improving the overall availability of the equipment.

[0153] S10, after each system startup or completion of a full temperature control cycle, the internal judgment threshold of the fault classification decision tree model is updated based on the multi-dimensional time-series data sequence during the current operation to adapt to parameter drift caused by equipment aging. This includes the following sub-steps:

[0154] S1001: The model update unit performs adaptive threshold correction after each system startup or after completing a full "temperature control cycle".

[0155] The "temperature control cycle" is defined as the entire process from when the user sets the target temperature value until the feedback temperature enters and stabilizes within the range of ±1℃ of the set value, and remains stable for at least 10 minutes.

[0156] S1002: To avoid interference from faulty or abnormal operating data on the learning process (i.e., “polluting the model”), the model update function is only activated under strict conditions.

[0157] The specific condition is that, throughout the entire temperature control cycle to be evaluated, all status category results output by the fault discrimination unit in step S8 are "normal operation".

[0158] Only periodic data that is determined to be operating normally throughout the entire process will be used for subsequent threshold update calculations.

[0159] S1003: For the current temperature control cycle that meets the conditions, the model update unit extracts the corresponding multi-dimensional time series data and calculates the four characteristic quantities (feedback temperature change rate, actuator current mean, deviation integral, and deviation differential) within the cycle according to the method in step S7.

[0160] Subsequently, the system calculates the "long-term moving average" and "standard deviation" of these characteristics. Here, "long-term" refers to the data window consisting of the 100 most recently completed temperature control cycles that were judged to be "normal operation".

[0161] The features of this cycle will be included in this moving window for calculation and updating.

[0162] S1004: The system compares the long-term moving average of each feature with its "initial reference value" determined by fault injection experiments before the equipment leaves the factory.

[0163] If the moving average of a certain feature deviates from its initial reference value by more than twice the long-term standard deviation of that feature (i.e., more than "two standard deviations"), then the system parameter corresponding to that feature is determined to have undergone significant drift, which may be due to aging, and the corresponding decision tree decision threshold needs to be adaptively adjusted.

[0164] S1005: For features deemed to require adjustment, the system fine-tunes the threshold of the corresponding decision node in the decision tree model according to the following steps:

[0165] (a) Calculate the offset ratio: First, calculate the long-term moving average of this feature ( ) relative to its initial factory reference value ( The relative offset ratio R:

[0166] ;

[0167] Among them, the relative offset ratio R quantifies the direction and magnitude of the relative change in the statistical center of this feature due to system aging.

[0168] (b) Determine the adjustment amount and implement the update: Let the original threshold of the node to be adjusted be... The system follows the formula Calculate the initial adjustment amount.

[0169] Here, α is a preset adjustment coefficient (e.g., α=0.5) used to control the adjustment intensity, so that the change in the threshold is more gradual than the drift of the feature quantity itself, avoiding overreaction.

[0170] Then, new threshold candidate values ​​are calculated. .

[0171] To prevent excessively large adjustments in a single instance, the system will verify the adjustment range, requiring... If the calculated If it exceeds this range, it will be forcibly restricted to... On the boundary values.

[0172] (c) Update storage and load: Calculate and verify the new threshold. The system will immediately update the corresponding thresholds in the decision tree model used by the fault detection unit during operation. At the same time, in order to ensure that the effect of adaptive learning is not lost after the device is powered off, the system will write all the updated decision tree thresholds as a complete set into a specific storage area of ​​the non-volatile memory (such as on-chip Flash or external EEPROM) of the control operation unit.

[0173] When the system is powered on again, the fault diagnosis unit will directly load the latest threshold set from the non-volatile memory for initialization, instead of loading the factory initial values, thereby enabling the diagnostic logic to continuously track and adapt to the aging process of the entire life cycle of the equipment.

[0174] For example, aging of relay contacts may cause the average value of the actuator current (F2) monitored over a long period of time to slowly decrease. The system calculates its negative offset ratio R through the above steps, and then adjusts the lower limit of the relevant current threshold in the "actuator failure" judgment by proportion and small amount. In this way, the diagnostic logic can adapt to the degradation of component performance and maintain accurate fault detection sensitivity over a long period of time.

[0175] This embodiment fully demonstrates the implementation process of a temperature control method with fault self-diagnosis function through the above steps S1 to S10. The core of this method lies in forming a closed loop of synchronous data acquisition, dynamic feature extraction, intelligent decision classification, anti-interference alarm, and adaptive update.

[0176] To achieve the aforementioned temperature control method with fault self-diagnosis function, the present invention also provides a temperature control system with fault self-diagnosis function, specifically comprising the following units:

[0177] The temperature sensing unit's core component is a negative temperature coefficient (NTC) thermistor conforming to the international standard IEC 60751. Its specific implementation has been detailed in step S1 (particularly sub-steps S101 and S102), including its stainless steel probe encapsulation, direct contact with the heat exchange medium, temperature measurement range and accuracy, and the complete signal conditioning link formed by a voltage divider circuit with a precision fixed resistor, buffered by an operational amplifier, and then connected to the ADC channel of the control computing unit. Its function is to sense the temperature of the controlled object in real time and accurately, and convert the physical quantity into an electrical signal that can be processed by the microcontroller.

[0178] The human-machine interface unit consists of an LCD screen and membrane keys (or touch keys). Its functions include receiving user input (such as the target temperature setpoint) and outputting system information (such as the current temperature and fault codes). Its implementation details are explained in step S2, including dynamic limitation of the setpoint range, a confirmation mechanism, and timestamp recording synchronized with a common timer to ensure that human-machine interaction events are accurately integrated into the multi-source data synchronization sequence.

[0179] The control and arithmetic unit is the core processing platform of the system, typically implemented by a microcontroller (MCU) with sufficient computing power and necessary peripheral interfaces, such as a 32-bit MCU integrating an ADC and a PWM generator. Its core function is to execute two parallel algorithmic tasks:

[0180] Control algorithm task: As described in step S3, run a fixed PID control algorithm to generate a PWM drive signal based on the deviation between the set value and the feedback temperature.

[0181] The self-diagnostic algorithm task involves comprehensively executing all diagnostic logic described in steps S5 to S10, including data synchronization, feature extraction, decision tree classification, alarm judgment, and model adaptive updating. This unit integrates the logical functions of the data synchronization unit, feature extraction unit, fault judgment unit, alarm output unit, and model update unit through software programming.

[0182] The execution drive unit, acting as the power execution link for control commands, mainly consists of a solid-state relay and the load it drives (heating wire or refrigeration compressor). The control terminal of the solid-state relay receives a PWM signal from the control arithmetic unit, and its output terminal is connected in series in the load power supply circuit. Its key performance parameters include: on-state voltage drop (e.g., <1.5V), maximum load current (e.g., 10A), and response time (e.g., <10ms) to ensure reliable and fast power switching. The operating status of this unit is directly monitored by current.

[0183] The current monitoring unit is used to acquire the actuator's operating current in real time. Its core is the high-precision Hall effect current sensor described in step S4 and its associated signal conditioning circuit. The primary side of the sensor is connected in series with the actuator's power supply circuit, and the secondary side outputs a voltage signal proportional to the current. The signal conditioning circuit typically includes necessary filtering, amplification, and level adjustment to adapt the output signal to the input range of the control arithmetic unit (ADC). This unit is the hardware foundation for acquiring the "actuator current" signal.

[0184] The data synchronization unit, feature extraction unit, fault diagnosis unit, alarm output unit, and model update unit are all software functional modules running on the control and calculation unit, and are not independent physical hardware. Specifically:

[0185] The data synchronization unit achieves millisecond-level timestamp alignment of the three raw data streams (temperature, setpoint, and current) through software interrupts and a circular buffer management system (as described in step S5).

[0186] The feature extraction unit is implemented using an efficient fixed-point arithmetic software module, which calculates four core feature quantities from the synchronized data sequence according to the algorithm in step S7.

[0187] The fault discrimination unit stores the pre-trained fault classification decision tree model in memory in the form of a lookup table, and performs fast classification of the input feature vector through efficient lookup logic (step S8).

[0188] The alarm output unit monitors the classification result sequence, determines whether to trigger alarm and protection actions according to the continuous judgment logic in step S9, and controls the human-machine interaction unit to display fault information.

[0189] The model update unit, as a background task, is activated when the strict condition of step S10 (complete normal temperature control cycle) is met. It calculates long-term statistics, updates the threshold parameters in the decision tree safely according to preset rules, and saves the updated thresholds to non-volatile memory.

[0190] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, the embodiments should be regarded as exemplary and non-limiting in all respects.

[0191] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment includes only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A temperature control method with fault self-diagnosis function, characterized in that, Includes the following steps: The target temperature setpoint, feedback temperature data, and actuator operating current signal are collected synchronously to obtain three raw data streams. The three raw data streams are then time-stamped and synchronized to form a unified multi-dimensional time-series data sequence. The multidimensional time-series data sequence is divided into multiple consecutive time segments by a sliding window. For each time segment, extract multiple feature quantities that comprehensively reflect the coupling relationship between the setting command, temperature response, and actuator action; The extracted features are input into a pre-trained fault classification decision tree model, which outputs the system state category within the current time segment. The state category includes normal operation, sensor misalignment, actuator failure, and environmental disturbance. When multiple consecutive time segments are identified as belonging to the same abnormal state category, a fault alarm corresponding to that category is triggered. Based on the data collected by the system under normal operating conditions, the internal decision threshold of the fault classification decision tree model is adaptively updated to track parameter drift caused by equipment aging.

2. The temperature control method with fault self-diagnosis function according to claim 1, characterized in that, The three streams of raw data undergo timestamp synchronization, specifically including: Using the sampling time point of the actuator operating current signal with the highest sampling frequency as a reference, the estimated values ​​of the target temperature setpoint and the feedback temperature data at the corresponding time are calculated through a linear interpolation algorithm, forming a multi-dimensional time-series data sequence with strict time alignment.

3. The temperature control method with fault self-diagnosis function according to claim 1, characterized in that, The extracted features include: The feedback temperature change rate, the average actuator current, the integral of the deviation between the target temperature setpoint and the feedback temperature data, and the differential deviation within the time segment are all measured.

4. The temperature control method with fault self-diagnosis function according to claim 1, characterized in that, The fault classification decision tree model is pre-converted into a static lookup table during the software compilation stage and then stored in read-only memory. During runtime, the state classification is completed by querying the static lookup table.

5. The temperature control method with fault self-diagnosis function according to claim 1, characterized in that, The steps for triggering the fault alarm include: An alarm is triggered only when the same abnormal state category appears continuously in the result sequence of multiple consecutive time segments, and is thus identified as a real fault or disturbance.

6. The temperature control method with fault self-diagnosis function according to claim 5, characterized in that, The method also includes a graded response step: If the status category is actuator failure, a protective shutdown is performed immediately; If the status category is sensor misalignment, the severity of the fault is assessed based on the characteristic values, and a protective shutdown is performed only if the assessment result exceeds a safety threshold. If the status category is environmental disturbance, only an alarm will be issued.

7. The temperature control method with fault self-diagnosis function according to claim 1, characterized in that, The step of adaptively updating the internal judgment threshold of the fault classification decision tree model is activated only after the system completes a full temperature control cycle that is judged to be operating normally throughout.

8. The temperature control method with fault self-diagnosis function according to claim 7, characterized in that, The adaptive update steps specifically include: Calculate the long-term moving average and standard deviation of key characteristic quantities over the most recent normal temperature control cycles; If the deviation of the long-term moving average from the initial reference value exceeds a predetermined multiple of its long-term standard deviation, it is determined that the threshold of the corresponding decision node in the decision tree model needs to be adaptively adjusted.

9. The temperature control method with fault self-diagnosis function according to claim 8, characterized in that, The process of adjusting the threshold of the decision node includes: The adjustment amount is calculated based on the offset magnitude, and the updated threshold set is stored in non-volatile memory for loading on the next system startup.

10. A temperature control system with self-diagnostic fault function, used to implement the temperature control method with self-diagnostic fault function as described in any one of claims 1-9, characterized in that, include: Temperature sensing unit, used to collect and feedback temperature data; The human-computer interaction unit is used to receive the target temperature setpoint. The execution drive unit is used to drive the load according to control commands; A current monitoring unit is used to monitor the operating current signal of the execution drive unit; The control and calculation unit is connected to the temperature sensing unit, the human-machine interaction unit, the execution drive unit, and the current monitoring unit, respectively. The control and arithmetic unit is configured to perform the following functions: The target temperature setpoint, feedback temperature data, and operating current signal are simultaneously acquired and processed to form a multi-dimensional time-series data sequence. The sequence is segmented using a sliding window and its features are extracted. The pre-trained fault classification decision tree model classifies the extracted features and outputs the system state category. Trigger tiered alarms or protection actions based on continuous classification results; The decision threshold of the fault classification decision tree model is adaptively updated based on normal operation data.