A method for constructing security domain of integrated energy system based on piecewise linearization model
Through the method based on the piecewise linearization model, the safety domain of the integrated energy system is constructed, which solves the problem of safety constraint analysis of the system in economic dispatch, realizes the safety monitoring and preventive control of the system, and provides efficient calculation for economic dispatch. method.
Patent Information
- Application Number
- CN202210021532.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-10
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-01-10
AI Technical Summary
How to comprehensively consider various safety constraints in the economic dispatch of integrated energy systems, conduct safety analysis and provide guidance information for preventive control and correction control, and improve the safe and economic operation efficiency of the system.
A method based on the piecewise linearization model is used to construct a comprehensive energy system steady-state model including electricity, natural gas and thermal power networks. Control and state variables are obtained through Monte Carlo sampling, and the least squares method is used to establish a piecewise linearization model to determine the relationship between The control variable with the greatest correlation between state variables is used to construct a safe domain.
It realizes the linearization of the nonlinear model of the integrated energy system, quantitatively evaluates the safety distance of the working point from the safety boundary, provides full-dimensional observation and real-time monitoring information, and improves the calculation efficiency of safety-constrained economic dispatch.
Smart Images

Figure CN114358624B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of integrated energy system applications, and in particular relates to a method for constructing a security domain of an integrated energy system based on a piecewise linearization model. Background Art
[0002] The integrated energy system realizes the coupling of cooling, heating, electricity and gas in the horizontal direction, and the coordination of source, network, load and storage in the vertical direction. It can achieve the goals of improving the operating efficiency of the energy system, increasing the consumption of renewable energy, and promoting the rational allocation of various energy sources. It has become an important direction for the transformation of the energy industry. The coupling of multiple energy flows allows the disturbance in a single energy flow to propagate in other networks through coupling devices, making the safety issues faced by the integrated energy system more complicated. How to comprehensively consider various safety constraints in economic dispatch, conduct safety analysis on the operating status of the integrated energy system, and provide guidance information for preventive control and corrective control are technical problems that need to be solved in the process of promoting the safe and economic operation of the integrated energy system. The safety domain of the integrated energy system is composed of working points that meet the system balance constraints and safety constraints, and can describe the overall area of safe operation of the integrated energy system. Safe economic dispatch and system safety analysis based on the safety domain of the integrated energy system can effectively improve the computing efficiency. Summary of the invention
[0003] The purpose of the present invention is to provide a method for constructing a security domain of an integrated energy system based on a piecewise linearization model, so as to improve the computational efficiency of safe and economic dispatching and system safety analysis of the integrated energy system.
[0004] In order to solve the above technical problems, the present invention provides a method for constructing a security domain of an integrated energy system based on a piecewise linearization model, comprising the following steps:
[0005] Step S1, constructing a steady-state model of an integrated energy system including a power network, a natural gas network, a thermal network and coupling equipment;
[0006] Step S2, performing Monte Carlo sampling on the control variables in the integrated energy system; the control variables include: the active power consumed by each electric load in the power network and the active power generated by the generator at each unbalanced node, the natural gas flow consumed by each natural gas load in the natural gas network and the natural gas flow generated by the natural gas source at each unbalanced node, and the thermal power consumed by each thermal load in the thermal network;
[0007] Step S3, based on the control variable sampling results, the steady-state model of the integrated energy system is calculated to obtain the state variable results in the integrated energy system; the state variables include: the voltage amplitude of each unbalanced node in the power network and the active power in each branch, the natural gas flow at the balanced node in the natural gas network and the pressure of each unbalanced node, and the temperature of each node in the thermal network;
[0008] Step S4, based on the sampling results of the control variables and the state variable results of the integrated energy system, firstly, using the least squares method to establish a piecewise linearization model of the integrated energy system with the state variables as the segmentation points, and then using the correlation coefficient between the state variables and the control variables to determine the control variables with the greatest correlation with the state variables, and then establishing a piecewise linearization model of the integrated energy system with the control variables as the segmentation points, thereby obtaining a piecewise linearization model of the integrated energy system;
[0009] Step S5, the piecewise linearization model of the integrated energy system and the operating constraints of the control variables and state variables together constitute the safety domain of the integrated energy system.
[0010] Furthermore, in step S1, the steady-state model of the integrated energy system specifically includes a single-phase AC power flow model of the power network, a steady-state hydraulic model of the natural gas network, a steady-state hydraulic model and a steady-state thermal model of the thermal network, and a steady-state model of energy conversion of coupled equipment.
[0011] Furthermore, the step S2 specifically includes the following steps:
[0012] Step S21, record the number of electric loads in the power network and the number of generators at the unbalanced nodes as H and I respectively, record the number of natural gas loads in the natural gas network as J and the number of natural gas sources at the unbalanced nodes as K respectively, record the number of thermal loads in the thermal network as L, record the number of sampling times as N and N is greater than 2×(H+I+J+K+L+1);
[0013] Step S22, record the active power consumed by each load i1 in the power network as L e i1 , the active power generated by generator i2 at each unbalanced node is P i2 , i1 and i2 have a value range of 1 to H and 1 to I respectively; the natural gas flow L consumed by each natural gas load i3 in the natural gas network is recorded g i3 , the natural gas flow S generated by the natural gas source i4 at each non-balanced node g i4 , i3 and i4 range from 1 to J and 1 to K respectively; record the thermal power L consumed by each thermal load i5 in the thermal network h i5, i5 ranges from 1 to L; all L e i1 , P i2 , L g i3 , S g i4 and L h i5 The control variable set CV is as follows:
[0014] [L e 1 , L e 2 ,…,L e H ,P 1 ,P 2 ,…,P I ,L g 1 ,L g 2 ,…,L g J ,S g 1 ,S g 2 ,…S g K ,L h 1 ,L h 2 ,…,L h L ]
[0015] And record the i6th control variable in the set CV as CV i6 , the value range of i6 is 1 to H+I+J+K+L;
[0016] Step S23, by L e i1 The upper limit value L e i1,max and the lower limit L e i1,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L e 1,i1 , L e 2,i1 ...L e N ,i1 ; by P i2 The upper limit value P i2,max and the lower limit P i2,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as P 1,i2 , P 2,i2 ...P N,i2 ;
[0017] Step S24, by L g i3 Upper limit L g i3,max and the lower limit L g i3,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L g 1,i3 , L g 2,i3 ...L g N ,i3 ; by S g i4 The upper limit value S g i4,max and the lower limit S g i4,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as S g 1,i4 , S g 2,i4 ……S g N,i4 ;
[0018] Step S25, by L h i5 Upper limit L h i5,max and the lower limit L h i5,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L h 1,i5 , L h 2,i5 ...L h N ,i5 ;
[0019] Step S26, the control variable sampling matrix composed of the sampling results obtained in step S23, step S24 and step S25 is recorded as C, and C is specifically shown in the following formula:
[0020]
[0021] Let the element in the i-th row and j-th column of matrix C be C ij , let the element in the i-th column of matrix C be C i , the value ranges of i and j are 1 to H+I+J+K+L+1 and 1 to N respectively.
[0022] Furthermore, the step S3 specifically includes the following steps:
[0023] Step S31, record the number of unbalanced nodes and branches in the power network as M and R respectively, the number of unbalanced nodes in the natural gas network as W, and the number of nodes in the thermal network as Y; record the voltage amplitude at each unbalanced node i7 in the power network as U i7 , the active power in each branch i8 is F i8 , i7 and i8 have a value range of 1 to M and 1 to R respectively; the natural gas flow at the balance node in the natural gas network is S b , the pressure of each non-equilibrium node i9 is P r i9 , the value range of i9 is 1 to W; the temperature of each node i10 in the thermal network is T i10 , i10 ranges from 1 to Y; all U i7 、F i8 , S b , P r i9 and T i10 The state variable set SV is as follows:
[0024] [U 1 ,U 2 ,…,U M ,F 1 ,F 2 ,…,F R ,S b ,P r 1 ,P r 2 ,…,P r W ,T 1 ,T 2 ,…,T Y ]
[0025] And let the i11th state variable in the set SV be SV i11 , the value range of i11 is 1 to M+R+W+Y+1;
[0026] Step S32, setting the initial value of the number of calculations k1 of the integrated energy system to 1;
[0027] Step S33, based on the established integrated energy system steady-state model and the data of the k1th row in the matrix C, calculation is performed to obtain the k1th state variable results in the integrated energy system, including U i7 The k1th calculation result U k1,i7 、F i8 The k1th calculation result F k1,i8 , S b The k1th calculation result S b k1 , P r i9 The k1th calculation result P r k1,i9 and T i10 The k1th calculation result T k1,i10 ;
[0028] Step S34, compare k1 with N. If k1 is less than N, execute k1=k1+1 and return to step S33; if k1 is equal to N, execute step S35;
[0029] Step S35, the state variable result matrix formed by the state variable results obtained in step S33 and step S34 is recorded as S, and S is specifically shown in the following formula:
[0030]
[0031] The column vector consisting of the elements in the i11th column of the matrix S is denoted by S i11 , the matrix S represented by column vector is as follows:
[0032] S=[S 1 S 2 … S M+R+W+Y+1 ].
[0033] Furthermore, the step S4 specifically includes the following steps:
[0034] Step S41, setting the initial value of sequence number k2 to 1;
[0035] Step S42, obtaining the k2th column data S in the matrix S k2 ;
[0036] Step S43, adjust S k2 The position of each row of data in S k2 The data in the table are arranged from small to large, denoted by S k2 The column vector obtained after the row wrapping operation is S k2 new ; Matrix C is adjusted with S k2 The same line wrapping operation is performed. The matrix obtained after the line wrapping operation is recorded as C new ;
[0037] Step S44, using step S43 to obtain column vector S k2 new and the matrix C new Establish the k2th state variable SV k2 The piecewise linear model includes the following steps:
[0038] Step S441, using column vector S k2 new and C new , calculate the state variable SV k2 The coefficient column vector B of the single-segment linear model k2,0 , the specific formula is as follows:
[0039] B k2,0 =[(C new ) T C new ] -1 (C new ) T S k2 new
[0040] Step S442, calculate the initial value ε of the residual sum of squares of the linear model 0 , the specific formula is as follows:
[0041] ε 0 =||S k2 new -C new B k2,0 || 2
[0042] Step S443, set the initial value of the number of piecewise linear regression j to 1, and set the state variable SV k2 The piecewise point SV of the piecewise linear model k2 p The initial value of is the column vector S k2 new The elements of row N;
[0043] Step S444, by column vector S k2 new The column vector composed of the elements from the 1st row to the H+I+J+K+L+jth row is denoted as S k2 new,1 , by column vector S k2 new The column vector composed of the elements from the H+I+J+K+L+j+1th row to the Nth row is denoted as S k2 new,2 , by the matrix C newThe matrix consisting of the elements from row 1 to row H+I+J+K+L+j is denoted as C new,1 , by the matrix C new The matrix composed of the elements from row H+I+J+K+L+j+1 to row N is denoted as C new,2 ;
[0044] Step S445, using column vector S k2 new,1 and the matrix C new,1 , calculate the state variable SV k2 The coefficient column vector B of the first linear model in the piecewise linear model k2,1 , the specific formula is as follows:
[0045] B k2,1 =[(C new,1 ) T C new,1 ] -1 (C new,1 ) T S k2 new,1
[0046] Step S446, using column vector S k2 new,2 and the matrix C new,2 , calculate the state variable SV k2 The coefficient column vector B of the second linear model in the piecewise linear model k2,2 , the specific formula is as follows:
[0047] B k2,2 =[(C new,2 ) T C new,2 ] -1 (C new,2 ) T S k2 new,2
[0048] Step S447, calculate the residual sum of squares ε of the linear model obtained by the j-th piecewise linear regression j , the specific formula is as follows:
[0049] ε j =||S k2 new,1 -C new,1 B k2,1 || 2 +||S k2 new,2 -C new,2 B k2,2 || 2
[0050] Step S448, compare ε j and ε 0 The size of ε j ≤ε 0 , then SV k2 p The value of S is updated to k new The elements of the H+I+J+K+L+jth row of , and perform ε 0 =ε j and j=j+1, return to step S444; if ε j >ε 0 , then execute step S449;
[0051] Step S449, calculate the state variable SV k2 With each control variable CV i6 The correlation coefficient r k2,i6 , the specific formula is as follows:
[0052]
[0053] In the formula, Cov(S k2 ,C i6+1 ) is S k2 With C i6+1 The covariance of Var(S k2 ) is S k2 The variance of Var(C i6+1 ) is C i6+1 The variance of
[0054] Note k2,i6 The maximum absolute value is r k2,m , then with the state variable SV k2 The most relevant control variable is CV m ;
[0055] Step S4410, establish state variable SV k2 The piecewise linear model is as follows:
[0056]
[0057] Step S45, compare k2 with M+R+W+Y+1. If k2 is less than M+R+W+Y+1, execute k2=k2+1 and return to step S42; if k2 is equal to M+R+W+Y+1, execute step S46;
[0058] Step S46, the piecewise linear models of the state variables obtained from step S42 to step S45 together constitute a piecewise linearization model of the integrated energy system:
[0059]
[0060] Furthermore, the step S5 specifically includes the following steps:
[0061] Step S51, constructing the operation constraints of the control variables:
[0062] CV i6,min ≤CV i6 ≤C i6,max ,i6=1,2,…,H+I+J+K+L
[0063] In the formula, CV i6,min and C i6,max They are the control variables CV i6 The upper and lower limits of
[0064] Step S52, constructing the running constraints of the state variables:
[0065] SV i11,min ≤SV i11 ≤SV i11,max ,i11=1,2,…,M+R+W+Y+1
[0066] Where, SV i11,min and SV i11,max They are state variables SV i11 The upper and lower limits of
[0067] Step S53, the piecewise linearization model of the integrated energy system, the operating constraints of the state variables and the operating constraints of the control variables together constitute the safety domain of the integrated energy system:
[0068] Ω={CV i6 ,i6=1,2,…,H+I+J+K+L|SV i11 =f i11 ([CV 1 CV 2 …CV H+I+J+K+L ]),i11=1,2,…,M+R+W+Y+1;
[0069] CV i6,min ≤CV i6 ≤C i6,max ,i6=1,2,…,H+I+J+K+L;SV i11,min ≤SV i11 ≤SV i11,max ,i11=1,2,…,M+R+W+Y+1}.
[0070] The beneficial effects of the present invention are:
[0071] The method for constructing the safety domain of an integrated energy system based on a piecewise linearization model proposed in the present invention uses the least squares method and correlation analysis to establish a piecewise linearization model between state variables and control variables in the integrated energy system, which can realize the linearization of the nonlinear model of the integrated energy system. The safety domain of the integrated energy system constructed based on this method is a linear model, which helps to quantitatively evaluate the safety distance between the working point and each safety boundary, realize the full-dimensional observation of the system safety, and provide favorable information for the real-time monitoring, preventive control and corrective control of the safety of the integrated energy system. At the same time, the safety domain of the integrated energy system can be used as a constraint condition for safety-constrained economic dispatch, which is expected to improve the computational efficiency of safety-constrained economic dispatch. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is an implementation flow chart of the method for constructing the security domain of an integrated energy system based on a piecewise linearization model of the present invention. DETAILED DESCRIPTION
[0073] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0074] like Figure 1 As shown, the present invention provides a method for constructing a security domain of an integrated energy system based on a piecewise linearization model, comprising the following steps:
[0075] Step S1, constructing a steady-state model of an integrated energy system including a power network, a natural gas network, a thermal network and coupling equipment;
[0076] Step S2, performing Monte Carlo sampling on the control variables in the integrated energy system; the control variables include: the active power consumed by each electric load in the power network and the active power generated by the generator at each unbalanced node, the natural gas flow consumed by each natural gas load in the natural gas network and the natural gas flow generated by the natural gas source at each unbalanced node, and the thermal power consumed by each thermal load in the thermal network;
[0077] Step S3, based on the control variable sampling results, the steady-state model of the integrated energy system is calculated to obtain the state variable results in the integrated energy system; the state variables include: the voltage amplitude of each unbalanced node in the power network and the active power in each branch, the natural gas flow at the balanced node in the natural gas network and the pressure of each unbalanced node, and the temperature of each node in the thermal network;
[0078] Step S4, based on the sampling results of the control variables and the state variable results of the integrated energy system, firstly, using the least squares method to establish a piecewise linearization model of the integrated energy system with the state variables as the segmentation points, and then using the correlation coefficient between the state variables and the control variables to determine the control variables with the greatest correlation with the state variables, and then establishing a piecewise linearization model of the integrated energy system with the control variables as the segmentation points, thereby obtaining a piecewise linearization model of the integrated energy system;
[0079] Step S5, the piecewise linearization model of the integrated energy system and the operating constraints of the control variables and state variables together constitute the safety domain of the integrated energy system.
[0080] Furthermore, in step S1, the steady-state model of the integrated energy system specifically includes a single-phase AC power flow model of the power network, a steady-state hydraulic model of the natural gas network, a steady-state hydraulic model and a steady-state thermal model of the thermal network, and a steady-state model of energy conversion of coupled equipment.
[0081] Furthermore, the step S2 specifically includes the following steps:
[0082] Step S21, record the number of electric loads in the power network and the number of generators at the unbalanced nodes as H and I respectively, record the number of natural gas loads in the natural gas network as J and the number of natural gas sources at the unbalanced nodes as K respectively, record the number of thermal loads in the thermal network as L, record the number of sampling times as N and N is greater than 2×(H+I+J+K+L+1);
[0083] Step S22, record the active power consumed by each load i1 in the power network as L e i1 , the active power generated by generator i2 at each unbalanced node is P i2 , i1 and i2 have a value range of 1 to H and 1 to I respectively; the natural gas flow L consumed by each natural gas load i3 in the natural gas network is recorded g i3 , the natural gas flow S generated by the natural gas source i4 at each non-balanced node g i4 , i3 and i4 range from 1 to J and 1 to K respectively; record the thermal power L consumed by each thermal load i5 in the thermal network h i5 , i5 ranges from 1 to L; all L e i1 , P i2 , L g i3 , S g i4 and L h i5 The control variable set CV is as follows:
[0084] [L e 1 , L e 2 ,…,L e H ,P 1 ,P 2 ,…,P I ,L g 1 ,L g 2 ,…,L g J ,S g 1 ,S g 2 ,…S g K ,L h 1 ,L h 2 ,…,L h L ]
[0085] And record the i6th control variable in the set CV as CV i6 , the value range of i6 is 1 to H+I+J+K+L;
[0086] Step S23, by L e i1 The upper limit value L e i1,max and the lower limit L e i1,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L e 1,i1 , L e 2,i1 ...L e N ,i1 ; by P i2 The upper limit value P i2,max and the lower limit P i2,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as P 1,i2 , P 2,i2 ...P N,i2 ;
[0087] Step S24, by L g i3 Upper limit L gi3,max and the lower limit L g i3,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L g 1,i3 , L g 2,i3 ...L g N ,i3 ; by S g i4 The upper limit value S g i4,max and the lower limit S g i4,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as S g 1,i4 , S g 2,i4 ……S g N,i4 ;
[0088] Step S25, by L h i5 Upper limit L h i5,max and the lower limit L h i5,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L h 1,i5 , L h 2,i5 ...L h N ,i5 ;
[0089] Step S26, the control variable sampling matrix composed of the sampling results obtained in step S23, step S24 and step S25 is recorded as C, and C is specifically shown in the following formula:
[0090]
[0091] Let the element in the i-th row and j-th column of matrix C be C ij , let the element in the i-th column of matrix C be C i , the value ranges of i and j are 1 to H+I+J+K+L+1 and 1 to N respectively.
[0092] Furthermore, the step S3 specifically includes the following steps:
[0093] Step S31, record the number of unbalanced nodes and branches in the power network as M and R respectively, the number of unbalanced nodes in the natural gas network as W, and the number of nodes in the thermal network as Y; record the voltage amplitude at each unbalanced node i7 in the power network as U i7 , the active power in each branch i8 is F i8 , i7 and i8 have a value range of 1 to M and 1 to R respectively; the natural gas flow at the balance node in the natural gas network is S b , the pressure of each non-equilibrium node i9 is P r i9 , the value range of i9 is 1 to W; the temperature of each node i10 in the thermal network is T i10 , i10 ranges from 1 to Y; all U i7 、F i8 , S b , P r i9 and T i10 The state variable set SV is as follows:
[0094] [U 1 ,U 2 ,…,U M ,F 1 ,F 2 ,…,F R ,S b ,P r 1 ,P r 2 ,…,P r W ,T 1 ,T 2 ,…,T Y ]
[0095] And let the i11th state variable in the set SV be SV i11 , the value range of i11 is 1 to M+R+W+Y+1;
[0096] Step S32, setting the initial value of the number of calculations k1 of the integrated energy system to 1;
[0097] Step S33, based on the established integrated energy system steady-state model and the data of the k1th row in the matrix C, calculation is performed to obtain the k1th state variable results in the integrated energy system, including U i7 The k1th calculation result U k1,i7 、F i8 The k1th calculation result F k1,i8 , S b The k1th calculation result S bk1 , P r i9 The k1th calculation result P r k1,i9 and T i10 The k1th calculation result T k1,i10 ;
[0098] Step S34, compare k1 with N. If k1 is less than N, execute k1=k1+1 and return to step S33; if k1 is equal to N, execute step S35;
[0099] Step S35, the state variable result matrix formed by the state variable results obtained in step S33 and step S34 is recorded as S, and S is specifically shown in the following formula:
[0100]
[0101] The column vector consisting of the elements in the i11th column of the matrix S is denoted by S i11 , the matrix S represented by column vector is as follows:
[0102] S=[S 1 S 2 … S M+R+W+Y+1 ].
[0103] Furthermore, the step S4 specifically includes the following steps:
[0104] Step S41, setting the initial value of sequence number k2 to 1;
[0105] Step S42, obtaining the k2th column data S in the matrix S k2 ;
[0106] Step S43, adjust S k2 The position of each row of data in S k2 The data in the table are arranged from small to large, denoted by S k2 The column vector obtained after the row wrapping operation is S k2 new ; Matrix C is adjusted with S k2 The same line wrapping operation is performed. The matrix obtained after the line wrapping operation is recorded as C new ;
[0107] Step S44, using step S43 to obtain column vector S k2 new and the matrix C new Establish the k2th state variable SV k2 The piecewise linear model includes the following steps:
[0108] Step S441, using column vector S k2new and C new , calculate the state variable SV k2 The coefficient column vector B of the single-segment linear model k2,0 , the specific formula is as follows:
[0109] B k2,0 =[(C new ) T C new ] -1 (C new ) T S k2 new
[0110] Step S442, calculate the initial value ε of the residual sum of squares of the linear model 0 , the specific formula is as follows:
[0111] ε 0 =||S k2 new -C new B k2,0 || 2
[0112] Step S443, set the initial value of the number of piecewise linear regression j to 1, and set the state variable SV k2 The piecewise point SV of the piecewise linear model k2 p The initial value of is the column vector S k2 new The elements of row N;
[0113] Step S444, by column vector S k2 new The column vector composed of the elements from the 1st row to the H+I+J+K+L+jth row is denoted as S k2 new,1 , by column vector S k2 new The column vector composed of the elements from the H+I+J+K+L+j+1th row to the Nth row is denoted as S k2 new,2 , by the matrix C new The matrix consisting of the elements from row 1 to row H+I+J+K+L+j is denoted as C new,1 , by the matrix C new The matrix composed of the elements from row H+I+J+K+L+j+1 to row N is denoted as C new,2 ;
[0114] Step S445, using column vector S k2 new,1 and the matrix C new,1 , calculate the state variable SVk2 The coefficient column vector B of the first linear model in the piecewise linear model k2,1 , the specific formula is as follows:
[0115] B k2,1 =[(C new,1 ) T C new,1 ] -1 (C new,1 ) T S k2 new,1
[0116] Step S446, using column vector S k2 new,2 and the matrix C new,2 , calculate the state variable SV k2 The coefficient column vector B of the second linear model in the piecewise linear model k2,2 , the specific formula is as follows:
[0117] B k2,2 =[(C new,2 ) T C new,2 ] -1 (C new,2 ) T S k2 new,2
[0118] Step S447, calculate the residual sum of squares ε of the linear model obtained by the j-th piecewise linear regression j , the specific formula is as follows:
[0119] ε j =||S k2 new,1 -C new,1 B k2,1 || 2 +||S k2 new,2 -C new,2 B k2,2 || 2
[0120] Step S448, compare ε j and ε 0 The size of ε j ≤ε 0 , then SV k2 p The value of S is updated to k new The elements of the H+I+J+K+L+jth row of , and perform ε 0 =ε jand j=j+1, return to step S444; if ε j >ε 0 , then execute step S449;
[0121] Step S449, calculate the state variable SV k2 With each control variable CV i6 The correlation coefficient r k2,i6 , the specific formula is as follows:
[0122]
[0123] In the formula, Cov(S k2 ,C i6+1 ) is S k2 With C i6+1 The covariance of Var(S k2 ) is S k2 The variance of Var(C i6+1 ) is C i6+1 The variance of
[0124] Note k2,i6 The maximum absolute value is r k2,m , then with the state variable SV k2 The most relevant control variable is CV m ;
[0125] Step S4410, establish state variable SV k2 The piecewise linear model is as follows:
[0126]
[0127] Step S45, compare k2 with M+R+W+Y+1. If k2 is less than M+R+W+Y+1, execute k2=k2+1 and return to step S42; if k2 is equal to M+R+W+Y+1, execute step S46;
[0128] Step S46, the piecewise linear models of the state variables obtained from step S42 to step S45 together constitute a piecewise linearization model of the integrated energy system:
[0129]
[0130] Furthermore, the step S5 specifically includes the following steps:
[0131] Step S51, constructing the operation constraints of the control variables:
[0132] CV i6,min ≤CV i6 ≤C i6,max,i6=1,2,…,H+I+J+K+L
[0133] In the formula, CV i6,min and C i6,max They are the control variables CV i6 The upper and lower limits of
[0134] Step S52, constructing the running constraints of the state variables:
[0135] SV i11,min ≤SV i11 ≤SV i11,max ,i11=1,2,…,M+R+W+Y+1
[0136] Where, SV i11,min and SV i11,max They are state variables SV i11 The upper and lower limits of
[0137] Step S53, the piecewise linearization model of the integrated energy system, the operating constraints of the state variables and the operating constraints of the control variables together constitute the safety domain of the integrated energy system:
[0138] Ω={CV i6 ,i6=1,2,…,H+I+J+K+L|SV i11 =f i11 ([CV 1 CV 2 …CV H+I+J+K+L ]),i11=1,2,…,M+R+W+Y
[0139] CV i6,min ≤CV i6 ≤C i6,max ,i6=1,2,…,H+I+J+K+L;SV i11,min ≤SV i11 ≤SV i11,max ,i11=1,2,…,M+R+W+。
Claims
1. A method for constructing a security domain of an integrated energy system based on a piecewise linearization model, characterized in that: The steps include: Step S1, constructing a steady-state model of an integrated energy system including a power network, a natural gas network, a thermal network and coupling equipment; Step S2, performing Monte Carlo sampling on the control variables in the integrated energy system; The control variables include: the active power consumed by each electric load in the power network and the active power generated by the generator at each unbalanced node, the natural gas flow consumed by each natural gas load in the natural gas network and the natural gas flow generated by the natural gas source at each unbalanced node, and the thermal power consumed by each thermal load in the thermal network; Step S3, based on the control variable sampling results, the steady-state model of the integrated energy system is calculated to obtain the state variable results in the integrated energy system; the state variables include: the voltage amplitude of each unbalanced node in the power network and the active power in each branch, the natural gas flow at the balanced node in the natural gas network and the pressure of each unbalanced node, and the temperature of each node in the thermal network; Step S4, based on the sampling results of the control variables and the state variable results of the integrated energy system, firstly, using the least squares method to establish a piecewise linearization model of the integrated energy system with the state variables as the segmentation points, and then using the correlation coefficient between the state variables and the control variables to determine the control variables with the greatest correlation with the state variables, and then establishing a piecewise linearization model of the integrated energy system with the control variables as the segmentation points, thereby obtaining a piecewise linearization model of the integrated energy system; Step S5, the piecewise linearization model of the integrated energy system and the operation constraints of the control variables and state variables together constitute the safety domain of the integrated energy system; The step S4 specifically includes the following steps: Step S41, setting the initial value of sequence number k2 to 1; Step S42, obtaining the k2th column data S in the matrix S k2 ; Step S43, adjust S k2 The position of each row of data in S k2 The data in the table are arranged from small to large, denoted by S k2 The column vector obtained after the row wrapping operation is S k2 new ; Matrix C is adjusted with S k2 The same line wrapping operation is performed. The matrix obtained after the line wrapping operation is recorded as C new ; Step S44, using step S43 to obtain column vector S k2 new and the matrix C new Establish the k2th state variable SV k2 The piecewise linear model includes the following steps: Step S441, using column vector S k2 new and C new , calculate the state variable SV k2 The coefficient column vector B of the single-segment linear model k2,0 , the specific formula is as follows: B k2,0 =[(C new ) T C new ] -1 (C new ) T S k2 new Step S442, calculate the initial value ε0 of the residual sum of squares of the linear model, the specific formula is as follows: ε0=||S k2 new -C new B k2,0 || 2 Step S443, set the initial value of the piecewise linear regression times j to 1, and set the state variable SV k2 The piecewise point SV of the piecewise linear model k2 p The initial value of is the column vector S k2 new The elements of row N; Step S444, by column vector S k2 new The column vector composed of the elements from the 1st row to the H+I+J+K+L+jth row is denoted as S k2 new,1 , by column vector S k2 new The column vector composed of the elements from the H+I+J+K+L+j+1th row to the Nth row is denoted as S k2 new,2 , by the matrix C new The matrix consisting of the elements from row 1 to row H+I+J+K+L+j is denoted as C new,1 , by the matrix C new The matrix composed of the elements from row H+I+J+K+L+j+1 to row N is denoted as C new,2 ; Step S445, using column vector S k2 new,1 and the matrix C new,1 , calculate the state variable SV k2 The coefficient column vector B of the first linear model in the piecewise linear model k2,1 , the specific formula is as follows: B k2,1 =[(C new,1 ) T C new,1 ] -1 (C new,1 ) T S k2 new,1 Step S446, using column vector S k2 new,2 and the matrix C new,2 , calculate the state variable SV k2 The coefficient column vector B of the second linear model in the piecewise linear model k2,2 , the specific formula is as follows: B k2,2 =[(C new,2 ) T C new,2 ] -1 (C new,2 ) T S k2 new,2 Step S447, calculate the residual sum of squares ε of the linear model obtained by the j-th piecewise linear regression j , the specific formula is as follows: ε j D||S k2 new,1 -C new,1 B k2,1 || 2 +||S k2 new,2 -C new,2 B k2,2 || 2 Step S448, compare ε j and the size of ε0, if ε j ≤ε0, then SV k2 p The value of S is updated to k new The elements of the H+I+J+K+L+jth row of , and perform ε0=ε j and j=j+1, return to step S444; if ε j >ε0, then execute step S449; Step S449, calculate the state variable SV k2 With each control variable CV i6 The correlation coefficient r k2,i6 , the specific formula is as follows: In the formula, Cov(S k2 ,C i6+1 ) is S k2 With C i6+1 The covariance of Var(S k2 ) is S k2 The variance of Var(C i6+1 ) is C i6+1 The variance of Note k2,i6 The maximum absolute value is r k2,m , then with the state variable SV k2 The most relevant control variable is CV m ; Step S4410, establish state variable SV k2 The piecewise linear model is as follows: Step S45, compare k2 with M+R+W+Y+1. If k2 is less than M+R+W+Y+1, execute k2=k2+1 and return to step S42; if k2 is equal to M+R+W+Y+1, execute step S46; Step S46, the piecewise linear models of the state variables obtained from step S42 to step S45 together constitute a piecewise linearization model of the integrated energy system:
2. According to claim 1, a method for constructing a security domain of an integrated energy system based on a piecewise linearization model is characterized in that: In step S1, the integrated energy system steady-state model specifically includes a single-phase AC power flow model of the power network, a steady-state hydraulic model of the natural gas network, a steady-state hydraulic model and a steady-state thermal model of the thermal network, and a steady-state model of energy conversion of coupled equipment.
3. According to claim 2, a method for constructing a security domain of an integrated energy system based on a piecewise linearization model is characterized in that: The step S2 specifically includes the following steps: Step S21, record the number of electric loads in the power network and the number of generators at the unbalanced nodes as H and I respectively, record the number of natural gas loads in the natural gas network as J and the number of natural gas sources at the unbalanced nodes as K respectively, record the number of thermal loads in the thermal network as L, record the number of sampling times as N and N is greater than 2×(H+I+J+K+L+1); Step S22, record the active power consumed by each load i1 in the power network as L e i1 , the active power generated by generator i2 at each unbalanced node is P i2 , i1 and i2 have a value range of 1 to H and 1 to I respectively; the natural gas flow L consumed by each natural gas load i3 in the natural gas network is recorded g i3 , the natural gas flow S generated by the natural gas source i4 at each non-balanced node g i4 , i3 and i4 range from 1 to J and 1 to K respectively; record the thermal power L consumed by each thermal load i5 in the thermal network h i5 , i5 ranges from 1 to L; all L e i1 , P i2 , L g i3 , S g i4 and L h i5 The control variable set CV is as follows: [L e 1 ,L e 2 ,…,L e H ,P 1 ,P 2 ,…,P I ,L g 1 ,L g 2 ,…,L g J ,S g 1 ,S g 2 ,…S g K ,L h 1 ,L h 2 ,…,L h L ] And record the i6th control variable in the set CV as CV i6 , the value range of i6 is 1 to H+I+J+K+L; Step S23, by L e i1 The upper limit value L e i1,max and the lower limit L e i1,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L e 1,i1 , L e 2,i1 ...L e N ,i1 ; by P i2 The upper limit value P i2,max and the lower limit P i2,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as P 1,i2 , P 2,i2 ...P N,i2 ; Step S24, by L g i3 Upper limit L g i3,max and the lower limit L g i3,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L g 1,i3 , L g 2,i3 ...L g N ,i3 ; by S g i4 The upper limit value S g i4,max and the lower limit S g i4,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as S g 1,i4 , S g 2,i4 ……S g N,i4 ; Step S25, by L h i5 Upper limit L h i5,max and the lower limit L h i5,min Constitute a uniform distribution, denoted by For uniform distribution Perform N samplings, and record the sampling results of each time as L h 1,i5 , L h 2,i5 ...L h N ,i5 ; Step S26, the control variable sampling matrix composed of the sampling results obtained in step S23, step S24 and step S25 is recorded as C, and C is specifically shown in the following formula: Let the element in the i-th row and j-th column of matrix C be C ij , let the i-th column element in matrix C be C i , the value ranges of i and j are 1 to H+I+J+K+L+1 and 1 to N respectively.
4. According to claim 3, a method for constructing a security domain of an integrated energy system based on a piecewise linearization model is characterized in that: The step S3 specifically includes the following steps: Step S31, record the number of unbalanced nodes and branches in the power network as M and R respectively, the number of unbalanced nodes in the natural gas network as W, and the number of nodes in the thermal network as Y; record the voltage amplitude at each unbalanced node i7 in the power network as U i7 , the active power in each branch i8 is F i8 , i7 and i8 have a value range of 1 to M and 1 to R respectively; the natural gas flow at the balance node in the natural gas network is S b , the pressure of each non-equilibrium node i9 is The value range of i9 is 1 to W; the temperature of each node i10 in the thermal network is T i10 , i10 ranges from 1 to Y; all U i7 、F i8 , S b , and T i10 The state variable set SV is as follows: And let the i11th state variable in the set SV be SV i11 , the value range of i11 is 1 to M+R+W+Y+1; Step S32, setting the initial value of the number of calculations k1 of the integrated energy system to 1; Step S33, based on the established integrated energy system steady-state model and the data of the k1th row in the matrix C, calculation is performed to obtain the k1th state variable results in the integrated energy system, including U i7 The k1th calculation result U k1,i7 、F i8 The k1th calculation result F k1,i8 , S b The k1th calculation result S b k1 , The k1th calculation result of and T i10 The k1th calculation result T k1,i10 ; Step S34, compare k1 with N. If k1 is smaller than N, execute k1=k1+1 and return to step S33; If k1 is equal to N, execute step S35; Step S35, the state variable result matrix formed by the state variable results obtained in step S33 and step S34 is recorded as S, and S is specifically shown in the following formula: The column vector consisting of the elements in the i11th column of the matrix S is denoted by S i11 , the matrix S represented by column vector is as follows: S=[S1 S2…S M+R+W+Y+1 ]。 5. According to claim 1, a method for constructing a security domain of an integrated energy system based on a piecewise linearization model is characterized in that: The step S5 specifically includes the following steps: Step S51, constructing the operation constraints of the control variables: CV i6,min ≤CV i6 ≤C i6,max ,i6=1,2,…,H+I+J+K+L In the formula, CV i6,min and C i6,max They are the control variables CV i6 The upper and lower limits of Step S52, constructing the running constraints of the state variables: SV i11,min ≤SV i11 ≤SV i11,max ,i11=1,2,…,M+R+W+Y+1 Where, SV i11,min and SV i11,max They are state variables SV i11 The upper and lower limits of Step S53, the piecewise linearization model of the integrated energy system, the operating constraints of the state variables and the operating constraints of the control variables together constitute the safety domain of the integrated energy system: Ω={CV i6 ,i6=1,2,…,H+I+J+K+L|SV i11 =f i11 ([CV1 CV2…CV H+I+J+K+L ]),i11=1,2,…,M+R+W+Y+1; CV i6,min ≤CV i6 ≤C i6,max ,i6=1,2,…,H+I+J+K+L;SV i11,min ≤SV i11 ≤SV i11,max ,i11=1,2,…,M+R+W+Y+1}。
