Chiller load forecasting method based on improved Tyrannosaurus Rex optimization neural network

By improving the Tyrannosaurus Rex optimization neural network method, the problem of inaccurate load prediction of chiller system in public buildings is solved, and higher prediction accuracy and superior prediction performance are achieved, providing data support for energy-saving optimization of HVAC system.

CN119168157BActive Publication Date: 2025-04-29NANTONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411416636.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-04-29
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

The actual load demand of chiller system in public buildings does not match the operating status, resulting in waste of energy, and it is difficult for the existing technology to achieve accurate prediction of chiller load.

Method used

The BP model weight and threshold are optimized based on improved Tyrannosaurus Rex optimization neural network, and the ITROA-BP load prediction model is constructed through data noise reduction processing, principal component analysis, BP model initialization and improved Tyrannosaurus Rex optimization algorithm (ITROA).

Benefits of technology

It improves the accuracy of chiller load prediction, reduces data dimensions, reduces calculation pressure, and provides a solid data foundation for energy saving optimization and energy efficiency diagnosis of HVAC systems through higher prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168157B_ABST
    Figure CN119168157B_ABST
Patent Text Reader

Abstract

The present invention provides a chiller load prediction method based on an improved Tyrannosaurus Rex optimization neural network, and belongs to the technical field of chiller load prediction. The problem of low load prediction accuracy of chillers in public buildings is solved. The technical scheme is as follows: it includes the following steps: S1: performing data noise reduction processing on the historical data of the chiller and dividing the data set; S2: using the principal component analysis method PCA to screen out the main components affecting the load of the chiller, and performing dimensionality reduction processing on the data; S3: normalizing the data after dimensionality reduction to determine the BP model structure; S4: integrating multiple improvement strategies to improve the Tyrannosaurus Rex optimization algorithm TROA, and obtaining the improved Tyrannosaurus Rex optimization algorithm ITROA; S5: using ITROA to optimize the weights and thresholds of the BP model, and obtaining the ITROA‑BP prediction model after training. The beneficial effects of the present invention are as follows: the present invention realizes accurate prediction of the load of chillers in buildings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of chiller load prediction, and in particular to a chiller load prediction method based on an improved Tyrannosaurus Rex optimized neural network. Background Art

[0002] With the continuous advancement of technology and economic development, the high energy consumption problem of building operations has become increasingly prominent. Relevant reports show that in 2020, my country's building operation energy consumption accounted for 23% of the country's total energy consumption, and the HVAC system consumed about 50% of the energy in public buildings. Further analysis of the energy consumption composition of the HVAC system shows that the energy consumption of the chiller system accounts for more than 50%. At present, there is a common technical problem in public buildings that the actual load demand does not match the operating status of the chiller system, resulting in a large amount of energy waste. This phenomenon shows that the chiller system has great energy-saving potential.

[0003] In recent years, the green and intelligent transformation of public buildings has received widespread attention. Relevant research and policy documents mention that by building an energy efficiency diagnosis system and analyzing building-related energy data, energy-saving optimization space for building equipment can be explored. Patent CN113203187B discloses a building HVAC load optimization control method, establishes a HVAC load prediction model including a linear part and a data-driven part, and then determines the indoor temperature optimization model. The air conditioning operation strategy can be changed according to the optimal indoor temperature obtained by the optimization model to achieve optimization control and reduce energy consumption costs. Patent CN114169254A discloses an abnormal energy consumption diagnosis method based on a building energy consumption prediction model, uses Pearson correlation analysis to determine the model input data, establishes a short-term energy consumption prediction model, and proposes a specific energy consumption diagnosis method on this basis. The energy consumption diagnosis of the building can be achieved by calculating the error between the model prediction result and the actual energy consumption. Based on the above content, it can be found that accurate prediction of the load of the chiller can not only provide strong data support for the energy efficiency diagnosis of public buildings, but also provide a solid data foundation for optimizing the operation management strategy of the HVAC system based on the load prediction results.

[0004] Therefore, in order to build an energy efficiency diagnosis system for public buildings, realize energy-saving optimization control of HVAC systems, and contribute to the green energy-saving transformation of public buildings, it is of certain practical significance and engineering application value to study and develop a chiller load prediction method with higher prediction accuracy. Summary of the invention

[0005] The purpose of the present invention is to provide a chiller load prediction method based on an improved Tyrannosaurus Rex optimized neural network, which can achieve accurate prediction of the chiller load in a building, provide guarantees for energy-saving optimization and energy efficiency diagnosis of the HVAC system, and lay the foundation for achieving energy conservation and emission reduction in buildings and green and intelligent transformation.

[0006] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically: a chiller load prediction method based on an improved Tyrannosaurus Rex optimized neural network, comprising the following steps:

[0007] Step S1: performing data noise reduction processing on the historical operation data of the chiller, and dividing the data set into a training set and a test set;

[0008] Step S2: Use principal component analysis (PCA) to screen out the main components that affect the chiller load, obtain a projection matrix, and use the projection matrix to perform dimensionality reduction processing on the training set and test set data;

[0009] Step S3: normalize the data after dimension reduction, use the processed data as the input data of the BP model, use the chiller load as the output data of the BP model, determine the number of nodes in each layer according to the input and output data of the BP model, and complete the BP model initialization;

[0010] Step S4: In order to solve the problems of slow convergence speed and easy falling into local extreme values, a variety of improvement strategies are integrated to improve the Tyrannosaurus Rex Optimization Algorithm (TROA), and the Improved Tyrannosaurus Rex Optimization Algorithm (ITROA) is obtained to improve the algorithm's search and optimization ability and accelerate the algorithm's convergence speed;

[0011] Step S5: Use ITROA to optimize the weights and thresholds of the BP model, assign the optimized parameters to the model, train the model using the training set data to obtain the ITROA-BP prediction model, and test the model using the test set data to output the load prediction results, and calculate multiple evaluation indicators to evaluate the model performance.

[0012] Furthermore, the data noise reduction processing method in step S1 is a sliding average method, and the formula is as follows:

[0013]

[0014] Among them, y n represents the center point data after smoothing, r is the radius of the sliding window, X i Represents each data point within the sliding window.

[0015] Furthermore, in step S2, the specific steps of using PCA to screen the main components that affect the chiller load and reduce the dimension of the data are as follows:

[0016] Step S21: The chiller operation data is subjected to Z-score standardization. The training set data matrix obtained after the noise reduction process in step S1 is X. Assuming that P is the number of variables in the training set data and N is the number of samples in the training set data, each data expression in the training set data matrix X after Z-score standardization is as follows:

[0017]

[0018] in,

[0019] Step S22: Solve the covariance matrix R of the training set data after Z-score standardization processing = (r ij ) P×P , in matrix R ij The expression is as follows:

[0020]

[0021] Among them, r ij represents the covariance between the i-th variable and the j-th variable, X * kj is the value of the kth sample on the jth variable in the training set data after standardization, X * ki It is the value of the kth sample on the i-th variable in the training set data after standardization.

[0022] Step S23: Calculate the eigenvalues ​​and eigenvectors of the training set data based on the covariance matrix obtained in step S22, and solve the characteristic equation |R-λI based on the covariance matrix R P |=0, get the eigenvalue λ i , i = 1, 2, ..., P, according to λ 1 ≥λ 2 ≥…λ P ≥0, and then solve the eigenvector e corresponding to each eigenvalue. 11 ,e 22 ,…,e PP .

[0023] Step S24: Determine the number of principal components l, and select the first l eigenvalues ​​according to the preset cumulative contribution rate threshold to obtain a dimension reduction matrix. The selection of the value of the principal component l mainly depends on the contribution rate and cumulative contribution rate of each principal component. The higher the contribution rate of the principal component, the more original information it contains. Usually, when the cumulative contribution rate of the first l principal components is greater than 85%, it can be considered that the first l principal components contain most of the original information of the data.

[0024] The cumulative contribution rate of the first l principal components γl It can be calculated by the following formula:

[0025]

[0026] Among them, λ i represents the i-th eigenvalue in descending order after solving the characteristic equation.

[0027] Step S25: Use the dimension reduction matrix to multiply the training set data and the test set data after the standardization processing respectively to obtain the training set data and the test set data after the PCA dimension reduction processing.

[0028] Furthermore, the specific steps of normalizing the data in step S3 to determine the number of nodes in each layer of the BP model are as follows:

[0029] Step S31 performs Min-Max normalization on the training set and test set data after PCA processing, and the calculation formula is as follows:

[0030]

[0031] Among them, x′ represents the normalized data, x represents the original data, and x min Represents the minimum value in the original data, x max Indicates the maximum value in the original data.

[0032] Step S32: Determine the number of nodes in each layer of the BP model. Determine the number of nodes in the input layer of the BP model based on the normalized training set data. The output layer is the chiller load, so the number of nodes in the output layer is 1. The number of nodes in the hidden layer can be determined by the following empirical formula:

[0033]

[0034] Among them, b and c represent the number of nodes in the input layer and output layer respectively, a is a constant between 1 and 10, and h is the number of nodes in the hidden layer.

[0035] Furthermore, the specific steps of integrating multiple strategies to improve the Tyrannosaurus Rex optimization algorithm in step S4 are as follows:

[0036] Step S41: The traditional Tyrannosaurus Rex optimization algorithm performs population initialization according to the following formula, and the individual positions in the population represent a set of weights and thresholds of the BP neural network model:

[0037] x i =rand(np,dim)*(ub-lb)+lb

[0038] Among them, x iis the initialized position of each prey in the population, np is the number of individuals in the population, dim is the dimension of the search space, ub and lb are the upper and lower limits of the search space respectively.

[0039] Step S42: The present invention introduces a Tent chaotic mapping strategy that integrates Gaussian variation, and performs a fused chaotic mapping on the initialized population to make its distribution more uniform. The Gaussian variation formula is as follows:

[0040] x′=x+σ*N(0,1)

[0041] Among them, x is the original individual, σ is the variance of Gaussian mutation, which controls the intensity of mutation, and N(0,1) is a random number of standard Gaussian distribution.

[0042] The population initialization formula that combines Gaussian mutation perturbation and Tent chaotic mapping is as follows:

[0043]

[0044] Among them, x i+1 represents the position of the prey after chaotic mapping, x i Represents the position of the prey after initialization.

[0045] Step S43: Calculate the fitness function value of the prey population after the chaotic mapping, and determine the minimum fitness function value F1. The fitness function of the selection algorithm is the mean square error (MSE) of the training set data, and the calculation formula is as follows:

[0046]

[0047] Among them, m is the number of training set data, is the error between the model prediction and the actual value, y i represents the load prediction value of the training set data, and y represents the actual load value of the training set data.

[0048] Step S44: The Tyrannosaurus Rex takes the individual corresponding to the minimum fitness function value F1 as the target prey, starts hunting and updates the prey position, and calculates the population fitness function value F2 after the updated position. The Tyrannosaurus Rex optimization algorithm takes into account the possibility of failure in the actual hunting process, and proposes a success rate estimate Er. The way Er affects the prey update position, the formula for the prey update position is as follows:

[0049]

[0050] x new =x+rand()*sr*(x*tr-target*pr)

[0051] Among them, x is the original position of the prey, x newFor the updated prey position, target is the target prey position, rand() is a random number uniformly distributed between 0 and 1, sr is the success rate, tr is the hunting speed of Tyrannosaurus rex, and pr is the escape speed of the prey.

[0052] Furthermore, a non - linear convergence factor is introduced to calculate the success rate estimate value Er. Introducing the non - linear convergence factor can make Er decrease slowly in the early stage of iteration, enabling Tyrannosaurus rex to fully explore the space and better find the global optimal solution. In the later stage of iteration, Er drops rapidly, enhancing the deep - development ability of Tyrannosaurus rex to search in the concentrated target direction and find the local optimal solution. The calculation formula of Er with the non - linear convergence factor is as follows:

[0053]

[0054] where t represents the current iteration number, and t max represents the maximum iteration number.

[0055] Step S45: After the hunting process of Tyrannosaurus rex ends, the positions of the population individuals are updated. The Composite Oppositional - based Learning (COBL) strategy is introduced to increase the population richness. Taking the updated - position population as the original solution, the opposite solutions of the population are generated, and the fitness function value F3 of the opposite solutions is calculated. The composite oppositional - based learning formula is as follows:

[0056]

[0057] where X i is the solution after position update, X COBL is the opposite solution of X i s is the distance coefficient, and lb and ub are the lower and upper limits of the search space respectively.

[0058] Step S46: Compare the fitness function value F2 of the original solution with the fitness function value F3 of the opposite solution. If F3 < F2, it indicates that the fitness function value of the opposite solution is smaller, and F3 is regarded as the fitness function value FX new after the final position update. Otherwise, F2 is taken as FXnew. Then, the minimum fitness function value F1 and the target prey position target are updated according to the following formula:

[0059]

[0060] Step S47: Determine whether the maximum iteration number is reached. If the maximum iteration number is reached, end the ITROA optimization process, and take the target prey position corresponding to the minimum fitness function value F1 as the final optimization result of the algorithm. Otherwise, start the next optimization iteration process from step S44.

[0061] Furthermore, step S5 uses ITROA to optimize the weights and thresholds of the BP model to obtain the ITROA-BP load forecasting model, which specifically includes:

[0062] Step S51: According to the number of nodes in each layer of the BP model established in step S3, the search space dimension dim is calculated using the formula and the maximum number of iterations t is set. max , sr, tr, pr and other parameters, the fitness function Fitness is selected as the mean square error of the training set.

[0063] Furthermore, the specific calculation formulas for dim and Fitness are as follows:

[0064] dim=input*hidden+hidden*output+hidden+output

[0065] Among them, input represents the number of neuron nodes in the input layer of the BP neural network model, hidden represents the number of neuron nodes in the hidden layer of the BP neural network model, and output represents the number of neuron nodes in the output layer of the BP neural network model.

[0066]

[0067] Among them, m is the number of input data sets in the training set, y i is the actual value of the training set load, is the model load prediction value.

[0068] Step S52: Use the improved Tyrannosaurus Rex optimization algorithm to optimize the weights and thresholds of the BP model, and record the iterative changes of the fitness function during the optimization process.

[0069] Step S53: assign the optimization result of the improved Tyrannosaurus Rex optimization algorithm, that is, the optimal weight and threshold of the BP model, to the BP neural network model initialized in step S3, and use the training set data to train the model to obtain a trained ITROA-BP load forecasting model.

[0070] Step S54: input the test set data into the ITROA-BP model to obtain the output chiller load prediction result, and perform denormalization processing on the prediction result.

[0071] Step S55: Calculate the error between the model prediction result and the actual load of the chiller, and evaluate the model performance based on the evaluation index.

[0072] Furthermore, the evaluation indicators in step S55 specifically include mean square error (MSE), root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R 2 ), the specific calculation formula is as follows:

[0073]

[0074] Among them, y i is the actual load value, is the load forecast value, and n is the number of data.

[0075]

[0076] Among them, y i is the actual load value, is the load forecast value, and n is the number of data.

[0077]

[0078] Among them, y i is the actual load value, is the load forecast value, and n is the number of data.

[0079]

[0080] Among them, y i is the actual load value, is the load forecast value, is the mean of the actual load value, and n is the number of data.

[0081] Compared with the prior art, the present invention has the following beneficial effects:

[0082] (1) The present invention uses the sliding average method and the principal component analysis method to perform noise reduction on the actual operation data of the chiller system, and screens out the main influencing components of the load, reducing the data dimension for load prediction of the chiller system. This helps to solve the problem of analyzing the massive data collected by the current digital transformation of buildings, and reduces the computing pressure of cloud servers or local terminals through data dimensionality reduction.

[0083] (2) The present invention proposes an improved Tyrannosaurus Rex optimization algorithm (ITROA) that integrates the Tent chaotic map with Gaussian variation, nonlinear convergence factor and composite adversarial learning (COBL) strategy. The randomly initialized population will be more evenly distributed after the Tent chaotic map with Gaussian variation. The nonlinear convergence factor enables the algorithm to explore the search space as much as possible in the early stage and conduct in-depth development of the local space in the later stage. COBL generates an adversarial solution after each position update, which improves the diversity of the population and helps the algorithm to jump out of the local optimal solution and find the global optimal solution.

[0084] (3) With the help of ITROA, the present invention optimizes the initial weights and thresholds of the BP neural network, trains the model based on the algorithm optimization results and the training set data, and uses the test set data to input the model for load prediction. The error index calculation results show that the obtained ITROA-BP load prediction model has higher prediction accuracy than the traditional BP load prediction model and the TROA-BP load prediction model, and can achieve efficient and accurate prediction of the chiller load, which can serve as an important reference for building energy efficiency diagnosis and HVAC system operation strategy optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0086] Figure 1 It is the overall flow chart of the present invention;

[0087] Figure 2 It is a strategy flow chart for improving the Tyrannosaurus Rex optimization algorithm in the present invention;

[0088] Figure 3 It is a comparison diagram of iteration curves of the improved Tyrannosaurus Rex optimization algorithm and the Tyrannosaurus Rex optimization algorithm in specific embodiment 1 of the present invention;

[0089] Figure 4 This is a comparison chart of predicted values ​​and actual values ​​of various models in specific embodiment 1 of the present invention;

[0090] Figure 5 This is a comparison diagram of prediction errors of various models in specific embodiment 1 of the present invention;

[0091] Figure 6 It is a comparison diagram of iteration curves of the improved Tyrannosaurus Rex optimization algorithm and the Tyrannosaurus Rex optimization algorithm in specific embodiment 2 of the present invention;

[0092] Figure 7 This is a diagram of the prediction error areas of different models in specific embodiment 2 of the present invention. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0094] Example 1

[0095] See also Figure 1 and Figure 5In 2023, the U.S. Department of Energy (DOE) and Berkeley Lab jointly released a set of commercial HVAC system monitoring data. This embodiment is based on the partial data of the chiller system of this set of data, which specifically includes 11,713 sets of data of 45 monitoring variables. The chiller load prediction method based on the improved Tyrannosaurus Rex optimization neural network is as follows:

[0096] In this embodiment, step S1 of denoising the chiller data and dividing the data set specifically includes:

[0097] Step S11: Smoothing and denoising the chiller operation data using a sliding average method.

[0098]

[0099] Among them, y n represents the center point data after smoothing, r is the radius of the sliding window, X i Represents each data point within the sliding window.

[0100] Step S12: Divide the data after smoothing and noise reduction into a training set and a test set at a ratio of 80% and 20%. After division, the training set data is 9370 sets of data containing 45 variables, and the test set data is 2343 sets of data containing 45 variables. The training set data is used to train the BP neural network model and adjust the structural parameters, and the test set is used to evaluate the prediction performance of the trained BP neural network model.

[0101] In this embodiment, step S2 uses PCA to screen the main components that affect the chiller load, and performs dimensionality reduction processing on the training set and test set data, specifically including:

[0102] Step S21: Assume that the data matrix of the training set excluding the load is X, P is the number of variables contained in X, N is the number of samples of data contained in X, calculate the mean and standard deviation corresponding to each monitoring variable in X, perform Z-score standardization on X, and obtain X * .

[0103] Step S22: Solve the matrix X obtained after Z-score standardization * The covariance matrix R = (r ij ) P×P .

[0104] Step S23: Calculate the eigenvalues ​​and eigenvectors of the training set data based on the covariance matrix R obtained in step S22, and solve the characteristic equation |R-λI based on the covariance matrix R P |=0, get the eigenvalue λ i , i = 1, 2, ..., P, according to λ1 ≥λ 2 ≥…λ P ≥0, and then solve the eigenvector e corresponding to each eigenvalue. 11 ,e 22 ,…,e PP .

[0105] Step S24: Set the cumulative contribution rate threshold to 95%, determine the number of principal components l, filter out the first l eigenvalues, and obtain a reduced dimension matrix. The calculation results of the principal component contribution rate and the cumulative contribution rate are shown in the following table:

[0106] Principal component number Eigenvalue Contribution rate (%) Cumulative contribution rate (%) Principal component 1 18.740 43.58 43.58 Principal component 2 6.116 14.22 57.80 Principal component 3 5.520 12.84 70.64 Principal component 4 2.987 6.95 77.59 Principal component 5 2.224 5.17 82.76 Principal component 6 1.980 4.60 87.37 Principal component 7 1.787 4.16 91.52 Principal component 8 0.999 2.32 93.84 Principal component 9 0.681 1.58 95.43 Principal component 10 0.638 1.48 96.91

[0107] According to the calculation results in the above table, the cumulative contribution rate of principal component 9 has reached the threshold of 95%, so the number of principal components l is determined to be 9. Then the first 9 eigenvalues ​​are screened out and used as the main components affecting the chiller load for subsequent dimensionality reduction processing.

[0108] Step S25: Use the mean and standard deviation of matrix X to perform Z-score standardization on the data matrix Y of the test set except the load, and obtain matrix Y * , use the dimension reduction matrix to multiply the matrix X * and Y * , and the training set data and test set data after PCA dimensionality reduction are obtained. In the training set and test set data after dimensionality reduction, the characteristic variables of the load are reduced from the original 44 to 9, and the dimensionality reduction effect is significant.

[0109] In this embodiment, step S3 normalizes the data and initializes the BP load forecasting model, specifically including:

[0110] Step S31: Perform Min-Max normalization on the training set and test set data after PCA processing, map the training set data to the interval [0, 1], and use the normalization parameters of the training set to map the test set data to the interval [0, 1]. The calculation formula is as follows:

[0111]

[0112] Among them, x′ represents the normalized data, x represents the original data, and x min Represents the minimum value in the original data, x max Indicates the maximum value in the original data.

[0113] Step S32: Determine the number of nodes in each layer of the BP model. The number of variables contained in the normalized training set data is 9, so the number of nodes in the input layer of the BP model is 9. The chiller load is the output of the BP model, so the number of output layer nodes is 1. The number of hidden layer nodes can be determined by the following empirical formula:

[0114]

[0115] Where b and c represent the number of nodes in the input layer and output layer, respectively, a is a constant between 1 and 10, and h is the number of nodes in the hidden layer. Substituting the number of nodes in the input layer and output layer, the number of nodes in the hidden layer ranges from [4, 13]. The hidden layer nodes are set according to this range, the BP model structure is determined, the model is trained, and the error is calculated. When the number of hidden layer nodes is 5, the model training error is the smallest, so the final structure of the BP model is determined to be 9 nodes in the input layer, 5 nodes in the hidden layer, and 1 node in the output layer.

[0116] Step S33: Create a BP neural network according to the structure determined in step S32 to complete the initialization setting of the chiller BP prediction model.

[0117] In this embodiment, step S4 integrates multiple strategies to improve the Tyrannosaurus Rex optimization algorithm, specifically including:

[0118] Step S41: Use the following formula to complete the prey population initialization:

[0119] x i =rand(np,dim)*(ub-lb)+lb

[0120] Among them, x i is the initial position of each prey in the population, np is the population size, dim is the search space dimension, ub and lb are the upper and lower limits of the search space respectively. In this embodiment, the parameters np are 50, ub and lb are 1 and -1 respectively, and dim is 56, which can be calculated by the following formula:

[0121] dim=input*hidden+hidden*output+hidden+output

[0122] Among them, input represents the number of neuron nodes in the input layer of the BP neural network model, hidden represents the number of neuron nodes in the hidden layer of the BP neural network model, and output represents the number of neuron nodes in the output layer of the BP neural network model.

[0123] Step S42: Perform Tent chaos mapping with Gaussian mutation disturbance on the initialized prey population to make the population distribution more uniform. The relevant formula is as follows:

[0124]

[0125] Among them, x i+1 represents the position of the prey after chaotic mapping, x i represents the position of the prey after initialization, σ is the variance of the Gaussian mutation, which controls the intensity of the mutation. In this embodiment, the value is 0.001, N(0,1) is a random number of the standard Gaussian distribution, and α is 0.5.

[0126] Step S43: Calculate the fitness function value of the prey population after chaotic mapping and determine the minimum fitness function value F1. The fitness function of the selection algorithm is the mean square error (MSE) of the training set data, and the calculation formula is as follows:

[0127]

[0128] Among them, m is the number of training set data, q i 2 is the error between the model prediction and the actual value, y i represents the load prediction value of the training set data, and y represents the actual load value of the training set data.

[0129] Step S44: The Tyrannosaurus Rex takes the individual corresponding to the minimum fitness function value F1 as the target prey, starts hunting and updates the prey position, and calculates the population fitness function value F2 after the updated position. The Tyrannosaurus Rex optimization algorithm takes into account the possibility of failure in the actual hunting process, and proposes a success rate estimate Er, which affects the way the prey updates the position. The formula for prey update position and Er calculation formula are as follows:

[0130]

[0131] x new =x+rand()*sr*(x*tr-target*pr)

[0132]

[0133] Among them, x is the original position of the prey, x new is the updated prey position, target is the target prey position, rand() is a random number uniformly distributed between 0 and 1, sr is the success rate, tr is the hunting speed of the Tyrannosaurus Rex, pr is the prey escape speed, t represents the current iteration number, and t max Indicates the maximum number of iterations. In this embodiment, sr is 0.5, tr is 0.4, and pr is 0.2.

[0134] Step S45: Generate the opposite solutions by means of composite opposition learning to enrich the population diversity. Take the population after updating the position through the Tyrannosaurus rex hunting process as the original solution, generate the opposite solutions of the population, and calculate the fitness function value F3 corresponding to the opposite solutions. The composite opposition learning formula is as follows:

[0135]

[0136] where X i is the solution after updating the position, X COBL is the opposite solution of X i , s is the distance coefficient, and lb and ub are the lower and upper limits of the search space respectively. In this embodiment, s takes the value of 1, and lb and ub take the values of 1 and -1 respectively.

[0137] Step S46: Compare the fitness function value F2 of the original solution with the fitness function value F3 of the opposite solution. If F3 < F2, it indicates that the fitness function value of the opposite solution is smaller, and regard F3 as the fitness function value FX new after the final update of the position, otherwise take F2 as FX new . Then update the minimum fitness function value F1 and the target prey position target according to the following formula:

[0138]

[0139] Step S47: After the update of the minimum function value F1 and the target position target is completed, judge whether the iteration number t reaches the maximum iteration number. If it has reached, end the algorithm optimization process, and output the prey position corresponding to the minimum fitness function value F1 at this time as the best weights and thresholds of the BP model to the initialized BP prediction model in step S3, otherwise return to step S44 to continue the iteration.

[0140] In this embodiment, step S5 uses ITROA to optimize the weights and thresholds of the BP model. The construction of the ITROA-BP load prediction model specifically includes:

[0141] Step S51: Set the relevant parameters of ITROA according to the parameter description in step S4. The maximum iteration number t max is 150, and the fitness function selects the mean square error (MSE) of the training set data.

[0142] Step S52: Use ITROA to optimize the weights and thresholds of the BP prediction model, and record the iterative change of the fitness function during the optimization process. In addition, use the unimproved TROA for optimization, record the iterative change of the fitness function, and compare the iterative situations of the two algorithms during the optimization process. The comparison chart of the iterative curves of the fitness functions of ITROA and TROA is as Figure 3 shown.

[0143] According to Figure 3 Content, compare the iterative process of ITROA and TROA. In the early stage of iteration, ITROA starts with a smaller fitness function value, which is due to the more uniform population distribution after the Tent chaotic mapping, reducing the possibility of the optimization algorithm starting with an inferior solution; comparing the decline speed of the ITROA and TROA curves, it can be seen that ITROA declines faster in the early stage, and the fitness function value tends to be stable when the number of iterations is small, because the introduction of nonlinear convergence factors enables ITROA to maintain a strong exploration ability in the early stage; comparing the later process of iteration, it can be found that the ITROA curve can converge to a smaller fitness function value than the TROA curve, because the nonlinear convergence factor enables the algorithm to have the ability to develop local space in the later stage of iteration, and the opposing solution generated by the COBL strategy also helps the algorithm to jump out of the local optimal solution and find the global optimal solution.

[0144] Step S53: assign the ITROA optimization result, i.e., the weight and threshold after BP model optimization, to the BP neural network model initialized in step S3, and use the training set data to train the model to obtain the ITROA-BP load forecasting model. Input the test set data into the ITROA-BP model to obtain the output chiller load forecasting result, and denormalize the forecasting result for error calculation.

[0145] Step S54: Assign the TROA optimization result to the BP model obtained in step S3, use the training set data to train the model, and obtain the TROA-BP load prediction model. In addition, directly use the training set data to train the BP model in step S3 to obtain the traditional BP load prediction model. Input the test set data into the TROA-BP and traditional BP load prediction models to obtain the corresponding chiller load prediction results and perform denormalization on the prediction results. The comparison of the prediction results of the load prediction models in steps S53 and S54 is shown in the figure below. Figure 4 shown.

[0146] observe Figure 4 It can be seen that although the trends of the corresponding curves of the three models are basically consistent with the actual load values, compared with the prediction results of the BP model and the TROA-BP model, the red curve representing the prediction results of the ITROA-BP model is closest to the black curve representing the actual load value, indicating that the prediction results of the ITROA-BP model are more accurate.

[0147] Step S55: Calculate the error between the model prediction results in steps S53 and S54 and the actual load of the chiller, and obtain an error distribution diagram such as Figure 5 As shown. Based on the prediction error of each model, the error evaluation index is calculated to compare the prediction performance of each model. The calculation results are shown in the following table:

[0148]

[0149] It can be seen from the results in the above table that the ITROA-BP load forecasting model in this embodiment is smaller than the traditional BP model and TROA-BP model in terms of MSE, RMSE and MAPE. 2 This indicator is greater than the other two models, which means that the ITROA-BP model performs better than the traditional BP model and TROA-BP model in all four evaluation indicators, indicating that the ITROA-BP model has higher prediction accuracy and better prediction performance.

[0150] Example 2

[0151] Example 1 implements load forecasting based on chiller data of public buildings in the United States. Since the chillers used in public buildings in the United States are different from the commonly used chillers in China in terms of brand and characteristics, and there are differences in climatic conditions between the two countries, in order to verify the practicality of the present invention in the problem of load forecasting of chillers in domestic public buildings, the historical operation data of the chillers used in Example 2 were collected from a public building in Suzhou. Initially, the chiller operation data of the building for 9 consecutive days in July 2024 was collected. After eliminating missing values ​​and outliers, 277 sets of valid data containing 15 monitoring variables were obtained. Based on this data, the specific steps of the chiller load forecasting method based on the improved Tyrannosaurus Rex optimized neural network are consistent with those in Example 1. Only the relevant data processing and prediction results are listed below:

[0152] First, the data was smoothed and denoised, and then the processed data was divided into a training set and a test set at a ratio of 80% and 20%. After the division, the training set data consisted of 222 sets of data containing 15 variables, and the test set data consisted of 55 sets of data containing 15 variables.

[0153] Secondly, the principal component analysis method is used to screen the main components that affect the load of the chiller. Set the cumulative contribution rate threshold to 95%, determine the number of principal components l, screen out the first l eigenvalues, and obtain a reduced dimension matrix. In this embodiment, the cumulative contribution rate of the first 4 eigenvalues ​​reaches the threshold, so the number of principal components l can be determined to be 4, and then the first 4 eigenvalues ​​are screened out to obtain a reduced dimension matrix. Use the reduced dimension matrix to multiply the training set data matrix and the test set data matrix after standardization to achieve the purpose of PCA dimensionality reduction. In the training set and test set data after dimensionality reduction, the characteristic variables of the load are reduced from the original 14 to 4, and the dimensionality reduction effect is obvious.

[0154] Then, the number of nodes in each layer of the BP model is determined. The number of variables contained in the normalized training set data is 4, so the number of nodes in the input layer of the BP model is 4. The chiller load is the output of the BP model, so the number of nodes in the output layer is 1. The number of nodes in the hidden layer can be determined by the following empirical formula:

[0155]

[0156] Where b and c represent the number of nodes in the input layer and output layer respectively, a is a constant between 1 and 10, and h is the number of nodes in the hidden layer. Substituting the number of nodes in the input layer and output layer, the number of nodes in the hidden layer ranges from [3, 12]. The hidden layer nodes are set according to this range, the BP model structure is determined, the model is trained and the error is calculated. When the number of hidden layer nodes is 8, the model training error is the smallest, so the final structure of the BP model is determined to be 4 nodes in the input layer, 8 nodes in the hidden layer, and 1 node in the output layer. The calculation error results of each hidden layer node model are shown in the following table:

[0157] Number of hidden layer nodes MSE calculation results 3 184.64 4 153.88 5 215.79 6 152.68 7 131.08 8 110.49 9 133.57 10 169.31 11 347.69 12 239.57

[0158] Next, set the parameters of the Tyrannosaurus optimization algorithm np to 50, ub and lb to 1 and -1 respectively, dim to 49, and the maximum number of iterations t max The parameters used in the related improvement measures are exactly the same as those in Example 1. ITROA and TROA are used to optimize the weight and threshold of the BP prediction model respectively, and the iterative changes of the fitness function during the optimization process are recorded. The comparison of the iterative curves of ITROA and TROA fitness functions is shown in Figure 6 shown.

[0159] according to Figure 6 Content, refer to the analysis process in Example 1, and compare the iterations of ITROA and TROA. In the early stage of iteration, although ITROA starts with a larger fitness function value, its iteration curve decreases faster than the iteration curve of TROA, and the fitness function value basically tends to be stable when the number of iterations is small. This is mainly due to the introduction of nonlinear convergence factors, which enables ITROA to maintain a strong exploration ability in the early stage; compared with the later process of iteration, it can be found that the ITROA curve can converge to a smaller fitness function value than the TROA curve. This is the result of the joint action of the nonlinear convergence factor and the COBL strategy. The algorithm not only has the ability to develop local space in the later stage of iteration, but the opposing solution generated by COBL also helps the algorithm to jump out of the local optimal solution and find the global optimal solution.

[0160] Finally, according to the optimization results of ITROA and TROA and the network structure of the BP model, the model is trained with the help of the training set data to obtain three load forecasting models: ITROA-BP, TROA-BP and traditional BP. The load forecasting is carried out using the test set data, and the errors between the prediction results of the three models and the actual load of the chiller are calculated. The prediction error area diagrams of different models are shown in Figure 2. Figure 7 As shown. Based on the prediction error of each model, the error evaluation index is calculated to compare the prediction performance of each model. The error evaluation index of each model is shown in the following table:

[0161]

[0162] From the results in the above table, we can see that the ITROA-BP load forecasting model in this embodiment has good performance in MSE, RMSE, MAPE and R 2 The performance of the four evaluation indicators is better than that of the traditional BP model and the TROA-BP model, indicating that the ITROA-BP model has higher prediction accuracy and superior prediction performance.

[0163] Figure 7 In the figure, the orange area represents the prediction error of the ITROA-BP model, the green area represents the prediction error of the TROA-BP model, and the purple area represents the prediction error of the traditional BP model. Figure 7 It can be seen that the area of ​​the orange region is significantly smaller than that of the green and purple regions, indicating that the ITROA-BP model has the smallest prediction error compared with the BP model and the TROA-BP model. Therefore, the prediction results of the ITROA-BP model load forecasting model are more accurate.

[0164] The present invention is used for load prediction of chillers in buildings to improve the prediction accuracy of the model. It can be used as a part of the building energy efficiency diagnosis system to provide data support for energy-saving optimization of the HVAC system and help the green and intelligent transformation of buildings.

[0165] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A chiller load forecasting method based on improved Tyrannosaurus Rex optimized neural network, characterized in that: The following steps are involved: Step S1: performing data noise reduction processing on the historical operation data of the chiller, and dividing the data set into a training set and a test set; The data noise reduction processing method in step S1 is the sliding average method, and the formula is as follows: Among them, y n represents the center point data after smoothing, r is the radius of the sliding window, X i Represents each data point within the sliding window; Step S2: Use the principal component analysis method PCA to screen out the main components that affect the chiller load, obtain the projection matrix, and use the projection matrix to perform dimensionality reduction processing on the training set and test set data; Step S3: normalize the data after dimension reduction, use the processed data as the input data of the BP model, use the chiller load as the output data of the BP model, determine the number of nodes in each layer according to the input and output data of the BP model, and complete the BP model initialization; Step S4: Aiming at the problems of slow convergence speed and easy falling into local extreme values, multiple improvement strategies are integrated to improve the Tyrannosaurus Rex optimization algorithm TROA, and an improved Tyrannosaurus Rex optimization algorithm ITROA is obtained to improve the algorithm's search and optimization ability and accelerate the algorithm's convergence speed; The specific steps of step S4 integrating multiple strategies to improve the Tyrannosaurus Rex optimization algorithm are as follows: Step S41: The traditional Tyrannosaurus Rex optimization algorithm performs population initialization according to the following formula, and the individual positions in the population represent a set of weights and thresholds of the BP neural network model: x i =rand(np,dim)*(ub-lb)+lb Among them, x i is the initialization position of each prey in the population, np is the number of individuals in the population, dim is the dimension of the search space, ub and lb are the upper and lower limits of the search space respectively; Step S42: Introduce the Tent chaotic mapping strategy of fused Gaussian mutation, perform fused chaotic mapping on the initialized population to make it evenly distributed. The Gaussian mutation formula is as follows: x′=x+σ*N(0,1) Among them, x is the original individual, σ is the variance of Gaussian mutation, which controls the intensity of mutation, and N(0,1) is a random number of standard Gaussian distribution; The population initialization formula that combines Gaussian mutation perturbation and Tent chaotic mapping is as follows: Among them, x i+1 represents the position of the prey after chaos mapping, x i represents the position of the prey after initialization; Step S43: Calculate the fitness function value of the prey population after the chaotic mapping, and determine the minimum fitness function value F1; the fitness function of the selection algorithm is the mean square error MSE of the training set data, and the calculation formula is as follows: Among them, m is the number of training set data, is the error between the model prediction and the actual value, y i represents the load prediction value of the training set data, and y represents the actual load value of the training set data; Step S44: The Tyrannosaurus Rex takes the individual corresponding to the minimum fitness function value F1 as the target prey, starts hunting and updates the prey position, and calculates the population fitness function value F2 after the updated position. The Tyrannosaurus Rex optimization algorithm takes into account the possibility of failure in the actual hunting process and proposes a success rate estimate Er. The way Er affects the prey update position, the formula for the prey update position is as follows: x new =x+rand()*sr*(x*tr-target*pr) Among them, x is the original position of the prey, x new is the updated prey position, target is the target prey position, rand() is a random number uniformly distributed between 0 and 1, sr is the success rate, tr is the hunting speed of the Tyrannosaurus Rex, and pr is the prey escape speed; The nonlinear convergence factor is introduced to calculate the success rate estimate Er. The nonlinear convergence factor is introduced to make Er decrease slowly in the early stage of iteration, so that the Tyrannosaurus Rex can fully explore the space and find the global optimal solution. In the later stage of iteration, Er decreases rapidly, which enhances the depth development ability of the Tyrannosaurus Rex. It searches for the concentrated target direction and finds the local optimal solution. The calculation formula of Er with the introduction of nonlinear convergence factor is as follows: Among them, t represents the current iteration number, t max Indicates the maximum number of iterations; Step S45: After the Tyrannosaurus Rex hunting process is completed, the individual positions of the population are updated, and the composite adversarial learning COBL strategy is introduced. The population after the updated position is used as the original solution, and the adversarial solution of the population is generated. The fitness function value F3 of the adversarial solution is calculated. The composite adversarial learning formula is as follows: Among them, X i is the solution after updating the position, X COBL Yes X i The opposite solution of , s is the distance coefficient, lb and ub are the lower and upper limits of the search space respectively; Step S46: Compare the fitness function value F2 of the original solution with the fitness function value F3 of the opposite solution. If F3 < F2, it indicates that the fitness function value of the opposite solution is smaller, and F3 is regarded as the fitness function value FX after the final update of the position. new , otherwise, F2 is used as FX. new , and then update the minimum fitness function value F1 and the target prey position target according to the following formula: Step S47: Determine whether the maximum number of iterations has been reached. If so, end the ITROA optimization process and take the target prey position corresponding to the minimum fitness function value F1 as the final optimization result of the algorithm. Otherwise, start the next optimization iteration process from step S44. Step S5: Use ITROA to optimize the weights and thresholds of the BP model, assign the optimized parameters to the model, train the model using the training set data to obtain the ITROA-BP prediction model, and test the model using the test set data, output the load prediction results, and calculate the evaluation index to evaluate the model performance.

2. The chiller load prediction method based on improved Tyrannosaurus Rex optimized neural network according to claim 1 is characterized in that: In step S2, the specific steps of using PCA to screen the main components that affect the chiller load and reduce the dimension of the data are as follows: Step S21: The chiller operation data is subjected to Z-score standardization. The training set data matrix obtained after the noise reduction process in step S1 is X. Assuming that P is the number of variables in the training set data and N is the number of samples in the training set data, each data expression in the training set data matrix X after Z-score standardization is as follows: in, Step S22: Solve the covariance matrix R of the training set data after Z-score standardization processing = (r ij ) P×P , in matrix R ij The expression is as follows: Among them, r ij represents the covariance between the i-th variable and the j-th variable, X * kj is the value of the kth sample on the jth variable in the training set data after standardization, X * ki is the value of the kth sample on the i-th variable in the training set data after standardization; Step S23: Calculate the eigenvalues ​​and eigenvectors of the training set data based on the covariance matrix obtained in step S22, and solve the characteristic equation |R-λI based on the covariance matrix R P |=0, get the eigenvalue λ i , i=1,2,…,P, according to λ1≥λ2≥…λ P ≥0, and then solve the eigenvector e corresponding to each eigenvalue. 11 ,e 22 ,…,e PP ; Step S24: Determine the number of principal components l, and select the first l eigenvalues ​​according to the preset cumulative contribution rate threshold to obtain a dimension reduction matrix. The selection of the principal component l value depends on the contribution rate and cumulative contribution rate of each principal component. The higher the contribution rate of the principal component, the more original information it contains. When the cumulative contribution rate of the first l principal components is greater than 85%, it is considered that the first l principal components contain most of the original information of the data. The cumulative contribution rate of the first l principal components γ l Calculated by the following formula: Among them, λ i represents the i-th eigenvalue sorted in descending order after solving the characteristic equation; Step S25: Use the dimension reduction matrix to multiply the training set data and the test set data after the standardization processing respectively to obtain the training set data and the test set data after the PCA dimension reduction processing.

3. The chiller load prediction method based on improved Tyrannosaurus Rex optimized neural network according to claim 1 is characterized in that: The specific steps of normalizing the data in step S3 to determine the number of nodes in each layer of the BP model are as follows: Step S31 performs Min-Max normalization on the training set and test set data after PCA processing, and the calculation formula is as follows: Among them, x′ represents the normalized data, x represents the original data, and x min Represents the minimum value in the original data, x max Indicates the maximum value in the original data; Step S32: Determine the number of nodes in each layer of the BP model. Determine the number of nodes in the input layer of the BP model based on the normalized training set data. The output layer is the chiller load, so the number of nodes in the output layer is 1. The number of nodes in the hidden layer can be determined by the following empirical formula: Where b and c represent the number of nodes in the input layer and output layer respectively, a is a constant between 1 and 10, and h is the number of nodes in the hidden layer.

4. The chiller load prediction method based on improved Tyrannosaurus Rex optimized neural network according to claim 1 is characterized in that: The step S5 uses ITROA to optimize the weights and thresholds of the BP model to obtain the ITROA-BP load forecasting model, which specifically includes: Step S51: According to the number of nodes in each layer of the BP model established in step S3, the search space dimension dim is calculated using the formula and the maximum number of iterations t is set. max , sr, tr, pr four parameters, the fitness function Fitness is selected as the mean square error of the training set; The specific calculation formulas for dim and Fitness are as follows: dim=input*hidden+hidden*output+hidden+output Among them, input represents the number of neuron nodes in the input layer of the BP neural network model, hidden represents the number of neuron nodes in the hidden layer of the BP neural network model, and output represents the number of neuron nodes in the output layer of the BP neural network model; Among them, m is the number of input data sets in the training set, y i is the actual value of the training set load, is the model load prediction value; Step S52: using the improved Tyrannosaurus Rex optimization algorithm to optimize the weight and threshold of the BP model, and recording the iterative changes of the fitness function during the optimization process; Step S53: assigning the optimization result of the improved Tyrannosaurus Rex optimization algorithm, i.e., the optimal weight and threshold of the BP model, to the BP neural network model initialized in step S3, and training the model using the training set data to obtain a trained ITROA-BP load forecasting model; Step S54: input the test set data into the ITROA-BP model to obtain the output chiller load forecast result, and perform denormalization processing on the forecast result; Step S55: Calculate the error between the model prediction result and the actual load of the chiller, and evaluate the model performance based on the evaluation index.

5. The chiller load prediction method based on improved Tyrannosaurus Rex optimized neural network according to claim 4 is characterized in that: The evaluation indicators in step S55 specifically include mean square error (MSE), root mean square error (RMSE), mean absolute percentage error (MAPE), and determination coefficient (R). 2 , the specific calculation formula is as follows: Among them, y i is the actual load value, is the load forecast value, n is the number of data; Among them, y i is the actual load value, is the load forecast value, n is the number of data; Among them, y i is the actual load value, is the load forecast value, n is the number of data; Among them, y i is the actual load value, is the load forecast value, is the mean of the actual load value, and n is the number of data.

Citation Information

Patent Citations

  • A Method for Optimizing and Controlling Building Heating, Ventilation and Air Conditioning Loads Based on Partially Linear Models

    CN113203187B

  • Abnormal energy consumption diagnosis method and system based on short-term building energy consumption prediction model

    CN114169254A

  • Elastic neural network load prediction method based on improved grey wolf optimization algorithm

    CN113313306A

  • Load prediction method based on adaptive improved mayfly naiad and BP neural network

    CN115438842A