Air conditioner refrigeration system energy consumption early warning method and device based on genetic algorithm
By optimizing wavelet neural network parameters using a genetic algorithm, the problem of nonlinear capture and parameter adjustment in predicting energy consumption of air conditioning refrigeration systems was solved, achieving efficient and accurate energy consumption early warning and meeting the real-time energy-saving needs of industrial scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUANENG REAL ESTATE CO LTD HEBEI XIONGAN BRANCH
- Filing Date
- 2026-01-21
- Publication Date
- 2026-06-09
AI Technical Summary
Existing methods for predicting energy consumption in air conditioning and refrigeration systems cannot effectively capture nonlinear relationships. They rely on manual experience to adjust parameters, resulting in limited model generalization ability, large prediction errors, and response delays, which cannot meet the real-time energy-saving requirements of industrial scenarios.
A genetic algorithm-based approach is used to optimize the parameters of a wavelet neural network. By encoding the chromosome structure with real numbers, designing a fitness function and an adaptive mutation strategy, the penalty coefficient is dynamically adjusted, the network parameters are automatically optimized, and the global optimum is found.
It improved the accuracy and efficiency of energy consumption prediction, shortened training time, reduced operating costs, and enabled real-time energy consumption management of air conditioning and refrigeration systems.
Smart Images

Figure CN122173991A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of data analysis and machine learning, and in particular to a method and device for early warning of energy consumption in air conditioning refrigeration systems based on genetic algorithms. Background Technology
[0002] Air conditioning and refrigeration systems, as core equipment for industrial environmental control, are widely used in precision manufacturing, data centers, and other fields sensitive to temperature and humidity. In related technologies, an energy consumption prediction system based on statistical analysis and traditional neural networks has been constructed through the collaborative operation of data acquisition, feature extraction, and model training. Specifically, this system covers the entire process from environmental parameter monitoring to energy consumption modeling, including key aspects such as temperature and humidity acquisition, compressor performance evaluation, and refrigerant status detection. With the development of Industry 4.0, existing technologies typically employ methods such as linear regression and time series analysis, but these have limitations in capturing nonlinear relationships. While traditional neural networks introduce multi-feature fusion mechanisms, they still rely on human experience for parameter tuning, resulting in limited model generalization ability.
[0003] However, existing energy consumption prediction methods directly use fixed feature sets without fully considering dynamic factors such as compressor performance and refrigerant charge, which may lead to incomplete system state representation. Specifically, existing neural network models are trained by manually adjusting parameters such as network structure and learning rate, and their iterative process typically requires hundreds or even thousands of iterations, making them prone to getting trapped in local optima. As a result, traditional methods have a success rate of less than 40% in parameter spaces of 10 dimensions or more, with prediction error rates reaching 15%-20%. Among these, the slow model convergence speed caused by the difficulty in parameter selection is particularly prominent. This limitation results in early warning response delays generally exceeding 72 hours, failing to meet the real-time energy-saving decision-making needs of industrial scenarios, and consequently affecting equipment lifespan and operating cost control. Summary of the Invention
[0004] The present invention aims to at least partially solve one of the technical problems in the related art.
[0005] Therefore, the first objective of this invention is to propose an energy consumption early warning method for air conditioning refrigeration systems based on genetic algorithms.
[0006] Another objective of this invention is to propose an energy consumption early warning device for air conditioning refrigeration systems based on genetic algorithms.
[0007] The third objective of this invention is to provide a computer device.
[0008] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.
[0009] To achieve the above objectives, a first aspect of the present invention proposes a method for early warning of energy consumption in an air conditioning refrigeration system based on a genetic algorithm, comprising: S1, the connection weights, translation factors and scaling factors of the wavelet neural network are encoded with real numbers to form a chromosome structure containing parameters; S2, Design a fitness function, which includes an error reciprocal term and a penalty term. The model accuracy and parameter stability are balanced by dynamically adjusting the penalty coefficient. S3 employs an adaptive mutation strategy based on genetic algorithms to mutate chromosomes. The mutation rate dynamically changes with the number of iterations of the genetic algorithm to balance the exploration and development capabilities of parameter search. S4 generates a new population based on crossover and selection operations of the genetic algorithm, and updates the wavelet neural network parameters after decoding the new population. This process is repeated until the preset maximum number of evolutions or the preset error precision is reached, thus obtaining the optimal parameter combination.
[0010] In one embodiment of the present invention, S1 includes: Calculate the error of each node in the hidden layer. ,in To adjust the coefficients, the overall error of the wavelet neural network is... N is the sample size; Design the change in the connection weights of the hidden layer. ,in Momentum factor To prevent small constants from being divided by zero, , Let be the change in connection weight of hidden layer node j in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design the input layer connection weight change amount ,in Momentum factor , This represents the change in the connection weight between input layer node i and hidden layer node j during the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Change in design translation coefficient ,in Momentum factor , is the change amount at the t-th iteration. is the learning rate, denotes the gradient value with respect to, and the calculation method is: ; Design the change amount of the scaling coefficient where is the momentum factor, , is the change amount at the t-th iteration. is the learning rate, denotes the gradient value with respect to, and its calculation method is .
[0011] In an embodiment of the present invention, the S2 includes: Perform real-number encoding on , , and to obtain , , and , and splice the transformed real-number encoding into a chromosome ; Design the fitness function , where is the penalty coefficient is the target value is the error function.
[0012] In an embodiment of the present invention, the S3 includes: Perform wavelet neural network training on the initial population , input into the wavelet neural network model. When the number of training rounds t < T and , after being processed by the hidden layer, the output value is obtained. Calculate the error of each node in the hidden layer, calculate the change amount of the connection weights in the hidden layer, the change amount of the connection weights in the input layer, the change amount of the translation coefficient, and the change amount of the scaling coefficient. At the same time, update the network weights through the following expressions: , , , , and let t = t + 1; When t = T or , end the training and obtain the energy consumption prediction value N1 is the number of samples in the training set; The predicted values obtained after training The fitness value F of each individual is calculated using the fitness function F in the genetic algorithm. A new population is obtained through roulette wheel selection, crossover, and mutation operations. ; New groups The new weights are obtained after decoding. , , and The process continues until the number of iterations reaches P. When the number of iterations in the genetic algorithm reaches its maximum P, the optimal individual is obtained. Decoding yields the optimal network weights. Training is over.
[0013] In one embodiment of the present invention, S4 includes: Test set Input the wavelet neural network (WNN) to obtain the prediction result. N² is the number of samples in the test set, and the mean relative error is used. and mean square deviation As an evaluation indicator for the final energy consumption prediction; Normalized sample sequences to be predicted Input WNN to obtain energy consumption prediction values. .
[0014] To achieve the above objectives, a second aspect of the present invention provides a parameter adaptive optimization device based on a genetic algorithm, comprising: The parameter encoding module is used to encode the connection weights, translation factors, and scaling factors of the wavelet neural network with real numbers, forming a chromosome structure containing parameters; The fitness function design module is used to design the fitness function, which includes an error reciprocal term and a penalty term. The model accuracy and parameter stability are balanced by dynamically adjusting the penalty coefficient. The adaptive mutation strategy module is used to perform mutation operations on chromosomes using an adaptive mutation strategy based on genetic algorithms. The mutation rate changes dynamically with the number of iterations of the genetic algorithm to balance the exploration and development capabilities of parameter search. The crossover selection and parameter update module is used to generate a new population based on crossover and selection operations of genetic algorithm, and then update the wavelet neural network parameters after decoding the new population. This process is repeated until the preset maximum number of evolutions or the preset error precision is reached to obtain the optimal parameter combination.
[0015] This invention discloses an energy consumption early warning method and device for air conditioning refrigeration systems based on genetic algorithms. By automatically optimizing the parameter selection of wavelet neural networks through genetic algorithms, it effectively solves the problems of parameter adjustment relying on human experience, easy getting trapped in local optima, and slow convergence speed in traditional methods, and significantly improves the accuracy and efficiency of energy consumption prediction for air conditioning refrigeration systems.
[0016] To achieve the above objectives, a third aspect of this application provides a computer device, including a processor and a memory; wherein the processor reads executable program code stored in the memory to run a program corresponding to the executable program code, for implementing an energy consumption early warning method for an air conditioning refrigeration system based on a genetic algorithm as described in the first aspect embodiment.
[0017] To achieve the above objectives, the fourth aspect of this application proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an energy consumption early warning method for an air conditioning refrigeration system based on a genetic algorithm as described in the first aspect embodiment.
[0018] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0019] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of an energy consumption early warning method for an air conditioning refrigeration system based on a genetic algorithm according to an embodiment of the present invention; Figure 2 This is a framework diagram of an air conditioning refrigeration system energy consumption early warning method based on a genetic algorithm according to an embodiment of the present invention; Figure 3 This is a topology diagram of a wavelet neural network according to an embodiment of the present invention; Figure 4 This is a flowchart of the genetic algorithm for optimizing a wavelet neural network according to an embodiment of the present invention; Figure 5 This is a structural diagram of an air conditioning refrigeration system energy consumption early warning device based on a genetic algorithm according to an embodiment of the present invention; Figure 6 It is a computer device according to an embodiment of the present invention. Detailed Implementation
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] The following description, with reference to the accompanying drawings, illustrates an embodiment of the present invention regarding an energy consumption early warning method and apparatus for an air conditioning refrigeration system based on a genetic algorithm.
[0023] Figure 1 This is a flowchart of a parameter adaptive optimization method based on a genetic algorithm according to an embodiment of the present invention, such as... Figure 1 As shown, it includes: S1, the connection weights, translation factors and scaling factors of the wavelet neural network are encoded with real numbers to form a chromosome structure containing parameters; S2, Design a fitness function, which includes an error reciprocal term and a penalty term. The model accuracy and parameter stability are balanced by dynamically adjusting the penalty coefficient. S3 employs an adaptive mutation strategy based on genetic algorithms to mutate chromosomes. The mutation rate dynamically changes with the number of iterations of the genetic algorithm to balance the exploration and development capabilities of parameter search. S4 generates a new population based on crossover and selection operations of the genetic algorithm, and updates the wavelet neural network parameters after decoding the new population. This process is repeated until the preset maximum number of evolutions or the preset error precision is reached, thus obtaining the optimal parameter combination.
[0024] Specifically, this invention proposes an energy consumption early warning method for air conditioning refrigeration systems based on a genetic algorithm-improved wavelet neural network, such as... Figure 2 As shown, it includes: Step 1: Obtain the original indoor and outdoor temperature difference time series from the air conditioning refrigeration system. Original humidity time series Time series of original compressor performance indicators Original refrigerant charge time series Where the subscript i is the device serial number and j represents the corresponding time, the refrigerant type of the i-th air conditioning device is obtained. .
[0025] Step 2: Use linear function normalization to normalize the original temperature difference time series T, original humidity time series M, original compressor performance index time series P, and original refrigerant charge time series C, respectively, to obtain the normalized temperature difference time series NT, normalized humidity time series NM, normalized compressor performance index time series NP, and normalized refrigerant charge time series NC. Then, combine NC with... By combining these, a normalized refrigerant evaluation index is obtained. .
[0026] Step 3: Determine energy consumption thresholds from historical data, including: Obtain historical energy consumption data of air conditioning refrigeration system ,in Let i be the actual energy consumption of the i-th air conditioner. Let i be the type of the i-th air conditioner, calculate the standard deviation of air conditioners of the same type and store it as... Energy consumption threshold .
[0027] Step 4: Design the input layer of the wavelet neural network, including: Input sample sequence: , Let X be the sample sequence during the t-th iteration. The first 20% of the sample sequence X is taken as the training set. The last 80% was used as the test set. .
[0028] Step 5: Designing the hidden layers of the wavelet neural network includes: The network has m hidden layer nodes. The output layer information after training the network t times... ,in For Morlet wavelet functions, This represents the i-th dimension of the sample feature during the t-th iteration. Let be the connection weights between node i in the input layer and node j in the hidden layer of the network. The shift factor is the wavelet basis function. is the scaling factor of the wavelet basis function.
[0029] Step 6: Design the wavelet neural network output layer, including: The number of nodes is 1, which represents the predicted energy consumption value Y. The output value in the t-th iteration... ,in This represents the connection weights between hidden layer node j and the output layer node. It also includes the output node error information for the t-th iteration. , where Y' is the expected output.
[0030] Step 7: Design a wavelet neural network parameter calculation method as follows Figure 3 As shown, it includes: (1) Calculate the error of each node in the hidden layer using the following relationship. ,in To adjust the coefficients, the overall error of the wavelet neural network is... N is the sample size.
[0031] (2) Design the change in the connection weights of the hidden layer ,in Momentum factor To prevent small constants from being divided by zero, , Let be the change in connection weight of hidden layer node j in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: .
[0032] (3) Design the input layer connection weight change ,in Momentum factor , This represents the change in the connection weight between input layer node i and hidden layer node j during the t-th iteration. For learning rate, express about The gradient value is calculated as follows:
[0033] in Describing wavelet basis functions The partial derivatives of .
[0034] (4) Change in the design translation coefficient ,in Momentum factor , This represents the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: .
[0035] (5) Design scaling factor variation ,in Momentum factor , This represents the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: .
[0036] Step 8: Define the genetic algorithm parameters, including: (1) Encoding: , , and After real number encoding, we get , , and The converted real-number codes are then concatenated to form chromosomes. .
[0037] (2) Design the fitness function , of which Penalty coefficient For target value This is the error function.
[0038] (3) Selection: By traversing the sampling, the fitness value F(x) of each individual x is calculated, and the roulette wheel selection method is used to select the best individuals.
[0039] (4) Perform crossover from the selected individuals: the t-th chromosome With the vth chromosome The expression for the crossover operation at position k is as follows: ,in , Chromosomes With chromosomes In the chromosome after k-position crossover, a is a random number between [0,1].
[0040] (5) Variation from selected individuals: the t-th chromosome The i-th gene To perform mutation, the operation expression is as follows: ,in , and They are respectively upper and lower boundaries, Chromosomes The chromosome after mutation at position i. The variation rate is adjusted with the number of iterations, where g is the number of iterations. Let r be the maximum number of evolutions, and r' be random numbers between [-1, 1].
[0041] (6) Decoding: After the iteration, the relatively optimal chromosome is obtained. Decode into the optimal solution .
[0042] Step 9: Design the training process as follows Figure 4 shown, including: (1) Preset the relevant initialization parameters of the wavelet neural network, that is , , and , initialize the training times t to 1, the maximum training times is T, set the expected error , and preset the maximum iteration times P of the genetic algorithm.
[0043] (2) Perform real number coding on the , , and of the network to obtain the initial population .
[0044] (3) Perform wavelet neural network training on the initial population . The wavelet neural network training process is as follows: ① Input into the wavelet neural network model. When the training round t < T and , perform the following operations: After being processed by the hidden layer, obtain the output value , calculate the output node error information , calculate the errors of each node in the hidden layer , calculate the change amount of the connection weights in the hidden layer , the change amount of the connection weights in the input layer , the change amount of the translation coefficient , the change amount of the scaling coefficient , and update the network weights through the following expressions: , , , , and let t = t + 1.
[0045] ② When t = T or , end the training and obtain the energy consumption prediction value , where N1 is the number of samples in the training set.
[0046] (4) Use the fitness function F in the genetic algorithm to calculate the fitness value F( ) of each individual for the predicted value obtained after training. After the roulette wheel selection, crossover, and mutation operations in step 5, obtain the new population .
[0047] (5) The new population The new weights are obtained after decoding. , , and Repeat step (3) until the number of iterations reaches P.
[0048] (6) When the number of iterations of the genetic algorithm reaches the maximum P, the optimal individual is obtained. Decoding yields the optimal network weights. Training is over.
[0049] Step 10: Assign the optimal network weights Z to the wavelet neural network to obtain the optimized wavelet neural network WNN.
[0050] Step 11: Test set Input the wavelet neural network (WNN) to obtain the prediction result. N² is the number of samples in the test set, and the mean relative error is used. and mean square deviation As an evaluation indicator for the final energy consumption prediction.
[0051] Step 12: Normalize the sequence of samples to be predicted:
[0052] Input WNN to obtain energy consumption prediction values. .
[0053] Step 13: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] With energy consumption threshold If a comparison is made, If an energy consumption warning report is issued, the energy consumption is reported as normal, and the method ends.
[0054] The method in this invention employs multi-feature fusion, considering various factors such as temperature, humidity, compressor performance, and refrigerant charge, to more comprehensively reflect the operating status of the air conditioning refrigeration system. It uses a wavelet neural network to capture nonlinear relationships and complex patterns, overcoming the limitations of traditional models. A genetic algorithm automatically adjusts network parameters, avoiding the blindness of manual adjustments and making it easier to find the global optimum. All of these processes improve the accuracy of energy consumption prediction. They also improve convergence speed: optimizing the wavelet neural network parameters through a genetic algorithm accelerates the convergence speed and shortens training time. Furthermore, accurate energy consumption prediction and early warning allow for proactive measures to avoid energy waste and reduce operating costs. Moreover, the prediction results can be used to optimize the operating strategy of the air conditioning refrigeration system, achieving energy saving and consumption reduction. To achieve the above embodiments, such as Figure 5 As shown, this embodiment also provides an air conditioning refrigeration system energy consumption early warning device 10 based on a genetic algorithm, including: The parameter encoding module 100 is used to encode the connection weights, translation factors, and scaling factors of the wavelet neural network with real numbers to form a chromosome structure containing parameters. The fitness function design module 200 is used to design a fitness function, which includes an error reciprocal term and a penalty term. The model accuracy and parameter stability are balanced by dynamically adjusting the penalty coefficient. The adaptive mutation strategy module 300 is used to perform mutation operations on chromosomes using an adaptive mutation strategy based on genetic algorithms. The mutation rate changes dynamically with the number of iterations of the genetic algorithm to balance the exploration and development capabilities of parameter search. The crossover selection and parameter update module 400 is used to generate a new population based on crossover and selection operations of genetic algorithm, and to update the wavelet neural network parameters after decoding the new population. The process is repeated until the preset maximum number of evolutions or the preset error accuracy is reached to obtain the optimal parameter combination.
[0055] Furthermore, the parameter encoding module 100 is also used for: Calculate the error of each node in the hidden layer. ,in To adjust the coefficients, the overall error of the wavelet neural network is... N is the sample size; Design the change in the connection weights of the hidden layer. ,in Momentum factor To prevent small constants from being divided by zero, , Let be the change in connection weight of hidden layer node j in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design the input layer connection weight change amount ,in Momentum factor , This represents the change in the connection weight between input layer node i and hidden layer node j during the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Change in design translation coefficient ,in Momentum factor , This represents the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design scaling factor change ,in Momentum factor , This represents the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: .
[0056] Furthermore, the fitness function design module 200 is also used for: Will , , and After real number encoding, we get , , and The converted real-number codes are then concatenated to form chromosomes. ; Design a fitness function , of which Penalty coefficient For target value This is the error function.
[0057] This invention discloses an energy consumption early warning device for an air conditioning refrigeration system based on a genetic algorithm. It employs a wavelet neural network to capture nonlinear relationships and complex patterns, overcoming the limitations of traditional models. The genetic algorithm automatically adjusts network parameters, avoiding the blindness of manual adjustments and making it easier to find the global optimum. All of these processes improve the accuracy of energy consumption prediction. It also improves convergence speed: by optimizing the network parameters of the wavelet neural network through a genetic algorithm, the convergence speed of the wavelet neural network is accelerated, shortening the training time. Furthermore, it reduces energy costs: accurate energy consumption prediction and early warning allow for proactive measures to avoid energy waste and reduce operating costs. Moreover, the prediction results can be used to optimize the operation strategy of the air conditioning refrigeration system, achieving energy saving and consumption reduction.
[0058] To implement the methods of the above embodiments, the present invention also provides a computer device, such as... Figure 6As shown, the computer device 600 includes a memory 601 and a processor 602; wherein, the processor 602 reads the executable program code stored in the memory 601 to run a program corresponding to the executable program code, so as to implement the various steps of the above-described method for early warning of energy consumption of an air conditioning refrigeration system based on a genetic algorithm.
[0059] To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an energy consumption early warning method for an air conditioning refrigeration system based on a genetic algorithm as described in the foregoing embodiments.
[0060] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0061] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A method for early warning of energy consumption in an air conditioning refrigeration system based on a genetic algorithm, characterized in that, include: S1, the connection weights, translation factors and scaling factors of the wavelet neural network are encoded with real numbers to form a chromosome structure containing parameters; S2, Design a fitness function, which includes an error reciprocal term and a penalty term. The model accuracy and parameter stability are balanced by dynamically adjusting the penalty coefficient. S3 employs an adaptive mutation strategy based on genetic algorithms to mutate chromosomes. The mutation rate dynamically changes with the number of iterations of the genetic algorithm to balance the exploration and development capabilities of parameter search. S4 generates a new population based on crossover and selection operations of the genetic algorithm, and updates the wavelet neural network parameters after decoding the new population. This process is repeated until the preset maximum number of evolutions or the preset error precision is reached, thus obtaining the optimal parameter combination.
2. The method as described in claim 1, characterized in that, S1 includes: Calculate the error of each node in the hidden layer. ,in To adjust the coefficients, the overall error of the wavelet neural network is... N is the sample size; Design the change in the connection weights of the hidden layer. ,in Momentum factor To prevent small constants from being divided by zero, , Let $\frac{j}{t}$ be the change in the connection weight of hidden layer node $j$ in the $t$-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design the input layer connection weight change amount ,in Momentum factor , Let $\frac{i}{t}$ be the change in the connection weight between input layer node $i$ and hidden layer node $j$ at the $t$-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Change in design translation coefficient ,in Momentum factor , Let be the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design scaling factor change ,in Momentum factor , Let be the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: .
3. The method as described in claim 1, characterized in that, The S2 includes: Will , , and After real number encoding, we get , , and The converted real-number codes are then concatenated to form chromosomes. ; Design a fitness function , of which Penalty coefficient For target value This is the error function.
4. The method as described in claim 1, characterized in that, The S3 includes: Perform wavelet neural network training on the initial population Input the into the wavelet neural network model. When the number of training rounds t < T and , the output value is obtained after processing by the hidden layer. Calculate the error of each node in the hidden layer, calculate the change in the connection weights of the hidden layer, the change in the connection weights of the input layer, the change in the translation coefficient, and the change in the scaling coefficient. At the same time, update the network weights through the following expressions: , , , , and let t = t + 1; When t=T or At that time, training ends and the predicted energy consumption value is obtained. N1 is the number of samples in the training set; The predicted values obtained after training The fitness value F of each individual is calculated using the fitness function F in the genetic algorithm. A new population is obtained through roulette wheel selection, crossover, and mutation operations. ; New groups The new weights are obtained after decoding. , , and The process continues until the number of iterations reaches P. When the number of iterations in the genetic algorithm reaches its maximum P, the optimal individual is obtained. Decoding yields the optimal network weights. Training is over.
5. The method as described in claim 1, characterized in that, The S4 includes: Test set Input the wavelet neural network (WNN) to obtain the prediction result. N² is the number of samples in the test set, and the mean relative error is used. and mean square deviation As an evaluation indicator for the final energy consumption prediction; Normalized sample sequences to be predicted Input WNN to obtain energy consumption prediction values. .
6. An energy consumption early warning device for an air conditioning refrigeration system based on a genetic algorithm, characterized in that, include: The parameter encoding module is used to encode the connection weights, translation factors, and scaling factors of the wavelet neural network with real numbers, forming a chromosome structure containing parameters; The fitness function design module is used to design the fitness function, which includes an error reciprocal term and a penalty term. The model accuracy and parameter stability are balanced by dynamically adjusting the penalty coefficient. The adaptive mutation strategy module is used to perform mutation operations on chromosomes using an adaptive mutation strategy based on genetic algorithms. The mutation rate changes dynamically with the number of iterations of the genetic algorithm to balance the exploration and development capabilities of parameter search. The crossover selection and parameter update module is used to generate a new population based on crossover and selection operations of genetic algorithm, and then update the wavelet neural network parameters after decoding the new population. This process is repeated until the preset maximum number of evolutions or the preset error precision is reached to obtain the optimal parameter combination.
7. The apparatus as claimed in claim 6, characterized in that, The parameter encoding module is also used for: Calculate the error of each node in the hidden layer. ,in To adjust the coefficients, the overall error of the wavelet neural network is... N is the sample size; Design the change in the connection weights of the hidden layer. ,in Momentum factor To prevent small constants from being divided by zero, , The change in connection weight of hidden layer node j in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design the input layer connection weight change amount ,in Momentum factor , Let $\frac{i}{t}$ be the change in the connection weight between input layer node $i$ and hidden layer node $j$ at the $t$-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Change in design translation coefficient ,in Momentum factor , Let be the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: ; Design scaling factor change ,in Momentum factor , Let be the change in the t-th iteration. For learning rate, express about The gradient value is calculated as follows: .
8. The apparatus as claimed in claim 6, characterized in that, The fitness function design module is also used for: Will , , and After real number encoding, we get , , and The converted real-number codes are then concatenated to form chromosomes. ; Design a fitness function , of which Penalty coefficient For target value This is the error function.
9. A computer device, characterized in that, Including processor and memory; The processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement a parameter adaptive optimization method based on genetic algorithm as described in any one of claims 1-5.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements a parameter adaptive optimization method based on a genetic algorithm as described in any one of claims 1-5.