An integrated energy system fault diagnosis method and system based on hyperparameter double-layer optimization
By constructing a hyperparameter-based bi-level optimized fault diagnosis model, and combining binary weights and an improved Golden Jackal algorithm, the problems of long fault diagnosis time and low efficiency in integrated energy systems are solved, and efficient fault diagnosis is achieved.
Patent Information
- Application Number
- CN202310568486.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-05-18
AI Technical Summary
The fault diagnosis model of integrated energy system has a large amount of data, resulting in long diagnosis time and low efficiency. Existing technologies are insufficient in the selection of model hyperparameters and optimization of feature dimensions.
A hyperparameter-based bilayer optimization fault diagnosis method is adopted. By constructing a hyperparameter-based bilayer optimization fault diagnosis model, the inner layer optimization aims to maximize the fault diagnosis accuracy, while the outer layer optimization aims to minimize the fault diagnosis time. The data dimensionality is reduced by combining binary weights and an improved Golden Cow algorithm.
While improving diagnostic accuracy, it significantly shortens diagnostic time, optimizes model training time, and improves the efficiency of fault diagnosis in integrated energy systems.
Smart Images

Figure CN116561636B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of comprehensive energy system fault diagnosis, in particular to a comprehensive energy system fault diagnosis method and system based on hyperparameter double-layer optimization. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0003] As a new energy system, the comprehensive energy system couples electricity, cold, heat and gas of different forms together to improve the utilization rate of energy.
[0004] Unlike other single systems or single devices, the comprehensive energy system not only includes energy production devices such as power generation, heating and cooling, but also includes energy conversion devices such as combined heat and power units and heat pumps. The complexity of the system structure leads to the fact that fault diagnosis cannot be studied for single devices, but key influencing factors need to be extracted from the overall system.
[0005] In addition, due to the large number of devices and high data dimension, the data processed by the comprehensive energy fault diagnosis model based on deep learning is large, which leads to long diagnosis time and low efficiency. Therefore, the selection of model hyperparameters and the reduction of feature dimension need to be further optimized. SUMMARY
[0006] To solve the above problems, the present application provides a comprehensive energy system fault diagnosis method and system based on hyperparameter double-layer optimization, sets binary weights for fault features to reduce data dimension, and builds a fault diagnosis model based on hyperparameter double-layer optimization to achieve the highest diagnosis accuracy while shortening the diagnosis time.
[0007] To achieve the above purpose, the present application adopts the following technical solutions:
[0008] In a first aspect, the present application provides a comprehensive energy system fault diagnosis method based on hyperparameter double-layer optimization, comprising:
[0009] Obtain a fault sample set of devices in the comprehensive energy system, and assign initial weights to fault features to obtain a fault sample set with weights;
[0010] Build a fault diagnosis model based on hyperparameter double-layer optimization; wherein the inner-layer optimization takes the highest fault diagnosis accuracy as the target, and optimizes the hyperparameters in the fault diagnosis model according to the fault sample set with weights; the outer-layer optimization takes the minimum fault diagnosis time as the target, and optimizes the weights of the fault features;
[0011] An optimal fault diagnosis model is constructed based on the obtained optimal hyperparameters, and the optimal fault diagnosis model is used to perform fault diagnosis on the test data set with the optimal weights.
[0012] As an alternative embodiment, binary weights are set for the fault features, the binary weight of 0 represents that the fault feature is not input to the fault diagnosis model, and the binary weight of 1 represents that the fault feature is input to the fault diagnosis model, and the weights of the fault features in the fault sample set are initialized to 1.
[0013] As an alternative embodiment, the optimized hyperparameters include weights between the input layer and the hidden layer, biases of the input layer, biases of the hidden layer, a learning rate, a number of network layers, and a number of neurons in each layer.
[0014] As an alternative embodiment, the inner-layer optimization uses a golden wolf algorithm based on a half-uniform distribution to optimize the hyperparameters.
[0015] As an alternative embodiment, the golden wolf algorithm based on a half-uniform distribution improves random sampling in the population position space to half-uniform distribution sampling.
[0016] As an alternative embodiment, a comprehensive energy system simulation model is built, fault scenarios of typical devices are set, and the fault sample set is obtained by simulating the operating conditions of the typical devices; the typical devices include a combined heat and power unit, a heat pump unit, a photovoltaic generator unit, a wind turbine unit, and a chiller unit.
[0017] As an alternative embodiment, the fault features include: power generation, heat supply, flue gas temperature, hot water supply temperature, output three-phase voltage, and three-phase current of the combined heat and power unit; power consumption, heat supply, water supply pressure, water supply temperature, cold end inlet temperature, output three-phase voltage, and three-phase current of the heat pump unit; three-phase voltage and three-phase current output by the photovoltaic generator unit; three-phase voltage and three-phase current output by the wind turbine unit; refrigeration power, power consumption, ratio of compressor refrigeration capacity to consumed electric power, refrigeration capacity, chilled water supply temperature, and cooling water return temperature of the chiller unit.
[0018] In a second aspect, the present application provides a comprehensive energy system fault diagnosis system with hyperparameter double-layer optimization, comprising:
[0019] The sample acquisition module is configured to obtain a fault sample set of devices in a comprehensive energy system, and assign initial weights to fault features to obtain a fault sample set with weights;
[0020] The double-layer optimization module is configured to construct a fault diagnosis model of double-layer optimization of hyperparameters, wherein the inner-layer optimization optimizes the hyperparameters in the fault diagnosis model according to the fault sample set with weights, with the highest fault diagnosis accuracy as the target; and the outer-layer optimization optimizes the weights of the fault features, with the minimum fault diagnosis time as the target.
[0021] The fault diagnosis module is configured to construct an optimal fault diagnosis model based on the obtained optimal hyperparameters, and perform fault diagnosis on the test data set with the optimal weights by using the optimal fault diagnosis model.
[0022] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, and computer instructions stored in the memory and running on the processor, when the computer instructions are run by the processor, the method of the first aspect is completed.
[0023] In a fourth aspect, the present application provides a computer readable storage medium for storing computer instructions, when the computer instructions are executed by a processor, the method of the first aspect is completed.
[0024] Compared with the prior art, the present application has the following beneficial effects:
[0025] The present application builds a comprehensive energy system simulation model to simulate the operating conditions of typical equipment, sets typical fault scenarios to obtain simulated fault sample sets, and sets binary weights for the fault features in the fault sample sets to perform data dimension reduction processing and shorten the model diagnosis time.
[0026] The present application constructs a fault diagnosis model of double-layer optimization of hyperparameters, the inner-layer optimization takes the highest fault diagnosis accuracy as the target, reduces the oscillation at convergence, optimizes the model hyperparameters, and the outer-layer optimization takes the minimum fault diagnosis time as the target, determines the weights of the fault features input into the model to further optimize the model and further shorten the model diagnosis time.
[0027] The present application improves the traditional golden cat algorithm by using half uniform distribution, changes the random sampling in the population position space to half uniform distribution sampling, solves the problem of too dense individuals caused by random sampling in the population position space in the initial stage of the traditional golden cat algorithm, and improves the fault diagnosis accuracy.
[0028] The advantages of the additional aspects of the present application will be partially given in the following description, partially will become obvious from the following description, or will be known by the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0029] The drawings accompanying the specification of the present application form a part thereof, serve to provide further understanding of the present application, and together with the description of the illustrative embodiments of the present application and the explanation thereof, to explain the present application, and do not constitute an improper limitation of the present application.
[0030] Figure 1 The flow chart of the comprehensive energy system fault diagnosis method provided for the hyperparameter double-layer optimization of embodiment 1 of the present application is shown in the figure.
[0031] Figure 2 The structure diagram of the fault diagnosis model provided for embodiment 1 of the present application is shown in the figure.
[0032] Figure 3 The flow chart of the gold fox algorithm based on half-number uniform distribution provided for embodiment 1 of the present application is shown in the figure. DETAILED DESCRIPTION
[0033] The present application will be further described below in conjunction with the accompanying drawings and embodiments.
[0034] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.
[0035] It should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and furthermore, it should be understood that the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units need not be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0036] The embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0037] Embodiment 1
[0038] The present embodiment provides a hyperparameter double-layer optimization comprehensive energy system fault diagnosis method, comprising:
[0039] Obtain a fault sample set of equipment in a comprehensive energy system, and assign an initial weight to a fault feature to obtain a fault sample set with weights;
[0040] A hyperparameter double-layer optimization fault diagnosis model is constructed; wherein the inner layer optimization takes the highest fault diagnosis accuracy as the target, and optimizes the hyperparameters in the fault diagnosis model according to the fault sample set with weights; the outer layer optimization takes the minimum fault diagnosis time as the target, and optimizes the weight of the fault feature;
[0041] Based on the obtained optimal hyperparameters, an optimal fault diagnosis model is constructed, and the optimal fault diagnosis model is used to diagnose faults in the test dataset with the optimal weights.
[0042] The following is combined Figure 1 The method of this embodiment will be described in detail.
[0043] In this embodiment, a simulation model of an integrated energy system is built to simulate the operating conditions of typical equipment, and a set of simulated fault samples is obtained by setting typical fault scenarios.
[0044] The typical equipment includes combined heat and power (CHP) units, heat pump units, photovoltaic generator units, fan units, and chiller units;
[0045] The fault characteristics in the fault sample set include: power generation, heating power, flue gas temperature, hot water supply temperature, output three-phase voltage and three-phase current of CHP units; power consumption, heating capacity, water supply pressure, water supply temperature, cold end inlet temperature, output three-phase voltage and three-phase current of heat pump units; output three-phase voltage and three-phase current of photovoltaic generator units; output three-phase voltage and three-phase current of wind turbine units; cooling power, power consumption, ratio of compressor cooling capacity to power consumption, cooling capacity, chilled water supply temperature and cooling water return temperature of chiller units.
[0046] In this embodiment, the fault dataset is S i ={s1,s2,…,s m}, where i∈[1,n], n is the number of fault samples, and m is the dimension of the fault features; for the fault features s in the fault sample set n Add weight ξ j Dimensionality reduction is performed to shorten the diagnostic time, where the weights ξ j ={0,1}, j∈[1,m], belonging to the (0,1) binary weight, ξ j A value of 0 indicates that the fault feature is a redundant parameter and is not used as input to the fault diagnosis model; a value of 1 indicates that it is a normal input to the fault diagnosis model, thus obtaining the weighted fault sample set S. i * ={ξ1s1,ξ2s2,…,ξ m s m}, and ξ j Not all values are zero; the weights ξ of the fault features in the fault sample set. j All are initialized to 1.
[0047] In this embodiment, a fault diagnosis model with hyperparameter-optimized two layers is constructed. This fault diagnosis model is based on a convolutional neural network (CNN) and a deep belief network (DBN), including a 1-layer CNN structure, a 1-layer restricted Boltzmann machine (RBM), and a backpropagation (BP) neural network, as follows.Figure 2 As shown;
[0048] Initialize the hyperparameters of the fault diagnosis model, including the number of convolution kernels, the stride of the convolution operation, and the weights w between the input layer and the hidden layer. ij The bias of the input layer a i The bias of the hidden layer b j The learning rate η, the number of layers l of the DBN, and the number of neurons n in each layer.
[0049] In this embodiment, the inner layer optimization aims to achieve the highest fault diagnosis accuracy. Using a weighted fault sample set as input, the Golden Cow algorithm based on a semi-uniform distribution is employed to optimize the hyperparameters in the fault diagnosis model. The optimized hyperparameters include the weight w between the input layer and the hidden layer. ij The bias of the input layer a i The bias of the hidden layer b j The learning rate η, the number of network layers l, and the number of neurons in each layer n, etc.
[0050] The outer layer optimization aims to minimize the fault diagnosis time. It uses the Grey Wolf algorithm to optimize the weights of fault features, thereby determining the dimensionality of the input fault features, reducing the feature dimensionality, and thus reducing the training time.
[0051] In this embodiment, the objective function for inner layer optimization is: Where f1 is the highest fault diagnosis accuracy, N is the total number of samples, and R is the number of samples that were correctly diagnosed.
[0052] The objective function for the outer layer optimization is f2 = mint; f2 is the minimum fault diagnosis time, t is the diagnosis time, and the diagnosis time is obtained by the timing function. Let the time when the model starts running be t1 and the time when the model ends running be t2, then the diagnosis time t = t1 - t2.
[0053] In this embodiment, after initializing the weights of the fault sample set and the hyperparameters of the model, dual optimization is performed, both internal and external. Based on the weighted fault sample set output by the outer layer, a fault diagnosis model is trained to obtain the diagnosis accuracy. After optimizing and updating the hyperparameters through inner layer optimization, iterative training is performed until the iteration ends. The diagnosis accuracy is then sorted, and the weighted reassembly with the highest diagnosis accuracy is selected, along with the diagnosis time. The weights are then updated through outer layer optimization to obtain a new weighted fault sample set. The diagnosis times obtained from the inner layer operation are then sorted, and the weighted reassembly with the shortest diagnosis time is selected. Finally, the optimal model is obtained based on the optimal hyperparameters, and fault classification is performed based on the optimal weights.
[0054] In view of the problem that the individuals are too dense due to random sampling of the population position space in the initial stage of the traditional golden wolf algorithm, the semi-uniform distribution golden wolf algorithm is provided, and the improvement is that the random sampling in the population position space is replaced by semi-uniform distribution sampling.
[0055] The mathematical model of the semi-uniform distribution golden wolf algorithm is as follows:
[0056] y i (t)=rand(y1,y2)
[0057]
[0058] In the formula, y2 and y1 are the upper and lower limit intervals of the population position space, rand represents a random function, i∈[1,N / 2] and j∈[(N / 2)+1,N], y i (t) and y j (t) respectively represent the initial value of the individual in the population at the tth iteration, and N is the population size.
[0059] As shown in the semi-uniform distribution golden wolf algorithm, the optimization steps include: Figure 3
[0060] (1) Initialize the population parameters, including: the maximum number of iterations T max , the population size N, the wolf position y i and y j , the upper and lower limits of the population position space, and the semi-uniform distribution in the parameter space for the initialization of the wolf position, so as to avoid the centralized distribution of the initialized individuals.
[0061] (2) Estimate the fitness value of each prey by using the fitness function, select the wolf pair according to the fitness value, the optimal fitness value as the male wolf, and the suboptimal fitness value as the female wolf, and obtain the position of the corresponding prey according to the wolf pair.
[0062] (3) The male wolf searches for the prey, and the female wolf follows the male wolf to update the position of the wolf.
[0063] (4) Surround the prey detected in the previous period, attack and eat the prey, and update the wolf position again until the number of iterations reaches the upper limit, and obtain the optimal hyperparameter.
[0064] Embodiment 2
[0065] The embodiment provides a hyperparameter double-layer optimization comprehensive energy system fault diagnosis system, which comprises:
[0066] The sample acquisition module is configured to acquire a fault sample set of equipment in a comprehensive energy system, and assign an initial weight to a fault feature to obtain a weighted fault sample set.
[0067] The double-layer optimization module is configured to construct a hyperparameter double-layer optimization fault diagnosis model; wherein, the inner-layer optimization takes the highest fault diagnosis accuracy as the target, and optimizes the hyperparameters in the fault diagnosis model according to the fault sample set with weights; the outer-layer optimization takes the minimum fault diagnosis time as the target, and optimizes the weights of the fault features.
[0068] The fault diagnosis module is configured to construct an optimal fault diagnosis model based on the obtained optimal hyperparameters, and perform fault diagnosis on the test data set with optimal weights by using the optimal fault diagnosis model.
[0069] It should be noted that the above modules correspond to the steps described in Embodiment 1, and the above modules have the same examples and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0070] In more embodiments, there are also provided:
[0071] An electronic device comprising a memory and a processor, and computer instructions stored on the memory and running on the processor, when the computer instructions are run by the processor, the method described in Embodiment 1 is completed. For brevity, it will not be repeated here.
[0072] It should be understood that in the present embodiment, the processor can be a central processing unit CPU, and the processor can also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, ready-to-program gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0073] The memory can include read-only memory and random access memory, and provide instructions and data to the processor, and a part of the memory can also include non-volatile random access memory. For example, the memory can also store device type information.
[0074] A computer readable storage medium for storing computer instructions, when the computer instructions are executed by the processor, the method described in Embodiment 1 is completed.
[0075] The method in the embodiment 1 can be directly embodied by a hardware processor or a combination of hardware and software modules in the processor. The software modules can be located in a storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or the like. The storage medium is located in the memory, and the processor reads information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, no further detailed description is given here.
[0076] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner depends on the specific application and design constraints of the technical solutions. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0077] Although the specific embodiments of the present application are described above in combination with the drawings, the present application is not limited to the scope of the above description. Those skilled in the art should understand that various modifications or changes made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.
Claims
1. A method for fault diagnosis of integrated energy systems based on hyperparameter double-layer optimization, characterized in that, The method comprises the following steps: obtaining a fault sample set of equipment in a comprehensive energy system, and assigning an initial weight to a fault feature to obtain a fault sample set with weights; constructing a fault diagnosis model with double-layer optimization of hyperparameters; the inner-layer optimization aims to achieve the highest fault diagnosis accuracy, and optimizes the hyperparameters in the fault diagnosis model according to the fault sample set with weights; the outer-layer optimization aims to minimize the fault diagnosis time, and optimizes the weights of the fault features; constructing an optimal fault diagnosis model based on the obtained optimal hyperparameters, and performing fault diagnosis on a test data set with optimal weights by using the optimal fault diagnosis model.
2. The hyperparameter double-layer optimization integrated energy system fault diagnosis method of claim 1, wherein, A binary weight is assigned to the fault feature, the binary weight of 0 represents that the fault feature is not used as the input of the fault diagnosis model, and the binary weight of 1 represents that the fault feature is used as the input of the fault diagnosis model, and the weight of the fault feature in the fault sample set is initialized as 1.
3. The hyperparameter double-layer optimization integrated energy system fault diagnosis method of claim 1, wherein, The optimized hyperparameters include the weights between the input layer and the hidden layer, the bias of the input layer, the bias of the hidden layer, the learning rate, the number of network layers, and the number of neurons in each layer.
4. The hyperparameter double-layer optimization integrated energy system fault diagnosis method of claim 1, wherein, The inner-layer optimization uses a golden wolf algorithm based on semi-uniform distribution to optimize the hyperparameters.
5. The hyper-parameter double-layer optimized integrated energy system fault diagnosis method of claim 4, wherein, The golden wolf algorithm based on semi-uniform distribution improves the random sampling in the population position space to semi-uniform distribution sampling.
6. The hyperparameter double-layer optimized integrated energy system fault diagnosis method of claim 1, wherein, A simulation model of the comprehensive energy system is built, a fault scenario of a typical equipment is set, and a fault sample set is obtained by simulating the operating conditions of the typical equipment; the typical equipment includes a combined heat and power unit, a heat pump unit, a photovoltaic generator unit, a wind turbine unit, and a water chiller unit.
7. The hyper-parameter double-layer optimized integrated energy system fault diagnosis method of claim 6, wherein, The fault features include the power generation, heat supply, flue gas temperature, hot water supply temperature, output three-phase voltage, and three-phase current of the combined heat and power unit; the power consumption, heat supply, water supply pressure, water supply temperature, cold end inlet temperature, output three-phase voltage, and three-phase current of the heat pump unit; the output three-phase voltage and three-phase current of the photovoltaic generator unit; the output three-phase voltage and three-phase current of the wind turbine unit; and the refrigeration power, power consumption, ratio of compressor refrigeration capacity to power consumption, refrigeration capacity, chilled water supply temperature, and cooling water return temperature of the water chiller unit.
8. A comprehensive energy system fault diagnosis system of hyperparameter double-layer optimization, characterized in that, The method comprises the following steps: a sample acquisition module configured to obtain a fault sample set of equipment in a comprehensive energy system, and assign an initial weight to a fault feature to obtain a fault sample set with weights; a double-layer optimization module configured to construct a fault diagnosis model with double-layer optimization of hyperparameters; the inner-layer optimization aims to achieve the highest fault diagnosis accuracy, and optimizes the hyperparameters in the fault diagnosis model according to the fault sample set with weights; the outer-layer optimization aims to minimize the fault diagnosis time, and optimizes the weights of the fault features; a fault diagnosis module configured to construct an optimal fault diagnosis model based on the obtained optimal hyperparameters, and perform fault diagnosis on a test data set with optimal weights by using the optimal fault diagnosis model.
9. An electronic device, comprising: The computer instructions are run by the processor to complete the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Computer program product for storing computer instructions which, when executed by a processor, perform the method of any one of claims 1-7.
Citation Information
Patent Citations
Quick evolution method for optimized deep convolution neural network structure
CN108334949A
Switching power supply filter capacitor failure detection method
CN110110426A