A cooling tower water temperature prediction control method based on fusion mechanism constraint

By introducing the outdoor wet-bulb temperature lower limit and monotonicity constraint into the cooling tower water temperature prediction model, and combining bidirectional perturbation testing and adaptive weight update, the prediction error and energy consumption increase problem of the existing model under extreme conditions are solved, and efficient energy-saving control of the cooling tower system is realized.

CN122486237APending Publication Date: 2026-07-31WHALE CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WHALE CLOUD TECH CO LTD
Filing Date
2026-07-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing cooling tower water temperature prediction models are prone to outputting prediction values ​​that violate physical laws in sparse sample regions or under extreme operating conditions, leading to misjudgments in the control system and increased energy consumption instead of reduced energy consumption. Furthermore, they lack a complete closed loop that combines prediction results with fan frequency optimization, making it difficult to achieve energy-saving effects at the system level.

Method used

By constructing a neural network model that integrates mechanistic constraints, using outdoor wet-bulb temperature as a lower bound and monotonicity constraint, and combining bidirectional perturbation testing and adaptive weight updates, the prediction results are ensured to be within the thermodynamically feasible range, and then used for global energy-saving optimization of wind turbine frequency.

Benefits of technology

It improves the mechanistic consistency of prediction results and the safety margin of control decisions, realizes the reliable conversion of prediction accuracy into energy-saving benefits at the system level, and avoids the constraint failure of non-smooth points and the instability of the training process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122486237A_ABST
    Figure CN122486237A_ABST
Patent Text Reader

Abstract

This invention discloses a cooling tower water temperature prediction and control method incorporating mechanistic constraints. It includes: acquiring cooling tower operating data and outdoor meteorological data; constructing a neural network with cooling water outlet temperature as the output; and training the network using a total loss function weighted by data fitting loss terms and mechanistic constraint loss terms. The monotonicity constraint penalty does not rely on automatic differential analytical gradients but is calculated by applying positive and negative bidirectional perturbations to the input features and using the magnitude relationship of the output from forward inference. During control, candidate combinations are traversed using the sum of fan frequencies and the number of fans in operation as decision variables. Under the constraint that the predicted water temperature meets the heat dissipation requirements and is not lower than the wet-bulb temperature, the combination with the minimum total system power consumption is selected and executed. This invention ensures that the prediction results fall within the thermodynamically feasible range, forming an energy-saving control closed loop that is constrained in prediction, reliable in optimization, and safe in execution, while maintaining accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent control technology for central air conditioning and industrial refrigeration systems, and in particular to a cooling tower water temperature prediction and control method that integrates mechanistic constraints. Background Technology

[0002] In industrial refrigeration and central air conditioning systems, the core task of the cooling tower system is to provide cooling water to the chiller units. The supply temperature of the cooling water determines both the energy consumption of the cooling tower's own fans and the operating efficiency of the chiller units. Lowering the supply temperature of the cooling water can reduce the condensing pressure of the chiller units, thereby reducing compressor power consumption; however, to obtain lower water temperatures, the cooling tower fans must increase their operating frequency, which in turn leads to increased fan energy consumption. Therefore, energy-saving control of refrigeration systems involves a key energy consumption trade-off: it is necessary to find, in real time, a globally optimal cooling water temperature setpoint where the energy saved by the chiller units is greater than the additional energy consumed by the cooling tower fans.

[0003] To find the optimal balance point, advanced control strategies such as model predictive control need to perform pre-analysis and reasoning before actual operation, that is, accurately calculate the cooling water outlet temperature achievable under different fan frequency combinations. Therefore, the prediction accuracy of the cooling water outlet temperature prediction model directly determines whether the system can find the operating path with the lowest energy consumption.

[0004] In existing technologies, there are two main types of methods for modeling cooling water outlet temperature. The first type is the white-box model based on physical mechanisms, which has complex parameters, is difficult to calibrate, and struggles to adapt in real time to the heat exchange performance degradation caused by equipment aging. The second type is the black-box model based on data-driven neural networks, which has fast fitting speed and high accuracy, but due to the lack of constraints from physical mechanisms, it is prone to outputting predictions that violate physical principles in sparse sample regions or under extreme operating conditions. For example, it may predict that the outlet water temperature is lower than the outdoor wet-bulb temperature, or predict that the water temperature will rise when the cooling demand decreases.

[0005] If such predictions that violate physical laws are adopted by the control algorithm, it can lead to misjudging the system state, issuing incorrect frequency modulation commands, and consequently causing system oscillations or even an increase in energy consumption instead of a decrease. To alleviate these problems, a physical information neural network method has been proposed that introduces mechanistic constraint terms into the loss function of the neural network, embedding physical laws as soft constraints into the training process. However, existing physical information neural networks typically rely on automatic differentiation of the network to obtain analytical gradients when constructing constraints such as monotonicity, which require differentiating the output with respect to the input. Since neural networks widely use non-smooth activation functions such as modified linear units, constraints constructed based on analytical gradients are prone to failure near non-smooth points, and are also affected by gradient vanishing or exploding when the network is deep, causing monotonicity constraints to not function stably. At the same time, obtaining analytical gradients requires back-deriving the network layer by layer, which is computationally cumbersome and difficult to match with the real-time control cycle.

[0006] Furthermore, existing methods often separate the prediction of outlet water temperature from the optimization of system energy saving, lacking a complete closed loop that directly applies the prediction results constrained by thermodynamic laws to the optimization of fan frequency, making it difficult to reliably translate the improvement in prediction accuracy into energy-saving benefits at the system level.

[0007] Therefore, how to ensure the accuracy of the fitting while keeping the prediction results within the thermodynamically feasible range defined by the outdoor wet-bulb temperature and the cooling water return temperature, and how to construct monotonicity and other mechanistic constraints in a stable and reliable manner, so as to directly use the mechanistically constrained predictions for global optimization of wind turbine energy consumption, is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0008] To address the aforementioned issues, this invention provides a cooling tower water temperature prediction and control method that integrates mechanistic constraints. By embedding thermodynamic mechanistic constraints into the training objective of a neural network in a stable and reliable manner, the prediction results always fall within the thermodynamically feasible range. Furthermore, the mechanistic-constrained prediction results are directly used for global energy-saving optimization of the fan frequency, thereby significantly enhancing the reliability and safety margin of control decisions while ensuring prediction accuracy.

[0009] The technical solution adopted in this invention is: a cooling tower water temperature prediction and control method integrating mechanism constraints, comprising:

[0010] S1. Obtain historical operating data and outdoor meteorological data of the cooling tower system; The input features and labels are calculated, where the input features include cooling demand and outdoor wet-bulb temperature, and the label is the cooling water outlet temperature. S2. Construct an artificial neural network model, wherein the model takes input features as input and cooling water outlet temperature as output; The model is trained using a total loss function, which is a weighted sum of a data fitting loss term and a mechanism constraint loss term. The mechanism constraint loss term includes a lower bound constraint penalty and a monotonicity constraint penalty. The lower bound constraint penalty uses the outdoor wet-bulb temperature as the lower bound of the predicted value, and the monotonicity constraint penalty characterizes that the predicted outlet water temperature remains monotonically unchanged as the cooling demand increases. S3. Within the control period, construct a set of candidate operating parameter combinations using the operating parameters of the cooling tower fan as decision variables; For each candidate combination in the set, the trained model is called to predict the corresponding cooling water outlet temperature, and the sum of the power consumption of the chiller unit and the power consumption of the cooling tower fan at the outlet temperature is estimated as the total power consumption of the system. S4. Under the constraint that the predicted cooling water outlet temperature meets the heat dissipation requirements of the refrigeration unit and is not lower than the outdoor wet-bulb temperature, determine the optimal combination of operating parameters with the goal of minimizing the total power consumption of the system, and issue the optimal combination of operating parameters for execution.

[0011] Furthermore, the input features also include the sum of the cooling tower fan frequencies and the number of cooling towers in operation; The decision variables include the sum of the cooling tower fan frequencies and the number of cooling towers in operation.

[0012] Furthermore, the monotonicity constraint penalty is not based on the automatic differential analytical gradient construction of the model, but is constructed through a bidirectional perturbation test, including: While keeping the other input characteristics unchanged, perturbations in both positive and negative directions are applied to the cooling demand component to obtain a high-load auxiliary sample and a low-load auxiliary sample. The high-load auxiliary sample and the low-load auxiliary sample are respectively input into the model, and forward inference is performed once for each to obtain the predicted effluent temperature under high load and the predicted effluent temperature under low load. When the predicted outlet water temperature under high load is lower than the current predicted outlet water temperature, or when the current predicted outlet water temperature is lower than the predicted outlet water temperature under low load, the difference in the direction of violation is included in the monotonicity constraint penalty.

[0013] Furthermore, the weighting coefficients between the data fitting loss term and the mechanism constraint loss term in the total loss function are adaptively updated batch-wise during training, including: Based on the order of magnitude ratio of the data fitting loss to the mechanism constraint loss in the current batch, and combined with the preset target balance coefficient, the candidate weights are calculated. When the mechanism constraint loss is lower than the preset convergence threshold, the current weighting coefficients are kept unchanged; otherwise, the candidate weights are adopted. The weights of the adopted candidates are truncated with preset upper and lower bounds; Using exponential smoothing, the weighting coefficients actually used in this batch are obtained from the weighting coefficients of the previous batch and the truncated candidate weights.

[0014] Furthermore, the mechanism constraint loss term also includes upper bound constraint penalty and approximation degree constraint penalty; The upper bound constraint penalty uses the cooling water return temperature as the upper bound of the predicted value. The approximation constraint penalty applies a penalty to the portion of the difference between the predicted cooling water outlet temperature and the outdoor wet-bulb temperature that deviates from a preset range. The lower bound constraint penalty and the upper bound constraint penalty are hard constraints that cannot be violated, while the approximation constraint penalty is a soft constraint that only takes effect within the range defined by the hard constraints. When the two conflict, the hard constraints take precedence.

[0015] Furthermore, the mechanism constraint loss term also includes wind turbine frequency monotonicity constraint penalty and number of units coupling constraint penalty; The fan frequency monotonicity constraint penalty applies a perturbation to the sum of fan frequencies while keeping other input characteristics unchanged and performs forward reasoning. When the predicted outlet water temperature increases with the increase of the sum of fan frequencies, the difference in the direction of violation is included in the penalty to constrain the two to be monotonically negatively correlated. The number of units coupled constraint penalty, under the condition that the sum of cooling demand and fan frequency remains unchanged, applies a disturbance of increasing or decreasing the number of units in operation by one and performs forward reasoning, and calculates the penalty according to the following rules: The portion of the predicted effluent temperature change caused by a change in the number of units exceeding a preset threshold will be penalized. The portion of the cooling gain resulting from increasing the number of units while keeping the total air volume constant, that does not monotonically increase with the increase in the number of units, is included in the penalty.

[0016] Furthermore, the amount of disturbance applied in both positive and negative directions is taken as a preset proportion of the current cooling demand component value.

[0017] Furthermore, the cooling demand is obtained by summing the total energy consumption of the chiller unit and the cooling capacity of the chilled water, and the cooling capacity of the chilled water is calculated by the chilled water flow rate and the temperature difference between the supply and return water. The outdoor wet-bulb temperature is calculated from the outdoor dry-bulb temperature and relative humidity using an empirical formula.

[0018] Furthermore, the time interval for acquiring data is set according to the thermal inertia of the cooling tower system, the model predictive control issuance cycle, and the equipment sampling capability. Furthermore, the acquired data is preprocessed, including missing value imputation, removal of transient data during equipment start-up and shutdown, and removal of outliers.

[0019] Furthermore, it also includes an online model update step: when the running reaches a set period or the online prediction error continuously exceeds a preset threshold, an update is triggered; The model was fine-tuned using a dataset that combined incremental running data and historical data; Replace the model if the updated model outperforms the original model in performance verification.

[0020] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention provides a cooling tower water temperature prediction and control method that integrates mechanistic constraints. The outdoor wet-bulb temperature is used as the lower bound of the predicted outlet water temperature, and the monotonic trend of the outlet water temperature increasing with cooling demand is explicitly embedded into the training target of the neural network as a monotonicity constraint. This allows the model to be constrained by thermodynamic mechanisms while fitting historical data, fundamentally eliminating unreasonable predictions such as outputting below the wet-bulb temperature or trend reversal in purely data-driven models under sparse sample regions or extreme operating conditions. This enhances the mechanistic compliance of the prediction results and the safety margin for control decisions.

[0021] 2. This invention provides a cooling tower water temperature prediction and control method that integrates mechanistic constraints. It employs bidirectional perturbation testing instead of automatic differential analytical gradients to construct monotonic constraints. Since perturbation testing relies solely on the model's forward inference, it is unaffected by non-smooth activation functions in the network, avoiding constraint failures caused by analytical gradients failing at non-smooth points or by gradient vanishing or exploding in deep networks. Furthermore, its calculation process does not involve layer-by-layer backward differentiation, facilitating matching with real-time control cycles. Compared to conventional mechanistic constraint methods based on analytical gradients, this invention achieves unexpected results in the effectiveness and training stability of monotonic constraints.

[0022] 3. This invention provides a cooling tower water temperature prediction and control method that integrates mechanistic constraints. The prediction results constrained by the mechanism are directly used for global optimization of the fan frequency. Under the constraint that the predicted outlet water temperature meets the heat dissipation requirements and is not lower than the wet-bulb temperature, the optimal frequency combination is determined and issued with the goal of minimizing the total power consumption of the system. This forms a complete closed loop of constrained prediction, reliable optimization, and safe issuance, so that the improvement in prediction accuracy can be reliably converted into energy-saving benefits at the system level.

[0023] 4. This invention provides a cooling tower water temperature prediction and control method that integrates mechanistic constraints. By using an adaptive weight update mechanism to dynamically balance the magnitude of data fitting loss and mechanistic constraint loss, it avoids the neglect of a certain target or training oscillation caused by the large difference in magnitude between the two, thus ensuring the stability of the training process and the continuous effectiveness of the constraints. Attached Figure Description

[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0025] Figure 1 This is a schematic diagram of the overall process of the method of the present invention; Figure 2 This is a schematic diagram of the calculation process of the physical constraint loss function of the present invention; Figure 3 This is a schematic diagram of the network structure of the artificial neural network prediction model of this invention; Figure 4 This is a schematic diagram comparing the prediction results of the method of this invention with those of a pure data-driven model; Figure 5 This is a schematic diagram of the curve showing how the weighting coefficients of physical constraints change with the number of iterations during the training process of this invention. Detailed Implementation

[0026] The technical solution of the present invention will be more clearly and completely explained below with reference to the accompanying drawings and through the description of preferred embodiments of the present invention.

[0027] like Figure 1 As shown in the figure, the central air conditioning cooling tower outlet water temperature prediction and energy-saving optimization control method based on the fusion of mechanism and AI provided in this embodiment is implemented using the central air conditioning cooling tower system of a commercial complex as an example. The system includes several cooling towers operating in parallel, and corresponding variable frequency fans, cooling water pumps, and water-cooled chillers. During implementation, historical operating data and outdoor meteorological data of the cooling tower system are first acquired. The outdoor meteorological data is collected through temperature and humidity sensors, including outdoor dry-bulb temperature and outdoor relative humidity. The operating data is collected through sensors and instruments installed at each device, including the fan operating frequency of each cooling tower, the number of cooling towers currently in operation, cooling water return temperature, chilled water supply temperature, chilled water return temperature, chilled water flow rate, chiller cooling capacity, and total energy consumption of the chiller unit.

[0028] The data acquisition time interval is set in a way that matches the thermal inertia hysteresis characteristics of the cooling tower system, the issuance cycle of model predictive control, and the sampling capability of the device's programmable logic controller. In this embodiment, a 60-minute integration period is used, but this period does not constitute a limitation of the invention. In other embodiments, different periods such as one minute, five minutes, and fifteen minutes can be selected according to the system response speed. When integrating data according to the set period, for instantaneous quantities, such as outdoor dry-bulb temperature, outdoor relative humidity, cooling tower fan frequency, number of cooling towers in operation, and cooling water return temperature, the average value within that time period is taken as the integration result. For cumulative quantities, such as total energy consumption of the chiller unit and chilled water flow rate, the difference between the readings at the beginning and end of that time period is taken as the cumulative result for that time period.

[0029] After data integration, preprocessing is performed on the acquired data. For missing values ​​caused by sensor failure or communication interruption, linear interpolation or the K-nearest neighbor algorithm is used to fill them in. For the equipment start-up and shutdown transition phase, such as the first few minutes after the equipment is turned on or off, due to the unstable physical meaning, this type of transient data is removed based on the equipment's start-up and shutdown flags. For outliers, the interquartile range method is used to identify and remove them. At the same time, data under typical abnormal operating conditions such as seasonal transitions and holidays are specially marked and isolated. Before normalization, the reasonable boundary range of each feature in a physical sense is defined to avoid the impact of extreme outliers on the normalization results. Finally, the data is aligned and summarized by timestamp to construct the original dataset, which is stored in the database.

[0030] After preprocessing, the input features required for the model are calculated based on the preprocessed data. In this embodiment, the model's input feature vector consists of four components: cooling demand, outdoor wet-bulb temperature, cooling tower fan frequency, and the number of cooling towers in operation. The model's output is the cooling water outlet temperature.

[0031] The outdoor wet-bulb temperature is calculated from the outdoor dry-bulb temperature and outdoor relative humidity using an empirical formula, serving as the theoretical physical lower limit of the cooling water outlet temperature. This embodiment employs a classic empirical formula from the HVAC field, substituting the outdoor dry-bulb temperature (in degrees Celsius) and outdoor relative humidity (ranging from zero to one hundred) into the formula to calculate the outdoor wet-bulb temperature. It should be noted that this outdoor wet-bulb temperature, as the theoretical limit temperature achievable by the cooling tower's evaporative cooling, represents a physically insurmountable lower limit for the cooling water outlet temperature; this relationship forms the physical basis for the boundary constraints discussed later.

[0032] Specifically, the outdoor wet-bulb temperature is calculated from the outdoor dry-bulb temperature and the outdoor relative humidity using the Stull empirical formula, as shown below: ;

[0033] In the formula, T represents the outdoor wet-bulb temperature in degrees Celsius; T represents the outdoor dry-bulb temperature in degrees Celsius; RH represents the outdoor relative humidity as a percentage, ranging from 0 to 100.

[0034] Cooling demand is calculated based on the law of conservation of energy, using the sum of the total energy consumption of the chiller unit and the chilled water cooling capacity. The chilled water cooling capacity is calculated using the specific heat formula based on the chilled water flow rate and the temperature difference between the supply and return water. Specifically, the chilled water cooling capacity is calculated from the chilled water flow rate, chilled water return temperature, and chilled water supply temperature. This chilled water cooling capacity is then added to the total energy consumption of the chiller unit to obtain the overall cooling demand representing the heat dissipation requirement of the cooling water system. The sum of the cooling tower fan frequencies is obtained by adding the average frequencies of all operating cooling tower fans during the specified time period. The number of cooling towers in operation is obtained by statistically analyzing the operating status of each fan.

[0035] Furthermore, the cooling demand in the above input characteristics is calculated based on the law of conservation of energy. First, the cooling capacity of the chilled water is calculated using the specific heat formula of water, based on the chilled water flow rate and the temperature difference between the supply and return water, as shown in the following formula: ; In the formula, ρ is the chilled water cooling capacity; c is the specific heat capacity of water; ρ is the density of water; V is the chilled water flow rate during this cycle. and These are the chilled water return temperature and chilled water supply temperature, respectively, both in degrees Celsius; the denominator is used to convert each physical quantity to a unified dimension.

[0036] Then, the chilled water cooling capacity is added to the total energy consumption of the chiller unit to obtain the cooling demand characterizing the overall heat dissipation load of the cooling water system, as shown in the following formula: ; In the formula, For cooling needs; This represents the total energy consumption of the chiller unit. The chilled water cooling capacity is given by the above formula.

[0037] Furthermore, the sum of the cooling tower fan frequencies is obtained by adding up the average frequencies of the fans of all operating cooling towers during that period, as shown in the following formula: ; In the formula, This is the sum of the frequencies of the cooling tower fans; Let N be the average frequency of the fan in the i-th operating cooling tower; N is the number of operating cooling towers.

[0038] like Figure 3As shown, after obtaining the above input features and output labels, an artificial neural network model is constructed with four input features as input and cooling water outlet temperature as output. In this embodiment, the model adopts a multilayer perceptron structure, including one input layer, at least two hidden layers, and one output layer; the input layer has four nodes, corresponding to the sum of cooling demand, outdoor wet-bulb temperature, fan frequency, and number of operating fans, respectively; the hidden layer uses a modified linear unit as the activation function to capture the nonlinear mapping relationship between input and output, and its number of nodes can be selected according to empirical rules based on the input feature dimension and sample size, and regularization strategies such as random deactivation and batch normalization can be introduced during training to suppress overfitting; the output layer has one node, and uses a linear activation function to output the normalized value of cooling water outlet temperature. Before feeding the input features into the model, zero-mean normalization is used to standardize each feature and label. This involves first calculating the mean and standard deviation of each feature and label in the training set, then mapping the original data to a distribution with a mean of zero and a standard deviation of one, and recording the mean and standard deviation. This same standardization process is then applied to the real-time input during the inference phase, and the model output is de-standardized to restore the temperature value. Those skilled in the art should understand that the multilayer perceptron is merely one example of this embodiment. Other network structures capable of fitting nonlinear mappings, such as recurrent neural networks capable of characterizing thermal inertia delays, can be used in other embodiments. These substitutions do not affect the construction method of the mechanism constraints of this invention.

[0039] Before feeding the input features into the model, each feature and label is standardized using the zero-mean standardization method, as shown in the following formula: ; In the formula, x is the original value of a feature or label; μ and σ are the mean and standard deviation of the feature or label on the training set, respectively. These are the standardized values. During the inference phase, the real-time input is standardized using the same mean and standard deviation, and the model output is de-standardized accordingly to restore the temperature value.

[0040] like Figure 2 As shown, the key to this embodiment lies in training the model using a total loss function weighted by a data fitting loss term and a mechanistic constraint loss term. The data fitting loss term is calculated based on the deviation between the model's predicted cooling water outlet temperature and the actual measured label value. This embodiment uses the mean absolute error as a metric to quantify the model's fitting accuracy on historical data. The mechanistic constraint loss term consists of several mechanistic constraint penalty terms, which will be explained below.

[0041] The data fitting loss term uses the mean absolute error to measure the deviation between the model's predicted values ​​and the actual labels, as shown in the following formula: ; In the formula, is the data fitting loss term; n is the number of samples in the current batch; and These are the predicted effluent temperature and the actual label value for the k-th sample, respectively (both are standardized values).

[0042] The first mechanistic constraint penalty term is the boundary constraint penalty. Based on the heat and mass transfer limit of evaporative cooling in the cooling tower, when the model predicts that the cooling water outlet temperature is lower than the current outdoor wet-bulb temperature, a positive penalty error is generated, forcing the predicted value to approach or exceed the outdoor wet-bulb temperature; when the predicted outlet temperature is not lower than the outdoor wet-bulb temperature, this penalty term is zero.

[0043] The boundary constraint penalty can be expressed as follows: ; In the formula, Penalty for lower bound constraint; n is the number of samples; Let be the outdoor wet-bulb temperature of the k-th sample; Let be the predicted effluent temperature of the k-th sample; This means that a positive value is taken only when the predicted value is lower than the wet-bulb temperature, and zero is taken otherwise.

[0044] The second mechanistic constraint penalty term is the monotonicity constraint penalty, used to ensure that the predicted outlet water temperature does not decrease monotonically as cooling demand increases, while other conditions remain unchanged. It is worth noting that this embodiment does not construct this constraint by automatically differentiating the model to obtain the analytical gradient of the predicted output with respect to cooling demand. Instead, it uses a bidirectional perturbation test. This is because activation functions such as the modified linear unit, widely used in neural networks, are non-smooth. Monotonic constraints constructed based on analytical gradients are prone to failure near non-smooth points and are susceptible to gradient vanishing or exploding in deep networks. Bidirectional perturbation testing, relying solely on forward inference, is more robust to these problems, and its calculation process does not involve layer-by-layer backward differentiation, making it easier to match with real-time control cycles. Specifically, for each current sample, while keeping the outdoor wet-bulb temperature, the sum of fan frequencies, and the number of fans in operation constant, a positive perturbation and a negative perturbation are applied to the cooling demand component, thus constructing a high-load auxiliary sample with cooling demand higher than the current value and a low-load auxiliary sample with cooling demand lower than the current value. These high-load and low-load auxiliary samples are then input into the model, and forward inference is performed once for each, yielding the predicted outlet water temperature for high load and low load. According to physical laws, the higher the cooling demand and the heavier the system's heat dissipation burden, the higher the outlet water temperature should be, assuming other conditions remain unchanged. Therefore, the predicted outlet water temperature for high load should not be less than the current predicted outlet water temperature, and the current predicted outlet water temperature should not be less than the predicted outlet water temperature for low load. If this relationship is violated, for example, if the predicted outlet water temperature for high load is lower than the current predicted outlet water temperature, the difference in the violated direction is taken as a monotonicity constraint penalty and included in the loss. The disturbance applied to the cooling demand component is a preset proportion of the current cooling demand value. In this embodiment, it is set to five to ten percent of the current cooling demand value to balance the distinguishability and locality of the disturbance.

[0045] Specifically, perturbations in both positive and negative directions are applied to the cooling demand component of the current sample to construct high-load auxiliary samples and low-load auxiliary samples, whose cooling demand components are shown in the following formula: , ; In the formula, The cooling requirements for the current sample; The perturbation ratio is a preset ratio of the current cooling demand value; and These are the cooling demand components for high-load auxiliary samples and low-load auxiliary samples, respectively.

[0046] Two auxiliary samples are input into the model and forward inference is performed once for each sample to obtain the predicted effluent temperature under high load and the predicted effluent temperature under low load. Based on this, the monotonicity constraint penalty is calculated as shown in the following formula: ; In the formula, As a monotonicity constraint penalty; The predicted effluent temperature for the current sample; and These are the predicted effluent temperatures for the high-load auxiliary sample and the low-load auxiliary sample, respectively. When the high-load predicted value is less than the current predicted value, or the current predicted value is less than the low-load predicted value, the corresponding max term takes a positive value, that is, a penalty is imposed on the direction that violates monotonicity.

[0047] The third mechanism constraint penalty is the upper bound constraint penalty. According to the law of conservation of energy, the outlet water temperature of the cooling tower should not be higher than its cooling water return temperature. When the outlet water temperature predicted by the model is higher than the current cooling water return temperature, a corresponding penalty error is generated.

[0048] The upper bound constraint penalty can be expressed as follows: ; In the formula, Penalty for upper bound constraints; n is the number of samples; Let be the predicted effluent temperature of the k-th sample; The return water temperature of the k-th sample is given; the penalty is positive only when the predicted value is higher than the return water temperature.

[0049] The fourth mechanism constraint penalty is the approximation degree constraint penalty. In this embodiment, the difference between the predicted outlet water temperature and the outdoor wet-bulb temperature, i.e., the approximation degree, is constrained to fall within a typical reasonable range, such as 3 to 7 degrees Celsius. Penalties are imposed on deviations from this range. It should be noted that the aforementioned boundary constraint penalty and upper bound constraint penalty define the physically feasible domain of the predicted value, which are inviolable hard constraints; while the approximation degree constraint penalty characterizes a typical engineering experience range, which is a soft constraint that only takes effect within the feasible domain defined by the hard constraints. Its range endpoints can be parameterized according to the season and load factor. When the approximation degree soft constraint and the hard constraint conflict, the hard constraint takes precedence, thereby avoiding contradictions between constraints that could lead to training failure.

[0050] The aforementioned approximation constraint penalty can be expressed as follows: ; In the formula, Penalty for approximation degree constraint; is the approximation degree of the k-th sample, which is the difference between the predicted outlet water temperature and the outdoor wet-bulb temperature; a and b are the lower and upper limits of the preset reasonable range (e.g., 3 degrees Celsius and 7 degrees Celsius), respectively; when the approximation degree is lower than a or higher than b, the corresponding max term takes a positive value.

[0051] The fifth mechanism constraint penalty is the fan frequency monotonicity constraint penalty. Its construction method is similar to the monotonicity constraint of cooling demand. That is, while keeping other input characteristics unchanged, a perturbation is applied to the sum of fan frequencies and forward inference is performed. When the predicted outlet water temperature increases with the increase of the sum of fan frequencies, violating the monotonic negative correlation law that the increase of fan speed should cause the outlet water temperature to decrease, the difference in the violated direction is taken into the penalty.

[0052] The frequency monotonicity constraint penalty for the wind turbine can be expressed as follows: ; In the formula, Penalty for wind turbine frequency monotonicity constraint; The predicted effluent temperature for the current sample; The predicted outlet water temperature is obtained by applying a positive perturbation to the sum of the fan frequencies; the penalty is positive when increasing the fan frequency causes the predicted outlet water temperature to increase.

[0053] The sixth mechanism constraint penalty is the number of units coupling constraint penalty. Under the condition that the sum of cooling demand and fan frequency remains constant, a disturbance of increasing or decreasing the number of operating units is applied, and forward inference is performed. The penalty is calculated according to two quantifiable rules: the first is the continuity rule, which states that if the change in predicted outlet water temperature caused by a unit change in the number of units exceeds a preset threshold, the portion exceeding the threshold is included in the penalty to suppress abnormal jumps caused by changes in the number of units; the second is the diminishing marginal return rule, which states that when the total air volume remains constant, the cooling gain generated by increasing the number of operating units should monotonically not increase with the increase in the number of units. If this diminishing marginal return relationship is violated, the portion of the violation is included in the penalty. Through these two rules, the nonlinear coupling relationship between the number of operating units and the outlet water temperature, which conforms to the laws of fluid mechanics and system energy efficiency, is transformed into a calculable and convergent constraint.

[0054] After obtaining the data fitting loss term and the aforementioned mechanistic constraint penalty terms, the mechanistic constraint penalty terms are summed to form the mechanistic constraint loss term. The data fitting loss term and the mechanistic constraint loss term are then weighted and summed to obtain the total loss function. The weighting coefficient before the mechanistic constraint loss term is used to balance the two types of objectives: data fitting and mechanistic constraints. Considering that the data fitting loss and the mechanistic constraint loss may differ significantly in magnitude, improper weighting coefficients could lead to the neglect of one type of objective or oscillations during training. Therefore, this embodiment adaptively updates the weighting coefficients within each training batch. Specifically, firstly, a numerical stability constant is introduced to prevent the denominator from being zero. Based on the ratio of the magnitude of the data fitting loss to the mechanistic constraint loss of the current batch, and combined with a preset target balance coefficient, a candidate weight is calculated to keep the contribution of the mechanistic constraint loss in the total gradient at a reasonable level. Then, it is determined whether the mechanistic constraint loss of the current batch has converged to below a very small threshold. If it has converged, it indicates that the mechanistic constraint has been fully satisfied, so the candidate weights calculated for this batch are ignored and the current weighting coefficient remains unchanged to avoid the weighting coefficient from oscillating due to an excessively small denominator. If it has not yet converged, the candidate weights are adopted as the updated candidate values. Next, the adopted candidate weights are truncated with preset upper and lower bounds to prevent them from being too small and causing the mechanistic constraint to fail, or too large and causing the model to overemphasize the mechanistic constraint and ignore the data fitting. Finally, the weighting coefficients actually used in this batch are obtained by weighting the weighting coefficients of the previous batch and the truncated candidate weights in an exponential smoothing manner, thereby eliminating the weight jitter caused by data fluctuations between batches and ensuring the stability of the training process.

[0055] Specifically, firstly, based on the ratio of the magnitude of the data fitting loss to the mechanistic constraint loss in the current batch, and combined with the preset target balance coefficient, the candidate weights are calculated, as shown in the following formula:

[0056] In the formula, Candidate weights; and These represent the data fitting loss and the mechanism constraint loss for the current batch, respectively. The preset target balance coefficient is used to set the target proportion of the mechanistic constraint loss in the total gradient; To prevent numerical stability constants with a denominator of zero.

[0057] Then, it is determined whether the mechanism constraint loss has converged: if the mechanism constraint loss is lower than a preset threshold, the current weighting coefficient remains unchanged; otherwise, the above candidate weights are adopted and truncated with preset upper and lower bounds, as shown in the following formula: ; In the formula, The weights are truncated. and These are the preset lower and upper bounds of the weights, respectively; This means limiting the candidate weights to within these upper and lower bounds to prevent the mechanistic constraints from being invalidated due to excessively small weights, or the model from ignoring data fitting due to excessively large weights.

[0058] Finally, the weighting coefficients actually used in this batch are obtained from the weighting coefficients of the previous batch and the truncated weights using an exponential smoothing method, as shown in the following formula: ; In the formula, and These are the weighting coefficients actually used in this batch and the previous batch, respectively; β is the smoothing coefficient, and the closer the value is to 1, the smoother the weight changes with the batch.

[0059] The mechanism constraint loss term is obtained by summing the above penalty terms, as shown in the following formula: ; In the formula, For mechanism-constrained loss terms; , , Boundary-based penalties (lower bound, upper bound, proximity). , , For monotonic penalties (cooling demand monotonicity, fan frequency monotonicity, number of units coupling).

[0060] Then, the data fitting loss term and the mechanism constraint loss term are weighted and summed to obtain the total loss function used for training, as shown in the following equation:

[0061] In the formula, This is the total loss function; This is the loss term for data fitting; These are the weighting coefficients obtained from the above adaptive update.

[0062] After determining the total loss function, the constructed sample set is divided into training, validation, and test sets. During the training phase, forward propagation is performed on each batch to calculate the predicted value. The error is calculated based on the total loss function, and then the gradient is calculated using the backpropagation algorithm, and the network weights and biases are updated using gradient descent. This process is iterated until the mechanistic constraint loss term converges to below a preset threshold, at which point the optimal network parameters are saved. It should be noted that although the monotonicity constraint penalty and the number of coupling constraint penalty are obtained through perturbation testing, they still participate in backpropagation as components of the loss function, thereby continuously guiding the model output to conform to the corresponding physical laws during parameter updates.

[0063] The parameter update is performed using the gradient descent method, as shown in the following equation: ; In the formula, and These are the network parameters (weights and biases) before and after the update, respectively. The learning rate; This is the gradient of the total loss function with respect to the network parameters.

[0064] like Figure 4 As shown, after training is completed, the trained model is used for online prediction and energy-saving optimization. During online prediction, the saved optimal network parameters are loaded, the real-time feature vector at the current moment is constructed and input into the model, and the model outputs a predicted value of the cooling water outlet temperature that conforms to physical laws. Since boundary constraints and monotonicity constraints have been embedded in the training phase, the predicted value is always within the physically feasible region defined by the outdoor wet-bulb temperature and the cooling water return temperature, and there will be no unreasonable results such as the temperature being lower than the wet-bulb temperature or the trend reversal.

[0065] Based on the aforementioned predictive capabilities, energy-saving optimization is performed. Within each control cycle, a set of candidate frequency combinations is constructed, using the sum of cooling tower fan frequencies and the number of fans in operation as decision variables. For each candidate combination in the set, given the current cooling demand and the outdoor wet-bulb temperature, a trained model is invoked to predict the corresponding cooling water outlet temperature. Based on this, the sum of the chiller's condensing power consumption and the cooling tower fan power consumption at that outlet temperature is estimated as the total system power consumption for that candidate combination. Subsequently, under the constraint that the predicted cooling water outlet temperature meets the cooling unit's heat dissipation requirements and is not lower than the current outdoor wet-bulb temperature, the optimal frequency combination is determined from the candidate combination set with the goal of minimizing the total system power consumption. This optimal frequency combination is then sent to the cooling tower fan controller for execution. Since each predicted value involved in the optimization falls within the thermodynamically feasible range, the total power consumption estimate used for optimization is reliable, ensuring that the determined optimal frequency combination is engineering-safe and energy-efficient, achieving a global optimum where the chiller's power savings exceed the increased power consumption of the cooling tower fans.

[0066] To ensure the model's adaptability to equipment aging and seasonal drift, this embodiment also establishes an online model update mechanism. Specifically, a dual trigger condition of time period and prediction error exceeding a threshold is adopted. When the system runs for a set period, or when the online prediction error continuously exceeds a preset safety threshold, the model is triggered for update. During the update, a dataset that mixes recent incremental running data with historical datasets is used to prevent catastrophic forgetting of the neural network. The pre-trained model is fine-tuned instead of retrained from scratch to improve convergence speed. After the update, the performance of the model before and after the update is verified and compared. Only when the performance of the updated model is better than that of the unupdated model is the updated model replaced and put online, thereby ensuring that the updated model will not experience performance degradation in actual control.

[0067] To verify the beneficial effects of this invention, approximately one year's worth of operational data from the aforementioned commercial complex cooling tower system was used as an example. After integration and preprocessing according to a set cycle, approximately 8,000 valid samples were obtained. These samples were then divided into training, validation, and test sets and used for model training and evaluation. The following data are exemplary results of this embodiment, illustrating the improvement trend of this invention compared to a purely data-driven approach. Specific values ​​obtained during implementation will vary depending on the system and data. Regarding prediction accuracy, the average absolute error of the purely data-driven model without mechanistic constraints on the test set is approximately 0.62 degrees Celsius, while the average absolute error of the method of this invention on the test set is approximately 0.41 degrees Celsius, demonstrating a significant improvement in prediction accuracy. Regarding physical rationality, during the transitional season with sparse samples and under extremely low load conditions, the purely data-driven model exhibits a certain proportion of samples that violate physical laws, such as predicting outlet water temperature lower than the outdoor wet-bulb temperature or predicting an increase in water temperature despite a decrease in cooling demand. However, due to the explicit embedding of boundary constraints and monotonicity constraints, the proportion of such samples violating physical laws in the method of this invention is reduced to near zero. Regarding energy-saving performance, after applying the predictive model of this invention to the aforementioned energy-saving optimization, under typical partial load conditions, the combined energy consumption of the cooling tower fan and chiller unit decreased compared to the strategy of setting a fixed outlet water temperature, and no control oscillations occurred due to prediction exceeding limits. Figure 5 As shown, during the training process, the weighting coefficients before the mechanistic constraint loss term stabilize with the number of iterations through adaptive updates and exponential smoothing, without drastic fluctuations. This indicates that a stable balance has been achieved between the two objectives: data fitting and mechanistic constraints. These results demonstrate that, while maintaining or even improving fitting accuracy, this invention fundamentally eliminates unreasonable predictions that contradict thermodynamic principles, enabling the prediction results to be safely used for advanced control decisions such as model predictive control.

[0068] The above-described specific embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Various modifications, substitutions, and improvements made by those skilled in the art to the technical solutions of the present invention based on the provided textual description and drawings, without departing from the design concept and spirit of the present invention, should all fall within the scope of protection of the present invention. The scope of protection of the present invention is determined by the claims.

Claims

1. A cooling tower water temperature prediction and control method incorporating mechanistic constraints, characterized in that, include: S1. Obtain historical operating data and outdoor meteorological data of the cooling tower system; The input features and labels are calculated, where the input features include cooling demand and outdoor wet-bulb temperature, and the label is the cooling water outlet temperature. S2. Construct an artificial neural network model, wherein the model takes input features as input and cooling water outlet temperature as output; The model is trained using a total loss function, which is a weighted sum of a data fitting loss term and a mechanism constraint loss term. The mechanism constraint loss term includes a lower bound constraint penalty and a monotonicity constraint penalty. The lower bound constraint penalty uses the outdoor wet-bulb temperature as the lower bound of the predicted value, and the monotonicity constraint penalty characterizes that the predicted outlet water temperature remains monotonically unchanged as the cooling demand increases. S3. Within the control period, construct a set of candidate operating parameter combinations using the operating parameters of the cooling tower fan as decision variables; For each candidate combination in the set, the trained model is called to predict the corresponding cooling water outlet temperature, and the sum of the power consumption of the chiller unit and the power consumption of the cooling tower fan at the outlet temperature is estimated as the total power consumption of the system. S4. Under the constraint that the predicted cooling water outlet temperature meets the heat dissipation requirements of the refrigeration unit and is not lower than the outdoor wet-bulb temperature, determine the optimal combination of operating parameters with the goal of minimizing the total power consumption of the system, and issue the optimal combination of operating parameters for execution.

2. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 1, characterized in that, The input features also include the sum of cooling tower fan frequencies and the number of cooling towers in operation; The decision variables include the sum of the cooling tower fan frequencies and the number of cooling towers in operation.

3. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 1, characterized in that, The monotonicity constraint penalty is not based on the automatic differential analytical gradient construction of the model, but is constructed through a bidirectional perturbation test, including: While keeping the other input characteristics unchanged, perturbations in both positive and negative directions are applied to the cooling demand component to obtain a high-load auxiliary sample and a low-load auxiliary sample. The high-load auxiliary sample and the low-load auxiliary sample are respectively input into the model, and forward inference is performed once for each to obtain the predicted effluent temperature under high load and the predicted effluent temperature under low load. When the predicted outlet water temperature under high load is lower than the current predicted outlet water temperature, or when the current predicted outlet water temperature is lower than the predicted outlet water temperature under low load, the difference in the direction of violation is included in the monotonicity constraint penalty.

4. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 1, characterized in that, The weighted coefficients between the data fitting loss term and the mechanism constraint loss term in the total loss function are adaptively updated batch by batch during training, including: Based on the order of magnitude ratio of the data fitting loss to the mechanism constraint loss in the current batch, and combined with the preset target balance coefficient, the candidate weights are calculated. When the mechanism constraint loss is lower than the preset convergence threshold, the current weighting coefficients are kept unchanged; otherwise, the candidate weights are adopted. The weights of the adopted candidates are truncated with preset upper and lower bounds; Using exponential smoothing, the weighting coefficients actually used in this batch are obtained from the weighting coefficients of the previous batch and the truncated candidate weights.

5. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 1, characterized in that, The mechanism constraint loss term also includes upper bound constraint penalty and approximation degree constraint penalty; The upper bound constraint penalty uses the cooling water return temperature as the upper bound of the predicted value. The approximation constraint penalty applies a penalty to the portion of the difference between the predicted cooling water outlet temperature and the outdoor wet-bulb temperature that deviates from a preset range. The lower bound constraint penalty and the upper bound constraint penalty are hard constraints that cannot be violated, while the approximation constraint penalty is a soft constraint that only takes effect within the range defined by the hard constraints. When the two conflict, the hard constraints take precedence.

6. The cooling tower water temperature prediction and control method based on fusion mechanism constraints according to claim 3, characterized in that, The mechanism constraint loss term also includes wind turbine frequency monotonicity constraint penalty and number of units coupling constraint penalty; The fan frequency monotonicity constraint penalty applies a perturbation to the sum of fan frequencies while keeping other input characteristics unchanged and performs forward reasoning. When the predicted outlet water temperature increases with the increase of the sum of fan frequencies, the difference in the direction of violation is included in the penalty to constrain the two to be monotonically negatively correlated. The number of units coupled constraint penalty, under the condition that the sum of cooling demand and fan frequency remains unchanged, applies a disturbance of increasing or decreasing the number of units in operation by one and performs forward reasoning, and calculates the penalty according to the following rules: The portion of the predicted effluent temperature change caused by a change in the number of units exceeding a preset threshold will be penalized. The portion of the cooling gain resulting from increasing the number of units while keeping the total air volume constant, that does not monotonically increase with the increase in the number of units, is included in the penalty.

7. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 3, characterized in that, The amount of disturbance applied in both positive and negative directions is taken as a preset proportion of the current cooling demand component value.

8. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 1, characterized in that, The cooling demand is obtained by the sum of the total energy consumption of the chiller unit and the cooling capacity of the chilled water, and the cooling capacity of the chilled water is calculated by the chilled water flow rate and the temperature difference between the supply and return water. The outdoor wet-bulb temperature is calculated from the outdoor dry-bulb temperature and relative humidity using an empirical formula.

9. The cooling tower water temperature prediction and control method based on mechanistic constraints according to claim 1, characterized in that, The time interval for acquiring data is set according to the thermal inertia of the cooling tower system, the model predictive control issuance cycle, and the equipment sampling capability. Furthermore, the acquired data is preprocessed, including missing value imputation, removal of transient data during equipment start-up and shutdown, and removal of outliers.

10. The cooling tower water temperature prediction and control method based on fusion mechanism constraints according to claim 1, characterized in that, It also includes an online model update step: when the running reaches a set period or the online prediction error continuously exceeds a preset threshold, an update is triggered; The model was fine-tuned using a dataset that combined incremental running data and historical data; Replace the model if the updated model outperforms the original model in performance verification.