Low-carbon park simulation planning method and system based on Bayesian algorithm
Through the low-carbon park simulation planning method based on Bayesian algorithm, load prediction and energy network planning model are optimized, and the complexity of collaborative planning of urban low-carbon park energy networks is solved, and accurate load prediction and multi-network fusion hierarchical planning are achieved.
Patent Information
- Application Number
- CN202411529864.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-04
AI Technical Summary
The development levels of urban low-carbon parks are different, and resource endowments vary greatly. The cross-spatial interactions between energy networks such as electrical hot and cold are involved, resulting in complex collaborative characteristics of energy networks at different levels and lack of scientific and unified planning and design methods.
The low-carbon park simulation planning method based on Bayesian algorithm is adopted, load prediction is achieved by optimizing Bayesian algorithm, and energy network planning models are established at the city and regional levels, economic objective function and DC current model are used for modeling, and finally, the numerical solution model of electrical-gas-thermal smart energy network hierarchical planning is solved through the commercial solver GUROBI.
The classification accuracy of the Naive Bayes algorithm is improved, accurate prediction of loads at all levels is achieved, and the classification planning of smart energy systems for urban low-carbon parks with electrical-gas-thermal networks is established, which solves the complexity of collaborative planning of low-carbon park energy networks.
Smart Images

Figure CN119558176A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of park simulation planning, and in particular to a low-carbon park simulation planning method and system based on a Bayesian algorithm. Background Art
[0002] Compared with the traditional single energy network planning, the network planning of urban smart energy system has put forward new requirements. From basic power flow calculation, optimal power flow to reliability assessment and coordinated planning, the difficulty of modeling and solving has increased greatly. There is an urgent need to establish a more flexible and robust planning method. Low-carbon parks have different levels of development, large differences in resource endowments, and multiple levels of scale. Energy networks such as electrical heating and cooling involve cross-spatial scale interactions. The synergy characteristics of energy networks at different levels are complex. At present, there is still no scientific and unified planning and design method. It is necessary to form a technical breakthrough in the theory of urban energy network hierarchical planning to solve the key planning technology issues of urban smart energy networks under the characteristics of multi-scenario, multi-level, and multi-energy flow coupling.
[0003] Classification is to learn or construct a classifier based on existing data, and classify the data through the classifier. Compared with other classifiers, when the probability knowledge is complete, the Bayesian classifier is the best classifier for its class. If the classifier is measured by the error rate, the Bayesian classifier has the lowest probability of classification error. The wrong judgment result will cause different losses to different events. If the classifier is evaluated by the judgment risk, the Bayesian classifier has the lowest average risk. The core of the Bayesian classifier is the Bayesian theorem, which is a type of algorithm that uses the knowledge of probability statistics in its classification process. The naive Bayesian classifier idealizes and simplifies the Bayesian classifier and becomes the most classic classification algorithm. Compared with other classification algorithms, it has great advantages.
[0004] When solving Bayes' theorem, from a computational perspective, there will be a combinatorial explosion problem, and from a data perspective, there will be a problem of sample sparseness. In order to prevent these problems, the Naive Bayes classifier came into being. The Naive Bayes classifier not only has a solid and complete theoretical foundation, but is also simple and efficient, and has good classification performance in many fields. Although the attribute conditional independence assumption simplifies the algorithm, it also limits the Naive Bayes classifier. This assumption is too restrictive and too harsh, and it is not true in real life, which affects its classification effect to a certain extent. Therefore, more and more scholars have proposed some improvement methods from different perspectives and technologies. At present, the improvements to NBC at home and abroad are mainly divided into the following four aspects: structural expansion, local learning, attribute selection, and attribute weighting.
[0005] Structural expansion mainly relaxes the attribute conditional independence assumption to a certain extent by exploring the dependency relationship between attributes. The basic idea of local learning is to divide the entire data set into several subsets and construct a classifier based on the local data set. In this way, the attribute conditional independence assumption of the naive Bayes classifier can be relaxed to a certain extent on the local data set, thereby improving the naive Bayes classification performance. Summary of the invention
[0006] In view of the above-mentioned problems, the present invention is proposed.
[0007] Therefore, the technical problem solved by the present invention is: urban low-carbon parks have different development levels, large differences in resource endowments, and contain multiple levels of scale. Energy networks such as electrical, heating and cooling involve cross-spatial scale interactions, and the collaborative characteristics of energy networks at different levels are complex. There is still no scientific and unified planning and design method. It is necessary to form a technological breakthrough in the theory of hierarchical planning of low-carbon park energy networks to solve the key planning technology issues of urban low-carbon park smart energy networks under multi-scenario, multi-level, and multi-energy flow coupling characteristics.
[0008] The naive Bayes classifier will be affected by the overly strict attribute conditional independence assumption. Methods to improve the classification performance of the naive Bayes classifier need to be studied.
[0009] In order to solve the above technical problems, the present invention provides the following technical solutions: a low-carbon park simulation planning method based on Bayesian algorithm, comprising: optimizing the Bayesian algorithm to realize load forecasting.
[0010] Collect electrical data and establish city-level network planning models, city-level power grid models, and city-level gas grid models.
[0011] A numerical solution model for hierarchical planning of electricity-gas-heat smart energy network is established to obtain the planning results.
[0012] 2 As a preferred solution of the low-carbon park simulation planning method based on Bayesian algorithm described in the present invention, wherein: the optimized Bayesian algorithm includes: assuming that the sample data set D = {x1, x2, ... x m}, each sample x i =(x i1 ,x i2 ,...x in ) is an n-dimensional continuous attribute vector, and the category is labeled as y = {c1, c2, ... c N}, the training process of the improved naive Bayes classifier is as follows:
[0013] Based on the training set D, estimate the prior probability of the c-th class sample:
[0014]
[0015] Where |D| represents the total number of samples in the training set, D c Represents the set of c-th class in the training set D.
[0016] Remember D c ={x1,x2,...x m}, calculate the sample mean of each continuous attribute feature of each type of sample:
[0017]
[0018] Among them, x mj Represents an m-dimensional continuous attribute vector, where m represents the dimension.
[0019] Take μ=(μ1,μ2,...,μ n ) T , and then calculate the covariance matrix:
[0020]
[0021] Compute the orthogonal matrix P such that P T MP=A, A is a diagonal matrix. Let M be an n×n matrix with eigenvalues λ1,λ2,...,λ n , the eigenvectors are β1,β2,...,β n , normalize each eigenvector:
[0022]
[0023] Among them, β i represents the i-th eigenvector.
[0024] Get a set of standard orthogonal bases η1,η2,...,η n , with each standard orthogonal basis as a column to form the matrix P:
[0025] P=(η1,η2,...,η n )
[0026] The matrix P similarly diagonalizes the matrix M, and the product matrix P -1 The main diagonal elements of MP are the eigenvalues of the matrix M:
[0027]
[0028] The P obtained by the above method is an orthogonal matrix, so P -1 =P T .
[0029] Let y i =P T (xi -μ), i=1,2,...,m, calculate {y1,y2,...y m}, with a sample mean of zero.
[0030] Compute probability density functions for continuous attributes:
[0031]
[0032] Among them, x i represents the i-th attribute of sample x, μ c,i represents the sample mean of the c-th class sample on the i-th attribute, Represents the sum and variance of the values of the c-th class samples on the i-th attribute.
[0033]
[0034] in, It represents the variance of the value of the c-th sample on the i-th attribute after orthogonal transformation.
[0035] y i =(y i1 ,y i2 ,...,y in ) T The components yij of are independent of each other, and the joint density function is expressed as:
[0036]
[0037] Based on the Bayesian decision criterion of minimizing the classification error rate, the improved naive Bayes classifier is expressed as:
[0038]
[0039] 3 As a preferred solution of the low-carbon park simulation planning method based on the Bayesian algorithm described in the present invention, wherein: the establishment of the city-level network planning model includes using an economic objective function:
[0040]
[0041] Among them, F inv represents the investment cost, F opr represents the operating cost, represents the set of substations to be planned, represents the set of power lines to be planned, A collection of pressure regulating stations to be planned, represents the set of gas storage facilities to be planned, Ω d represents the set of typical days, Ω t represents the set of typical time periods, Ωb represents the collection of power loads, Ω n represents the set of gas loads, Ω e represents the set of nodes interconnected with the external power system, Ω g Represents a collection of nodes interconnected with the external gas network. s The capital recovery factor of the substation, RF l The capital recovery factor of the power line, RF w Indicates the capital recovery factor of the voltage regulating station, RF a It represents the capital recovery coefficient of gas storage facilities, and the calculation formula is expressed as:
[0042]
[0043] Where r is the discount rate, y (·) Indicates the service life of the corresponding equipment. represents the unit capacity investment cost of the substation, represents the unit capacity investment cost of power lines, represents the unit capacity investment cost of the pressure regulating station, represents the unit capacity investment cost of gas storage facilities, represents the cost of purchasing electricity from the external power grid, represents the cost of purchasing gas from the external gas network, represents the load shedding penalty cost of electricity, represents the load shedding penalty cost of gas, T d Indicates the number of scenes represented by a typical day in a year, Represents the historical data of the transmission power of the section interacting with the external power grid, Represents the historical data of gas flow at the section interacting with the external gas network. represents the investment decision variable of the substation, represents the investment decision variable of power lines, represents the investment decision variable of the pressure regulating station, represents the investment decision variable of gas storage facilities, Represents the active power interacting with the external grid, Indicates the gas flow interacting with the external gas grid. Indicates the load shedding amount of the power grid load node, Indicates the load shedding amount of the gas grid load node.
[0044] 4 As a preferred solution of the low-carbon park simulation planning method based on the Bayesian algorithm described in the present invention, wherein: the city-level power grid model includes, using the DC power flow model for modeling:
[0045]
[0046] in, represents the set of lines with node i as the starting or ending node, represents the set of substations with node i as the head or end node, represents the set of external power grids connected to node i, represents the set of gas power plants connected to node i, represents the set of new planned areas connected to node i, represents the set of factories to be shut down connected to node i, Ω l Represents the set of built lines. represents the active load of the factory to be shut down, X ij represents the reactance of line ij, Represents the power interacting with the external grid, represents the output of the gas-fired power plant, represents the active power flowing through the line, represents the active power flowing through the substation, represents the load of the newly planned area, represents the load of node i, Indicates whether the factory is shut down. represents the phase angle of node i.
[0047] 5 As a preferred solution of the low-carbon park simulation planning method based on the Bayesian algorithm described in the present invention, wherein: the city-level gas network model includes modeling using the second-order cone convex relaxation form of the steady-state energy flow model.
[0048] The energy balance constraint of node m is expressed as:
[0049]
[0050] The Weymouth equation for a pipe is expressed as:
[0051]
[0052] The operating equation of a gas-fired power plant is expressed as:
[0053]
[0054] The equilibrium equation corresponding to the energy storage state is expressed as:
[0055]
[0056] The gas storage facility remains in the same state at the beginning and end of each typical day:
[0057]
[0058] in, represents the set of pipelines with node m as the first or last node, represents the set of voltage regulating stations with node m as the head or end node, represents the set of gas storage facilities connected to node m, represents the set of external gas networks connected to node m, represents the set of gas power plants connected to node m, represents the set of new planned areas connected to node m, represents the set of factories to be shut down connected to node m, Ω p Represents a collection of gas pipelines, represents the gas load of the plant to be shut down, W mn The Weymouth equation coefficient for the pipe, T m Indicates the energy conversion efficiency of the gas generator set. Indicates the flow rate of gas injected into the system by the gas storage facility. Represents the interaction flow with the external gas network, Indicates the gas flow rate of the pipeline, Indicates the gas flow rate of the pressure regulating station. represents the gas flow rate of the gas power plant, represents the gas load of the newly planned urban area, Indicates whether the factory is shut down. represents the gas load of the node, π m,d,t represents the pressure at the node, Indicates the energy storage status of the gas storage facility.
[0059] 6 As a preferred solution of the low-carbon park simulation planning method based on the Bayesian algorithm described in the present invention, wherein: the establishment of a numerical solution model for the hierarchical planning of an electric-gas-heat smart energy network includes planning a regional-level energy network on the basis of completing the city-level network planning, and coordinating the planning of the power network and the gas network.
[0060] Added construction formulas related to regional energy stations:
[0061]
[0062] in, Represents the set of energy stations to be planned, RF es represents the capital recovery factor of a new energy station, represents the unit capacity investment cost of the regional energy station, represents the investment decision variable of the regional energy station, Indicates the active power provided by the energy station to the lower-level power grid;
[0063] Regional power network planning considers the energy supply between regional energy networks, plans node power flow and load, and introduces continuous variables It represents the proportion of the load in area j supplied by grid node k. The sum of the energy supply proportions of all nodes in each area is 1:
[0064]
[0065] in, represents the set of areas connected to the grid node i, represents the set of grid nodes connected to area j, Φ y represents a collection of patches, represents the load of area j, It represents the proportion of the load in area j supplied by grid node k;
[0066] Introducing continuous variables into regional and gas network planning It represents the proportion of gas load supplied by node k to area n. The sum of the energy supply proportions of all nodes in each area is 1:
[0067]
[0068] in, represents the set of slices connected to the gas node m, represents the set of gas nodes connected to zone n, represents the load of area j, The proportion of the load in zone n supplied by gas node k.
[0069] 7 As a preferred solution of the low-carbon park simulation planning method based on the Bayesian algorithm described in the present invention, wherein: the solving to obtain the planning result includes using the commercial solver GUROBI to solve the numerical solution model of the hierarchical planning of the electric-gas-heat smart energy network to obtain the planning result.
[0070] 8 A low-carbon park simulation planning system based on Bayesian algorithm, characterized by: including:
[0071] Optimize the algorithm module, optimize the Bayesian algorithm, and realize load forecasting.
[0072] Establish a city model module, collect electrical data, and establish a city-level network planning model, a city-level power grid model, and a city-level gas network model.
[0073] Establish a regional model module, establish a numerical solution model for the hierarchical planning of the electricity-gas-heat smart energy network, and obtain the planning results through solution.
[0074] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0075] A computer-readable storage medium stores a computer program, which implements the steps of the method described above when executed by a processor.
[0076] Beneficial effects of the present invention: The present invention is mainly based on the improved naive Bayes algorithm of continuous attributes for simulation planning of low-carbon parks. In view of the attribute conditional independence assumption of the naive Bayes classifier, an orthogonal transformation is performed on the continuous attribute features. The attribute features after the transformation eliminate the influence of the linear relationship between the attributes, and are close to the attribute conditional independence assumption of the naive Bayes classifier, thereby improving the classification accuracy of the naive Bayes algorithm. In view of the problems of independent planning and isolated operation of various energy forms in low-carbon parks, low comprehensive energy utilization rate, insufficient renewable energy absorption capacity, poor automation and information level, etc., accurate prediction of loads at all levels is achieved through bottom-up supply and demand interval matching and gray load forecasting, and a numerical solution model for hierarchical planning of electricity-gas-heat (cold) smart energy network is established. The optimization is carried out with economy as the planning goal and unified into a hybrid second-order cone model for solution, realizing the hierarchical planning of urban low-carbon park smart energy systems with integrated electricity-gas-heat (cold) multi-networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0078] Figure 1 An overall flow chart of a low-carbon park simulation planning method based on a Bayesian algorithm provided in the first embodiment of the present invention.
[0079] Figure 2 The present invention provides a method for low-carbon park simulation planning based on a Bayesian algorithm according to the second embodiment of the present invention.
[0080] Figure 3 The second embodiment of the present invention provides a low-carbon park simulation planning method based on a Bayesian algorithm, which provides the current status of the city and regional network of the gas network.
[0081] Figure 4 The present invention provides a second embodiment of a low-carbon park simulation planning method based on a Bayesian algorithm and provides a typical daily load regression average error in spring.
[0082] Figure 5 Typical daily load data of a substation in summer for a low-carbon park simulation planning method based on a Bayesian algorithm provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0083] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0084] Example 1
[0085] Reference Figure 1 , is an embodiment of the present invention, and provides a low-carbon park simulation planning method based on a Bayesian algorithm, comprising:
[0086] S1: Optimize the Bayesian algorithm to achieve load forecasting.
[0087] Assume that the sample data set D = {x1, x2, ...x m}, each sample x i =(x i1 ,x i2 ,...x in ) is an n-dimensional continuous attribute vector, and the category is labeled as y = {c1, c2, ... c N}, the training process of the improved naive Bayes classifier is as follows:
[0088] Based on the training set D, estimate the prior probability of the c-th class sample:
[0089]
[0090] Where |D| represents the total number of samples in the training set, D c Represents the set of the cth class in the training set D.
[0091] Remember D c ={x1,x2,...x m}, calculate the sample mean of each continuous attribute feature of each type of sample:
[0092]
[0093] Among them, x mj Represents an m-dimensional continuous attribute vector, where m represents the dimension.
[0094] Take μ=(μ1,μ2,...,μn ) T , and then calculate the covariance matrix:
[0095]
[0096] Compute the orthogonal matrix P such that P T MP=A, A is a diagonal matrix. Let M be an n×n matrix with eigenvalues λ1,λ2,...,λ n , the eigenvectors are β1,β2,...,β n , normalize each eigenvector:
[0097]
[0098] Among them, β i represents the i-th eigenvector.
[0099] Get a set of standard orthogonal bases η1,η2,...,η n , with each standard orthogonal basis as a column to form the matrix P:
[0100] P=(η1,η2,...,η n )
[0101] The matrix P similarly diagonalizes the matrix M, and the product matrix P -1 The main diagonal elements of MP are the eigenvalues of the matrix M:
[0102]
[0103] The P obtained by the above method is an orthogonal matrix, so P -1 =P T .
[0104] Let y i =P T (x i -μ), i=1,2,...,m, calculate {y1,y2,...y m}, with a sample mean of zero.
[0105] Compute probability density functions for continuous attributes:
[0106]
[0107] Among them, x i represents the i-th attribute of sample x, μ c,i represents the sample mean of the c-th class sample on the i-th attribute, Represents the sum and variance of the values of the c-th class samples on the i-th attribute.
[0108]
[0109] Among them, σ′ c,i 2 It represents the variance of the value of the c-th sample on the i-th attribute after orthogonal transformation.
[0110] y i =(y i1 ,y i2 ,...,y in ) T The components yij of are independent of each other, and the joint density function is expressed as:
[0111]
[0112] Based on the Bayesian decision criterion of minimizing the classification error rate, the improved naive Bayes classifier is expressed as:
[0113]
[0114] It should be noted that by performing orthogonal transformation on continuous attribute features and eliminating the linear relationship between attributes, a certain degree of independence is achieved, thus approaching the assumptions of the naive Bayes classifier. First, the class prior probability of an object is calculated, and then the class posterior probability is obtained according to the Bayesian formula, that is, the probability that the object belongs to a certain class. Finally, the object is assigned to the class with the largest posterior probability, which classifies the test data.
[0115] S2: Collect electrical data and establish city-level network planning model, city-level power grid model, and city-level gas network model.
[0116] Building a city-level network planning model includes using an economic objective function.
[0117] It should be noted that the planning objectives are mainly based on urban management and decision makers. The goal is to reduce the government's annual public fiscal expenditure in the energy field as much as possible under the premise of meeting certain social and economic development goals. The economic objective function mainly includes investment and operating costs. Since the investment cost of equipment is usually fixed assets, the capital recovery coefficient is used to convert it into an equivalent annual average cost.
[0118]
[0119] Among them, F inv represents the investment cost, F opr represents the operating cost, represents the set of substations to be planned, represents the set of power lines to be planned, A collection of pressure regulating stations to be planned, represents the set of gas storage facilities to be planned, Ωd represents the set of typical days, Ω t represents the set of typical time periods, Ω b represents the collection of power loads, Ω n represents the set of gas loads, Ω e represents the set of nodes interconnected with the external power system, Ω g Represents a collection of nodes interconnected with the external gas network. s represents the capital recovery factor of the substation, RF l Represents the capital recovery factor of the power line, RF w Indicates the capital recovery factor of the voltage regulating station, RF a It represents the capital recovery coefficient of gas storage facilities, and the calculation formula is expressed as:
[0120]
[0121] Where r is the discount rate, y (·) Indicates the service life of the corresponding equipment. represents the unit capacity investment cost of the substation, represents the unit capacity investment cost of power lines, represents the unit capacity investment cost of the pressure regulating station, represents the unit capacity investment cost of gas storage facilities, represents the cost of purchasing electricity from the external power grid, represents the cost of purchasing gas from the external gas network, represents the load shedding penalty cost of electricity, represents the load shedding penalty cost of gas, T d Indicates the number of scenes represented by a typical day in a year, Represents the historical data of the transmission power of the section interacting with the external power grid, Represents the historical data of gas flow at the section interacting with the external gas network. represents the investment decision variable of the substation, represents the investment decision variable of power lines, represents the investment decision variable of the pressure regulating station, represents the investment decision variable of gas storage facilities, Represents the active power interacting with the external grid, Indicates the gas flow interacting with the external gas grid. Indicates the load shedding amount of the power grid load node, Indicates the load shedding amount of the gas grid load node.
[0122] The city-level power grid model includes modeling using a DC power flow model.
[0123] It should be noted that 220kV enters the city, 3-4 220kV to 110kV transformers are selected in the city, and the city level is distributed to the region in the form of 110kV and interconnected, and the radiation radius is met from each 220 / 110 transformer to each region. Since the voltage levels are mainly 500kV, 220kV and 110kV, and the planning problem does not require high model accuracy, the DC power flow model is used for modeling.
[0124]
[0125] in, represents the set of lines with node i as the starting or ending node, represents the set of substations with node i as the head or end node, represents the set of external power grids connected to node i, represents the set of gas power plants connected to node i, represents the set of new planned areas connected to node i, represents the set of factories to be shut down connected to node i, Ω l Represents the set of built lines. represents the active load of the factory to be shut down, X ij represents the reactance of line ij, Represents the power interacting with the external grid, represents the output of the gas-fired power plant, represents the active power flowing through the line, represents the active power flowing through the substation, represents the load of the newly planned area, represents the load of node i, Indicates whether the factory is shut down. represents the phase angle of node i.
[0126] It should be noted that the constraints include the following:
[0127]
[0128] Among them, Ω s represents the set of completed substation nodes, Ω u represents a collection of gas-fired power plants, Indicates the capacity of transformers in the planning and construction of substations, represents the planned and built capacity of the line, ξ represents the maximum proportion of load shedding, Indicates the minimum and maximum output of the gas generator set. Indicates the climbing ability of the gas generator set. represents the maximum power of the node interacting with the external grid, Indicates the minimum and maximum values of the node phase angle.
[0129] It should be noted that the gas first station is set at the edge of the city, the chain is distributed in each area, and the main path is set according to the direction of the road. The second-order cone convex relaxation form of the steady-state energy flow model is used for modeling.
[0130] The city-level gas grid model includes modeling using the second-order cone-convex relaxation form of the steady-state energy flow model.
[0131] The energy balance constraint of node m is expressed as:
[0132]
[0133] The Weymouth equation for a pipe is expressed as:
[0134]
[0135] The operating equation of a gas-fired power plant is expressed as:
[0136]
[0137] The equilibrium equation corresponding to the energy storage state is expressed as:
[0138]
[0139] The gas storage facility remains in the same state at the beginning and end of each typical day:
[0140]
[0141] in, represents the set of pipelines with node m as the first or last node, represents the set of voltage regulating stations with node m as the head or end node, represents the set of gas storage facilities connected to node m, represents the set of external gas networks connected to node m, represents the set of gas power plants connected to node m, represents the set of new planned areas connected to node m, represents the set of factories to be shut down connected to node m, Ω p Represents a collection of gas pipelines, represents the gas load of the plant to be shut down, W mn The Weymouth equation coefficient for the pipe, T m Indicates the energy conversion efficiency of the gas generator set. Indicates the flow rate of gas injected into the system by the gas storage facility. Represents the interaction flow with the external gas network, Indicates the gas flow rate of the pipeline, Indicates the gas flow rate of the pressure regulating station. represents the gas flow rate of the gas power plant, represents the gas load of the newly planned urban area, Indicates whether the factory is shut down. represents the gas load of the node, π m,d,t represents the pressure at the node, Indicates the energy storage status of the gas storage facility.
[0142] It should be noted that the constraints include the following:
[0143]
[0144] Among them, Ω a represents the set of built gas storage facility nodes, Ω w Represents the collection of built pressure regulating station nodes. Indicates the planned and built gas storage capacity of gas storage facilities, Indicates the maximum flow rate of planned and built pressure regulating stations. represents the maximum flow rate of the pipeline, represents the minimum and maximum values of the node pressure, ζ represents the maximum ratio of load shedding, Indicates the minimum and maximum gas supply of the gas generator set. Indicates the maximum flow rate for interaction with the external gas network, Indicates the minimum and maximum gas storage capacity of the gas storage facility.
[0145] S3: Establish a numerical solution model for the hierarchical planning of the electricity-gas-heat smart energy network and obtain the planning results.
[0146] Establishing a numerical solution model for the hierarchical planning of the electricity-gas-heat smart energy network includes planning the regional energy network on the basis of the completion of the city-level network planning, and coordinating the planning of the electricity network and the gas network.
[0147] Compared with the city-level objective function, the regional-level planning adds the construction formula related to the regional energy station:
[0148] f inv +F opr (4-98)
[0149]
[0150]
[0151] in, Represents the set of energy stations to be planned, RFes represents the capital recovery factor of a new energy station, represents the unit capacity investment cost of the regional energy station, represents the investment decision variable of the regional energy station, Indicates the active power provided by the energy station to the lower-level power grid;
[0152] It should be noted that regional power network planning considers the energy supply between regional energy networks and plans node power flow and load. Since regional power grids have the ability to transfer power, the load of each area can be supplied by multiple power grid nodes, and the supply ratio is flexible and adjustable.
[0153] Regional power network planning considers the energy supply between regional energy networks, plans node power flow and load, and introduces continuous variables It represents the proportion of the load in area j supplied by grid node k. The sum of the energy supply proportions of all nodes in each area is 1:
[0154]
[0155] in, represents the set of areas connected to the grid node i, represents the set of grid nodes connected to area j, Φ y represents a collection of patches, represents the load of area j, It represents the proportion of the load in area j supplied by grid node k.
[0156] It should be noted that the planning of gas networks is similar to that of power grids, and is mainly achieved by defining the energy flow between nodes.
[0157] Introducing continuous variables into regional and gas network planning It represents the proportion of gas load supplied by node k to area n. The sum of the energy supply proportions of all nodes in each area is 1:
[0158]
[0159] in, represents the set of areas connected to the grid node i, represents the set of grid nodes connected to area j, Φ y represents a collection of patches, represents the load of area j, It represents the proportion of the load in area j supplied by grid node k;
[0160] The commercial solver GUROBI is used to solve the numerical solution model of the electricity-gas-heat smart energy network hierarchical planning and obtain the planning results.
[0161] The above embodiments also include a low-carbon park simulation planning system based on the Bayesian algorithm, specifically:
[0162] Optimize the algorithm module, optimize the Bayesian algorithm, and realize load forecasting.
[0163] Establish a city model module, collect electrical data, and establish a city-level network planning model, a city-level power grid model, and a city-level gas network model.
[0164] Establish a regional model module, establish a numerical solution model for the hierarchical planning of the electricity-gas-heat smart energy network, and obtain the planning results through solution.
[0165] The computer device may be a server. The computer device includes a processor, a memory, an input / output interface (I / O for short) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data cluster data of a power monitoring system. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method is implemented.
[0166] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0167] Example 2
[0168] Reference Figure 2 to Figure 5 , which is an embodiment of the present invention, provides a low-carbon park simulation planning method and system based on Bayesian algorithm. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through simulation experiments.
[0169] This embodiment conducts energy network hierarchical planning calculation case testing and analysis according to candidate areas for old city renovation and new city construction in a certain city, combined with local building load information and electrical integrated energy system parameters.
[0170] The main energy networks at the city level include power networks and gas networks. The current status of the city and regional power networks is shown in Figure 2. The current status of the city and regional gas networks is shown in Figure 2. Figure 3 shown.
[0171] Using the mean absolute error as the evaluation index, the power and gas loads of each block in the city were regressed, the regression results were compared with the simulation results, and the average error of each typical day for 24 hours was calculated. For example, in spring, Figure 4 shown.
[0172] from Figure 4 The values of the typical daily average error show that the regression errors of the power load of most grid units are within ±75kW, and the regression errors of the gas load are within ±5Nm3 / h. In addition, there is a certain negative correlation between the errors of power and gas loads. This is because in winter and spring, the building load is mainly the heat load of gas heating, while in summer and autumn, the building load is mainly the cooling load of electric cooling.
[0173] The city-level energy network is planned. From the perspective of investment and operation economy, the final planning result is to build or expand 12 110kV substations, add 4 power lines, and build 1 high- and medium-voltage regulating station and 1 gas storage facility. The reconstruction planning scheme of the energy network is shown in Tables 1 to 4. Among them, the new and expanded substations are shown in Table 1, with an additional substation capacity of 702MVA and a total investment of about 170 million yuan. The planning scheme of 4 power lines is shown in Table 2, with a total line length of 9.55km and a total investment of about 8.3 million yuan. Build 1 high- and medium-voltage regulating station and the corresponding gas pipeline, as shown in Table 3, with a total investment of about 131 million yuan. The total investment in building gas storage facilities in the high- and medium-voltage regulating station is about 432 million yuan, as shown in Table 4.
[0174] Table 1 Substation planning results
[0175]
[0176] Table 2 Power line planning
[0177]
[0178] Table 3 Natural gas pressure regulating station planning
[0179]
[0180] Table 4 Gas storage facility planning
[0181]
[0182]
[0183] According to the above planning results, the results show that the 500kV and 220kV power grids can basically meet the current electricity demand, but the construction of the 110kV power grid is relatively lagging behind, and some substations and lines in the administrative area need to be expanded to meet future electricity demand. The two existing high and medium voltage regulating stations can no longer meet future gas demand, so it is necessary to build a new high and medium voltage regulating station and a gas storage facility to ensure future gas demand.
[0184] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A low-carbon park simulation planning method based on Bayesian algorithm, characterized in that: include: Optimize Bayesian algorithm to achieve load forecasting; Collect electrical data and establish city-level network planning models, city-level power grid models, and city-level gas grid models; A numerical solution model for hierarchical planning of electricity-gas-heat smart energy network is established to obtain the planning results.
2. The low-carbon park simulation planning method based on Bayesian algorithm according to claim 1, characterized in that: The optimized Bayesian algorithm includes: assuming that the sample data set D = {x1, x2, ...x m }, each sample x i =(x i1 ,x i2 ,...x in ) is an n-dimensional continuous attribute vector, and the category is labeled as y = {c1, c2, ... c N }, the training process of the improved naive Bayes classifier is as follows: Based on the training set D, estimate the prior probability of the c-th class sample: Where |D| represents the total number of samples in the training set, D c Represents the set composed of the cth class in the training set D; Remember D c ={x1,x2,...x m }, calculate the sample mean of each continuous attribute feature of each type of sample: Among them, x mj Represents an m-dimensional continuous attribute vector, where m represents the dimension; Take μ=(μ1,μ2,...,μ n ) T , and then calculate the covariance matrix: Compute the orthogonal matrix P such that P T MP=A, A is a diagonal matrix; let M be an n×n matrix, whose eigenvalues are λ1,λ2,...,λ n , the eigenvectors are β1,β2,...,β n , normalize each eigenvector: Among them, β i represents the i-th eigenvector; Get a set of standard orthogonal bases η1,η2,...,η n , with each standard orthogonal basis as a column to form the matrix P: P=(η1,η2,...,η n ) The matrix P similarly diagonalizes the matrix M, and the product matrix P -1 The main diagonal elements of MP are the eigenvalues of the matrix M: The P obtained by the above method is an orthogonal matrix, so P -1 =P T ; Let y i =P T (x i -μ), i=1,2,...,m, calculate {y1,y2,...y m }, the sample mean is zero; Compute probability density functions for continuous attributes: Among them, x i represents the i-th attribute of sample x, μ c,i represents the sample mean of the c-th class sample on the i-th attribute, Represents the sum and variance of the values of the c-th class sample on the i-th attribute; in, It represents the variance of the value of the c-th sample on the i-th attribute after orthogonal transformation; y i =(y i1 ,y i2 ,...,y in ) T The components yij of are independent of each other, and the joint density function is expressed as: Based on the Bayesian decision criterion of minimizing the classification error rate, the improved naive Bayes classifier is expressed as:
3. The low-carbon park simulation planning method based on Bayesian algorithm as claimed in claim 2, characterized in that: The establishment of the city-level network planning model includes using an economic objective function: Among them, F inv represents the investment cost, F opr represents the operating cost, represents the set of substations to be planned, represents the set of power lines to be planned, A collection of pressure regulating stations to be planned, represents the set of gas storage facilities to be planned, Ω d represents the set of typical days, Ω t represents the set of typical time periods, Ω b represents the collection of power loads, Ω n represents the set of gas loads, Ω e represents the set of nodes interconnected with the external power system, Ω g Represents a collection of nodes interconnected with the external gas network. s represents the capital recovery factor of the substation, RF l The capital recovery factor of the power line, RF w Indicates the capital recovery factor of the voltage regulating station, RF a It represents the capital recovery coefficient of gas storage facilities, and the calculation formula is expressed as: Where r is the discount rate, y (·) Indicates the service life of the corresponding equipment. represents the unit capacity investment cost of the substation, represents the unit capacity investment cost of power lines, represents the unit capacity investment cost of the pressure regulating station, represents the unit capacity investment cost of gas storage facilities, represents the cost of purchasing electricity from the external power grid, represents the cost of purchasing gas from the external gas network, represents the load shedding penalty cost of electricity, represents the load shedding penalty cost of gas, T d Indicates the number of scenes represented by a typical day in a year, Represents the historical data of the transmission power of the section interacting with the external power grid, Represents the historical data of gas flow at the section interacting with the external gas network. represents the investment decision variable of the substation, represents the investment decision variable of power lines, represents the investment decision variable of the pressure regulating station, represents the investment decision variable of gas storage facilities, Represents the active power interacting with the external grid, Indicates the gas flow interacting with the external gas grid. Indicates the load shedding amount of the power grid load node, Indicates the load shedding amount of the gas grid load node.
4. The low-carbon park simulation planning method based on Bayesian algorithm as claimed in claim 3 is characterized by: The city-level power grid model includes: in, represents the set of lines with node i as the starting or ending node, represents the set of substations with node i as the head or end node, represents the set of external power grids connected to node i, represents the set of gas power plants connected to node i, represents the set of new planned areas connected to node i, represents the set of factories to be shut down connected to node i, Ω l Represents the set of built lines. represents the active load of the factory to be shut down, X ij represents the reactance of line ij, Represents the power interacting with the external grid, represents the output of the gas-fired power plant, Represents the active power flowing through the line, represents the active power flowing through the substation, represents the load of the newly planned area, represents the load of node i, Indicates whether the factory is shut down. represents the phase angle of node i.
5. The low-carbon park simulation planning method based on Bayesian algorithm as claimed in claim 4, characterized in that: The city-level gas network model includes modeling using a second-order cone-convex relaxation form of a steady-state energy flow model; The energy balance constraint of node m is expressed as: The Weymouth equation for a pipe is expressed as: The operating equation of a gas-fired power plant is expressed as: The equilibrium equation corresponding to the energy storage state is expressed as: The gas storage facility remains in the same state at the beginning and end of each typical day: in, represents the set of pipelines with node m as the first or last node, represents the set of voltage regulating stations with node m as the head or end node, represents the set of gas storage facilities connected to node m, represents the set of external gas networks connected to node m, represents the set of gas power plants connected to node m, represents the set of new planned areas connected to node m, represents the set of factories to be shut down connected to node m, Ω p Represents a collection of gas pipelines, represents the gas load of the plant to be shut down, W mn The Weymouth equation coefficient for the pipe, T m Indicates the energy conversion efficiency of the gas generator set. Indicates the flow rate of gas injected into the system by the gas storage facility. Represents the interaction flow with the external gas network, Indicates the gas flow rate of the pipeline, Indicates the gas flow rate of the pressure regulating station. represents the gas flow rate of the gas power plant, represents the gas load of the newly planned urban area, Indicates whether the factory is shut down. represents the gas load of the node, π m,d,t represents the pressure at the node, Indicates the energy storage status of the gas storage facility.
6. The low-carbon park simulation planning method based on Bayesian algorithm according to claim 5, characterized in that: The establishment of a numerical solution model for hierarchical planning of an electricity-gas-heat smart energy network includes planning a regional energy network on the basis of completing city-level network planning, and coordinating planning of the electricity network and the gas network during planning; Added construction formulas related to regional energy stations: min F inv +F opr (4-98) in, Represents the set of energy stations to be planned, RF es represents the capital recovery factor of a new energy station, represents the unit capacity investment cost of the regional energy station, represents the investment decision variable of the regional energy station, Indicates the active power provided by the energy station to the lower-level power grid; Regional power network planning considers the energy supply between regional energy networks, plans node power flow and load, and introduces continuous variables It represents the proportion of the load in area j supplied by grid node k. The sum of the energy supply proportions of all nodes in each area is 1: in, represents the set of areas connected to the grid node i, represents the set of grid nodes connected to area j, Φ y represents a collection of patches, represents the load of area j, It indicates the proportion of the load in area j supplied by grid node k; Introducing continuous variables into regional and gas network planning It represents the proportion of gas load supplied by node k to area n. The sum of the energy supply proportions of all nodes in each area is 1: in, represents the set of slices connected to the gas node m, represents the set of gas nodes connected to zone n, represents the load of area j, The proportion of the load in zone n supplied by gas node k.
7. The low-carbon park simulation planning method based on Bayesian algorithm according to claim 6 is characterized in that: The solving and obtaining the planning result includes using the commercial solver GUROBI to solve the numerical solution model of the electricity-gas-heat smart energy network hierarchical planning to obtain the planning result.
8. A low-carbon park simulation planning system based on a Bayesian algorithm using the method according to any one of claims 1 to 7, characterized in that: Optimize the algorithm module, optimize the Bayesian algorithm, and realize load forecasting; Establish a city model module, collect electrical data, and establish a city-level network planning model, a city-level power grid model, and a city-level gas network model; Establish a regional model module, establish a numerical solution model for the hierarchical planning of the electricity-gas-heat smart energy network, and obtain the planning results through solution.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.