Power-gas integrated energy system distributed dynamic state estimation method based on long short-term memory neural network load prediction
By applying the combined method of LSTM load prediction and Kalman filtering algorithm in an integrated energy system, the problems of low state estimation accuracy and information barriers in the prior art are solved, and efficient and accurate dynamic state estimation is achieved.
Patent Information
- Application Number
- CN202510215821.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
AI Technical Summary
The prior art is difficult to accurately track the dynamic changes of the integrated energy system, resulting in low accuracy of estimation of states of electrical and gas subsystems and information barriers, so that operating information cannot be shared in real time.
The load prediction method based on long and short-term memory neural network (LSTM) is adopted, combined with extended Kalman filtering (EKF) and Kalman filtering (KF) algorithms, a state space model of the power grid and gas grid is constructed, and the coordinated electrical and gas boundary information is achieved through distributed estimation strategies.
It improves the accuracy of gas network state estimation, can more accurately track the dynamic changes of the integrated energy system, solves the problem of information barriers in electrical and gas subsystems, and realizes efficient state estimation.
Smart Images

Figure CN120146279A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of integrated energy system monitoring, control and operation, and particularly relates to a distributed dynamic state estimation method for an integrated electric and gas energy system based on long short-term memory neural network load forecasting. Background Technique
[0002] With the accelerating transformation of the energy structure, the traditional extensive and single energy utilization mode can no longer meet the requirements of the green and low-carbon development of the economic society, and the traditional power system is gradually transforming into a new power system with a high proportion of new energy. As an important part of the new power system, the integrated energy system (IES) has great potential in aspects such as energy conservation and emission reduction, improving energy utilization efficiency, and promoting the consumption of new energy, and is an important future energy utilization form. Among them, the integrated electric and gas system (IEGS) is one of the most widely used IESs, with the advantages of economic efficiency, flexibility and low carbon.
[0003] State estimation (SE) is the core and cornerstone of the energy management system (EMS) of IEGS, and can provide reliable data for accurately monitoring the real-time operation state of IEGS. The state estimation methods of IEGS are mainly divided into two categories: static state estimation and dynamic state estimation. Among them, static state estimation is mainly based on the weighted least squares algorithm, and uses the measurement data of the current time section to estimate the system state. Its advantages are simple principle and good convergence, but it cannot accurately track the dynamic changes of the system. Dynamic state estimation is based on the Kalman Filter (KF) algorithm, which can not only estimate the operation state of the current section of the system, but also predict the state of the system at the next moment. Compared with the power system, the dynamic response process of the natural gas system is slow. If a steady-state model is used, the operation state of the natural gas system cannot be accurately tracked, resulting in a large estimation error. In addition, the power system and the natural gas system belong to different management entities, and the operation information inside the system cannot be shared in real time, resulting in an information barrier.
[0004] In view of this, the present invention proposes a distributed dynamic state estimation method for an integrated electric and gas energy system based on long short-term memory neural network load forecasting. The present invention first establishes a state space model of the power grid, then constructs a state space model of the gas network based on the dynamic model of the gas network, and uses the Kalman filter algorithm as a framework to perform state estimation of the electric and gas subsystems. In addition, the LSTM load forecasting technology is used to provide flow forecasting information for the gas network prediction step. Finally, a distributed estimation strategy is adopted to realize the coordination of the electric and gas boundary information. Summary of the Invention
[0005] Object of the Invention. The object of the present invention is to accurately track the dynamic change process of IEGS, improve the accuracy of gas network state estimation, and solve the information barrier problem between the electric and gas subsystems. The present invention proposes a distributed dynamic state estimation method for an electric-gas integrated energy system based on long short-term memory neural network load prediction, which can efficiently and accurately solve the dynamic state estimation problem of IEGS.
[0006] Technical Solution. To achieve the above object, the present invention provides a distributed dynamic state estimation method for an electric-gas integrated energy system based on long short-term memory neural network load prediction, and the method includes the following steps:
[0007] Step 1: Obtain the operation parameter information of the power grid, gas network, and electric-gas coupling components in the electric-gas interconnected integrated energy system, and perform initialization;
[0008] Step 2: Based on the two-parameter exponential smoothing method, construct the state space model of the power grid, based on the finite difference model, construct the state space model of the gas network, and then construct the mathematical model of the electric-gas coupling components, and use this as the electric-gas boundary coupling constraint;
[0009] Step 3: Utilize the load curve in the gas network historical database, and based on the long short-term memory neural network LSTM, construct a single-feature load prediction model for the gas network. Use the load data at historical moments as the input and the load flow at the current moment as the output to offline train the LSTM neural network to obtain the gas network load prediction model;
[0010] Step 4: In the online estimation stage, based on the state space models of the power grid and gas network constructed in Step 2, respectively use the extended Kalman filter algorithm EKF and the Kalman filter algorithm KF to perform state estimation on the power grid and gas network, and use the gas network load prediction model trained in Step 3 to predict the load flow of the gas network in real time, and provide flow prediction information for the gas network prediction step; when the power grid measurement is updated, execute the power grid EKF filtering step, and when the gas network measurement is updated, execute the gas network KF filtering step;
[0011] Step 5: When the timestamps of the power grid and gas network are consistent, after completing the filtering steps of the power grid and gas network, perform electric-gas boundary information interaction, and determine whether the electric-gas boundary coupling constraint is satisfied. If not, update the intermediate variables of the power grid and gas network respectively, correct the filtering steps of the power grid and gas network, and then re-perform the coupling constraint determination until the boundary convergence condition is satisfied, and output the electric-gas collaborative state estimation result;
[0012] Step 6: Determine whether the current moment exceeds the preset duration. If so, end the loop; otherwise, return to Step 4 to continue the electric-gas distributed state estimation.
[0013] Further, in Step 1, the information on the power grid, gas grid, and power-gas coupling components in the integrated electricity-gas energy system obtained is specifically as follows: The power grid operation parameter information includes the power grid load factor and load curve, power line parameters, generator output information, the execution period of the power grid state estimation, as well as the power grid measurement configuration information and measurement errors. The gas grid operation parameters include the gas grid load factor and load curve, natural gas pipeline parameters, average pipeline flow velocity, compressor branch parameters, gas source information, the execution period of the gas grid state estimation, the time and space differential step sizes of the gas grid, as well as the gas grid measurement configuration information and measurement errors. The power-gas coupling component information includes the parameters of gas turbines and power-to-gas devices and their energy conversion efficiencies.
[0014] Further, the model in Step 2 is as follows:
[0015] (1) Power grid state space model based on Holt two-parameter exponential smoothing method
[0016] The state space model of the power grid is represented by the state equation and the measurement equation as:
[0017]
[0018] In the formula, and respectively represent the state vector and measurement vector of the power grid at time t. The state vector of the power grid includes the amplitude and phase angle of the node voltage, and the measurement vector of the power grid includes the node voltage amplitude, active and reactive powers at the beginning and end of the branch, and active and reactive injection powers at the node; f e (·) and h e (·) respectively represent the state transition function and measurement function of the power grid, both of which are non-linear functions; and respectively represent the process noise vector and measurement noise vector of the power grid. It is assumed that they are independent Gaussian white noises, which are respectively expressed as where, and respectively represent the process noise covariance matrix and measurement noise covariance matrix of the power grid;
[0019] Applying the Holt two-parameter exponential smoothing method to construct the state equation of the power grid, let and respectively represent the predicted value and estimated value of the power grid state quantity at time t. Then, according to the Holt two-parameter exponential smoothing method, the predicted value of the power grid state quantity at time t + 1 is:
[0020]
[0021] In the formula, represents the predicted value of the power grid state quantity at time t + 1; a t and bt respectively represent the horizontal component and the tilt component at time t; α and β are a pair of smoothing parameters, and their values are between 0 and 1;
[0022] The predicted value of the power grid state quantity at time t + 1 is obtained by linearizing the nonlinear power grid state equation as follows:
[0023]
[0024] In the formula, F e,t represents the state transition matrix of the power grid, represents the control variable matrix of the power grid;
[0025] According to the above formula, the specific expressions of F e,t and are as follows:
[0026]
[0027] In the formula, I represents the identity matrix, and its dimension is the number of power grid state quantities;
[0028] To sum up, the state space model of the power grid is constructed as follows:
[0029]
[0030] (2) Gas network state space model based on finite difference model
[0031] 1) Natural gas dynamic equation
[0032] The dynamic characteristics of one-dimensional isothermal flow of natural gas in a pipeline are described by partial differential equations, namely the continuity equation and the momentum conservation equation:
[0033]
[0034] In the formula, t and x respectively represent the time and space variables; p represents the gas pressure; M represents the pipeline mass flow rate; c represents the gas sound speed; represents the average gas flow velocity; λ represents the friction coefficient of the natural gas pipeline; D and S respectively represent the internal diameter and the cross-sectional area of the natural gas pipeline;
[0035] 2) Finite difference model
[0036] The finite difference method is used to transform the partial differential equation group into a set of difference equations for solution, and the Lax-Wendroff difference method is used to approximate the above partial differential equation group to obtain the following set of linear algebraic equations:
[0037]
[0038] where $\Delta x$ and $\Delta t$ represent the spatial and temporal difference step sizes respectively; the subscript $i$ represents the spatial position index, and the subscript $j$ represents the time point index; $p$ i,j and $M$ i,j represent the nodal pressure and mass flow rate at position $i$ at time $j$ respectively;
[0039] The above differential equation is transformed into the following matrix form:
[0040]
[0041] where $A$ 1 -$A$ 5 are all constant coefficients, and their expressions are as follows:
[0042]
[0043] 3) State - space modeling of gas network based on finite - difference model
[0044] Let the total number of nodes in the natural gas system be $N$ and the number of branches be $b$. Then the gas network state variables include nodal pressure, sectional nodal pressure, and the flow rates at the beginning and end of sectional pipeline branches, that is
[0045]
[0046] where represents the state variables of the gas network at time $t$, and the dimension of the state variables is $N + 2b$; $p$ t represents the nodal pressure and sectional nodal pressure at time $t$, $M$ t represents the flow rates at the beginning and end of the sectional pipeline at time $t$; represents the pressure of node $i$ at time $t$; and represent the mass flow rates at the beginning and end of the $l$-th sectional pipeline branch at time $t$ respectively; and represent the $N$-dimensional and $2b$-dimensional vector spaces respectively;
[0047] According to the differential equation in matrix form, the relationship between ($p$ t+1 , $M$ t+1 ) and ($p$ t , $M$ t ) is as follows
[0048]
[0049] where $J$ 1 and $J$ 2 represent the state - transition coefficient matrices, and the matrix elements are composed of $A$ 1 -$A$ 5 ;
[0050] In addition to considering the above difference equation constraints, the boundary conditions of the gas network are also considered. The following three types of nodes are considered: ① N S gas source nodes; ② N L load nodes; ③ N v virtual nodes, where the pressure of the gas source nodes is constant, the flow rate of the load nodes is known, and the mass flow rates on both sides of the virtual nodes are equal. The matrix form of the boundary conditions of the gas network is as follows:
[0051]
[0052] where, J 3 is a constant coefficient matrix, and the matrix elements are composed of 0, -1, and 1; C is a control vector;
[0053] Combining the difference equation constraints and the boundary condition constraints, the state equation of the gas network is constructed as follows:
[0054]
[0055] In the formula, 0 1 and 0 2 are zero matrices, and their dimensions are respectively Denote
[0056]
[0057] Then the above equation is briefly recorded as:
[0058]
[0059] Therefore, the state equation of the gas network is expressed as follows:
[0060]
[0061] where, represents the state transition matrix of the gas network, which is a constant coefficient matrix, represents the gas network control variable matrix; J g1 and J g2 are constant coefficient matrices; is the control vector of the gas network at time t + 1;
[0062] 4) Gas network measurement equation
[0063] The gas network measurement quantities include node pressure and the mass flow rates at the beginning and end of the pipeline branch. The gas network measurement equation is as follows:
[0064]
[0065] In the formula, represents the measurement quantity of the gas network at time t + 1; H g represents the gas network constant coefficient measurement matrix, and the matrix elements are composed of 0, -1, and 1;
[0066] 5) Gas network state space model
[0067] Based on the established gas network state equation and gas network measurement equation, the state space model of the gas network is constructed as follows:
[0068]
[0069] In the formula, and respectively represent the process noise vector and measurement noise vector of the gas network. Assuming they are independent Gaussian white noises, they are respectively expressed as where, and respectively represent the process noise covariance matrix and measurement noise covariance matrix of the gas network;
[0070] (3) Electric-gas coupling element model
[0071] Gas turbines GT and power-to-gas P2G devices are commonly used electric-gas coupling elements. Their corresponding mathematical models are constructed respectively below;
[0072] 1) GT model
[0073] The relationship between the mass flow rate of natural gas consumed by GT and the electric power generated is:
[0074] M GT =η GT P GT
[0075] In the formula, M GT represents the mass flow rate of natural gas consumed; P GT represents the electric power injected into the power system; η GT represents the energy conversion efficiency of GT;
[0076] 2) P2G model
[0077] The relationship between the electric power consumed by P2G and the mass flow rate of natural gas generated is:
[0078] M P2G =η P2G P P2G
[0079] In the formula, M P2G represents the natural gas flow rate injected into the natural gas system by the P2G device; P P2G represents the electric power consumed by the P2G device; η P2G represents the energy conversion efficiency of the P2G device.
[0080] Further, step 3 includes the following: The gas network load prediction based on the LSTM neural network includes two stages: offline training and online application.
[0081] (1) Offline training
[0082] In the offline training stage, only the natural gas load flow data in the gas network historical database is used to construct the training samples of the LSTM neural network; considering that there are 96 sampling points in a day in the gas network, the load data of the previous 96 points before the current section is used as the input, and the load data of the current section is used as the output to train the LSTM neural network.
[0083] (2) Online application
[0084] In the online application stage, the load flow of the previous 96 time points before the current section is input into the LSTM neural network trained in the offline stage, and the predicted value of the natural gas load flow of the current section is output, providing flow prediction information for the gas network prediction step.
[0085] Further, in step 4, the extended Kalman filter EKF and the Kalman filter KF are used as the state estimation algorithms for the electrical and gas subsystems respectively;
[0086] (1) The power grid dynamic state estimation based on EKF includes two parts: the prediction step and the filtering step;
[0087] 1) Power grid prediction step
[0088] The prior estimated value of the power grid state quantity at time t and the prior estimated value of the error covariance matrix are calculated as follows:
[0089]
[0090] where F e,t-1 and are the state transition matrix and the control variable matrix of the power grid respectively, predicted by the Holt two-parameter exponential smoothing method, and the superscript T represents the matrix transpose; and are the posterior estimated value of the power grid state quantity and the posterior estimated value of the error covariance matrix at time t-1 respectively; is the process noise covariance matrix of the power grid;
[0091] 2) Power grid filtering step
[0092] After the power grid measurement update, the power grid filtering step is executed to calculate the posterior estimated values of the power grid state quantity and the error covariance matrix at time t, and the calculation formulas are as follows:
[0093]
[0094] In the formula, and respectively represent the posterior estimation values of the power grid state variables and the error covariance matrix at time t; and are intermediate variables of the power grid, which are iteratively updated in the subsequent distributed estimation algorithm, and their expressions are as follows:
[0095]
[0096] In the formula, and respectively represent the Jacobian matrix of the power grid measurement function and the measurement noise covariance matrix at time t; is the measured value of the power grid at time t; is the predicted measurement value of the power grid at time t obtained based on the prior estimation value of the state variables;
[0097] (2) The gas network state estimation based on KF includes two parts: the prediction step and the filtering step;
[0098] 1) Gas network prediction step
[0099] The prior estimation value of the gas network state variables at time t and the prior estimation value of the error covariance matrix are calculated as follows:
[0100]
[0101] In the formula, F g and are respectively the state transition matrix and the control variable matrix of the gas network, where F g is a constant coefficient matrix; and are respectively the posterior estimation value of the gas network state variables and the posterior estimation value of the error covariance matrix at time t-1; is the process noise covariance matrix of the gas network;
[0102] 2) Gas network filtering step
[0103] After the gas network measurement update, based on the gas network intermediate variables and calculate the posterior estimation value of the gas network state variables and the posterior estimation value of the error covariance matrix The calculation formulas are as follows:
[0104]
[0105] Among them, the analytical expressions of the intermediate variables and are as follows:
[0106]
[0107] In the formula, H g represents the measurement matrix of the gas network, which is a constant coefficient matrix; represents the measurement noise covariance matrix of the gas network at time t; is the measured value of the gas network at time t; and are the prior estimated values of the state quantity and the estimated error covariance matrix of the gas network at time t, respectively.
[0108] Furthermore, in step 5, after completing the filtering steps of the power grid and the gas network respectively, the power-gas boundary information interaction is carried out. The boundary information for interaction includes the nodal injection power, nodal injection flow rate corresponding to the coupling element, and their estimated error covariance matrices;
[0109] Among them, the injected active power and the nodal injection flow rate are respectively obtained from the posterior estimated value of the power grid state quantity and the posterior estimated value of the gas network state quantity, and the calculation formulas are as follows:
[0110]
[0111] In the formula, h ec (·) is the active power injection equation of the power grid coupling node, represents the estimated value of the voltage amplitude of the coupling node m, n ∈ m represents the nodes connected to the coupling node m, represents the estimated value of the voltage amplitude of the nodes connected to the coupling node, G mn and B mn respectively represent the real part and the imaginary part of the element in the m-th row and the n-th column of the nodal admittance matrix, represents the estimated value of the voltage phase angle difference between both ends of the branch mn, where, and can both be obtained from ; H gc is the constant coefficient measurement equation corresponding to the injection flow rate of the gas network coupling node, and the matrix elements are composed of 0, -1, and 1;
[0112] The estimated error covariance matrices and corresponding to the injected active power and the injection flow rate of the coupling node are calculated as follows:
[0113]
[0114] In the formula, the superscripts t and h respectively represent the time and the boundary iteration times; Denote the error covariance matrix of the active power injected by the power grid coupling element; Denote the error covariance matrix of the injected flow rate at the gas network coupling node; Denote the Jacobian matrix corresponding to the active power injected at the power grid coupling node during the (h - 1)-th iteration process; H g,coup Denote the constant coefficient measurement matrix corresponding to the injected flow rate at the gas network coupling node, which remains unchanged during the iteration process; and Denote the posterior estimated values of the error covariance matrices of the power grid and gas network state variables respectively after the completion of the (h - 1)-th iteration;
[0115] According to the obtained active power injection, injection mass flow rate of the boundary coupling node and their corresponding error covariance matrices above, update the intermediate variables of the power grid and gas network respectively, so as to correct the filtering steps of the power grid and gas network respectively. The specific interaction process is as follows:
[0116] (1) Power grid filtering step correction
[0117] The posterior estimated value of the power grid state variable and the posterior estimated value of the error covariance matrix Are iteratively updated in the following manner:
[0118]
[0119] Wherein, and Are the intermediate variables of the power grid without boundary information interaction; and Are the intermediate variables of the power grid during the h-th iteration process; and Are the error covariance matrix information and injected flow rate information transmitted to the power grid at time t respectively; η is a diagonal matrix composed of the electro-gas coupling element conversion coefficients; Is the predicted value of the active power injection at the power grid coupling node; Denote the estimated value of the injected flow rate at the coupling node when the (h - 1)-th iteration is completed;
[0120] (2) Gas network filtering step correction
[0121] The posterior estimated value of the gas network state variable and the posterior estimated value of the error covariance matrix Are iteratively updated in the following manner:
[0122]
[0123] Wherein, and Are the intermediate variables of the gas network without boundary information interaction; and is the intermediate variable of the gas network during the h-th iteration process; and are the error covariance matrix information and active power injection power information transmitted to the gas network at time t, respectively; represents the estimated value of the active power injection at the coupled node when the (h - 1)-th iteration is completed;
[0124] The above boundary information interaction process continues until the electrical-gas coupling constraint is satisfied. The electrical-gas coupling constraint criterion is as follows:
[0125]
[0126] where ε is the boundary convergence threshold.
[0127] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0128] The present invention uses a long short-term memory neural network to predict the load flow of the gas network. Compared with the traditional time series-based load prediction algorithm, it has higher prediction accuracy and can provide high-precision flow prediction information for the prediction step of the gas network. On the basis of separately performing dynamic estimation of the power grid by EKF and dynamic estimation of the gas network by KF, a distributed estimation strategy is used to interact boundary information, and while protecting the information privacy of the electrical and gas subsystems, a globally consistent solution with boundary information coordination is obtained. Description of the Drawings
[0129] Figure 1 is the algorithm flow chart of the present invention.
[0130] Figure 2 is the topology diagram of the integrated electrical-gas energy system.
[0131] Figure 3 is the schematic diagram of the basic unit of the LSTM neural network.
[0132] Figure 4 is the prediction result of the gas network load flow based on LSTM.
[0133] Figure 5 is the prediction result of the gas network load flow based on the Holt two-parameter exponential smoothing method.
[0134] Figure 6 is the calculation framework of the electrical-gas distributed state estimation.
[0135] Figure 7 is the estimated result of the reactive power at the head of branch 10 of the power grid.
[0136] Figure 8 is the estimated result of the flow at the head of pipeline 7 of the gas network. Detailed Implementation Manner
[0137] The technical content of the present invention will be further elaborated below in conjunction with the accompanying drawings and specific embodiments.
[0138] The present invention uses an IEGS composed of a modified Belgian 20-node natural gas system and an IEEE 24-node power system as a test case. The natural gas system and the power system are bidirectionally coupled through 2 GTs and 2 P2Gs. The system topology is as Figure 2 shown. It is assumed that the compressor is gas-driven and adopts a control mode with a constant compression ratio. The measurement configuration of the gas network (NGS) is as follows: node pressure measurement, flow measurement at the beginning and end of pipeline branches, and flow measurement of compressor branches; the measurement configuration of the power grid (EPS) is as follows: node voltage amplitude measurement, active and reactive power measurement at the beginning of branches, and active and reactive power injection measurement at nodes.
[0139] As Figure 1 shown, the present invention proposes a distributed dynamic state estimation method for an integrated electricity-gas energy system based on long short-term memory neural network load prediction. The method includes the following steps:
[0140] Step 1: Obtain the operation parameter information of the power grid, gas network, and electricity-gas coupling components in the integrated electricity-gas energy system, and perform initialization;
[0141] Step 2: Construct a state space model of the power grid based on the two-parameter exponential smoothing method, construct a state space model of the gas network based on the finite difference model, and then construct a mathematical model of the electricity-gas coupling components, which is used as the electricity-gas boundary coupling constraint;
[0142] Step 3: Use the load curve in the historical database of the gas network to construct a single-feature load prediction model of the gas network based on the long short-term memory neural network LSTM. Use the load data at historical moments as input and the load flow at the current moment as output to offline train the LSTM neural network to obtain the gas network load prediction model;
[0143] Step 4: In the online estimation stage, based on the state space models of the power grid and gas network constructed in Step 2, use the extended Kalman filter algorithm EKF and the Kalman filter algorithm KF to perform state estimation on the power grid and gas network respectively, and use the gas network load prediction model trained in Step 3 to predict the load flow of the gas network in real time, providing flow prediction information for the gas network prediction step; when the power grid measurement is updated, execute the power grid EKF filtering step, and when the gas network measurement is updated, execute the gas network KF filtering step;
[0144] Step 5: When the timestamps of the power grid and the gas grid are consistent, after completing the filtering steps for the power grid and the gas grid, perform the interaction of electrical and gas boundary information, and determine whether the electrical-gas boundary coupling constraints are satisfied. If not, update the intermediate variables of the power grid and the gas grid respectively, correct the filtering steps of the power grid and the gas grid, and then re-perform the coupling constraint determination until the boundary convergence condition is satisfied, and output the electrical-gas collaborative state estimation result;
[0145] Step 6: Determine whether the current time exceeds the preset duration. If so, end the loop; otherwise, return to Step 4 to continue the distributed state estimation of electricity and gas.
[0146] Furthermore, in Step 1, the information of the power grid, gas grid, and electrical-gas coupling components in the electrical-gas interconnected integrated energy system obtained is specifically as follows: The power grid operation parameter information includes the power grid load factor and load curve, power line parameters, generator output information, the execution period of the power grid state estimation, and the power grid measurement configuration information and measurement errors. The gas grid operation parameters include the gas grid load factor and load curve, natural gas pipeline parameters, average pipeline flow velocity, compressor branch parameters, gas source information, the execution period of the gas grid state estimation, the gas grid time and space difference steps, and the gas grid measurement configuration information and measurement errors. The electrical-gas coupling component information includes the parameters of gas turbines and power-to-gas devices and their energy conversion efficiencies.
[0147] Furthermore, the model in Step 2 is as follows:
[0148] (1) Power grid state space model based on Holt two-parameter exponential smoothing method
[0149] The state space model of the power grid is represented by the state equation and the measurement equation as:
[0150]
[0151] In the formula, and respectively represent the state vector and measurement vector of the power grid at time t. The state vector of the power grid includes the amplitude and phase angle of the node voltage, and the measurement vector of the power grid includes the node voltage amplitude, active and reactive powers at the beginning and end of the branch, and active and reactive injection powers at the node; f e (·) and h e (·) respectively represent the state transition function and measurement function of the power grid, both of which are non-linear functions; and respectively represent the process noise vector and measurement noise vector of the power grid. It is assumed that they are independent Gaussian white noises, and are respectively expressed as Among them, and respectively represent the process noise covariance matrix and measurement noise covariance matrix of the power grid;
[0152] The Holt two-parameter exponential smoothing method is used to construct the state equation of the power grid. Let and represent the predicted value and the estimated value of the power grid state quantity at time t respectively. Then, according to the Holt two-parameter exponential smoothing method, the predicted value of the power grid state quantity at time t+1 is:
[0153]
[0154] In the formula, represents the predicted value of the power grid state quantity at time t+1; a t and b t represent the horizontal component and the tilt component at time t respectively; α and β are a pair of smoothing parameters, and their values are between 0 and 1;
[0155] The non-linear power grid state equation is linearized to obtain the predicted value of the power grid state quantity at time t+1 as:
[0156]
[0157] In the formula, F e,t represents the state transition matrix of the power grid, represents the control variable matrix of the power grid;
[0158] According to the above formula, the specific expressions of F e,t and are as follows:
[0159]
[0160] In the formula, I represents the identity matrix, and its dimension is the number of power grid state quantities;
[0161] In summary, the state space model of the power grid is constructed as follows:
[0162]
[0163] (2) Gas network state space model based on finite difference model
[0164] 1) Natural gas dynamic equation
[0165] The dynamic characteristics of one-dimensional isothermal flow of natural gas in pipelines are described by partial differential equations, namely the continuity equation and the momentum conservation equation:
[0166]
[0167] In the formula, t and x represent the time and space variables respectively; p represents the gas pressure; M represents the pipeline mass flow rate; c represents the gas sound speed; $v$ represents the average gas flow velocity; $\lambda$ represents the friction coefficient of the natural gas pipeline; $D$ and $S$ respectively represent the internal diameter and cross-sectional area of the natural gas pipeline;
[0168] 2) Finite difference model
[0169] The finite difference method is used to transform the partial differential equations into a set of difference equations for solution. The Lax-Wendroff difference method is used to approximate the above partial differential equations, and a set of linear algebraic equations is obtained as follows:
[0170]
[0171] where $\Delta x$ and $\Delta t$ respectively represent the spatial and temporal difference step sizes; the subscript $i$ represents the spatial position index, and the subscript $j$ represents the time point index; $p$ i,j and $M$ i,j respectively represent the node pressure and mass flow rate at position $i$ at time $j$;
[0172] The above difference equations are transformed into the following matrix form:
[0173]
[0174] where $A$ 1 $-A$ 5 are all constant coefficients, and their expressions are as follows:
[0175]
[0176] 3) Gas network state space modeling based on the finite difference model
[0177] Let the total number of nodes in the natural gas system be $N$ and the number of branches be $b$. Then the gas network state variables include node pressure, sectional node pressure, and the flow rates at the beginning and end of the sectional pipeline branches, that is
[0178]
[0179] where represents the state variables of the gas network at time $t$, and the dimension of the state variables is $N + 2b$; $p$ t represents the node pressure and sectional node pressure at time $t$, and $M$ t represents the flow rates at the beginning and end of the sectional pipeline at time $t$; represents the pressure of node $i$ at time $t$; and respectively represent the mass flow rates at the beginning and end of the $l$-th sectional pipeline branch at time $t$; and respectively represent the $N$-dimensional and $2b$-dimensional vector spaces;
[0180] According to the difference equations in matrix form, $(p$ t+1,M t+1 ), and (p t ,M t The relationship with () is as follows
[0181]
[0182] In the formula, J 1 and J 2 represent the state transition coefficient matrix, and the matrix elements are composed of A 1 -A 5 ;
[0183] In addition to considering the above differential equation constraints, the gas network boundary condition constraints are also considered; the following three types of nodes are considered: ① N S gas source nodes; ② N L load nodes; ③ N v virtual nodes, where the pressure of the gas source nodes is constant, the flow rate of the load nodes is known, and the mass flow rates on both sides of the virtual nodes are equal; the matrix form of the gas network boundary conditions is as follows:
[0184]
[0185] Among them, J 3 is a constant coefficient matrix, and the matrix elements are composed of 0, -1, 1; C is the control vector;
[0186] Combining the differential equation constraints and the boundary condition constraints, the state equation of the gas network is constructed as follows:
[0187]
[0188] In the formula, 0 1 and 0 2 are zero matrices, and their dimensions are respectively Denote
[0189]
[0190] Then the above equation is briefly recorded as:
[0191]
[0192] Therefore, the state equation of the gas network is expressed as follows:
[0193]
[0194] Among them, represents the state transition matrix of the gas network, which is a constant coefficient matrix, represents the gas network control variable matrix; J g1 and J g2 are constant coefficient matrices; is the control vector of the gas network at time t + 1;
[0195] 4) Gas network measurement equation
[0196] The gas network measurement quantities include the node pressure and the mass flow rates at the beginning and end of the pipeline branch. The gas network measurement equation is as follows:
[0197]
[0198] In the formula, represents the measurement quantity at time t + 1 of the gas network; H g represents the constant coefficient measurement matrix of the gas network, and the matrix elements are composed of 0, -1, and 1;
[0199] 5) Gas network state space model
[0200] According to the established gas network state equation and gas network measurement equation above, the state space model of the gas network is constructed as follows:
[0201]
[0202] In the formula, and represent the process noise vector and the measurement noise vector of the gas network respectively. Assuming they are independent Gaussian white noises, they are respectively expressed as Among them, and represent the process noise covariance matrix and the measurement noise covariance matrix of the gas network respectively;
[0203] (3) Electrical-gas coupling element model
[0204] Gas turbines GT and power-to-gas P2G devices are commonly used electrical-gas coupling elements. Their corresponding mathematical models are constructed below respectively;
[0205] 1) GT model
[0206] The relationship between the mass flow rate of natural gas consumed by GT and the electric power generated is:
[0207] M GT =η GT P GT
[0208] In the formula, M GT represents the mass flow rate of natural gas consumed; P GT represents the electric power injected into the power system; η GT represents the energy conversion efficiency of GT;
[0209] 2) P2G model
[0210] The relationship between the electric power consumed by P2G and the mass flow rate of natural gas generated is:
[0211] M P2G = η P2G P P2G
[0212] In the formula, M P2G represents the natural gas flow rate injected into the natural gas system by the P2G device; P P2G represents the electric power consumed by the P2G device; η P2G represents the energy conversion efficiency of the P2G device.
[0213] Furthermore, step 3 includes the following contents: The gas network load prediction based on the LSTM neural network includes two stages: offline training and online application.
[0214] (1) Offline training
[0215] In the offline training stage, only the natural gas load flow data in the gas network historical database is used to construct the training samples of the LSTM neural network; considering that there are 96 sampling points in a day in the gas network, the load data of the previous 96 points before the current section is used as the input, and the load data of the current section is used as the output to train the LSTM neural network;
[0216] (2) Online application
[0217] In the online application stage, the load flow of the previous 96 time points before the current section is input into the LSTM neural network trained in the offline stage, and the predicted value of the natural gas load flow of the current section is output to provide flow prediction information for the gas network prediction step.
[0218] Furthermore, in step 4, the extended Kalman filter EKF and the Kalman filter KF are used as the state estimation algorithms for the electric and gas subsystems respectively;
[0219] (1) The power grid dynamic state estimation based on EKF includes two parts: the prediction step and the filtering step;
[0220] 1) Power grid prediction step
[0221] The prior estimated value of the power grid state quantity at time t and the prior estimated value of the error covariance matrix are calculated as follows:
[0222]
[0223] In the formula, F e,t-1 and are the state transition matrix and the control variable matrix of the power grid respectively, which are predicted by the Holt two-parameter exponential smoothing method, and the superscript T represents the matrix transpose; and They are the posteriori estimated values of the power grid state variables and the posteriori estimated values of the error covariance matrix at time t-1, respectively; is the process noise covariance matrix of the power grid;
[0224] 2) Power grid filtering step
[0225] After the power grid measurement update, the power grid filtering step is executed to calculate the posteriori estimated values of the power grid state variables and the error covariance matrix at time t. The calculation formulas are as follows:
[0226]
[0227] In the formula, and represent the posteriori estimated values of the power grid state variables and the error covariance matrix at time t, respectively; and are intermediate variables of the power grid and are iteratively updated in the subsequent distributed estimation algorithm. Their expressions are as follows:
[0228]
[0229] In the formula, and represent the Jacobian matrix of the power grid measurement function and the measurement noise covariance matrix at time t, respectively; is the measured value of the power grid at time t; is the predicted measured value of the power grid at time t obtained based on the prior estimated value of the state variables;
[0230] (2) The gas network state estimation based on KF includes two parts: the prediction step and the filtering step;
[0231] 1) Gas network prediction step
[0232] The prior estimated value of the gas network state variables at time t and the prior estimated value of the error covariance matrix are calculated as follows:
[0233]
[0234] In the formula, F g and are the state transition matrix and the control variable matrix of the gas network, respectively. Among them, F g is a constant coefficient matrix; and are the posteriori estimated values of the gas network state variables and the posteriori estimated values of the error covariance matrix at time t-1, respectively; is the process noise covariance matrix of the gas network;
[0235] 2) Gas network filtering step
[0236] After the gas network measurement is updated, based on the intermediate variables of the gas network and the posterior estimation values of the gas network state variables and the posterior estimation values of the error covariance matrix are calculated as follows:
[0237]
[0238] Among them, the intermediate variables and have the following analytical expressions:
[0239]
[0240] In the formula, H g represents the measurement matrix of the gas network and is a constant coefficient matrix; represents the measurement noise covariance matrix of the gas network at time t; is the measurement of the gas network at time t; and are the prior estimation values of the gas network state variables and the estimation error covariance matrix at time t, respectively.
[0241] Furthermore, in step 5, after completing the filtering steps of the power grid and the gas network respectively, the power-gas boundary information is exchanged. The exchanged boundary information includes the node injection power, node injection flow rate corresponding to the coupling element, and their estimation error covariance matrix;
[0242] Among them, the injected active power and the node injection flow rate of the node corresponding to the coupling element are obtained from the posterior estimation values of the power grid state variables and the posterior estimation values of the gas network state variables respectively, and the calculation formulas are as follows:
[0243]
[0244] In the formula, h ec (·) is the active power injection power equation of the power grid coupling node, represents the estimated value of the voltage amplitude of the coupling node m, n ∈ m represents the node connected to the coupling node m, represents the estimated value of the voltage amplitude of the node connected to the coupling node, G mn and B mn represent the real part and the imaginary part of the element in the m-th row and n-th column of the node admittance matrix respectively, represents the estimated value of the voltage phase angle difference between both ends of the branch mn, where, and can both be obtained from ; H gcIt is a constant coefficient measurement equation corresponding to the injection flow rate of the coupling node with the gas network, and the matrix elements are composed of 0, -1, and 1;
[0245] The estimated error covariance matrix corresponding to the active power injection and injection flow rate of the coupling node and The calculation formulas are as follows:
[0246]
[0247] In the formula, the superscripts t and h represent the time and the boundary iteration number respectively; represents the error covariance matrix of the active power injection of the grid coupling element; represents the error covariance matrix of the injection flow rate of the gas network coupling node; represents the Jacobian matrix corresponding to the active power injected by the grid coupling node during the (h - 1)-th iteration process; H g,coup represents the constant coefficient measurement matrix corresponding to the injection flow rate of the gas network coupling node, which remains unchanged during the iteration process; and respectively represent the posterior estimation values of the estimated error covariance matrices of the grid and gas network state variables after the completion of the (h - 1)-th iteration.
[0248] According to the obtained active power injection, injection mass flow rate of the boundary coupling node and their corresponding error covariance matrices, the intermediate variables of the grid and gas network are updated respectively, so as to correct the filtering steps of the grid and gas network respectively. The specific interaction process is as follows:
[0249] (1) Grid filtering step correction
[0250] The posterior estimation value of the grid state variable and the posterior estimation value of the error covariance matrix are iteratively updated in the following manner:
[0251]
[0252] In the formula, and are the grid intermediate variables without boundary information interaction; and are the grid intermediate variables during the h-th iteration process; and are the error covariance matrix information and injection flow rate information transmitted to the grid at time t respectively; η is a diagonal matrix composed of the electro-gas coupling element conversion coefficients; is the predicted value of the active power injection of the grid coupling node; represents the estimated value of the injection flow rate of the coupling node at the end of the (h - 1)-th iteration;
[0253] (2) Posterior Estimation of Gas Network Filtering Step
[0254] Posterior Estimation Value of Gas Network State Variables And Posterior Estimation Value of Error Covariance Matrix Are Iteratively Updated as Follows:
[0255]
[0256] Wherein, And Are Intermediate Variables of the Gas Network Without Boundary Information Interaction; And Are Intermediate Variables of the Gas Network in the h-th Iteration Process; And Are the Error Covariance Matrix Information and Active Power Injection Power Information Transmitted to the Gas Network at Time t, Respectively; Represents the Estimated Value of Active Power Injection at the Coupling Node When the (h - 1)-th Iteration is Completed;
[0257] The Above Boundary Information Interaction Process Continues Until the Electrical-Gas Coupling Constraint is Satisfied. The Electrical-Gas Coupling Constraint Criterion is as Follows:
[0258]
[0259] Wherein, ε is the Boundary Convergence Threshold.
[0260] The Following is the Test of the Method of the Present Invention.
[0261] (1) Load Forecasting Effect Test
[0262] To Verify the Accuracy of the LSTM Load Forecasting Results Used in the Present Invention, the Results of LSTM-Based Load Forecasting are Compared with the Results of Load Forecasting Based on the Holt Two-Parameter Exponential Smoothing Method.
[0263] During the Offline Training Process of the LSTM Neural Network, One Year's Load Data of the Gas Network is Selected as the Training Sample, with 96 Load Sampling Points per Day. Among Them, the First 80% of the Data is Used as the Training Set, 80% - 90% of the Data is Used as the Validation Set, and the Remaining Data is Used as the Test Set. The Gas Network Load Forecasting Results Based on the LSTM Neural Network are as Figure 4 Shown.
[0264] The Holt Two-Parameter Exponential Smoothing Method is a Classical Time-Series Analysis Method, Commonly Used in Short-Term Load Forecasting. It Has a Fast Calculation Speed and is Very Suitable for Online Operations. After Parameter Tuning, the Level Smoothing Parameter is Selected as 0.8, and the Trend Smoothing Parameter is Selected as 0.2. The Gas Network Load Forecasting Results Based on the Holt Two-Parameter Exponential Smoothing Method are as Figure 5 Shown.
[0265] To quantitatively evaluate the accuracy of the gas network load prediction results, three indicators, namely the prediction accuracy R2, the root mean square error RMSE, and the mean absolute percentage error MAPE, are set as shown in the following formula.
[0266]
[0267] In the formula, n is the number of prediction points; and y i are the predicted value and the true value of the load at time i, respectively. Among them, the larger the value of R2 and the smaller the values of RMSE and MAPE, the higher the prediction accuracy. The comparison of the prediction accuracies of different load prediction methods is shown in Table 1 below.
[0268] Table 1 Comparison of prediction accuracies of different load prediction algorithms
[0269]
[0270] It can be seen from Table 1 that the estimation accuracy of the load prediction based on the LSTM neural network is higher than that of the Holt two-parameter exponential smoothing method, and it can provide higher-precision load flow prediction information for the gas network state estimation.
[0271] (2) IEGS distributed dynamic SE based on LSTM load prediction
[0272] Next, the filtering effect of the IEGS distributed dynamic SE based on the LSTM load prediction is tested. The simulation duration is 24h, where the cycle of the power grid is 5 minutes and the sampling cycle of the gas network is 15 minutes. The schematic diagram of the electric-gas distributed state estimation framework is as Figure 6 shown.
[0273] Taking the reactive power at the head of branch 10 of the IEGS power grid and the mass flow rate at the head of branch 7 of the gas network pipeline as examples, the average relative errors of the measured values, estimated values, and true values are combined for analysis. The simulation results are as Figure 7 、 Figure 8 shown. It can be seen from the figure that the method used in the present invention has a good filtering effect.
[0274] The root mean square error (RMSE) is used to quantitatively analyze the effect of IEGS-SE, and its calculation formula is as follows:
[0275]
[0276] In the formula, and x i represent the estimated value and the true value of the state quantity, respectively, and n represents the total number of state quantities.
[0277] To test the IEGS distributed dynamic state estimation results obtained by different load forecasting algorithms, the following two scenarios are set up.
[0278] Case1: IEGS estimation results based on load forecasting by Holt two-parameter exponential smoothing method
[0279] Case2: IEGS estimation results based on load forecasting by LSTM
[0280] The IEGS estimation results obtained under different load forecasting algorithms are shown in Table 2 below.
[0281] Table 2 IEGS estimation results under different load forecasting methods
[0282]
[0283] As can be seen from the above table, since the load forecasting accuracy based on LSTM is higher than that based on Holt two-parameter exponential smoothing method, the gas network estimation accuracy calculated by case2 is higher than that of case1. At the same time, the estimation accuracy of the power grid in case2 is also slightly higher than that of case1.
[0284] The above simulation results verify the effectiveness of the method proposed in the present invention. The present invention uses a long short-term memory neural network to online predict the load flow of the gas network, providing high-precision load flow prediction data for the gas network prediction step, which can improve the gas network dynamic state estimation accuracy; in addition, the distributed estimation strategy adopted by the present invention can protect the information privacy of the power and gas subsystems and has a high online estimation efficiency.
[0285] The specific implementation manners and examples of the present invention are described above, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.
Claims
1. A distributed dynamic state estimation method for electric-gas integrated energy system based on long short-term memory neural network load forecasting, characterized in that: The method comprises the following steps: Step 1: Obtain the operating parameter information of the power grid, gas grid and power-gas coupling elements in the power-gas interconnected integrated energy system and perform initialization; Step 2: construct a state space model of the power grid based on a two-parameter exponential smoothing method, construct a state space model of the gas grid based on a finite difference model, and then construct a mathematical model of the electric-gas coupling element, and use it as an electric-gas boundary coupling constraint; Step 3: Using the load curve in the gas grid historical database, a gas grid single-feature load forecasting model is constructed based on the long short-term memory neural network LSTM. The load data at the historical moment is used as input, and the load flow at the current moment is used as output to train the LSTM neural network offline to obtain the gas grid load forecasting model. Step 4, in the online estimation stage, based on the state space model of the power grid and gas grid constructed in step 2, the extended Kalman filter algorithm EKF and the Kalman filter algorithm KF are used to estimate the state of the power grid and gas grid respectively, and the gas grid load prediction model trained in step 3 is used to predict the load flow of the gas grid in real time, providing flow prediction information for the gas grid prediction step; when the power grid measurement is updated, the power grid EKF filtering step is executed, and when the gas grid measurement is updated, the gas grid KF filtering step is executed; Step 5: When the timestamps of the power grid and the gas grid are consistent, after completing the filtering steps of the power grid and the gas grid, the electricity and gas boundary information are interacted, and it is determined whether the electricity-gas boundary coupling constraint is satisfied. If not, the intermediate variables of the power grid and the gas grid are updated respectively, the filtering steps of the power grid and the gas grid are corrected, and the coupling constraint judgment is performed again until the boundary convergence condition is satisfied, and the electricity-gas collaborative state estimation result is output; Step 6: Determine whether the current time exceeds the preset duration. If yes, end the loop; if no, return to step 4 to continue the electricity and gas distributed state estimation.
2. According to claim 1, a distributed dynamic state estimation method for electric-gas integrated energy system based on long short-term memory neural network load forecasting is characterized in that: In step 1, the information of the power grid, gas grid and power-gas coupling element in the power-gas interconnected integrated energy system is obtained, specifically: the power grid operation parameter information includes the power grid load factor and load curve, power line parameters, generator output information, power grid state estimation execution cycle, and power grid measurement configuration information and measurement error; the gas grid operation parameters include the gas grid load factor and load curve, natural gas pipeline parameters, pipeline average flow rate, compressor branch parameters, gas source information, gas grid state estimation execution cycle, gas grid time and space difference step size, and gas grid measurement configuration information and measurement error; the power-gas coupling element information includes gas turbine and power-to-gas device parameters and their energy conversion efficiency.
3. According to claim 1, a distributed dynamic state estimation method for electric-gas integrated energy system based on long short-term memory neural network load forecasting is characterized in that: The model in step 2 is as follows: (1) Power grid state space model based on Holt two-parameter exponential smoothing method The state space model of the power grid is expressed by the state equation and measurement equation as follows: In the formula, and They represent the state vector and measurement vector of the power grid at time t. The state vector of the power grid includes the amplitude and phase angle of the node voltage. The measurement vector of the power grid includes the node voltage amplitude, the active and reactive power at the beginning and end of the branch, and the node active and reactive injection power. e (·) and h e (·) represent the state transfer function and measurement function of the power grid, both of which are nonlinear functions; and They represent the process noise vector and measurement noise vector of the power grid respectively. Assuming they are independent Gaussian white noises, they are expressed as in, and They represent the process noise covariance matrix and the measurement noise covariance matrix of the power grid respectively; Holt two-parameter exponential smoothing method is used to construct the state equation of the power grid. and They represent the predicted value and estimated value of the power grid state quantity at time t respectively. According to Holt's two-parameter exponential smoothing method, the predicted value of the power grid state quantity at time t+1 is: In the formula, represents the predicted value of the power grid state at time t+1; a t and b t They represent the horizontal component and tilt component at time t respectively; α and β are a pair of smoothing parameters, whose values are between 0 and 1; The predicted value of the power grid state quantity at time t+1 is obtained by linearizing the nonlinear power grid state equation: In the formula, F e,t represents the state transfer matrix of the power grid, represents the control variable matrix of the power grid; According to the above formula, we can get F e,t and The specific expression is as follows: In the formula, I represents the unit matrix, and the dimension is the number of power grid state quantities; In summary, the state space model of the power grid is constructed as follows: (2) Gas network state space model based on finite difference model 1) Natural gas dynamic equation The dynamic characteristics of one-dimensional isothermal flow of natural gas in a pipeline are described by partial differential equations, namely the continuity equation and the momentum conservation equation: In the formula, t and x represent time and space variables respectively; p represents gas pressure; M represents pipeline mass flow rate; c represents gas sound velocity; represents the average gas flow rate; λ represents the friction coefficient of the natural gas pipeline; D and S represent the internal diameter and cross-sectional area of the natural gas pipeline respectively; 2) Finite Difference Model The finite difference method is used to transform the partial differential equations into a set of difference equations for solution. The Lax-Wendroff difference method is used to approximate the above partial differential equations, and the following set of linear algebraic equations is obtained: Where Δx and Δt represent the spatial and temporal difference steps, respectively; subscript i represents the spatial position index, and subscript j represents the time point index; p i,j and M i,j They represent the node pressure and mass flow rate at position i at time j respectively; Convert the above difference equation into the following matrix form: In the formula, A1-A5 are constant coefficients, and their expressions are as follows: 3) Gas network state space modeling based on finite difference model Assuming that the total number of nodes in the natural gas system is N and the number of branches is b, the gas network state variables include node pressure, segmented node pressure, and segmented pipeline branch head and end flow, that is, in, represents the state variable of the gas network at time t, and the dimension of the state variable is N+2b; p t represents the node pressure and segment node pressure at time t, M t It represents the flow rate at the beginning and end of the segmented pipeline at time t; represents the pressure at node i at time t; and They represent the mass flow rates at the head and the end of the lth segmented pipeline branch at time t respectively; and Represent N-dimensional and 2b-dimensional vector spaces respectively; According to the difference equation in matrix form, we get (p t+1 ,M t+1 ) and (p t ,M t ) is as follows Where, J1 and J2 represent the state transfer coefficient matrix, and the matrix elements are composed of A1-A5; In addition to considering the above-mentioned differential equation constraints, the gas network boundary condition constraints are also considered; the following three types of nodes are considered: ①N S Gas source nodes; ②N L load nodes; ③N v virtual nodes, where the pressure of the gas source node is constant, the flow of the load node is known, and the mass flow on both sides of the virtual node is equal; the matrix form of the gas network boundary conditions is as follows: Among them, J3 is a constant coefficient matrix, and the matrix elements are composed of 0, -1, 1; C is the control vector; Combining the difference equation constraints and boundary condition constraints, the state equation of the gas network is constructed as follows: Where 01 and 02 are zero matrices, and their dimensions are remember The above equation can be simplified as: Therefore, the state equation of the gas network is expressed as follows: in, Represents the state transfer matrix of the gas network, which is a constant coefficient matrix. represents the gas network control variable matrix; J g1 and J g2 is a constant coefficient matrix; is the control vector of the gas network at time t+1; 4) Gas network measurement equation Gas network measurement includes node pressure and the mass flow at the beginning and end of the pipeline branch. The gas network measurement equation is as follows: In the formula, Indicates the quantity measurement of the gas network at time t+1; H g It represents the gas network constant quantity measurement matrix, and the matrix elements are composed of 0, -1, 1; 5) Gas network state space model According to the gas network state equation and gas network measurement equation established above, the state space model of the gas network is constructed as follows: In the formula, and They represent the process noise vector and measurement noise vector of the gas network respectively. Assuming they are independent Gaussian white noises, they are expressed as in, and They represent the process noise covariance matrix and measurement noise covariance matrix of the gas network respectively; (3) Electric-pneumatic coupling element model Gas turbine GT and power-to-gas P2G device are commonly used electric-gas coupling elements. The corresponding mathematical models are constructed below. 1) GT model The relationship between the natural gas mass flow rate consumed by GT and the electrical power generated is: M GT =the GT P GT Where M GT Indicates the mass flow rate of natural gas consumed; P GT Represents the electric power injected into the power system; η GT represents the energy conversion efficiency of GT; 2) P2G model The relationship between the electrical power consumed by P2G and the mass flow rate of natural gas produced is: M P2G =the P2G P P2G Where M P2G It indicates the natural gas flow rate injected into the natural gas system by the P2G device; P P2G represents the electrical power consumed by the P2G device; η P2G Represents the energy conversion efficiency of the P2G device.
4. According to claim 1, a distributed dynamic state estimation method for electric-gas integrated energy system based on long short-term memory neural network load forecasting is characterized in that: Step 3 includes the following contents: Gas grid load forecasting based on LSTM neural network includes two stages: offline training and online application. (1) Offline training In the offline training phase, only the natural gas load flow data in the gas network history database is used to construct the training samples of the LSTM neural network. Considering that there are 96 sampling points in the gas network in one day, the load data of the 96 points before the current section is used as input, and the load data of the current section is used as output to train the LSTM neural network. (2) Online Application In the online application stage, the load flow at the 96 time points before the current section is input into the LSTM neural network trained in the offline stage, and the natural gas load flow forecast value of the current section is output to provide flow forecast information for the gas network prediction step.
5. The method for distributed dynamic state estimation of electric-gas integrated energy system based on long short-term memory neural network load forecasting according to claim 1 is characterized in that: In step 4, the extended Kalman filter EKF and the Kalman filter KF are used as the state estimation algorithms of the electrical and pneumatic subsystems respectively; (1) The dynamic state estimation of the power grid based on EKF includes two parts: prediction step and filtering step; 1) Power grid prediction step A priori estimated value of the power grid state at time t and a priori estimates of the error covariance matrix The calculation formula is as follows: In the formula, F e,t-1 and are the state transfer matrix and control variable matrix of the power grid, respectively, which are predicted by Holt's two-parameter exponential smoothing method, and the superscript T indicates the matrix transposition; and are the a posteriori estimates of the power grid state quantity and the a posteriori estimates of the error covariance matrix at time t-1 respectively; is the process noise covariance matrix of the power grid; 2) Grid filtering step After the grid measurement is updated, the grid filtering step is executed to calculate the a posteriori estimates of the grid state quantity and the error covariance matrix at time t. The calculation formula is as follows: In the formula, and They represent the a posteriori estimates of the grid state quantity and the error covariance matrix at time t respectively; and is an intermediate variable of the power grid, which is iteratively updated in the subsequent distributed estimation algorithm. Its expression is as follows: In the formula, and They represent the Jacobian matrix of the power grid measurement function and the measurement noise covariance matrix at time t respectively; is the quantity measurement of the power grid at time t; is the predicted value of the power grid at time t obtained based on the prior estimated value of the state quantity; (2) The KF-based gas grid state estimation includes two parts: prediction step and filtering step; 1) Gas network prediction step A priori estimated value of gas grid state quantity at time t and a priori estimates of the error covariance matrix The calculation formula is as follows: In the formula, F g and are the state transfer matrix and control variable matrix of the gas network, respectively, where F g is a constant coefficient matrix; and are the a posteriori estimates of the gas network state quantity and the a posteriori estimates of the error covariance matrix at time t-1 respectively; is the process noise covariance matrix of the gas network; 2) Gas network filtering step After the gas network measurement is updated, based on the gas network intermediate variables and Calculate the a posteriori estimate of the gas network state and the posterior estimate of the error covariance matrix The calculation formula is as follows: Among them, the intermediate variable and The analytical formula is as follows: In the formula, H g Represents the measurement matrix of the gas network, which is a constant coefficient matrix; represents the gas network measurement noise covariance matrix at time t; is the quantity measurement of the gas network at time t; and are the prior estimates of the gas network state quantity and the estimation error covariance matrix at time t, respectively.
6. The method for distributed dynamic state estimation of electric-gas integrated energy system based on long short-term memory neural network load forecasting according to claim 1 is characterized in that: In step 5, after completing the filtering steps of the power grid and the gas grid, the electric-gas boundary information interaction is performed, and the interactive boundary information includes the node injection power corresponding to the coupling element, the node injection flow and its estimated error covariance matrix; Among them, the injected active power of the node corresponding to the coupling element is and node injection traffic The a posteriori estimates of the power grid state variables are Posterior estimates of the state quantities of the gas network The calculation formula is as follows: In the formula, h ec (·) is the active power injection equation of the grid coupling node, represents the voltage amplitude estimation value of coupling node m, n∈m represents the node connected to coupling node m, Represents the estimated value of the voltage amplitude of the node connected to the coupling node, G mn and B mn denote the real and imaginary parts of the element in the mth row and nth column of the node admittance matrix, respectively. represents the estimated value of the voltage phase difference across branch mn, where and Can be Get; H gc It is the constant coefficient measurement equation corresponding to the injection flow of the gas grid coupling node, and the matrix elements are composed of 0, -1, 1; The estimated error covariance matrix corresponding to the injected active power and injected flow at the coupling node and The calculation formula is as follows: In the formula, the superscripts t and h represent the time and the number of boundary iterations respectively; The error covariance matrix representing the active power injected by the grid coupling element; The error covariance matrix representing the injected flow rate of the gas grid coupling node; represents the Jacobian matrix corresponding to the active power injected into the grid coupling node during the h-1th iteration; H g,coup The constant quantity measurement matrix corresponding to the injection flow of the gas grid coupling node remains unchanged during the iteration process; and They represent the posterior estimated values of the estimated error covariance matrix of the power grid and gas grid state quantities after the h-1th iteration; According to the active injection power, injection mass flow rate and corresponding error covariance matrix of the boundary coupling node obtained above, the intermediate variables of the power grid and the gas grid are updated respectively, so as to correct the filtering steps of the power grid and the gas grid respectively. The specific interaction process is as follows: (1) Grid filter step correction A posteriori estimates of power grid state quantities and the posterior estimate of the error covariance matrix Update iteratively as follows: In the formula, and It is the intermediate variable of the power grid without boundary information interaction; and is the intermediate variable of the power grid during the hth iteration; and are the error covariance matrix information and injection flow information transmitted to the power grid at time t; η is the diagonal matrix composed of the conversion coefficients of the electric-gas coupling elements; The predicted value of active injected power of the grid coupling node; It represents the estimated value of the injection flow at the coupling node when the h-1th iteration is completed; (2) Gas network filter step correction A posteriori estimates of gas grid state quantities and the posterior estimate of the error covariance matrix Update iteratively as follows: In the formula, and It is the intermediate variable of the gas network without boundary information interaction; and is the intermediate variable of the gas network during the hth iteration; and They are the error covariance matrix information and active injection power information transmitted to the gas grid at time t respectively; It represents the estimated value of active injection power of the coupling node when the h-1th iteration is completed; The above boundary information interaction process continues until the electric-gas coupling constraint is satisfied. The electric-gas coupling constraint criterion is as follows: Where ε is the boundary convergence threshold.
Citation Information
Cited By
Power distribution network state parameter joint estimation method based on double extended Kalman filtering
CN120566577A
Chemical industry park distributed state estimation method and system considering multiple energy mass flow dynamics
CN120996378A