THE USE OF ROBUST OBSERVERS IN THE SIMULATION OF GAS SUPPLY NETWORKS

Similar documents
n i,j+1/2 q i,j * qi+1,j * S i+1/2,j

The Solution of Linear Systems AX = B

Anumerical and analytical study of the free convection thermal boundary layer or wall jet at

REGLERTEKNIK AUTOMATIC CONTROL LINKÖPING

NP-hardness of the stable matrix in unit interval family problem in discrete time

Renormalization Group analysis of 2D Ising model

Chapter 7 Interconnected Systems and Feedback: Well-Posedness, Stability, and Performance 7. Introduction Feedback control is a powerful approach to o

JACOBI S ITERATION METHOD

System theory and system identification of compartmental systems Hof, Jacoba Marchiena van den

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

A JACOBI-DAVIDSON ITERATION METHOD FOR LINEAR EIGENVALUE PROBLEMS. GERARD L.G. SLEIJPEN y AND HENK A. VAN DER VORST y

Lie Groups for 2D and 3D Transformations

BOUNDARY CONDITION IDENTIFICATION BY SOLVING CHARACTERISTIC EQUATIONS

Time-Varying Systems and Computations Lecture 3

DELFT UNIVERSITY OF TECHNOLOGY

Economics 472. Lecture 10. where we will refer to y t as a m-vector of endogenous variables, x t as a q-vector of exogenous variables,

1 Solutions to selected problems

Taylor series based nite dierence approximations of higher-degree derivatives

A characterization of consistency of model weights given partial information in normal linear models

Linear Algebra (part 1) : Matrices and Systems of Linear Equations (by Evan Dummit, 2016, v. 2.02)

MULTIGRID PRECONDITIONING FOR THE BIHARMONIC DIRICHLET PROBLEM M. R. HANISCH

MODELLING OF FLEXIBLE MECHANICAL SYSTEMS THROUGH APPROXIMATED EIGENFUNCTIONS L. Menini A. Tornambe L. Zaccarian Dip. Informatica, Sistemi e Produzione

Boxlets: a Fast Convolution Algorithm for. Signal Processing and Neural Networks. Patrice Y. Simard, Leon Bottou, Patrick Haner and Yann LeCun

Solution of the Two-Dimensional Steady State Heat Conduction using the Finite Volume Method

1 Outline Part I: Linear Programming (LP) Interior-Point Approach 1. Simplex Approach Comparison Part II: Semidenite Programming (SDP) Concludin

1 Introduction 198; Dugard et al, 198; Dugard et al, 198) A delay matrix in such a lower triangular form is called an interactor matrix, and almost co

Algebra C Numerical Linear Algebra Sample Exam Problems

Linear Algebra (part 1) : Vector Spaces (by Evan Dummit, 2017, v. 1.07) 1.1 The Formal Denition of a Vector Space

4.1 Eigenvalues, Eigenvectors, and The Characteristic Polynomial

Welsh s problem on the number of bases of matroids

ON THE QR ITERATIONS OF REAL MATRICES

Mathematics Research Report No. MRR 003{96, HIGH RESOLUTION POTENTIAL FLOW METHODS IN OIL EXPLORATION Stephen Roberts 1 and Stephan Matthai 2 3rd Febr

1. Introduction Let the least value of an objective function F (x), x2r n, be required, where F (x) can be calculated for any vector of variables x2r

PROOF OF TWO MATRIX THEOREMS VIA TRIANGULAR FACTORIZATIONS ROY MATHIAS

Notes for CS542G (Iterative Solvers for Linear Systems)

Boundary-Layer Transition. and. NASA Langley Research Center, Hampton, VA Abstract

MATH 205C: STATIONARY PHASE LEMMA

Contents. 2.1 Vectors in R n. Linear Algebra (part 2) : Vector Spaces (by Evan Dummit, 2017, v. 2.50) 2 Vector Spaces

2. How Tracks are Measured Charged particle tracks in high energy physics experiments are measured through a two step process. First, detector measure

The solution of the discretized incompressible Navier-Stokes equations with iterative methods

1 Matrices and Systems of Linear Equations

12.4 Known Channel (Water-Filling Solution)

LECTURE 15 + C+F. = A 11 x 1x1 +2A 12 x 1x2 + A 22 x 2x2 + B 1 x 1 + B 2 x 2. xi y 2 = ~y 2 (x 1 ;x 2 ) x 2 = ~x 2 (y 1 ;y 2 1

Midterm for Introduction to Numerical Analysis I, AMSC/CMSC 466, on 10/29/2015

Anisotropic grid-based formulas. for subgrid-scale models. By G.-H. Cottet 1 AND A. A. Wray

Archive of SID. Archive of SID.

Outline Background Schur-Horn Theorem Mirsky Theorem Sing-Thompson Theorem Weyl-Horn Theorem A Recursive Algorithm The Building Block Case The Origina

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

Preconditioned Conjugate Gradient-Like Methods for. Nonsymmetric Linear Systems 1. Ulrike Meier Yang 2. July 19, 1994

Introduction Wavelet shrinage methods have been very successful in nonparametric regression. But so far most of the wavelet regression methods have be

Viscous Fluids. Amanda Meier. December 14th, 2011

Velocity distribution in active particles systems, Supplemental Material

MANY BILLS OF CONCERN TO PUBLIC

Rening the submesh strategy in the two-level nite element method: application to the advection diusion equation

Math 1270 Honors ODE I Fall, 2008 Class notes # 14. x 0 = F (x; y) y 0 = G (x; y) u 0 = au + bv = cu + dv

Notes on the matrix exponential

c 1995 Society for Industrial and Applied Mathematics Vol. 37, No. 1, pp , March

Numerical computation of three-dimensional incompressible Navier Stokes equations in primitive variable form by DQ method

Technical Appendix: The Optimum Quantity of Debt y. November 1995

Computation of Kronecker-like forms of periodic matrix pairs

Solutions Preliminary Examination in Numerical Analysis January, 2017

Linear algebra for computational statistics

Calculus and linear algebra for biomedical engineering Week 3: Matrices, linear systems of equations, and the Gauss algorithm

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

Eigenvalues and Eigenvectors: An Introduction

Reference values for drag and lift of a two-dimensional time-dependent ow around a cylinder

Iterative Methods. Splitting Methods

Math Camp Notes: Linear Algebra I

Heat and Mass Transfer over Cooled Horizontal Tubes 333 x-component of the velocity: y2 u = g sin x y : (4) r 2 The y-component of the velocity eld is

5 Eigenvalues and Diagonalization

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Application of turbulence. models to high-lift airfoils. By Georgi Kalitzin

Linear Algebra: Linear Systems and Matrices - Quadratic Forms and Deniteness - Eigenvalues and Markov Chains

2 Dilution of Proteins Due to Cell Growth

Linear Prediction Theory

Linear stochastic approximation driven by slowly varying Markov chains

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

Numerical Integration for Multivariable. October Abstract. We consider the numerical integration of functions with point singularities over

Simon S. Clift and Peter A. Forsyth. Abstract. In this study, the discretized nite volume form of the two dimensional, incompressible Navier

23.1 Chapter 8 Two-Body Central Force Problem (con)

SECTION: CONTINUOUS OPTIMISATION LECTURE 4: QUASI-NEWTON METHODS

Outline Introduction: Problem Description Diculties Algebraic Structure: Algebraic Varieties Rank Decient Toeplitz Matrices Constructing Lower Rank St

Review for Exam Find all a for which the following linear system has no solutions, one solution, and infinitely many solutions.

Copositive Plus Matrices

Reduction of two-loop Feynman integrals. Rob Verheyen

Eigenvalues and Eigenvectors

Numerical techniques. Chapter Difference equations

16 Chapter 3. Separation Properties, Principal Pivot Transforms, Classes... for all j 2 J is said to be a subcomplementary vector of variables for (3.

Lecture # 20 The Preconditioned Conjugate Gradient Method

Multiple integrals: Sufficient conditions for a local minimum, Jacobi and Weierstrass-type conditions

ELEMENTARY LINEAR ALGEBRA WITH APPLICATIONS. 1. Linear Equations and Matrices

Chapter 4: Interpolation and Approximation. October 28, 2005

Institute for Advanced Computer Studies. Department of Computer Science. On Markov Chains with Sluggish Transients. G. W. Stewart y.

An exploration of matrix equilibration

Refined Inertia of Matrix Patterns

LECTURE VII: THE JORDAN CANONICAL FORM MAT FALL 2006 PRINCETON UNIVERSITY. [See also Appendix B in the book]

REPORTRAPPORT. Centrum voor Wiskunde en Informatica. Asymptotics of zeros of incomplete gamma functions. N.M. Temme

1 Background The Nonlinear Schrodinger (t; x) =i (t; x)+ij (t; x)j2 (t; x); t ; x 2 D (1) is a generic model for the slowly varyi

Chapter 9 Observers, Model-based Controllers 9. Introduction In here we deal with the general case where only a subset of the states, or linear combin

MIT Final Exam Solutions, Spring 2017

Transcription:

UNIVERSITY OF READING DEPARTMENT OF MATHEMATICS THE USE OF ROBUST OBSERVERS IN THE SIMULATION OF GAS SUPPLY NETWORKS by SIMON M. STRINGER This thesis is submitted forthe degree of Doctorof Philosophy NOVEMBER 199

Abstract For any gas networ, it is desirable to have a reasonable estimate of the demand ows. However, ow meters are much more expensive than pressure sensors to install, and so it would be economical to be able to estimate the ow demands from pressure measurements alone. In this thesis, both model and observer based methods for estimating unmeasured ow demands in linear gas networs with sparse pressure telemetry are investigated. Firstly, we introduce the basic gas networ model in the form of a linear time invariant descriptor system, which requires the upstream pressure and all ow demands as inputs. Thus the basic model is useless forestimating the ow demands since these are needed to drive the model. Hence, we proceed to derive rearranged and augmented gas networ models that contain the ow demands in their state vectors, and that are capable of ow demand estimation. The rst two ow estimation models investigated are simply pressure driven models that have theirsystem eigenvalues within the unit circle. These models are capable of asymptotically estimating the ow demands. We next explore a model constructed by incorporating trivial dierence equations of the form Two techniques for constructing f low demand = f low demand : robust +1 completely observable observers are employed: robust eigenstructure assignment and singular value assignment. These are shown to help reduce the eects of the modelling error introduced by the above trivial dierence equations. Such modelling error is then further reduced by maing use of the nown time proles for the ow demands. Unfortunately, the pressure measurements available are subject to constant bias and white noise. The measurement biases very badly degrade the ow demand estimates, and so must be estimated. This is achieved by constructing a further model variation that incorporates the biases into an augmented state vector, but now includes information about the ow demand proles in a new form, which allows the estimation of the measurement biases, as well as the ow demands themselves. Finally, less sensitive ow estimation models are presented with smoothing techniques to reduce the eects of measurement noise. ii

Acnowledgements I would lie to than my academic supervisor, Dr Nancy Nichols, for my introduction to the mathematics of the real world; and than British Gas for giving me the opportunity to wor on such an interesting practical problem. I would also lie to than my industrial supervisors, Dr John Piggott, Dr Alan Lowdon, Dr Jim Mallinson and Mr Michael Gardiner, for their encouragement during my three years at Reading. Finally, I would lie to acnowledge both the Science and Engineering Research Council and British Gas fortheirnancial support forthe period of my studies. iii

Contents 1 Introduction 1 The Standard System Model ( ) 5.1 The Linearised Dierential Equations Governing Gas Pipe Dynamics : : 5. The Finite Dierence Approximation : : : : : : : : : : : : : : : : : : : 9. The Networ Model : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11. Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 M Formulation of a New 1 Variant Model.1 Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : M M Formulation of a New Variant Model 5.1 Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 9. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 5 Observers 5.1 Observability : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5. Design A : The Direct Observer : : : : : : : : : : : : : : : : : : : : : : 5. Design B : The Dynamic Observer : : : : : : : : : : : : : : : : : : : : : 8 5..1 Eigenvalue Assignment Technique: Eigenstructure Assignment : 9 5. Design C : The Dynamic Observer with Feedbac at the Current Time level 5 5..1 SingularValue Assignment : : : : : : : : : : : : : : : : : : : : : 5 iv

Formulation of a New Variant Model for Use in Direct and Dynamic Observers 59.1 Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :. Weighted Models : : : : : : : : : : : : : : : : : : : : : : : : : : : :. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :..1 Experiments with weightings, ~ demand site no f, included in the trivial ow demand dierence equations : : : : : : : : : : : : : : : : : : 8.. Experiments with weightings, ~ demand site f, included in the trivial ow demand dierence equations : : : : : : : : : : : : : : : : : : 8. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 88..1 Observer Design A : The Direct Observer : : : : : : : : : : : : : 88.. Observer Design B : The Dynamic Observer Without Feedbac at the Current Time-Level : : : : : : : : : : : : : : : : : : : : : : : 88.. Observer Design C : The Dynamic Observer With Feedbac at the Current Time-Level : : : : : : : : : : : : : : : : : : : : : : : : : 9 Cycling 95.1 Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 8 The Eects of Pressure Measurement Bias on 1 and Models, and M MM M M Model Based Observers 11 8.1 1 Models : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 111 8. Models : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 8. Observers Constructed Upon Models : : : : : : : : : : : : : : : : : 119 8..1 The Direct Observer : : : : : : : : : : : : : : : : : : : : : : : : 1 8.. The Dynamic Observers : : : : : : : : : : : : : : : : : : : : : : 1 8. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 8.5 Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 M M 9 Measurement Bias and Models 1 9.1 Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 9. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 M M v

9. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 151 1 White Noise, Flow Integration Smoothing Techniques, 5 and Models. 15 1.1 The Eects of White Noise on the State Estimation Techniques Presented So Far15 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1.1.1 Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 1.1. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 M 1. The Flow Integration Smoothing Technique : : : : : : : : : : : : : 15 1..1 Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19 M 1. The Flow Integration Smoothing Technique : : : : : : : : : : : : : 19 1..1 Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 M 1. The 5 Model : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1..1 Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19 1.. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19 M 1.5 The Model : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19 1.5.1 Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 195 1.5. Experiments : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 199 1.5. Discussion : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 11 Final Conclusions and Proposals for Future Wor 1 1 Appendix 1 1.1 Model Parameters for Experiments : : : : : : : : : : : : : : : : : : : : : 1 1. Theorems : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 M M vi

Chapter 1 Introduction For any gas networ, it is desirable to have a reasonable estimate of the demand ows. However, ow meters are much more expensive than pressure sensors to install, and so it would be economical to be able to estimate the ow demands from pressure measurements alone. In this thesis, both model and observer based methods for estimating unmeasured ow demands in linear gas networs with sparse pressure telemetry are investigated. Two techniques for constructing robust observers are employed:robust eigenstructure assignment [], [5], and singular value assignment [], []. The gas networs considered are linear and consist of a number of pipe sections with a gas source at the upstream end and ow demands at pipe junctions and at the downstream end. For example, for a three pipe networ we would have À! À! À! À! À! À! Upstream Source Pipe Section a Pipe Section b Pipe Section c Downstream Demand # # Junction Demand Junction Demand We assume the only measurements of the real gas networ available are discrete pressure measurements at all sites of gas inow (the upstream end) and outow (the pipe junctions and downstream end). These measurement sites are the natural `boundaries' of the networ, where some data (pressure or ow demand) need to be specied to drive a networ model. 1

In chapter we introduce the basic gas networ model from [], based on two partial dierential equations for modelling natural gas ow in high pressure pipelines, derived by mass and momentum balance arguments [19], []. Such a model, which we denote by, is in the form of a linear time invariant descriptor system 1 Ex( + 1) = Ax( ) + Bu( + 1) + Bu( ) which results from linearising the original dierential equations about a steady state and discretising the linearised equations using the -method []. All pressure and ow variables are thus perturbations away from that steady state. An the upstream pressure and all ow demands as inputs; thus an model requires model is useless for estimating the ow demands since these are needed to drive the model. Hence, we proceed to derive rearranged and augmented gas networ models that are capable of ow demand estimation. The major advantage of this linear time-invariant model over other time-varying or non-linear models [18], [1], is that we may use the large amount of control theory that already exists for linear time-invariant systems. In chapter, we investigate a new gas networ model variation, denoted by 1, which requires only pressure measurements as inputs. Such a model can be shown to be asymptotically stable and allows asymptotic estimation of the pressure proles. From these pressure proles the ow demands may be estimated. In chapter we investigate a further rearrangement of the basic by model to give a new model variation, denoted, with the ow demands now moved into the state vector. Such a model can also be shown to be asymptotically stable (under slightly more restrictive conditions) and allows asymptotic estimation of the ow demands. However, due to a dierent dierence approximation, than 1 models. models are shown to allow more accurate ow demand estimation In chapter 5, we discuss techniques, nown collectively as, capable of estimating the entire system state of discrete dynamical systems that have the property of M M M M complete observability M [9], []. In particular, two techniques for constructing observers are described:robust eigenstructure assignment and singular value assignment. In chapter we introduce a further gas networ model variation, denoted by, that contains the ow demands in its state vector, but which is also completely observable, and for which we may construct observers. An M M M observers M M robust model is constructed by incorporating

trivial dierence equations of the form f low demand = f low demand : Obviously, if such a model were run, the estimates of the ow demands would not change. However, if the ow demands change slowly with time, then observers constructed upon such models can trac the ow demands fairly well; although the above dierence equation for the ows will contain some modelling error. Such trivial dierence equations have been used previously for both lea detection [] and state estimation []. Experimental and theoretical evidence is given to show how the two techniques, robust eigenstructure assignment and singular value assignment, reduce the eects of the above modelling error upon the observer state estimate. The +1 model is further developed by maing use of the nown time proles for the ow demands to remove the modelling error introduced by the above trivial dierence equations. The new trivial dierence equations for the ow demands become demand site demand site f low demand = f low demand + f +1 demand site where the f may be estimated from the telemetry from other measured demand M ows. In chapter, we introduce a new observer technique, which we term `cycling'. Cycling involves a series of dynamic observers, travelling along the time axis, one after another. Each dynamic observer uses information about the ow demand proles given by the previous observer. The convergence properties of this type of cycling technique are investigated theoretically. In chapter 8 we investigate the eects of measurement bias on the various state estimation techniques. It may be the case that the pressure measurements at the sites of ow demand are subject to a constant bias, i.e. instead of using a true value for p ( ), the vector of pressures at the sites of gas inow and gas outow, we drive the models and observers with p ( ) = p ( )+ b measured where b represents a vector of constant biases. These constant biases will introduce error into the state estimates of the dierent estimation techniques. This is a serious problem for ow demand estimation due to the sensitivity of the ow demand variables demand site

to perturbations in the pressures. In chapter 9 a standard approach from [] is explored but shown to be inadequate without a new approach to encoding information about the ow demand time proles. We investigate a further model variation, denoted by, capable of estimating both ow demands and pressure measurement bias, but which uses trivial dierence equations for the ow demands of the form where the w demand site demand site f low demand = w f low demand +1 are estimated from other measured ow demands. This new way of incorporating information about the ow proles allows the estimation of the measurement biases, as well as the ow demands themselves. However, the models have time-varying system matrices and basic control theory for time-invariant systems does not always extend to time-varying systems [1], [], [], []. Our observer designs must also be modied [15]. In chapter 1 we examine the problem of measurement white noise. We avoid Kalman lters due to their unexceptional performance in [1], [], [5], and instead examine two simple smoothing techniques, and derive two nal model variations, 5 and, to deal with the problem of the sensitivity of the ow demand estimates. 5 and models have only a single total ow demand perturbation state variable that is the sum of all the individual demand ow perturbation variables. Such models are less sensitive to pressure measurement noise. Finally, in chapter 11 we mae some nal conclusions and suggest some proposals for future wor. M M M M M M

Chapter The Standard System Model ( M) In this chapter, the standard underlying model, based directly on [], is constructed for a simple linear networ with demand ows. This initial model, which we denote as an M model, actually assumes that all ow demands are measured and used as inputs to drive the model. Hence, obviously an estimation. M model, itself, cannot be used for ow demand.1 The Linearised Dierential Equations Governing Gas Pipe Dynamics Firstly, we derive the linearised equations governing gas dynamics in a single section of pipe. For each section, from [], we have the following two equations À1 D ( P ) + (1 P) Q Q = ; (: 1) x the momentum balance equation ignoring time variations in Q, and D ( P) + (1 P) D ( Q ) = ; (: ) t 1 the mass balance equation, where: P( x;t) is the gas pressure in bar Qx;t ( ) is the mass ow rate in m.s.c.m.h. (millions of standard cubic metres per hour) j j x x is distance along pipe in metres 5

t is time in hours 1 ;;;are constants, and D, D are partial derivatives with respect to x and t respectively. is used in the linear expression for compressibility, Z = 1 P, which is L, with constant cross- always positive. We begin by modelling a straight section of pipe of length sectional area. For computational ease, we normalise the pipe section length, pressure and mass ow rate: x x=l ; P P=N ; Q Q=N (: ) where N and N are positive constants which are chosen such that P ; Q 1: The normalisation results in!!!!!!! D (1 =L) D ; N ; ( LN )( = N ); ( N )( = LN ): () : The normalised equations (.1) and (.) are, therefore, to be solved for <x< 1 and t>. The boundary and initial conditions are yet to be specied. Our approach is to linearise about a mass ow rate and pressure prole in order to obtain two linear equations which approximate equations (.1) and (.). Our mass ow rate and pressure prole are Q p q x x p Qx;t ( ) = ; (: 5) P( x;t) = ( x ); (: ) where is a positive constant mass ow rate from x = to x = 1, and ( x) is the constant pressure prole. Substituting (.5) and (.) into equation (.1) gives x P t P Q P Q D ( )+ (1 ) = ; x 1 1 1 p q q p q p j j j j P which is equivalent to P P P Q ( D ( )) = (1 ) + = ; (: ) x 1 which is permissible because the compressibility, Z = 1 P, is always positive. But P P P P P À1 ( D ( )) = (1 ) ( =) D ( + ln(1 )); x x

which can be substituted into (.) to give ( =) D ( + À1 ln(1 )) + = : P P Q x 1 This is easily integrated from to x and then rearranged to give P P P P Q ( x) + ln(1 ( x)) = () + ln(1 ()) + x; (: 8) where = =. For each pipe section in the networ, equation (.8) is used to nd 1 a consistent steady state pressure prole, Q P ( x), about which to linearise. An assumed steady value for the inline ow, and a value for () are substituted into equation (.8), and then a steady pressure prole is generated using an iterative technique such as Newton's [], [5]. P Now let P P ( x; t) = ( x) + p( x; t ); (: 9) Qx;t ( ) = + qx;t; ( ) (: 1) where q and p are perturbations about the mass ow rate and pressure prole and are Q smaller in magnitude than and respectively. We can thus assume that P and Q are positive and substitute equations (.9) and (.1) into equation (.1) to get D ( + p) + (1 p)( + q ) = ; which can be linearised by expanding the ( + q) term using the binomial theorem, neglecting all the second order terms and cancelling out the terms corresponding to equation (.). Thus we derive which can be rearranged into x P Q P P Q D ( p)+ (1 ) À1 q = p; x 1 Q P P Q Q 1 1 q = = P P Q Dx( p) Dx( ) p+ 1 p QÀ1 1 (1 P) Dx( p) (1 ) Dx( ) p+ 1 p= (1 ) ; À1 P Q P Q 1 where P P P ( ) = = (1 ); (: 11)

and hence P P D ( ) = D ( ) = (1 ) : (: 1) x x Using equation (.) to substitute for q = 1 Q, and then using equation (.1), gives ( Dx( p) + Dx( ) p) ; À1 1 Q which gives q = D ( p ); (: 1) x where = = ( À1). Turning our attention now to equation (.) and substituting for P and Q using equations (.9) and (.1) we have D ( + p)+ (1 p) D ( + q )=; and, because is a function of x only and is a constant, this immediately simplies to 1 P Q t P P Q D ( p)+ (1 p) D ( q )=: This equation can be linearised by a similar process to that used for the momentum balance equation by neglecting second order terms in p and q. This gives D ( p) + (1 ) D ( q ) = : (: 1) If we now dierentiate both sides of equation (.1) partially with respect to x, we can then substitute for D ( q) in equation (.1) to obtain x t t Q P P x x x D ( p) = D ( p ); (: 15) t xx where P P ( ) = (1 ) : Thus we replace the non-linear equations (.1) and (.) with the equations (.1) and (.15), which are linearised about a mass ow rate and pressure prole. Equation (.15) is used to approximate the perturbations in pressure and is solved for <x< 1 and t>. The initial conditions for a pipe section are taen to be px; ( )= for x 1: 8

The following boundary data are required at the ends of the pipe section: at x = we require P p (;t) = P (;t) (); or j Q q (;t) = D ( p) = Q (;t) ; x x= and at x = 1, we require P p (1;t) = P (1;t) (1); or j Q q (1;t) = D ( p) = Q (1;t) : x x=1. The Finite Dierence Approximation Each of the pipe sections have nodes at either end and a number of regularly spaced internal nodes. For an arbitrary pipe section with s + 1 nodes, we have Nodes: {1 { {... s Pipe section! Firstly, we introduce some notation. For any pipe section with s + 1 nodes, we let our numerical approximations be P P p p( ix; t ); q q( ix; t ); ( ( ix )); ( ( ix )); i; i; i i where i =,1,,,..., s, x is the spatial discretisation interval of the pipe and t is the sample period with =,1,,... In our numerical model, we use a nite dierence scheme based on the nodal perturbations only pressure ; the perturbations in inline ows can then be calculated separately 9

from the computed pressure perturbation prole using a dierence approximation based on equation (.1). For any pipe section, at any of its nodes, the governing dierential equation D ( p) = D ( p ) (: 1) can be approximated by the weighted average nite dierence scheme pi;+1 pi; = ir( ià1pi À1 ;+1 ipi;+1 + i+1 pi +1 ;+1) +(1 ) ir( ià1pi À1 ; ipi; + i+1 pi +1;) for 1, where r= t= ( x). This nite dierence equation can be rewritten as ir ià1pi À1 ;+1 +(1+ir ) i pi;+1 ir i+1 pi +1 ;+1 = t (1 )ir ià1pi À1 ; + (1 (1 )ir i) pi; + (1 )ir i+1 p i +1;: (: 1) In [], the truncation error [], [8], of dierence equation (.1) is shown to be Ox ( ) + Ot ( ) for = 1=, and Ox ( ) + Ot ( ) for < 1= and 1= < 1. Hence, dierence equation (.1) is consistent with dierential equation (.1) for 1. However, for = 1=, dierence equation (.1) is a Cran-Nicolson scheme with the highest order of accuracy. xx For a simple numerical model, the initial conditions for any pipe section with s + 1 nodes may be taen to be = for all pressure perturbation variables. At end nodes and s, we require boundary data. For example if pressure is given, then at node we have while at node s we have p P p = P (; t ) (); for = ; 1; ; :::; ; P i; p = P (1; t ) (1); for = ; 1; ; ::: s; 1

For ow boundary conditions given at node s in a general pipe section, we use the following theory. Using equation (.1) we derive the nite dierence equation ( s+1 ps +1; sà1ps À1;) = xq s; (: 18) for the boundary ow condition at the node i = s for any pipe section. From [], approximating the derivative D ( p) by Dx( p) ( s+1 ps +1; sà1p s À1;) = x involves a leading error on the right hand side of order ( x). Eliminating and p between equation (.1), with i = s, and equation (.18), gives as the s+1 s +1 ;+1 general nite dierence equation for any pipe section with a ow boundary condition at i = s sr sà1ps À1 ;+1 + (1 + sr s) ps;+1 + ( srx= ) qs;+1 = (1 )sr sà1ps À1; + (1 (1 )sr s) ps; ((1 ) srx=) q s;: (: 19) For a ow boundary condition at node of a general pipe section, equation (.1) gives Similarly, approximating the derivative D ( p) by x ( 1p1; À1pÀ1; ) = xq ;: (: ) Dx ( p) ( 1p1; À1p À1;) = x involves a leading error on the right hand side of order ( x). Eliminating À1pÀ1; and À1pÀ1 ;+1 between equation (.1), with i=, and equation (.), gives the general nite dierence equation for any pipe section with a ow boundary condition at i= (1+ r ) p r p ( rx= ) q = x ; +1 1 1 ; +1 ;+1 (1 (1 ) r ) p + (1 ) r p + ((1 ) rx= ) q : (: 1) ; 1 1; ; p s+1 s +1;. The Networ Model Now we consider how to lin up the separate nite dierence models for the single pipe sections into a networ model. For the networ model, we use superscripts to denote 11

particular pipe sections. Regarding the initial linearisation procedure, we linearise about dierent inline ows for all pipe sections. Hence, for our linear networ, we linearise about a steady state where the ow demands at the junctions are not zero. In practice, a value for the steady Q z ow,, in each pipe section z may be suggested by, say, substituting the values of the pressure measurements at the opposite ends of the pipe section into equation (.8) and Q z z solving for. It may be the case that we have to mae a best guess for a value for. Q Firstly, we use equation (.8) to linearise for the upstream section (i.e. section a for the example networ) by substituting in an assumed steady value for the in- upstream section upstream section line ow,, and a value for (), and generating a steady pressure prole using an iterative technique such as Newton's. In practice, a value for P upstream section () is suggested by the upstream pressure measurement of that section. Next, the same procedure is carried out for neighbouring sections downstream in turn, z using dierent steady inline ows,, for linearising each general pipe z, and using the z calculated value for À1 z (1) from the adjacent upstream section as the value for () P each time. This means that at each pipe section junction we are linearising about a steady demand ow Q Q = z z+1 where is the steady ow we linearised about in the upstream section z, and is the steady ow we linearised about in the downstream section z + 1. Q P Q Q z=z+1 z z+1 Q P Q Now we examine how to lin up the separate nite dierence schemes for two general adjacent pipe sections, z and z + 1, in a linear networ. Pipe sections z and z + 1 have, z z+1 say, s + 1 and s + 1 nodes respectively (although one of these nodes is shared by both pipe sections). Nodes: {1 { {...( s ) = {1 { {...( s ) z z z z z z z+1 z+1 z+1 z+1 z+1 z+1!! {Section z Section z + 1 1

z z z+1 For our `internal boundary node' ( s ) =, we derive a nite dierence equation that lins up the nite dierence equations for the two pipe sections on either side, z and z+1. +1 We assume that at time level, we have a normalised ow demand, D, out of the pipe junction, z=z + 1, where Q d z=z+1 z=z+1 z=z +1 z=z+1 +1 D = + d ; is the demand ow out of the pipe junction z=z+1 chosen for the linearisation, and is a perturbation away from that steady demand ow. Then to enforce continuity z z z+1 of mass ow at node ( s ) =, we require z=z Q z z z+1 z+1 +1 +1 [ q z +(1 ) q z ]+[ q +(1 ) q ]+[ d +(1 ) d ]=: () : s ;+1 s ; ;+1 ; z=z +1 z=z z=z Rearranging both equation (.19) for pipe z and equation (.1) for pipe z+1, for q etc., and substituting into equation (.) gives us the following nite dierence equation z z z+1 for our internal boundary node ( s ) =. À z=z+1 z z z z z=z+1 z z=z+1 z z=z+1 z+1 z=z+1 z+1 z=z+1 ( s z 1 =x ) p s z 1 ; +1 +(1+ =x + =x ) p +1 À where we have dened z=z+1 z+1 z+1 z+1 z+1 z=z+1 z=z+1 ( 1 =x ) p ; + d = 1 +1 +1 +1 +1 +1 +1 À z À À À À z=z+1 z z z z z=z z z=z z z=z z z=z+1 z+1 z=z+1 ( s z 1(1 ) =x ) p s 1 ; +(1 (1 ) =x (1 ) =x ) p À À z z+1 z=z+1 = ( + ) À rx rz+1 xz+1 z+1 z z z z s s ; z=z À À ; z z+1 z z+1 and where, because p z p and z, at the junction we have denoted the pres- +1 z z+1 z=z+1 z z+1 sure perturbation by p p z p, and denoted by s z. This equation is our `connectivity equation', which is the actual nite dierence equation we use at the node between two pipe sections z and z + 1. Equivalent connectivity equations are also derived for other pipe junctions. The junction demand ows, d s s ; +1 +1 z=z À À À z=z+1 z+1 z+1 z z +1 z=z+1 + ( 1 (1 ) =x ) p ; (1 ) d (: ) 1 ; junction, must be nown and used as an input to the model rather lie an internal boundary condition. 1 z i; 1

For consistency of notation, the numerically computed ow demand at the down- end stream end of the last pipe of the linear networ, Q Àpipe endàpipe (1;t), is denoted by D. Also, we denote the demand ow perturbation at the downstream end, end pipe d À where Q. Then we have end À pipe endàpipe end D = Àpipe endàpipe + d ; Q, by is the steady ow through the end-pipe section about which we linearised. q À À end pipe end node; For any linear gas networ with g pipes, with pressure input data available at the upstream end and ow demand input data available at the g sites of outow, the corresponding n dimensional model taes the form 1 Ex( + 1) = Ax( ) + Bu( + 1) + Bu( ; ) (: ) where x ( ) is the ndimensional state vector containing the nodal pressure variables, u ( ) is the g + 1 dimensional input vector containing the upstream pressure input and 1 the g ow boundary inputs to drive the model, and E, A and B, B are system matrices derived from the underlying nite dierence equations, with dimensions n n ( g+ 1) respectively. M n and If we have pressure measurements available at the sites of ow demand, this corresponds to having g measurements of the state variables where the matrix C M y ( ) = C x ( ) for = ; 1; ; :::::; (: 5) is the `measurement matrix'. If we arrange the pressure variables in the state vector in their order along the pipe networ, i.e. in the following way 1 1 1 1= = g 1=g g g g g T x ( )=[ p 1; ; p ;; ::::; p s 1 1;; p ; p 1; ; p ;; ::::; p s 1;; p ; ::::::::::::::::; p ; p ; p ::::; p ; p ; ; s ; s ;] ; 1 g 1 g À pipe where each pipe has s + 1 nodes, then E and A are tridiagonal. À À À E and A tae the form 1

1 [E ] x xxx x [E ] E = x xx x 1 [A ] x xxx x [A ] x A =...... g [E À1] g [A À1] g [E ] g [A ] z z where [E ] and [A ] are general tridiagonal square blocs containing the coecients of z the inner pressures along pipe z from dierence equations (.1). The blocs, [E ] and z [A ], are sandwiched between single rows corresponding to the g 1 connectivity equations (.) and downstream ow boundary equation (.19) for pipe g, and single columns containing the coecients of the pressures at the pipe junctions and the downstream end. These rows and columns maintain the tridiagonal structure of E and A ; the non-zero xxx x s elements of these rows and columns being represented by x. xx x xx x x x xxx x x xxx x x xx x xx 5 5 The general i th z row of the general rectangular bloc [ [E ] ] taes the form x x À z z z z z z z z z [; ::::; ; r i i 1 ; 1+r i i ; r i i +1 ; ; :::: ] ; z and of the general rectangular bloc [ [A ] ] taes the form À z z z z z z z z z [; ::::; ; r (1 ) i i 1 ; 1 r (1 ) i i ; r (1 ) i i +1 ; ; :::: ] ; À x À À À À x where, for z = 1 and i = 1 the rst nonzero elements of the above general rows are absent. À The row corresponding to a `connectivity equation' (.) at the junction of pipes z and z + 1, in the E matrix has the form 15

À z=z+1 z z z z=z+1 z z=z+1 z z=z+1 z+1 z=z+1 z+1 [; ::::; ; ( s z 1 =x ) ; (1+ =x + =x ) ; À À z=z+1 z+1 z+1 z+1 ( 1 =x ) ; ; :::: ] ; and in the A matrix has the form The row corresponding to the ow boundary equation (.19) at the downstream end, in the E matrix has the form +1 +1 +1 +1 À À À À À z=z+1 z z z z=z z z=z z z=z z z=z+1 z+1 [; ::::; ; s z 1(1 ) =x ; (1 (1 ) =x (1 ) =x ) ; À À z=z+1 z+1 z+1 z+1 1 (1 ) =x ; ; :::: ] : À g g g g g g [; :::::; ; r sg sg 1 ; 1+r sg sg] ; À and in the A matrix has the form À À À g g g g g g [; :::::; ; r (1 )sg sg 1 ; 1 r (1 )sg sg] : À. Theorems In this section, we rstly prove that the matrix E of an model is full ran if >. M We next prove that the system eigenvalues are real if >. Lastly, we prove that M the system eigenvalues are within the unit circle for 1= 1. M junction pipe All theorems rely on the following inequalities. >, >, x >, pipe node pipe pipe junction r >, >, >, > and > for all pipes, nodes and junctions. pipe node We rstly dene three new matrices. th We dene the diagonal matrix, D, where the i diagonal element of D is equal to pipe node th the value of at the i node along the linear gas networ (starting at node 1 of the pipe node junction upstream pipe section). Since > and > by denition, the matrix D is full ran with all diagonal elements positive. 1

that Next, for =, let the matrix M = (1 =)( I E ). Then it can be easily veried E = I + M (: ) and A = I (1 ) M : (: ) By inspection, M is real and tridiagonal, with all o-diagonal elements, m with ji jj = 1, non-zero and negative. Hence, from Theorem 1. in the appendix, all the eigenvalues of M are real. i;j Lastly, let G = M D À1. By inspection, G has the following properties: tridiagonal diagonally dominant with strict inequality at i = 1 j j g >, g < for all i and j with i j = 1. i;i i;j From Theorem 1.1 in the appendix, we have that G is full ran. Theorem.1 M > E If, the matrix of an model is full ran. Proof Let F = E D À1. Assuming >, we can derive F = D À1 + G, which, due to the properties of D and G, must be strictly diagonally dominant. Hence, from Theorem 1. in the appendix, F is full ran, and hence E = F D must be full ran also. Theorem. M > If, the eigenvalues of an model are real. Proof Since, if >, the matrix E is invertible, from equations (.), (.), we have det( A E )= det(( I + M ) À1 ( I (1 ) M ) I )=: () Thus, for ( A ; E ) and ( M ), for i = 1 ; :::; n, i i i = 1 (1 ) 1+ 1 i i

where A;E ( ) denotes the spectrum of the matrix E À1 A and M ( ) denotes the spectrum of the matrix M. Hence, since the eigenvalues,, of M are real then so are the eigenvalues,, of ( E À1 A ) real. Theorem. An i M i (1= ) 1 asymptotically stable, if. model has system eigenvalues within the unit circle, and hence is Proof From equations (.), (.), we have det( A E ) = det((1 ) I + ((1 ) 1) M ): (: 8) Since the determinant of the product of two matrices is equal to the product of the determinants of the individual matrices, from equation (.8) we can derive det( A E ) = det((1 ) D À1 + ((1 ) 1) G ) det( D ): jj We show det( A E )= for 1 and (1= ) 1. The matrix D is full ran, and hence det( D )=. By inspection, if 1, then (1 ) and ((1 ) 1) 1. Also, if 1, then (1 ) and ((1 ) 1). So, for jj 1, we have the following two cases. 1 Case 1) If ((1 ) 1) = then (1 ) and ((1 D ) À + ((1 ) 1) G) = (1 D ) À1 which is full ran. Then det((1 D ) À1 + ((1 ) 1) G)=. ((1 D ) À1 + ((1 ) 1) G) has the following properties Case ) If ((1 ) 1)= then, due to the properties of D and G, the matrix tridiagonal diagonally dominant with strict inequality for i = 1 o-diagonal elements with elements. ji jj = 1 are non-zero and of opposite sign to diagonal 18

and, from Theorem 1.1 in the appendix, is full ran. Then det((1 D ) À1 + ((1 ) 1) G)=. Hence, for 1, det( A E ) = det((1 ) D À1 + ((1 ) 1) G ) det( D )=. jj Thus, if (1= ) 1, the eigenvalues of the system matrices have modulus less than 1, and the M M model is asymptotically stable. The Lax stability [] of the model is dened in terms of the boundedness of the solution to the nite dierence equations at a xed, T, as t and x tend to zero with r = t= ( x) ept xed. It is related via Lax's Equivalence Theorem [] to the convergence of the solution of the M M system to the solution of the governing dierential equations (.1), as the computational mesh is rened. However, unlie the asymptotic, or Liapunov, stability already investigated above, Lax stability is not directly dependent on the eigenvalues of the system. Some attempt was made to provide proofs of both the M Lax stability of the system and the convergence of the solution of the system to the solution of the governing dierential equations (.1), as the computational mesh was rened. Unfortunately, this was not achieved, the diculty being the space-varying nature of the system coecients. Two good references that deal with this specic problem are [] and [1]. Providing such stability and convergence proofs for systems and all other systems explored in this thesis would be a worthwhile area of future research. However, experimentally, the solution of the model was found to be convergent, for both = 1= and = 1, as the computational mesh was rened with r = : for all pipes. M M M This base M model has also been tested thoroughly in [] with real gas networ data, and was found to model the behaviour of real gas networs quite accurately. 19

Chapter Formulation of a New M1 Variant Model The gas networs we wish to estimate are linear with pressure measurement only and these measurements are only available at the upstream source and at sites of ow demand. We now show how a new model variation, denoted by M1, which iscapableof estimating ow demands, may be constructed from a base M model. TheM1 model is simply a pressure driven model, and is derived from an M model by rst removing the g ; 1 connectivity equations and the downstream ow boundary equation from the system, and then removing the g ow demand variables. The M1 model is still in the form of a discrete descriptor system, but where the state vector now contains the nodal pressures except those pressures at sites of gas outow. The M1 model is essentially a disconnected set of equations for each pipe. The base M model can be rearranged and partitioned as E 1 1 E 1 5 p 1 ( +1) 5 = A 1 1 A 1 5 p 1 () 5 + B1 1 1 E 1 E p ( +1) A 1 A p () B 1 5 p ( +1) 5 d( +1) + B 1 1 B 5 p () d() 5 (:1) where p () isag dimensional vector containing measured pressure perturbation state variables at the sites of ow demand, p 1 () isan ; g dimensional vector containing the remaining pressure perturbation state variables along the pipes, p () is the upstream

pressure input (assumed nown), and d() isag dimensional vector containing the ow demand perturbation input variables that we wish to estimate. The top n ; g rows correspond to general dierence equations (.1), and the lower g rows correspond to the g ; 1 connectivity equations and the single downstream ow boundary equation. The new M1 system has the form E 1 1p 1 ( +1)=A 1 1p 1 () ;E 1 p ( +1)+B1 1 1 p ( +1)+A 1 p ()+B1 1 p () (:) which can be expressed in the general descriptor system form where E1x1( +1)=A1x1()+B 1 1 u 1( +1)+B 1 u 1() (:) u1() =[p () T p () T ] T : If we arrange the pressure variables in the state vector in their order along the pipe networ, i.e. in the following way x1 () =[p1 p1 1 :::: p1 s 1 p p ;1 1 :::: p s ;1 :::::::::::::::: pg 1 pg :::: pg s g ;1 ]T where each pipehas s pipe + 1 nodes, then the M1 system matrices, E1 and A1, are tridiagonal. E1 and A1 tae the form [E 1 ] [E ] E1 =... [E g;1 ] 5 [E g ] [A 1 ] [A ] A1 =... [A g;1 ] 5 [A g ] 1

where [E z ]and[a z ] are general tridiagonal square blocs containing the coecients of the inner pressures along pipe z from dierence equations (.1). The general square blocs [E z ] and [A z ] are as previously described for the M model. As an M1 model is run, the normalised inline ow perturbations at the ends of each pipe section are estimated by applying a forwards or bacwards dierence discretisation of equation (.1). In other words, at the upstream end of a general pipe z, wewould have q z = ; z (; z 1 pz 1 ; ; z pz )=x z : (:) From [], approximating the derivative D x (;p) by D x (;p)(; z 1 pz 1 ; ; z pz )=x z involves a leading error on the right hand side of order x z.atthe downstream end, we would have q z s z = ; z (; z s zpz s z ; ; z s z ;1 pz s z ;1 )=x z : (:5) Similarly, approximating the derivative D x (;p) by D x (;p)(; z s z pz s z ; ; z s z ;1 pz s z ;1 )=xz involves a leading error on the right hand side of order x z. To estimate the demand ow, d z=z+1 at a general pipe junction z=z +1,we use d z=z+1 = q z s z ; q z+1 : (:).1 Theorems We are able to derive identical theorems for M1 models as we have done for M models. Firstly it is proved that the matrix E1 of an M1 model is full ran if >. Then it is proved that the M1 system eigenvalues are real if >. Finally, itisproved that the M1 system eigenvalues are within the unit circle for 1=1. As with M models, all theorems rely on the following inequalities. ; junction >, x pipe >, r pipe >, >, pipe node ; pipe node >, >, pipe > and junction > for all

pipes, nodes and junctions. We rstly dene three new types of matrix. We dene the general diagonal matrix, D z, corresponding to pipe z for z =1 ::: g, where the i th diagonal elementofd z is equal to the value of ; z i for i =1 ::: s z ; 1. Since ; pipe node >, the matrices Dz are full ran with all diagonal elements positive. Next, for =, we dene the general matrix M z, corresponding to pipe z for z =1 ::: g, where M z = ;(1=)(I ; E z ). Then it can be easily veried that E z = I + M z (:) and A z = I ; (1 ; )M z : (:8) By inspection, the matrices M z are real and tridiagonal, with all the o-diagonal elements, m z i j with ji ; jj = 1, non-zero and negative. Hence, from Theorem 1. in the appendix, all the eigenvalues of the matrices M z are real. Lastly, we dene the general matrix G z, corresponding to pipe z for z =1 ::: g, where G z =M z D z;1. By inspection, the matrices G z have the following properties: tridiagonal diagonally dominant with strict inequality ati = 1 and i = s z ; 1 g i i >, g i j < for all i and j with ji ; jj =1. From Theorem 1.1 in the appendix, we have that the matrices G z are full ran. Theorem.1 If >, The matrix E1 of an M1 model is full ran. Proof To show the matrix E1 is full ran, we show the matrix blocs, E z, are full ran.

For a general pipe section z, let F z = E z D z;1. Assuming >, we can derive F z =D z;1 + G z,which, due to the properties of D z and G z,must be strictly diagonally dominant. Hence, from Theorem 1. in the appendix, F z is full ran, and hence E z = F z D z must be full ran also. Theorem. If >, the eigenvalues of an M1 model are real. Proof To show the eigenvalues of an M1 model are real, we show the eigenvalues of the blocs E z;1 A z are real. For a general pipe section z, since the matrix E z is invertible if >, from equations (.), (.8), we have det(a z ; E z )=() det((i + M z ) ;1 (I ; (1 ; )M z ) ; I) =: Thus, for i (A z E z ) and i (M z ), for i =1 ::: s z ; 1, i = 1 ; (1 ; ) i 1+ i : Hence, since the eigenvalues, i,ofm z are real then so are the eigenvalues, i,of(e z;1 A z ) real. Theorem. An M1 model has system eigenvalues within the unit circle, and hence is asymptotically stable, if (1=)1. Proof To show the eigenvalues of an M1 model are within the unit circle, we show the eigenvalues of the blocs E z;1 A z are within the unit circle. For a general pipe section z, from equations (.), (.8), we have det(a z ; E z )=det((1 ; )I +((1; ) ; 1)M z ): (:9)

Since the determinant of the product of two matrices is equal to the product of the determinants of the individual matrices, from equation (.9) we can derive det(a z ; E z )=det((1 ; )D z;1 + ((1 ; ) ; 1)G z )det(d z ): We show det(a z ; E z )= for jj1 and (1=)1. The matrix D z is full ran, and hence det(d z )=. By inspection, if 1, then (1 ; ) and ((1 ; ) ; 1);1. Also, if ;1, then (1 ; ) and ((1 ; ) ; 1). So, for jj1, we have the following two cases. Case 1) If ((1 ; ) ; 1) = then (1 ; ) and ((1 ; )D z;1 +((1; ) ; 1)G z )= (1 ; )D z;1 which is full ran. Then det((1 ; )D z;1 + ((1 ; ) ; 1)G z )=. Case ) If ((1 ; ) ; 1)= then, due to the properties of D z ((1 ; )D z;1 + ((1 ; ) ; 1)G z ) has the following properties and G z, the matrix tridiagonal diagonally dominant with strict inequality fori = 1 and i = s z ; 1 o-diagonal elements with ji ; jj = 1 are non-zero and of opposite sign to diagonal elements. and, from Theorem 1.1 in the appendix, is full ran. Then det((1 ; )D z;1 + ((1 ; ) ; 1)G z )=. Hence, for jj1, det(a z ; E z )=det((1 ; )D z;1 + ((1 ; ) ; 1)G z )det(d z )=. Thus, if (1=)1, the eigenvalues of the matrix blocs E z;1 A z than 1. have modulus less 5

. Experiments For all experiments in this thesis, a standard M model of the linear three pipe networ from chapter 1, was run to simulate a real gas networ with the upstream pressure, junction demand ows, and downstream ow demand specied as boundary inputs to the system. The parameters for this base M model, and all other models investigated in this thesis, are given in the appendix. Except for a few experiments in chapter 1, the ows at demand sites A=B, B=C and C were in the ratio :5:1. When the M model had been running for a while, the pressures at the upstream end and the sites of ow demand were recorded at each and fed into an M1 model. The ow demands predicted by the M1 model were then compared with the true ows used as inputs to the M model. For experiments.1 to., the M model simulating a gas networ was identical to the M model upon which the M1 model was constructed. For experiments. and.5, the M model simulating a gas networ had amuch ner discretisation (in both space and time) than the M1 model to give some idea of the eects of the modelling error due to the nite dierence approximation of the original dierential equations. D C For each experiment, the true ow demand proles for the demands, D A=B, D B=C and are shown as thic lines in Figs. A, B and C respectively, and the state estimates for D A=B, D B=C and D C are shown as thin lines. The percentage errors between the state estimates of D A=B, D B=C and D C and their true values are shown in Figs. D, E and F respectively. Since, throughout this thesis, the dierent state estimation techniques tended to produce large errors during the rst few s, the results graphs may begin only after a few s have already passed. Data taen from M model with identical mesh - both M and M1 models have 5 spatial nodes along each pipe. Experiment.1) M1 Model with =1 Experiment.) M1 Model with =:5

Experiment.) M1 Model with =:5 Data taen from M model with much ner mesh - M1 model has 5 spatial nodes along each pipe. Experiment.) M1 Model with =1 Data taen from M model with much ner mesh - M1 model has 1 spatial nodes along each pipe. Experiment.5) M1 Model with =1

5 5 5 A : 1st demand profile and estimate..1 B : nd demand profile and estimate -5-1 -15 D : % error for 1st demand estimate -.5-5. -.5 E : % error for nd demand estimate.5.5-1 C : rd demand profile and estimate F : % error for rd demand estimate Experiment.1 8

5 5 5 A : 1st demand profile and estimate..1 B : nd demand profile and estimate 5 D : % error for 1st demand estimate 1 E : % error for nd demand estimate.5.5 5..5 C : rd demand profile and estimate F : % error for rd demand estimate Experiment. 9

.5 -.5 A : 1st demand profile and estimate.5 -.5 B : nd demand profile and estimate 5 D : % error for 1st demand estimate 5 E : % error for nd demand estimate.5 5-5 C : rd demand profile and estimate F : % error for rd demand estimate Experiment.

5 5 5 A : 1st demand profile and estimate..1 B : nd demand profile and estimate -5-1 -15 D : % error for 1st demand estimate -.5-5. -.5 E : % error for nd demand estimate.5.5-1 C : rd demand profile and estimate F : % error for rd demand estimate Experiment. 1

5 5 5 A : 1st demand profile and estimate..1 B : nd demand profile and estimate -.5-5. D : % error for 1st demand estimate -1 - - E : % error for nd demand estimate.5.5 -.5 C : rd demand profile and estimate F : % error for rd demand estimate Experiment.5

. Discussion In all experiments, there was some error due to the crude forwards and bacwards dierence approximations used to discretise equation (.1). However, as the computational mesh of the M1 model was rened, this error decreased. No theoretical analysis is presented here to prove that such error should decay as the computational mesh is rened, and the possibility of such analysis would be worth exploring. As mentioned in the previous chapter, two good references for this problem are [] and [1]. From the experiments with pressure data taen from an M model constructed upon a much ner mesh, it could be seen that the modelling error introduced by discretising the original dierential equations would not aect the ow estimates too adversely if a suciently ne computational mesh was used. For =1=, the M1 model converged very slowly to a reasonable estimate of the ow demands. However, as moved closer to 1, it was found experimentally that the eigenvalues ofthem1 system tended to move closer to the origin, and there was faster convergence. For experiments :1, : and:, the M1 system eigenvalues for various values of are given in the following table. =1 =:5 =:5 : ;:515 ;:81 :11 ;:8 ;:911 :8 ;:185 ;:989 :58 ;:5 ;:85 :18 ;:88 ;:95 :81 ;:1889 ;:99 :9 ;:81 ;:858 :11 ;:1 ;:95 :51 ;:18 ;:91 Hence, the choice of is to some extent a balance between the order of accuracy of the nite dierence scheme, and the speed of convergence of the system. The main disadvantage of an M1 model is the error introduced into the state estimate by the crude forwards and bacwards dierence approximations used to discretise

equation (.1). In the next chapter we investigate a new model, which we term an M model, which uses a central dierence approximation of equation (.1). It is shown that the ow estimates of such a model contain signicantly less error.

Chapter Formulation of a New M Variant Model We nowshowhow a new pressure driven model variation, denoted by M, which is capable of estimating ow demands from the available pressure telemetry,may be constructed from a base M model using the same central dierence discretisation of equation (.1) that the base M model uses. The M model is derived from an M modelbyswapping over the ow variables from the input vector with the local pressure variables from the state vector. It is still in the form of a discrete descriptor system, but where the state vector now contains the demand ows and all nodal pressures except those pressures at sites of gas outow. The new input vector now contains those pressures at sites of gas outow. The base M model can be rearranged and partitioned as E E p 1 ( +1) 5 = A A p 1 () 5 + p ( +1) p () + B B where p 1, p, p and d are as described earlier. p () d() B 1 B p ( +1) 1 d( +1) 5 5 (:1) 5

The new M system has the form p 1 ( +1) 5 = E ;B 1 d( +1) + A B B p 1 () d() A p () p () 5 + which can be expressed in the general descriptor system form B 1 ;E p ( +1) p ( +1) 5 5 (:) Ex( +1)=Ax()+B 1 u ( +1)+B u (): (:).1 Theorems We are able to derive similar theoretical results as for M andm1 models however, suf- cient conditions for asymptotic stability are slightly more restrictive. Firstly, weprove that the matrix E of an M model is full ran if >. It is then proved that the M system eigenvalues are real if >. Next, it is proved that the M system eigenvalues are within the unit circle for 1= <1, and are within or on the unit circle for =1=. Lastly, we prove the following. When pressure data is fed from a base M model into its corresponding M model, then, if the M model is asymptotically stable, the system state of the M model tends with time to the state of the base M model and its ow inputs. As with M models, all theorems rely on the following inequalities. ; junction >, x pipe >, r pipe >, >, pipe node pipes, nodes and junctions. ; pipe node >, >, pipe > and junction > for all If the base M model is rearranged and partitioned as equation (.1), then the corresponding M model has the form E 1 1 E 1 ;B 1 5 p ( 1 +1) 5 = A 1 1 d( +1) A 1 B 5 p 1 () 5+ B1 1 1 ;E 1 5 p ( +1) 5 d() ;E p ( +1) + B 1 1 A 1 A 5 p () p () 5 : (:)