Comprehensive energy system state estimation method and system based on dynamic weighting algorithm
By adopting the state estimation method of dynamic weighting algorithm and evolutionary algorithm in the integrated energy system, the problems of insufficient data fusion and poor dynamic adaptability of the model are solved, achieving high-precision and highly adaptable state estimation, and improving the robustness of the system. sex and stability.
Patent Information
- Application Number
- CN202411385439.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art has problems such as insufficient data fusion, poor dynamic adaptability of models, and limited accuracy improvement in the state estimation of comprehensive energy system, especially when dealing with multi-source data and complex dynamic environments.
Using a state estimation method based on a dynamic weighting algorithm, a preliminary state estimation model is constructed through the collection, preprocessing and feature extraction of multi-source data, and a dynamic weighting mechanism and evolutionary algorithm optimization mechanism are designed to adjust data source weights and model parameters in real time to achieve Improve estimation accuracy and adaptability.
The accurate estimation of the state state of the comprehensive energy system has been realized, the adaptability and accuracy of the model is improved, the robustness and stability of the system in the complex environment is enhanced, and the process of multi -source data integration and model optimization are optimized.
Smart Images

Figure CN119337126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated energy systems, and in particular to an integrated energy system state estimation method based on a dynamic weighted algorithm. Background Art
[0002] With the rapid development of Integrated Energy System (IES), accurate estimation of system state has become a key link to ensure safe and efficient operation of the system. Traditional state estimation methods mainly rely on static models to estimate system states through preset fixed parameters and model structures. However, with the increasing complexity and diversification of integrated energy systems, including the mutual coupling and conversion of various energy forms such as electricity, heat, and gas, traditional methods face severe challenges in dealing with multi-source data fusion, model dynamic adaptability, and accuracy improvement.
[0003] First, in terms of data fusion, the integrated energy system involves the collection and processing of multi-source data, including real-time data output by various sensors such as smart meters, temperature sensors, and pressure gauges. These data sources have different accuracy, sampling frequency, and reliability. Traditional methods often find it difficult to effectively integrate these heterogeneous data, resulting in deviations in state estimation results.
[0004] Secondly, the traditional state estimation method lacks a dynamic adjustment mechanism and cannot adjust the weights in real time according to the real-time state of the system and the importance of various types of data, which limits the model's ability to adapt to complex dynamic environments. In addition, in the process of model construction, feature selection often relies on experience or simple statistical methods, which makes it difficult to effectively screen out the most representative data features for state estimation, affecting the model's prediction performance.
[0005] In recent years, although some studies have attempted to improve the accuracy of state estimation through optimization algorithms, such as using evolutionary algorithms such as particle swarm optimization and genetic algorithms to optimize model parameters, most of these methods optimize a single data source or a single network model, ignoring the complexity of multi-source data fusion and multi-network coupling in integrated energy systems.
[0006] In summary, the existing technologies have problems in the state estimation of integrated energy systems, such as insufficient data fusion, poor dynamic adaptability of the model, and limited accuracy improvement. To solve these problems, there is a need for a state estimation method that can effectively integrate multi-source data based on a dynamic weighted algorithm and adjust model parameters in real time to adapt to dynamic changes in the system. The embodiment of the present invention is based on this demand and proposes a state estimation method for an integrated energy system based on a dynamic weighted algorithm, which aims to achieve accurate estimation of the state of the integrated energy system by dynamically adjusting the weights of each data source and optimizing the model parameters in combination with an evolutionary algorithm. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a method and system for estimating the state of an integrated energy system based on a dynamic weighted algorithm, so as to solve the technical problems of low estimation accuracy and poor adaptability caused by multi-source heterogeneity of data, high real-time requirements and complex and changeable system in the state estimation of the integrated energy system.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is a method for estimating the state of an integrated energy system based on a dynamic weighted algorithm, comprising the following steps: Step 1: Collect multi-source data from the integrated energy system, and perform data cleaning and standardization to ensure data accuracy and availability; Step 2: Extract features from the preprocessed data, perform feature dimension reduction through principal component analysis (PCA), and select the data features that are most representative for state estimation; Step 3: Build a preliminary state estimation model; Step 4: Design a dynamic weighting mechanism to adjust the weight of each data source in real time according to the real-time status of the system and the importance of each type of data to improve the adaptability and accuracy of the model; Step 5: Introduce evolutionary algorithm to optimize the dynamic weighted model through iterative calculation and find the optimal weight allocation strategy to further improve the accuracy of state estimation; Step 6: Test and verify the performance of the method in the actual system.
[0009] In the preferred solution, Step 1 includes Step 1.1 data collection, Step 1.2 data cleaning, and Step 1.3 data standardization processing, wherein Step 1.1 data collection includes collecting data from smart meters, temperature sensors, pressure gauges and various sensors in the integrated energy system, and the collected data includes various energy consumption and production data of electricity, heat, cold and gas. The collected data can be expressed by the following formula: (1) in, Represents all collected data, Representatives from Data from the data source, Represents the total number of data sources.
[0010] In the preferred solution, the data cleaning in Step 1.2 of Step 1 is to pre-process the data using a moving average filter method to remove invalid or erroneous data points, fill in missing data, and smooth or correct abnormal data. The specific steps include: Step 1.2.1: Determine the window size of the filter and define the window size as , Usually an odd number; Step 1.2.2: Data sequence definition, create a data sequence, define a size of A window that can slide over the data sequence; Step 1.2.3: Calculate the average value of the data in the window. Calculate the average value of the data sequence contained in the window each time the data sequence slides. The calculation method is as follows: (2) in, represents the data points within the window, is the filter output; Step 1.2.4: Use filters to preprocess data and apply the configured moving average filter to the integrated energy system data to smooth abnormal data.
[0011] In the preferred solution, the data standardization process in Step 1.3 of Step 1 is to define the data volume index and the correctness index, and fill or revise the data according to the set comprehensive index threshold to achieve data cleaning, and the specific steps include: Step 1.3.1: Data definition: The data output by the moving average filter is defined as: (3) in, represents a data sequence, Represents the first data points; at the same time, the node is detected at the time The data sequence collected in is represented as : (4) The data set collected by all nodes at the detection time During reception at the sink node, it can be represented by The matrix express: (5) Step 1.3.2: Data quality calculation: Data volume indicator calculation, node In time The existence of a sample of is defined as: (6) Among them, null represents Is empty, indicating that data is missing; For Node Number of samples: (7) The data volume indicator is calculated as follows: (8) in, is the number of data; Correctness index, assuming that the monitoring area has nodes, and the monitoring duration is , all nodes have the same time interval Collect data; observations can be expressed as , which is the difference between the true value and the error combination of; node In time The correctness of is defined as follows: (9) in, is the error tolerance threshold; The correctness metrics of the dataset are defined as follows: (10) The calculation method of the comprehensive evaluation index of the set data set is as follows: (11) in, is the data volume weight, is the correctness weight; both must satisfy: ; Step 1.3.3: Data correction mechanism: Set a comprehensive index threshold. If the comprehensive index threshold of the calculated data set is higher than the set threshold, the data set revision phase will begin. Set the data volume index and the correctness index threshold; if the data volume index is higher than the set threshold, fill in the data; the filled data is the average value of the existing data at both ends of the missing data; if the correctness index is higher than the set threshold, revise the data; the revised data is the data measured again by the sensor; Step 1.3.4: Data integration: After data cleaning, use data merging, conversion, and mapping operations to integrate data from different sources to form a unified data set.
[0012] The method for state estimation of an integrated energy system based on a dynamic weighted algorithm according to claim 1 is characterized in that the specific steps of the principal component analysis method PCA in Step 2 include: Step 2.1: Standardize the data so that the mean of each feature is 0 and the variance is 1. The formula for data standardization is as follows: (12) in, is the standardized data, For the original data, is the mean of the original data, is the standard deviation of the original data; the matrix composed of standardized data is called ; Step 2.2: Calculate the covariance matrix and its eigenvalues With the eigenvector , its characteristics are as follows: (13) in, for The transpose of Step 2.3: Select the principal component according to the size of the eigenvalue, and project the original data onto the selected principal component to achieve data dimensionality reduction. The eigenvector corresponding to the largest eigenvalue is defined as The matrix composed of the largest eigenvectors is the loading matrix , which is defined as follows: (14) in, are the eigenvectors arranged in descending order of eigenvalue size; Step 2.4: From the reduced dimensionality data The key features that have the greatest impact on the model's prediction performance are selected, and the dimensionality reduction data is calculated as follows: (15) in, is the data after dimensionality reduction.
[0013] In a preferred solution, the specific steps of constructing a preliminary state estimation model in Step 3 include: Step 3.1: Definition of integrated energy system network model Step 3.1.1: Definition of the electrical network model of the integrated energy system (16) in, and is the imbalance between active power and reactive power; and Node Active power and reactive power; and Node and nodes The voltage amplitude; , and Node and The voltage angle of and Branches The conductance and magnetic resistance of Step 3.1.2: Definition of gas network model of integrated energy system: The steady-state flow equation of the pipeline in the natural gas pipeline network is specifically expressed as: (17) in, For pipeline Traffic volume; and Node and The pressure of For pipeline The constant of For pipeline If the flow direction ,but ,otherwise ; Step 3.1.3: Definition of thermal network model of integrated energy system: The thermal model is used to solve the heating temperature and heat recovery temperature of the thermal network nodes. The thermal power calculation formula of each node is: (18) in, is the vector of thermal power consumed or supplied by each node; is the supply temperature; is the outlet temperature; is the return temperature; is the specific heat of water; similar to the network loss in the power grid, the heat network pipeline also has heat loss, and the pipeline temperature drop equation is: (19) in, is the ambient temperature; and is the temperature at the end and start nodes of the pipe; is the heat transfer coefficient per unit length at each pipe; is the length of the pipeline; The calculation formula of the mixed temperature at the node is as follows: (20) in, is the mixture temperature at the node; is the flow temperature at the end of the inlet pipe; Step 3.2: Objective function and decision variable definition: Step 3.2.1: Define the pseudo-state variables of the electrical network as: (twenty one) Step 3.2.2: Define the pseudo-state variables of the gas network as: (twenty two) Step 3.2.3: Define the pseudo-state variables of the thermal network as: (twenty three) Step 3.2.4: Design the objective function of the integrated energy system state estimation as: (twenty four) in, For the network The weight of is the number of networks; For the network The actual measured value of , , , , , , , , .
[0014] In a preferred solution, the dynamic weighting mechanism in Step 4 includes: Step 4.1: Set the original weight according to the real-time status of the system and the importance of the data: (25) in, , , respectively, network The original weight and dynamic weight of , Network The actual measured values and pseudo-state variables; Step 4.2: During the optimization process of the evolutionary algorithm, the weights of each network, including the power network, heat network, and gas network, are adjusted in real time to adapt to the dynamic changes of the system state and improve the accuracy of state estimation.
[0015] In a preferred solution, the evolutionary algorithm in Step 5 adopts a differential evolution algorithm, and its optimization steps include: Step 5.1: Define the population size and number of iterations, and initialize the population: (26) in, For the The decision variables of individuals in the initialization stage, is a random number between 0 and 1. For the The upper bound of the individual decision variables, For the The lower bound of each individual decision variable; Step 5.2: Enter the iteration phase, calculate the objective function of each individual in the population, and select the global optimal individual and the optimal individual in the current iteration based on the objective function. : Step 5.3: Perform mutation and crossover operations according to the mutation probability and crossover probability to generate new individuals. The mutation mechanism is as follows: (27) in, is the mutation probability, is a random number between 0 and 1. , is the scaling factor, For the The first iteration The decision variables represented by each individual, For the The first iteration The decision variables represented by each individual; The crossover mechanism of the crossover operation is as follows: (28) in, , Representing individuals ,individual In the The first iteration decision variables, Representing an individual In the The first iteration decision variables; is the crossover probability, A random number between 0 and 1; Step 5.4: Determine whether the iteration is completed. If not, return to continue the iteration. Otherwise, output the optimal fitness and decision variables.
[0016] The preferred solution also includes a model correction strategy based on the state feedback mechanism, which uses the decision variables output by the differential evolution algorithm to estimate the state of the integrated energy system and : (29) in, represents the sum of squares of the differences between the model predictions and the actual observed values, It represents the sum of squares of the differences between the actual observations and the mean of the observations; According to each network , feedback correction is performed on the original weights. The specific mechanism is as follows: (30) in, For the network The new original weight.
[0017] A comprehensive energy system state estimation system based on any one of the above-mentioned comprehensive energy system state estimation methods based on dynamic weighted algorithm, characterized in that it includes: a data acquisition module, a data preprocessing module, a feature extraction module, a state estimation model construction module, a dynamic weighting module, an evolutionary algorithm optimization module and a model correction module, and each module works together to achieve accurate estimation of the state of the comprehensive energy system.
[0018] The comprehensive energy system state estimation method based on the dynamic weighted algorithm provided by the present invention has the following beneficial effects: 1. The present invention solves the technical problems of low estimation accuracy and poor adaptability in the state estimation of integrated energy systems due to multi-source heterogeneity of data, high real-time requirements and complex and changeable systems; 2. The present invention adopts a dynamic weighting algorithm to dynamically adjust the weight according to the real-time status of the system, thereby improving the adaptability and accuracy of the model; 3. The present invention provides high-quality input data for the model and enhances the prediction ability of the model by collecting and processing multi-source data and performing feature dimension reduction and key feature selection. 4. The present invention introduces a differential evolution algorithm to optimize the model, finds the optimal weight allocation strategy through iterative calculation, and further improves the accuracy of state estimation; 5. The present invention improves the accuracy of state estimation and system adaptability by flexibly adjusting the weights of various types of data, can more accurately reflect the dynamic changes of the system, and enhances the robustness and stability of the system in complex environments; 6. The method of the present invention optimizes multi-source data fusion and integrates evolutionary algorithms to find the optimal weight allocation strategy, further improving the response speed and performance of the system and ensuring the safety and reliability of the system in actual operation; 7. The dynamic weighting mechanism of the present invention enables the model to adapt to changes in system status in real time, thereby improving the robustness and reliability of the model; 8. The application of this method helps to achieve real-time monitoring and precise control of the integrated energy system, providing strong support for the safe and stable operation of the system. It is suitable for integrated energy systems of different scales such as rural, urban, and industrial, and has broad application prospects. In addition, the present invention can also improve energy utilization efficiency, reduce energy waste, and help achieve green and low-carbon development goals, and reduce system maintenance costs through accurate state estimation, thereby improving economic and environmental benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be further described below in conjunction with the accompanying drawings and implementation examples: Figure 1 The electric network state prediction result of embodiment 3 of the present invention; Figure 2 The thermal network status prediction result of Example 3 of the present invention; Figure 3 The gas network status prediction result of Example 3 of the present invention; Figure 4 It is the evolutionary algorithm iteration curve of Example 3 of the present invention. DETAILED DESCRIPTION
[0020] The technical solution of the present invention is further described below in conjunction with the embodiments and drawings: Example 1 The state estimation method of the integrated energy system based on the dynamic weighted algorithm comprises the following steps: Step 1: Collect multi-source data from the integrated energy system, and perform data cleaning and standardization to ensure data accuracy and availability; Step 2: Extract features from the preprocessed data, perform feature dimension reduction through principal component analysis (PCA), and select the data features that are most representative for state estimation; Step 3: Build a preliminary state estimation model; Step 4: Design a dynamic weighting mechanism to adjust the weight of each data source in real time according to the real-time status of the system and the importance of each type of data to improve the adaptability and accuracy of the model; Step 5: Introduce evolutionary algorithm to optimize the dynamic weighted model through iterative calculation and find the optimal weight allocation strategy to further improve the accuracy of state estimation; Step 6: Test and verify the performance of the method in the actual system.
[0021] In this embodiment, Step 1 includes Step 1.1 data collection, Step 1.2 data cleaning, and Step 1.3 data standardization processing, wherein Step 1.1 data collection includes collecting data from smart meters, temperature sensors, pressure gauges and various sensors in the integrated energy system. The collected data includes various energy consumption and production data of electricity, heat, cold and gas. The collected data can be expressed by the following formula: (1) in, Represents all collected data, Representatives from Data from the data source, Represents the total number of data sources.
[0022] Furthermore, the data cleaning in Step 1.2 of Step 1 is to pre-process the data using a moving average filter method to remove invalid or erroneous data points, fill in missing data, and smooth or correct abnormal data. The specific steps include: Step 1.2.1: Determine the window size of the filter and define the window size as , Usually an odd number; Step 1.2.2: Data sequence definition, create a data sequence, define a size of A window that can slide over the data sequence; Step 1.2.3: Calculate the average value of the data in the window. Calculate the average value of the data sequence contained in the window each time the data sequence slides. The calculation method is as follows: (2) in, represents the data points within the window, is the filter output; Step 1.2.4: Use filters to preprocess data and apply the configured moving average filter to the integrated energy system data to smooth abnormal data.
[0023] Furthermore, the data standardization process in Step 1.3 of Step 1 is to define the data volume index and the correctness index, and fill or revise the data according to the set comprehensive index threshold to achieve data cleaning. The specific steps include: Step 1.3.1: Data definition: The data output by the moving average filter is defined as: (3) in, represents a data sequence, Represents the first data points; at the same time, the node is detected at the time The data sequence collected in is represented as : (4) The data set collected by all nodes at the detection time During reception at the sink node, it can be represented by The matrix express: (5) Step 1.3.2: Data quality calculation: Data volume indicator calculation, node In time The existence of a sample of is defined as: (6) Among them, null represents Is empty, indicating that data is missing; For Node Number of samples: (7) The data volume indicator is calculated as follows: (8) in, is the number of data; Correctness index, assuming that the monitoring area has nodes, and the monitoring duration is , all nodes have the same time interval Collect data; observations can be expressed as , which is the difference between the true value and the error combination of; node In time The correctness of is defined as follows: (9) in, is the error tolerance threshold; The correctness metrics of the dataset are defined as follows: (10) The calculation method of the comprehensive evaluation index of the set data set is as follows: (11) in, is the data volume weight, is the correctness weight; both must satisfy: ; Step 1.3.3: Data correction mechanism: Set a comprehensive index threshold. If the comprehensive index threshold of the calculated data set is higher than the set threshold, the data set revision phase will begin. Set the data volume index and the correctness index threshold; if the data volume index is higher than the set threshold, fill in the data; the filled data is the average value of the existing data at both ends of the missing data; if the correctness index is higher than the set threshold, revise the data; the revised data is the data measured again by the sensor; Step 1.3.4: Data integration: After data cleaning, use data merging, conversion, and mapping operations to integrate data from different sources to form a unified data set.
[0024] The method for state estimation of an integrated energy system based on a dynamic weighted algorithm according to claim 1 is characterized in that the specific steps of the principal component analysis method PCA in Step 2 include: Step 2.1: Standardize the data so that the mean of each feature is 0 and the variance is 1. The formula for data standardization is as follows: (12) in, is the standardized data, For the original data, is the mean of the original data, is the standard deviation of the original data; the matrix composed of standardized data is called ; Step 2.2: Calculate the covariance matrix and its eigenvalues With the eigenvector , its characteristics are as follows: (13) in, for The transpose of Step 2.3: Select the principal component according to the size of the eigenvalue, and project the original data onto the selected principal component to achieve data dimensionality reduction. The eigenvector corresponding to the largest eigenvalue is defined as The matrix composed of the largest eigenvectors is the loading matrix , which is defined as follows: (14) in, are the eigenvectors arranged in descending order of eigenvalue size; Step 2.4: From the reduced dimensionality data The key features that have the greatest impact on the model's prediction performance are selected, and the dimensionality reduction data is calculated as follows: (15) in, is the data after dimensionality reduction.
[0025] Furthermore, the specific steps of constructing a preliminary state estimation model in Step 3 include: Step 3.1: Definition of integrated energy system network model Step 3.1.1: Definition of the electrical network model of the integrated energy system (16) in, and is the imbalance between active power and reactive power; and Node Active power and reactive power; and Node and nodes The voltage amplitude; , and Node and The voltage angle of and Branches The conductance and magnetic resistance of Step 3.1.2: Definition of gas network model of integrated energy system: The steady-state flow equation of the pipeline in the natural gas pipeline network is specifically expressed as: (17) in, For pipeline Traffic volume; and Node and The pressure of For pipeline The constant of For pipeline If the flow direction ,but ,otherwise ; Step 3.1.3: Definition of thermal network model of integrated energy system: The thermal model is used to solve the heating temperature and heat recovery temperature of the thermal network nodes. The thermal power calculation formula of each node is: (18) in, is the vector of thermal power consumed or supplied by each node; is the supply temperature; is the outlet temperature; is the return temperature; is the specific heat of water; similar to the network loss in the power grid, the heat network pipeline also has heat loss, and the pipeline temperature drop equation is: (19) in, is the ambient temperature; and is the temperature at the end and start nodes of the pipe; is the heat transfer coefficient per unit length at each pipe; is the length of the pipeline; The calculation formula of the mixed temperature at the node is as follows: (20) in, is the mixture temperature at the node; is the flow temperature at the end of the inlet pipe; Step 3.2: Objective function and decision variable definition: Step 3.2.1: Define the pseudo-state variables of the electrical network as: (twenty one) Step 3.2.2: Define the pseudo-state variables of the gas network as: (twenty two) Step 3.2.3: Define the pseudo-state variables of the thermal network as: (twenty three) Step 3.2.4: Design the objective function of the integrated energy system state estimation as: (twenty four) in, For the network The weight of is the number of networks; For the network The actual measured value of , , , , , , , , .
[0026] Furthermore, the dynamic weighting mechanism in Step 4 includes: Step 4.1: Set the original weight according to the real-time status of the system and the importance of the data: (25) in, , , respectively, network The original weight and dynamic weight of , Network The actual measured values and pseudo-state variables; Step 4.2: During the optimization process of the evolutionary algorithm, the weights of each network, including the power network, heat network, and gas network, are adjusted in real time to adapt to the dynamic changes of the system state and improve the accuracy of state estimation.
[0027] Considering that the dimensions of the electricity network, heat network, and gas network in the objective function are not unified, which affects the optimization effect. Therefore, the weights in the objective function need to be adjusted during the iteration process to achieve better optimization results. The dynamic weight mechanism is set as follows: Furthermore, the evolutionary algorithm in Step 5 adopts a differential evolution algorithm, and its optimization steps include: Step 5.1: Define the population size and number of iterations, and initialize the population: (26) in, For the The decision variables of individuals in the initialization stage, is a random number between 0 and 1. For the The upper bound of the individual decision variables, For the The lower bound of each individual decision variable; Step 5.2: Enter the iteration phase, calculate the objective function of each individual in the population, and select the global optimal individual and the optimal individual in the current iteration based on the objective function. : Step 5.3: Perform mutation and crossover operations according to the mutation probability and crossover probability to generate new individuals. The mutation mechanism is as follows: (27) in, is the mutation probability, is a random number between 0 and 1. , is the scaling factor, For the The first iteration The decision variables represented by each individual, For the The first iteration The decision variables represented by each individual; The crossover mechanism of the crossover operation is as follows: (28) in, , Representing individuals ,individual In the The first iteration decision variables, Representing an individual In the The first iteration decision variables. is the crossover probability, A random number between 0 and 1; Step 5.4: Determine whether the iteration is completed. If not, return to continue the iteration. Otherwise, output the optimal fitness and decision variables.
[0028] Furthermore, it also includes a model correction strategy based on the state feedback mechanism, which uses the decision variables output by the differential evolution algorithm to estimate the state of the integrated energy system and : (29) in, represents the sum of squares of the differences between the model predictions and the actual observed values, It represents the sum of squares of the differences between the actual observations and the mean of the observations; According to each network , feedback correction is performed on the original weights. The specific mechanism is as follows: (30) in, For the network The new original weight.
[0029] Example 2 In another preferred embodiment, based on the above-mentioned embodiment 1, a comprehensive energy system state estimation system based on any of the above-mentioned comprehensive energy system state estimation methods based on the dynamic weighted algorithm is provided, characterized in that it includes a data acquisition module, a data preprocessing module, a feature extraction module, a state estimation model construction module, a dynamic weighting module, an evolutionary algorithm optimization module and a model correction module, and each module works together to achieve accurate estimation of the state of the comprehensive energy system.
[0030] Example 3 In another preferred embodiment, based on the above embodiments 1 and 2, as Figures 1 to 4 As shown, the data of an industrial park in Zhengzhou, Henan Province is used to describe in detail the comprehensive energy system state estimation method and system based on the dynamic weighted algorithm of the present invention: Step 1: The steps of multi-source data collection and data cleaning of the integrated energy system are as follows: Step 1.1: Data collection: First, it is necessary to collect data from various sensors such as smart meters, temperature sensors, pressure gauges, etc. in the integrated energy system; the collected data includes consumption and production data of various energy sources such as electricity, heat, cooling, and gas.
[0031] The collected data can be expressed by the following formula: (1) in, Represents all collected data, Representatives from Data from the data source, Represents the total number of data sources.
[0032] Step 1.2: Data preprocessing: The purpose of data preprocessing is to remove invalid or erroneous data points in the integrated energy system dataset, fill in missing data, smooth or correct abnormal data, and convert the data into a format suitable for analysis; It is planned to use the moving average filter method to process the collected data. The specific steps are as follows: (1) Determine the filter window size: define the window size as , Usually an odd number; (2) Data sequence definition: Create a data sequence. Define a data sequence with a size of A window that can slide over the data sequence; (3) Calculate the average value of the data in the window: Calculate the average value of the data sequence contained in the window each time the data sequence slides. The calculation method is as follows: (2) in, represents the data points within the window, is the filter output; (4) Use filters for data preprocessing: The configured moving average filter is applied to the integrated energy system data to smooth abnormal data.
[0033] Step 1.3: Data cleaning: (1) Data definition: The data output by the moving average filter is defined as: (3) in, represents a data sequence, Represents the first data points; at the same time, the node is detected at the time The data sequence collected in is represented as : (4) The data set collected by all nodes at the detection time During reception at the sink node, it can be represented by The matrix express: (5) (2) Data quality calculation: Data volume indicator calculation, node In time The existence of a sample of is defined as: (6) Among them, null represents Is empty, indicating that data is missing; For Node Number of samples: (7) The data volume indicator is calculated as follows: (8) in, is the number of data; Correctness index, assuming that the monitoring area has nodes, and the monitoring duration is , all nodes have the same time interval Collect data; observations can be expressed as , which is the difference between the true value and the error combination of; node In time The correctness of is defined as follows: (9) in, is the error tolerance threshold; The correctness metrics of the dataset are defined as follows: (10) The calculation method of the comprehensive evaluation index of the set data set is as follows: (11) in, is the data volume weight, is the correctness weight; both must satisfy: ; (3) Data correction mechanism: Set a comprehensive index threshold. If the comprehensive index threshold of the calculated data set is higher than the set threshold, the data set revision phase will begin. Set the data volume index and the correctness index threshold. If the data volume index is higher than the set threshold, fill in the data; the filled data is the average value of the existing data at both ends of the missing data. If the correctness index is higher than the set threshold, revise the data; the revised data is the data measured by the sensor again.
[0034] Step 1.4: Data integration: After data cleaning, use operations such as data merging, transformation, and mapping to integrate data from different sources to form a unified data set.
[0035] Step 2: The steps of feature dimension reduction and key feature selection of multi-source data of integrated energy system are as follows: It is planned to use principal component analysis to reduce the feature dimension. Principal component analysis (PCA) is a statistical method that can transform data into a new coordinate system through linear transformation. The detailed steps of principal component analysis are as follows: Step 2.1: Data preprocessing: First, perform data standardization. The formula for data standardization is as follows: (12) in, is the standardized data, For the original data, is the mean of the original data, is the standard deviation of the original data; the matrix composed of standardized data is called ; Step 2.2: Calculate the covariance matrix and its eigenvalues With the eigenvector , its characteristics are as follows: (13) in, for The transpose of Step 2.3: Calculate the eigenvalues and eigenvectors of the covariance matrix Covariance matrix Perform eigenvalue decomposition and obtain the eigenvalue and the corresponding eigenvector .
[0036] Step 2.4: Select the principal components: According to the size of the eigenvalue, select the The eigenvector corresponding to the largest eigenvalue. The matrix composed of the largest eigenvectors is the loading matrix , which is defined as follows: (14) in, are the eigenvectors arranged in descending order of eigenvalue size; Step 2.5: Data Projection and Data Acquisition Project the original data onto the selected principal component to obtain the reduced-dimensional data, which is calculated as follows: (15) in, is the data after dimensionality reduction; Step 2.6: Key feature selection: determine the features that have the greatest impact on the model's prediction performance based on the reduced dimensionality data; This achieves feature dimensionality reduction and key feature selection of multi-source data in the integrated energy system.
[0037] Step 3: The steps for constructing the integrated energy system state estimation model are as follows: Step 3.1: Integrated energy system network model definition (1) Definition of the electric network model of the integrated energy system: (16) in, and is the imbalance between active power and reactive power; and Node Active power and reactive power; and Node and nodes The voltage amplitude; , and Node and The voltage angle of and Branches The conductance and magnetic resistance of (2) Definition of gas network model for integrated energy system: The steady-state flow equation of the pipeline in the natural gas pipeline network is specifically expressed as: (17) in, For pipeline Traffic volume; and Node and The pressure of For pipeline The constant of For pipeline If the flow direction ,but ,otherwise ; (3) Definition of thermal network model of integrated energy system: The thermal model is used to solve the heating temperature and heat recovery temperature of the thermal network nodes. The thermal power calculation formula of each node is: (18) in, is the vector of thermal power consumed or supplied by each node; is the supply temperature; is the outlet temperature; is the return temperature; is the specific heat of water; similar to the network loss in the power grid, the heat network pipeline also has heat loss, and the pipeline temperature drop equation is: (19) in, is the ambient temperature; and is the temperature at the end and start nodes of the pipe; is the heat transfer coefficient per unit length at each pipe; is the length of the pipeline; The calculation formula of the mixed temperature at the node is as follows: (20) in, is the mixture temperature at the node; is the flow temperature at the end of the inlet pipe; Step 3.2: Objective function and decision variable definition: The pseudo-state variables of the electrical network are defined as: (twenty one) Define the pseudo-state variables of the gas network as: (twenty two) Define the pseudo-state variables of the thermal network as: (twenty three) The objective function for designing the state estimation of the integrated energy system is: (twenty four) in, For the network The weight of is the number of networks; For the network The actual measured value of Define the decision variables as: , , , , , , , , .
[0038] Step 4: The steps for constructing the dynamic weighted model optimization mechanism based on evolutionary algorithm are as follows: Step 4.1: Design of differential evolution algorithm (1) Definition of population size and number of iterations; (2) Population initialization: The following formula is used for population initialization: (25) in, For the The decision variables of individuals in the initialization stage, is a random number between 0 and 1. For the The upper bound of the individual decision variables, For the The lower bound of each individual decision variable; (3) Entering the iteration phase, first calculate the objective function of each individual in the population; (4) Based on the objective function, select the global optimal individual and the best individual in the current iteration ; (5) Determine whether the individual has entered the mutation stage. The mutation mechanism is as follows: (26) in, is the mutation probability, is a random number between 0 and 1. , is the scaling factor, For the The first iteration The decision variables represented by each individual, For the The first iteration The decision variables represented by each individual; (6) Determine whether the individual enters the crossover stage. The crossover mechanism is as follows: (27) in, , Representing individuals ,individual In the The first iteration decision variables, Representing an individual In the The first iteration decision variables; is the crossover probability, A random number between 0 and 1; (7) Determine whether the iteration is completed. If not, return to step (3). Otherwise, exit the iteration program and output the optimal fitness and decision variables. Step 4.2: Setting of dynamic weighting mechanism; Considering that the dimensions of the electricity network, heat network, and gas network in the objective function are not unified, which affects the optimization effect; therefore, the weights in the objective function need to be adjusted during the iteration process to achieve better optimization results. The dynamic weight mechanism is set as follows: (28) in, , , respectively, network The original weight and dynamic weight of , Network The actual measured values and pseudo-state variables.
[0039] Step 5: The steps of the model correction strategy based on the state feedback mechanism are as follows: Use the decision variables output by the differential evolution algorithm to estimate the state of the integrated energy system and calculate the goodness of fit of different networks : (29) in, represents the sum of squares of the differences between the model predictions and the actual observed values, Represents the sum of squares of the differences between the actual observations and the mean of the observations.
[0040] According to each network , feedback correction is performed on the original weights. The specific mechanism is as follows: (30) in, For the network The new original weights, the values of the original weights and dynamic weights after the iteration are shown in Table 1: Table 1 Values of original weights and dynamic weights after iteration
[0041] It can be seen from Table 1 that after the iteration, the dynamic weight of each network is small. Figure 1 , 2 ,3, we can see that the state estimation deviation of the electric network is the largest among the three networks, so the dynamic weight of the electric network after the iteration is also the largest, which shows that the proposed dynamic weight mechanism can increase the weight of the network with poor state estimation effect in the objective function; Figure 1 , Figure 2 , Figure 3 The estimated and true values of voltage at each stage of the power network in the park, the estimated and true values of temperature in the heat network, and the estimated and true values of gas flow in the gas network are shown respectively. Figure 1 , Figure 2 , Figure 3 It can be seen that the estimated value is not much different from the true value, indicating that the proposed state estimation method has high accuracy; Figure 4 The iteration curve of the differential evolution algorithm in the state estimation process is shown. Figure 4 It can be seen that when the dynamic weight strategy is adopted, the convergence speed and optimization effect are better than those of the fixed weight, which shows the superiority of the proposed dynamic weight; thus, the state estimation of the integrated energy system is realized.
[0042] In summary, the method and system for state estimation of an integrated energy system based on a dynamic weighted algorithm provided by the present invention solve the technical problems of low estimation accuracy and poor adaptability in state estimation of an integrated energy system due to multi-source heterogeneity of data, high real-time requirements, and complex and changeable systems; the present invention collects multi-source data (such as electricity, heat, gas, etc.) in the integrated energy system and fuses these data to improve the comprehensiveness and accuracy of state estimation. The introduction and fusion of multi-source data are not available in traditional state estimation methods, which enables the scheme to more comprehensively reflect the actual state of the system; based on data preprocessing and model construction, the method designs a dynamic weighting mechanism to adjust the weight of each data source in real time according to the real-time state of the system and the importance of each type of data. This dynamic adjustment method overcomes the limitations of traditional static weighted models and improves the model's adaptability to different operating states. Adaptability and accuracy; the present invention introduces an evolutionary algorithm to optimize the dynamic weighted model, and finds the optimal weight allocation strategy through iterative calculation. The global search capability and adaptability of the evolutionary algorithm enable the model to converge to the optimal solution more quickly, further improving the accuracy of state estimation; during the operation of the model, a state feedback mechanism is also introduced to feedback and correct the original weights according to the difference between the model prediction results and the actual observation values. This closed-loop control method enables the model to continuously learn and adapt to system changes, thereby improving the robustness and stability of the model; the new idea of state estimation of the integrated energy system, the innovative application of multi-source data processing technology, the innovative design of the optimization algorithm and the construction of a closed-loop control system are the core advantages of the present invention, which provide strong technical support for the efficient operation and intelligent management of the integrated energy system, and effectively promote the further development and application of energy Internet technology.
Claims
1. A method for state estimation of an integrated energy system based on a dynamic weighted algorithm, characterized in that: The method comprises the following steps: Step 1: Collect multi-source data from the integrated energy system, and perform data cleaning and standardization to ensure data accuracy and availability; Step 2: Extract features from the preprocessed data, perform feature dimension reduction through principal component analysis (PCA), and select the data features that are most representative for state estimation; Step 3: Build a preliminary state estimation model; Step 4: Design a dynamic weighting mechanism to adjust the weight of each data source in real time according to the real-time status of the system and the importance of each type of data to improve the adaptability and accuracy of the model; Step 5: Introduce evolutionary algorithm to optimize the dynamic weighted model through iterative calculation and find the optimal weight allocation strategy to further improve the accuracy of state estimation; Step 6: Test and verify the performance of the method in the actual system.
2. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 1, characterized in that: The Step 1 includes Step 1.1 data collection, Step 1.2 data cleaning, and Step 1.3 data standardization processing, wherein Step 1.1 data collection includes collecting data from smart meters, temperature sensors, pressure gauges and various sensors in the integrated energy system. The collected data includes various energy consumption and production data of electricity, heat, cold and gas. The collected data can be expressed by the following formula: (1); in, Represents all collected data, Representatives from Data from the data source, Represents the total number of data sources.
3. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 2, characterized in that: In Step 1, Step 1.2, data cleaning is to pre-process the data using a moving average filter method to remove invalid or erroneous data points, fill in missing data, and smooth or correct abnormal data. The specific steps include: Step 1.2.1: Determine the window size of the filter and define the window size as , Usually an odd number; Step 1.2.2: Data sequence definition, create a data sequence, define a size of A window that can slide over the data sequence; Step 1.2.3: Calculate the average value of the data in the window. Calculate the average value of the data sequence contained in the window each time the data sequence slides. The calculation method is as follows: (2); in, represents the data points within the window, is the filter output; Step 1.2.4: Use filters to preprocess data and apply the configured moving average filter to the integrated energy system data to smooth abnormal data.
4. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 2, characterized in that: The data standardization process in Step 1.3 of Step 1 is to define the data volume index and the correctness index, and fill or revise the data according to the set comprehensive index threshold to achieve data cleaning. The specific steps include: Step 1.3.1: Data definition: The data output by the moving average filter is defined as: (3); in, represents a data sequence, Represents the first data points; at the same time, the node is detected at the time The data sequence collected in is represented as : (4); The data set collected by all nodes at the detection time During reception at the sink node, it can be represented by The matrix express: (5); Step 1.3.2: Data quality calculation: Data volume indicator calculation, node In time The existence of a sample of is defined as: (6); Among them, null represents Is empty, indicating that data is missing; For Node Number of samples: (7); The data volume indicator is calculated as follows: (8); in, is the number of data; Correctness index, assuming that the monitoring area has nodes, and the monitoring duration is , all nodes have the same time interval Collect data; observations can be expressed as , which is the difference between the true value and the error combination of; node In time The correctness of is defined as follows: (9); in, is the error tolerance threshold; The correctness metrics of the dataset are defined as follows: (10); The calculation method of the comprehensive evaluation index of the set data set is as follows: (11); in, is the data volume weight, is the correctness weight; both must satisfy: ; Step 1.3.3: Data correction mechanism: Set a comprehensive index threshold. If the comprehensive index threshold of the calculated data set is higher than the set threshold, the data set revision phase will begin. Set the data volume index and the correctness index threshold; if the data volume index is higher than the set threshold, fill in the data; the filled data is the average value of the existing data at both ends of the missing data; if the correctness index is higher than the set threshold, revise the data; the revised data is the data measured again by the sensor; Step 1.3.4: Data integration: After data cleaning, use data merging, conversion, and mapping operations to integrate data from different sources to form a unified data set.
5. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 1, characterized in that: The specific steps of the principal component analysis method PCA in Step 2 include: Step 2.1: Standardize the data so that the mean of each feature is 0 and the variance is 1. The formula for data standardization is as follows: (12); in, is the standardized data, For the original data, is the mean of the original data, is the standard deviation of the original data; the matrix composed of standardized data is called ; Step 2.2: Calculate the covariance matrix and its eigenvalues With the eigenvector , its characteristics are as follows: (13); in, for The transpose of Step 2.3: Select the principal component according to the size of the eigenvalue, and project the original data onto the selected principal component to achieve data dimensionality reduction. The eigenvector corresponding to the largest eigenvalue is defined as The matrix composed of the largest eigenvectors is the loading matrix , which is defined as follows: (14); in, are the eigenvectors arranged in descending order of eigenvalue size; Step 2.4: From the reduced dimensionality data The key features that have the greatest impact on the model's prediction performance are selected, and the dimensionality reduction data is calculated as follows: (15); in, is the data after dimensionality reduction.
6. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 1, characterized in that: The specific steps of constructing the preliminary state estimation model in Step 3 include: Step 3.1: Definition of integrated energy system network model Step 3.1.1: Definition of the electrical network model of the integrated energy system (16); in, and is the imbalance between active power and reactive power; and Node Active power and reactive power; and Node and nodes The voltage amplitude; , and Node and The voltage angle of and Branches The conductance and magnetic resistance of Step 3.1.2: Definition of gas network model of integrated energy system: The steady-state flow equation of the pipeline in the natural gas pipeline network is specifically expressed as: (17); in, For pipeline Traffic volume; and Node and The pressure of For pipeline The constant of For pipeline If the flow direction ,but ,otherwise ; Step 3.1.3: Definition of thermal network model of integrated energy system: The thermal model is used to solve the heating temperature and heat recovery temperature of the thermal network nodes. The thermal power calculation formula of each node is: (18); in, is the vector of thermal power consumed or supplied by each node; is the supply temperature; is the outlet temperature; is the return temperature; is the specific heat of water; similar to the network loss in the power grid, the heat network pipeline also has heat loss, and the pipeline temperature drop equation is: (19); in, is the ambient temperature; and is the temperature at the end and start nodes of the pipe; is the heat transfer coefficient per unit length at each pipe; is the length of the pipeline; The calculation formula of the mixed temperature at the node is as follows: (20); in, is the mixture temperature at the node; is the flow temperature at the end of the inlet pipe; Step 3.2: Objective function and decision variable definition: Step 3.2.1: Define the pseudo-state variables of the electrical network as: (21); Step 3.2.2: Define the pseudo-state variables of the gas network as: (22); Step 3.2.3: Define the pseudo-state variables of the thermal network as: (23); Step 3.2.4: Design the objective function of the integrated energy system state estimation as: (24); in, For the network The weight of is the number of networks; For the network The actual measured value of , , , , , , , , .
7. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 1, characterized in that: The dynamic weighting mechanism in Step 4 includes: Step 4.1: Set the original weight according to the real-time status of the system and the importance of the data: (25); in, , , respectively, network The original weight and dynamic weight of , Network The actual measured values and pseudo-state variables; Step 4.2: During the optimization process of the evolutionary algorithm, the weights of each network, including the power network, heat network, and gas network, are adjusted in real time to adapt to the dynamic changes of the system state and improve the accuracy of state estimation.
8. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 1, characterized in that: The evolutionary algorithm in Step 5 adopts a differential evolution algorithm, and its optimization steps include: Step 5.1: Define the population size and number of iterations, and initialize the population: (26); in, For the The decision variables of individuals in the initialization stage, is a random number between 0 and 1. For the The upper bound of the individual decision variables, For the The lower bound of each individual decision variable; Step 5.2: Enter the iteration phase, calculate the objective function of each individual in the population, and select the global optimal individual and the optimal individual in the current iteration based on the objective function. : Step 5.3: Perform mutation and crossover operations according to the mutation probability and crossover probability to generate new individuals. The mutation mechanism is as follows: (27); in, is the mutation probability, is a random number between 0 and 1. , is the scaling factor, For the The iteration The decision variables represented by each individual, For the The iteration The decision variables represented by each individual; The crossover mechanism of the crossover operation is as follows: (28); in, , Representing individuals ,individual In the The first iteration decision variables, Representing an individual In the The first iteration decision variables; is the crossover probability, A random number between 0 and 1; Step 5.4: Determine whether the iteration is completed. If not, return to continue the iteration. Otherwise, output the optimal fitness and decision variables.
9. The method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to claim 1, characterized in that: It also includes a model correction strategy based on the state feedback mechanism, which uses the decision variables output by the differential evolution algorithm to estimate the state of the integrated energy system and : (29); in, represents the sum of squares of the differences between the model predictions and the actual observed values, It represents the sum of squares of the differences between the actual observations and the mean of the observations; According to each network , feedback correction is performed on the original weights. The specific mechanism is as follows: (30); in, For the network The new original weight.
10. A system for estimating the state of an integrated energy system based on the method for estimating the state of an integrated energy system based on a dynamic weighted algorithm according to any one of claims 1 to 9, characterized in that: It includes a data acquisition module, a data preprocessing module, a feature extraction module, a state estimation model building module, a dynamic weighting module, an evolutionary algorithm optimization module and a model correction module. Each module works together to achieve accurate estimation of the state of the integrated energy system.