Simplification of Water Distribution Network Models

5 downloads 0 Views 153KB Size Report
ABSTRACT: The paper presents a mathematical method for the reduction of network models described by a large-scale system of non-linear algebraic ...
Simplification of Water Distribution Network Models B. Ulanicki, MSc, PhD, DSc, CEng, MIEE, Reader in Engineering Systems Director of Research, Water Software Systems, De Montfort University, The Gateway, Leicester, LE1 9BH, UK. fax +44 116 2577583, e-mail [email protected].

A.Zehnpfund, BSc, MSc System Engineer, Automation and Man-Machine Systems, (DERC/I3), ABB Corporate Research, Asea Brown Boveri AG, Speyerer Strasse 4, D-69115 Heidelberg, Germany, e-mail [email protected].

F.Martinez, BSc, MSc, PhD, Professor of Hydraulic Engineering Hydraulic and Environmental Engineering Department, Polytechnical University of Valencia, Camino de Vera s/n Valencia, Spain, fax +34 6 3877619.

ABSTRACT: The paper presents a mathematical method for the reduction of network models described by a large-scale system of non-linear algebraic equations. Such models are, for example, present when modelling water networks, electrical networks and gas networks. The approach calculates a network model, equivalent to the original one, but which contains fewer components. This procedure has an advantage compared to straightforward linearisation because the reduced non-linear model preserves the non-linearity of the original model and approximates the original model in a wide range of operating conditions. The method was validated by simplifying many water networks. variables with the process of back substitution. 1. INTRODUCTION Unfortunately, such general techniques do not exist for non-linear systems. The approach proposed here The method will be formulated using an example proceeds by the following steps: formulate the full of a water pipe network but the same arguments can non-linear model, linearise this model, reduce the be directly applied to a network of non-linear resistors linear model using the Gauss elimination procedure, or other non-linear networks. The function of a water and retrieve a reduced non-linear model from the distribution network is to transport water from reduced linear model. The paper has the following sources (rivers and boreholes) to sinks (user structure. Section 2 investigates properties of the nondemands). Major components of a network are linear and linearised models of water networks. The reservoirs, pipes, valves and pumps. A typical water non-linear model is formulated using ideas from network may contain thousands of pipes and only tens (Ulanicki, 1993) and this model is analogous to of other components. In modelling, this network of models of electrical networks discussed in pipes can be replaced by an equivalent reduced (Balabanian and Bickart, 1969). It is shown that the network. Control and design problems are normally Jacobian matrix of the linearised model has a special solved with optimisation techniques. The numerical structure which enables the reduction procedure. complexity of optimisation problems is much higher Section 3 contains an outline of the model reduction than the equivalent simulation problems, and procedure whilst the technical details are shown in consequently simplified models are required to make Sections 4 and 5. Section 6 contains the results of calculation time acceptable. It was realised (Zessler numerical experiments for two networks. A medium and Shamir, 1989), (Brdys and Ulanicki, 1994) that size network model which was reduced from 60 slow progress in developing optimisation methods for nodes and 124 elements to 10 nodes and 19 elements, water networks among other reasons was due to the and a large-scale network model which was reduced lack of efficient model reduction methods. Typical from 797 nodes and 1088 elements to 143 nodes and techniques used to produce simplified optimisation 290 elements. models are based on linearisation or heuristics crafted to the specific cases. Linearisation is only locally accurate and heuristics are costly in terms of human intervention. The approach presented here is a mathematical formalism which finds a network model automatically in a matter of seconds. The most direct way of reducing a system of algebraic equations would be by analytical elimination of some

2. WATER NETWORK MODELS AND THEIR PROPERTIES Mathematical models of water networks can be derived by analogy with electrical network models. The following relationships exist between the two

types of models: flow∼current; head∼voltage, pipe∼non-linear resistor. A model of a water network can be obtained by writing down: a component law for each of the network components (in a similar fashion to the Ohm law for electrical components), and Kirchhoff’s laws I and II for the network topology. The Kirchhoff’s law I describes the flow balance at a network node and Kirchhoff’s law II describes the head drop balance in a loop. The specific properties of water networks are determined by the non-linear head-flow relationships of its components. q orig h dest h ∆ h = h orig − h dest

Figure 1. Component of a water network A pipe model is given by the Hazen-William formula (DeMoyer and Horwitz, 1975) (1) q = q ( ∆ h) = g | ∆ h |0.54 sign ( ∆ h) where, ∆h is the head drop, i.e. difference between the origin head and destination head, q is a pipe flow, and g is the pipe conductance as shown in Figure 1. The pipe conductance depends on the pipe length, the pipe diameter, and the Hazen-Williams friction coefficient. The topology of the network can be represented as a di-graph, where the branches are the network components and the nodes are connections between these components. Orientation of the branches is used to distinguish between different directions of a branch flow. For algebraic manipulation it is convenient to represent a network with a node branch incidence matrix Λ . The matrix Λ has a row for each node n=1,2,...,N, and a column for each branch j=1,2,...J. Each column of the matrix Λ has only two non-zero elements, +1 and -1, corresponding the origin and destination nodes of the branch. Each row has nonzero elements -1 or +1 corresponding to the branches entering the node and leaving the node respectively. The set of nodes connected to a given node n will be denoted by N n . A branch can be identified either by the branch index j or by the pair of node indices (n1 , n2 ) . Transformation from one description to another will be done with the help of the mapping j (n1 , n2 ) ,where j will be the branch connected between nodes n1 and n2 . The mathematical model of a water network compactly written using the node-branch incidence matrix Λ as follows Λ q = q nod Kirchhoff’s law I for nodes (2)

∆ h = ΛT h Kirchhoff’s law II q = Q( ∆ h) pipe component law

(3) (4)

where q is the vector of branch flows, q nod is a vector of nodal flows and represents demands, reservoir flows and source flows, h is the vector of node heads, ∆ h is the vector of branch head-drops, and Q( ∆ h) = ( q 1( ∆ h1 ),.., q J ( ∆ hJ ))T is a vector function where each function q j ( ∆ h j ) is given by (1). These three equations (2), (3), (4) can be combined in different ways resulting in different models : nodal model, loop model or mixed model (Ulanicki, 1993). The nodal model of a network involves only nodal variables; vectors h and q nod and is obtained by substituting Equation 3 into 4 and then Equation 4 into 2. (5) Λ Q( ΛT h) = q nod The model (5) has a redundant equation and for numerical calculations it is necessary to remove it. This can be done by selecting one node as a reference node and deleting the row corresponding to this node from Λ . However, for theoretical consideration it is convenient to use this extended model. For later discussions it will be convenient to have another model with vector ∆ h and obtained by substituting (4) into (2). (6) Λ Q( ∆ h) = q nod Equation 6 corresponds to N scalar equations, each describing the mass balance at a given node. For a node n is ∑ Λ n, j( n,m) gn,m ∆ h j( n,m) 0.54 sign( ∆ h j( n,m) ) = qnnod m∈N n

(7) for n = 1,2,..., N where the terms on the left side of the equation represent the branch flows connected to the node n; Nn is a set of nodes connected to the node n; Λ n , j ( n ,m) is an element of Λ corresponding to the node n and branch j(n,m), ∆ h j ( n, m) is the head drop between the origin and destination nodes of the branch, g n, m is a conductance of the branch. 2.1 Linearised model A linearised version of the model (5) describes the relationship between small changes in nodal quantities, heads and flows δ h, δ q nod about a given

operating point defined by the head h0 and nodal flow q nod ,0 . dQ T (8) Λ Λ × δ h = δ q nod d∆h ∆

dQ T Λ is called the Jacobian of d∆h the model (5) and −0.46 J dQ  (9) = diag  0.54 g j ∆ h j  j =1  d ∆h

where A = Λ

is a J×J diagonal matrix obtain from the differentiating of the vector function Q( ∆ h) . Properties of the Jacobian matrix A are summarised in Theorem 1. Theorem 1 1. Jacobian A is a N×N symmetric matrix. 2. The diagonal elements of A are equal to (10) An, n = ∑ 0.54 g n, m | hn − hm |− 0.46 m∈N n

The non-diagonal elements in a row n are  −0.54 g n ,m | hn − hm |− 0.46 for m ∈ N n An ,m =  for m ∉ N n 0 (11) 3. Jacobian A has a dominant diagonal, and in each row the diagonal element equals to the sum of the non-diagonal elements with the opposite sign. (12) An ,n = − ∑ An ,m m∈N n

4. The matrix A is positive semidefinite. The theorem is an implication of the special dQ T structure of the Jacobian matrix A = Λ Λ . d∆h Let’s, for a given operating point, introduce the notion of linearised branch conductance ∆

g~n,m = 0.54 gn,m | hn0 − hm0 |− 0.46

(13)

and linearised node conductance ∆

g~n =

∑ 0.54 gn,m | hn0 − hm0 |− 0.46 = ∑ g~n,m

m∈N n

(14)

m∈N n

which is a sum of conductance of all branches connected to the node. With these denotations the linearised model (8) be represented as

 g~1  − g~  2,1  ...  ~ − g N ,1

− g~1,2 g~2 ... − g~ N ,2

... − g~1, N   δ h1  ... − g~2, N   δ h2   =   ...  ...   g~ N  δ h N  ...

δ q1nod   nod  δ q 2   ...   nod  δ q N 

(15) The matrix A is sparse and for a row n the elements g~n, m are non-zero for nodes connected to the node n (i.e., m ∈ N n ), and zero for other nodes, additionally from (12) it is clear that the diagonal element is a sum of non-diagonal elements ~ gn = ∑ ~ g n, m . m∈N n

Another useful interpretation of the linearised model (8) is obtained by grouping relevant terms, namely dQ Λ ( ΛT δ h) = δ q nod ⇒ d ∆h dQ (16) Λ δ ∆ h = δ q nod d∆h where δ ∆ h is the variation of the head drop vector ∆ h about the given operating point. Equation 16 corresponds to N scalar equations, each describing the linearised mass balance at a node. For a node n is

∑ Λ n, j( n,m) g~n,m × (δ ∆ h j( n,m) ) = δ qnnod

(17)

m∈N n

for n = 1,2,..., N Each term on the left side of Equation 17 represent a flow in a branch connected to node n, and complies with the standard Ohm’s law; the flow is equal to the conductance of the branch ~ g n,m multiplied by the branch head drop δ ∆ h j ( n,m) . The model (17) is a linearised version of the model (7) and clearly, there is a one to one mapping between these two models. Corollary 1. There is one to one mapping between the nonlinear model (7) and the linearised model (17), (for a given operating point). Both models have the same topology and the relationship between the non-linear branch conductance g n ,m and the linear branch conductance g~ is given by n ,m

g~n ,m = 0.54 g n ,m | hn0 − hm0 |− 0.46 .

(18)

3. OUTLINE OF THE MODEL REDUCTION PROCEDURE

from the model it is necessary to apply one step of the Gauss-elimination procedure

The paper describes a methodology for reducing models of non-linear networks. The initial network and the target network are built with the same type of components and they are equivalent with respect to the pre-defined criteria. In water network analysis the original networks are built for simulation purposes and may contain many thousands of nodes and branches. In order to solve optimisation tasks a reduced model is required which can contain only tens of nodes corresponding to the critical nodes at which pressure is monitored. However it is expected that relationships between heads and demands are similar in both the full and reduced models . The approach proposed here does it automatically by the following steps: 1. Create a full non-linear model. 2. Linearise this model. 3. Reduce the linear model using the Gauss elimination procedure. 4. Retrieve a reduced non-linear model from the reduced linear model. It is clear from the proposed procedure that the full model and the reduced model are ‘tangent’ to the same linearised model at a given operating point. However, the reduced non-linear model preserves the ‘curvature’ of the original model and approximates the original model accurately in a wider range of operating conditions than the linear model would do. This paper does not provide an analytical evaluation of the accuracy of the approach however extensive numerical experience indicates that the achieved accuracy in terms of heads is about 2% for a wide range of operating conditions and reduced models were used successfully for solving different optimisation problems for water networks (Ulanicki, and Matz, 1995). In the previous section the nonlinear and linearised models of water networks were investigated, which correspond to Steps 1 of 2 of the above reduction procedure. In the following sections, we will investigate properties of the Gausselimination procedure applied to the linearised network model and then the process of retrieving a non-linear reduced model from the linear reduced model.

~ g~2 ,1 ~  ~ ~ − g 2 ,1 g~ )  − − g g g ( ) .. ( 2 1,2 2, N 1, N   δ h   2 g~1 g~1    .. ... ...   ...   ~ ~ ( − g~ − g N ,1 g~ ) .. ( g~ − g N ,1 g~ )  δ h  1, N 1,2 N N ,2  N   g~1 g~1    nod g~2 ,1 nod   δ q 2 + g~ δ q1  1   = (19) ...  ~ g 1 N , nod nod δ q + ~ δ q1    N g1  

4. LINEAR MODEL REDUCTION The process of the Gauss-elimination (Hammerlin, and Hoffman 1991), will be applied to the linearised model given by (15). For example, to remove node 1

The

reduced

model

involves

variables

δ h2 , δ h3 ,..., δ hN , whereas the variable δ h1 was removed from the model. The nodal flow δ q1nod was

redistributed among other nodes connected to node 1. The matrix A has a dominant diagonal so the normal Gauss-elimination is numerically stable and is equivalent to the elimination with pivoting. If r nodes are to be removed from the model then the corresponding rows have be placed at the first r positions in the matrix A, and r steps of the Gausselimination procedure are to be performed. The full model will be called N-model, and the reduced model will be called (N-r)-model with the Jacobian matrix A( r ) , and the nodal flow vector q ( r ) nod . With these denotations the reduced (N-r) model takes the form δ hr +1  (20) A  ...  = δ q ( r ) nod  δ hN  The properties of the Gauss elimination procedure applied to the linearised model (15) are summarised in Theorem 2. Theorem 2 The Gauss-elimination procedure preserves the properties of the model described by Theorem 1 and total nodal flow, specifically: 1. Matrix A ( r ) is a ( N - r ) × ( N - r ) symmetric matrix 2. Matrix A ( r ) has a dominant diagonal, and in each row the diagonal element equals to the sum of the non-diagonal elements with the opposite sign. (r )

N −r

An( r, n) = − ∑ An( r, m)

(21)

m =1 m≠ n

3. Matrix A( r ) is a positive semidefinite matrix 4. The total nodal flows in the N-model and (N-r)model are the same, i.e., N

∑δ n =1

qnnod

=

N −r

∑δ n =1

qn( r ) nod

(22)

The proof can be completed with the mathematical induction. The Gauss-elimination procedure is equivalent to multiplying both sides of the original model by a special matrix (Hammerlin, and Hoffman 1991), which will be denoted here by P ( r ) , hence, for example the right side of Equation 20 can be presented as (23) δ q( r ) nod = P( r ) × δ q nod 4.1 Physical interpretation of the linear reduction The reduction procedure illustrated by Equation (19) has a direct physical interpretation. Assume that node 1, connected to nodes from the set N1 as shown in Figure 2, will be removed from the model. 1 δ q1nod ~ g 1, n1

~ g 1,n2 ~ g n1 , n 2

n1

δ qnnod 1

n2

δ qnnod 2 N1

Figure 2. Network before node 1 removal If n1 and n2 ∈ N1 then the linear conductance between these nodes is modified. If the previous conductance was g~n1 ,n2 then the new conductance will be g~n1 ,1 ~ ~ (24) g n1 , n2 + ~ g1, n2 g 1

Moreover, if there was no branch between the nodes n1 and n2 a new branch would appear with the g~n1 ,1 ~ conductance ~ g1,n2 . The formula (30) can be g1 interpreted as a parallel connection of g~ and a n1 , n 2

composite branch which in turn comprises the series connection of g~n1 ,1 and g~1,n2 . However, when calculating an equivalent conductance for the series connection the product g~n1 ,1 × g~1,n2 is divided by the nodal conductance g~ rather than by the sum of these 1

two branches conductance. The nodal flow q1nod is redistributed between nodes connected to node 1, proportionally to the conductance of each branch, so the new nodal flows are g~( n +1,1) δ q nnod + δ q1nod n = 1,..., N − 1 (25) +1 ~ g 1

The reduced network, after node 1 removal, is shown in Figure 3 ~ g n ,1 ~ ~ g n1 ,n2 + ~1 g 1,n2 n1 g1 n2

+ δ qnnod 1

~ g ( n1 ,1) nod ~ δ q1 g 1

+ δ qnnod 2

~ g ( n2 ,1) δ q1nod ~ g 1

N1

Figure 3. Network after node 1 removal 5. RECOVERING A NON-LINEAR MODEL FROM THE REDUCED LINEAR MODEL Since the reduced linear model A( r ) preserves all the properties of the full linear model it can be considered as a linear network of conductance elements. The reduced model has (N-r) nodes and a new topology. The new topology can be read from the reduced matrix A( r ) . A non-zero entry at a position ( n1 , n2 ) indicates a branch between nodes n1 and n2 , a zero entry indicates no connection between the nodes. The new node-branch incidence matrix will be denoted by Λ( r ) , where N ( r ) and J ( r ) will be the number of nodes and branches respectively in the reduced model. Since the reduced model (20) preservers all of the characteristics of the full model

it can be presented in the form equivalent to Equation 8 dQ ( r ) ( r )T (26) × δ h( r ) = δ q ( r ) nod Λ Λ( r ) (r ) d∆h where (r ) dQ( r ) = diag g~n( ,rm) Jj =1 is a J ( r ) × J ( r ) (r ) d∆h diagonal matrix, g~ ( r ) is the new linear branch

[ ]

j ( n, m)

conductance, and δ q ( r ) nod is given by (23). Corollary 1 has established the one to one mapping between non-linear model (7) and linearised model (17). A non-linear model corresponding to the linear model (26) can be presented as (27) Λ( r ) Q( r ) ( Λ( r )T h( r ) ) = P ( r ) q nod

the south-west area of London, UK. The original network model fpk (Finsbury Park area, London) contains 60 nodes, 124 elements, 4 reservoirs (Figure 4). There are 4 devices among the elements in this network: 1 fixed speed pump, 1 variable control valve, 1 pressure reducing valve and 1 closed pipe element. During the reduction 50 connection nodes were removed. Afterwards the network consists of 10 nodes and 19 elements (Figure 5), this include all 4 reservoir nodes and all nodes connected to non-pipe elements. Additionally it includes two further connection nodes (272 and 212).

where Q( r ) ( ∆ h( r ) ) is a J ( r ) vector function describing the non-linear branch law (1) for all new components j = 1,2,..., J ( r ) , and the new non-linear branch conductance g n( r, m) satisfies the relationship equivalent to Equation (18), (28) g n( r,m) 0.54 | hn0 − hm0 |− 0.46 = g~n( ,rm) The results of the above discussion are formalised in Theorem 3. Theorem 3 Given the full non-linear model (5), and the operating point ( h 0 , q nod ,0 ) , the linearisation of the model (27) leads to the reduced linear model (20).

Figure 4. Finsbury Park Network

The proof is done by checking the steps of the linearisation procedure starting with the model (27). 6. CASE STUDIES Using the ideas presented in this paper a software package was implemented in the C-language. The program works according to the following algorithm: 1. Prepare a file with full network model, 2. Calculate the operating point ( h 0 , q nod ,0 ) . 3. Choose nodes to be removed from the model. 4. Carry out model reduction procedure. 5. Generate file containing the reduced model. This section contains the results for two network models: the medium size network for the Finsbury Park area of London; and the large scale network of

Figure 5. Reduced Finsbury Park Network Figure 6 shows the head trajectories for these two junction nodes. The solid line represents the original network model whereas the dashed line shows the simulation results for the reduced model. The time chosen for the static simulation to determine the operating point for the linearisation was t0=12h. The operating point was calculated using the GINAS simulation package (Coulbeck, et. al. 1985). The diagrams show that the simplified model is very accurate, and errors were less than 1%.

Figure 8. Reduced swacm network

Figure 6. Head at nodes 212 and 272 More calculations were executed for different operating points. The results demonstrated that by changing the operating point, slightly different simulation results of the simplified network can be reached. Therefore, the user of the simplification program can run several simplifications with different operating points to find the simplified model that best suits her needs. Preferably, a time when the system is in the middle of its operating band should be chosen as the simulation time to obtain the operating point.

The results are shown at the two connection nodes where errors were the most significant. The differences between the simulation results of the original and simplified network model are mostly less than 1% (Figure 9). Different operating points were tried in order to improve the obtained results.

The swacm is a model of the water distribution network in the South West area of London shown in Figure 7.

Figure 7. swacm network It contains 797 nodes and 1088 elements. Among these elements are 103 devices different from pipes. In order to retain five important junction nodes in the network model, 654 nodes can be dismissed. The simplified network model can be seen in Figure 8.

Figure 9. Relative errors at connection nodes 7. CONCLUSIONS The method presented in the paper performs the model reduction by transferring the problem into a linear domain and then back into the non-linear domain. A user selects nodes to be removed from the model and the algorithm calculates the topology and the parameters of the components of the reduced network. The method is invariant with respect to the total load and operating point defined by the nodal

variables. From the algorithmic point of view the method is very simple and fast. A model containing many thousands of components can be reduced in a matter of seconds. The method is also very robust and has direct physical interpretation. The algorithm can be implemented on a computer or be executed manually and is very similar to finding an equivalent resistance for electrical networks. The case studies indicate that the reduced models are valid in a wide range of operating conditions, and are more accurate than straightforward linear models. The method was used to prepare many models for optimisation studies (Ulanicki and Matz,1995). 8. REFERENCES [1]

[2]

[3]

[4]

[5]

[6]

[7]

[8]

Balabanian, N. and Bickart, T. A., (1969), Electrical Network Theory, John Wiley and Sons, New York. Brdys, M. A. and Ulanicki, B., (1994), Operational Control of Water Systems, Prentice Hall International, New York, London, Toronto, Sydney, Tokyo, Singapore. Coulbeck, B., Orr, C. H. and Cunningham, A. E., Computer Control of Water Supply: GINAS 5 Reference Manual, Research Report No. 56, School of Electronic and Electrical Engineering, Leicester Polytechnic, UK, 1985. DeMoyer, R. and Horwitz, L. B (1975)., A System Approach to Water Distribution Modelling and Control, Lexington Books, USA. Hammerlin, G., and Hoffman K.H., (1991), Numerical Mathematics, Springer-Verlag, Graduate Texts in Mathematics, New York, Berlin, Heidelberg, London. Ulanicki, B., (1993), Modelling and Optimisation Methods for Simulation, Control and Design of Water Distribution Systems, Publisher-Wydawnictwa Politechniki Bialostockiej, Bialystok, Poland, ISSN 0876096X (in Polish). Ulanicki B. and Matz, H., (1995), Non-linear programming and Mixed-Integer Approach for optimal Scheduling and Optimal design of water Networks, Research Report No. 16, Water Software Systems, De Montfort University, Leicester, UK. Zehnpfund, A. and Ulanicki, B., (1993), Water Network Model Simplification, Research Report No. 10, Water Software

[9]

Systems, De Montfort University, Leicester, UK. Zessler, U. and Shamir, U. (1989), Optimal Operation of Water Distribution Systems, Journal of Water Resources Planning and Management, 115(6).