Intelligent constant-temperature water heating control method, system, device and medium
By employing an intelligent constant-temperature water heating control method, combined with technologies such as adaptive Kalman filtering, fuzzy inference, and digital twin feedforward prediction, the problems of slow response and oscillation in traditional PID controllers in heating systems are solved, achieving more efficient constant-temperature control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHWEST JIAOTONG UNIV
- Filing Date
- 2026-04-17
- Publication Date
- 2026-06-19
Smart Images

Figure CN122237087A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent temperature control, and in particular relates to an intelligent constant temperature water heating control method, system, equipment and medium. Background Technology
[0002] With the in-depth development of smart heating and building automation technologies, digital twins, as a core enabling technology, achieve dynamic simulation and in-depth insight into the entire lifecycle of complex heating systems by constructing virtual mirrors of physical systems. This technology boasts outstanding features such as high-fidelity mapping, real-time synchronization, and forward-looking prediction, providing a new path to achieve precise control from passive adjustment to active optimization, thus posing a demand for transformation in traditional heating regulation methods. In traditional technologies, water temperature or flow control in heating systems generally employs PID (Proportional-Integral-Derivative) controllers based on fixed parameters. This method adjusts valve opening or pump frequency based on the real-time deviation between the controlled temperature and the setpoint through fixed proportional, integral, and derivative operations. Its control logic is clear, its structure is simple, and it can maintain basic control effects under stable operating conditions. However, when facing the inherent large thermal inertia, strong nonlinearity, and multi-source disturbances of actual heating systems, including sudden changes in outdoor temperature, random variations in user load, and time-varying characteristics of the pipe network, the current fixed-parameter PID control method has significant limitations. Its parameters cannot adapt to dynamic processes, resulting in slow response, excessively long adjustment time, and a tendency to overshoot and oscillate. When disturbances are frequent, the control quality deteriorates significantly, affecting thermal comfort and hindering further improvements in energy efficiency. Summary of the Invention
[0003] Therefore, it is necessary to provide an intelligent constant temperature water heating control method, system, equipment, and medium that can realize online self-tuning of PID parameters and active compensation for measurable disturbances, in order to address the above-mentioned technical problems.
[0004] Firstly, this application provides an intelligent constant-temperature water heating control method, including:
[0005] Acquire multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates;
[0006] Based on the real-time state estimate, feedback fuzzy inference is performed to obtain feedback control commands, and based on the real-time state estimate, digital twin feedforward prediction simulation inference is performed to obtain feedforward control commands.
[0007] Based on feedback control commands and feedforward control commands, adaptive weight fusion is performed to obtain preliminary optimized control commands;
[0008] Based on the feedforward neural network compensation model, the preliminary optimized control command is compensated to obtain the theoretical control command; the feedforward neural network compensation model is trained using historical operating data.
[0009] Based on rigid safety constraints, safety constraints are applied to the theoretical control commands to obtain the water heating control commands.
[0010] Furthermore, based on the real-time state estimate, feedback fuzzy inference is performed to obtain feedback control commands, including:
[0011] The difference between the real-time state estimate and the target value is calculated to obtain the control deviation value, and the control deviation change rate is calculated based on the control deviation value.
[0012] The control deviation value and the rate of change of control deviation are fuzzified to obtain the fuzzy deviation amount, and the fuzzy deviation amount is matched with the fuzzy control rules in the fuzzy rule base to obtain the activation rule;
[0013] Based on the activation rules, the suggested adjustment values of the PID parameters are calculated to obtain the real-time adjustment of the PID.
[0014] The updated PID controller parameters are obtained by adding the real-time PID adjustment value and the PID reference value.
[0015] Based on the updated PID controller parameters, control deviation value, control deviation rate of change, and historical deviation data, the PID controller output value is calculated to obtain the feedback control command.
[0016] Furthermore, the formula for calculating the output value of the PID controller is as follows:
[0017]
[0018] in, The PID controller output value at time step t. The proportional gain coefficient for time step t. The integral gain coefficient at time step t. The differential gain coefficient at time step t. The control deviation value at time step t. For sampling control period, The control deviation at time step t-1, The discrete integral term is used to control the deviation.
[0019] Furthermore, based on the real-time state estimate, digital twin feedforward prediction simulation inference is performed to obtain feedforward control commands, including:
[0020] The real-time state estimate is set as the initial state of the digital twin virtual model, and a future perturbation sequence is added to the digital twin virtual model to obtain a digital twin prediction model instance.
[0021] Based on a digital twin prediction model example, dynamic simulation with forward time stepping is performed to obtain the state prediction trajectory.
[0022] Based on the state prediction trajectory, the predicted value of the controlled temperature is extracted, and the prediction deviation main feedforward is calculated based on the difference between the predicted value of the controlled temperature and the target value.
[0023] Based on the future disturbance sequence, the disturbance compensation is calculated, and the prediction deviation feedforward and the disturbance compensation are weighted and summed to obtain the basic feedforward control command.
[0024] The basic feedforward control command is subjected to safety limiting to obtain the feedforward control command.
[0025] Furthermore, based on the feedback control command and the feedforward control command, adaptive weight fusion is performed to obtain the preliminary optimized control command, including:
[0026] Based on the real-time state estimate, the dynamic performance index value is calculated, and based on the decision threshold, the dynamic performance index value is mapped to the weight coefficient of the feedforward control command to obtain the feedforward weight coefficient.
[0027] Based on the feedforward weighting coefficient, the feedback control command and the feedforward control command are weighted and fused to obtain the preliminary optimized control command;
[0028] The formula for calculating the feedforward weight coefficient is as follows:
[0029]
[0030] in, Here, represents the feedforward weighting coefficients, and k is the steepness factor of the decision curve. is the decision threshold, and S is the dynamic performance index value.
[0031] Furthermore, based on rigid safety constraints, safety constraints are applied to the theoretical control commands to obtain the water and heating control commands, including:
[0032] The time difference is obtained by calculating the difference between the timestamp of the theoretical control command and the timestamp of the historical valid control command.
[0033] Based on the time difference and the operation control cycle time, timeout detection is performed to obtain a time safety signal;
[0034] If the time safety signal is safe, the theoretical control command is set as the preliminary safety command; or if the time safety signal is dangerous, a fail-safe backup command is generated.
[0035] Based on hard safety constraints, the initial safety instructions are physically limited to obtain water and heating control instructions. The hard safety constraints include the physical limit operating parameters of the actuator, and the water and heating control instructions are used to instruct the actuator to set the operating parameters.
[0036] Secondly, this application also provides an intelligent constant temperature water heating control system, including:
[0037] The filtering module is used to acquire multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates.
[0038] The inference module is used to perform feedback fuzzy inference based on real-time state estimates to obtain feedback control commands, and to perform digital twin feedforward prediction simulation inference based on real-time state estimates to obtain feedforward control commands.
[0039] The fusion module is used to perform adaptive weight fusion based on feedback control commands and feedforward control commands to obtain preliminary optimized control commands;
[0040] The compensation module is used to compensate the preliminary optimized control commands based on the feedforward neural network compensation model to obtain the theoretical control commands; the feedforward neural network compensation model is trained using historical operating data.
[0041] The constraint module is used to apply safety constraints to theoretical control commands based on hard safety constraints, thereby obtaining water and heating control commands.
[0042] Thirdly, this application also provides a computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement any step of the method provided in the first aspect of this application.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any step of the method provided in the first aspect of this application.
[0044] The aforementioned intelligent constant-temperature water heating control method, system, equipment, and medium acquire multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates. Based on the real-time state estimates, feedback fuzzy inference is performed to obtain feedback control commands, and based on the real-time state estimates, digital twin feedforward prediction simulation inference is performed to obtain feedforward control commands. Based on the feedback control commands and feedforward control commands, adaptive weight fusion is performed to obtain preliminary optimized control commands. Based on a feedforward neural network compensation model, the preliminary optimized control commands are compensated to obtain theoretical control commands. The feedforward neural network compensation model is trained using historical operating data. Based on hard safety constraints, safety constraints are applied to the theoretical control commands to obtain water heating control commands. Fuzzy inference is introduced to achieve online self-tuning of PID parameters. By fusing feedforward prediction and actively compensating for measurable disturbances, the anti-interference capability and response speed are significantly improved. A weight decision algorithm based on real-time performance indicators is designed to dynamically adjust the fusion ratio of feedback control and feedforward control, which can balance the contradiction between dynamic response speed and steady-state control accuracy, effectively improving the reliability and accuracy of constant-temperature water heating control. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the process of an intelligent constant temperature water heating control method provided in an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the structure of an intelligent constant temperature water heating control system provided in an embodiment of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] In one embodiment, such as Figure 1 As shown, an intelligent constant-temperature water heating control method is provided. This embodiment illustrates the method's application to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0050] Step 101: Obtain multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates.
[0051] Multi-source water temperature data refers to water temperature measurements collected from multiple locations and sensors within the heating system, including pipe inlets, outlets, and room temperature measurement points, as well as other parameter measurements related to the system's water flow state from multiple sources, such as water pressure, flow rate, and velocity. These together describe the spatial distribution and hydraulic state of the water temperature. Adaptive Kalman filtering is an advanced data processing algorithm capable of real-time fusion and optimization estimation of measurement data from multiple sources, which may contain noise and errors. The adaptive nature of the algorithm means it automatically adjusts its internal filtering parameters based on real-time changes in the operating state to maintain optimal estimation performance. The real-time state estimate is the best estimate of the current state obtained after adaptive Kalman filtering. It is more accurate and reliable than the raw readings from any single sensor, containing estimates of the system's core state variables, serving as a unified and reliable input benchmark for all subsequent high-level control decisions.
[0052] The terminal acquires raw data reported by temperature sensors and other water temperature sensors distributed throughout the constant temperature water heating system. Adaptive Kalman filtering is performed to predict the current system state based on the previous state estimate and physical model. New data actually collected from the multi-source sensors at the current moment is then compared with the predicted value using weighted averages to dynamically correct the prediction. Finally, an optimal estimate that falls between the prediction and the measurement, but is closer to the actual situation, is output.
[0053] Step 102: Based on the real-time state estimate, perform feedback fuzzy inference to obtain feedback control commands, and based on the real-time state estimate, perform digital twin feedforward prediction simulation inference to obtain feedforward control commands.
[0054] Specifically, feedback fuzzy reasoning is an intelligent control method that combines classical control theory and fuzzy logic. Feedback refers to making decisions based on the deviation between the current actual output of the water and heating system and the desired target. Fuzzy reasoning refers to converting precise deviation values into fuzzy language descriptions that conform to human experience, such as large positive deviations and small negative deviations, and then making inference decisions based on a set of fuzzy rule bases.
[0055] Feedback control commands are control signals calculated through a feedback fuzzy inference process to correct current system deviations. Their core function is to correct deviations, bringing the output back to near the set target value as quickly as possible. They primarily reflect current and past errors.
[0056] Digital twin feedforward predictive simulation inference is a model-based predictive control method. A digital twin refers to a virtual, digital model that closely mirrors the physical heating system. Feedforward prediction means that it does not rely on current deviations but rather predicts future behavior in advance. It enables dynamic simulation of future time periods using digital twin models.
[0057] Feedforward control commands are control signals calculated through digital twin feedforward predictive simulation inference, used to proactively offset the effects of foreseeable disturbances. Their core function is pre-compensation, taking action before the actual effects of disturbances manifest. This is primarily based on predictions of future states.
[0058] The terminal calculates the difference between the real-time state estimate and the preset target temperature value, as well as the rate of change of this difference. It then fuzzifies the two precise values, converts them into fuzzy linguistic variables, matches the fuzzy variables with a preset fuzzy rule base, finds the activated control rules, and derives adjustment suggestions for the PID controller parameters based on the rules. Using the adjusted PID parameters, combined with the current precise deviation, deviation changes, and historical deviation accumulation, the final feedback control command is calculated.
[0059] The terminal sets the real-time state estimate as the initial state of the digital twin virtual model, adds a prediction sequence of possible future disturbances to the model, drives the virtual model to perform forward simulation calculations, deduce the future change trajectory of the water heating state over a period of time, extracts the key controlled variable prediction value from the trajectory, calculates its prediction deviation from the target value, and calculates the compensation amount in combination with the added disturbances, synthesizes the basic feedforward control command, applies a safety amplitude limit to the command, and obtains the feedforward control command.
[0060] Step 103: Based on the feedback control command and the feedforward control command, perform adaptive weight fusion to obtain the preliminary optimized control command.
[0061] Specifically, adaptive weight fusion is a dynamic integration strategy. It automatically and smoothly adjusts the proportion of the two types of instructions in the output based on real-time performance metrics.
[0062] The initial optimized control command is a single, optimized control signal generated by adaptively weighting and fusing feedback and feedforward control commands. It integrates corrective action based on current errors and preventative action based on future predictions.
[0063] The terminal calculates one or more dynamic indicators reflecting the current control performance. Based on a preset decision threshold, it maps these performance indicators to a weight coefficient between 0 and 1 using a specific function. This weight is specifically assigned to the feedforward control command. A high weight coefficient for the feedforward command indicates a greater reliance on prediction for proactive control; a low weight coefficient indicates a greater reliance on feedback for real-time correction. The feedforward control command is multiplied by the weight coefficient, and the feedback control command is multiplied by 1 and subtracted from the feedforward weight coefficient. The two are then added together to obtain the preliminary optimized control command.
[0064] Step 104: Based on the feedforward neural network compensation model, the preliminary optimized control command is compensated to obtain the theoretical control command; the feedforward neural network compensation model is trained using historical operating data.
[0065] Among them, the feedforward neural network compensation model is a multi-layered nonlinear computational model trained with a large amount of historical operating data. Its function is to learn and memorize complex system characteristics that are not fully described by the preceding physical model and fuzzy rules, including certain nonlinear, hysteresis characteristics that are difficult to model, or characteristic drift caused by minor wear and tear of equipment.
[0066] Theoretical control commands are control signals obtained after the preliminary optimized control commands are corrected by a neural network compensation model. They are theoretical values that are considered to achieve the optimal control effect at the level of ideal models and algorithms.
[0067] Historical operating data refers to a large amount of input-output data pairs collected and stored over a long period of operation, including records of control commands, system states, and final effects under different operating conditions. Historical operating data is used to train neural network models, enabling the models to learn how to precisely fine-tune and compensate for control commands.
[0068] The terminal inputs the preliminary optimized control commands and related system state information into the pre-trained feedforward neural network compensation model. Internally, this model performs complex nonlinear calculations and outputs a compensation value. This compensation value represents the additional control input required to overcome system defects not precisely described by the model. The preliminary optimized control commands are then added to the compensation value calculated by the neural network model, resulting in the theoretical control commands.
[0069] Step 105: Based on hard safety constraints, apply safety constraints to the theoretical control commands to obtain the water heating control commands.
[0070] Hard safety constraints refer to the extreme limits that must be unconditionally obeyed, both physically and logically. Physical constraints include the physical limits of the actuator's operating parameters, such as maximum / minimum opening, maximum / minimum speed, and power limits. Logically constraints include the timing safety of command generation, such as timeout detection.
[0071] Water heating control commands are theoretical control commands that have been processed through all safety constraints and are generated into drive signals that are directly and safely sent to the field actuators. They must ensure that they do not exceed the physical capabilities of the equipment and meet safety logic requirements.
[0072] The terminal calculates the difference between the timestamp of the newly generated theoretical control instruction and the timestamp of the last successfully executed instruction. It then makes a judgment based on the time difference and the normal control cycle. If the instruction generation timeout is severe, it is considered dangerous, and the terminal discards the theoretical control instruction and generates a preset, conservative fail-safe backup instruction to proceed to the next stage. If the timeout is normal, the theoretical control instruction is allowed to proceed as a preliminary safety instruction.
[0073] Based on the hard safety constraints of the actuator, the terminal imposes mandatory amplitude limits on the preliminary safety commands that are passed, forcibly restricting their values to between preset safety upper and lower limits.
[0074] This embodiment provides an intelligent constant-temperature water heating control method. It acquires multi-source water temperature data and performs adaptive Kalman filtering on the data to obtain real-time state estimates. Based on these estimates, feedback fuzzy inference is performed to obtain feedback control commands. Then, based on the real-time state estimates, digital twin feedforward prediction simulation inference is performed to obtain feedforward control commands. Adaptive weight fusion is performed on the feedback and feedforward control commands to obtain preliminary optimized control commands. Finally, a feedforward neural network compensation model is used to compensate for the preliminary optimized control commands, resulting in theoretical control commands. The feedforward neural network compensation model is trained using historical operating data. Based on hard safety constraints, safety constraints are applied to the theoretical control commands to obtain the water heating control commands. Through these methods, fuzzy inference is introduced to achieve online self-tuning of PID parameters. By fusing feedforward prediction and actively compensating for measurable disturbances, the anti-interference capability and response speed are significantly improved. A weighted decision algorithm based on real-time performance indicators is designed to dynamically adjust the fusion ratio of feedback and feedforward control, balancing the contradiction between dynamic response speed and steady-state control accuracy, effectively improving the reliability and accuracy of constant-temperature water heating control.
[0075] In one embodiment, feedback fuzzy inference is performed based on the real-time state estimate to obtain feedback control commands, including:
[0076] Step 201: Calculate the difference between the real-time state estimate and the target value to obtain the control deviation value, and calculate the control deviation change rate based on the control deviation value.
[0077] Among them, the real-time state estimate refers to the best estimate of the current core state obtained after data fusion and filtering, which represents the controller's view of the current real situation of water heating.
[0078] The target value refers to the expected or set value that the user hopes the controlled object will reach and maintain.
[0079] The control deviation value refers to the algebraic difference between the real-time state estimate and the target value. It quantifies the gap between the current state and the ideal state and is the most critical input signal in feedback control. A positive value indicates that the current state is higher than the target, and a negative value indicates that it is lower than the target.
[0080] The rate of change of control deviation refers to the speed at which the control deviation value changes over time. It is obtained by calculating the difference between the deviation at the current moment and the deviation at the previous moment, and then dividing by the time interval. It reflects the trend of the deviation expanding or shrinking and is an important indicator for predicting future dynamics.
[0081] The terminal subtracts the real-time state estimate from the target value to obtain the control deviation value, obtains the control deviation value of the previous control cycle, subtracts the historical value from the control deviation value calculated in the current cycle to obtain a difference value, and divides the difference value by the time interval between two control cycles to obtain the control deviation change rate, which represents the amount of change in deviation per unit time.
[0082] Step 202: Fuzzify the control deviation value and the rate of change of control deviation to obtain the fuzzy deviation amount, and match the fuzzy deviation amount with the fuzzy control rules in the fuzzy rule base to obtain the activation rule.
[0083] Specifically, fuzzification is a process of converting precise numerical input into a fuzzy linguistic description. The core is mapping a precise value to one or more fuzzy sets and assigning them membership degrees.
[0084] The fuzzy deviation quantity is a quantitative form obtained by fuzzifying the control deviation value and the rate of change of control deviation. It is described by fuzzy linguistic variables and their membership degrees and is a fuzzy description with a degree concept.
[0085] A fuzzy rule base is a collection of if-then-form empirical rules. Each rule defines the fuzzy control action to be taken under certain fuzzy conditions.
[0086] Fuzzy control rules refer to specific single entries in the fuzzy rule base, which are the embodiment of system knowledge.
[0087] Activation rules refer to fuzzy control rules that, given the current fuzzy deviation input, select those rules whose preconditions match the current state. These fuzzy rules are triggered and participate in the control decision-making process.
[0088] The terminal inputs the precise control deviation value and control deviation change rate into their respective fuzzification interfaces. These interfaces, based on preset membership functions, calculate the membership degrees of the two precise values to various fuzzy language sets, such as negative large, negative medium, zero, positive medium, and positive large. The output is a fuzzy deviation quantity describing the current deviation and its trend. The terminal compares the obtained fuzzy deviation quantity with the premise part of each fuzzy control rule in the fuzzy rule base. It calculates the degree to which the current fuzzy input satisfies the premise of each rule. Rules with a satisfaction degree greater than zero are selected and become active rules.
[0089] Step 203: Based on the activation rules, calculate the suggested adjustment values of the PID parameters to obtain the real-time adjustment amount of the PID.
[0090] Specifically, the recommended adjustment values for PID parameters refer to the guiding suggestions given in the conclusion section of the activation rule on how to change the three core parameters of the PID controller, namely proportional gain, integral gain, and derivative gain. In the initial stage, the suggestions are in vague language.
[0091] The real-time adjustment value of a PID refers to the precise parameter adjustment value that can be directly used for mathematical calculations, obtained by converting the suggested adjustment values of fuzzy PID parameters through defuzzification and other processing.
[0092] The terminal transforms fuzzy rule conclusions into precise parameter adjustment amounts. For each activated rule, it parses its conclusion portion, which typically includes adjustment suggestions for the three parameters. The terminal synthesizes the conclusions of all activated rules and uses defuzzification methods such as weighted average and centroid method to aggregate and convert the various fuzzy adjustment suggestions into a set of precise values, namely the PID real-time adjustment amount, which indicates how much the three PID parameters should be changed in the current state.
[0093] Step 204: Add the real-time PID adjustment value and the PID reference value to obtain the updated PID controller parameters.
[0094] The PID reference value refers to the value of the three parameters of the PID controller before this adjustment. It may be the initial setting value of the controller or the value obtained after the previous control cycle.
[0095] Updating PID controller parameters refers to adding the PID baseline value to the PID real-time adjustment value to obtain a new set of PID parameter values that will be used in the current control cycle.
[0096] The terminal algebraically adds the baseline values of each of the three PID parameters to their corresponding real-time adjustment values. The result of this addition updates the PID controller parameters, enabling the PID controller's characteristics to adaptively adjust according to the real-time dynamic performance of the water heating system, thereby achieving better control performance than a fixed-parameter PID controller.
[0097] Step 205: Based on the updated PID controller parameters, control deviation value, control deviation change rate, and historical deviation data, calculate the PID controller output value to obtain the feedback control command.
[0098] Among them, historical deviation data specifically refers to the discrete integral sum of all control deviation values accumulated over time from the start of control to the current time. That is, the summation of all past deviations, representing the historical accumulation of steady-state error.
[0099] The output value of a PID controller refers to the original control quantity value obtained by substituting the updated PID controller parameters, control deviation value, control deviation rate of change, and historical deviation data into the calculation formula of the PID control algorithm.
[0100] Feedback control commands refer to the output value of the PID controller. They are the control signals ultimately generated by the feedback control loop, used to drive the actuators to eliminate current errors.
[0101] The terminal will update the PID controller parameters, control deviation value, control deviation change rate and historical deviation data and substitute them into the standard calculation formula of discrete PID control. The updated PID controller parameters will be used as the current control parameters and substituted into the formula to calculate and obtain feedback control commands.
[0102] In one embodiment, the formula for calculating the PID controller output value is:
[0103]
[0104] in, The PID controller output value at time step t. The proportional gain coefficient for time step t. The integral gain coefficient at time step t. The differential gain coefficient at time step t. The control deviation value at time step t. For sampling control period, The control deviation at time step t-1, The discrete integral term is used to control the deviation.
[0105] Specifically, the output value of the PID controller at time step t is the control quantity calculated by the PID controller at time t. Combining the effects of the proportional, integral, and derivative terms, its physical meaning is the magnitude or intensity of the control signal that needs to be applied to the actuator to eliminate deviation. This value is the feedback control command.
[0106] The proportional gain coefficient at time step t is the proportional term coefficient at time t, which determines the strength of the controller output's response to the control deviation at the current time. The larger the value, the stronger the correction effect on the current deviation and the faster the response, but too large a value may cause system oscillation.
[0107] The integral gain coefficient at time step t is the integral term coefficient at time t, which determines the strength of the controller output's response to historical accumulated deviations. Its main function is to eliminate steady-state errors. The value affects the speed of steady-state error elimination, but too large a value may cause integral saturation or overshoot.
[0108] The differential gain coefficient at time step t is the differential term coefficient at time t, which determines the strength of the controller output's response to changes in the control deviation. It can predict future changes in the deviation, providing anticipatory adjustment and helping to suppress overshoot and improve stability. However, an excessively large value may make the controller overly sensitive to measurement noise.
[0109] The control deviation value at time step t refers to the difference between the target value and the real-time state estimate at time t. It is the most direct input of PID control and reflects the instantaneous error between the current output and the expected value.
[0110] The sampling control period refers to the fixed time interval between two consecutive calculations and outputs of the controller. It is the basis for discretizing continuous time for digital control. The integral and differential operations in the formula are based on this period for discrete approximate calculation.
[0111] The control deviation at time step t-1 refers to the control deviation value of the previous sampling period at time t, which is used to calculate the rate of change of the deviation together with the current e(t).
[0112] The discrete integral term of the control deviation is a summation expression, representing the sum of the products of the deviation and the sampling period at each sampling moment from the start of control to the current moment. In a discrete system, it approximately represents the total amount of control deviation accumulated over time and is the basis for the action of the integral term.
[0113] In one embodiment, based on the real-time state estimate, digital twin feedforward prediction simulation inference is performed to obtain feedforward control commands, including:
[0114] Step 401: Set the real-time state estimate as the initial state of the digital twin virtual model, and add a future perturbation sequence to the digital twin virtual model to obtain a digital twin prediction model instance.
[0115] Among them, the real-time state estimate refers to the set of optimal estimates of the current state of the water heating system obtained after data fusion and filtering. It represents the best digital mapping of the true state of the water heating system at the current moment.
[0116] A digital twin virtual model refers to a dynamic mathematical model or simulation program created in digital space that is highly consistent with or equivalent to a plumbing system in terms of geometry, physics, rules, and behavior. It can simulate the operational response of a plumbing system under specific inputs and conditions.
[0117] A future disturbance sequence refers to a set of disturbances arranged chronologically that are predicted to affect plumbing and heating over a future period. Disturbances may include known or predictable changes, such as planned adjustments to room temperature setpoints, planned opening and closing of doors and windows, future outdoor temperature changes provided by weather forecasts, and planned water usage patterns in different areas.
[0118] A digital twin predictive model instance specifically refers to a concrete digital twin model that is ready for simulation, using real-time state estimates as initial conditions and embedding future perturbation sequences. It is a copy of a model containing specific initial states and known future input conditions, used to perform forward-looking simulations.
[0119] The terminal assigns all real-time state estimates to the corresponding state variables in the digital twin virtual model, ensuring complete synchronization between the virtual model's starting point and the physical system. Predicted future disturbance sequences are then loaded into the virtual model; during the subsequent simulation, the model's external environment and internal settings will change according to these future disturbance sequences. After initialization, a unique digital twin prediction model instance with a specific starting point and a known future disturbance path is obtained. This digital twin prediction model instance forms the basis for subsequent scenario simulations.
[0120] Step 402: Based on the digital twin prediction model example, perform forward time-stepping dynamic simulation to obtain the state prediction trajectory.
[0121] Specifically, forward time-stepping dynamic simulation is a numerical calculation method. Taking the state of the previous time step as input, it calculates and outputs the state after the next tiny time step based on a mathematical model describing the dynamic characteristics of the system. By continuously repeating the stepping, it simulates the change of the water heating state over time.
[0122] A state prediction trajectory refers to a complete data sequence or curve calculated by forward time-stepping dynamic simulation, which depicts the most likely evolution path of the state under given initial conditions and future perturbations.
[0123] The terminal starts the simulation engine based on a digital twin prediction model instance. The simulation begins at the current moment and progresses towards the future in discrete time steps. At each time step, the terminal reads the current state of the model, combines it with the input of the future perturbation sequence at that moment, and calculates the new state after the next time step according to the physical laws and system relationships embedded in the model. The process is iterated repeatedly until the entire expected prediction time domain is covered. Finally, the state data calculated at all time steps are organized in chronological order to obtain the state prediction trajectory.
[0124] Step 403: Based on the state prediction trajectory, extract the predicted value of the controlled temperature, and calculate the prediction deviation master feedforward based on the difference between the predicted value of the controlled temperature and the target value.
[0125] Specifically, the controlled temperature prediction value is a future prediction value of the temperature variable that is directly related to the control objective and is specifically extracted from the state prediction trajectory.
[0126] Prediction bias, or main feedforward bias, refers to the difference between the predicted and target values of the controlled temperature over the entire prediction time domain. It quantifies the prediction error of the future output relative to the target based solely on the current control input and known disturbances, without applying new control. This prediction error will be used as the primary basis for feedforward control.
[0127] Based on the simulated state prediction trajectory, the terminal locates and reads the portion of the data sequence representing the temperature of the controlled object. Each extracted future predicted temperature value is compared with a constant target value, and the difference is calculated; this difference sequence itself constitutes the prediction bias. This bias sequence is further processed; for example, its weighted average over a future period or its value at a specific moment is taken and transformed into a comprehensive, usable main feedforward quantity of the prediction bias for current control decisions. This represents the main part of the control action that needs to be applied in advance to offset the predicted future bias trend.
[0128] Step 404: Based on the future disturbance sequence, calculate the disturbance compensation, and perform a weighted sum of the prediction deviation feedforward and the disturbance compensation to obtain the basic feedforward control command.
[0129] Among them, disturbance compensation refers to the control quantity calculated based on the known future disturbance sequence itself, which is used to actively offset the impact of the disturbance.
[0130] Weighted summation is an information fusion method that multiplies two or more inputs by a weight coefficient and then adds them together to obtain a composite output. The weight coefficient determines the contribution ratio of each input to the result.
[0131] The basic feedforward control command is a preliminary feedforward control signal formed by weighted summation of the prediction deviation main feedforward and the disturbance compensation, which comprehensively corrects the future output deviation and compensates for known input disturbances.
[0132] Based on the known future disturbance sequence, the terminal uses a pre-established disturbance-compensation relationship model or rule to calculate the direct control quantity needed to offset the disturbance's impact. The terminal then performs a weighted sum of the prediction deviation feedforward and the disturbance compensation. The weights are set based on prior knowledge of the importance of the two feedforward effects, and the sum is 1. The feedforward information from these two different sources is then synthesized into a unified command.
[0133] Step 405: Apply safety limiting to the basic feedforward control command to obtain the feedforward control command.
[0134] Among them, safety limiting is a protective operation that forcibly restricts the value of the input signal to a predefined safe range. If the input value is below the lower limit, the lower limit value is output; if it is above the upper limit, the upper limit value is output; if it is within the range, the original value is output. This ensures that the output command does not exceed the physical capabilities of the actuator or the boundaries of the system's safe operation.
[0135] Feedforward control commands refer to the feedforward control signals that are ultimately safe to execute, obtained after the basic feedforward control commands have undergone safety-limiting processing. They are outputs that have been optimized at the model prediction level and then verified for physical feasibility.
[0136] The terminal performs safety-limiting processing on the basic feedforward control command, forcibly constraining the value of the command with the physical limit operating parameters of the actuator. After this processing, regardless of the calculated value of the basic feedforward command, its output feedforward control command is ensured to be within a safe and executable range.
[0137] In one embodiment, adaptive weight fusion is performed based on feedback control commands and feedforward control commands to obtain preliminary optimized control commands, including:
[0138] Step 501: Calculate the dynamic performance index value based on the real-time state estimate, and map the dynamic performance index value to the weight coefficient of the feedforward control command based on the decision threshold to obtain the feedforward weight coefficient.
[0139] The dynamic performance index is a scalar value used to quantitatively evaluate the current dynamic quality of control. It is calculated based on real-time state estimates or their derivatives, including error, rate of change of error, oscillation frequency, etc. It reflects the instantaneous characteristics of the response, such as overshoot, settling time, degree of oscillation, or stability margin. The magnitude of the value directly characterizes the quality of dynamic performance; for example, a large S value may indicate a slow or volatile response, indicating poor performance; a small S value may indicate a fast and stable response, indicating good performance.
[0140] The decision threshold is a pre-set benchmark or critical point used to determine whether dynamic performance requires mode switching. Conceptually dividing the range of dynamic performance index S into different regions is a key criterion for determining the level of feedforward weights.
[0141] The steepness factor of the decision curve is a constant parameter greater than zero, used to adjust the steepness of the S-shaped function curve near the decision threshold. The larger the value of k, the steeper the curve near the decision threshold, meaning that the weight coefficients are more sensitive to changes in the performance index S and switch more rapidly; the smaller the value of k, the flatter the curve, and the smoother the changes in the weight coefficients.
[0142] The feedforward weighting coefficient is a value between 0 and 1, representing the proportion of feedforward control commands in the final fused output. A value of -1 indicates that feedforward control is used exclusively; a value of 0 indicates that feedback control is used exclusively; and a value between 0 and 1 indicates hybrid control, the specific value of which is dynamically determined by the dynamic performance index through the decision function.
[0143] The Sigmoid function is a common S-shaped mathematical function that maps input variables to the interval (0,1).
[0144] The terminal calculates performance based on real-time state estimates using a specific performance evaluation algorithm. The algorithm analyzes certain characteristics of the current state and outputs a quantified dynamic performance index value, which is an immediate score of the current control effectiveness. After obtaining the S value, the terminal compares it with a preset decision threshold. When the system's dynamic performance is excellent, i.e., S is much smaller than S0, S-S0 is a large negative number. After calculation using the sigmoid function, the feedforward weight coefficient approaches 0, indicating a tendency to rely on feedback control because the current feedback loop itself can maintain good performance.
[0145] When dynamic performance is poor, the feedforward weight coefficients approach 1 after calculation using the Sigmoid function. This indicates a tendency to rely on feedforward control, aiming to quickly improve performance through feedforward prediction and advance compensation.
[0146] When S is near S0, the feedforward weight coefficients change smoothly between 0 and 1. The steepness factor controls the width of the transition region. The feedforward weight coefficients can achieve a smooth, adaptive transition from 0 to 1 based on the position of the performance index S relative to the threshold S0.
[0147] Step 502: Based on the feedforward weight coefficient, the feedback control command and the feedforward control command are weighted and fused to obtain the preliminary optimized control command.
[0148] Specifically, feedback control commands refer to control signals generated through feedback fuzzy inference channels based on current and past errors.
[0149] Feedforward control commands refer to control signals generated through the digital twin feedforward prediction simulation inference channel, based on future state predictions and known disturbances.
[0150] Weighted fusion is a linear combination method that multiplies two input quantities by their respective weight coefficients and then adds them together to form a new composite quantity.
[0151] The initial optimized control command refers to a single control signal generated after adaptive weighted fusion of feedback control command and feedforward control command. It includes both feedback based on error correction and feedforward based on prediction compensation, and the ratio of the two is dynamically determined by the current system performance.
[0152] The terminal performs weighted fusion of feedback control commands and feedforward control commands based on the feedforward weight coefficient.
[0153] When the feedforward weight coefficient is close to 1, the fused output is almost exactly equal to the feedforward control command, and it operates in a feedforward control mode that is mainly based on prediction compensation.
[0154] When the feedforward weighting coefficient is close to 0, the fused output is almost exactly equal to the feedback control command, and it operates in the traditional feedback control mode.
[0155] When the feedforward weight coefficient is at the intermediate value, the output is a mixture of the two, and the mixing ratio is precisely controlled by the feedforward weight coefficient.
[0156] Through adaptive weighted fusion, the robustness of feedback can be relied upon when performance is stable, and the guiding role of feedforward can be intelligently increased when performance deteriorates or faces predictable disturbances, thereby obtaining a preliminary optimized control command that is theoretically better than single control.
[0157] The formula for calculating the feedforward weight coefficient is as follows:
[0158]
[0159] in, Here, represents the feedforward weighting coefficients, and k is the steepness factor of the decision curve. is the decision threshold, and S is the dynamic performance index value.
[0160] In one embodiment, based on hard safety constraints, the theoretical control commands are subjected to safety constraints to obtain the water heating control commands, including:
[0161] Step 601: Calculate the difference between the timestamp of the theoretical control command and the timestamp of the historical valid control command to obtain the time difference.
[0162] Theoretical control commands refer to the optimized control commands obtained after correction by the feedforward neural network compensation model, which are optimized at the algorithm and model levels. They are the ideal commands before safety constraint processing.
[0163] A timestamp is a numerical value recorded when a theoretical control instruction is calculated and generated, or when a historically valid control instruction is issued and executed, representing that moment in time. It is used to uniquely identify the point in time when an instruction is generated or takes effect.
[0164] Historical valid control commands refer to the water and heating control commands that successfully passed all safety constraint checks and were actually issued to the actuators for execution in the previous control cycle.
[0165] The time difference refers to the numerical difference between the timestamp of the currently generated theoretical control command and the timestamp of the last successfully executed historical effective control command. It quantifies the time interval between the completion time of the current control command calculation and the time of the last effective control action.
[0166] When a new theoretical control command is generated, the terminal calculates the difference between the timestamp carried by the command and the timestamp of the last historical valid control command, performs a simple subtraction operation, and the result is the time difference, which is used to determine whether the control cycle is running normally on time.
[0167] Step 602: Based on the time difference and the operation control cycle time, perform timeout detection to obtain a time safety signal.
[0168] Specifically, the operation control cycle time refers to a preset, fixed calculation and execution cycle. For example, it may be set to calculate and output a control command every 100 milliseconds, and 100 milliseconds is the operation control cycle time, which is the benchmark for judging whether the timing is normal.
[0169] Timeout detection is a logical judgment operation that compares the time difference with the running control cycle time to determine whether the calculation and generation of the current control command is completed within the expected normal time window, and whether there is any abnormal delay or lag.
[0170] The time safety signal is a logical signal generated by a timeout detection operation, representing a time-safe state. It is a binary flag that can be either safe or dangerous.
[0171] The terminal performs timeout detection based on the calculated time difference and the preset operation control cycle time. The terminal determines whether the time difference exceeds a certain multiple of the operation control cycle time. If the time difference does not exceed the threshold, the timing is considered normal, and a safe time safety signal is generated. If the time difference exceeds the threshold, a timeout anomaly is identified, and a dangerous time safety signal is generated. The time safety signal determines how the theoretical control commands are handled.
[0172] Step 603: If the time safety signal is safe, then set the theoretical control command to the preliminary safety command; or if the time safety signal is dangerous, then generate a fail-safe backup command.
[0173] Specifically, the preliminary safety instruction is a theoretical control instruction that passes the time safety check when the time safety signal is safe. It will then be sent to the next stage for physical safety constraint processing.
[0174] A fail-safe backup command is a pre-set, conservative, and absolutely safe control command that the terminal autonomously generates when the time safety signal is dangerous. Instead of trusting theoretical control commands that might arise due to computational delays, communication interruptions, or other failures, the terminal assumes the command is safe. This command typically aims to guide the plumbing system to a defined, low-energy-consumption safety state to prevent accidents caused by control failure.
[0175] The terminal checks the status of the time safety signal. If the time safety signal is safe, it indicates that the current control calculation cycle is normal and has not timed out, and the terminal sets the current theoretical control command as the preliminary safety command. If the time safety signal is dangerous, it indicates that there is an abnormal delay in the control cycle, and the timeliness of the current theoretical control command is no longer reliable. The terminal will discard the command and generate a predefined fail-safe backup command. The backup command is directly set as the preliminary safety command to ensure that even if a timing fault occurs in the core algorithm, a definite and safe command can still be output.
[0176] Step 604: Based on hard safety constraints, the preliminary safety command is physically limited to obtain the water and heating control command. The hard safety constraints include the physical limit operating parameters of the actuator. The water and heating control command is used to instruct the actuator to set the operating parameters.
[0177] Among them, rigid safety constraints refer to the absolute insurmountable limits of operating parameters determined by the physical characteristics of the actuator, which are rigid boundaries that ensure the equipment is not damaged.
[0178] The physical limit operating parameters of the actuator refer to the specific numerical values of the hard safety constraints. Examples include the maximum and minimum opening of the electric regulating valve, the maximum and minimum speed of the variable frequency water pump, and the maximum and minimum power of the electric heater.
[0179] Physical boundary forced limiting is a protective operation that forcibly restricts the value of the input command to between the minimum and maximum values defined by the physical limit operating parameters of the actuator. If the input command value is less than the lower limit, the lower limit value is output; if it is greater than the upper limit, the upper limit value is output; if it is between the upper and lower limits, the original value is output.
[0180] Water and heating control commands refer to drive signals that, after initial safety commands have been physically limited, can be safely and accurately sent to the field actuators. These commands include the specific operating parameters that the actuators need to set.
[0181] The terminal applies physical boundary limits to the initial safety commands based on hard safety constraints, namely the safety range defined by the physical limit operating parameters of the actuator.
[0182] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0183] Based on the same inventive concept, this application also provides an intelligent constant temperature water heating control system for implementing the intelligent constant temperature water heating control method described above. The solution provided by this system is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the intelligent constant temperature water heating control system provided below can be found in the limitations of the intelligent constant temperature water heating control method described above, and will not be repeated here.
[0184] In one exemplary embodiment, such as Figure 2 As shown, an intelligent constant temperature water heating control system 700 is provided, including:
[0185] The filtering module 701 is used to acquire multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates.
[0186] The inference module 702 is used to perform feedback fuzzy inference based on the real-time state estimate to obtain feedback control commands, and to perform digital twin feedforward prediction simulation inference based on the real-time state estimate to obtain feedforward control commands.
[0187] The fusion module 703 is used to perform adaptive weight fusion based on feedback control commands and feedforward control commands to obtain preliminary optimized control commands;
[0188] The compensation module 704 is used to compensate the preliminary optimized control command based on the feedforward neural network compensation model to obtain the theoretical control command; the feedforward neural network compensation model is trained using historical operating data.
[0189] The constraint module 705 is used to apply safety constraints to theoretical control commands based on hard safety constraints to obtain water and heating control commands.
[0190] Furthermore, the inference module 702 is also used for:
[0191] The difference between the real-time state estimate and the target value is calculated to obtain the control deviation value, and the control deviation change rate is calculated based on the control deviation value.
[0192] The control deviation value and the rate of change of control deviation are fuzzified to obtain the fuzzy deviation amount, and the fuzzy deviation amount is matched with the fuzzy control rules in the fuzzy rule base to obtain the activation rule;
[0193] Based on the activation rules, the suggested adjustment values of the PID parameters are calculated to obtain the real-time adjustment of the PID.
[0194] The updated PID controller parameters are obtained by adding the real-time PID adjustment value and the PID reference value.
[0195] Based on the updated PID controller parameters, control deviation value, control deviation rate of change, and historical deviation data, the PID controller output value is calculated to obtain the feedback control command.
[0196] Furthermore, the formula for calculating the output value of the PID controller is as follows:
[0197]
[0198] in, The PID controller output value at time step t. The proportional gain coefficient for time step t. The integral gain coefficient at time step t. The differential gain coefficient at time step t. The control deviation value at time step t. For sampling control period, The control deviation at time step t-1, The discrete integral term is used to control the deviation.
[0199] Furthermore, the inference module 702 is also used for:
[0200] The real-time state estimate is set as the initial state of the digital twin virtual model, and a future perturbation sequence is added to the digital twin virtual model to obtain a digital twin prediction model instance.
[0201] Based on a digital twin prediction model example, dynamic simulation with forward time stepping is performed to obtain the state prediction trajectory.
[0202] Based on the state prediction trajectory, the predicted value of the controlled temperature is extracted, and the prediction deviation main feedforward is calculated based on the difference between the predicted value of the controlled temperature and the target value.
[0203] Based on the future disturbance sequence, the disturbance compensation is calculated, and the prediction deviation feedforward and the disturbance compensation are weighted and summed to obtain the basic feedforward control command.
[0204] The basic feedforward control command is subjected to safety limiting to obtain the feedforward control command.
[0205] Furthermore, the fusion module 703 is also used for:
[0206] Based on the real-time state estimate, the dynamic performance index value is calculated, and based on the decision threshold, the dynamic performance index value is mapped to the weight coefficient of the feedforward control command to obtain the feedforward weight coefficient.
[0207] Based on the feedforward weighting coefficient, the feedback control command and the feedforward control command are weighted and fused to obtain the preliminary optimized control command;
[0208] The formula for calculating the feedforward weight coefficient is as follows:
[0209]
[0210] in, Here, represents the feedforward weighting coefficients, and k is the steepness factor of the decision curve. is the decision threshold, and S is the dynamic performance index value.
[0211] Furthermore, the constraint module 705 is also used for:
[0212] The time difference is obtained by calculating the difference between the timestamp of the theoretical control command and the timestamp of the historical valid control command.
[0213] Based on the time difference and the operation control cycle time, timeout detection is performed to obtain a time safety signal;
[0214] If the time safety signal is safe, the theoretical control command is set as the preliminary safety command; or if the time safety signal is dangerous, a fail-safe backup command is generated.
[0215] Based on hard safety constraints, the initial safety instructions are physically limited to obtain water and heating control instructions. The hard safety constraints include the physical limit operating parameters of the actuator, and the water and heating control instructions are used to instruct the actuator to set the operating parameters.
[0216] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a power supply safety management method as described above.
[0217] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0218] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0219] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A method for intelligent constant temperature water heating control, characterized in that, The method includes: Acquire multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates; Based on the real-time state estimate, feedback fuzzy inference is performed to obtain feedback control commands, and based on the real-time state estimate, digital twin feedforward prediction simulation inference is performed to obtain feedforward control commands. Based on the feedback control command and the feedforward control command, adaptive weight fusion is performed to obtain the preliminary optimized control command; The preliminary optimized control command is compensated based on the feedforward neural network compensation model to obtain the theoretical control command; the feedforward neural network compensation model is trained using historical operating data. Based on hard safety constraints, safety constraints are applied to the theoretical control commands to obtain water heating control commands.
2. The method according to claim 1, characterized in that, The step of performing feedback fuzzy inference based on the real-time state estimate to obtain feedback control commands includes: The difference between the real-time state estimate and the target value is calculated to obtain the control deviation value, and the control deviation change rate is calculated based on the control deviation value. The control deviation value and the control deviation change rate are fuzzified to obtain the fuzzy deviation amount, and the fuzzy deviation amount is matched with the fuzzy control rules in the fuzzy rule base to obtain the activation rule; Based on the activation rules, the suggested adjustment values of the PID parameters are calculated to obtain the real-time adjustment amount of the PID. The updated PID controller parameters are obtained by adding the real-time PID adjustment value and the PID reference value. Based on the updated PID controller parameters, the control deviation value, the control deviation change rate, and historical deviation data, the PID controller output value is calculated to obtain the feedback control command.
3. The method according to claim 2, characterized in that, The formula for calculating the output value of the PID controller is as follows: in, The output value of the PID controller at time step t. The proportional gain coefficient for time step t. The integral gain coefficient at time step t. The differential gain coefficient at time step t, The control deviation value at time step t. For sampling control period, The control deviation at time step t-1 This is the discrete integral term used to control the deviation.
4. The method according to claim 1, characterized in that, The step of performing digital twin feedforward prediction simulation inference based on the real-time state estimate to obtain feedforward control commands includes: The real-time state estimate is set as the initial state of the digital twin virtual model, and a future perturbation sequence is added to the digital twin virtual model to obtain a digital twin prediction model instance. Based on the example of the digital twin prediction model, a forward time-stepping dynamic simulation is performed to obtain the state prediction trajectory. Based on the state prediction trajectory, the predicted value of the controlled temperature is extracted, and based on the difference between the predicted value of the controlled temperature and the target value, the prediction deviation main feedforward is calculated. Based on the future disturbance sequence, the disturbance compensation is calculated, and the prediction deviation feedforward and the disturbance compensation are weighted and summed to obtain the basic feedforward control command. The basic feedforward control command is subjected to a safety limit to obtain the feedforward control command.
5. The method according to claim 1, characterized in that, The adaptive weight fusion based on the feedback control command and the feedforward control command to obtain the preliminary optimized control command includes: Based on the real-time state estimate, the dynamic performance index value is calculated, and based on the decision threshold, the dynamic performance index value is mapped to the weight coefficient of the feedforward control command to obtain the feedforward weight coefficient. Based on the feedforward weight coefficient, the feedback control command and the feedforward control command are weighted and fused to obtain the preliminary optimized control command; The formula for calculating the feedforward weight coefficient is as follows: in, Here, represents the feedforward weighting coefficients, and k is the steepness factor of the decision curve. is the decision threshold, and S is the dynamic performance index value.
6. The method according to claim 1, characterized in that, The theoretical control commands are subjected to safety constraints based on hard safety constraints to obtain water and heating control commands, including: The time difference is obtained by calculating the difference between the timestamp of the theoretical control command and the timestamp of the historical valid control command. Based on the time difference and the operation control cycle time, timeout detection is performed to obtain a time safety signal; If the time safety signal is safe, the theoretical control command is set as a preliminary safety command; or if the time safety signal is dangerous, a fail-safe backup command is generated. Based on the aforementioned hard safety constraints, the preliminary safety command is physically bounded to obtain the water and heating control command. The hard safety constraints include the physical limit operating parameters of the actuator, and the water and heating control command is used to instruct the actuator to set the operating parameters.
7. An intelligent constant temperature water heating control system, characterized in that, The system includes: The filtering module is used to acquire multi-source water temperature data and perform adaptive Kalman filtering on the multi-source water temperature data to obtain real-time state estimates. The inference module is used to perform feedback fuzzy inference based on the real-time state estimate to obtain feedback control commands, and to perform digital twin feedforward prediction simulation inference based on the real-time state estimate to obtain feedforward control commands. The fusion module is used to perform adaptive weight fusion based on the feedback control command and the feedforward control command to obtain a preliminary optimized control command; The compensation module is used to compensate the preliminary optimized control command based on the feedforward neural network compensation model to obtain the theoretical control command; the feedforward neural network compensation model is trained using historical operating data. The constraint module is used to apply safety constraints to the theoretical control commands based on hard safety constraints, thereby obtaining water and heating control commands.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.